/* Shared visual framework for the FNOTrader auth pages —
   register / verify-email / forgot / reset-password.
   Extracted from web/login.html so all the pages match the
   1080×600 card, gradient banner, and dark form panel exactly.
   The login page itself still ships its own inline CSS (we
   didn't want to risk regressing that flow); changes here only
   affect the four new pages. Disclosure-modal + Google-button +
   cross-app-banner styles are intentionally omitted — they're
   login-specific and the new pages don't render them. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --page-bg: #f0f2fa;
  --left-bg-1: #0a1024;
  --left-bg-2: #1e3a8a;
  --left-bg-3: #1d4ed8;
  --right-bg: #0a0f1a;
  --right-input-bg: #eef2fb;
  --right-input-text: #0f172a;
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-green: #22c55e;
  --accent-rose: #fb7185;
}
html, body { height: 100%; font-family: var(--font); background: var(--page-bg); color: #0f172a; -webkit-font-smoothing: antialiased; }
body { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }

.auth-card {
  width: 100%; max-width: 1080px; height: 600px;
  border-radius: 18px; overflow: hidden;
  display: grid; grid-template-columns: 1.05fr 1fr;
  background: var(--right-bg);
  box-shadow: 0 30px 80px rgba(8,15,40,0.18), 0 6px 16px rgba(8,15,40,0.06);
}

/* ============== LEFT — BANNER ============== */
.auth-banner {
  position: relative; padding: 38px 40px; color: #e6eeff;
  background:
    radial-gradient(720px 320px at 90% -10%, rgba(59,130,246,0.55), transparent 60%),
    radial-gradient(620px 320px at -10% 110%, rgba(34,211,238,0.42), transparent 60%),
    linear-gradient(150deg, var(--left-bg-1) 0%, var(--left-bg-2) 50%, var(--left-bg-3) 100%);
  overflow: hidden; display: flex; flex-direction: column; isolation: isolate;
}
.auth-banner::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 18% 28%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1px 1px at 70% 18%, rgba(165,243,252,0.70), transparent 60%),
    radial-gradient(1px 1px at 36% 82%, rgba(196,181,253,0.65), transparent 60%),
    radial-gradient(1px 1px at 88% 64%, rgba(253,224,71,0.55), transparent 60%);
  z-index: 0; pointer-events: none;
}
.auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-brand-logo { width: 36px; height: 36px; border-radius: 8px; background: white; padding: 4px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(34,211,238,0.4); }
.auth-brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.auth-brand-name { display: inline-flex; flex-direction: column; line-height: 1.05; }
.auth-brand-name .top { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.2px; color: #ffffff; }
.auth-brand-name .top .fno { color: #67e8f9; }
.auth-brand-name .top sup { font-size: 0.55rem; opacity: 0.6; font-weight: 700; margin-left: 2px; }
.auth-brand-name .sub { font-size: 0.62rem; color: rgba(232,239,255,0.75); letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600; margin-top: 2px; }

.auth-headline-eyebrow { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: linear-gradient(120deg, #fbbf24, #f59e0b); color: #1c1005;
  box-shadow: 0 4px 14px rgba(251,191,36,0.38); margin-bottom: 14px; align-self: flex-start; }
.auth-headline-eyebrow::before { content: "⬡"; font-size: 0.75rem; }

.auth-headline { position: relative; z-index: 1; font-size: 1.7rem; font-weight: 900;
  line-height: 1.18; letter-spacing: -0.5px; color: #ffffff; margin-bottom: 10px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.25); }
.auth-headline .grad { background: linear-gradient(120deg, #67e8f9 0%, #c4b5fd 50%, #fde047 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-sub { position: relative; z-index: 1; font-size: 0.82rem; font-weight: 500; line-height: 1.55;
  color: rgba(232,239,255,0.85); max-width: 420px; margin-bottom: 20px; }

/* Single feature card used by the non-login pages instead of the
   rotating USP carousel. Keeps the banner visually anchored without
   needing 5 SVG illustrations per page. Same card shell as .usp-card. */
.banner-feature {
  position: relative; z-index: 1;
  flex: 1 1 auto;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; overflow: hidden;
  margin-bottom: 18px;
}
.banner-feature-art { flex: 0 0 42%;
  background: linear-gradient(160deg, rgba(10,16,36,0.88) 0%, rgba(10,16,36,0.58) 100%);
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; padding: 18px; overflow: hidden;
}
.banner-feature-art svg { width: 100%; height: 100%; max-height: 240px; }
.banner-feature-text { flex: 1 1 auto; padding: 20px 22px;
  display: flex; flex-direction: column; min-width: 0; }
.banner-feature-num { font-size: 0.62rem; font-weight: 800; letter-spacing: 1.4px; color: #fde047; margin-bottom: 8px; }
.banner-feature-title { font-size: 1.05rem; font-weight: 800; color: #ffffff; line-height: 1.22; margin-bottom: 8px; }
.banner-feature-pain { font-size: 0.78rem; color: rgba(232,239,255,0.82); line-height: 1.45; margin-bottom: 14px; }
.banner-feature-proofs { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.banner-feature-proofs li { position: relative; padding-left: 16px; font-size: 0.75rem; line-height: 1.4; color: rgba(232,239,255,0.92); }
.banner-feature-proofs li::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent-green); box-shadow: 0 0 0 2px rgba(34,197,94,0.18); }
.banner-feature-proofs li b { color: #ffffff; font-weight: 700; }

/* ============== RIGHT — FORM PANEL ============== */
.auth-form-panel { padding: 32px 44px; background: var(--right-bg); color: #e2e8f0;
  display: flex; flex-direction: column; justify-content: flex-start;
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(148,163,184,0.25) transparent; }
.auth-form-panel::-webkit-scrollbar { width: 6px; }
.auth-form-panel::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.25); border-radius: 3px; }

/* Mobile-only brand. Reveals when the left banner is hidden by the
   ≤880 px media query. */
.auth-mobile-brand { display: none; }
.auth-form-title { font-size: 1.3rem; font-weight: 800; color: #ffffff; margin-bottom: 2px; }
.auth-form-sub { font-size: 0.78rem; font-weight: 500; color: #94a3b8; margin-bottom: 22px; line-height: 1.5; }

.field-group { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-label { display: block; font-size: 0.6rem; font-weight: 800; letter-spacing: 1.4px;
  text-transform: uppercase; color: #94a3b8; margin-bottom: 6px; }

/* Inline info icon next to a field label — hover/focus pops a small
   neutral tooltip with the text from data-tip. Plain CSS, no JS, no
   external dep. The icon is keyboard-focusable so the tooltip is
   reachable with the tab key too. */
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border-radius: 50%;
  background: rgba(96,165,250,0.20);
  color: #93c5fd;
  font-size: 9px;
  font-weight: 800;
  font-style: normal;
  letter-spacing: 0;
  cursor: help;
  vertical-align: 1px;
  position: relative;
  transition: background 0.12s, color 0.12s;
}
.info-icon:hover, .info-icon:focus {
  background: rgba(96,165,250,0.35);
  color: #dbeafe;
  outline: none;
}
.info-icon::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-transform: none;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(96,165,250,0.30);
  box-shadow: 0 4px 14px rgba(0,0,0,0.30);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  z-index: 10;
}
.info-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0f172a;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  z-index: 10;
}
.info-icon:hover::after, .info-icon:focus::after,
.info-icon:hover::before, .info-icon:focus::before {
  opacity: 1;
}
.field-input { width: 100%; padding: 12px 15px; background: var(--right-input-bg);
  color: var(--right-input-text); border: 1px solid rgba(148,163,184,0.20); border-radius: 10px;
  font: 500 0.92rem var(--font); outline: none; transition: border-color .15s, box-shadow .15s; }
.field-input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 4px rgba(37,99,235,0.18); }
.field-input.otp { letter-spacing: 8px; font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 1.15rem; text-align: center; }

.field-row-helper { display: flex; justify-content: space-between; align-items: center;
  font-size: 0.72rem; color: #94a3b8; margin-top: 8px; }
.field-row-helper a { color: #60a5fa; text-decoration: none; }
.field-row-helper a:hover { text-decoration: underline; }

.btn-primary { width: 100%; padding: 12px 16px; margin-top: 10px;
  background: var(--accent-blue); color: #ffffff; font: 700 0.92rem var(--font);
  letter-spacing: 0.2px; border: none; border-radius: 10px; cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 8px 22px rgba(37,99,235,0.35); }
.btn-primary:hover { background: var(--accent-blue-hover); transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37,99,235,0.45); }
.btn-primary:disabled { opacity: 0.55; cursor: wait; transform: none; }

.auth-foot { margin-top: 18px; font-size: 0.78rem; color: #94a3b8; text-align: center; }
.auth-foot a { color: #60a5fa; text-decoration: none; font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

/* Inline alert (error / notice / success) shown below the submit
   button. Three colour variants matched to login.html so the family
   feels consistent. */
.auth-alert { display: none; margin-top: 16px; padding: 10px 14px;
  background: rgba(248,113,113,0.10); border: 1px solid rgba(248,113,113,0.30);
  color: #fca5a5; border-radius: 8px; font-size: 0.82rem; font-weight: 500;
  text-align: center; line-height: 1.4; }
.auth-alert.notice { background: rgba(251,146,60,0.10); border-color: rgba(251,146,60,0.35); color: #fdba74; }
.auth-alert.success { background: rgba(34,197,94,0.10); border-color: rgba(34,197,94,0.30); color: #86efac; }

/* ── Trial-activated modal ─────────────────────────────────────────
   Pops over login/verify pages when the API returns
   trial_activated:true. Uses the same FNOTrader theme as the auth
   cards (rich gradient + glass effect). Auto-redirects to /index.html
   after a short delay; primary CTA "Open app" + secondary "View plans"
   override the timer when clicked. */
.trial-modal-bg {
  position: fixed; inset: 0;
  background: rgba(8, 15, 40, 0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center; justify-content: center;
  padding: 16px;
  animation: trial-fade-in 0.2s ease-out;
}
.trial-modal-bg.show { display: flex; }
@keyframes trial-fade-in { from { opacity: 0; } to { opacity: 1; } }

.trial-modal {
  width: 100%; max-width: 460px;
  border-radius: 18px;
  background:
    radial-gradient(620px 280px at 90% -20%, rgba(59,130,246,0.45), transparent 60%),
    radial-gradient(520px 280px at -10% 110%, rgba(34,211,238,0.35), transparent 60%),
    linear-gradient(150deg, #0a1024 0%, #1e3a8a 50%, #1d4ed8 100%);
  color: #e6eeff;
  padding: 32px 30px 26px;
  box-shadow: 0 30px 80px rgba(8,15,40,0.55);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: trial-pop-in 0.28s cubic-bezier(0.16, 1.06, 0.46, 1.13);
}
@keyframes trial-pop-in {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.trial-modal::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 18% 28%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1px 1px at 70% 18%, rgba(165,243,252,0.70), transparent 60%),
    radial-gradient(1px 1px at 36% 82%, rgba(196,181,253,0.65), transparent 60%);
  z-index: 0; pointer-events: none;
}
.trial-modal-confetti {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(253,224,71,0.65), rgba(245,158,11,0.30) 60%, transparent 80%);
  border: 2px solid rgba(253,224,71,0.55);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  position: relative; z-index: 1;
}
.trial-modal-head {
  position: relative; z-index: 1;
  font-size: 1.35rem; font-weight: 900; color: #ffffff; text-align: center;
  margin-bottom: 6px; letter-spacing: -0.3px;
}
.trial-modal-head .grad {
  background: linear-gradient(120deg, #67e8f9 0%, #c4b5fd 50%, #fde047 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.trial-modal-sub {
  position: relative; z-index: 1;
  font-size: 0.88rem; line-height: 1.5; color: rgba(232,239,255,0.85);
  text-align: center; margin-bottom: 16px;
}
.trial-modal-strip {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: rgba(232,239,255,0.78);
  margin-bottom: 18px;
}
.trial-modal-strip b { color: #fde047; font-family: 'JetBrains Mono', monospace; font-weight: 800; }
.trial-modal-cta {
  position: relative; z-index: 1;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.trial-modal-cta .btn-primary { flex: 2 1 auto; padding: 11px 16px; }
.trial-modal-cta .btn-secondary {
  flex: 1 1 auto;
  background: transparent; color: rgba(232,239,255,0.85);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 11px 14px; border-radius: 10px;
  font: 600 0.88rem var(--font); cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.12s, border-color 0.12s;
}
.trial-modal-cta .btn-secondary:hover {
  background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.40);
}
.trial-modal-countdown {
  position: relative; z-index: 1;
  margin-top: 12px; text-align: center;
  font-size: 0.74rem; color: rgba(232,239,255,0.55);
}
.trial-modal-countdown b { color: #67e8f9; font-family: 'JetBrains Mono', monospace; }

.auth-progress { display: flex; gap: 6px; margin-bottom: 18px; }
.auth-progress-step {
  flex: 1; height: 3px; border-radius: 2px;
  background: rgba(148,163,184,0.18);
}
.auth-progress-step.active { background: var(--accent-blue); }
.auth-progress-step.done   { background: var(--accent-green); }

/* ============== RESPONSIVE ============== */
@media (max-width: 880px) {
  html, body { height: auto; min-height: 100%; }
  body { padding: 16px 10px; align-items: flex-start; }
  .auth-card { grid-template-columns: 1fr; max-width: 480px; height: auto; min-height: 0; }
  .auth-form-panel { padding: 28px 22px; justify-content: flex-start; }
  .auth-banner { display: none; }
  .auth-mobile-brand {
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 18px; margin-bottom: 18px;
    border-bottom: 1px solid rgba(148,163,184,0.18);
  }
  .auth-mobile-brand .auth-brand-logo { width: 32px; height: 32px; border-radius: 7px; background: white; padding: 3px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(34,211,238,0.4); }
  .auth-mobile-brand .auth-brand-logo img { width: 100%; height: 100%; object-fit: contain; }
  .auth-mobile-brand .auth-brand-name { display: inline-flex; flex-direction: column; line-height: 1.05; }
  .auth-mobile-brand .top { font-size: 0.95rem; font-weight: 800; color: #ffffff; letter-spacing: 0.2px; }
  .auth-mobile-brand .top .fno { color: #67e8f9; }
  .auth-mobile-brand .top sup { font-size: 0.5rem; opacity: 0.6; font-weight: 700; margin-left: 2px; }
  .auth-mobile-brand .sub { font-size: 0.58rem; color: rgba(232,239,255,0.72);
    letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600; margin-top: 2px; }
}
@media (max-width: 480px) {
  body { padding: 10px 8px; }
  .auth-form-panel { padding: 24px 18px; }
  .field-input { font-size: 0.95rem; padding: 11px 13px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .btn-primary { padding: 13px 16px; font-size: 0.95rem; }
}
