/* =========================================================================
   ───────────────────────────────────────────────────────────────────────
   Annota8 rebrand — login / auth visual styles
   Branch: rafiq_2026  •  Source design: rafiq-final-design (Phase 1+2)
   Scope: All visual tokens + layout for the auth surface (login, signup,
          password-reset, password-change). CSS-only — no new asset URLs
          beyond images/annota8-brand-logo.png referenced by user_base.html.
   Adds:  .annota8-auth__* layout, brand colour tokens, Hellix typography,
          light/dark theme variables (toggle wired in user_base.html),
          .form-wrapper / .text-wrapper classes used by all child pages,
          show/hide-password button styling (.annota8-auth__pw-toggle),
          decorative concentric ring backdrops.
   Replaces: legacy login.css. Selectors used by other pages (e.g.
             .lsf-input-ls, .lsf-button-ls) are preserved or extended,
             not removed, so any inline overrides still cascade.
   UNCHANGED: no Django settings, view, URL, JS bundle, or backend logic.
   Safe to revert: git checkout origin/nour_dev -- <this file>
   ───────────────────────────────────────────────────────────────────────
   ========================================================================= */

/* =========================================================================
   Annota8 Auth — 2026 Brand
   Centered single-column auth (Linear / Stripe / Anthropic discipline).
   - Light (default): pastel reference background + curve rings.
   - Dark: deep Ink + brand glow + glass card.
   No animations. Lightweight, accessible. Fits 100vh on laptops/desktops.
   ========================================================================= */

:root {
  --a8-indigo: #6C63FF;
  --a8-indigo-hover: #5a53e0;
  --a8-teal: #00D4AA;
  --a8-teal-hover: #00bf99;
  --a8-coral: #FF6B6B;
  --a8-gold: #FFD700;
  --a8-ink: #0A0A0F;
  --a8-shadow: #050508;
  --a8-paper: #FFFFFF;
  --a8-muted: #8892B0;

  --a8-brand-gradient: linear-gradient(135deg, #6C63FF 0%, #00D4AA 100%);
  --a8-brand-gradient-hover: linear-gradient(135deg, #5a53e0 0%, #00bf99 100%);

  /* Light theme tokens (default) */
  --a8-bg: #FFFFFF;
  --a8-bg-alt: #F3F1EC;
  --a8-card-bg: #FFFFFF;
  --a8-card-border: rgba(10, 10, 15, 0.06);
  --a8-card-shadow: 0 32px 80px rgba(108, 99, 255, 0.10),
                    0 12px 32px rgba(10, 10, 15, 0.05),
                    0 1px 0 rgba(255, 255, 255, 0.6) inset;
  --a8-text: var(--a8-ink);
  --a8-text-soft: rgba(10, 10, 15, 0.65);
  --a8-text-muted: var(--a8-muted);
  --a8-input-bg: #F7F5F0;
  --a8-input-border: rgba(10, 10, 15, 0.06);
  --a8-input-focus-bg: #FFFFFF;
  --a8-divider: rgba(10, 10, 15, 0.08);
  --a8-checkbox-bg: #F7F5F0;
  --a8-checkbox-border: rgba(10, 10, 15, 0.18);
  --a8-caption: rgba(10, 10, 15, 0.50);
  --a8-logo-filter: none;

  --a8-bg-washes:
    radial-gradient(ellipse 60vw 50vh at 0% 0%, rgba(217, 210, 255, 0.65), transparent 55%),
    radial-gradient(ellipse 50vw 50vh at 0% 100%, rgba(199, 232, 245, 0.60), transparent 55%),
    radial-gradient(ellipse 50vw 40vh at 100% 0%, rgba(240, 217, 255, 0.40), transparent 60%),
    radial-gradient(ellipse 60vw 60vh at 100% 100%, rgba(245, 245, 255, 0.55), transparent 65%);
}

[data-color-scheme="dark"] {
  /* Match the in-app brand canon dark family — slight indigo
     undertone, never pure black; cool indigo-grey card border. */
  --a8-bg: #0B0B12;
  --a8-bg-washes:
    radial-gradient(ellipse 1200px 800px at 20% -10%, rgba(108, 99, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 900px 600px at 110% 110%, rgba(0, 212, 170, 0.12), transparent 55%);
  --a8-card-bg: rgba(19, 19, 34, 0.78);          /* ink-2 with translucency for backdrop washes */
  --a8-card-border: rgba(138, 130, 255, 0.14);    /* indigo-tinted hairline */
  --a8-card-shadow: 0 32px 80px rgba(0, 0, 0, 0.65),
                    0 12px 32px rgba(0, 0, 0, 0.45),
                    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --a8-text: #F0EFF7;
  --a8-text-soft: #B8B6CC;
  --a8-text-muted: #7E7D95;
  --a8-input-bg: #08080F;
  --a8-input-border: #2A2A40;
  --a8-input-focus-bg: #0B0B16;
  --a8-divider: #1F1F30;
  --a8-checkbox-bg: #08080F;
  --a8-checkbox-border: #3A3A55;
  --a8-caption: #7E7D95;
  --a8-logo-filter: brightness(0) invert(1);
}

html, body { height: 100%; margin: 0; padding: 0; }
body {
  background: var(--a8-bg);
  color: var(--a8-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Layout shell === */
.annota8-auth {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(12px, 1.6vw, 20px) clamp(20px, 3vw, 40px);
  overflow: hidden;
  box-sizing: border-box;
}

/* === Backdrop === */
.annota8-auth__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--a8-bg-washes);
}

.annota8-auth__rings {
  position: absolute;
  width: 1200px;
  height: 1200px;
  border-radius: 50%;
  pointer-events: none;
  background:
    repeating-radial-gradient(circle at center,
      transparent 0, transparent 60px,
      rgba(108, 99, 255, 0.04) 60px, rgba(108, 99, 255, 0.04) 61px,
      transparent 61px, transparent 120px);
  mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
}
[data-color-scheme="dark"] .annota8-auth__rings {
  background:
    repeating-radial-gradient(circle at center,
      transparent 0, transparent 60px,
      rgba(255, 255, 255, 0.018) 60px, rgba(255, 255, 255, 0.018) 61px,
      transparent 61px, transparent 120px);
}
.annota8-auth__rings--tl { top: -650px; left: -650px; }
.annota8-auth__rings--bl {
  bottom: -650px; left: -750px;
  background:
    repeating-radial-gradient(circle at center,
      transparent 0, transparent 70px,
      rgba(0, 212, 170, 0.04) 70px, rgba(0, 212, 170, 0.04) 71px,
      transparent 71px, transparent 140px);
}
[data-color-scheme="dark"] .annota8-auth__rings--bl {
  background:
    repeating-radial-gradient(circle at center,
      transparent 0, transparent 70px,
      rgba(0, 212, 170, 0.022) 70px, rgba(0, 212, 170, 0.022) 71px,
      transparent 71px, transparent 140px);
}
.annota8-auth__rings--tr {
  top: -800px; right: -700px;
  width: 1400px; height: 1400px;
  background:
    repeating-radial-gradient(circle at center,
      transparent 0, transparent 90px,
      rgba(217, 210, 255, 0.20) 90px, rgba(217, 210, 255, 0.20) 91px,
      transparent 91px, transparent 180px);
}
[data-color-scheme="dark"] .annota8-auth__rings--tr {
  background:
    repeating-radial-gradient(circle at center,
      transparent 0, transparent 90px,
      rgba(108, 99, 255, 0.022) 90px, rgba(108, 99, 255, 0.022) 91px,
      transparent 91px, transparent 180px);
}

/* === Header bar === */
.annota8-auth__top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.annota8-auth__top-spacer { width: 40px; height: 40px; }

.annota8-auth__theme-toggle {
  --size: 40px;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  border: 1px solid var(--a8-card-border);
  background: var(--a8-card-bg);
  color: var(--a8-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.annota8-auth__theme-toggle:hover {
  border-color: var(--a8-indigo);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(108, 99, 255, 0.18);
}
.annota8-auth__theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.28);
  border-color: var(--a8-indigo);
}
.annota8-auth__theme-toggle svg { width: 18px; height: 18px; display: block; }
.annota8-auth__theme-toggle .icon-sun { display: none; }
.annota8-auth__theme-toggle .icon-moon { display: block; }
[data-color-scheme="dark"] .annota8-auth__theme-toggle .icon-sun { display: block; }
[data-color-scheme="dark"] .annota8-auth__theme-toggle .icon-moon { display: none; }

/* === Main: side-by-side hero + card, both vertically centered === */
.annota8-auth__main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: clamp(40px, 6vw, 96px);
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  min-height: 0;
}

/* === Hero (left column, vertically centered) === */
.annota8-auth__hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(12px, 1.4vw, 20px);
  text-align: left;
  width: 100%;
  max-width: 640px;
  min-width: 0;
}

.annota8-auth__brand {
  display: block;
  text-decoration: none;
  transition: transform 0.18s ease;
  line-height: 0;
  /* Optical: PNG has ~0.23% transparent left padding; pull the logo
     left so its first visible glyph aligns to the same column as the
     tagline's "W" below. */
  margin-left: -0.23%;
}
.annota8-auth__brand:hover { transform: translateY(-1px); }

.annota8-auth__logo {
  width: clamp(280px, 38vw, 580px);
  height: auto;
  filter: var(--a8-logo-filter);
  display: block;
}

/* === Card (right column) — vertically centered === */
.annota8-auth__card {
  position: relative;
  width: min(440px, 100%);
  justify-self: center;
  padding: clamp(28px, 3vw, 40px);
  border-radius: 22px;
  background: var(--a8-card-bg);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--a8-card-border);
  box-shadow: var(--a8-card-shadow);
  color: var(--a8-text);
  overflow: hidden;
}

/* Designer touch: 3px brand-gradient bar at the very top of the card */
.annota8-auth__card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--a8-brand-gradient);
  border-radius: 22px 22px 0 0;
}

.annota8-auth__card .form-wrapper {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.annota8-auth__card .form-wrapper__head {
  margin-bottom: clamp(20px, 2.4vw, 28px);
}

.annota8-auth__card .form-wrapper h2 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.85rem, 2.7vw, 2.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.018em;
  text-align: left;
  margin: 0 0 0.4rem 0;
  color: var(--a8-text);
}

.annota8-auth__card .form-wrapper h2 .accent {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.005em;
  background: var(--a8-brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-left: 0.12em;
}

.annota8-auth__card .form-wrapper__sub,
.annota8-auth__card .form-wrapper > p {
  color: var(--a8-text-muted) !important;
  margin: 0 !important;
  font-size: 0.88rem !important;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.005em;
}

/* Form */
.annota8-auth__card form {
  display: grid;
  grid-auto-flow: row;
  gap: 16px;
}
.annota8-auth__card form > * { position: relative; }
.annota8-auth__card form p { margin: 0; }
.annota8-auth__card .input-wrapper { display: block; position: relative; }

.annota8-auth__card label {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  color: var(--a8-text-soft);
  display: block;
}

.annota8-auth__card .input-wrapper__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.annota8-auth__card .input-wrapper__label-row label { margin-bottom: 0; }
.annota8-auth__card .input-wrapper__inline-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--a8-indigo);
  text-decoration: none;
  transition: color 0.15s ease;
}
.annota8-auth__card .input-wrapper__inline-link:hover {
  color: var(--a8-teal);
  text-decoration: underline;
}

.annota8-auth__card input[type="text"],
.annota8-auth__card input[type="email"],
.annota8-auth__card input[type="password"] {
  width: 100%;
  background: var(--a8-input-bg);
  border: 1px solid var(--a8-input-border);
  border-radius: 12px;
  height: 48px;
  padding: 0 16px;
  color: var(--a8-text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-sizing: border-box;
}
.annota8-auth__card .input-wrapper--password input[type="password"],
.annota8-auth__card .input-wrapper--password input[type="text"] {
  padding-right: 48px;
}
.annota8-auth__card input[type="text"]:focus,
.annota8-auth__card input[type="email"]:focus,
.annota8-auth__card input[type="password"]:focus {
  outline: none;
  border-color: var(--a8-indigo);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.20);
  background: var(--a8-input-focus-bg);
}
.annota8-auth__card input::placeholder { color: var(--a8-text-muted); }
.annota8-auth__card input:-webkit-autofill,
.annota8-auth__card input:-webkit-autofill:hover,
.annota8-auth__card input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--a8-text);
  -webkit-box-shadow: 0 0 0 1000px var(--a8-input-bg) inset;
  caret-color: var(--a8-text);
}

.annota8-auth__pw-toggle {
  position: absolute;
  right: 8px; bottom: 5px;
  width: 38px; height: 38px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--a8-text-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.15s ease, background 0.15s ease;
}
.annota8-auth__pw-toggle:hover { color: var(--a8-indigo); background: var(--a8-divider); }
.annota8-auth__pw-toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.32); }
.annota8-auth__pw-toggle svg { width: 18px; height: 18px; }
.annota8-auth__pw-toggle.is-on { color: var(--a8-indigo); }

.annota8-auth__card .error,
.annota8-auth__card .field_errors {
  color: var(--a8-coral);
  font-size: 0.85rem;
  margin: 0;
  list-style: none;
  padding: 0;
  line-height: 1.4;
}
.annota8-auth__card .field_errors li { margin-top: 0.25rem; }

.annota8-auth__card .form-group {
  display: flex; align-items: center; gap: 0.5rem; margin: 0;
}
.annota8-auth__card .form-group input[type="checkbox"] {
  position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0;
}
.annota8-auth__card .form-group label {
  position: relative;
  cursor: pointer;
  margin: 0;
  padding-left: 28px;
  color: var(--a8-text-soft);
  font-size: 0.85rem !important;
  font-weight: 400 !important;
  letter-spacing: 0;
}
.annota8-auth__card .form-group label::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  background: var(--a8-checkbox-bg);
  border: 1px solid var(--a8-checkbox-border);
  border-radius: 5px;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.annota8-auth__card .form-group input[type="checkbox"]:checked + label::before {
  background: var(--a8-brand-gradient);
  border-color: transparent;
}
.annota8-auth__card .form-group input[type="checkbox"]:checked + label::after {
  content: '';
  position: absolute;
  left: 6px; top: 50%;
  transform: translateY(-65%) rotate(45deg);
  width: 5px; height: 10px;
  border: solid var(--a8-paper);
  border-width: 0 2px 2px 0;
}

.annota8-auth__card .lsf-button-ls.lsf-button-ls_look_primary {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 12px;
  background: var(--a8-brand-gradient);
  color: var(--a8-paper) !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
  box-shadow: 0 1px 2px rgba(0, 212, 170, 0.30);
  --button-color: var(--a8-paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}
.annota8-auth__card .lsf-button-ls.lsf-button-ls_look_primary svg {
  width: 18px;
  height: 18px;
  transition: transform 0.18s ease;
}
.annota8-auth__card .lsf-button-ls.lsf-button-ls_look_primary:hover {
  background: var(--a8-brand-gradient-hover);
  box-shadow: 0 12px 32px rgba(0, 212, 170, 0.38), 0 4px 14px rgba(108, 99, 255, 0.32);
  transform: translateY(-1px);
}
.annota8-auth__card .lsf-button-ls.lsf-button-ls_look_primary:hover svg {
  transform: translateX(2px);
}

/* === Inside-card switcher (Need access? Contact admin) === */
.annota8-auth__card .text-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--a8-text-soft);
  margin: 1rem 0 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--a8-divider);
}
.annota8-auth__card .text-wrapper p { margin: 0; }
.annota8-auth__card .text-wrapper a {
  color: var(--a8-indigo);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}
.annota8-auth__card .text-wrapper a:hover {
  color: var(--a8-teal);
  text-decoration: underline;
}

/* === Brand voice line (Playfair — high-contrast classical serif, readable at large size) === */
.annota8-auth__voice {
  margin: 0;
  /* Optical-align W glyph to logo A apex: side-bearing of W in Playfair
     is ~0.04em; nudge text right so the W's visual left edge sits flush
     with the logo's leftmost visible pixel. */
  padding-left: 0;
  text-indent: -0.04em;
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 4.2vw, 3.8rem);
  font-style: normal;
  font-weight: 700;
  font-feature-settings: "kern" 1, "liga" 1;
  color: var(--a8-text);
  text-align: left;
  letter-spacing: -0.018em;
  line-height: 1.05;
  max-width: 100%;
}
.annota8-auth__voice em {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.012em;
  background: var(--a8-brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* === Footer === */
.annota8-auth__bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.annota8-auth__trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--a8-text-soft);
}
.annota8-auth__trust li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.annota8-auth__trust .dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--a8-brand-gradient);
}

.annota8-auth__copyright {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--a8-caption);
  letter-spacing: 0.04em;
}

/* Legacy upstream tips */
.tips { display: none !important; }

/* auto-generated forms (password change/reset confirm) */
.annota8-auth__card .auto-generated form { width: 100%; }
.annota8-auth__card .auto-generated form label { display: block; }
.annota8-auth__card .auto-generated form input {
  height: 48px;
  background: var(--a8-input-bg);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--a8-text);
  border: 1px solid var(--a8-input-border);
  border-radius: 12px;
  box-sizing: border-box;
  padding: 0 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.annota8-auth__card .auto-generated form input:focus {
  outline: none;
  border-color: var(--a8-indigo);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.20);
  background: var(--a8-input-focus-bg);
}
.annota8-auth__card .auto-generated p:empty { display: none; }
.annota8-auth__card .auto-generated form ul { margin-bottom: 0; padding-left: 1.1rem; }
.annota8-auth__card .auto-generated form ul li:not(:last-child) { margin-bottom: 0.4em; }

/* === Responsive — stack to single column under 960px === */
@media (max-width: 960px) {
  .annota8-auth { height: auto; min-height: 100vh; }
  .annota8-auth__main {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 16px 0 24px;
  }
  .annota8-auth__hero { align-items: center; text-align: center; max-width: 100%; }
  .annota8-auth__voice { text-align: center; font-size: clamp(1.5rem, 5vw, 2.4rem); }
  .annota8-auth__card { justify-self: center; }
}

@media (max-width: 540px) {
  .annota8-auth { padding: 16px; }
  .annota8-auth__logo { width: clamp(220px, 60vw, 360px); }
  .annota8-auth__card { padding: 22px; border-radius: 18px; }
  .annota8-auth__card .form-wrapper h2 { font-size: 1.55rem; }
  .annota8-auth__theme-toggle { --size: 36px; }
  .annota8-auth__bottom { justify-content: center; }
  .annota8-auth__copyright { display: none; }
}

/* Short viewports — trim to keep no-scroll */
@media (max-height: 800px) {
  .annota8-auth__main { gap: clamp(28px, 5vw, 64px); }
  .annota8-auth__hero { gap: 18px; }
  .annota8-auth__voice { font-size: clamp(1.7rem, 3.6vw, 3.2rem); }
  .annota8-auth__logo { width: clamp(240px, 30vw, 460px); }
  .annota8-auth__card { padding: clamp(22px, 2.4vw, 32px); }
  .annota8-auth__card .form-wrapper__head { margin-bottom: 18px; }
  .annota8-auth__card form { gap: 14px; }
}
@media (max-height: 700px) {
  .annota8-auth__voice { font-size: clamp(1.3rem, 2.6vw, 2rem); }
  .annota8-auth__logo { width: clamp(200px, 24vw, 360px); }
}

/* === Brand DNA backdrop layers — login pages =====================
   Same Layer 2 (dot grid) + Layer 3 (cursor reveal) as the
   authenticated app shell (PageBackground.scss). Cursor JS lives in
   user_base.html so the --mx / --my CSS vars track the mouse.
   See docs/design/dna/BRAND-DNA.md §4. */

html { isolation: isolate; }

/* L2 · soft dot grid — ambient texture, blurred default */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image: radial-gradient(rgba(11, 15, 25, 0.05) 0.8px, transparent 1.8px);
  background-size: 24px 24px;
  filter: blur(0.7px);
  opacity: 0.85;
}

/* L3 · cursor reveal — sharper dots inside a 240px mask around the mouse */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: radial-gradient(rgba(11, 15, 25, 0.16) 1.2px, transparent 2px);
  background-size: 24px 24px;
  -webkit-mask: radial-gradient(circle 240px at var(--mx, 50%) var(--my, 30%),
                rgba(0,0,0,1) 0%, rgba(0,0,0,0) 75%);
          mask: radial-gradient(circle 240px at var(--mx, 50%) var(--my, 30%),
                rgba(0,0,0,1) 0%, rgba(0,0,0,0) 75%);
  transition: -webkit-mask 80ms linear, mask 80ms linear;
}

[data-color-scheme="dark"] body::before {
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 0.8px, transparent 1.8px);
}
[data-color-scheme="dark"] body::after {
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1.2px, transparent 2px);
}

/* =========================================================================
   Legacy auth shell (templates/users/user_base.html → `.login_page`)
   The new-ui templates carry the full pastel-halo chrome via .annota8-auth__*
   classes. This block gives the legacy fallback the same brand voice — just
   in case a feature flag or older code path renders it. Centered, calm,
   wordmark + hero + toggle, on the same body backdrop as the new-ui.
   ========================================================================= */
.login_page {
  max-width: 460px;
  margin: 0 auto;
  padding: clamp(60px, 12vh, 120px) 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  position: relative;
  z-index: 2;
}
.login_page .annota8-legacy-wordmark {
  height: 48px;
  width: auto;
  filter: var(--a8-logo-filter, none);
  margin-bottom: 8px;
  user-select: none;
  -webkit-user-select: none;
}
.login_page h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: 0;
  margin: 0;
  color: var(--a8-text);
}
.login_page h2 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 8px;
  color: var(--a8-text-soft);
}
.login_page .toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--a8-input-bg);
  border: 1px solid var(--a8-input-border);
}
.login_page .toggle a {
  padding: 8px 16px;
  border-radius: 999px;
  font: 600 12px/1 'Inter', sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--a8-text-soft);
  text-decoration: none;
  transition: all 150ms ease-out;
}
.login_page .toggle a.active {
  background: linear-gradient(135deg, #8A82FF 0%, #3DDCC0 100%);
  color: #FFFFFF;
  text-shadow: 0 1px 0 rgba(10, 10, 24, 0.18);
  box-shadow: 0 3px 10px rgba(108, 99, 255, 0.22);
}
.login_page .toggle a:not(.active):hover {
  color: var(--a8-text);
  background: rgba(108, 99, 255, 0.06);
}
.login_page form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.login_page input.lsf-input-ls {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--a8-input-bg);
  border: 1px solid var(--a8-input-border);
  color: var(--a8-text);
  font: 400 14px/1.4 'Inter', sans-serif;
  transition: border-color 150ms ease-out, background 150ms ease-out;
}
.login_page input.lsf-input-ls:focus {
  outline: none;
  border-color: rgba(108, 99, 255, 0.5);
  background: var(--a8-input-focus-bg);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.14);
}
.login_page button.lsf-button-ls_look_primary {
  margin-top: 4px;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #8A82FF 0%, #3DDCC0 100%);
  color: #FFFFFF;
  text-shadow: 0 1px 0 rgba(10, 10, 24, 0.18);
  font: 700 13px/1 'Inter', sans-serif;
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(108, 99, 255, 0.22);
  transition: all 150ms ease-out;
}
.login_page button.lsf-button-ls_look_primary:hover {
  background: linear-gradient(135deg, #756DF0 0%, #2BC9AD 100%);
  box-shadow: 0 5px 14px rgba(108, 99, 255, 0.30);
  transform: translateY(-1px);
}
.login_page p.error {
  margin: 4px 0 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 107, 107, 0.10);
  border: 1px solid rgba(255, 107, 107, 0.28);
  color: var(--a8-text);
  font: 500 13px/1.4 'Inter', sans-serif;
  text-align: left;
}
