/* Login and registration retain their existing light palette by default. */
body.auth-page.theme-dark {
    color-scheme: dark;
    color: #f5f7fb;
    background: #06122d;
}

body.auth-page.login-page.theme-dark .box,
body.auth-page.register-page.theme-dark .container {
    color: #f5f7fb;
    background: #0f1e37;
    border: 1px solid rgba(163,180,203,.12);
    box-shadow: 0 18px 40px rgba(0,0,0,.28);
}

body.auth-page.theme-dark h2 { color: #f5f7fb; }
body.auth-page.theme-dark input,
body.auth-page.theme-dark select,
body.auth-page.theme-dark textarea {
    color-scheme: dark;
    color: #f5f7fb;
    background: #192a40;
    border-color: #30415a;
}
body.auth-page:not(.theme-dark) select { color-scheme: light; }
body.auth-page:not(.theme-dark) select option { color:#202733; background:#fff; }
body.auth-page.theme-dark select option { color:#f5f7fb; background:#192a40; }
body.auth-page.theme-dark input::placeholder { color: #9eacc0; }
body.auth-page.theme-dark input:focus,
body.auth-page.theme-dark select:focus {
    border-color: #3981f6;
    box-shadow: 0 0 0 2px rgba(57,129,246,.2);
}
body.auth-page.theme-dark button[type="submit"] {
    color: #fff;
    background: #1268ee;
}
body.auth-page.theme-dark button[type="submit"]:hover { background: #0757d4; }
body.auth-page.login-page.theme-dark .header {
    background: linear-gradient(145deg, #06295f, #031c46);
}
body.auth-page.login-page.theme-dark .google-btn {
    color: #f5f7fb;
    background: #192a40;
    border-color: #30415a;
}
body.auth-page.login-page.theme-dark .credential-mode-toggle {
    color: #72a6ff;
    background: #152c4a;
}
body.auth-page.login-page.theme-dark .credential-mode-toggle:hover { background: #1a385d; }
body.auth-page.login-page.theme-dark .credential-mode-note { color: #aab5c5; }
body.auth-page.theme-dark .links a,
body.auth-page.theme-dark .register a,
body.auth-page.theme-dark .footer a { color: #72a6ff; }
body.auth-page.theme-dark .register,
body.auth-page.theme-dark .footer { color: #aab5c5; }
body.auth-page.theme-dark .email-guidance { color: #aab5c5; }
body.auth-page.theme-dark .eye { color: #aab5c5; }
body.auth-page.theme-dark .error { color: #ff8585; }
body.auth-page.theme-dark .success { color: #71e49a; }

/* Shared recovery screens */
body.auth-page.recovery-page {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    place-items: center;
    padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
}
body.auth-page.recovery-page .recovery-card {
    width: min(100%, 440px);
    margin: 0;
    padding: clamp(24px, 6vw, 36px);
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15,39,75,.1);
}
body.auth-page.recovery-page .recovery-card h1 { margin: 0 0 10px; font-size: clamp(1.45rem, 5vw, 1.8rem); letter-spacing: -.03em; }
body.auth-page.recovery-page .recovery-card > p { color: #64748b; line-height: 1.55; }
body.auth-page.recovery-page .recovery-card label { display: block; margin-top: 20px; font-size: 14px; font-weight: 600; }
body.auth-page.recovery-page .recovery-card input { width: 100%; min-height: 48px; margin: 7px 0 12px; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 11px; background: #fff; color: #10233f; }
body.auth-page.recovery-page .recovery-card button { width: 100%; min-height: 48px; border: 0; border-radius: 11px; background: #1268ee; color: #fff; font-weight: 700; }
body.auth-page.recovery-page .recovery-card form + form { margin-top: 12px; }
body.auth-page.recovery-page .recovery-card button:hover { background: #0757d4; }
body.auth-page.recovery-page .recovery-card button:focus-visible { outline: 3px solid rgba(18,104,238,.28); outline-offset: 2px; }
body.auth-page.recovery-page .recovery-card .message { padding: 12px 14px; border-radius: 11px; background: #eff6ff; color: #16428a; }
body.auth-page.recovery-page .recovery-back { display: inline-block; margin-top: 20px; font-weight: 600; text-decoration: none; }
body.auth-page.recovery-page.theme-dark { color-scheme: dark; color: #f5f7fb; background: #06122d; }
body.auth-page.recovery-page.theme-dark .recovery-card { color: #f5f7fb; background: #0f1e37; border-color: #263a56; box-shadow: 0 18px 50px rgba(0,0,0,.32); }
body.auth-page.recovery-page.theme-dark .recovery-card > p,
body.auth-page.recovery-page.theme-dark .recovery-card label { color: #aab5c5; }
body.auth-page.recovery-page.theme-dark .recovery-card input { color: #f5f7fb; background: #192a40; border-color: #30415a; }
body.auth-page.recovery-page.theme-dark .recovery-card input::placeholder { color: #9eacc0; }
body.auth-page.recovery-page.theme-dark .recovery-card .message { color: #dce9ff; background: #152c4a; }
@media (max-width: 480px) { body.auth-page.recovery-page { align-items: start; padding-top: max(32px, 8vh); } }
