/* PointsRadar — auth pages (login, register, verify, password reset).
   Shared so the five pages stop carrying five copies of the same tokens.
   Theme follows the app: dark by default, light when the visitor has chosen it
   (or when Auto resolves that way). A tiny inline script sets html.light before
   first paint; see auth-theme in each page's <head>. */

:root {
  --red: #FF4438; --red-dark: #D6001C; --gold: #C9A84C; --brand-tld: #9A918F;
  --bg: #0D0D0D; --card: #161616; --raised: #1A1A1A;
  --border: rgba(255,255,255,0.08);
  --text: #E8E2DA; --cream: #F5F0EA; --muted: #6B6560;
  --input-bg: rgba(255,255,255,0.04);
  --bg-grad-1: rgba(214,0,28,0.14); --bg-grad-2: rgba(201,168,76,0.05);
  --success: #3DBA78;
}
html.light {
  --red: #D6001C; --red-dark: #A8001A; --brand-tld: #8A8482;
  --bg: #F4F1ED; --card: #FFFFFF; --raised: #F7F4F0;
  --border: rgba(0,0,0,0.09);
  --text: #1A1714; --cream: #1A1714; --muted: #8A837C;
  --input-bg: rgba(0,0,0,0.03);
  --bg-grad-1: rgba(214,0,28,0.06); --bg-grad-2: rgba(201,168,76,0.05);
  --success: #2E8B57;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--bg-grad-1) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 90% 80%, var(--bg-grad-2) 0%, transparent 50%);
}
.container { position: relative; z-index: 1; width: 100%; max-width: 430px; padding: 24px; }

/* Brand now sits inside the card, at its own scale rather than as a banner. */
.logo { display: flex; align-items: center; gap: 9px; margin-bottom: 26px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: block; flex-shrink: 0; }
.brand-lockup { display: flex; align-items: baseline; gap: 5px; }
.brand-name { font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-size: 1.15rem;
  font-weight: 700; letter-spacing: -0.3px; color: var(--cream); }
.brand-accent { color: var(--red); }
.brand-tld { font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-size: 0.6rem;
  font-weight: 500; letter-spacing: 0.22em; color: var(--brand-tld); }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 30px 30px 26px;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 12% 0%, var(--bg-grad-1) 0%, transparent 62%);
}
.card > * { position: relative; }
.card-title { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; line-height: 1.05;
  letter-spacing: 0.06em; color: var(--cream); margin-bottom: 7px; }
.card-sub { font-size: 0.82rem; color: var(--muted); margin-bottom: 22px; line-height: 1.5; }
.card-text { font-size: 0.86rem; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }

/* The label lives inside the field box, above the input. */
.field { position: relative; display: block; background: var(--input-bg);
  border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px 9px; margin-bottom: 12px;
  transition: border-color .18s ease, background .18s ease; }
.field:focus-within { border-color: var(--red); background: var(--input-focus, var(--input-bg)); }
.field label { display: block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1px; }
.field input, .field select {
  background: none; border: none; outline: none; width: 100%; padding: 0;
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.95rem;
}
.field input::placeholder { color: var(--muted); }
/* Chrome paints its own autofill background straight over the field. */
.field input:-webkit-autofill { -webkit-text-fill-color: var(--text);
  transition: background-color 5000s ease-in-out 0s; }
.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.name-row .field { margin-bottom: 12px; }

.field-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--muted); font-size: 1rem;
  padding: 6px; line-height: 1; }
.field-eye:hover { color: var(--cream); }
.field.has-eye input { padding-right: 28px; }

.right-link { text-align: right; margin: -2px 0 16px; }
.right-link a { color: var(--red); font-size: 0.78rem; font-weight: 500; text-decoration: none; }
.right-link a:hover { text-decoration: underline; }

.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 14px; border: none; border-radius: 999px;
  font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 700;
  cursor: pointer; transition: background .2s, box-shadow .2s, transform .2s; margin-top: 6px;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(214,0,28,0.28); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary { background: var(--input-bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--raised); }

/* The quiet line under the button that says what happens next. */
.hint { margin-top: 14px; background: var(--raised); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 14px; font-size: 0.76rem; color: var(--muted); line-height: 1.5; }

.msg { padding: 11px 15px; border-radius: 10px; font-size: 0.82rem;
  margin-bottom: 16px; display: none; line-height: 1.5; }
.msg.error   { background: rgba(214,0,28,0.10); border: 1px solid rgba(214,0,28,0.30); color: #ff8080; }
.msg.success { background: rgba(61,186,120,0.10); border: 1px solid rgba(61,186,120,0.30); color: var(--success); }
.msg.info    { background: rgba(201,168,76,0.10); border: 1px solid rgba(201,168,76,0.30); color: var(--gold); }
.msg.show { display: block; }

.footer-link { text-align: center; margin-top: 18px; font-size: 0.8rem; color: var(--muted); }
.footer-link a { color: var(--red); text-decoration: none; font-weight: 700; }
.footer-link a:hover { text-decoration: underline; }

.divider { height: 1px; background: var(--border); margin: 20px 0; }

.resend-wrap { text-align: center; display: none; }
.resend-wrap.show { display: block; }
.resend-btn, .text-link {
  background: none; border: none; color: var(--gold); font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem; cursor: pointer; text-decoration: underline; padding: 0;
}
.resend-btn:hover, .text-link:hover { color: var(--cream); }
.back-btn { background: none; border: none; color: var(--muted); font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem; cursor: pointer; padding: 0; display: flex; align-items: center;
  gap: 4px; margin-bottom: 16px; }
.back-btn:hover { color: var(--cream); }

/* Multi-step flows (login MFA, register success) */
.step { display: none; }
.step.active { display: block; }
.otp-input { text-align: center; font-size: 1.6rem !important; letter-spacing: 0.3em; font-weight: 600; }
.qr-wrap { text-align: center; margin: 16px 0; }
.qr-wrap img { border-radius: 10px; border: 3px solid var(--border); background: #fff; }
.secret-box { background: var(--input-bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; font-family: monospace; font-size: 0.85rem; letter-spacing: 0.1em;
  text-align: center; word-break: break-all; color: var(--muted); margin-bottom: 16px; }
.backup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.backup-code { background: var(--input-bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px; font-family: monospace; font-size: 0.9rem; text-align: center;
  letter-spacing: 0.1em; color: var(--cream); }

/* Register password rules + success screen */
.pw-rules { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: -2px 0 14px; }
.pw-rule { display: flex; align-items: center; gap: 6px; font-size: 0.74rem; color: var(--muted); }
.pw-rule .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); flex: none; }
.pw-rule.pass { color: var(--success); }
.pw-rule.pass .dot { background: var(--success); }
.success-screen { display: none; text-align: center; }
.success-screen.show { display: block; }
.success-icon { font-size: 2.4rem; color: var(--success); margin-bottom: 10px; }
.success-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.7rem; letter-spacing: 0.06em;
  color: var(--cream); margin-bottom: 8px; }
.success-text { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }
.success-email { color: var(--cream); font-weight: 700; }

/* verify.html */
.state { display: none; text-align: center; }
.state.show { display: block; }
.icon { font-size: 2.6rem; margin-bottom: 12px; }
.spinner { width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* The mark has a dark-background and a light-background cut. */
.dark-only  { display: block; }
.light-only { display: none; }
html.light .dark-only  { display: none; }
html.light .light-only { display: block; }
