/* Authentication Styles for Trinity-IRIS */

/* Auth Hero Container */
.auth-hero {
    min-height: calc(100vh - 120px);
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.03) 0%, rgba(76, 201, 240, 0.03) 100%);
    padding: 3rem 0;
}

[data-theme="dark"] .auth-hero {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.05) 0%, rgba(76, 201, 240, 0.05) 100%);
}

/* Brand Card (Left Panel) */
.auth-hero .brand-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    border: 1px solid rgba(96, 165, 250, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-hero .brand-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(96, 165, 250, 1) 0%, rgba(76, 201, 240, 1) 100%);
}

.auth-hero .brand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .auth-hero .brand-card {
    background: linear-gradient(135deg, rgba(21, 27, 36, 0.95) 0%, rgba(18, 22, 30, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auth-hero .brand-badge {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15) 0%, rgba(76, 201, 240, 0.15) 100%);
    color: #3f74ff;
    border: 1px solid rgba(96, 165, 250, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    display: inline-block;
    transition: all 0.3s ease;
}

.auth-hero .brand-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

[data-theme="dark"] .auth-hero .brand-badge {
    color: #a7c1ff;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.2) 0%, rgba(76, 201, 240, 0.2) 100%);
    border-color: rgba(96, 165, 250, 0.4);
}

/* Feature Icons */
.auth-hero .feature-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.auth-hero .feature-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

.auth-hero .feature-icon.chart {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15) 0%, rgba(96, 165, 250, 0.25) 100%);
    color: #3f74ff;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.auth-hero .feature-icon.brief {
    background: linear-gradient(135deg, rgba(0, 210, 140, 0.15) 0%, rgba(0, 210, 140, 0.25) 100%);
    color: #12b886;
    border: 1px solid rgba(0, 210, 140, 0.3);
}

.auth-hero .feature-icon.list {
    background: linear-gradient(135deg, rgba(76, 201, 240, 0.15) 0%, rgba(76, 201, 240, 0.25) 100%);
    color: #2f9ed1;
    border: 1px solid rgba(76, 201, 240, 0.3);
}

.auth-hero .feature-icon.lock {
    background: linear-gradient(135deg, rgba(0, 210, 140, 0.15) 0%, rgba(0, 210, 140, 0.25) 100%);
    color: #12b886;
    border: 1px solid rgba(0, 210, 140, 0.3);
}

.auth-hero .feature-icon.shield {
    background: linear-gradient(135deg, rgba(255, 185, 0, 0.15) 0%, rgba(255, 185, 0, 0.25) 100%);
    color: #d4a300;
    border: 1px solid rgba(255, 185, 0, 0.3);
}

.auth-hero .feature-icon.watch {
    background: linear-gradient(135deg, rgba(76, 201, 240, 0.15) 0%, rgba(76, 201, 240, 0.25) 100%);
    color: #2f9ed1;
    border: 1px solid rgba(76, 201, 240, 0.3);
}

.auth-hero .feature-icon.graduation {
    background: linear-gradient(135deg, rgba(111, 66, 193, 0.15) 0%, rgba(111, 66, 193, 0.25) 100%);
    color: #6f42c1;
    border: 1px solid rgba(111, 66, 193, 0.3);
}

.auth-hero .feature-icon.database {
    background: linear-gradient(135deg, rgba(111, 66, 193, 0.15) 0%, rgba(111, 66, 193, 0.25) 100%);
    color: #6f42c1;
    border: 1px solid rgba(111, 66, 193, 0.3);
}

.auth-hero .feature-sub {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
    line-height: 1.4;
}

.auth-hero .cta-copy {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* Auth Card Styles - Modern Fintech Design */
.auth-card {
    max-width: 100%;
    margin: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(96, 165, 250, 0.15);
    background: var(--bg-primary);
    transition: all 0.3s ease;
    position: relative;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(96, 165, 250, 1) 0%, rgba(24, 185, 143, 1) 100%);
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .auth-card {
    background: var(--bg-secondary);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auth-card .card-header {
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, rgba(96, 165, 250, 1) 0%, rgba(24, 185, 143, 1) 100%);
    border-bottom: 0;
    position: relative;
}

.auth-card .card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
}

.auth-card .card-header .card-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
    margin: 0;
}

.auth-card .card-body {
    padding: 2.5rem;
}

[data-theme="dark"] .auth-card .card-body {
    background: var(--bg-secondary);
}

/* Auth Form Elements - Modern Styling */
.auth-form .form-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.2px;
}

.auth-form .form-control {
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

.auth-form .form-control:focus {
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.8);
    background: var(--bg-primary);
    outline: none;
}

.auth-form .form-control::placeholder {
    color: var(--text-light);
    opacity: 0.6;
}

.auth-form .input-group-text {
    background: var(--bg-secondary);
    color: var(--text-light);
    border: 2px solid var(--border-color);
    border-left: 0;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-form .input-group-text:hover {
    background: var(--bg-accent);
    color: var(--primary-color);
}

.auth-form .input-group .form-control {
    border-right: 0;
    border-radius: 12px 0 0 12px;
}

.auth-form .form-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.auth-form .invalid-feedback {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    color: #ff6b6b;
}

.auth-form .is-invalid {
    border-color: #ff6b6b;
}

.auth-form .is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.15);
    border-color: #ff6b6b;
}

/* Password Meter */
.password-meter {
    height: 6px;
    border-radius: 4px;
    background: var(--bg-accent);
    overflow: hidden;
    margin-top: 0.5rem;
}

.password-meter .bar {
    height: 100%;
    width: 0%;
    transition: width 200ms ease, background-color 200ms ease;
    border-radius: 4px;
}

/* Buttons - Modern Fintech Style */
.auth-form .btn-primary {
    background: linear-gradient(135deg, rgba(96, 165, 250, 1) 0%, rgba(24, 185, 143, 1) 100%);
    border: 0;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.auth-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.auth-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
    background: linear-gradient(135deg, rgba(24, 185, 143, 1) 0%, rgba(96, 165, 250, 1) 100%);
}

.auth-form .btn-primary:hover::before {
    left: 100%;
}

.auth-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
}

.auth-form .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-form .btn-outline-secondary {
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    background: transparent;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.auth-form .btn-outline-secondary:hover {
    background: var(--bg-accent);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.15);
}

.auth-form .btn-google {
    background: #ffffff;
    color: #202124;
    border: 2px solid #dadce0;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-form .btn-google:hover {
    background: #f7f8f8;
    border-color: #c4c7c5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .auth-form .btn-google {
    background: #ffffff;
    color: #202124;
}

/* Alert Messages */
.auth-card .alert {
    border-radius: 12px;
    border: 0;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.auth-card .alert-danger {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
    color: #ff6b6b;
    border-left: 4px solid #ff6b6b;
}

.auth-card .alert-success {
    background: linear-gradient(135deg, rgba(0, 210, 140, 0.1) 0%, rgba(0, 210, 140, 0.05) 100%);
    color: #12b886;
    border-left: 4px solid #12b886;
}

/* Consent Checkboxes */
.auth-form .form-check {
    margin-bottom: 0.75rem;
}

.auth-form .form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 4px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-form .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.auth-form .form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
    border-color: var(--primary-color);
}

.auth-form .form-check-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    cursor: pointer;
}

.auth-form .form-check-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-form .form-check-label a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Divider */
.text-center.text-muted {
    color: var(--text-light);
    font-size: 0.875rem;
    position: relative;
    margin: 1.5rem 0;
}

.text-center.text-muted::before,
.text-center.text-muted::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: var(--border-color);
}

.text-center.text-muted::before {
    left: 0;
}

.text-center.text-muted::after {
    right: 0;
}

/* Auth Message (for non-authenticated users) - Modern Fintech Design */
.auth-message {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-radius: 16px;
    padding: 0;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    animation: fadeIn 0.4s ease-out;
}

.auth-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.auth-message-content {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.auth-message-icon {
    margin-bottom: 0.5rem;
}

.auth-icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, rgba(76, 201, 240, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(96, 165, 250, 0.2);
    transition: all 0.3s ease;
}

.auth-icon-wrapper i {
    font-size: 32px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.auth-message:hover .auth-icon-wrapper {
    border-color: rgba(96, 165, 250, 0.4);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(96, 165, 250, 0.2);
}

.auth-message:hover .auth-icon-wrapper i {
    transform: scale(1.1);
}

.auth-message-text {
    text-align: center;
    max-width: 600px;
}

.auth-message-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.auth-message-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
}

.auth-message-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
}

.auth-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    padding: 0.875rem 2rem !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    cursor: pointer !important;
    min-width: 160px !important;
    position: relative !important;
    overflow: hidden !important;
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
}

.auth-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3) !important;
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.auth-btn-primary:hover i {
    transform: translateX(2px);
}

.auth-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
}

.auth-btn-secondary {
    background: var(--bg-primary) !important;
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.1) !important;
}

.auth-btn-secondary:hover {
    background: rgba(96, 165, 250, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(96, 165, 250, 0.2);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.auth-btn-secondary:hover i {
    transform: scale(1.1);
}

.auth-btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.1);
}

/* Auth Required Message (for sections that require authentication) */
.auth-required-message {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 2.5rem;
    margin: 1rem 0;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-required-message > div {
    width: 100%;
}

.auth-required-message h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.auth-required-message p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.auth-required-message .btn {
    margin: 0 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    min-width: 120px;
}

.auth-required-message i {
    color: var(--text-light);
    opacity: 0.7;
    display: block;
    margin-bottom: 1rem;
}

/* User Avatar and Dropdown */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-avatar:hover {
    background-color: var(--primary-hover);
}

/* Dark Mode Support */
[data-theme="dark"] .auth-message {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-accent) 100%);
    border-color: var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .auth-icon-wrapper {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15) 0%, rgba(76, 201, 240, 0.15) 100%);
    border-color: rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .auth-btn-secondary {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

[data-theme="dark"] .auth-btn-secondary:hover {
    background: rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .auth-required-message {
    background-color: var(--bg-secondary);
    border-color: var(--border-color-dark);
}

[data-theme="dark"] .auth-form .form-control {
    background-color: var(--bg-secondary);
    border-color: var(--border-color-dark);
    color: var(--text-primary);
}

[data-theme="dark"] .auth-form .form-text {
    color: var(--text-secondary);
}

/* ===== MOBILE-FIRST RESPONSIVE DESIGN ===== */

/* Mobile-only styles - wrapped in media query to preserve desktop design */
@media screen and (max-width: 991px) {
    /* Base mobile styles */
    .auth-hero {
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
        padding: 0;
        display: flex;
        align-items: stretch;
        background: linear-gradient(135deg, rgba(96, 165, 250, 0.03) 0%, rgba(76, 201, 240, 0.03) 100%);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .auth-hero .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .auth-hero .row {
        margin: 0;
        width: 100%;
    }

    /* Hide brand card on mobile */
    .auth-hero .brand-card {
        display: none;
    }

    /* Mobile-optimized auth card */
    .auth-card {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        box-shadow: none;
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
    }

    .auth-card::before {
        height: 3px;
    }

    .auth-card .card-header {
        padding: 1.5rem 1.25rem;
        background: linear-gradient(135deg, rgba(96, 165, 250, 1) 0%, rgba(24, 185, 143, 1) 100%);
        border-radius: 0;
        flex-shrink: 0;
    }

    .auth-card .card-header .card-title {
        font-size: 1.5rem;
        font-weight: 700;
        letter-spacing: -0.01em;
    }

    .auth-card .card-body {
        padding: 2rem 1.25rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }

    /* Mobile-optimized form elements */
    .auth-form {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .auth-form .form-label {
        font-size: 0.9375rem;
        font-weight: 600;
        margin-bottom: 0.625rem;
        color: var(--text-primary);
        letter-spacing: 0.01em;
    }

    .auth-form .form-control {
        padding: 1rem 1rem;
        font-size: 16px; /* Prevent zoom on iOS (16px minimum) */
        border-radius: 12px;
        border: 2px solid var(--border-color);
        background: var(--bg-secondary);
        color: var(--text-primary);
        width: 100%;
        min-height: 52px; /* Touch-friendly target */
        -webkit-appearance: none;
        appearance: none;
        transition: all 0.2s ease;
        line-height: 1.5;
        box-sizing: border-box;
    }
}

    .auth-form .form-control:focus {
        box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
        border-color: rgba(96, 165, 250, 0.8);
        background: var(--bg-primary);
        outline: none;
    }

    /* Input group for password field */
    .auth-form .input-group {
        display: flex;
        width: 100%;
    }

    .auth-form .input-group .form-control {
        border-right: none;
        border-radius: 12px 0 0 12px;
        flex: 1;
    }

    .auth-form .input-group-text {
        background: var(--bg-secondary);
        border: 2px solid var(--border-color);
        border-left: none;
        border-radius: 0 12px 12px 0;
        padding: 1rem;
        min-width: 52px;
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--text-secondary);
        transition: all 0.2s ease;
    }

    .auth-form .input-group-text:hover,
    .auth-form .input-group-text:active {
        background: var(--bg-accent);
        color: var(--primary-color);
    }

    .auth-form .input-group-text i {
        font-size: 1.125rem;
    }

    /* Mobile-optimized buttons */
    .auth-form .btn-primary,
    .auth-form .btn-outline-secondary,
    .auth-form .btn-google {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 12px;
        min-height: 52px; /* Touch-friendly target (48px minimum, 52px for comfort) */
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: rgba(96, 165, 250, 0.2);
        touch-action: manipulation; /* Improve tap responsiveness */
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        box-sizing: border-box;
    }

    .auth-form .btn-primary {
        margin-top: 0.5rem;
        box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
    }

    .auth-form .btn-primary:active {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
    }

    .auth-form .btn-outline-secondary {
        margin-top: 0.75rem;
    }

    .auth-form .btn-outline-secondary:active {
        transform: scale(0.98);
    }

    .auth-form .btn-google {
        margin-bottom: 0;
    }

    .auth-form .btn-google:active {
        transform: scale(0.98);
    }

    /* Spacing adjustments for mobile */
    .auth-form .mb-3 {
        margin-bottom: 1.5rem !important;
    }

    .auth-form .d-grid {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Divider styling for mobile */
    .text-center.text-muted {
        margin: 1.5rem 0;
        font-size: 0.875rem;
        color: var(--text-light);
        position: relative;
        padding: 0 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .text-center.text-muted::before,
    .text-center.text-muted::after {
        content: '';
        position: absolute;
        top: 50%;
        width: calc(50% - 1.5rem);
        height: 1px;
        background: var(--border-color);
    }

    .text-center.text-muted::before {
        left: 0;
    }

    .text-center.text-muted::after {
        right: 0;
    }

    /* Alert messages */
    .auth-card .alert {
        border-radius: 12px;
        padding: 1rem 1.25rem;
        font-size: 0.9375rem;
        margin-bottom: 1.25rem;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .auth-card .alert-danger,
    .auth-card .alert-success {
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Diagnostic tools - hide on mobile or make subtle */
    .auth-card .mt-4 {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border-color);
    }

    .auth-card .btn-sm {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        min-height: 44px;
    }

    /* Safe area support for notched devices */
    @supports (padding: max(0px)) {
        .auth-card .card-body {
            padding-left: max(1.25rem, env(safe-area-inset-left));
            padding-right: max(1.25rem, env(safe-area-inset-right));
        }
        
        .auth-card .card-header {
            padding-left: max(1.25rem, env(safe-area-inset-left));
            padding-right: max(1.25rem, env(safe-area-inset-right));
        }
    }
}

/* Desktop and up (992px+) - Restore original desktop design */
@media (min-width: 992px) {
    .auth-hero {
        min-height: calc(100vh - 120px);
        padding: 3rem 0;
    }
    
    .auth-hero .container {
        max-width: 1200px;
        padding: 0 20px;
    }
    
    .auth-hero .brand-card {
        display: block;
        margin-bottom: 0;
    }
    
    .auth-card {
        border-radius: 20px;
        border: 1px solid rgba(96, 165, 250, 0.15);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
        min-height: auto;
        max-width: 100%;
    }
    
    .auth-card .card-header {
        padding: 2rem 2.5rem;
        border-radius: 20px 20px 0 0;
    }
    
    .auth-card .card-header .card-title {
        font-size: 1.75rem;
    }
    
    .auth-card .card-body {
        padding: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    .auth-form .form-control {
        padding: 0.875rem 1.125rem;
        font-size: 0.9375rem;
        min-height: auto;
    }
    
    .auth-form .input-group-text {
        padding: 0.875rem 1rem;
        min-height: auto;
    }
    
    .auth-form .btn-primary,
    .auth-form .btn-outline-secondary,
    .auth-form .btn-google {
        width: auto;
        padding: 0.875rem 2rem;
        font-size: 0.9375rem;
        min-height: auto;
    }
    
    .auth-form .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .auth-card .mt-4 {
        border-top: none;
        padding-top: 0;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .auth-hero {
        padding: 4rem 0;
    }
    
    .auth-card .card-body {
        padding: 2.5rem 3rem;
    }
}

/* Large desktop (1200px+) */
@media (min-width: 1200px) {
    .auth-card .card-body {
        padding: 2.5rem 3.5rem;
    }
}

/* Small mobile devices (max-width: 480px) */
@media (max-width: 480px) {
    .auth-card .card-header {
        padding: 1.25rem 1rem;
    }
    
    .auth-card .card-header .card-title {
        font-size: 1.375rem;
    }
    
    .auth-card .card-body {
        padding: 1.75rem 1rem;
    }
    
    .auth-form .form-control {
        padding: 0.9375rem 1rem;
        font-size: 1rem;
    }
    
    .auth-form .input-group-text {
        padding: 0.9375rem 0.875rem;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .auth-card {
        min-height: auto;
    }
    
    .auth-card .card-body {
        padding: 1.5rem 1.25rem;
    }
}

/* Dark mode mobile optimizations */
[data-theme="dark"] .auth-card {
    background: var(--bg-secondary);
}

[data-theme="dark"] .auth-form .form-control {
    background: var(--bg-accent);
    border-color: var(--border-color);
}

[data-theme="dark"] .auth-form .form-control:focus {
    background: var(--bg-primary);
}

[data-theme="dark"] .auth-form .input-group-text {
    background: var(--bg-accent);
    border-color: var(--border-color);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .auth-form .form-control,
    .auth-form .btn-primary,
    .auth-form .btn-outline-secondary,
    .auth-form .btn-google,
    .auth-form .input-group-text {
        transition: none;
    }
    
    .auth-form .btn-primary:active,
    .auth-form .btn-outline-secondary:active,
    .auth-form .btn-google:active {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-form .form-control {
        border-width: 3px;
    }
    
    .auth-form .btn-primary,
    .auth-form .btn-outline-secondary,
    .auth-form .btn-google {
        border-width: 3px;
    }
}

/* Legacy mobile support (older devices) */
@media (max-width: 360px) {
    .auth-card .card-header {
        padding: 1.125rem 0.875rem;
    }
    
    .auth-card .card-header .card-title {
        font-size: 1.25rem;
    }
    
    .auth-card .card-body {
        padding: 1.5rem 0.875rem;
    }
    
    .auth-form .form-control {
        padding: 0.875rem 0.875rem;
        font-size: 16px;
    }
    
    .auth-form .btn-primary,
    .auth-form .btn-outline-secondary,
    .auth-form .btn-google {
        padding: 0.9375rem 1.25rem;
        font-size: 0.9375rem;
    }
}

/* Extra small devices - ensure everything fits */
@media (max-width: 320px) {
    .auth-card .card-header {
        padding: 1rem 0.75rem;
    }
    
    .auth-card .card-body {
        padding: 1.25rem 0.75rem;
    }
    
    .auth-form .form-label {
        font-size: 0.875rem;
    }
    
    .auth-form .form-control {
        padding: 0.875rem 0.75rem;
    }
    
    .auth-form .btn-primary,
    .auth-form .btn-outline-secondary,
    .auth-form .btn-google {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }
}

/* Override Bootstrap d-none for auth-message when it should be visible */
.auth-message:not(.d-none) {
    display: block !important;
}

/* Styles moved from index.html for auth state visibility */

/* Hide auth message by default if user was previously authenticated via class */
.user-authenticated #auth-message {
    display: none !important;
}

/* Explicit display for sections that should only appear when authenticated */
.user-authenticated .auth-required {
    display: block !important; /* Use block or appropriate display type */
}

/* For unauthenticated users via class */
.user-unauthenticated #auth-message {
    display: block !important;
}

/* Hide Demo Portfolios section for authenticated users */
.user-authenticated #demo-portfolios-section {
    display: none !important;
}

/* Hide User Portfolios section for unauthenticated users */
.user-unauthenticated #user-portfolios-section {
    display: none !important;
} 