/* ═════════════════════════════════════════════════════════════════════════
   AUTH PAGES — /login, /signup, /account.

   Deliberately NOT carrying the site's full mega-nav. An auth page has one
   job, and a Features/Solutions dropdown on it is an invitation to wander
   off mid-signup. Just the logo (linking home) and the form.

   Uses the site's own tokens from styles.css (--accent, --text-primary,
   --border, --body-bg …) rather than inventing colours, so these pages
   inherit any future brand change automatically.
   ═════════════════════════════════════════════════════════════════════════ */

/* No background of its own — styles.css's body rule paints the site's colour
   AND its three-point gradient wash, and a flat repaint here is what made
   these pages read as a plainer surface than every page around them. */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 56px;
}
/* --r-xl and --shadow-lg: the same card the marketing site's hero device
   and pricing tiers use, rather than an 18px radius and a bespoke shadow
   that were close enough to look like a mistake. */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 34px 32px 30px;
}
.auth-logo { display: flex; justify-content: center; margin-bottom: 22px; }
.auth-logo img { height: 36px; width: auto; }
/* Same two-file swap /account uses: the colour wordmark is near-black type
   and vanishes into the dark surface. In CSS so first paint is already
   right — a script-set src flashes the wrong logo. */
.auth-logo .on-dark { display: none; }
html[data-theme="dark"] .auth-logo .on-light { display: none; }
html[data-theme="dark"] .auth-logo .on-dark { display: block; }
/* Space Grotesk, like every heading on the site. */
.auth-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 24px; font-weight: 700; letter-spacing: -0.03em;
  color: var(--text-primary); text-align: center; margin: 0 0 6px;
}
.auth-sub { font-size: 13.5px; color: var(--text-secondary); text-align: center; margin: 0 0 24px; line-height: 1.55; }

.auth-field { margin-bottom: 15px; }
.auth-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; letter-spacing: .2px; }
.auth-label .opt { font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.auth-input {
  width: 100%;
  font: inherit;
  font-size: 14.5px;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s;
}
.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-input::placeholder { color: var(--text-muted); }
.auth-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; line-height: 1.5; }

/* The site's .btn-primary, at full width: pill, same weight, same shadow.
   It was a 10px-radius rectangle at weight 700 — the one prominent control
   on the page, and it matched nothing on the page you arrived from. */
.auth-btn {
  width: 100%;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--r-pill);
  padding: 13px 16px;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 1px 2px rgba(26,111,255,0.15);
  transition: background .15s, box-shadow .15s, opacity .15s;
}
.auth-btn:hover { background: var(--accent2); box-shadow: var(--shadow-md); }
.auth-btn[disabled] { opacity: .6; cursor: default; box-shadow: none; }

.auth-alt { text-align: center; font-size: 13.5px; color: var(--text-secondary); margin-top: 18px; }
.auth-alt a { color: var(--accent); font-weight: 700; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

/* A real <button> that reads as a link. "Forgot password?" reveals the reset
   panel on this same card rather than navigating, so an <a href> would be a
   lie about what happens — and an <a> with no href is not in the tab order
   at all, which on an auth page is the one place that matters most. */
.auth-linkbtn {
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--accent); background: none; border: none;
  padding: 0; cursor: pointer; text-decoration: none;
}
.auth-linkbtn:hover { text-decoration: underline; }
/* :focus-visible, not :focus — a ring on every mouse click is noise. */
.auth-linkbtn:focus-visible,
.auth-btn:focus-visible,
.auth-input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm);
}
/* Sits immediately under the password field, right-aligned, where every
   sign-in form has trained people to look for it. */
.auth-forgot { margin: -8px 0 15px; text-align: right; }
.auth-step { font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 16px; }

/* Errors are announced, not just coloured — a colour-only error is invisible
   to a screen reader and to anyone who cannot distinguish it. */
.auth-msg {
  display: none;
  font-size: 13px;
  line-height: 1.5;
  border-radius: var(--r-md);
  padding: 11px 13px;
  margin-bottom: 16px;
}
.auth-msg.err { display: block; background: rgba(226,68,92,.08); color: #b3243a; border: 1px solid rgba(226,68,92,.22); }
.auth-msg.ok  { display: block; background: rgba(0,200,117,.09); color: #05794b; border: 1px solid rgba(0,200,117,.25); }
html[data-theme="dark"] .auth-msg.err { color: #ff8098; }
html[data-theme="dark"] .auth-msg.ok  { color: #4ade9b; }
html[data-theme="dark"] .acct-badge.yes { color: #4ade9b; }

.auth-legal { text-align: center; font-size: 11.5px; color: var(--text-muted); margin-top: 20px; line-height: 1.6; }
.auth-legal a { color: var(--text-secondary); text-decoration: none; }
.auth-legal a:hover { text-decoration: underline; }

/* /account */
.acct-row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.acct-row:last-of-type { border-bottom: none; }
.acct-row .k { color: var(--text-secondary); }
.acct-row .v { color: var(--text-primary); font-weight: 600; text-align: right; word-break: break-word; }
.acct-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); }
.acct-badge.yes { background: rgba(0,200,117,.12); color: #05794b; }
.acct-badge.no  { background: rgba(140,141,151,.14); color: var(--text-secondary); }

@media (max-width: 480px) {
  .auth-card { padding: 26px 20px 24px; border-radius: var(--r-lg); }
  .auth-title { font-size: 21px; }
}

/* ── SOCIAL SIGN-IN ROW ───────────────────────────────────────────────────
   Rendered by assets/js/sio-oauth.js, which draws ONLY the providers the
   server reports as configured. The container is empty in the markup and
   stays empty when none are, hence :not(:empty) below — an unconfigured
   deployment shows no gap and no orphaned "or" divider.

   Google's button is Google's own widget: their branding rules require it,
   and a hand-rolled button carrying their logo is grounds for suspending
   the client. Its appearance is therefore not ours to set — these rules
   only give it room. The Apple button IS ours, and is sized to match
   Google's height and weight so the two read as a pair rather than as one
   native control beside one imitation. */
.sio-oauth-row:not(:empty) {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 16px;
}

.sio-oauth-slot { display: flex; justify-content: center; }
.sio-oauth-slot > div { max-width: 100%; }

.sio-oauth-btn {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid var(--border-strong, #dadce0);
  background: var(--surface, #fff);
  /* Was var(--text, …) — a token that exists nowhere, so this silently fell
     through to the hardcoded #1f1f1f and stayed near-black in dark mode. */
  color: var(--text-primary, #1f1f1f);
  font: 500 14px/1 system-ui, -apple-system, 'Segoe UI', sans-serif;
  cursor: pointer;
  transition: box-shadow .15s ease;
}
.sio-oauth-btn:hover { box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.sio-oauth-btn:disabled { opacity: .6; cursor: default; box-shadow: none; }
.sio-oauth-btn svg { flex: none; }

/* Only drawn by sio-oauth.js once at least one button exists, so it can
   never end up floating above nothing. */
.sio-oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: var(--text-muted, #6b7280);
  font-size: 12.5px;
}
.sio-oauth-divider::before,
.sio-oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, #e5e7eb);
}
