/*
 * Auth Pages — Stream Theme (ISSUE_9236)
 * Dark-only login/signup/lost-password/reset-password page styles.
 * Reference: example/7.html. All selectors scoped under body.auth-stream
 * to avoid global style pollution (per CLAUDE.md CSS scoped-selector rule).
 */

body.auth-stream {
  --bg: #07090f;
  --bg-2: #0b1020;
  --surface: #0f172a;
  --surface-2: #131c34;
  --border: rgba(148,163,184,0.12);
  --border-strong: rgba(148,163,184,0.22);
  --text: #e6ecf5;
  --muted: #93a2bd;
  --dim: #64748b;
  --accent: #5eead4;
  --accent-2: #99f6e4;
  --accent-deep: #14b8a6;
  --violet: #8b9cff;
  --gold: #f5c451;
  --danger: #f87171;
  --grid: rgba(148,163,184,0.06);

  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 600px at 85% 10%, rgba(94,234,212,0.10), transparent 60%),
    radial-gradient(900px 500px at 0% 80%, rgba(139,156,255,0.08), transparent 60%),
    linear-gradient(180deg, #07090f 0%, #07090f 100%);
  color: var(--text);
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01","cv11";
}

body.auth-stream * { box-sizing: border-box; }
body.auth-stream a { color: inherit; text-decoration: none; }
body.auth-stream .mono { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-feature-settings: "zero","ss01"; }
body.auth-stream .serif { font-family: "Instrument Serif", ui-serif, Georgia, serif; font-style: italic; letter-spacing: -0.01em; }

/* ── page grid backdrop ── */
body.auth-stream .grid-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(1600px 900px at 70% 30%, #000 30%, transparent 75%);
          mask-image: radial-gradient(1600px 900px at 70% 30%, #000 30%, transparent 75%);
}

/* ── layout shell ── */
body.auth-stream .shell {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1.05fr;
}
@media (max-width: 980px) {
  body.auth-stream .shell { grid-template-columns: 1fr; }
  body.auth-stream .showcase { display: none; }
}

/* ── left: form column ── */
body.auth-stream .form-col {
  display: flex; flex-direction: column;
  padding: 28px 28px 24px;
  min-height: 100vh;
}
body.auth-stream .top-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
body.auth-stream .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; font-size: 15.5px; color: var(--text); }
body.auth-stream .brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #5eead4 0%, #8b9cff 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 6px 16px -8px rgba(94,234,212,0.6);
  position: relative; display: grid; place-items: center;
}
body.auth-stream .brand-mark svg { position: relative; z-index: 1; }
body.auth-stream .brand-mark::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(7,9,15,0.55); }
body.auth-stream .brand-name .second { color: var(--muted); font-weight: 500; }

body.auth-stream .top-right { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--muted); }
body.auth-stream .top-right a:hover { color: var(--text); }
body.auth-stream .top-right .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); }

body.auth-stream .form-wrap {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 32px 0;
}
body.auth-stream .form-inner { width: 100%; max-width: 420px; }

body.auth-stream .eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 11px 5px 7px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: rgba(15,23,42,0.6);
  color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
}
body.auth-stream .eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
  animation: auth-stream-pulse 2.2s ease-in-out infinite;
}
@keyframes auth-stream-pulse { 50% { opacity: .45; } }

body.auth-stream h1.title {
  font-size: 42px; line-height: 1.04; letter-spacing: -0.03em;
  font-weight: 700; margin: 18px 0 10px; color: var(--text);
}
body.auth-stream h1.title .serif {
  font-weight: 400;
  background: linear-gradient(180deg,#fff,#a4b3cf);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
body.auth-stream .sub { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0; }

/* OAuth */
body.auth-stream .oauth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
body.auth-stream .oauth {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 14px; border-radius: 9px; font-weight: 600; font-size: 14px;
  border: 1px solid var(--border-strong); background: rgba(255,255,255,0.02);
  color: var(--text); transition: all .15s ease; cursor: pointer;
  font-family: inherit;
}
body.auth-stream .oauth:hover { background: rgba(255,255,255,0.05); border-color: rgba(148,163,184,0.4); }
body.auth-stream .oauth svg { flex-shrink: 0; }

/* divider */
body.auth-stream .or {
  display: flex; align-items: center; gap: 14px; margin: 22px 0 18px;
  color: var(--dim); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
}
body.auth-stream .or::before,
body.auth-stream .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* fields */
body.auth-stream .field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
body.auth-stream .field > label,
body.auth-stream .field .field-label {
  font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
}
body.auth-stream .field .right-link { color: var(--accent); letter-spacing: 0; text-transform: none; font-weight: 500; font-size: 12.5px; }
body.auth-stream .field .right-link:hover { color: var(--accent-2); }
body.auth-stream .field input[type="email"],
body.auth-stream .field input[type="password"],
body.auth-stream .field input[type="text"] {
  appearance: none; -webkit-appearance: none;
  background: rgba(15,23,42,0.6);
  border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 13px 14px; font: inherit; font-size: 14.5px; color: var(--text);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  width: 100%;
}
body.auth-stream .field input::placeholder { color: var(--dim); }
body.auth-stream .field input:focus {
  border-color: rgba(94,234,212,0.5);
  box-shadow: 0 0 0 4px rgba(94,234,212,0.10);
  background: rgba(15,23,42,0.85);
}
body.auth-stream .pwd-wrap { position: relative; display: flex; }
body.auth-stream .pwd-wrap input { flex: 1; padding-right: 42px; }
body.auth-stream .pwd-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; color: var(--muted); padding: 8px; cursor: pointer; border-radius: 6px;
  display: grid; place-items: center;
}
body.auth-stream .pwd-toggle:hover { color: var(--text); background: rgba(255,255,255,0.04); }
body.auth-stream .pwd-toggle svg { width: 16px; height: 16px; }

body.auth-stream .row-between { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 18px; }
body.auth-stream .check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; cursor: pointer; user-select: none; }
body.auth-stream .check input {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--border-strong);
  background: rgba(15,23,42,0.6); cursor: pointer; display: grid; place-items: center; transition: all .15s ease;
  margin: 0;
}
body.auth-stream .check input:checked { background: linear-gradient(180deg,#7fe9d6,#14b8a6); border-color: rgba(94,234,212,0.55); }
body.auth-stream .check input:checked::after {
  content: ""; width: 8px; height: 8px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304150e' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/contain no-repeat;
}

body.auth-stream .btn-primary {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 16px; border-radius: 10px; font-weight: 700; font-size: 14.5px; letter-spacing: -0.005em;
  background: linear-gradient(180deg,#7fe9d6,#14b8a6);
  color: #04150e; border: 1px solid rgba(94,234,212,0.55); cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 8px 28px -12px rgba(94,234,212,0.55);
  transition: filter .15s ease, transform .05s ease;
  font-family: inherit;
}
body.auth-stream .btn-primary:hover { filter: brightness(1.05); }
body.auth-stream .btn-primary:active { transform: translateY(1px); }
body.auth-stream .btn-primary:disabled { opacity: .6; cursor: not-allowed; filter: none; }
body.auth-stream .btn-primary .arrow { transition: transform .2s ease; }
body.auth-stream .btn-primary:hover .arrow { transform: translateX(3px); }

body.auth-stream .magic-row {
  margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-size: 13px;
}
body.auth-stream .magic-row a { color: var(--accent); font-weight: 600; }
body.auth-stream .magic-row a:hover { color: var(--accent-2); }

body.auth-stream .terms {
  margin-top: 24px; text-align: center;
  color: var(--dim); font-size: 12px; line-height: 1.5;
}
body.auth-stream .terms a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
body.auth-stream .terms a:hover { color: var(--text); }

body.auth-stream .signup-row {
  margin-top: 20px; text-align: center; color: var(--muted); font-size: 14px;
}
body.auth-stream .signup-row a { color: var(--text); font-weight: 600; border-bottom: 1px solid var(--border-strong); padding-bottom: 1px; }
body.auth-stream .signup-row a:hover { border-bottom-color: var(--accent); }

body.auth-stream .form-foot {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--dim); font-size: 12px; font-family: "JetBrains Mono", monospace;
}
body.auth-stream .form-foot .links { display: flex; gap: 18px; }
body.auth-stream .form-foot a:hover { color: var(--muted); }

/* AJAX message slot */
body.auth-stream .ajax-message {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.5;
  border: 1px solid var(--border-strong); background: rgba(15,23,42,0.6); color: var(--muted);
  display: none;
}
body.auth-stream .ajax-message.success { display: block; border-color: rgba(94,234,212,0.4); color: var(--accent-2); background: rgba(94,234,212,0.06); }
body.auth-stream .ajax-message.error { display: block; border-color: rgba(248,113,113,0.4); color: var(--danger); background: rgba(248,113,113,0.06); }
body.auth-stream .ajax-message.info { display: block; }

/* honeypot stays hidden */
body.auth-stream .honeypot { position: absolute; left: -9999px; }

/* ── right: showcase column ── */
body.auth-stream .showcase {
  position: relative;
  padding: 28px 28px 24px;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--border);
  background:
    radial-gradient(600px 360px at 90% 10%, rgba(94,234,212,0.10), transparent 60%),
    radial-gradient(700px 460px at 10% 90%, rgba(139,156,255,0.07), transparent 60%),
    linear-gradient(180deg, rgba(11,16,32,0.6) 0%, rgba(7,9,15,0.4) 100%);
  overflow: hidden;
}
body.auth-stream .showcase::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(148,163,184,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(900px 600px at 60% 40%, #000 35%, transparent 80%);
          mask-image: radial-gradient(900px 600px at 60% 40%, #000 35%, transparent 80%);
}
body.auth-stream .showcase-inner { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; gap: 22px; }

body.auth-stream .show-head {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 12px; font-family: "JetBrains Mono", monospace;
}
body.auth-stream .show-head .live {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; font-size: 11px;
}
body.auth-stream .show-head .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
  animation: auth-stream-pulse 1.8s ease-in-out infinite;
}

body.auth-stream .showcase-body {
  flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px;
  max-width: 560px;
}
body.auth-stream .show-eyebrow {
  color: var(--accent-2); font-family: "JetBrains Mono", monospace;
  font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
}
body.auth-stream .show-h {
  font-size: clamp(34px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -0.03em;
  font-weight: 700; margin: 0; color: var(--text);
}
body.auth-stream .show-h .serif {
  font-weight: 400;
  background: linear-gradient(180deg,#fff,#a4b3cf);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
body.auth-stream .show-sub { color: var(--muted); font-size: 15.5px; line-height: 1.6; margin: 0; max-width: 480px; }

/* live stream card */
body.auth-stream .stream-card {
  border: 1px solid var(--border-strong); border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, rgba(15,23,42,0.85), rgba(11,16,32,0.85));
  box-shadow: 0 24px 60px -32px rgba(0,0,0,0.7);
}
body.auth-stream .stream-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  background: rgba(7,9,15,0.5);
}
body.auth-stream .stream-head .dots { display: flex; gap: 6px; }
body.auth-stream .stream-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: #2c3552; display: block; }
body.auth-stream .stream-head .dots i:nth-child(1) { background: #3d4663; }
body.auth-stream .stream-head .stream-title {
  font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--muted);
  flex: 1; text-align: center; letter-spacing: 0.04em;
}
body.auth-stream .stream-head .stream-title b { color: var(--text); font-weight: 600; }
body.auth-stream .stream-head .meta { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--dim); }

body.auth-stream .stream-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 0; }
body.auth-stream .log {
  font-family: "JetBrains Mono", monospace; font-size: 12.5px; line-height: 1.7;
  display: grid; grid-template-columns: 64px 18px 1fr; column-gap: 10px;
  min-height: 170px;
}
body.auth-stream .log .t { color: var(--dim); }
body.auth-stream .log .ic { color: var(--accent); text-align: center; }
body.auth-stream .log .ic.v { color: var(--violet); }
body.auth-stream .log .ic.g { color: var(--gold); }
body.auth-stream .log .ic.m { color: var(--muted); }
body.auth-stream .log .msg { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.auth-stream .log .msg .k { color: var(--accent-2); font-weight: 600; }
body.auth-stream .log .msg .v { color: var(--muted); }
body.auth-stream .log .msg .pill {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  background: rgba(94,234,212,0.10); color: var(--accent-2);
  border: 1px solid rgba(94,234,212,0.25); font-size: 11px; margin: 0 2px;
}
body.auth-stream .log .msg .pill.v { background: rgba(139,156,255,0.10); color: var(--violet); border-color: rgba(139,156,255,0.25); }
body.auth-stream .log .msg .pill.g { background: rgba(245,196,81,0.10); color: var(--gold); border-color: rgba(245,196,81,0.25); }
body.auth-stream .log-row { display: contents; animation: auth-stream-fadein .35s ease-out; }
@keyframes auth-stream-fadein {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

body.auth-stream .ticker-row {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
body.auth-stream .tick {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(7,9,15,0.45);
  display: flex; flex-direction: column; gap: 3px;
}
body.auth-stream .tick .lbl {
  font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--dim);
  letter-spacing: 0.1em; text-transform: uppercase;
}
body.auth-stream .tick .val { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; font-family: "JetBrains Mono", monospace; }
body.auth-stream .tick .delta { font-size: 11.5px; font-family: "JetBrains Mono", monospace; }
body.auth-stream .tick.up .val { color: var(--accent-2); }
body.auth-stream .tick.up .delta { color: var(--accent); }
body.auth-stream .tick.dn .val { color: #fda4af; }
body.auth-stream .tick.dn .delta { color: var(--danger); }
body.auth-stream .tick.neutral .val { color: var(--text); }
body.auth-stream .tick.neutral .delta { color: var(--muted); }

/* feature pills */
body.auth-stream .features { display: flex; flex-wrap: wrap; gap: 8px; }
body.auth-stream .feat {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(15,23,42,0.5);
  color: var(--muted); font-size: 12.5px; font-family: "JetBrains Mono", monospace;
}
body.auth-stream .feat svg { color: var(--accent); }

body.auth-stream .show-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  color: var(--dim); font-size: 11.5px; font-family: "JetBrains Mono", monospace;
  margin-top: auto;
}
