/* Login Page — Warm Mineral */

html, body { min-height: 100vh; }

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

/* ============================================
   AUTH SIDEBAR — ambient, atmospheric
   ============================================ */

.auth-sidebar {
    width: 42%;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--space-2xl);
    position: relative;
    overflow: hidden;
}

/* Soft ambient glow — top right */
.auth-sidebar::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(200, 149, 106, 0.05) 0%, transparent 65%);
    pointer-events: none;
}

/* Bottom glow — warm */
.auth-sidebar::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -15%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(139, 124, 246, 0.04) 0%, transparent 65%);
    pointer-events: none;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    color: var(--text-primary);
    text-decoration: none;
    z-index: 1;
}

.auth-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, var(--accent-primary), var(--accent-gold));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1c1b1a;
}

.auth-quote {
    z-index: 1;
    position: relative;
    padding-left: var(--space-lg);
    border-left: 2px solid rgba(200, 149, 106, 0.2);
}

.auth-quote-text {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-style: italic;
    line-height: 1.35;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    opacity: 0.85;
    letter-spacing: -0.02em;
}

.auth-quote-author {
    color: var(--text-muted);
    font-size: var(--text-sm);
    letter-spacing: 0.02em;
}

/* ============================================
   AUTH MAIN — clean, centered form
   ============================================ */

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    background: var(--bg-primary);
}

.auth-box { width: 100%; max-width: 400px; }

.auth-header { text-align: center; margin-bottom: var(--space-xl); }

.auth-title {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 400;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: var(--text-base);
}

/* ============================================
   AUTH TABS — pill style
   ============================================ */

.auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: var(--space-xl);
    border: 1px solid var(--border-primary);
}

.auth-tab {
    flex: 1;
    padding: 10px var(--space-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}
.auth-tab:hover { color: var(--text-primary); }
.auth-tab.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   FORM ANIMATIONS
   ============================================ */

.auth-form {
    display: none;
    opacity: 0;
    transform: translateY(6px);
}
.auth-form.active {
    display: block;
    animation: formFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes formFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Error shake */
@keyframes formShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-5px); }
    30% { transform: translateX(4px); }
    45% { transform: translateX(-3px); }
    60% { transform: translateX(2px); }
    75% { transform: translateX(-1px); }
}
.shake { animation: formShake 0.45s ease; }

/* ============================================
   PASSWORD STRENGTH
   ============================================ */

.password-strength {
    height: 3px;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    margin-top: 6px;
    overflow: hidden;
}
.password-strength-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.3s ease, background 0.3s ease;
    width: 0;
}
.password-strength-fill.weak { width: 25%; background: var(--error); }
.password-strength-fill.fair { width: 50%; background: var(--warning); }
.password-strength-fill.good { width: 75%; background: #d4a028; }
.password-strength-fill.strong { width: 100%; background: var(--success); }
.password-strength-text {
    font-size: var(--text-xs);
    margin-top: 2px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

/* ============================================
   INPUT WRAPPERS
   ============================================ */

.input-wrapper { position: relative; }
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: var(--text-sm);
}
.input-wrapper .form-input { padding-left: 2.5rem; }

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}
.password-toggle:hover { color: var(--text-primary); }

/* ============================================
   FORM ERRORS
   ============================================ */

.form-error {
    color: var(--error);
    font-size: var(--text-xs);
    margin-top: 4px;
    display: none;
    transform: translateY(-3px);
    opacity: 0;
}
.form-error.visible {
    display: block;
    animation: errorSlideIn 0.25s ease forwards;
}
@keyframes errorSlideIn {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   FORM OPTIONS & CHECKBOXES
   ============================================ */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.checkbox-wrapper input { display: none; }

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-secondary);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}
.checkbox-wrapper input:checked + .checkbox-custom {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}
.checkbox-custom i { font-size: 0.5625rem; color: #1c1b1a; opacity: 0; }
.checkbox-wrapper input:checked + .checkbox-custom i { opacity: 1; }
.checkbox-label { font-size: var(--text-sm); color: var(--text-secondary); }

.form-link {
    font-size: var(--text-sm);
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.form-link:hover { color: var(--accent-primary-hover); }

/* ============================================
   DIVIDER & SOCIAL BUTTONS
   ============================================ */

.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
    color: var(--text-muted);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-primary); }

.social-buttons { display: flex; gap: var(--space-sm); }

.btn-social {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px var(--space-md);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}
.btn-social:hover {
    background: var(--bg-hover);
    border-color: var(--border-secondary);
}

/* ============================================
   AUTH FOOTER
   ============================================ */

.auth-footer {
    text-align: center;
    margin-top: var(--space-xl);
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.5;
}
.auth-footer a { color: var(--accent-primary); text-decoration: none; }
.auth-footer a:hover { color: var(--accent-primary-hover); }

/* ============================================
   MFA SECTION
   ============================================ */

.mfa-section { display: none; text-align: center; }
.mfa-section.active { display: block; }

.mfa-icon {
    width: 64px;
    height: 64px;
    background: rgba(200, 149, 106, 0.06);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: var(--text-2xl);
    color: var(--accent-primary);
}

.mfa-title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.mfa-text {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-size: var(--text-sm);
}

.mfa-code {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.mfa-digit {
    width: 48px;
    height: 56px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: var(--text-2xl);
    font-family: var(--font-body);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.mfa-digit:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(200, 149, 106, 0.08);
}

/* MFA Method Selection */
.mfa-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: var(--space-lg) 0;
}

.mfa-method-btn {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    padding: 14px var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: left;
    color: var(--text-primary);
}
.mfa-method-btn:hover {
    border-color: var(--border-focus);
    background: var(--bg-tertiary);
}

.mfa-method-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(200, 149, 106, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: var(--text-base);
    flex-shrink: 0;
}

.mfa-method-info { flex: 1; }
.mfa-method-label { font-weight: 500; font-size: var(--text-base); }
.mfa-method-desc { font-size: var(--text-xs); color: var(--text-tertiary); margin-top: 2px; }
.mfa-method-arrow { color: var(--text-muted); font-size: var(--text-xs); }

.login-page .btn { width: 100%; }

/* MFA animation */
.mfa-section.active {
    animation: formFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .auth-sidebar { display: none; }
    .auth-main { padding: var(--space-lg); }
    .auth-title { font-size: var(--text-3xl); }
}
