:root {
  color-scheme: light;
  --background: #f7f7f8;
  --foreground: #181a20;
  --card: #fff;
  --muted: #707a8a;
  --border: #eaecef;
  --input: #d7dbe0;
  --primary: #b4090d;
  --primary-strong: #90060a;
  --primary-foreground: #fff;
  --accent: #f0a900;
  --accent-strong: #b97800;
  --secondary: #f5f5f5;
  --ring: #b4090d;
  --danger: #c2332b;
  --shadow: 0 20px 55px rgb(24 26 32 / .11);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #0b0e11;
    --foreground: #f5f5f5;
    --card: #181a20;
    --muted: #929aa5;
    --border: #2b3139;
    --input: #474d57;
    --primary: #dc3035;
    --primary-strong: #ef474c;
    --primary-foreground: #fff;
    --accent: #ffc13d;
    --accent-strong: #ffd071;
    --secondary: #24272e;
    --ring: #dc3035;
    --danger: #ff8279;
    --shadow: 0 20px 55px rgb(0 0 0 / .35);
  }
}

* { box-sizing: border-box; }
html { min-height: 100%; font-family: BinancePlex, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { min-height: 100vh; margin: 0; overflow-x: hidden; background: var(--background); color: var(--foreground); }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); line-height: 1.65; }
.eyebrow { margin: 0; color: var(--primary); font-size: .72rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.brand-logo { width: 64px; height: 64px; display: block; border: 1px solid var(--border); border-radius: 18px; background: #fff; object-fit: contain; padding: 3px; box-shadow: 0 10px 28px rgb(92 25 18 / .12); }
.brand-logo.small { width: 34px; height: 34px; border-radius: 10px; padding: 1px; }
.topbar-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; }

.auth-shell { min-height: 100vh; min-height: 100dvh; }
.auth-topbar { position: relative; z-index: 2; width: 100%; height: 64px; display: flex; align-items: center; padding: 0 24px; background: color-mix(in srgb, var(--background) 78%, transparent); backdrop-filter: blur(18px); }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 900; letter-spacing: -.045em; }
.auth-brand img { width: 38px; height: 38px; display: block; border: 0; border-radius: 8px; background: #fff; object-fit: contain; padding: 0; box-shadow: none; }
.auth-brand strong { color: var(--primary); }
.auth-layout { width: min(calc(100% - 36px), 425px); min-height: calc(100dvh - 128px); margin: 0 auto; display: grid; align-items: center; padding: 48px 0; }
.auth-card { width: 100%; }
.card-header h1 { margin: 0 0 12px; font-size: 2rem; line-height: 1.15; letter-spacing: -.045em; }
.card-header .muted { margin: 0; font-size: .9rem; }
.form-grid { display: grid; gap: 20px; margin-top: 32px; }
.field { display: grid; gap: 8px; font-size: .875rem; font-weight: 650; }
.field input { width: 100%; min-height: 48px; border: 1px solid var(--input); border-radius: 8px; background: color-mix(in srgb, var(--background) 82%, transparent); color: var(--foreground); padding: 0 14px; font: inherit; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 8px; padding: 0 17px; font: inherit; font-weight: 750; cursor: pointer; }
.button-primary { background: var(--primary); color: var(--primary-foreground); }
.button-primary:hover { background: var(--primary-strong); }
.button-secondary { border-color: var(--border); background: var(--secondary); }
.alert { margin-top: 18px; border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); border-radius: 11px; background: color-mix(in srgb, var(--danger) 7%, transparent); padding: 11px 13px; color: var(--danger); font-size: .875rem; }
.auth-help { margin: 28px 0 0; border-top: 1px solid var(--border); padding-top: 24px; text-align: center; color: var(--muted); font-size: .8rem; line-height: 1.6; }
.auth-help strong { color: var(--foreground); }
.auth-footer { height: 64px; display: flex; align-items: center; justify-content: center; gap: 24px; color: var(--muted); font-size: .72rem; }

.not-found-shell { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 18px; }
.not-found-panel { border: 1px solid var(--border); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.not-found-panel { width: min(100%, 640px); padding: 34px; text-align: center; }
.not-found-panel .topbar-brand { justify-content: center; }
.not-found-content { display: grid; justify-items: center; gap: 12px; margin-top: 54px; }
.not-found-content h1 { max-width: 560px; margin: 0; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.05; letter-spacing: -.04em; }
.not-found-content .muted { max-width: 500px; margin: 0; }
.status-code { margin: 0; color: var(--muted); font-size: .95rem; font-weight: 800; }
.missing-path { width: min(100%, 420px); margin-top: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--secondary); padding: 12px; color: var(--muted); font-family: ui-monospace, monospace; font-size: .85rem; overflow-wrap: anywhere; }
.action-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.action-row .button { min-width: 150px; }

@media (max-width: 820px) {
  .auth-topbar { padding-inline: 18px; }
  .auth-layout { min-height: calc(100dvh - 128px); padding: 36px 0; }
  .not-found-panel { padding: 28px 20px; }
  .not-found-content { margin-top: 40px; }
  .action-row, .action-row .button { width: 100%; }
}
