/* auth.nextbatch.io: same styles as the account pages (NextBatch-Auth web/app.css,
   chrome look). Keep the two in step when the design changes. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #050505;
  --text: #fafafa;
  --muted: #a1a1aa;
  --fine: #71717a;
  --line: rgba(255, 255, 255, 0.08);
  --field-border: rgba(255, 255, 255, 0.1);
  --field-bg: rgba(255, 255, 255, 0.03);
  --accent: #e4e4e7;
  --accent-hover: #ffffff;
  --error: #F87171;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); }
[hidden] { display: none !important; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, input[type=checkbox]:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
input::placeholder { color: var(--fine); }
input:focus { outline: none; border-color: rgba(250, 250, 250, 0.5) !important; box-shadow: 0 0 0 3px rgba(250, 250, 250, 0.07); }

/* Layout */
.shell { width: 100%; height: 100vh; min-height: 720px; display: grid; grid-template-columns: minmax(460px, 1fr) minmax(0, 1fr); }
.side { padding: 48px 56px 72px; display: flex; align-items: center; justify-content: center; }
main { width: 100%; max-width: 384px; }
.view { display: flex; flex-direction: column; gap: 40px; }

/* Title block */
.head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
h1 { margin: 0; font-size: 32px; line-height: 38px; font-weight: 500; letter-spacing: -0.03em; text-wrap: balance; }
.sub { margin: 0; font-size: 15px; line-height: 22px; color: var(--muted); overflow-wrap: anywhere; }
.strong { color: var(--text); }

.body { display: flex; flex-direction: column; gap: 22px; }
.stack-10 { display: flex; flex-direction: column; gap: 10px; }
.error { margin: 0; font-size: 13px; line-height: 20px; color: var(--error); }
.error.center { text-align: center; }

/* Bottom lines */
.foot-stack { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.foot-line { margin: 0; text-align: center; font-size: 14px; line-height: 21px; color: var(--muted); overflow-wrap: anywhere; }
.foot-line.small { font-size: 13px; line-height: 20px; color: var(--fine); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; font-size: 13px; line-height: 20px; color: var(--fine); }
.legal { margin: 0; text-align: center; font-size: 12px; line-height: 18px; color: var(--fine); }
.legal a { color: var(--muted); }
.legal a:hover { color: var(--text); }
.accent { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(228, 228, 231, 0.35); text-underline-offset: 3px; font-weight: 500; }
.accent:hover { color: var(--accent-hover); }
.mono { font-family: var(--mono); color: var(--muted); }

/* Fields */
.field { display: flex; flex-direction: column; gap: 8px; }
label { font-size: 13px; font-weight: 500; color: var(--text); }
.input { width: 100%; height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--field-border); background: var(--field-bg); color: var(--text); font-family: inherit; font-size: 15px; }
.input.invalid { border-color: var(--error); }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--field-border); border-radius: 8px; }
.check input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--text); flex-shrink: 0; }
.check label { font-size: 14px; line-height: 20px; font-weight: 400; color: var(--muted); }

/* Buttons */
.btn { height: 44px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 8px; font-family: inherit; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.btn-primary { border: 0; background: linear-gradient(180deg, #fafafa 0%, #d4d4d8 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(0, 0, 0, 0.4); color: #09090b; }
.btn-primary:hover { filter: brightness(1.06); color: #09090b; }
.btn-primary:disabled { filter: none; box-shadow: none; background: rgba(250, 250, 250, 0.12); color: rgba(250, 250, 250, 0.5); cursor: not-allowed; }
.btn-ghost { border: 1px solid var(--field-border); background: transparent; color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.18); color: var(--text); }
.btn.busy { opacity: 0.7; cursor: progress; }
.link-button { padding: 0; border: 0; background: none; font: inherit; color: var(--accent); font-weight: 500; cursor: pointer; }
.link-button:hover { color: var(--accent-hover); }
.link-button.quiet { color: var(--muted); font-weight: 400; }
.link-button.quiet:hover { color: var(--text); }
.link-button:disabled { color: var(--fine); cursor: default; font-weight: 400; }

.divider { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--fine); }
.divider::before, .divider::after { content: ""; flex-grow: 1; height: 1px; background: var(--line); }

/* Code boxes */
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp input { width: 100%; height: 56px; text-align: center; border-radius: 8px; border: 1px solid var(--field-border); background: var(--field-bg); color: var(--text); font-family: var(--mono); font-size: 22px; font-weight: 500; }
.otp input.filled { border-color: rgba(250, 250, 250, 0.3); }
.otp.invalid input { border-color: var(--error); }

/* Signed in */
.done-icon { width: 44px; height: 44px; margin-bottom: 14px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: rgba(250, 250, 250, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(250, 250, 250, 0.2); border-top-color: #fafafa; animation: spin 0.8s linear infinite; flex-shrink: 0; }
.row { display: flex; align-items: center; gap: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Wave panel */
.panel-wrap { height: 100%; padding: 12px 12px 12px 0; }
.panel { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.07); background: radial-gradient(120% 80% at 70% 30%, #1c1c1f 0%, #0b0b0c 55%, #050505 100%); color: #ffffff; }
.panel canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.panel-copy { position: absolute; left: 56px; right: 56px; bottom: 64px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.panel-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--fine); }
.panel-title { margin: 0; font-size: 40px; line-height: 44px; font-weight: 600; letter-spacing: -0.03em; background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.panel-sub { margin: 0; font-size: 15px; line-height: 23px; color: var(--muted); max-width: 420px; }
.panel-cta { margin-top: 6px; height: 36px; display: flex; align-items: center; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.04); color: #e4e4e7; text-decoration: none; font-size: 13px; font-weight: 500; }
.panel-cta:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }

/* Phones and narrow windows: the waves fill the whole screen behind the form,
   which sits in a glass card (Mobile artboard). */
@media (max-width: 900px) {
  .shell { display: block; height: auto; min-height: 100vh; min-height: 100dvh; }
  .panel-wrap { position: fixed; inset: 0; z-index: 0; height: auto; padding: 0; }
  .panel { border: 0; border-radius: 0; background: radial-gradient(140% 70% at 60% 35%, #1a1a1d 0%, #0a0a0b 55%, #050505 100%); }
  .panel-copy { display: none; }
  .side { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; padding: 24px 16px; }
  main { max-width: 460px; }
  main > .view { width: 100%; gap: 32px; padding: 32px 22px 26px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, 0.09); background: rgba(10, 10, 11, 0.68); -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 30px 60px rgba(0, 0, 0, 0.55); }
  .head { gap: 8px; }
  h1 { font-size: 28px; line-height: 34px; }
  .body { gap: 20px; }
  .btn, .input { height: 48px; }
  .btn { font-size: 15px; }
  .input { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}
