:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #0d1017;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eceef3;
  --muted: #8d95a8;
  --faint: #5d6477;
  --gold: #d9b45a;
  --gold-2: #f0d488;
  --danger: #ff8a8a;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
.shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }

/* Brand side */
.brand-panel {
  position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 44px 52px;
  background:
    radial-gradient(700px 420px at 15% 0%, rgba(217, 180, 90, 0.16), transparent 60%),
    radial-gradient(600px 500px at 100% 100%, rgba(78, 156, 255, 0.10), transparent 60%),
    linear-gradient(160deg, #10141e, #080a0f);
  border-right: 1px solid var(--line);
}
.brand-top { display: flex; align-items: center; gap: 12px; }
.brand-name { font: 600 16px var(--display); letter-spacing: 0.01em; }
.mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, #1a2030, #0b0e14); border: 1px solid rgba(217, 180, 90, 0.35);
  box-shadow: 0 8px 24px rgba(217, 180, 90, 0.12);
}
.mark svg { width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.brand-copy { margin: auto 0; max-width: 460px; position: relative; z-index: 1; }
.eyebrow { margin: 0 0 12px; color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.brand-copy h2 { margin: 0 0 26px; font: 600 clamp(28px, 3.2vw, 40px)/1.12 var(--display); letter-spacing: -0.02em; }
.brand-copy h2 span {
  background: linear-gradient(90deg, var(--gold), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: #c6cbd6; }
.features li { display: flex; align-items: center; gap: 12px; }
.features i {
  width: 20px; height: 20px; border-radius: 50%; flex: none; position: relative;
  background: rgba(217, 180, 90, 0.14); border: 1px solid rgba(217, 180, 90, 0.4);
}
.features i::after {
  content: ""; position: absolute; left: 6px; top: 3px; width: 5px; height: 9px;
  border: solid var(--gold); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.chart { position: absolute; left: 0; right: 0; bottom: 60px; height: 170px; opacity: 0.55; pointer-events: none; }
.chart svg { width: 100%; height: 100%; }
.brand-foot { margin: 0; color: var(--faint); font-size: 12.5px; position: relative; z-index: 1; }

/* Form side */
.form-panel { display: grid; place-items: center; padding: 32px 20px; min-height: 100vh; }
.form-card { width: min(400px, 100%); }
.form-card h1 { margin: 0; font: 600 28px/1.2 var(--display); letter-spacing: -0.01em; }
.sub { margin: 8px 0 28px; color: var(--muted); }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 7px; }
input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; font: inherit; color: var(--text);
  background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.1); transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus { outline: none; border-color: rgba(217, 180, 90, 0.7); box-shadow: 0 0 0 4px rgba(217, 180, 90, 0.12); }
.password-field { position: relative; }
.password-field input { padding-right: 86px; }
.reveal {
  position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: 9px;
  background: rgba(255, 255, 255, 0.05); color: var(--muted); font: 600 12.5px var(--font); cursor: pointer;
}
.reveal:hover { color: var(--text); }
.error { min-height: 22px; margin: 12px 0 14px; color: var(--danger); font-size: 13.5px; }
.primary {
  width: 100%; height: 50px; border: 0; border-radius: 999px; cursor: pointer; font: 600 15.5px var(--font); color: #17130a;
  background: linear-gradient(90deg, var(--gold), var(--gold-2)); box-shadow: 0 10px 28px rgba(217, 180, 90, 0.22);
  transition: transform 0.1s, filter 0.15s;
}
.primary:hover { filter: brightness(1.05); }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: 0.7; cursor: progress; }
.help { margin: 22px 0 0; color: var(--faint); font-size: 13px; text-align: center; }
.setup-note { display: none; padding: 12px 14px; border-radius: 12px; background: rgba(217, 180, 90, 0.1); border: 1px solid rgba(217, 180, 90, 0.35); font-size: 13.5px; }
.no-accounts .setup-note { display: block; }
code { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-size: 12.5px; }
.mobile-only { display: none; margin-bottom: 18px; }

/* Password page */
.single .form-panel { background: radial-gradient(700px 420px at 50% -10%, rgba(217, 180, 90, 0.12), transparent 60%), var(--bg); }
.single .mark { margin-bottom: 20px; }
.strength { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); margin-top: 10px; overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; transition: width 0.2s, background 0.2s; }
.strength i.weak { width: 25%; background: #ff7a7a; }
.strength i.fair { width: 50%; background: #f0a35a; }
.strength i.good { width: 75%; background: var(--gold); }
.strength i.strong { width: 100%; background: #3ecf8e; }
.hint { margin: 6px 0 0; color: var(--faint); font-size: 12.5px; }
.form-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.form-foot form { margin: 0; margin-left: auto; }
.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: none; }
.link:hover { color: var(--gold); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .mobile-only { display: grid; }
}
