/* ==================== AUTH PAGE LAYOUT ==================== */
.auth-page {
    background: var(--bg-white);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ==================== BRAND PANEL (LEFT) ==================== */
.auth-brand {
    flex: 1;
    background: var(--bg-dark);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    overflow: hidden;
}

.auth-brand-content {
    position: relative;
    z-index: 2;
    max-width: 440px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 48px;
}

.auth-logo .logo-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
}

.auth-brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.auth-brand-description {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
    margin-bottom: 40px;
}

.auth-brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Brand Background Shapes */
.auth-brand-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.brand-shape {
    position: absolute;
    border-radius: 50%;
}

.brand-shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.15), transparent 70%);
    top: -100px;
    right: -100px;
    animation: brandFloat 8s ease-in-out infinite;
}

.brand-shape-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(253, 121, 168, 0.1), transparent 70%);
    bottom: -50px;
    left: -50px;
    animation: brandFloat 6s ease-in-out infinite reverse;
}

.brand-shape-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 184, 148, 0.1), transparent 70%);
    bottom: 30%;
    right: 20%;
    animation: brandFloat 7s ease-in-out infinite 1s;
}

@keyframes brandFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15px, -20px) scale(1.05); }
    66% { transform: translate(-10px, 10px) scale(0.95); }
}

/* ==================== FORM PANEL (RIGHT) ==================== */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-white);
}

.auth-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-form-header {
    margin-bottom: 32px;
}

.auth-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 0;
    margin-bottom: 16px;
    transition: color var(--transition-fast);
}

.auth-back-btn:hover {
    color: var(--text-primary);
}

.auth-user-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-off-white);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

#userEmailDisplay {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}

.auth-form-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.auth-form-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==================== FORM ELEMENTS ==================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    pointer-events: none;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    padding-left: 44px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input.error {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-error {
    font-size: 0.8rem;
    color: #ff6b6b;
    min-height: 0;
    display: none;
}

.form-error.visible {
    display: block;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    z-index: 1;
}

.eye-closed {
    display: none;
}

/* Password Strength */
.password-strength {
    margin-top: 2px;
}

.strength-bar {
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

.strength-fill.weak { width: 25%; background: #ff6b6b; }
.strength-fill.fair { width: 50%; background: #ffd93d; }
.strength-fill.good { width: 75%; background: #6c5ce7; }
.strength-fill.strong { width: 100%; background: #00b894; }

.strength-text {
    font-size: 0.75rem;
    font-weight: 500;
}

.strength-text.weak { color: #ff6b6b; }
.strength-text.fair { color: #d4a853; }
.strength-text.good { color: #6c5ce7; }
.strength-text.strong { color: #00b894; }

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-medium);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.forgot-password {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-primary);
}

.forgot-password:hover {
    color: var(--accent-primary-dark);
    text-decoration: underline;
}

/* ==================== GOOGLE BUTTON ==================== */
.btn-google {
    width: 100%;
    background: var(--bg-white);
    color: var(--text-primary);
    border: 1.5px solid var(--border-medium);
    font-weight: 500;
    gap: 10px;
}

.btn-google:hover {
    background: var(--bg-off-white);
    border-color: var(--border-medium);
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

/* ==================== OTP INPUTS ==================== */
.otp-icon-wrap {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.otp-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.otp-input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-md);
    outline: none;
    transition: all var(--transition-fast);
}

.otp-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.otp-input.filled {
    border-color: var(--accent-primary);
    background: rgba(108, 92, 231, 0.03);
}

.otp-input.error {
    border-color: #ff6b6b;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
}

.otp-separator {
    font-size: 1.5rem;
    color: var(--border-medium);
    font-weight: 300;
}

.otp-resend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn-link {
    background: none;
    border: none;
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary);
    cursor: pointer;
    padding: 0;
}

.btn-link:hover {
    color: var(--accent-primary-dark);
    text-decoration: underline;
}

.btn-link:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    text-decoration: none;
}

.otp-timer {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* ==================== AUTH FOOTER ==================== */
.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-link {
    font-weight: 600;
    color: var(--accent-primary);
}

.auth-link:hover {
    text-decoration: underline;
}

/* ==================== STEP VISIBILITY ==================== */
.auth-step {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.auth-step.hidden {
    display: none;
}

.auth-step.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.auth-step.fade-in {
    animation: fadeInUp 0.4s ease forwards;
}

/* ==================== LOADING OVERLAY ==================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner svg {
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-spinner p {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-brand {
        padding: 40px 24px;
        min-height: auto;
    }
    
    .auth-brand-content {
        text-align: center;
        max-width: 100%;
    }
    
    .auth-brand-title {
        font-size: 1.75rem;
    }
    
    .auth-brand-description {
        font-size: 0.95rem;
    }
    
    .auth-brand-features {
        display: none;
    }
    
    .brand-shape-1 {
        width: 200px;
        height: 200px;
    }
    
    .brand-shape-2 {
        width: 120px;
        height: 120px;
    }
    
    .auth-form-panel {
        padding: 32px 24px;
    }
    
    .auth-form-title {
        font-size: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-brand {
        padding: 32px 20px;
    }
    
    .auth-brand-title {
        font-size: 1.5rem;
    }
    
    .auth-form-panel {
        padding: 24px 16px;
    }
    
    .otp-input {
        width: 44px;
        height: 52px;
        font-size: 1.25rem;
    }
    
    .otp-inputs {
        gap: 6px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}