/* Shared GLAD authentication system. Page-specific content uses the same tokens. */
body.auth-body {
    --text-inverse: #fff;
    --auth-brand: #1a860c;
    --auth-brand-hover: #146b09;
    --auth-accent: var(--auth-brand);
    --auth-promo-bg: #25372a;
    --auth-promo-inset: #344d39;
    --auth-promo-text: var(--text-inverse);
    --auth-promo-detail: #e2eaf4;
    --theme-primary: var(--auth-accent);
    --theme-primary-soft: color-mix(in srgb, var(--auth-accent) 12%, var(--surface));
    --primary: var(--auth-brand);
    --theme-on-primary: var(--text-inverse);
    --text-primary: #25372a;
    --text-secondary: #526957;
    --text-muted: #617665;
    --surface: #fff;
    --surface-soft: #f0f3f2;
    --border: #dce5d9;
    --app-background: #f5f8f4;
    --contrast-control-text: var(--text-primary);
    --contrast-control-bg: var(--surface-soft);
    min-width: 0;
    color: var(--text-primary);
    background: var(--app-background);
    font-family: "Ubuntu", sans-serif;
}
html[data-theme="dark"] body.auth-body {
    --auth-accent: #8bda7d;
    --auth-promo-bg: #151922;
    --auth-promo-inset: #202632;
    --text-primary: #f3f5f7;
    --text-secondary: #d5dae1;
    --text-muted: #a5aebc;
    --border: #303740;
    --surface: #151922;
    --surface-soft: #1a1f29;
    --app-background: #0f1115;
    background: var(--app-background);
}
body.auth-body .auth-shell::before,
body.auth-body .auth-shell::after { display: none; }
body.auth-body .auth-main {
    width: min(100% - 64px, 1280px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(28px, 5vw, 80px);
    align-items: center;
}
body.auth-body .auth-shell-header { width: min(100% - 64px, 1280px); }
body.auth-body :is(.auth-card, .auth-stage, .auth-form, .auth-field, .auth-code-fieldset) { min-width: 0; }
body.auth-body .auth-promo {
    min-height: 620px;
    border-radius: var(--radius-md);
    background: var(--auth-promo-bg);
    color: var(--auth-promo-text);
    box-shadow: none;
}
body.auth-body .auth-promo-inner { padding: clamp(28px, 3.4vw, 48px); }
body.auth-body .auth-promo h2 {
    max-width: 440px;
    margin: 28px 0 0;
    color: var(--auth-promo-text);
    font-size: clamp(35px, 3vw, 46px);
    line-height: 1.2;
    letter-spacing: -.025em;
}
body.auth-body .auth-promo :is(p, .auth-promo-note small) { color: var(--auth-promo-detail); }
body.auth-body .auth-promo :is(.auth-promo-list li, .auth-promo-note strong) { color: var(--auth-promo-text); }
body.auth-body :is(.auth-promo-badge, .auth-promo-list span) { color: var(--text-inverse); background: var(--auth-brand); }
body.auth-body .auth-promo-note { background: var(--auth-promo-inset); border-radius: var(--radius-sm); }
body.auth-body .auth-card {
    max-width: 640px;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: none;
}
body.auth-body .auth-card-header h1 { color: var(--text-primary); font-size: clamp(26px, 2.5vw, 32px); }
body.auth-body :is(.auth-eyebrow, .auth-forgot-link, .auth-card-footer a, .auth-register a, .auth-support a) { color: var(--auth-accent); }
body.auth-body :is(.auth-field label, .auth-label) { color: var(--text-primary); font-size: 13px; }
body.auth-body .auth-label-row { flex-wrap: wrap; margin-bottom: 8px; gap: 6px 12px; }
body.auth-body .auth-label-row label { margin: 0; }
body.auth-body .auth-label-row span { color: var(--text-muted); font-size: 11px; }
body.auth-body .auth-field :is(input, select, textarea),
body.auth-body .auth-code-fallback {
    width: 100%; min-width: 0; min-height: 50px; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-xs);
    background: var(--surface-soft); color: var(--text-primary);
    font: inherit; font-size: 16px; box-shadow: none;
}
body.auth-body .auth-field textarea { height: auto; resize: vertical; }
body.auth-body .auth-field .auth-password-wrap input { padding-right: 72px; }
body.auth-body .auth-field :is(input, textarea)::placeholder { color: var(--text-muted); }
body.auth-body :is(.auth-field-help, .auth-code-help, .auth-support, .auth-legal, .auth-countdown) { color: var(--text-muted); font-size: 12px; line-height: 1.5; }
body.auth-body .auth-field-errors { display: grid; gap: 4px; font-size: 13px; }
body.auth-body .auth-field.has-error :is(input, select, textarea),
body.auth-body .auth-code-fieldset.has-error input { border-color: var(--danger-border); }
body.auth-body :is(.auth-primary-button, .auth-secondary-button, .auth-text-button) {
    min-height: 48px; max-width: 100%; padding: 12px 16px;
    border-radius: var(--radius-xs); font: 700 14px/1.3 "Ubuntu", sans-serif;
    white-space: nowrap; text-decoration: none; cursor: pointer; box-shadow: none;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}
body.auth-body .auth-primary-button { color: var(--text-inverse); background: var(--auth-brand); border-color: var(--auth-brand); }
body.auth-body .auth-primary-button:hover { background: var(--auth-brand-hover); border-color: var(--auth-brand-hover); }
body.auth-body .auth-secondary-button { color: var(--text-primary); background: var(--surface); border-color: var(--border); }
body.auth-body .auth-secondary-button:hover { background: var(--surface-soft); border-color: var(--auth-accent); }
body.auth-body .auth-text-button { width: auto; color: var(--auth-accent); background: transparent; border: 0; }
body.auth-body .auth-text-button:hover { background: var(--surface-soft); }
body.auth-body :is(button, a)[aria-disabled="true"],
body.auth-body button:disabled { opacity: .65; cursor: not-allowed; }
body.auth-body [aria-busy="true"] { cursor: wait; }
body.auth-body :is(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--auth-accent); outline-offset: 3px; }
body.auth-body .auth-password-toggle { min-height: 44px; min-width: 44px; color: var(--text-secondary); border-radius: var(--radius-xs); }
body.auth-body .auth-password-toggle:hover { background: var(--surface); }
body.auth-body .auth-theme-toggle { min-width: 64px; min-height: 44px; box-shadow: none; flex-shrink: 0; }
body.auth-body .auth-theme-sun { color: var(--text-inverse); background: var(--auth-brand); }
html[data-theme="dark"] body.auth-body .auth-theme-sun { color: var(--text-secondary); background: transparent; }
html[data-theme="dark"] body.auth-body .auth-theme-moon { color: var(--text-inverse); background: var(--auth-brand); }
body.auth-body .auth-shell-brand img { max-width: 100%; object-fit: contain; }
html[data-theme="dark"] body.auth-body :is(.auth-login-brand, .auth-signup-brand) img { filter: brightness(0) invert(1); }
body.auth-body .auth-email-pill { white-space: normal; overflow-wrap: anywhere; color: var(--auth-accent); background: var(--surface-soft); border-color: var(--border); }
body.auth-body .auth-code-inputs { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 380px; margin-inline: auto; gap: clamp(4px, 1vw, 10px); }
body.auth-body .auth-code-cell { min-width: 0; }
body.auth-body .auth-code-cell input { min-width: 0; height: 50px; border-radius: var(--radius-xs); }
body.auth-body .auth-code-fallback-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
body.auth-body .auth-code-fallback { text-align: center; letter-spacing: .25em; }
body.auth-body :is(.auth-resend, .auth-reset-resend, .auth-shell-actions) { flex-wrap: wrap; }
body.auth-body :is(p, h1, h2, small, .auth-field-errors) { overflow-wrap: anywhere; }
body.auth-body .auth-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
body.auth-body [hidden] { display: none !important; }
@media (max-width: 1023px) {
    body.auth-body .auth-main { display: block; width: min(100% - 48px, 680px); padding: 24px 0 48px; }
    body.auth-body .auth-shell-header { width: min(100% - 48px, 680px); }
    body.auth-body .auth-promo { display: none; }
}
@media (max-width: 600px) {
    body.auth-body .auth-main, body.auth-body .auth-shell-header { width: calc(100% - 32px); }
    body.auth-body .auth-card { padding: 24px 16px; }
    body.auth-body .auth-form-grid--two { grid-template-columns: minmax(0, 1fr); }
    body.auth-body .auth-shell-header { gap: 12px; }
    body.auth-body .auth-shell-brand { max-width: calc(100% - 84px); }
    body.auth-body .auth-primary-button { font-size: 13px; padding-inline: 10px; }
}
