/* =================================================================
   Cali Fit Lab — "Iron & Chalk" shared web stylesheet
   Dark-first. Light via prefers-color-scheme.
   Tokens mirror the iOS app's DesignSystem exactly.
   ================================================================= */

:root {
  --bg:        #181B1F;
  --surface:   #242A31;
  --surface-2: #2E353D;
  --surface-3: #343B44;
  --text:      #ECEEF1;
  --text-2:    #B4BAC2;
  --text-3:    #8B929B;
  --accent:    #2C63D6;
  --accent-16: rgba(44,99,214,.16);
  --accent-10: rgba(44,99,214,.10);
  --green:     #3EC18A;
  --green-16:  rgba(62,193,138,.16);
  --amber:     #E6A93A;
  --red:       #E5484D;
  --red-12:    rgba(229,72,77,.12);
  --border:    rgba(255,255,255,.10);
  --shadow-accent: 0 6px 18px rgba(44,99,214,.35);
  --radius-btn:   6px;
  --radius-input: 8px;
  --radius-card:  16px;
  --font: -apple-system, system-ui, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg:#EBEEF1; --surface:#FFFFFF; --surface-2:#E1E6EB; --surface-3:#D6DCE2;
    --text:#171A1F; --text-2:#4C535B; --text-3:#7E858D;
    --accent:#2456CC; --green:#12A166; --amber:#C6851A; --red:#D5383D;
    --border:rgba(0,0,0,.10); --red-12:rgba(213,56,61,.10);
    --shadow-accent: 0 6px 18px rgba(36,86,204,.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Brand / Logo ─────────────────────────────────────────────── */
.brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; }
.logo-wrap {
  background: #fff; border-radius: 14px; padding: 10px 18px;
  display: inline-flex; align-items: center; justify-content: center;
}
.logo-wrap img { height: 52px; width: auto; display: block; }

/* ── Typography ───────────────────────────────────────────────── */
.title {
  font-size: 30px; font-weight: 900; text-transform: uppercase;
  letter-spacing: -.03em; line-height: .95; margin: 0; text-align: center;
}
.subtitle {
  color: var(--text-2); font-size: 14px; text-align: center; margin: 8px 0 24px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-3);
}
.eyebrow .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}

/* ── Auth page layout ─────────────────────────────────────────── */
.page-auth {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 24px;
}
.card {
  width: 100%; max-width: 440px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 28px 24px 30px;
}

/* ── Fields ───────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field > label {
  display: block; font-size: 11px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 7px;
}
.field .input-wrap { position: relative; }
.field input {
  width: 100%; background: var(--surface-2);
  border: 1.5px solid transparent; border-radius: var(--radius-input);
  color: var(--text); font-size: 16px; padding: 14px;
  font-family: inherit; outline: none;
}
.field input:focus { border-color: var(--accent); }
.field input::placeholder { color: var(--text-3); }
.field .toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--text-3); cursor: pointer;
  font-size: 13px; font-weight: 700; padding: 6px; font-family: inherit;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: block; width: 100%; border: 0; cursor: pointer; font-family: inherit;
  background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 14px 20px; border-radius: var(--radius-btn);
  box-shadow: var(--shadow-accent); margin-top: 6px;
  text-align: center; text-decoration: none; transition: filter .15s;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; color: #fff; }
.btn:disabled { opacity: .5; box-shadow: none; cursor: default; filter: none; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border); box-shadow: none;
}
.btn-ghost:hover { color: var(--text); background: var(--surface-3); }

/* ── Password requirement pills ───────────────────────────────── */
.reqs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.req {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border);
}
.req.ok { background: var(--green-16); color: var(--green); border-color: transparent; }

/* ── Inline messages ──────────────────────────────────────────── */
.error { color: var(--red); font-size: 13px; font-weight: 600; text-align: center; margin: 10px 0 4px; }

/* ── Result / success / error states ─────────────────────────── */
.result { text-align: center; }
.badge {
  width: 66px; height: 66px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto 18px;
}
.badge.ok  { background: var(--green-16); }
.badge.err { background: var(--red-12); }
.badge svg {
  width: 30px; height: 30px; fill: none;
  stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
}
.badge.ok  svg { stroke: var(--green); }
.badge.err svg { stroke: var(--red); }

/* ── Privacy policy reading column ───────────────────────────── */
.page-doc  { max-width: 720px; margin: 0 auto; padding: 40px 20px 80px; }
.doc h2 {
  font-size: 16px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; margin: 32px 0 10px; color: var(--text);
}
.doc p              { color: var(--text-2); font-size: 15px; line-height: 1.65; margin: 0 0 10px; }
.doc ul, .doc ol    { padding-left: 20px; margin: 0 0 10px; }
.doc li             { color: var(--text-2); font-size: 15px; line-height: 1.65; margin-bottom: 6px; }
.doc li:last-child  { margin-bottom: 0; }
.doc li strong      { color: var(--text); }
.doc a              { color: var(--accent); }
.doc hr             { border: 0; border-top: 1px solid var(--border); margin: 28px 0 0; }
.doc .foot          { color: var(--text-3); font-size: 13px; margin-top: 48px; text-align: center; }
.doc .summary-card  {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: var(--radius-card);
  padding: 16px 20px; margin-bottom: 8px;
  font-size: 15px; color: var(--text-2); line-height: 1.65;
}

.hidden { display: none !important; }
