/* auth-theme.css — the pre-sign-in pages (index, accept-invite,
 * reset-password) follow the firm palette and Light/Dark set by theme.js.
 * theme.js writes its variables inline on <html>, which beats each page's
 * own :root values for shared names (--navy, --gold, --border, --text…), so
 * every rule that colors a surface is restated here against the theme tokens.
 * Loaded after the page's <style>; html[data-theme] raises specificity. */
html[data-theme] body { font-family: var(--font-ui); color: var(--text); }
html[data-theme] h1, html[data-theme] .brand-headline { font-family: var(--font-display); }
html[data-theme] .form-head h1, html[data-theme] .card h1 { color: var(--text); }
html[data-theme] .brand-panel, html[data-theme] .brand-panel .brand-headline { color: #fff; }
html[data-theme] .subtitle, html[data-theme] .form-head p, html[data-theme] .panel-intro, html[data-theme] .links { color: var(--text-muted); }

/* index.html — split card */
html[data-theme] body:has(.login-split) { background: var(--bg); }
html[data-theme] .login-split { background: var(--surface); }
html[data-theme] .brand-panel { background: linear-gradient(155deg, var(--navy-ink) 0%, var(--brand-solid) 100%); color: #fff; }
html[data-theme] .brand-stat { border-left-color: var(--gold-bright); }

/* accept-invite / reset-password — gradient page + card */
html[data-theme] body:has(.card) { background: linear-gradient(165deg, var(--navy-ink) 0%, var(--brand-solid) 100%); }
html[data-theme] .card { background: var(--surface); color: var(--text); }
html[data-theme] .brand { color: var(--text); }
html[data-theme] .invite-banner { background: var(--accent-light); border-color: var(--border); color: var(--text); }

/* fields */
html[data-theme] .field input, html[data-theme] .form-group input { background: var(--surface); color: var(--text); border-color: var(--border); }
html[data-theme] .form-group input[readonly] { background: var(--surface2); color: var(--text-muted); }
html[data-theme] .field input:focus, html[data-theme] .form-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
html[data-theme] .field label, html[data-theme] .form-group label { color: var(--text-muted); }

/* buttons + links */
html[data-theme] .btn { background: var(--brand-solid); color: #fff; }
html[data-theme] .btn:hover { background: var(--brand-solid-hover); }
html[data-theme] .btn-secondary { background: transparent; color: var(--link); border-color: var(--border); }
html[data-theme] .btn-secondary:hover { background: var(--surface2); border-color: var(--accent); }
html[data-theme] .links a, html[data-theme] .footer-link a { color: var(--link); }

/* messages */
html[data-theme] .err, html[data-theme] .status.error { background: var(--red-bg, #fce8e8); color: var(--red, #9b2335); }
html[data-theme] .success, html[data-theme] .status.success { background: var(--green-bg, #e6f4ec); color: var(--green, #1a7a4a); }
[data-theme="dark"] .login-split, [data-theme="dark"] .card { box-shadow: 0 24px 70px rgba(0,0,0,.6); }
html[data-theme] .brand-stat .bs-v { color: rgba(255,255,255,.94); }
