/* auth.css — login / register / password / verify screens.
   Tokens from tokens.css. Dark-mode cue: input focus picks up the
   --shadow-glow neon halo so tabbed-into fields feel alive. */

body.auth-page {
    background:
        radial-gradient(circle at top right, var(--bg-radial) 0, transparent 28rem),
        linear-gradient(180deg, var(--bg-edge) 0%, var(--bg) 52%, var(--bg-edge) 100%);
    color: var(--text);
}

body.auth-page header {
    background: var(--surface);
    border-bottom-color: var(--border);
}

body.auth-page .site-name {
    color: var(--text);
}

body.auth-page header nav a,
body.auth-page .form-alt a {
    color: var(--accent);
}

body.auth-page main {
    display: grid;
    place-items: center;
    max-width: none;
    min-height: calc(100vh - 8rem);
    padding: 2rem 1rem;
}

.auth-card {
    width: min(100%, 28rem);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 18px 36px rgba(80, 45, 130, 0.08);
}

/* Dark-mode glass: --surface is already semi-transparent in dark,
   so backdrop-filter (when supported) frosts it. Bounded to this
   one card per page to keep paint cost in check on old phones. */
@supports (backdrop-filter: blur(1px)) {
    html[data-theme="dark"] .auth-card { backdrop-filter: blur(var(--blur-amount)); }
}

.auth-brand {
    margin-bottom: 1.2rem;
    line-height: 1;
}

.auth-brand span {
    display: block;
    color: var(--text);
    font-size: 1.65rem;
    font-weight: 800;
}

.auth-brand small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.auth-card h1 {
    margin: 0;
    color: var(--text);
    font-size: 2rem;
    line-height: 1.12;
}

.auth-subtitle {
    margin: 0.65rem 0 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.auth-card form {
    max-width: none;
}

.auth-card .field {
    margin-bottom: 1rem;
}

.auth-card .field label {
    color: var(--text);
}

.auth-card .field input {
    border-color: #d9c4fb;
    border-radius: 12px;
    background: var(--surface);
}

.auth-card .field input:focus {
    outline-color: var(--accent);
    border-color: var(--accent);
}

/* Dark-mode cue: focus halo around inputs. Restricted to the auth
   forms so it doesn't bleed into every textbox on the site. */
html[data-theme="dark"] .auth-card .field input:focus {
    box-shadow: var(--shadow-glow);
}

.auth-card button[type="submit"] {
    width: 100%;
    margin-top: 0.4rem;
    border-color: var(--accent);
    border-radius: 999px;
    background: var(--accent);
    font-weight: 700;
}

.auth-card button[type="submit"]:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.auth-card .form-alt {
    margin: 1.25rem 0 0;
    color: var(--text-muted);
    text-align: center;
}

.auth-card .errors {
    margin-bottom: 1.25rem;
    border-color: var(--danger-border);
    border-radius: 12px;
}
