:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #172029; --muted: #697581; --line: #dfe4e9; --soft: #f5f7f9;
  --red: #bb2922; --red-dark: #a2221c;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; min-width: 0; }
body { color: var(--ink); background: #f4f6f8; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.auth-body { min-height: 100svh; display: grid; place-items: center; padding: 32px 20px; }
.auth-shell { width: min(440px,100%); min-width: 0; padding: 36px 36px 22px; border: 1px solid #e1e6eb; border-radius: 20px; background: #fff; box-shadow: 0 12px 40px #17202909; }
.auth-brand-panel { display: flex; justify-content: center; margin-bottom: 30px; }
.auth-brand-mark { width: 218px; max-width: 100%; background: #fff; }
.auth-brand img { display: block; width: 100%; height: auto; }
.auth-form-panel, .auth-view, .auth-form { min-width: 0; width: 100%; }
.auth-eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 500; }
.auth-view h1 { margin: 0; font-size: 28px; font-weight: 650; line-height: 1.2; letter-spacing: -.035em; }
.auth-intro { margin: 12px 0 24px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.auth-view[data-auth-view="login"] h1 { margin-bottom: 18px; }
.auth-form { display: grid; gap: 18px; }
.auth-form label, .auth-password-field { display: grid; gap: 7px; }
.auth-form label, .auth-form label > span { font-size: 13px; font-weight: 600; }
.auth-form input { display: block; width: 100%; min-width: 0; min-height: 48px; padding: 11px 13px; border: 1px solid #cdd5dd; border-radius: 9px; outline: none; color: var(--ink); background: #fff; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.auth-form input:focus { border-color: #ad3933; box-shadow: 0 0 0 3px #bb292212; }
.auth-password-control { position: relative; min-width: 0; }
.auth-password-control input { padding-right: 64px; }
.auth-password-toggle { position: absolute; top: 2px; right: 3px; bottom: 2px; min-width: 54px; min-height: 44px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: #4d5d6d; font-size: 12px; font-weight: 600; cursor: pointer; }
.auth-password-toggle:hover { background: #f0f3f6; }
.auth-form-row { display: flex; justify-content: flex-end; margin-top: -10px; }
.auth-form-row a, .auth-back { display: inline-flex; align-items: center; min-height: 36px; color: #526171; font-size: 13px; font-weight: 500; text-decoration: none; }
.auth-form-row a:hover, .auth-back:hover { color: var(--red-dark); text-decoration: underline; }
.auth-back { margin: -6px 0 16px; }
.auth-primary { min-height: 48px; padding: 12px 16px; border: 1px solid var(--red); border-radius: 9px; color: #fff; background: var(--red); font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s; }
.auth-primary:hover { background: var(--red-dark); }
.auth-primary:disabled { opacity: .65; cursor: wait; }
:is(button,a):focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.auth-message { margin: 0; padding: 11px 12px; border: 1px solid #c0dccc; border-radius: 9px; color: #24613f; background: #f0f8f3; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.auth-message[data-tone="error"] { border-color: #ecc4c0; color: #932a24; background: #fff4f2; }
.auth-link-check { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; color: #526171; background: var(--soft); font-size: 13px; line-height: 1.5; }
.auth-link-check > span { width: 18px; height: 18px; flex: 0 0 auto; border: 2px solid #cbd3db; border-top-color: var(--red); border-radius: 50%; animation: auth-spin .75s linear infinite; }
.auth-link-check[data-state="error"] { border-color: #ecc4c0; color: #932a24; background: #fff4f2; }
.auth-link-check[data-state="error"] > span { display: none; }
.auth-link-check[data-state="ready"] { display: grid; gap: 4px; border-color: #c0dccc; color: #24613f; background: #f0f8f3; }
.auth-link-check[data-state="ready"] strong { font-size: 14px; }
.auth-link-check[data-state="ready"] small { font-size: 12px; font-weight: 400; line-height: 1.5; }
.auth-token-action { width: 100%; margin-top: 12px; }
.auth-footer { margin-top: 30px; padding-top: 18px; border-top: 1px solid #edf0f3; color: var(--muted); text-align: center; }
.auth-footer > strong { display: block; font-size: 11px; font-weight: 400; line-height: 1.5; }
.auth-footer nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; column-gap: 8px; margin-top: 4px; }
.auth-footer nav > span { display: none; }
.auth-footer a { display: inline-flex; align-items: center; min-height: 32px; color: #687684; font-size: 11px; font-weight: 400; text-decoration: none; }
.auth-footer a:hover { color: var(--red-dark); text-decoration: underline; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
  body { background: #fff; }
  .auth-body { display: block; padding: max(28px,env(safe-area-inset-top)) max(22px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(22px,env(safe-area-inset-left)); }
  .auth-shell { max-width: 400px; margin: 0 auto; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .auth-brand-panel { margin-bottom: 34px; }
  .auth-brand-mark { width: 196px; }
  .auth-view h1 { font-size: 27px; }
  .auth-footer { margin-top: 28px; }
}
@media (max-height: 640px) and (min-width: 601px) { .auth-body { align-items: start; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
