/* Glacier Aurora — the CRM look Alex picked on Oct 22 2026 (replaces the amber "light" accent).
   Loaded right after tokens.css by the CRM shell only (index.html, login.html). Customer-facing pages
   (quote, pay, sign, r, refer, book) keep their own portal theme and are NOT affected.
   Default / System / Dark = Aurora dark. Settings > Light = icy light variant.
   Contrast (WCAG AA): text #eaf4ff on #12161d 15.6:1, text-2 #aab6c6 8.8:1, text-3 #7f8a99 5.2:1,
   text-3 on bg 5.7:1, accent #a9e4ff on #12161d 13.2:1, #07090d on accent button 14.5:1; light: accent-ink #165c94 on #fff 7.0:1, white on #1f6fb2 5.3:1, text-3 #5f6a79 on #f3f6fa 5.1:1. */
:root:root {
  color-scheme: dark;

  /* Glacier Aurora (picked by Alex Oct 22 2026): deep night ground, icy surfaces, ice-blue/violet accent */
  --bg: #07090d;
  --surface: #12161d;
  --surface-2: #171c25;     /* subtle inset / hover */
  --surface-3: #1e2530;     /* pressed / selected */
  --line: #222a35;          /* hairline dividers */
  --line-strong: #323c4a;
  --overlay: rgba(2, 4, 8, 0.66);

  /* Text */
  --text: #eaf4ff;
  --text-2: #aab6c6;
  --text-3: #7f8a99;
  --text-inverse: #07090d;

  --fill: #171c25;
  --r-group: 18px;
  --tap: 44px;

  /* Brand accent: Glacier Aurora (ice blue -> violet, teal/sky glows) */
  --accent: #a9e4ff;         /* buttons, highlights (dark ink #07090d on it: 14.9:1) */
  --accent-hover: #c4edff;
  --accent-soft: #13263a;    /* tinted backgrounds */
  --accent-ink: #a9e4ff;     /* accent as text on dark surfaces (12.6:1 on #12161d) */
  --accent-2: #b7a9ff;       /* violet half of the aurora */
  --glow-teal: #2bd9c6;
  --glow-sky: #7fd4ff;
  --accent-grad: linear-gradient(135deg, #ffffff 0%, #a9e4ff 50%, #b7a9ff 100%);
  --aurora-text: linear-gradient(90deg, #ffffff, #a9e4ff 60%, #b7a9ff);
  --aurora-bg: radial-gradient(600px 400px at 85% 260px, rgba(43,217,198,0.13), transparent 70%),
               radial-gradient(500px 500px at 0% 800px, rgba(106,125,255,0.12), transparent 70%),
               radial-gradient(500px 400px at 100% 1400px, rgba(127,212,255,0.10), transparent 70%);
  --accent-glow: 0 0 0 4px rgba(127, 212, 255, 0.24);

  /* Semantic */
  --good: #3ccf7a; --good-soft: #10281b; --good-ink: #5fdc93;
  --warn: #f0a33a; --warn-soft: #2b1f0f; --warn-ink: #f3b45c;
  --bad: #f0645f; --bad-soft: #2d1514; --bad-ink: #f58a86;
  --info: #7fd4ff; --info-soft: #102233; --info-ink: #9fdcff;
  --violet: #b7a9ff; --violet-soft: #1d1a33; --violet-ink: #c6bbff;
  --teal: #2bd9c6; --teal-soft: #0d2826; --teal-ink: #5fe3d4;

  /* Stage palette (pipeline columns / pills) */
  --stage-new: var(--info);
  --stage-contacted: var(--violet);
  --stage-engaged: var(--teal);
  --stage-quoted: var(--accent-2);
  --stage-won: var(--good);
  --stage-lost: var(--text-3);

  --shadow-1: 0 1px 2px rgba(0,0,0,0.5);
  --shadow-2: 0 6px 18px rgba(0,0,0,0.45);
  --shadow-3: 0 24px 60px rgba(0,0,0,0.6);
}

:root:root[data-theme="light"] {
  /* Glacier Aurora — light variant (only when someone picks Light in Settings) */
  color-scheme: light;
  --bg: #f3f6fa; --surface: #ffffff; --surface-2: #eef2f7; --surface-3: #e3e9f1;
  --line: #dde4ed; --line-strong: #c3ccd8; --overlay: rgba(7,9,13,0.45); --fill: #e7ecf3;
  --text: #0c1118; --text-2: #4a5563; --text-3: #5f6a79; --text-inverse: #ffffff;
  --accent: #1f6fb2; --accent-hover: #195d96; --accent-soft: #e3f1fb; --accent-ink: #165c94;
  --accent-2: #5b4bd1;
  --accent-grad: linear-gradient(135deg, #3d8fd6 0%, #1f6fb2 55%, #5b4bd1 100%);
  --aurora-text: linear-gradient(90deg, #0c1118, #1f6fb2 60%, #5b4bd1);
  --aurora-bg: none;
  --accent-glow: 0 0 0 4px rgba(31, 111, 178, 0.22);
  --good: #1f9d55; --good-soft: #e3f5ea; --good-ink: #17703d;
  --warn: #d97706; --warn-soft: #fdf0dc; --warn-ink: #9a4f00;
  --bad: #d3403c; --bad-soft: #fbe6e5; --bad-ink: #a12f2c;
  --info: #2f6fdb; --info-soft: #e6eefb; --info-ink: #234f9e;
  --violet: #7c5cd6; --violet-soft: #eee9fb; --violet-ink: #5a3fb0;
  --teal: #0f9f9a; --teal-soft: #e0f5f4; --teal-ink: #0b6f6b;
  --shadow-1: 0 1px 2px rgba(12,17,24,0.06), 0 1px 1px rgba(12,17,24,0.04);
  --shadow-2: 0 4px 14px rgba(12,17,24,0.08), 0 1px 3px rgba(12,17,24,0.06);
  --shadow-3: 0 18px 50px rgba(12,17,24,0.18), 0 4px 12px rgba(12,17,24,0.08);
}

/* ---------- Aurora surfaces & controls (shared, all screens) ---------- */
body { background: var(--aurora-bg), var(--bg); background-attachment: fixed; }
.brand__mark { background: var(--accent-grad); color: #07090d; box-shadow: 0 0 18px rgba(127, 212, 255, 0.35); }
.btn.primary { background: var(--accent-grad); border-color: transparent; color: var(--text-inverse); box-shadow: 0 0 22px rgba(127, 212, 255, 0.22), 0 1px 2px rgba(0, 0, 0, 0.3); }
.btn.primary:hover { background: var(--accent-grad); filter: brightness(1.06); border-color: transparent; }
:root:root[data-theme="light"] .btn.primary { color: #ffffff; box-shadow: 0 1px 2px rgba(12, 17, 24, 0.18); }
.card, .group { backdrop-filter: saturate(1.1); }
.page-head h1, .lu-hero-title { background: var(--aurora-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chip.active { background: var(--accent-soft); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
::selection { background: rgba(127, 212, 255, 0.35); }
:focus-visible { outline-color: var(--glow-sky, #7fd4ff); }
