:root { --auth-hero: #eeeff1; --auth-color-scheme: light; --auth-success: #258851; --auth-success-bg: #f1faf4; --auth-danger: #d83f50; }
html[data-theme="dark"] {
    --auth-text: #f1f2f4;
    --auth-muted: #a0a5ae;
    --auth-faint: #797f89;
    --auth-border: #2c3038;
    --auth-surface: #171a20;
    --auth-field: #22262e;
    --auth-canvas: #101216;
    --auth-hero: #191c22;
    --auth-color-scheme: dark;
    --auth-success: #67c590;
    --auth-success-bg: #172b21;
    --auth-danger: #ff7b88;
}
body.auth-shell {
    color-scheme: var(--auth-color-scheme);
    --wel-btn-text: var(--auth-text);
    --wel-btn-muted: var(--auth-muted);
    --wel-btn-outline: var(--auth-border);
    --wel-btn-outline-hover: var(--auth-faint);
    --wel-btn-secondary-hover: var(--auth-field);
    --wel-btn-disabled-bg: var(--auth-field);
    --wel-btn-disabled-text: var(--auth-muted);
}
body.auth-shell .auth-left { background: var(--auth-hero); }
body.auth-shell .left-inner h1 { font-size: 38px; }
body.auth-shell .auth-brand-mark { border-color: var(--auth-border); background: var(--auth-surface); }
body.auth-shell .stats, body.auth-shell .stat-item { border-color: var(--auth-border); }
body.auth-shell .field:hover { border-color: var(--auth-border); background: var(--auth-field); }
body.auth-shell .field:focus-within, body.auth-shell .field.success, body.auth-shell .field.error { background: var(--auth-surface); }
body.auth-shell .field.success { border-color: var(--auth-border); }
body.auth-shell .field.error { border-color: var(--auth-danger); }
body.auth-shell .auth-passkey-btn, body.auth-shell .auth-socials button { border-color: var(--auth-border); color: var(--auth-text); background: var(--auth-surface); }
body.auth-shell .auth-passkey-btn:hover, body.auth-shell .auth-socials button:hover { border-color: var(--auth-faint); background: var(--auth-field); }
body.auth-shell .submit-btn:disabled, body.auth-shell .submit-btn:disabled:hover { color: var(--auth-muted); background: var(--auth-field); }
body.auth-shell .optional-btn { border-color: var(--auth-border); color: var(--auth-muted); }
body.auth-shell .password-rules .rule-pill, body.auth-shell .password-rules div,
body.auth-shell .password-rules .rule-pill.invalid, body.auth-shell .password-rules div.invalid { border-color: var(--auth-border); color: var(--auth-muted); background: var(--auth-field); }
body.auth-shell .password-rules .rule-pill.valid, body.auth-shell .password-rules div.valid { border-color: var(--auth-success); color: var(--auth-success); background: var(--auth-success-bg); }
body.auth-shell .fake-captcha, body.auth-shell .fake-captcha:hover, body.auth-shell .security-check { border-color: var(--auth-border); background: var(--auth-surface); }
body.auth-shell .fake-captcha.is-verified, body.auth-shell .security-check.is-verified { border-color: var(--auth-success); background: var(--auth-success-bg); }
body.auth-shell .captcha-check { border-color: var(--auth-border); background: var(--auth-field); }
body.auth-shell .security-check.error { border-color: var(--auth-danger); background: var(--auth-surface); }
body.auth-shell .captcha-mark, body.auth-shell .captcha-brand .mdi { color: var(--auth-success); }
body.auth-shell .check-row { color: var(--auth-muted); }
body.auth-shell .check-row input { border-color: var(--auth-border); background-color: var(--auth-field); }
body.auth-shell .auth-divider::before, body.auth-shell .auth-divider::after { background: var(--auth-border); }
body.auth-shell .verify-content { border-color: var(--auth-border) !important; background: var(--auth-surface) !important; }
body.auth-shell .verify-input-group { border-color: var(--auth-border) !important; }
body.auth-shell .site-toast { border-color: var(--auth-border); background: var(--auth-surface); }
body.auth-shell .code-input { color: var(--auth-text); border-color: var(--auth-border); background: var(--auth-field); }
body.auth-shell .code-input:focus { border-color: var(--auth-accent); background: var(--auth-surface); }
body.auth-shell .code-input.has-value { border-color: var(--auth-accent); background: var(--auth-accent-soft); }
body.auth-shell .field-feedback, body.auth-shell .twofa-error { color: var(--auth-danger); }
html[data-theme="dark"] body.auth-shell .signin-text a, html[data-theme="dark"] body.auth-shell .forgot-row a,
html[data-theme="dark"] body.auth-shell .twofa-back a, html[data-theme="dark"] body.auth-shell .check-row a { color: var(--auth-accent); }
body.auth-twofa .form-heading { max-width: none; padding-right: 0; }
body.auth-twofa .auth-form-description { max-width: none; position: static; text-align: left; }
body.auth-twofa .auth-form form { margin-top: 24px; }
body.auth-twofa .twofa-panel { margin-top: 0; }
body.auth-twofa .twofa-icon { display: grid; place-items: center; margin: 0 0 18px; }
body.auth-twofa .twofa-description { margin: 0 0 22px; text-align: left; }
body.auth-twofa .code-inputs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
body.auth-twofa .code-input { width: 100%; min-width: 0; height: 56px; padding: 0; border: 1px solid var(--auth-border); border-radius: 6px; outline: 0; color: var(--auth-text); font: 600 24px Inter, Arial, sans-serif; text-align: center; transition: border-color .16s, background .16s, box-shadow .16s; }
body.auth-twofa .code-input:focus { box-shadow: 0 0 0 3px var(--auth-accent-soft); }
body.auth-twofa .code-input[aria-invalid="true"] { border-color: var(--auth-danger); }
body.auth-twofa .twofa-error { min-height: 18px; margin: 10px 0 0; font-size: 12px; line-height: 1.5; opacity: 0; }
body.auth-twofa .twofa-error.visible { opacity: 1; }
body.auth-twofa .twofa-back { margin-top: 20px; }
body.auth-twofa .twofa-back a { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 1100px) { body.auth-shell .left-inner h1 { font-size: 32px; } }
@media (max-width: 520px) {
    body.auth-twofa .code-inputs { gap: 6px; }
    body.auth-twofa .code-input { height: 48px; font-size: 21px; }
    body.auth-twofa .auth-form { padding: 22px 16px; }
}
