/* ═════════ Broadway Auth Pages — shared ═════════ */
:root,
[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-2: #131313;
  --bg-3: #1a1a1a;
  --ink: #f4efe6;
  --ink-dim: #8a8278;
  --ink-faint: #4a463f;
  --rule: #1d1d1d;
  --rule-2: #2a2a2a;
  --accent: #b366ff;
  --warm: #ffd166;
  --stage-bg: #060606;
  --grain-opacity: 0.06;
  --vignette: radial-gradient(ellipse at 50% 55%, transparent 45%, rgba(0,0,0,0.7) 100%);
  --shadow-card: 0 24px 60px -20px rgba(0,0,0,0.6);
}
[data-theme="light"] {
  --bg: #f8f5ee;
  --bg-2: #efeae0;
  --bg-3: #e6e0d2;
  --ink: #15110b;
  --ink-dim: #6b6357;
  --ink-faint: #b8b1a3;
  --rule: #e0d8c8;
  --rule-2: #cfc6b3;
  --accent: #7c34d6;
  --warm: #c98a1c;
  --stage-bg: #efeae0;
  --grain-opacity: 0.03;
  --vignette: radial-gradient(ellipse at 50% 55%, transparent 50%, rgba(120,100,70,0.15) 100%);
  --shadow-card: 0 24px 60px -20px rgba(60,50,30,0.18);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  min-height: 100vh; overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* film grain & vignette — same as homepage */
.grain {
  pointer-events: none; position: fixed; inset: 0; z-index: 100;
  opacity: var(--grain-opacity); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.vignette {
  pointer-events: none; position: fixed; inset: 0; z-index: 1;
  background: var(--vignette);
}

/* page chrome */
.page-shell {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
  isolation: isolate;
}

/* ── left stage: spotlit marquee ── */
.stage {
  position: relative;
  background: var(--stage-bg);
  overflow: hidden;
  display: grid; place-items: center;
  padding: 60px 40px;
  border-right: 1px solid var(--rule);
}
/* ambient billboard pattern */
.stage::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 30% 40% at 18% 22%, rgba(77,141,255,0.18), transparent 60%),
    radial-gradient(ellipse 25% 35% at 82% 30%, rgba(76,201,240,0.16), transparent 60%),
    radial-gradient(ellipse 35% 30% at 50% 85%, rgba(255,209,102,0.14), transparent 60%);
  pointer-events: none;
}
/* the overhead spotlight beam — narrows toward top */
.stage .beam {
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 140%;
  background:
    radial-gradient(ellipse 30% 60% at 50% 100%,
      rgba(255,255,255,0.5) 0%,
      rgba(255,245,210,0.32) 25%,
      rgba(255,230,170,0.14) 50%,
      transparent 80%),
    conic-gradient(from 180deg at 50% 0%,
      transparent 350deg,
      rgba(255,245,210,0.35) 0deg,
      transparent 10deg);
  filter: blur(6px);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: beamFlicker 5s ease-in-out infinite;
}
.stage .lamp {
  position: absolute; top: -22px; left: 50%;
  transform: translateX(-50%);
  width: 70px; height: 22px;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, #fff7d8, #ffd166 60%, #b88036);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  box-shadow: 0 6px 24px rgba(255,209,102,0.7), 0 0 60px rgba(255,209,102,0.4);
}
@keyframes beamFlicker {
  0%, 100% { opacity: 1; }
  47% { opacity: 1; }
  48% { opacity: 0.7; }
  49% { opacity: 1; }
  72% { opacity: 0.85; }
  73% { opacity: 1; }
}

/* marquee wordmark on the stage */
.stage-inner {
  position: relative; z-index: 2;
  display: grid; gap: 32px; justify-items: center;
  max-width: 540px; text-align: center;
}
.bulb-frame {
  position: relative;
  padding: 40px 56px;
  border: 2px solid var(--warm);
  border-radius: 8px;
  background: rgba(0,0,0,0.4);
  box-shadow:
    inset 0 0 60px rgba(255,209,102,0.15),
    0 0 80px rgba(255,209,102,0.1);
}
/* the marquee bulbs */
.bulb-frame::before,
.bulb-frame::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px;
  height: 8px;
  background:
    radial-gradient(circle at center, #ffd166 0 3px, rgba(255,209,102,0.0) 4px) repeat-x;
  background-size: 22px 8px;
  filter: drop-shadow(0 0 3px #ffd166);
  animation: bulbChase 1.6s linear infinite;
}
.bulb-frame::before { top: -4px; }
.bulb-frame::after { bottom: -4px; animation-direction: reverse; }
@keyframes bulbChase {
  to { background-position: 22px 0; }
}
/* side bulb strips */
.bulb-frame .side {
  position: absolute; top: 16px; bottom: 16px; width: 8px;
  background:
    radial-gradient(circle at center, #ffd166 0 3px, rgba(255,209,102,0.0) 4px) repeat-y;
  background-size: 8px 22px;
  filter: drop-shadow(0 0 3px #ffd166);
  animation: bulbChaseV 1.6s linear infinite;
}
.bulb-frame .side.l { left: -4px; }
.bulb-frame .side.r { right: -4px; animation-direction: reverse; }
@keyframes bulbChaseV {
  to { background-position: 0 22px; }
}

.bulb-frame .wm {
  font-family: 'Anton', 'Impact', sans-serif;
  font-size: clamp(54px, 9vw, 110px);
  letter-spacing: -0.02em;
  line-height: 0.85;
  color: var(--ink);
  text-shadow: 0 0 30px rgba(255,247,236,0.3);
}
.bulb-frame .sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--warm);
  margin-top: 8px;
}

.stage-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  line-height: 1.9;
  text-align: center;
  max-width: 420px;
}
.stage-meta em { color: var(--warm); font-style: normal; }

/* ticker tape at the bottom */
.tape {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
  overflow: hidden;
  height: 36px;
  display: flex; align-items: center;
  z-index: 3;
}
.tape .track {
  display: flex; gap: 32px;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  animation: tape 30s linear infinite;
  padding-left: 100%;
}
.tape .track span { display: flex; align-items: center; gap: 32px; }
.tape .track span::after { content: '◆'; color: var(--warm); }
@keyframes tape {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ── right form panel ── */
.form-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 28px 40px 40px;
  background: var(--bg);
}
.form-top {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.form-top a {
  color: var(--ink-dim);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.2s ease;
}
.form-top a:hover { color: var(--ink); }
.form-top .home { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.form-top .home .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--warm); box-shadow: 0 0 8px var(--warm);
}

.form-wrap {
  align-self: center;
  width: 100%; max-width: 460px;
  margin: 0 auto;
  display: grid; gap: 28px;
  padding: 40px 0;
}
.act-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--warm);
  display: inline-flex; align-items: center; gap: 10px;
}
.act-eyebrow::before {
  content: ''; width: 24px; height: 1px; background: var(--warm);
}
.act-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 5vw, 54px);
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin: 0;
  text-wrap: balance;
}
.act-title em {
  font-family: 'Frank Ruhl Libre', serif;
  font-style: italic;
  font-weight: 500;
  color: var(--warm);
}
.act-lead {
  margin: 0;
  font-size: 15px; line-height: 1.55;
  color: var(--ink-dim);
  text-wrap: pretty;
  max-width: 380px;
}

/* form */
form.broadway-form { display: grid; gap: 18px; }
form .field { display: grid; gap: 8px; }
form label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
form .label-row { display: flex; justify-content: space-between; align-items: baseline; }
form .label-row .hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); text-decoration: none;
  transition: color 0.2s ease;
}
form .label-row .hint:hover { color: var(--warm); }

form input[type="text"],
form input[type="email"],
form input[type="password"],
form select {
  width: 100%;
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--rule-2);
  border-radius: 12px;
  padding: 16px 18px;
  font: inherit;
  font-size: 15px;
  transition: all 0.2s ease;
}
form input:focus,
form select:focus {
  outline: none;
  border-color: var(--warm);
  box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.12);
  background: var(--bg-3);
}

/* input with adornment */
.input-row { position: relative; }
.input-row .adornment {
  position: absolute;
  right: 14px; top: 50%; transform: translateY(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: none; border: none; cursor: pointer;
  padding: 4px 6px;
  transition: color 0.2s ease;
}
.input-row .adornment:hover { color: var(--warm); }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* big primary cta */
.btn-primary {
  position: relative;
  margin-top: 6px;
  padding: 18px 22px;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  border-radius: 14px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 50% 50%, var(--warm), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.btn-primary:hover::before { opacity: 0.5; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary .arrow { transition: transform 0.2s ease; }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-primary span { position: relative; z-index: 1; }

/* secondary providers */
.divider {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center;
  margin: 6px 0;
}
.divider::before,
.divider::after { content: ''; height: 1px; background: var(--rule-2); }
.divider span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-dim);
}
.providers { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.providers .prov {
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  color: var(--ink);
  padding: 13px 14px;
  border-radius: 12px;
  font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s ease;
}
.providers .prov:hover {
  background: var(--bg-3);
  border-color: var(--warm);
  color: var(--warm);
}
.providers .prov svg { width: 16px; height: 16px; }

/* checkbox */
.check {
  display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start;
  font-size: 13px; color: var(--ink-dim); line-height: 1.5;
  cursor: pointer; user-select: none;
}
.check input { appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 1px solid var(--rule-2); border-radius: 5px;
  background: var(--bg-2); cursor: pointer; margin: 1px 0 0 0;
  display: grid; place-items: center;
  transition: all 0.2s ease;
}
.check input:checked {
  background: var(--warm); border-color: var(--warm);
}
.check input:checked::after {
  content: ''; width: 4px; height: 8px;
  border: solid var(--bg); border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}
.check a { color: var(--ink); border-bottom: 1px solid var(--rule-2); text-decoration: none; }
.check a:hover { color: var(--warm); border-color: var(--warm); }

/* bottom switch */
.form-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-dim);
}
.form-bottom .switch a {
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--rule-2);
  transition: color 0.2s ease, border-color 0.2s ease;
  margin-left: 6px;
}
.form-bottom .switch a:hover { color: var(--warm); border-color: var(--warm); }

/* responsive */
@media (max-width: 960px) {
  .page-shell { grid-template-columns: 1fr; }
  .stage { min-height: 360px; padding: 80px 24px 60px; border-right: none; border-bottom: 1px solid var(--rule); }
  .form-panel { padding: 20px 22px 28px; }
  .form-wrap { padding: 24px 0; }
  .row-2 { grid-template-columns: 1fr; }
  .providers { grid-template-columns: 1fr 1fr 1fr; }
}
/* ── top-bar controls (theme + lang) shared between pages ── */
.top-controls { display: inline-flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 34px; height: 34px;
  display: inline-grid; place-items: center;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}
.icon-btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.icon-btn svg { width: 14px; height: 14px; }
[data-theme="light"] .icon-btn .ic-moon { display: none; }
[data-theme="dark"]  .icon-btn .ic-sun  { display: none; }

.lang-menu { position: relative; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 11px;
  background: transparent; color: var(--ink);
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  cursor: pointer; font: inherit;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  transition: all 0.2s ease;
}
.lang-trigger:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.lang-trigger svg { width: 12px; height: 12px; }
.lang-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 6px;
  display: none;
  box-shadow: var(--shadow-card);
  z-index: 60;
}
[dir="rtl"] .lang-pop { right: auto; left: 0; }
.lang-pop.open { display: block; }
.lang-pop button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  color: var(--ink);
  border: none; border-radius: 9px;
  font: inherit; font-size: 13px;
  cursor: pointer;
  text-align: inherit;
}
.lang-pop button:hover { background: var(--bg-3); }
.lang-pop button .code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.16em;
  color: var(--ink-dim);
}
.lang-pop button.active,
.lang-pop button.active .code { color: var(--warm); }

/* RTL flips */
[dir="rtl"] .page-shell { grid-template-columns: 1fr 1.05fr; }
[dir="rtl"] .stage { border-right: none; border-left: 1px solid var(--rule); }
[dir="rtl"] .form-top a.home,
[dir="rtl"] .form-top { direction: rtl; }
[dir="rtl"] .input-row .adornment { right: auto; left: 14px; }
[dir="rtl"] .btn-primary .arrow,
[dir="rtl"] .form-bottom .switch a::after { transform: scaleX(-1); }
[dir="rtl"] .act-eyebrow::before { margin-left: 0; }
[dir="rtl"] .check { grid-template-columns: 1fr 18px; }
[dir="rtl"] .check input { order: 2; }

@media (max-width: 960px) {
  [dir="rtl"] .stage { border-left: none; border-bottom: 1px solid var(--rule); }
}
