/* Shared styles for the public login / preview pages (same palette as index.html). */
:root[data-theme="dark"] {
  --bg:#0a0b0d; --panel:#111318; --line:#1f232b; --text:#d7dbe2; --muted:#7d8592;
  --green:#22e07a; --red:#ff3b3b; --accent:#4da3ff; --header-bg:#0d0f12;
  --err-bg:#3a0f0f; --err-text:#ff6b6b; --err-border:#6b2020;
  --ok-bg:#0f2a1a; --ok-text:#22e07a; --ok-border:#1d5a36;
}
:root[data-theme="light"] {
  --bg:#ECEFF3; --panel:#F6F8FA; --line:#D3D9E1; --text:#1F2328; --muted:#555E69;
  --green:#147346; --red:#BC3636; --accent:#0B5CB8; --header-bg:#E3E7ED;
  --err-bg:#F3DEDF; --err-text:#7A1F26; --err-border:#E4B9BC;
  --ok-bg:#DCEDE3; --ok-text:#0F5132; --ok-border:#B1D3BF;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:14px/1.5 Inter,system-ui,-apple-system,Segoe UI,sans-serif; transition:background-color .2s,color .2s; min-height:100vh; }
header { display:flex; align-items:center; gap:18px; padding:10px 18px; border-bottom:1px solid var(--line); background:var(--header-bg); }
.title { font-weight:700; letter-spacing:.3px; color:var(--text); text-decoration:none; }
.spacer { margin-left:auto; display:flex; gap:10px; align-items:center; }
.theme-selector { display:flex; gap:4px; border:1px solid var(--line); border-radius:6px; padding:2px; background:var(--panel); }
.theme-btn { background:transparent; border:none; color:var(--muted); padding:4px 10px; border-radius:4px; cursor:pointer; font-size:12px; font-weight:600; }
.theme-btn.active { background:var(--accent); color:#fff; }
.theme-btn:hover:not(.active) { color:var(--text); }
.btn { display:inline-block; background:var(--accent); color:#fff; border:none; border-radius:6px; padding:9px 18px; font-weight:600; font-size:14px; cursor:pointer; text-decoration:none; }
.btn:hover { filter:brightness(1.15); }
.btn:disabled { opacity:.5; cursor:wait; }
.btn.ghost { background:transparent; color:var(--accent); border:1px solid var(--line); }
.linkbtn { background:none; border:none; color:var(--accent); cursor:pointer; padding:0; font:inherit; text-decoration:underline; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:22px; }
.auth-wrap { max-width:400px; margin:48px auto; padding:0 16px; }
.tabs { display:flex; gap:4px; margin-bottom:18px; }
.tab { flex:1; background:transparent; border:1px solid var(--line); color:var(--muted); padding:8px; border-radius:6px; cursor:pointer; font-weight:600; font-size:14px; }
.tab.active { color:var(--text); border-color:var(--accent); background:color-mix(in srgb,var(--accent) 15%,transparent); }
label { display:block; color:var(--muted); font-size:12px; margin:12px 0 4px; }
input { width:100%; background:var(--bg); color:var(--text); border:1px solid var(--line); border-radius:6px; padding:9px 10px; font-size:14px; }
input:focus { outline:none; border-color:var(--accent); }
.row { display:flex; gap:10px; align-items:center; margin-top:18px; flex-wrap:wrap; }
.msg { display:none; margin-top:14px; padding:8px 12px; border-radius:6px; font-size:13px; }
.msg.err { display:block; background:var(--err-bg); color:var(--err-text); border:1px solid var(--err-border); }
.msg.ok { display:block; background:var(--ok-bg); color:var(--ok-text); border:1px solid var(--ok-border); }
.muted { color:var(--muted); font-size:12px; }
.hidden { display:none !important; }
/* preview */
.hero { max-width:900px; margin:48px auto 24px; padding:0 18px; text-align:center; }
.hero h1 { font-size:30px; margin:0 0 10px; }
.hero p { color:var(--muted); font-size:16px; margin:0 auto 22px; max-width:640px; }
.features { max-width:900px; margin:0 auto 30px; padding:0 18px; display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; }
.features .card h3 { margin:0 0 6px; font-size:14px; }
.features .card p { margin:0; color:var(--muted); font-size:13px; }
.mock-chart { max-width:900px; height:220px; margin:0 auto 40px; border-radius:10px; border:1px solid var(--line); position:relative; overflow:hidden;
  background:repeating-linear-gradient(90deg, color-mix(in srgb,var(--green) 25%,transparent) 0 18px, transparent 18px 26px, color-mix(in srgb,var(--red) 20%,transparent) 26px 40px, transparent 40px 52px);
  filter:blur(6px); opacity:.55; }
.lock { text-align:center; margin:-150px auto 120px; position:relative; }

/* ===== /auth page (StockGamePlan sign-in / register) ===== */
.sgp-auth [hidden] { display:none !important; }
.sgp-auth-body { min-height:100vh; background:
  radial-gradient(900px 480px at 50% -120px, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--bg); }
.sgp-topbar { display:flex; justify-content:flex-end; align-items:center; gap:10px; padding:12px 18px; }
.sgp-auth { max-width:440px; margin:0 auto; padding:8px 16px 40px; display:flex; flex-direction:column; align-items:center; }
.sgp-brand { display:inline-flex; align-items:center; gap:10px; color:var(--text); text-decoration:none; font-size:20px; font-weight:700; letter-spacing:.2px; margin-top:12px; }
.sgp-brand img { width:34px; height:34px; border-radius:9px; }
.sgp-brand b { color:var(--accent); font-weight:800; }
.sgp-tagline { margin:8px 0 22px; color:var(--muted); font-size:13px; text-align:center; max-width:360px; }
.sgp-card { width:100%; background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:26px 26px 20px;
  box-shadow:0 18px 50px rgba(0,0,0,.28); }
:root[data-theme="light"] .sgp-card { box-shadow:0 14px 40px rgba(16,24,40,.08); }
.sgp-tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; border:1px solid var(--line); border-radius:10px; background:var(--bg); margin-bottom:20px; }
.sgp-tab { background:transparent; border:0; border-radius:7px; padding:8px; color:var(--muted); font-family:inherit; font-weight:600; font-size:14px; line-height:1.2; cursor:pointer; }
.sgp-tab.active { background:var(--panel); color:var(--text); box-shadow:0 1px 0 var(--line), 0 0 0 1px var(--line); }
.sgp-tab:focus-visible, .sgp-btn:focus-visible, .sgp-google:focus-visible, .sgp-link:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.sgp-panel { display:none; }
.sgp-panel.active { display:block; animation:sgpIn .18s ease-out; }
@keyframes sgpIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.sgp-panel h1 { font-size:22px; line-height:1.25; margin:0 0 6px; text-align:center; color:var(--text); }
.sgp-sub { color:var(--muted); font-size:13px; text-align:center; margin:0 0 18px; }
.sgp-icon { font-size:34px; text-align:center; margin-bottom:6px; }
.sgp-google { width:100%; display:flex; align-items:center; justify-content:center; gap:10px; padding:10px 14px; border-radius:9px;
  border:1px solid var(--line); background:var(--bg); color:var(--text); font-family:inherit; font-weight:600; font-size:14px; cursor:pointer; transition:border-color .15s, background .15s; }
.sgp-google:hover { border-color:var(--accent); }
.sgp-google:disabled { opacity:.6; cursor:wait; }
.sgp-divider { display:flex; align-items:center; gap:12px; margin:18px 0 6px; color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.sgp-divider::before, .sgp-divider::after { content:""; flex:1; height:1px; background:var(--line); }
.sgp-field { margin-top:14px; }
.sgp-field label, .sgp-label-row label { display:block; margin:0 0 6px; font-size:12px; font-weight:600; color:var(--muted); }
.sgp-label-row { display:flex; justify-content:space-between; align-items:baseline; }
.sgp-field input { width:100%; padding:11px 12px; border-radius:9px; border:1px solid var(--line); background:var(--bg); color:var(--text); font-size:14px; }
.sgp-field input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.sgp-pw { position:relative; }
.sgp-pw input { padding-right:42px; }
.sgp-pw-toggle { position:absolute; right:6px; top:50%; transform:translateY(-50%); width:32px; height:32px; border:0; background:transparent; color:var(--muted); cursor:pointer; border-radius:6px; }
.sgp-pw-toggle svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; }
.sgp-pw-toggle .eye-closed { display:none; }
.sgp-pw-toggle.on .eye-closed { display:inline; } .sgp-pw-toggle.on .eye-open { display:none; }
.sgp-help { display:block; margin-top:6px; color:var(--muted); font-size:11.5px; }
.sgp-meter { display:grid; grid-template-columns:repeat(4,1fr); gap:4px; margin-top:8px; }
.sgp-meter i { height:4px; border-radius:2px; background:var(--line); transition:background .2s; }
.sgp-meter[data-score="1"] i:nth-child(-n+1) { background:var(--red); }
.sgp-meter[data-score="2"] i:nth-child(-n+2) { background:#f5a524; }
.sgp-meter[data-score="3"] i:nth-child(-n+3) { background:#9acd32; }
.sgp-meter[data-score="4"] i { background:var(--green); }
.sgp-check { display:flex; gap:9px; align-items:flex-start; margin:16px 0 0; font-size:12.5px; color:var(--muted); line-height:1.45; cursor:pointer; }
.sgp-check input { width:16px; height:16px; margin:1px 0 0; accent-color:var(--accent); flex:0 0 auto; }
.sgp-check a, .sgp-legal a { color:var(--accent); text-decoration:underline; text-underline-offset:2px; }
.sgp-captcha { margin-top:14px; min-height:65px; }
.sgp-hp { position:absolute !important; left:-10000px !important; top:auto; width:1px; height:1px; overflow:hidden; }
.sgp-btn { width:100%; margin-top:18px; padding:11px 14px; border:0; border-radius:9px; background:var(--accent); color:#fff; font-family:inherit; font-weight:700; font-size:14px; cursor:pointer; transition:filter .15s; }
.sgp-btn:hover { filter:brightness(1.1); }
.sgp-btn:disabled { opacity:.6; cursor:wait; }
.sgp-btn.loading span::after { content:" …"; }
.sgp-link { background:none; border:0; padding:0; color:var(--accent); font-family:inherit; font-weight:600; font-size:12.5px; cursor:pointer; }
.sgp-link:hover { text-decoration:underline; }
.sgp-link:disabled { color:var(--muted); cursor:default; text-decoration:none; }
.sgp-captcha-quiet { min-height:0; margin-top:0; }
.sgp-captcha-quiet.interactive { min-height:65px; margin-top:14px; }
.sgp-row { display:flex; justify-content:space-between; gap:10px; margin-top:12px; flex-wrap:wrap; }
.sgp-switch { text-align:center; margin:16px 0 0; font-size:12.5px; color:var(--muted); }
.sgp-existing { margin:18px 0 0; padding-top:14px; border-top:1px solid var(--line); text-align:center; font-size:12.5px; color:var(--muted); }
.sgp-existing p { margin:0 0 8px; line-height:1.5; }
.sgp-existing-links { display:flex; justify-content:center; flex-wrap:wrap; gap:6px 16px; }
.sgp-msg { display:none; margin-top:14px; padding:9px 12px; border-radius:8px; font-size:13px; line-height:1.45; }
.sgp-msg.err { display:block; background:var(--err-bg); color:var(--err-text); border:1px solid var(--err-border); }
.sgp-msg.ok { display:block; background:var(--ok-bg); color:var(--ok-text); border:1px solid var(--ok-border); }
.sgp-legal { margin:18px 0 0; padding:10px 12px; border-radius:9px; border:1px solid var(--line); background:color-mix(in srgb, var(--accent) 6%, transparent);
  color:var(--muted); font-size:11.5px; line-height:1.5; text-align:center; }
.sgp-foot { color:var(--muted); font-size:11px; margin:16px 0 0; text-align:center; }
.sgp-spinner { width:34px; height:34px; margin:6px auto 14px; border-radius:50%; border:3px solid var(--line); border-top-color:var(--accent); animation:sgpSpin .8s linear infinite; }
@keyframes sgpSpin { to { transform:rotate(360deg); } }
@media (max-width:480px) {
  .sgp-topbar { padding:10px 12px; }
  .sgp-topbar .theme-btn { padding:4px 7px; }
  .sgp-card { padding:20px 16px 16px; border-radius:14px; }
  .sgp-panel h1 { font-size:20px; }
}

/* Referral invite note (register panel, shown when a valid referral click is remembered) */
.sgp-ref-note { margin:-4px 0 14px; padding:8px 12px; border-radius:8px; font-size:13px; line-height:1.45; background:var(--ok-bg); color:var(--ok-text); border:1px solid var(--ok-border); }
.sgp-ref-note[hidden] { display:none; }
