/* Sign-in / sign-up (`auth/login.html`, `auth/signup.html`) — the
 * Syncc Auth / Landing mockup's glass auth card on a navy-aurora hero.
 *
 * Both pages extend base.html, so this stylesheet loads via each
 * page's {% block head %} (after the global brand.css) and styles a
 * self-contained .auth-hero region that paints the app's signature
 * navy-aurora surface over the content area, centering a glass auth
 * card (CLAUDE.md "Hero gradient + glass pill").
 *
 * Token mapping (mockup → production brand.css):
 *   --accent / --accent-bright  → --brand-teal / --brand-teal-bright
 *   --hero-on-navy              → --brand-teal-bright
 *   --hero-aurora               → --brand-teal-glow / --brand-teal-soft
 *   --navy / --page-shell       → --brand-navy-2 / --brand-page-deep
 * Pre-login has NO per-user palette — the mockup's [data-palette]
 * layer + switcher are dropped. Accent strictly from --brand-teal*;
 * the only literal hex are the multi-color OAuth logos (in markup)
 * and the rgba(255,255,255,…) glass tints the mockup uses.
 *
 * Behaviour is untouched: SSO buttons (gated on google_enabled /
 * ms_enabled), the email/password form (CSRF token + field names),
 * Remember me, Forgot password, Sign in/up cross-links, and the
 * submit busy-state (idle/busy spans + data-loading flip from
 * brand.css) are all the same elements, only restyled.
 */

/* ── No app chrome on the sign-in surface ──────────────────────────
   login.html sets body.auth-body. The full-bleed .auth surface carries its
   own footer, so hide base.html's top navbar, bottom-tabs and global footer
   (the page keeps its own .auth-pagefoot). */
body.auth-body .navbar,
body.auth-body .navbar-reveal-zone,
body.auth-body .bottom-tabs,
body.auth-body footer:not(.auth-pagefoot) { display: none !important; }

/* The navy-aurora surface fills the ENTIRE viewport — pre-login is always
   the navy brand, regardless of the viewer's light/dark preference — so a
   wide screen never shows the (capped) page background in the gutters. The
   .auth grid (max 1180px) just centers the two-pane content on top of it. */
body.auth-body {
  background:
    radial-gradient(58% 50% at 86% 6%, color-mix(in srgb, var(--brand-teal-bright) 42%, transparent) 0%, transparent 56%),
    radial-gradient(48% 44% at 104% -2%, color-mix(in srgb, var(--brand-teal) 44%, transparent) 0%, transparent 60%),
    radial-gradient(80% 70% at 4% 108%, color-mix(in srgb, var(--brand-teal) 15%, transparent) 0%, transparent 60%),
    var(--brand-navy) !important;
}

/* ── Hero surface ──────────────────────────────────────────────── */
/* Negative margins pull the hero out of base.html's <main> gutter so
 * it bleeds edge-to-edge; the inner .auth-stage re-establishes a
 * centered column. */
.auth-hero {
  position: relative;
  /* Cancel base.html <main>'s padding (px-4 py-8 → sm:px-6 → lg:px-8
   * → 2xl:px-10) so the navy hero bleeds edge-to-edge. py-8 = 2rem,
   * pb-24 on phone = 6rem. The horizontal value is bumped per
   * breakpoint below. */
  margin: -2rem -1rem -6rem;
  min-height: calc(100vh - 1px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(110% 80% at 100% -5%,
      var(--brand-teal-glow) 0%,
      var(--brand-teal-soft) 30%,
      transparent 55%),
    radial-gradient(ellipse 60% 50% at 12% 108%,
      var(--brand-teal-soft) 0%,
      transparent 60%),
    linear-gradient(180deg, var(--brand-navy-2) 0%, var(--brand-page-deep) 100%);
  color: #ECF2FF;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
/* Faint grid texture masked to the upper-right so it fades into the
 * navy rather than tiling (the mockup body::before). */
.auth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse at 95% 5%, #000 0%, transparent 55%);
          mask-image: radial-gradient(ellipse at 95% 5%, #000 0%, transparent 55%);
  z-index: 0;
}

.auth-stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 24px;
}

/* ── Glass auth card ───────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 28px;
  padding: 32px 32px 30px;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 24px 60px -10px rgba(0, 0, 0, 0.4);
  position: relative;
}

/* ── Brand head ────────────────────────────────────────────────── */
.auth-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 24px;
}
.auth-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  overflow: hidden;                 /* round the app-icon's square corners */
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px var(--brand-teal-glow);
  flex: 0 0 auto;
}
/* The Syncc app-icon mark fills the squircle (its own navy ground + ring).
   Scoped to .auth-mark-img so it never overrides the school-logo <img>
   (.auth-school-logo) the logo branch renders. */
.auth-mark-img { width: 100%; height: 100%; display: block; object-fit: cover; }
/* When a school logo is present, drop the gradient fill so the logo
 * reads on its own. */
.auth-mark-logo {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: none;
  padding: 8px;
}
.auth-school-logo {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}
.auth-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  margin: 0;
}
.auth-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand-teal-bright);
  font-size: 1.08em;
}
.auth-sub {
  font-size: 13.5px;
  color: rgba(236, 242, 255, 0.65);
  line-height: 1.45;
  max-width: 320px;
  margin: 0;
}

/* ── OAuth buttons ─────────────────────────────────────────────── */
.oauth-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.oauth-btn {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #ECF2FF;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s var(--brand-ease);
}
.oauth-btn:hover { background: rgba(255, 255, 255, 0.08); }
.oauth-btn:active { transform: scale(0.99); }
.oauth-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ── "or" divider ──────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 18px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(236, 242, 255, 0.45);
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.10);
}

/* ── Form fields ───────────────────────────────────────────────── */
.auth-card .form { display: flex; flex-direction: column; gap: 14px; }
.auth-card .field { display: flex; flex-direction: column; gap: 6px; }
.auth-card .field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.auth-card .field-label {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: rgba(236, 242, 255, 0.65);
}
.auth-card .field-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-teal-bright);
  text-decoration: none;
}
.auth-card .field-link:hover { text-decoration: underline; }
.auth-card .input {
  min-height: 48px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  font-size: 14.5px;
  color: #fff;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.auth-card .input::placeholder { color: rgba(236, 242, 255, 0.4); }
.auth-card .input:hover { border-color: rgba(255, 255, 255, 0.20); }
.auth-card .input:focus {
  outline: none;
  border-color: var(--brand-teal-bright);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px var(--brand-teal-soft);
}

/* Password-match hint (sign up). is-ok uses the brand accent; is-bad a
 * soft rose (no brand danger token reads on the glass card). */
.auth-pw-msg {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  margin: 6px 0 0;
}
.auth-pw-msg.is-ok  { color: var(--brand-teal-bright); }
.auth-pw-msg.is-bad { color: #FCA5A5; }

/* ── Password strength meter (sign up) ─────────────────────────── */
.strength {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
/* class specificity beats the UA [hidden] rule — restore it so the
   strength meter stays hidden until the user types a password. */
.strength[hidden] { display: none; }
.strength-bar { display: flex; gap: 3px; flex: 1; }
.strength-pip {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s;
}
.strength-pip.is-on { background: var(--brand-teal-bright); }
.strength-label {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--brand-teal-bright);
  min-width: 50px;
  text-align: right;
}

/* ── Remember (custom checkbox) ────────────────────────────────── */
.remember {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(236, 242, 255, 0.7);
  cursor: pointer;
  user-select: none;
}
.remember-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: background 0.15s, border-color 0.15s;
}
.remember-box::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transition: transform 0.18s var(--brand-ease);
}
.remember input { display: none; }
.remember input:checked + .remember-box {
  background: var(--brand-teal);
  border-color: var(--brand-teal);
}
.remember input:checked + .remember-box::after {
  transform: rotate(-45deg) translate(1px, -1px) scale(1);
}

/* ── Submit (brand-gradient teal) ──────────────────────────────── */
.auth-card .submit {
  min-height: 52px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--brand-teal-bright), var(--brand-teal));
  color: var(--brand-navy);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  cursor: pointer;
  box-shadow: 0 8px 22px var(--brand-teal-glow);
  transition: filter 0.15s, transform 0.12s var(--brand-ease);
}
.auth-card .submit:hover { filter: brightness(1.06); }
.auth-card .submit:active { transform: scale(0.99); }
/* The idle / busy spans (visibility flipped via data-loading in
 * brand.css) carry the icon + label; align their contents inline. */
.auth-card .submit .auth-submit-idle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.auth-card .submit .auth-submit-idle svg { width: 18px; height: 18px; }

/* ── Terms (sign up) ───────────────────────────────────────────── */
.terms {
  margin-top: 12px;
  font-size: 11.5px;
  color: rgba(236, 242, 255, 0.5);
  line-height: 1.5;
  text-align: center;
}
.terms a {
  color: rgba(236, 242, 255, 0.75);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
}
.terms a:hover { color: #fff; }

/* ── Cross-link + copyright ────────────────────────────────────── */
.auth-alt {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(236, 242, 255, 0.65);
}
.auth-alt a {
  color: var(--brand-teal-bright);
  font-weight: 600;
  text-decoration: none;
}
.auth-alt a:hover { text-decoration: underline; }

.auth-foot {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-bottom: 24px;
  font-size: 11px;
  color: rgba(236, 242, 255, 0.4);
  letter-spacing: 0.04em;
}

/* ── Responsive: match negative margin to base <main>'s padding ── */
@media (min-width: 640px)  { .auth-hero { margin: -2rem -1.5rem -6rem; } }
@media (min-width: 768px)  { .auth-hero { margin: -2rem -1.5rem -2rem; } }
@media (min-width: 1024px) { .auth-hero { margin: -2rem -2rem -2rem; } }
@media (min-width: 1536px) { .auth-hero { margin: -2rem -2.5rem -2rem; } }

@media (max-width: 600px) {
  .auth-card { padding: 26px 22px 24px; }
  .auth-title { font-size: 22px; }
}

/* ════════════════════════════════════════════════════════════════
   SIGN-IN RESKIN (auth/login.html) — design-mocks "Syncc — Sign In"

   The block ABOVE (.auth-hero / .auth-card / .oauth-* / .strength …)
   still styles auth/signup.html and is untouched. This block is a
   self-contained reskin of the SIGN-IN page only: a navy-aurora
   surface with a LEFT BRAND PANEL on wide screens + an SSO-first
   FORM CARD (single centered card on phone).

   Every rule here is scoped under `.auth` (login's root <main>),
   which signup never uses — so the two layouts can't collide on the
   shared selector names (.divider / .field / .remember / .field input).

   TOKEN MAPPING (mockup → production brand.css). Pre-login has NO
   per-user palette, so the mockup's [data-palette] layer is dropped;
   the accent comes strictly from the app's System-A brand tokens so
   the surface follows the school/brand default (currently teal). The
   `--auth-*` locals below are defined ONCE from those tokens
   (color-mix only) — no component rule hard-codes a hex. The only
   literal hex are the multi-colour OAuth provider logos (in markup)
   and the rgba(255,255,255,…) glass tints the mockup uses.

     mock --navy            → --brand-navy / --brand-page-deep
     mock --accent          → --brand-teal
     mock --accent-bright   → --brand-teal-bright
     mock --card            → --auth-card     (navy-derived glass)
     mock --ink / -2 / -3   → --auth-ink*     (white-tint hierarchy)
     mock --hairline        → --auth-hairline
     mock --danger          → --auth-danger
     mock --accent-soft/-ink/-ink-strong/-on → --auth-accent-*
   ════════════════════════════════════════════════════════════════ */

.auth, .auth-pagefoot {
  /* Surface tokens (dark — pre-login is always the navy surface). */
  --navy: var(--brand-navy);
  --accent: var(--brand-teal);
  --accent-bright: var(--brand-teal-bright);

  --auth-card: #111A2C;
  --auth-card-border: rgba(255, 255, 255, 0.09);
  --auth-ink: #EAF0FA;
  --auth-ink-2: #98A4BB;
  --auth-ink-3: #5F6B82;
  --auth-hairline: rgba(255, 255, 255, 0.10);
  --auth-danger: #FB6E5B;

  /* On-navy hero text + lines (matches the My Day hero tokens). */
  --auth-on-navy: #F3F7FF;
  --auth-on-navy-2: rgba(243, 247, 255, 0.66);
  --auth-on-navy-3: rgba(243, 247, 255, 0.42);
  --auth-line: rgba(255, 255, 255, 0.07);

  /* Accent derivations (mock's --accent-soft / -ink / -ink-strong). */
  --auth-accent-soft: color-mix(in srgb, var(--accent) 14%, var(--auth-card));
  --auth-accent-ink: color-mix(in srgb, var(--accent) 30%, var(--auth-ink));
  --auth-accent-ink-strong: color-mix(in srgb, var(--accent) 64%, var(--auth-ink));
  /* Text that sits ON the filled accent button — deep navy ink reads
     on teal in dark, mirroring the mock's [data-theme=dark] --accent-on. */
  --auth-accent-on: #06121A;
}

/* ── Full-bleed navy-aurora surface ────────────────────────────────
   Cancel base.html <main>'s padding (px-4 py-8 → sm:px-6 → lg:px-8
   → 2xl:px-10, plus pb-24 on phone) so the navy hero bleeds edge to
   edge; the inner two-pane grid re-establishes a centered column. */
.auth {
  position: relative;
  margin: -2rem -1rem -6rem;
  min-height: calc(100vh - 1px);
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: clamp(28px, 5vw, 80px);
  padding: clamp(20px, 4vw, 48px);
  overflow-x: hidden;
  color: var(--auth-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Background lives on body.auth-body (below) so it fills the whole
     viewport; .auth is just the centered (max 1180px) content layer. */
  background: transparent;
}
/* masked grid texture, upper-right (mock body::before) */
.auth::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--auth-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--auth-line) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask: radial-gradient(62% 60% at 100% 0%, #000 0%, transparent 64%);
          mask: radial-gradient(62% 60% at 100% 0%, #000 0%, transparent 64%);
}
.auth > * { position: relative; z-index: 1; }
.auth a { color: inherit; text-decoration: none; }
.auth button { font-family: inherit; }

@media (min-width: 920px) {
  .auth {
    grid-template-columns: 1.02fr 0.98fr;
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

/* ── LEFT BRAND PANEL (wide only) ──────────────────────────────── */
.auth .brand-pane { display: none; color: var(--auth-on-navy); max-width: 460px; }
@media (min-width: 920px) { .auth .brand-pane { display: block; } }
.auth .brand-pane .wm { display: inline-flex; align-items: center; gap: 13px; }
.auth .brand-pane .mark {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 13px;
  display: grid; place-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--auth-on-navy) 10%, transparent);
  color: var(--accent-bright);
  border: 1px solid color-mix(in srgb, var(--auth-on-navy) 18%, transparent);
}
.auth .brand-pane .mark svg { width: 24px; height: 24px; }
.auth .brand-pane .brand-pane-logo { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.auth .brand-pane .wm .t { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.auth .brand-pane .wm .t .s { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: 0; }
.auth .brand-pane h1 {
  margin-top: 30px; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.06;
  font-weight: 700; letter-spacing: -0.03em; text-wrap: balance;
}
.auth .brand-pane h1 .ser {
  font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400;
  color: var(--accent-bright); letter-spacing: 0;
  text-shadow: 0 0 38px color-mix(in srgb, var(--accent-bright) 42%, transparent);
}
.auth .brand-pane .tag { margin-top: 18px; font-size: 16.5px; line-height: 1.5; color: var(--auth-on-navy-2); max-width: 400px; }
.auth .brand-pane .marks { margin-top: 32px; display: flex; flex-direction: column; gap: 13px; }
.auth .brand-pane .mk { display: flex; align-items: center; gap: 11px; font-size: 14.5px; color: var(--auth-on-navy-2); }
.auth .brand-pane .mk .mki {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--auth-on-navy) 9%, transparent);
  color: var(--accent-bright);
  border: 1px solid color-mix(in srgb, var(--auth-on-navy) 15%, transparent);
}
.auth .brand-pane .mk .mki svg { width: 16px; height: 16px; }

/* ── FORM CARD ─────────────────────────────────────────────────── */
.auth .card-wrap { width: 100%; max-width: 428px; justify-self: center; }
.auth .card {
  position: relative; border-radius: 26px; padding: clamp(26px, 4vw, 34px);
  background: var(--auth-card); border: 1px solid var(--auth-card-border);
  box-shadow: 0 50px 100px -40px rgba(3, 7, 18, 0.8), 0 18px 44px -22px rgba(3, 7, 18, 0.55);
}

/* compact wordmark inside card (phone shows this; wide hides it). */
.auth .card-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.auth .card-brand .mark {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center;
  background: var(--navy); color: var(--accent-bright); position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
.auth .card-brand .mark::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(80% 80% at 100% 0%, color-mix(in srgb, var(--accent-bright) 50%, transparent), transparent 60%);
}
.auth .card-brand .mark svg { width: 20px; height: 20px; position: relative; z-index: 1; }
.auth .card-brand .card-brand-logo { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 1; }
.auth .card-brand .t { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.auth .card-brand .t .s { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: 0; }
@media (min-width: 920px) { .auth .card-brand { display: none; } }

.auth .card h2 { font-size: 24px; font-weight: 720; letter-spacing: -0.02em; color: var(--auth-ink); }
.auth .card .sub { margin-top: 6px; font-size: 14.5px; line-height: 1.45; color: var(--auth-ink-2); }

/* ── SSO ───────────────────────────────────────────────────────── */
.auth .sso { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.auth .sso-btn {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  min-height: 50px; height: 50px; border-radius: 14px; cursor: pointer;
  background: var(--auth-card); border: 1px solid var(--auth-hairline); color: var(--auth-ink);
  font-size: 15px; font-weight: 560;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.auth .sso-btn:hover {
  background: color-mix(in srgb, var(--auth-ink) 4%, var(--auth-card));
  border-color: color-mix(in srgb, var(--auth-ink) 16%, var(--auth-hairline));
}
.auth .sso-btn:active { transform: scale(0.99); }
.auth .sso-btn svg { width: 20px; height: 20px; flex: 0 0 auto; }

.auth .divider {
  display: flex; align-items: center; gap: 13px; margin: 22px 0 6px;
  color: var(--auth-ink-3); font-size: 12.5px; font-weight: 560;
}
.auth .divider::before, .auth .divider::after { content: ""; flex: 1; height: 1px; background: var(--auth-hairline); }

/* ── Fields ────────────────────────────────────────────────────── */
.auth .field { margin-top: 15px; }
.auth .field > label { display: block; font-size: 13px; font-weight: 580; color: var(--auth-ink-2); margin-bottom: 8px; }
.auth .input-wrap { position: relative; }
.auth .field input {
  width: 100%; height: 52px; min-height: 52px; border-radius: 14px; border: 1px solid var(--auth-hairline);
  background: color-mix(in srgb, var(--auth-ink) 2.5%, var(--auth-card)); color: var(--auth-ink);
  padding: 0 16px; font-family: inherit; font-size: 15.5px; outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.auth .field input::placeholder { color: var(--auth-ink-3); }
.auth .field input:focus {
  border-color: var(--accent); background: var(--auth-card);
  box-shadow: 0 0 0 3px var(--auth-accent-soft);
}
.auth .field input.has-eye { padding-right: 50px; }

/* password show/hide eye toggle (js/auth.js flips .shown) */
.auth .eye {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 10px; border: none; cursor: pointer;
  background: transparent; color: var(--auth-ink-3); display: grid; place-items: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.auth .eye:hover { color: var(--auth-ink-2); background: color-mix(in srgb, var(--auth-ink) 6%, transparent); }
.auth .eye svg { width: 20px; height: 20px; }
.auth .eye .off { display: none; }
.auth .eye.shown .on { display: none; }
.auth .eye.shown .off { display: block; }

/* ── Row: remember + forgot ────────────────────────────────────── */
.auth .row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.auth .remember {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 13.5px; color: var(--auth-ink-2); font-weight: 520; user-select: none;
}
/* the real checkbox drives the styled pill; visually hidden but focusable */
.auth .remember input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.auth .toggle {
  width: 42px; height: 25px; flex: 0 0 auto; border-radius: 14px;
  background: color-mix(in srgb, var(--auth-ink) 16%, transparent);
  position: relative; transition: background 0.2s ease;
}
.auth .toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s ease;
}
.auth .remember input:checked + .toggle { background: var(--accent); }
.auth .remember input:checked + .toggle::after { transform: translateX(17px); }
/* keyboard focus ring on the styled pill (input is visually hidden) */
.auth .remember input:focus-visible + .toggle {
  box-shadow: 0 0 0 3px var(--auth-accent-soft);
}
.auth .forgot { font-size: 13.5px; font-weight: 580; color: var(--auth-accent-ink-strong); }
.auth .forgot:hover { text-decoration: underline; }

/* ── Primary submit button (carries the busy-state spans) ──────── */
.auth .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 52px; height: 52px; margin-top: 20px;
  border: none; border-radius: 14px; cursor: pointer;
  font-size: 16px; font-weight: 620; letter-spacing: -0.01em;
  background: var(--accent); color: var(--auth-accent-on);
  box-shadow: 0 14px 30px -14px var(--accent);
  transition: transform 0.14s ease, filter 0.2s ease;
}
.auth .btn:hover { filter: brightness(1.05); }
.auth .btn:active { transform: scale(0.985); }
/* The idle / busy spans (visibility flipped via data-loading in
   brand.css + js/auth-busy.js) carry the label + icon + loader. */
.auth .btn .auth-submit-idle { display: inline-flex; align-items: center; gap: 9px; }
.auth .btn .auth-submit-idle svg { width: 18px; height: 18px; }
.auth .btn .auth-submit-busy { align-items: center; gap: 9px; }
.auth .btn .cs-loader { color: var(--auth-accent-on); }

.auth .card-foot { text-align: center; margin-top: 22px; font-size: 14px; color: var(--auth-ink-3); }
.auth .card-foot a { color: var(--auth-accent-ink-strong); font-weight: 600; }
.auth .card-foot a:hover { text-decoration: underline; }

/* ── Page footer note (sign-in only — distinct from signup's .auth-foot) ── */
.auth-pagefoot {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 22px 20px 28px;
  color: var(--auth-on-navy-3);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  /* sit on the same deep navy as the surface so the foot blends in
     (it lives outside .auth, below the negative-margin bleed). */
  margin: 0 -1rem;
  background: var(--brand-page-deep);
}
.auth-pagefoot a { color: var(--auth-on-navy-2); }
.auth-pagefoot a:hover { color: var(--auth-on-navy); }

/* ── Responsive: match the negative margin to base <main>'s padding,
   so the surface bleeds edge-to-edge at every breakpoint ───────── */
@media (min-width: 640px)  { .auth { margin-left: -1.5rem; margin-right: -1.5rem; } .auth-pagefoot { margin-left: -1.5rem; margin-right: -1.5rem; } }
@media (min-width: 768px)  { .auth { margin-bottom: -2rem; } }
@media (min-width: 920px)  { .auth { margin-left: auto; margin-right: auto; } }
@media (min-width: 1024px) { .auth-pagefoot { margin-left: -2rem; margin-right: -2rem; } }
@media (min-width: 1536px) { .auth-pagefoot { margin-left: -2.5rem; margin-right: -2.5rem; } }

@media (max-width: 600px) {
  .auth .card { padding: 24px 22px 26px; }
  .auth .card h2 { font-size: 22px; }
}
