:root { color-scheme: dark; --background: #0c1523; --surface: #131e2e; --text: #f2f5f8; --muted: #aebacd; --accent: #2dd4bf; --border: #27384f; }
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--background); }
body { margin: 0; min-height: 100vh; min-height: 100svh; color: var(--text); background: radial-gradient(ellipse at 50% 0%, #172b45 0%, #101d30 45%, var(--background) 85%); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.5; }
a { color: var(--muted); text-decoration: none; }
a:hover { color: var(--text); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.login-shell { width: min(100%, 452px); margin: auto; padding: clamp(36px, 10vh, 104px) 20px 36px; }
body { display: flex; align-items: center; justify-content: center; }
.brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 28px; color: var(--text); font-size: 25px; font-weight: 750; letter-spacing: -.6px; }
.brand svg, .brand-accent { color: var(--accent); }
.login-card { padding: 28px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 20px 60px #00000038; }
h1 { margin: 0 0 8px; font-size: 28px; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; }
.intro { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.field { margin-bottom: 20px; }
label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; }
input:not([type="hidden"]) { width: 100%; min-height: 48px; border: 1px solid var(--border); border-radius: 8px; padding: 11px 12px; background: #0f1c2e; color: var(--text); font: inherit; transition: border-color 120ms; }
input::placeholder { color: #8998ad; opacity: 1; }
input:focus { border-color: var(--accent); outline: 2px solid #2dd4bf40; outline-offset: 1px; }
.field-hint { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
button { width: 100%; min-height: 48px; border: 1px solid transparent; border-radius: 8px; padding: 12px 16px; background: var(--accent); color: #141b27; font: inherit; font-weight: 700; cursor: pointer; transition: background 120ms; }
button:hover:not(:disabled) { background: #a0eee4; }
button:disabled { cursor: wait; opacity: .65; }
.login-error { margin: 0 0 16px; padding: 10px 12px; border: 1px solid #99564f; border-radius: 8px; background: #3c242a; color: #ffcdc4; font-size: 14px; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.back-link { display: block; width: fit-content; margin: 22px auto 0; padding: 8px; font-size: 13px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 380px) { .login-shell { padding-inline: 16px; } .login-card { padding: 22px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Password visibility toggle (type=button, must not inherit submit styling) */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 50px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; min-height: 0; padding: 0; display: inline-flex;
  align-items: center; justify-content: center; background: transparent; border: 0;
  border-radius: 8px; color: var(--muted); cursor: pointer; }
.password-toggle:hover { background: #ffffff14; color: var(--text); }
.password-toggle svg { width: 18px; height: 18px; }
.password-toggle .eye-off { display: none; }
.password-toggle[aria-pressed="true"] .eye { display: none; }
.password-toggle[aria-pressed="true"] .eye-off { display: block; }
