.auth-shell {
  --bg: #121519;
  --bg-soft: #20262e;
  --surface-top: #242b35;
  --ink: #f8fafc;
  --ink-soft: #a4adba;
  --border: #34404e;
  --control-border: #687587;
  --accent: #f97316;
  --accent-foreground: #151a21;
  --danger: #ff5269;
  --toast-top-offset: 1rem;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
  font: 400 14px/1.5 "Inter", sans-serif;
}

.auth-page { min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: auto 1fr; }
.auth-header { padding: max(20px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-right)) 20px max(32px, env(safe-area-inset-left)); }
.auth-brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 18px; font-weight: 600; letter-spacing: -.6px; }
.auth-brand-icon { display: flex; color: var(--accent); }
.auth-brand .brand-mark { width: 24px; height: 24px; }
.auth-main { display: grid; place-items: center; min-width: 0; padding: 24px 20px 92px; }
.auth-panel { display: grid; gap: 20px; width: min(100%, 360px); min-width: 0; }
.auth-panel h1 { font: 600 24px/1.25 "Inter", sans-serif; letter-spacing: -.6px; overflow-wrap: anywhere; }
.auth-form { display: grid; gap: 14px; min-width: 0; }
.auth-field { display: grid; gap: 6px; min-width: 0; }
.auth-field > span { color: var(--ink-soft); font-size: 13px; }
.auth-shell .input { width: 100%; height: 44px; padding: 9px 11px; border: 1px solid var(--control-border); border-radius: 6px; background: var(--bg-soft); color: var(--ink); box-shadow: inset 0 1px 3px #0004; font: 400 16px/1.4 "Inter", sans-serif; }
.auth-shell .input:focus { border-color: var(--accent); }
.auth-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.auth-remember { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink-soft); font-size: 13px; }
.auth-remember input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.auth-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); font-size: 13px; }
.auth-link:hover { color: var(--accent); }
.auth-footer { display: flex; justify-content: center; }
.auth-shell .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border: 1px solid var(--control-border); border-radius: 6px; background: var(--bg-soft) linear-gradient(var(--surface-top), var(--bg-soft)); color: var(--ink); box-shadow: 0 2px 3px #0003, inset 0 1px 0 #ffffff08; font: 500 14px/1.4 "Inter", sans-serif; -webkit-text-fill-color: currentColor; }
.auth-shell .btn-primary { background: var(--accent) linear-gradient(#ff8a33, var(--accent)); border-color: var(--accent); color: var(--accent-foreground); font-weight: 600; box-shadow: 0 3px 7px #0004, inset 0 1px 0 #ffffff26; }
.auth-shell .btn-primary:hover { background: #ff7f25 linear-gradient(#ff9645, #ff7f25); border-color: #ff9645; }
.auth-shell .btn-primary:active { background: color-mix(in srgb, var(--accent) 85%, var(--bg)); box-shadow: inset 0 1px 3px #0005; }
.auth-submit { width: 100%; }
.auth-shell :is(a, button, input):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.auth-shell .error-box { padding: 12px; border: 1px solid var(--danger); border-radius: 6px; background: color-mix(in srgb, var(--danger) 8%, var(--bg)); color: var(--ink); font-size: 13px; }
.auth-shell .error-box ul { margin: 0; padding-left: 18px; }
.auth-shell .toast { background: var(--bg-soft) linear-gradient(var(--surface-top), var(--bg-soft)); color: var(--ink); border: 1px solid var(--control-border); border-radius: 6px; box-shadow: 0 12px 28px #0006, inset 0 1px 0 #ffffff08; }
.auth-shell .toast-notice { border-left: 3px solid var(--accent); }
.auth-shell .toast-alert { border-left: 3px solid var(--danger); }
.auth-shell .toast-close { min-width: 32px; min-height: 32px; background: transparent; border-color: var(--control-border); color: var(--ink-soft); -webkit-text-fill-color: currentColor; }

@media (max-width: 540px) {
  .auth-header { padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 16px max(20px, env(safe-area-inset-left)); }
}
@media (max-height: 600px) {
  .auth-header { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: 12px; }
  .auth-main { align-items: start; padding-top: 16px; padding-bottom: 24px; }
}
