/* =========================================================
   CAMP – Login & sign-up pages (dark)
   Shared by: login, register, verify-email, complete-signup,
   pending-approval. Mobile friendly (works in the Android app).
   ========================================================= */

:root {
  --brand: #7489FE;              /* CAMP brand blue */
  --brand-light: #A9B6FF;        /* links, small accents on dark */
  --brand-deep: #3D4FD9;         /* second background glow */
  --brand-10: rgba(116, 137, 254, 0.10);
  --brand-14: rgba(116, 137, 254, 0.14);
  --brand-35: rgba(116, 137, 254, 0.35);

  --bg: #09090C;
  --surface: rgba(20, 20, 26, 0.72);
  --field: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #F4F4F7;
  --text-2: #C4C5CF;             /* labels */
  --muted: #A6A7B3;
  --faint: #8D8F9C;

  --danger-bg: rgba(255, 107, 107, 0.10);
  --danger-line: rgba(255, 107, 107, 0.35);
  --danger-text: #FFC2C2;
  --success-bg: rgba(116, 137, 254, 0.10);

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --glow: 0.22;
  --blur: 24px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, ul, ol, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
svg { display: block; flex-shrink: 0; }
a { color: var(--brand-light); text-decoration: none; }
a:hover { color: var(--text); }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Atmosphere: glows + faint grid ---------- */
.auth {
  position: relative;
  overflow: hidden;
  overflow: clip;               /* contains the glows without breaking the sticky panel */
  min-height: 100vh;
  min-height: 100dvh;
}
.auth::before {                /* faint grid */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}
.glow { position: absolute; border-radius: 50%; pointer-events: none; opacity: var(--glow); transform: translateZ(0); }
.glow--1 { top: -220px; left: 20%; width: 620px; height: 620px; background: var(--brand); filter: blur(160px); }
.glow--2 { bottom: -260px; right: 8%; width: 560px; height: 560px; background: var(--brand-deep); filter: blur(170px); }
.glow--center { top: -260px; left: 50%; width: 760px; height: 760px; margin-left: -380px; background: var(--brand); filter: blur(170px); opacity: 0.2; }

/* ---------- Brand (the CAMP logo, dark-background version) ---------- */
.brand { display: inline-flex; align-self: flex-start; }
.brand__logo { display: block; height: 80px; width: auto; }

/* ---------- Layout A: split (Log in, Register) ---------- */
.split {
  position: relative; z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.usp {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 56px 72px 56px clamp(32px, 6vw, 88px);
  /* Stays in view while a long sign-up form scrolls past */
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
}
.usp__body { display: flex; flex-direction: column; gap: 28px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand-light);
}
.usp__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(42px, 4.2vw, 60px);
  line-height: 1;
  letter-spacing: -0.035em;
}
.usp__title span { color: var(--brand); }
.usp__lead { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 470px; }
.usp__points { max-width: 500px; border-top: 1px solid var(--line); }
.usp__points li { display: flex; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.usp__points .num { font-family: var(--font-mono); font-size: 12px; color: var(--brand); padding-top: 3px; }
.usp__points b { font-weight: 600; }
.usp__points .dim { color: var(--muted); }
.usp__foot { font-size: 13px; color: #6E7080; }

/* Small "updated from your inbox" card under the points */
.proof {
  display: flex; align-items: center; gap: 16px; align-self: flex-start;
  padding: 14px 18px 14px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.10);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.proof__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--brand-14); color: var(--brand-light); }
.proof__text { display: flex; flex-direction: column; gap: 2px; }
.proof__title { font-size: 14px; font-weight: 600; }
.proof__sub { font-size: 12px; color: var(--faint); }
.proof__old { font-size: 12px; color: #6E7080; text-decoration: line-through; margin-left: 8px; }
.proof__new { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: rgba(176, 140, 255, 0.16); color: #CDB8FF; }

.split__form { display: flex; align-items: center; justify-content: center; padding: 32px 48px; }

/* ---------- Layout B: centred (Verify, One more step, Pending) ---------- */
.centered {
  position: relative; z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
}
.topbar {
  width: 100%; max-width: 1260px;
  padding: 40px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.step-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--faint); }
.centered__main { flex-grow: 1; display: flex; align-items: center; padding: 0 20px 80px; width: 100%; justify-content: center; }

/* ---------- Card ---------- */
.card {
  width: 100%;
  max-width: 440px;
  display: flex; flex-direction: column; gap: 22px;
  padding: 44px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.card--wide { max-width: 480px; padding: 36px 40px; gap: 18px; }
.card--center { max-width: 480px; align-items: center; text-align: center; padding: 48px 44px; gap: 24px; }
.card--pending { max-width: 520px; padding: 52px 48px; gap: 28px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card { background: #141419; }
}

.card__head { display: flex; flex-direction: column; gap: 8px; }
.card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.card__title--sm { font-size: 30px; }
.card__sub { font-size: 15px; line-height: 1.55; color: var(--muted); }
.card__sub b { color: var(--text); font-weight: 600; }
.card__foot {
  display: flex; flex-direction: column; gap: 10px;
  padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted); text-align: center;
}
.card__foot a { font-weight: 600; }
.card__foot .minor { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.card__foot .minor a { color: var(--faint); font-weight: 400; }
.card__foot .minor a:hover { color: var(--text); }
.center-link { align-self: center; font-size: 14px; }

.icon-badge {
  display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 20px;
  background: var(--brand-14); border: 1px solid rgba(116, 137, 254, 0.3);
  color: var(--brand-light);
}
.icon-badge--round { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 0 0 10px rgba(116, 137, 254, 0.05); }

/* ---------- Alerts ---------- */
.auth-error,
.auth-note {
  display: flex; gap: 10px; align-items: flex-start;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px; line-height: 1.45; text-align: left;
}
.auth-error { background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger-text); }
.auth-error svg { color: #FF8A8A; margin-top: 1px; }
.auth-note { background: var(--success-bg); border: 1px solid var(--brand-35); color: #D4DAFF; }

/* ---------- Form fields ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label, .field__label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: var(--field);
  color: var(--text);
  font-size: 16px;               /* 16px stops phones zooming in on focus */
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card--wide .input { min-height: 48px; padding: 0 14px; border-radius: 12px; }
.input::placeholder { color: #6E7080; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(116, 137, 254, 0.18); }
.input--code {
  border-color: var(--brand-35);
  background: rgba(116, 137, 254, 0.06);
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.input--otp {
  min-height: 68px;
  border-radius: 16px;
  font-family: var(--font-mono);
  font-size: 30px; font-weight: 700;
  letter-spacing: 0.6em;
  text-indent: 0.6em;            /* balances the letter-spacing so digits sit centred */
  text-align: center;
}
.input--otp::placeholder { color: #3F4150; }

.password { position: relative; display: flex; }
.password .input { padding-right: 70px; }
.password__toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  height: 40px; padding: 0 12px;
  border: none; border-radius: 10px;
  background: transparent; color: var(--brand-light);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.password__toggle:hover { background: rgba(255, 255, 255, 0.05); }

.hint { font-size: 12px; color: var(--faint); }

/* Password strength (Register) */
.strength { display: flex; flex-direction: column; gap: 8px; }
.strength__bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.strength__bars span { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.10); transition: background-color .2s ease; }
.strength__bars span.is-met { background: var(--brand); }
.strength__rules { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; }
.strength__rules li { color: var(--faint); transition: color .2s ease; }
.strength__rules li::before { content: "·"; display: inline-block; width: 1em; }
.strength__rules li.is-met { color: #C9D1FF; }
.strength__rules li.is-met::before { content: "✓"; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 16px; font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.btn--primary { background: var(--brand); color: var(--bg); box-shadow: 0 12px 30px rgba(116, 137, 254, 0.35); }
.btn--primary:hover { background: #8497FF; color: var(--bg); }
.btn--primary:active { transform: translateY(1px); }
.btn--google { background: var(--text); color: #0E0E12; font-size: 15px; min-height: 52px; }
.btn--google:hover { background: #FFFFFF; color: #0E0E12; }
.btn--outline { border-color: var(--line-strong); color: var(--text); font-size: 15px; min-height: 52px; }
.btn--outline:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--text); }
.btn--small {
  width: auto; min-height: 40px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text);
  font-size: 14px;
}
.btn--small:disabled { color: var(--faint); cursor: not-allowed; }
.btn--back {
  align-self: flex-start;
  padding: 0; border: none; background: none;
  color: var(--brand-light); font-size: 13px; font-weight: 500;
  cursor: pointer;
}

.divider {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #6E7080;
}
.divider::before, .divider::after { content: ""; flex-grow: 1; height: 1px; background: rgba(255, 255, 255, 0.08); }

/* ---------- Choice cards (Register step 1, Google one more step) ---------- */
.choice {
  display: flex; align-items: center; gap: 18px;
  width: 100%;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.choice:hover { border-color: rgba(116, 137, 254, 0.7); background: rgba(116, 137, 254, 0.08); transform: translateY(-1px); }
.choice__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-14); color: var(--brand-light); flex-shrink: 0; }
.choice__text { display: flex; flex-direction: column; gap: 3px; flex-grow: 1; }
.choice__title { font-size: 17px; font-weight: 600; }
.choice__desc { font-size: 14px; color: var(--muted); }
.choice__arrow { color: var(--faint); }

/* Radio cards */
.radio-group { border: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.radio-card {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.radio-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-card__dot {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: border .15s ease;
}
.radio-card__text { display: flex; flex-direction: column; gap: 2px; }
.radio-card__title { font-size: 16px; font-weight: 600; }
.radio-card__desc { font-size: 13px; color: var(--muted); }
.radio-card:has(input:checked) { border-color: var(--brand); background: rgba(116, 137, 254, 0.09); }
.radio-card:has(input:checked) .radio-card__dot { border: 6px solid var(--brand); }
.radio-card:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(116, 137, 254, 0.5); }

.google-chip {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px; color: var(--muted);
}

/* Resend row (Verify) */
.resend-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%;
  padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}

/* Progress list (Pending) */
.progress { width: 100%; text-align: left; border-top: 1px solid var(--line); }
.progress li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.progress__dot { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.18); }
.progress__dot--done { display: grid; place-items: center; border: none; background: var(--brand); color: var(--bg); }
.progress__dot--now { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(116, 137, 254, 0.15); }
.progress .later { color: var(--faint); }
.progress .meta { color: var(--faint); }

/* ---------- WhatsApp bubble ---------- */
.whatsapp {
  position: fixed;
  right: 28px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.whatsapp:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }
/* Inside the Android app, help lives in the More sheet instead */
html.in-app .whatsapp { display: none; }

/* ---------- Link under a field, right-aligned ("Forgot password?") ---------- */
.field__link { align-self: flex-end; font-size: 13px; font-weight: 500; }

/* ---------- Checkbox ("Keep me logged in") ---------- */
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); cursor: pointer; align-self: flex-start; }
.check input {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; margin: 0; flex-shrink: 0;
  border-radius: 6px; border: 2px solid rgba(255, 255, 255, 0.25);
  display: grid; place-items: center; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.check input::after { content: "✓"; font-size: 13px; font-weight: 700; color: var(--bg); opacity: 0; }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { opacity: 1; }

/* ---------- Hints under fields ---------- */
.hint--error { color: #FF8A8A; }

/* ---------- Consent line under sign-up buttons ---------- */
.fine { font-size: 12px; line-height: 1.5; color: var(--faint); text-align: center; }
.fine a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- A button that looks like a link ---------- */
.link-btn { padding: 0; border: none; background: none; color: var(--brand-light); font-size: inherit; font-weight: 600; cursor: pointer; }
.link-btn:hover { color: var(--text); }

/* ---------- Busy buttons ---------- */
.btn.is-busy { opacity: 0.75; cursor: progress; }
.btn--primary:disabled { transform: none; }

/* ---------- Note boxes (pending approval on Log in) ---------- */
.auth-error a { color: #FFE0E0; text-decoration: underline; text-underline-offset: 2px; }
.auth-error .auth-error__more { display: block; margin-top: 4px; color: #FFD6D6; }

/* ---------- Dropdowns and file pickers (employer / institution sign-up) ---------- */
select.input {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A6A7B3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select.input option { background: #17171C; color: var(--text); }
.input--file { padding: 12px 14px; min-height: auto; line-height: 1.4; }
.input--file::file-selector-button {
  margin-right: 12px; padding: 7px 12px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: rgba(255, 255, 255, 0.05); color: var(--text);
  font: inherit; font-size: 13px; cursor: pointer;
}
.section-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand-light); padding-top: 4px;
}
.optional { font-weight: 400; color: var(--faint); }

/* ---------- Totals (institution sign-up, payment) ---------- */
.amount {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--brand-10); border: 1px solid var(--brand-35);
  font-size: 14px; color: var(--text-2);
}
.amount b { font-family: var(--font-display); font-size: 20px; color: var(--text); }
.receipt { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.receipt__row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.receipt__row--muted { color: var(--muted); font-size: 14px; }
.receipt__row--total { border-bottom: none; padding-top: 16px; font-weight: 600; }
.receipt__row--total span:last-child { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.trust { font-size: 13px; color: var(--faint); text-align: center; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Short laptop screens: the panel doesn't fit, so it scrolls with the page */
@media (min-width: 961px) and (max-height: 860px) {
  .usp { position: static; height: auto; justify-content: flex-start; }
}

/* Tablets: drop the "Why CAMP" panel, keep a short headline above the card */
@media (max-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .usp { padding: 28px 24px 0; gap: 0; position: static; height: auto; }
  .usp__body, .proof, .usp__foot { display: none; }
  .split__form { align-items: flex-start; padding: 32px 20px 64px; }
  .topbar { padding: 28px 24px; }
  .centered__main { align-items: flex-start; padding-top: 24px; }
}

/* Phones (and the Android app) */
@media (max-width: 560px) {
  :root { --blur: 16px; }
  .usp { padding: 20px 20px 0; }
  .topbar { padding: 20px; }
  .brand__logo { height: 56px; }
  .split__form, .centered__main { padding: 20px 16px 48px; }
  .card, .card--wide, .card--center, .card--pending { padding: 28px 22px; border-radius: 22px; gap: 18px; }
  .card__title { font-size: 28px; }
  .card__title--sm { font-size: 26px; }
  .row-2 { grid-template-columns: minmax(0, 1fr); }
  .choice { padding: 18px; gap: 14px; }
  .input--otp { font-size: 26px; letter-spacing: 0.45em; text-indent: 0.45em; }
  .glow--1, .glow--2, .glow--center { width: 380px; height: 380px; filter: blur(110px); }
  .glow--center { margin-left: -190px; }
  .whatsapp { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
