/* Public authentication uses a focused card; forms keep Dusty's original actions. */
body .auth-screen { display: grid; place-items: center; min-height: 65vh; padding: 48px 24px; --auth-text: #202833; --auth-muted: #5c6775; --auth-link: #265b94; --auth-border: #dce1e7; --auth-input: #fff; --auth-input-border: #b9c3cf; --auth-placeholder: #647488; --auth-symbol-surface: #f2f6f3; --auth-error: #a52632; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body .auth-screen .auth-card { width: min(100%, 440px); min-width: 0; margin: 0; padding: 32px; border: 1px solid var(--auth-border); border-radius: 16px; background: var(--auth-surface, #fff); color: var(--auth-text); box-shadow: 0 12px 36px #15243b10; }
body .auth-card .auth-back { display: inline-block; margin-bottom: 24px; color: var(--auth-muted); font-size: 13px; text-decoration: none; }
body .auth-card a { color: var(--auth-link); text-decoration: none; }
body .auth-card a:hover { text-decoration: underline; }
body .auth-card .auth-symbol { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px; border: 1px solid var(--auth-border); border-radius: 14px; background: var(--auth-symbol-surface); color: var(--auth-accent); }
body .auth-symbol svg { width: 25px; height: 25px; stroke: currentColor; stroke-width: 1.7; fill: none; }
body .auth-card h1 { margin: 0 0 10px; font-family: inherit; font-size: clamp(24px, 4vw, 30px); line-height: 1.2; font-weight: 650; letter-spacing: -.6px; }
body .auth-card .auth-intro { margin: 0 0 28px; color: var(--auth-muted); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
body .auth-card .auth-field { margin-bottom: 20px; }
body .auth-screen .auth-card form .auth-field label { display: block; float: none; width: auto; height: auto; margin: 0 0 8px; text-align: left; font-size: 14px; line-height: 1.4; font-weight: 600; white-space: normal; }
body .auth-card .auth-label-row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
body .auth-card .auth-label-row a { margin-bottom: 8px; font-size: 13px; }
body .auth-screen .auth-card form .auth-field input:not([type=hidden]) { display: block; float: none !important; width: 100%; min-width: 0; margin: 0; padding: 12px 14px; min-height: 48px; border: 1px solid var(--auth-input-border); border-radius: 8px; background: var(--auth-input); color: var(--auth-text); font-family: inherit; font-size: 16px; line-height: 1.4; }
body .auth-card .auth-field input:focus { border-color: var(--auth-accent); }
body .auth-card .auth-submit { display: block; width: 100%; min-height: 48px; padding: 12px 18px; margin: 8px 0 0; border: 0; border-radius: 8px; background: var(--auth-accent); color: var(--auth-accent-text); font-family: inherit; font-size: 16px; font-weight: 600; text-align: center; cursor: pointer; }
body .auth-card .auth-submit:hover { filter: brightness(.94); }
body .auth-card .auth-errors { font-size: 14px; overflow-wrap: anywhere; }
body .auth-card .auth-errors:empty { display: none; }
body .auth-card .auth-errors:not(:empty) { margin-bottom: 16px; }
body .auth-card .auth-register { margin: 24px 0 0; padding-top: 24px; border-top: 1px solid var(--auth-border); text-align: center; font-size: 14px; }
body .auth-card .auth-support { margin: 16px 0 0; text-align: center; font-size: 13px; color: var(--auth-muted); }
@media (max-width: 480px) {
    body .auth-screen { padding: 28px 16px; min-height: 0; }
    body .auth-screen .auth-card { padding: 24px; }
}

/* Authentication is one surface palette, including browser autofill and inline feedback. */
body .auth-card .auth-field input::placeholder { color: var(--auth-placeholder); opacity: 1; }
body .auth-card .auth-field small { color: var(--auth-muted); line-height: 1.5; }
body .auth-card :is(.auth-errors, .dusty-field-error) { color: var(--auth-error) !important; }
body .auth-screen .auth-card .auth-field input:focus-visible { border-color: var(--auth-link) !important; outline: 2px solid var(--auth-link); outline-offset: 2px; }
body .auth-screen .auth-card .auth-field input[aria-invalid=true] { border-color: var(--auth-error) !important; }
body .auth-screen .auth-card input:is(:-webkit-autofill, :autofill) { -webkit-text-fill-color: var(--auth-text); caret-color: var(--auth-text); box-shadow: 0 0 0 1000px var(--auth-input) inset; }
html[data-theme=dark] body.dusty-theme .auth-screen {
    --auth-surface: #182235;
    --auth-text: #f4f7fc;
    --auth-muted: #b2c0d5;
    --auth-link: #70dcff;
    --auth-border: #465873;
    --auth-input: #0c1423;
    --auth-input-border: #536982;
    --auth-placeholder: #9fb1ca;
    --auth-symbol-surface: #143b50;
    --auth-error: #ffb5bf;
    background: transparent !important;
}
html[data-theme=dark] body.dusty-theme .auth-screen .auth-card { background: var(--auth-surface); color: var(--auth-text); border-radius: 14px; border-top: 3px solid var(--auth-link); box-shadow: 0 2px 0 #00000055; }
html[data-theme=dark] body.dusty-theme .auth-card :is(h1,label) { color: var(--auth-text); }
html[data-theme=dark] body.dusty-theme .auth-card a { color: var(--auth-link); }
html[data-theme=dark] body.dusty-theme .auth-card .auth-symbol { color: var(--auth-link); }
html[data-theme=dark] body.dusty-theme .auth-screen .auth-card .auth-field input:not([type=hidden]) { background: var(--auth-input) !important; color: var(--auth-text) !important; border-color: var(--auth-input-border) !important; }
html[data-theme=dark] body.dusty-theme .auth-screen .auth-card .auth-field input:focus-visible { border-color: var(--auth-link) !important; }
html[data-theme=dark] body.dusty-theme .auth-screen .auth-card .auth-field input[aria-invalid=true] { border-color: var(--auth-error) !important; }

/* Give public account screens crisp depth rather than a stack of similar teal surfaces. */
html[data-theme=dark] body.dusty-theme:has(.auth-screen) { background: #090f1a !important; }
html[data-theme=dark] body.dusty-theme .border-container:has(.auth-screen) { background: #0d1523 !important; border-color: #283850; }
html[data-theme=dark] body.dusty-theme .auth-screen { background: radial-gradient(ellipse at 50% 0%, #15334b 0%, #0d1523 65%) !important; }
html[data-theme=dark] body.dusty-theme .auth-screen .auth-card .auth-symbol { background: var(--auth-symbol-surface); border-color: #387b99; border-radius: 12px; }
html[data-theme=dark] body.dusty-theme .auth-screen .auth-card .auth-submit { background: var(--auth-accent); background: linear-gradient(135deg, color-mix(in srgb, var(--auth-accent) 90%, white), var(--auth-accent)); box-shadow: inset 0 1px 0 #ffffff26; }
html[data-theme=dark] body.dusty-theme .auth-screen .auth-card .auth-submit:hover { filter: brightness(1.12); }
html[data-theme=dark] body.dusty-theme .auth-screen .auth-card .auth-register { border-color: #3b4e69; }
