/* ============================================================
   AUTH SHELL — 3-column shared layout used by login, signup and
   forgot-password pages. Ported from the LendScope design bundle
   (Direction A). Pairs with tokens.css + app.css.
   ============================================================ */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 460px 1fr;
  grid-template-rows: 64px 1fr 64px;
  column-gap: 0;
}

/* ─── TOP BAR ─────────────────────────────────────────────────── */
.auth-top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  padding: 0 32px;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
}
.auth-top .home { display: flex; align-items: center; gap: 14px; }
.auth-top .home a {
  font-size: 12px;
  color: var(--neutral-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.auth-top .home a:hover { color: var(--text-1); }
.auth-top .spacer { flex: 1; }
/* Muted copy is --neutral-text (#6B7280, AA on white); --text-3 (#9CA3AF) is 2.5:1. */
.auth-top .alt-action { font-size: 13px; color: var(--neutral-text); }
.auth-top .alt-action a { color: var(--accent); font-weight: 600; text-decoration: none; margin-left: 6px; }

/* ─── LEFT META PANEL ─────────────────────────────────────────── */
.auth-side {
  background: var(--bg);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-light);
}
.auth-side .eyebrow { margin-bottom: 14px; }
.auth-side h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.5px;
  line-height: 1.15;
  margin: 0 0 16px;
  max-width: 320px;
}
.auth-side .lede {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 320px;
}
.auth-side-bottom {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neutral-text);
  line-height: 1.7;
}
.auth-side-bottom .row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}
.auth-side-bottom .row::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--pass-text);
}

/* ─── CENTRE FORM PANEL ───────────────────────────────────────── */
.auth-panel {
  background: var(--surface);
  padding: 56px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border-light);
}
.auth-panel.wide-pad { padding: 56px 56px; }

.auth-logo { margin-bottom: 28px; display: inline-flex; }

.auth-panel h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.4px;
  margin: 0 0 8px;
}
.auth-panel .sub {
  font-size: 14px;
  color: var(--text-2);
  margin: 0 0 28px;
  line-height: 1.55;
}

/* ─── RIGHT CONTEXT PANEL ─────────────────────────────────────── */
.auth-context {
  background: var(--bg);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

/* ─── PRIMARY / SECONDARY BUTTONS (auth pages) ───────────────── */
.primary-btn {
  width: 100%;
  height: 44px;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--tx-med);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary-btn:hover { background: var(--accent-dark); }
.primary-btn[disabled],
.primary-btn:disabled { opacity: .6; cursor: not-allowed; }

.secondary-btn {
  width: 100%;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  color: var(--text-1);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 10px;
  transition: background var(--tx-med);
}
.secondary-btn:hover { background: var(--muted); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  margin-top: 18px;
  font-weight: 500;
}
.back-link:hover { color: var(--text-1); }

/* ─── STEP INDICATOR (signup, forgot-password) ───────────────── */
.steps-ind {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.step-ind {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--neutral-text);
  flex: 1;
}
.step-ind .n {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--muted);
  color: var(--text-2);   /* on the --muted disc; --neutral-text is 4.4:1 there */
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  flex: none;
}
.step-ind.done .n { background: var(--pass-text); color: #fff; }
.step-ind.on   .n { background: var(--accent);    color: #fff; }
.step-ind.on   { color: var(--text-1); font-weight: 600; }
.step-ind.done { color: var(--text-2); }

/* ─── BOTTOM BAR ──────────────────────────────────────────────── */
.auth-bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  padding: 0 32px;
  border-top: 1px solid var(--border-light);
  background: var(--surface);
  font-size: 11px;
  color: var(--neutral-text);
  justify-content: space-between;
}
.auth-bottom a { color: inherit; text-decoration: none; margin-left: 14px; }
.auth-bottom a:hover { color: var(--text-1); }
.auth-bottom .legal { font-family: var(--font-mono); }

/* ─── RESPONSIVE — collapse to single column ─────────────────── */
@media (max-width: 1100px) {
  .auth-shell { grid-template-columns: 1fr; grid-template-rows: 64px auto 64px; }
  .auth-side, .auth-context { display: none; }
  .auth-panel {
    border-right: 0;
    padding: 40px 28px;
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
  }
}

/* ─── Touch targets (auth chrome) ────────────────────────────
   Auth pages load tokens.css + app.css + this file, so they never see the
   `pointer: coarse` rule in shared.css. Measured on a touch device:
   "Forgot password?" 18px tall, the auth-bottom links 14px, the remember-me
   checkbox 14x14 — all under the 24px WCAG 2.5.8 AA minimum.

   Deliberately NOT touching `.foot-link a` ("Don't have an account? Start
   for free") or `.auth-top .alt-action a`: those sit inside a sentence, which
   2.5.8 exempts, and forcing inline-flex on them would disturb the text flow.

   The checkbox needs [type="checkbox"] to outrank `.remember-row input`,
   which each auth page declares in its own inline <style> block. Its
   <label for="remember"> is already a working target, so this is belt-and-
   braces rather than the only way to hit it. */
@media (pointer: coarse) {
  .auth-panel .forgot,
  .auth-bottom a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
  }
  .remember-row { min-height: 44px; }
  .remember-row input[type="checkbox"] { width: 24px; height: 24px; }
}

/* The eyebrow over the right-hand preview column, all three auth pages.
   (Was an inline style on each page — the CSP allows no inline styles.) */
.auth-context .ctx-eyebrow { margin-bottom: 14px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; }
