/* =========================================================
   Sovereign Grace Financial — Agent Portal
   Preview build v0.1
   Brand tokens match the main marketing site exactly.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette */
  --navy: #1C2F6B;
  --navy-700: #182760;
  --navy-900: #0c1430;
  --silver: #C5CCD6;
  --silver-200: #e6eaf0;
  /* Accent: House of Colour Sultry Winter — plum family.
     Variable name 'champagne' kept for backwards compatibility; semantic value is plum. */
  --champagne: #4A1E5C;       /* plum — primary accent (House of Colour Sultry Winter) */
  --champagne-700: #2F0F40;   /* deep plum — hover/active */
  --ruby-light: #8B5BA1;      /* cool light plum — secondary highlight */
  --icy-pink: #E8D5F0;        /* icy lavender — verse text, soft accents on navy */
  --ivory: #faf6ef;           /* legacy token kept for button text on dark CTAs */
  --cream: #f4ede1;        /* legacy token kept for backwards compatibility */
  --frost: #e8eef7;        /* Winter palette: cool, clear icy-blue page background */
  --frost-soft: #dde6f2;   /* slightly deeper frost for sunken/elevated surfaces */
  --ink: #0c1430;          /* deep navy-black for text (Winter clarity) */
  --ink-soft: #3a4566;
  --ink-muted: #5a6680;
  --border: #cfd9e8;       /* cool blue-grey border */
  --danger: #a23a3a;

  /* Surfaces (light mode default — Icy Frost) */
  --bg: var(--frost);
  --surface: #ffffff;
  --surface-soft: var(--frost-soft);
  --surface-elev: #ffffff;
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --text-muted: var(--ink-muted);
  --border-color: var(--border);
  --header-bg: rgba(232, 238, 247, 0.85);
  --shadow-sm: 0 1px 2px rgba(28, 47, 107, 0.04);
  --shadow-md: 0 4px 16px rgba(28, 47, 107, 0.08);
  --shadow-lg: 0 12px 32px rgba(28, 47, 107, 0.12);
  --focus: 0 0 0 3px rgba(184, 58, 92, 0.45);

  /* Typography */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Radius */
  --r-sm: 4px;
  --r: 8px;
  --r-md: 10px;
  --r-lg: 16px;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t: 220ms;
}

[data-theme="dark"] {
  --bg: var(--navy-900);
  --surface: #131c3e;
  --surface-soft: #182549;
  --surface-elev: #182549;
  --text: #ecedf2;
  --text-soft: #c5ccd6;
  --text-muted: #8a92a8;
  --border-color: #1f2a4a;
  --header-bg: rgba(12, 20, 48, 0.85);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}

h1 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 400; }
h2 { font-size: 24px; font-weight: 500; }
h3 { font-size: 18px; font-weight: 500; }
h4 { font-size: 15px; font-weight: 500; }

p { margin: 0 0 var(--s-3); color: var(--text-soft); }
em { font-style: italic; }

a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--t) var(--ease);
}
[data-theme="dark"] a { color: #b9c2e0; }
a:hover { color: var(--champagne); }

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-sm);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 10px 18px;
  border-radius: var(--r);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--t) var(--ease), color var(--t) var(--ease),
              border-color var(--t) var(--ease), transform var(--t) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--navy);
  color: var(--ivory);
  border-color: var(--navy);
}
.btn-primary:hover { background: var(--navy-700); color: var(--ivory); }

.btn-cta {
  background: var(--champagne);
  color: var(--ivory);
  border-color: var(--champagne);
}
.btn-cta:hover { background: var(--champagne-700); color: var(--ivory); border-color: var(--champagne-700); }
/* Dark mode: silver-filled buttons with deep plum text — mirrors the logo's silver metallic
   and gives clean contrast on the navy backdrop. */
[data-theme="dark"] .btn-cta {
  background: var(--silver);
  color: var(--champagne-700);
  border-color: var(--silver);
}
[data-theme="dark"] .btn-cta:hover {
  background: var(--silver-200);
  color: var(--champagne-700);
  border-color: var(--silver-200);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-color);
}
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
[data-theme="dark"] .btn-ghost:hover { color: var(--silver); border-color: var(--silver); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover { background: var(--danger); color: white; }

/* ---------- Form ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--s-4);
}
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}
.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border-radius: var(--r);
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--champagne);
  box-shadow: var(--focus);
}
.field input[readonly] {
  background: var(--surface-soft);
  color: var(--text-muted);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

/* Admin soft nudge — sits below header-inner, links to flagged queue. */
.admin-nudge {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 24px;
  border-top: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--champagne) 14%, var(--header-bg));
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--t) var(--ease);
}
.admin-nudge:hover { background: color-mix(in srgb, var(--champagne) 22%, var(--header-bg)); }
.admin-nudge svg { color: var(--champagne); flex-shrink: 0; }
.admin-nudge > span:first-of-type { flex: 1; min-width: 0; }
.admin-nudge-cta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--champagne);
  padding: 4px 10px;
  border: 1px solid var(--champagne);
  border-radius: 999px;
}
[data-theme="dark"] .admin-nudge {
  background: color-mix(in srgb, var(--champagne) 12%, var(--header-bg));
}

/* =========================================================
   Product tour — spotlight overlay + tooltip card.
   Anchors a card next to a UI element with a champagne ring.
   ========================================================= */
body.tour-active { overflow: hidden; }

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  /* Very light scrim — page stays clearly readable. No blur. */
  background: rgba(12, 20, 48, 0.18);
  pointer-events: auto;
  animation: tour-fade-in 180ms ease-out;
}
[data-theme="light"] .tour-overlay {
  background: rgba(28, 47, 107, 0.14);
}
[data-theme="dark"] .tour-overlay {
  background: rgba(0, 0, 0, 0.32);
}
@keyframes tour-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tour-spotlight {
  position: fixed;
  border-radius: 14px;
  border: 2px solid rgba(184, 58, 92, 0.95);
  box-shadow:
    0 0 0 4px rgba(184, 58, 92, 0.35),
    0 0 30px rgba(184, 58, 92, 0.45);
  transition: left 280ms cubic-bezier(0.4, 0, 0.2, 1),
              top 280ms cubic-bezier(0.4, 0, 0.2, 1),
              width 280ms cubic-bezier(0.4, 0, 0.2, 1),
              height 280ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 200ms ease;
  pointer-events: none;
  will-change: left, top, width, height;
  background: transparent;
}

.tour-tooltip {
  position: fixed;
  width: 380px;
  max-width: 380px;
  background: var(--surface, #ffffff);
  color: var(--text, #111);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px 20px 16px;
  /* Stronger drop shadow so the white card pops off the (now-lighter) page. */
  box-shadow: 0 24px 60px rgba(12, 20, 48, 0.28), 0 4px 12px rgba(12, 20, 48, 0.14);
  font-family: "Inter", system-ui, sans-serif;
  transition: left 220ms ease, top 220ms ease;
  animation: tour-pop-in 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tour-tooltip[data-placement="center"] {
  width: 440px;
  max-width: 90vw;
}
[data-theme="dark"] .tour-tooltip {
  background: #1a2249;
  border-color: rgba(184, 58, 92, 0.35);
}
@keyframes tour-pop-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.tour-tooltip[data-placement="center"] {
  animation: tour-pop-in-center 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes tour-pop-in-center {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.tour-tooltip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.tour-step-count {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--champagne);
}
.tour-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.tour-close:hover { color: var(--text); background: var(--surface-soft); }

.tour-title {
  margin: 0 0 8px;
  font-family: "Fraunces", "Inter", serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text);
}
.tour-body {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.tour-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tour-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}
.tour-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--border-color);
  transition: all 200ms ease;
}
.tour-dot.is-active {
  width: 18px;
  background: var(--champagne);
}
.tour-actions {
  display: flex;
  gap: 8px;
}
.tour-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t) var(--ease);
}
.tour-btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-color);
}
.tour-btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.tour-btn-primary {
  background: var(--champagne);
  color: #1c1006;
  border-color: var(--champagne);
}
.tour-btn-primary:hover {
  background: var(--champagne-light, #8B5BA1);
  border-color: var(--champagne-light, #8B5BA1);
}

/* First-run welcome prompt — centered card with three explicit choices. */
.tour-welcome {
  width: 420px;
  max-width: calc(100vw - 32px);
  padding: 28px 28px 22px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.tour-welcome-badge {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--champagne) 18%, transparent);
  color: var(--champagne);
  border: 1px solid color-mix(in srgb, var(--champagne) 40%, transparent);
}
.tour-welcome .tour-title {
  font-size: 24px;
  text-align: center;
}
.tour-welcome .tour-body {
  text-align: center;
  margin-bottom: 22px;
}
.tour-welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tour-welcome-actions .tour-btn {
  width: 100%;
  padding: 11px 16px;
  font-size: 14px;
}
.tour-btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  padding: 6px;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--t) var(--ease), color var(--t) var(--ease);
}
.tour-btn-link:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}

@media (max-width: 520px) {
  .tour-tooltip {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    padding: 16px;
  }
  .tour-welcome { padding: 24px 20px 18px; }
  .tour-welcome .tour-title { font-size: 21px; }
  .tour-title { font-size: 18px; }
  .tour-body { font-size: 13.5px; }
}

/* ---------- Per-page tour toast prompt ---------- */
.pagetour-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9990;
  width: min(380px, calc(100vw - 32px));
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.pagetour-toast.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.pagetour-toast-inner {
  background: var(--surface, #ffffff);
  color: var(--text, #1C2F6B);
  border: 1px solid var(--border, rgba(28,47,107,0.12));
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(12, 20, 48, 0.18);
  padding: 14px 14px 12px 14px;
}
[data-theme="dark"] .pagetour-toast-inner {
  background: #1a233f;
  color: #faf6ef;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.pagetour-toast-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.pagetour-toast-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(184, 58, 92, 0.14);
  color: #4A1E5C;
}
.pagetour-toast-text { flex: 1 1 auto; min-width: 0; }
.pagetour-toast-title {
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.25;
}
.pagetour-toast-sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-soft, rgba(28,47,107,0.65));
}
[data-theme="dark"] .pagetour-toast-sub { color: rgba(250,246,239,0.65); }
.pagetour-toast-close {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: transparent;
  border: none;
  color: var(--text-soft, rgba(28,47,107,0.55));
  cursor: pointer;
  display: grid;
  place-items: center;
}
.pagetour-toast-close:hover {
  background: rgba(28,47,107,0.06);
  color: var(--text, #1C2F6B);
}
[data-theme="dark"] .pagetour-toast-close:hover {
  background: rgba(255,255,255,0.06);
  color: #faf6ef;
}
.pagetour-toast-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.pagetour-toast-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pagetour-toast-btn.ghost {
  background: transparent;
  color: var(--text-soft, rgba(28,47,107,0.7));
  border-color: transparent;
}
.pagetour-toast-btn.ghost:hover {
  background: rgba(28,47,107,0.06);
  color: var(--text, #1C2F6B);
}
[data-theme="dark"] .pagetour-toast-btn.ghost { color: rgba(250,246,239,0.7); }
[data-theme="dark"] .pagetour-toast-btn.ghost:hover {
  background: rgba(255,255,255,0.06);
  color: #faf6ef;
}
.pagetour-toast-btn.primary {
  background: #1C2F6B;
  color: #faf6ef;
  border-color: #1C2F6B;
}
.pagetour-toast-btn.primary:hover {
  background: #0c1430;
  border-color: #0c1430;
}
[data-theme="dark"] .pagetour-toast-btn.primary {
  background: #4A1E5C;
  color: #0c1430;
  border-color: #4A1E5C;
}
[data-theme="dark"] .pagetour-toast-btn.primary:hover {
  background: #8B5BA1;
  border-color: #8B5BA1;
}
@media (max-width: 520px) {
  .pagetour-toast { right: 12px; bottom: 12px; left: 12px; width: auto; }
}

/* Tab badge — used on the admin Flagged tab to surface count. */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--champagne);
  color: #1c1006;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.header-logo img {
  height: 56px;
  width: auto;
  display: block;
}
[data-theme="dark"] .header-logo img {
  filter: brightness(0) invert(1) opacity(0.92);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}
.primary-nav a {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--r-sm);
  transition: color var(--t) var(--ease);
  white-space: nowrap;
}
.primary-nav a:hover { color: var(--text); }
.primary-nav a[aria-current="page"] {
  color: var(--text);
}
.primary-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--champagne);
  border-radius: 2px;
}

/* "More" dropdown in the primary nav */
.nav-more { position: relative; display: inline-flex; }
.nav-more-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px 8px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: color var(--t) var(--ease);
}
.nav-more-btn:hover { color: var(--text); }
.nav-more-btn svg {
  transition: transform var(--t) var(--ease);
}
.nav-more.open .nav-more-btn { color: var(--text); }
.nav-more.open .nav-more-btn svg { transform: rotate(180deg); }
.nav-more-btn[aria-current="page"] { color: var(--text); }
.nav-more-btn[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px; right: 24px;
  bottom: 0;
  height: 2px;
  background: var(--champagne);
  border-radius: 2px;
}
.nav-more-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: var(--s-2);
  display: none;
  z-index: 60;
}
.nav-more.open .nav-more-menu { display: block; }
.nav-more-menu a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--r-sm);
  transition: background var(--t) var(--ease);
}
.nav-more-menu a:hover { background: var(--surface-soft); }
.nav-more-menu a[aria-current="page"] {
  background: var(--surface-soft);
  color: var(--navy);
}

/* User menu */
.user-menu {
  position: relative;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--ivory);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--navy);
  cursor: pointer;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.user-avatar:hover { box-shadow: var(--shadow-md); }
.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: var(--s-2);
  display: none;
  z-index: 60;
}
.user-dropdown.open { display: block; }
.user-dropdown .user-info {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 6px;
}
.user-dropdown .user-info .name {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--text);
}
.user-dropdown .user-info .email {
  font-size: 12px;
  color: var(--text-muted);
}
.user-dropdown a, .user-dropdown button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  font: inherit;
  transition: background var(--t) var(--ease);
}
.user-dropdown a:hover, .user-dropdown button:hover {
  background: var(--surface-soft);
  color: var(--text);
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--r-sm);
}
.menu-toggle svg { display: block; }

@media (max-width: 880px) {
  .menu-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    padding: var(--s-3);
    gap: 0;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
  }
  .primary-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .primary-nav a {
    padding: 12px 16px;
    border-radius: var(--r-sm);
  }
  .primary-nav a[aria-current="page"]::after { display: none; }
  .primary-nav a[aria-current="page"] {
    background: var(--surface-soft);
    color: var(--navy);
  }
  /* On mobile the More dropdown collapses into a flat list — no extra menu */
  .nav-more { display: contents; }
  .nav-more-btn { display: none; }
  .nav-more-menu {
    position: static;
    display: contents;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .nav-more-menu a {
    display: block;
    padding: 12px 16px;
    border-radius: var(--r-sm);
  }
  .header-logo { margin: 0 auto; }
  .header-inner { padding: 12px 16px; }
}

/* ---------- Layout ---------- */
.page {
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--s-7) 24px var(--s-7);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.page > * { width: 100%; min-width: 0; box-sizing: border-box; }
@media (max-width: 700px) {
  .page { padding: var(--s-5) 16px var(--s-6); }
}

.page-header {
  margin-bottom: var(--s-6);
}
.page-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--champagne);
  font-weight: 500;
  margin-bottom: 8px;
}
.page-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 36px);
  letter-spacing: -0.015em;
}
.page-subtitle {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  padding: var(--s-5);
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-tight { padding: var(--s-4); }

.card-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-2);
}
.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ---------- Section heads ---------- */
.section {
  margin-top: var(--s-7);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s-4);
  gap: var(--s-4);
}
.section-head h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.section-head a {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.section-head a:hover { color: var(--champagne); }

/* ---------- Date chip ---------- */
.date-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--ivory);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  min-width: 56px;
  text-align: center;
}
.date-chip .m {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.8;
}
.date-chip .d {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
}

/* ---------- Tag / pill ---------- */
.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
}
.tag-navy {
  background: var(--navy);
  color: var(--ivory);
  border-color: var(--navy);
}
.tag-champagne {
  background: rgba(184, 58, 92, 0.14);
  color: var(--champagne-700);
  border-color: rgba(184, 58, 92, 0.3);
}
[data-theme="dark"] .tag-champagne { color: var(--champagne); }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: var(--s-5) 16px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  background: var(--navy);
  color: var(--ivory);
  padding: 12px 18px;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  max-width: 360px;
  pointer-events: auto;
  animation: toast-in var(--t) var(--ease);
}
@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(12, 20, 48, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  animation: fade-in var(--t) var(--ease);
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 540px;
  padding: var(--s-6);
  box-shadow: var(--shadow-lg);
  max-height: 85vh;
  overflow-y: auto;
}
.modal h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  margin-bottom: var(--s-4);
}
.modal-actions {
  display: flex;
  gap: var(--s-2);
  justify-content: flex-end;
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border-color);
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* =========================================================
   Page-specific styles
   ========================================================= */

/* ---------- Login ---------- */
.login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-6) 16px;
  background: var(--bg);
  position: relative;
}
.back-link {
  position: absolute;
  top: 24px;
  left: 24px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.back-link:hover { color: var(--champagne); }
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r-md);
  padding: var(--s-7) var(--s-6);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.login-logo {
  width: 110px;
  height: auto;
  margin: 0 auto var(--s-4);
  display: block;
}
[data-theme="dark"] .login-logo {
  filter: brightness(0) invert(1) opacity(0.95);
}
.login-card h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.login-card .login-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: var(--s-5);
  display: block;
}
.login-card form {
  text-align: left;
  margin-top: var(--s-5);
}
.login-card .btn { width: 100%; }
.login-card .forgot {
  display: block;
  margin-top: var(--s-3);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.login-card .forgot:hover { color: var(--champagne); }

.demo-creds {
  margin-top: var(--s-6);
  padding: var(--s-4);
  background: var(--surface-soft);
  border: 1px dashed var(--border-color);
  border-radius: var(--r);
  text-align: left;
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.5;
}
.demo-creds .label {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}
.demo-creds code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--border-color);
  padding: 1px 4px;
  border-radius: 3px;
}
[data-theme="dark"] .demo-creds code { color: var(--silver); }
.demo-creds .note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  font-style: italic;
  color: var(--text-muted);
  font-size: 11.5px;
}

/* ---------- Dashboard ---------- */
.welcome-strip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--border-color);
}
.welcome-strip h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(26px, 3.5vw, 34px);
  letter-spacing: -0.015em;
}
.welcome-strip h1 em {
  color: var(--champagne);
  font-style: italic;
}
.welcome-strip .date {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@media (max-width: 600px) {
  .welcome-strip { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Verse of the day */
.verse-of-day {
  max-width: 680px;
  margin: var(--s-2) auto var(--s-8);
  padding: var(--s-5) var(--s-5);
  text-align: center;
}
.verse-of-day .verse-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  color: var(--navy, #1C2F6B);
  letter-spacing: -0.005em;
  margin: 0 0 10px;
}
.verse-of-day .verse-ref {
  position: relative;
  display: inline-block;
  font-family: var(--font-sans, Inter, sans-serif);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--champagne, #4A1E5C);
  margin: 0;
}
@media (max-width: 600px) {
  .verse-of-day { padding: var(--s-4) var(--s-3); }
}

/* Dark mode — verse text in icy pink (Sultry Winter accent). */
[data-theme="dark"] .verse-of-day .verse-text,
[data-theme="dark"] .verse-today .verse-text {
  color: var(--icy-pink);
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--s-6);
}
@media (max-width: 880px) { .dash-grid { grid-template-columns: 1fr; } }

/* Announcements list (used on dashboard + full page) */
.announcement-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.announcement {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  padding: var(--s-5);
  transition: box-shadow var(--t) var(--ease);
}
.announcement:hover { box-shadow: var(--shadow-md); }
.announcement .ann-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.announcement h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 19px;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.announcement p { margin: 0; }
.announcement .author {
  color: var(--navy);
  font-weight: 500;
}
[data-theme="dark"] .announcement .author { color: var(--silver); }

/* Events list */
.events-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.event {
  display: flex;
  gap: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  padding: var(--s-4);
  align-items: center;
  transition: box-shadow var(--t) var(--ease);
}
.event:hover { box-shadow: var(--shadow-sm); }
.event .event-body { flex: 1; min-width: 0; }
.event h4 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}
.event .meta {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.event .meta .dot { color: var(--silver); }
.event .ics-btn {
  font-size: 12px;
  padding: 5px 10px;
}

/* Quick links / carrier tiles */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-4);
}
.tile-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.tile-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .tile-grid.cols-3, .tile-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .tile-grid.cols-3, .tile-grid.cols-4 { grid-template-columns: 1fr; }
}

.tile {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  padding: var(--s-4);
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
}
.tile:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--silver);
}
.tile h4 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}
.tile p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* Carrier card (detailed) */
.carrier-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.carrier-card:hover { box-shadow: var(--shadow-md); border-color: var(--silver); }
.carrier-card h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.carrier-card .desc {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.5;
}
.carrier-card .open {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  margin-top: 4px;
}
[data-theme="dark"] .carrier-card .open { color: var(--silver); }
.carrier-card .sub-links {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  font-size: 12.5px;
  margin-top: var(--s-2);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border-color);
}
.carrier-card .sub-links a {
  color: var(--text-muted);
}
.carrier-card .sub-links a:hover { color: var(--champagne); }

/* Documents table */
.doc-toolbar {
  display: flex;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
  align-items: center;
}
.search-input {
  flex: 1;
  min-width: 240px;
  position: relative;
}
.search-input input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.search-input input:focus {
  border-color: var(--champagne);
  outline: none;
  box-shadow: var(--focus);
}
.search-input::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--text-muted);
  border-radius: 50%;
}
.search-input::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 60%;
  width: 8px;
  height: 1.5px;
  background: var(--text-muted);
  transform: rotate(45deg);
}

.chip-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-soft);
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  transition: all var(--t) var(--ease);
}
.chip:hover { border-color: var(--silver); color: var(--text); }
.chip.active {
  background: var(--navy);
  color: var(--ivory);
  border-color: var(--navy);
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto auto;
  gap: var(--s-4);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  padding: var(--s-3) var(--s-4);
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.doc-row:hover { box-shadow: var(--shadow-sm); border-color: var(--silver); }
.doc-icon {
  width: 36px; height: 36px;
  background: var(--surface-soft);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border-color);
}
[data-theme="dark"] .doc-icon { color: var(--silver); }
.doc-info { min-width: 0; }
.doc-info .title {
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-info .meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: var(--s-3);
  align-items: center;
}
@media (max-width: 700px) {
  .doc-row {
    grid-template-columns: 36px 1fr;
    gap: var(--s-3);
  }
  .doc-row .tag, .doc-row .date-col { display: none; }
  .doc-row .doc-actions { grid-column: 1 / -1; justify-self: end; }
}
.doc-actions { display: flex; gap: 6px; }
.date-col { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }

/* Calendar (list) */
.month-group { margin-bottom: var(--s-6); }
.month-label {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: var(--s-3);
  font-weight: 500;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s-4);
}
.team-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  padding: var(--s-5);
  text-align: center;
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.team-card:hover { box-shadow: var(--shadow-md); border-color: var(--silver); }
.team-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--ivory);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: var(--s-3);
}
.team-card.is-admin .team-avatar {
  background: var(--champagne);
  color: var(--navy);
}
.team-card h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 2px;
}
.team-card .role {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: var(--s-3);
}
.team-card .contact {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
  word-break: break-word;
}
.team-card .contact a {
  color: var(--text-soft);
  word-break: break-word;
}
.team-card .contact a:hover { color: var(--navy); }
[data-theme="dark"] .team-card .contact a:hover { color: var(--silver); }

/* Leadership */
.leadership-section { margin-bottom: var(--s-7); }
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s-5);
}
.leader-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  padding: var(--s-5) var(--s-4) var(--s-4);
  text-align: center;
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.leader-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--champagne);
  transform: translateY(-2px);
}
.leader-card:focus-visible {
  outline: 2px solid var(--champagne);
  outline-offset: 2px;
}
.leader-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: var(--s-3);
  background: #ffffff;
  border: 2px solid var(--silver, #C5CCD6);
}
.leader-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.leader-photo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy, #1C2F6B);
  color: var(--ivory, #faf6ef);
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 500;
}
.leader-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  margin: 0;
  color: var(--navy, #1C2F6B);
}
.leader-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--champagne, #4A1E5C);
  margin: 4px 0 8px;
}
.leader-cta {
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: var(--s-3);
  margin-top: auto;
  width: 100%;
}
.leader-card:hover .leader-cta { color: var(--champagne); }

/* Leader bio modal */
.leader-modal-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0;
  border: none;
}
.leader-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.leader-modal-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: var(--s-4);
  background: #ffffff;
  border: 3px solid var(--champagne, #4A1E5C);
}
.leader-modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.leader-modal-photo.leader-photo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
}
.leader-modal-name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 26px;
  margin: 0;
  color: var(--navy, #1C2F6B);
}
.leader-modal-title {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--champagne, #4A1E5C);
  margin: 6px 0 var(--s-5);
}
.leader-modal-bio {
  text-align: left;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-soft);
  max-width: 100%;
}
.leader-modal-bio p { margin: 0 0 var(--s-3); }
.leader-modal-bio p:last-child { margin-bottom: 0; }

/* Privacy toggles on account page */
.privacy-block {
  margin: var(--s-5) 0 var(--s-4);
  padding: var(--s-4) var(--s-4);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  background: var(--surface-soft, var(--surface));
}
.privacy-head h4 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 2px;
  color: var(--navy, #1C2F6B);
}
.privacy-head p {
  margin: 0 0 var(--s-3);
  font-size: 12.5px;
  color: var(--text-muted);
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 10px 0;
  border-top: 1px solid var(--border-color);
  cursor: pointer;
}
.toggle-row:first-of-type { border-top: none; }
.toggle-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.toggle-name { font-size: 13.5px; font-weight: 500; color: var(--text-strong); }
.toggle-hint { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-color);
  border-radius: 22px;
  transition: background var(--t) var(--ease);
  cursor: pointer;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--t) var(--ease);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--champagne, #4A1E5C);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}
.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--champagne);
  outline-offset: 2px;
}

/* Avatar images everywhere */
.big-avatar { overflow: hidden; position: relative; }
.big-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.team-avatar.team-avatar-img { padding: 0; overflow: hidden; background: transparent; }
.team-avatar.team-avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }

.user-avatar.user-avatar-img { padding: 0; overflow: hidden; }
.user-avatar.user-avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.profile-summary-meta { display: flex; flex-direction: column; gap: 4px; }
.avatar-actions { display: flex; gap: var(--s-2); margin-top: var(--s-3); flex-wrap: wrap; }

.leader-photo-edit {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-2);
}
.leader-photo-edit-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  border: 2px solid var(--silver, #C5CCD6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 12px;
}
.leader-photo-edit-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Cropper dialog — uses native <dialog> top layer */
dialog.cropper-dialog {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  inset: 0 !important;
  overflow: hidden !important;
  color: inherit !important;
}
dialog.cropper-dialog::backdrop {
  background: rgba(8, 13, 30, 0.82);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
[data-theme="dark"] dialog.cropper-dialog::backdrop {
  background: rgba(0, 0, 0, 0.85);
}
.cropper-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  height: 100vh;
  margin: 0;
  background: rgba(8, 13, 30, 0.72);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: cropper-fade 160ms ease-out;
  flex: none;
}
[data-theme="dark"] .cropper-backdrop { background: rgba(0, 0, 0, 0.78); }
@keyframes cropper-fade { from { opacity: 0; } to { opacity: 1; } }
.cropper-modal {
  background: #ffffff;
  color: #1C2F6B;
  border-radius: 12px;
  padding: 20px;
  width: min(560px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 1;
}
[data-theme="dark"] .cropper-modal {
  background: #14182b;
  color: #f1efea;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.cropper-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}
.cropper-modal-header h2 {
  font-family: var(--font-serif, "Fraunces", serif);
  font-weight: 500;
  font-size: 18px;
  margin: 0;
  color: inherit;
}
.cropper-modal .modal-close {
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: inherit;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0.7;
}
.cropper-modal .modal-close:hover { opacity: 1; background: rgba(0,0,0,0.05); }
.cropper-stage {
  width: 100%;
  height: 360px;
  background: #0d1124;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.cropper-stage img { max-width: 100%; display: block; }
.cropper-help {
  font-size: 12.5px;
  color: rgba(28, 47, 107, 0.65);
  text-align: center;
}
[data-theme="dark"] .cropper-help { color: rgba(241, 239, 234, 0.7); }
.cropper-controls { padding: 0 8px; }
.cropper-zoom { display: flex; align-items: center; gap: 12px; }
.cropper-zoom span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(28, 47, 107, 0.65);
  min-width: 42px;
}
[data-theme="dark"] .cropper-zoom span { color: rgba(241, 239, 234, 0.7); }
.cropper-zoom input[type="range"] { flex: 1; accent-color: #4A1E5C; }
.cropper-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
}
.cropper-actions .btn {
  min-height: 40px;
  padding: 8px 18px;
}

/* Round crop box with visible rule-of-thirds grid */
.cropper-view-box,
.cropper-face { border-radius: 50%; }
.cropper-view-box {
  outline: 2px solid rgba(255, 255, 255, 0.9) !important;
  outline-color: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
}
.cropper-dashed {
  border-color: rgba(255, 255, 255, 0.85) !important;
  border-style: solid !important;
  border-width: 1px !important;
  opacity: 1 !important;
}
.cropper-center {
  opacity: 0.9 !important;
}
.cropper-center::before,
.cropper-center::after {
  background-color: rgba(255, 255, 255, 0.95) !important;
}
.cropper-line { background-color: rgba(255, 255, 255, 0.6) !important; }
.cropper-point { background-color: var(--champagne, #4A1E5C) !important; }

.body-modal-open { overflow: hidden; }

/* Admin row avatar as image (Leadership tab) */
.row-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid var(--silver, #C5CCD6);
}

/* Admin */
.admin-banner {
  background: rgba(184, 58, 92, 0.12);
  border: 1px solid rgba(184, 58, 92, 0.3);
  color: var(--champagne-700);
  border-radius: var(--r);
  padding: 12px 18px;
  margin-bottom: var(--s-5);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
[data-theme="dark"] .admin-banner { color: var(--champagne); }
.admin-banner .badge {
  background: var(--champagne);
  color: var(--navy);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 600;
}

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--s-5);
  overflow-x: auto;
}
.tabs button, .tab {
  background: transparent;
  border: none;
  padding: 10px 18px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: all var(--t) var(--ease);
}
.tabs button:hover, .tab:hover { color: var(--text); }
.tabs button[aria-selected="true"], .tab.active {
  color: var(--text);
  border-bottom-color: var(--champagne);
}

.tab-panel { display: block; }
.tab-panel[hidden] { display: none; }

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s-4);
}
.admin-toolbar h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 20px;
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  overflow: hidden;
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 12px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}
.admin-table th {
  background: var(--surface-soft);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table td.actions { text-align: right; white-space: nowrap; }
.admin-table .icon-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-soft);
  padding: 4px 10px;
  font-size: 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  margin-left: 4px;
  font: inherit;
  font-size: 12px;
  transition: all var(--t) var(--ease);
}
.admin-table .icon-btn:hover { color: var(--navy); border-color: var(--navy); }
.admin-table .icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
[data-theme="dark"] .admin-table .icon-btn:hover { color: var(--silver); border-color: var(--silver); }

/* Account */
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
}
@media (max-width: 880px) { .account-grid { grid-template-columns: 1fr; } }

.profile-summary {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--border-color);
}
.profile-summary .big-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--ivory);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 26px;
}
.profile-summary .name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
}
.profile-summary .role-tag {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-top: 4px;
}

/* Utilities */
.hidden { display: none !important; }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.empty-state {
  text-align: center;
  padding: var(--s-7);
  color: var(--text-muted);
  font-size: 14px;
}

/* =========================================================
   Production additions: skeletons, error states, file inputs,
   pinned announcements, signed-out hint
   ========================================================= */

.skeleton {
  background: linear-gradient(90deg, var(--surface-soft) 0%, var(--silver-200) 50%, var(--surface-soft) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--r);
  color: transparent !important;
}
[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #182549 0%, #233361 50%, #182549 100%);
  background-size: 200% 100%;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.skeleton-row { height: 72px; margin-bottom: 8px; }
.skeleton-card { height: 140px; margin-bottom: 12px; }
.skeleton-line { height: 14px; margin-bottom: 8px; border-radius: 4px; }

.error-state {
  background: rgba(162, 58, 58, 0.06);
  border: 1px solid rgba(162, 58, 58, 0.25);
  color: var(--danger);
  padding: var(--s-4);
  border-radius: var(--r);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.error-state .btn { white-space: nowrap; }

.pin-badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-right: 8px;
  font-weight: 600;
}

.field input[type="file"] {
  padding: 8px;
  background: var(--surface-soft);
  cursor: pointer;
}

.form-error {
  color: var(--danger);
  font-size: 12.5px;
  margin-top: 6px;
}

.text-link {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: rgba(28,47,107,0.3);
  text-underline-offset: 2px;
}
[data-theme="dark"] .text-link { color: var(--silver); }

.signup-hint {
  margin-top: var(--s-5);
  padding: var(--s-3) var(--s-4);
  background: var(--surface-soft);
  border-radius: var(--r);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
  text-align: center;
  border: 1px solid var(--border-color);
}

.tab-panel .empty-state {
  background: var(--surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--r);
  margin-top: var(--s-3);
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Google Calendar embed section */
.gcal-section {
  margin: var(--s-5) 0 var(--s-6);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}
.gcal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
  flex-wrap: wrap;
}
.gcal-header h2 {
  margin: 0;
  font-family: var(--font-serif, "Fraunces", serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
}
.gcal-frame {
  position: relative;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  /* Tall enough to see a full week comfortably */
  height: 820px;
}
.gcal-frame iframe {
  width: 100% !important;
  height: 100% !important;
  min-width: 100%;
  min-height: 100%;
  border: 0;
  display: block;
}
.gcal-help {
  margin: var(--s-3) 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.events-section { margin-top: var(--s-6); }
.section-header { margin-bottom: var(--s-4); }
.section-header h2 {
  margin: 0 0 4px;
  font-family: var(--font-serif, "Fraunces", serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
}
.section-sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}
@media (max-width: 720px) {
  .gcal-frame { height: 600px; }
}

/* Admin row tier pill */
.row-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: rgba(28, 47, 107, 0.08);
  color: #1C2F6B;
  vertical-align: middle;
}
[data-theme="dark"] .row-pill {
  background: rgba(184, 58, 92, 0.18);
  color: #4A1E5C;
}

/* Virtual Office CTA in primary nav */
.primary-nav .nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #4A1E5C;
  color: #ffffff !important;
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  border: 1px solid #4A1E5C;
  transition: background 140ms ease, transform 140ms ease;
}
.primary-nav .nav-cta:hover {
  background: #2F0F40;
  border-color: #2F0F40;
  transform: translateY(-1px);
}
.primary-nav .nav-cta::after { content: none; }
[data-theme="dark"] .primary-nav .nav-cta {
  background: #C5CCD6;
  border-color: #C5CCD6;
  color: #2F0F40 !important;
}
[data-theme="dark"] .primary-nav .nav-cta:hover {
  background: #e6eaf0;
  border-color: #e6eaf0;
}

/* Segmented radio control (used in resource type toggle) */
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(28, 47, 107, 0.06);
  border-radius: 10px;
}
.segmented label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  color: #1C2F6B;
}
.segmented label:has(input:checked) {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  font-weight: 500;
}
.segmented input[type="radio"] { accent-color: #4A1E5C; margin: 0; }
[data-theme="dark"] .segmented {
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .segmented label { color: #e8ecf4; }
[data-theme="dark"] .segmented label:has(input:checked) {
  background: rgba(184, 58, 92, 0.18);
}

/* ===========================================================
   Leaderboard
   =========================================================== */
.lb-widget {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.lb-row {
  display: grid;
  grid-template-columns: 32px 36px 1fr auto auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 6px;
  border-bottom: 1px solid var(--border-color);
}
.lb-row.has-pace {
  grid-template-columns: 32px 36px 1fr auto auto auto auto auto;
}
.lb-avatar { display: inline-flex; align-items: center; justify-content: center; }

/* Reusable avatar bubble - used on leaderboard, activity feed, share graphics */
.avatar-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--navy-deep, #0c1430);
  color: var(--champagne);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  vertical-align: middle;
}
.avatar-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-bubble.avatar-bubble-initials {
  background: linear-gradient(135deg, var(--navy-mid, #182760), var(--navy-deep, #0c1430));
  color: var(--champagne);
}
/* Leaderboard sparkline column — last 8 weeks of APV */
.lb-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--champagne);
  line-height: 0;
  padding: 0 4px;
}
.lb-spark { display: block; overflow: visible; }
.lb-spark-area { fill: var(--champagne); fill-opacity: 0.18; }
.lb-spark-line {
  stroke: var(--champagne);
  stroke-width: 1.4;
  fill: none;
}
.lb-spark-dot {
  fill: var(--champagne);
  stroke: var(--surface);
  stroke-width: 1;
}
.lb-spark-empty { color: var(--text-muted); }
.lb-pace {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
  padding-left: 6px;
  border-left: 1px solid var(--border-color);
}
.lb-pace-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}
.lb-pace-val {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  /* Mobile: rank | avatar | name (+count below) | apv | share — 5 visible cols.
     trend is hidden via display:none (still contributes to grid count, so we add an explicit auto track for it). */
  .lb-row,
  .lb-row.has-pace {
    grid-template-columns: 28px 28px 1fr 0 auto auto;
    column-gap: 8px;
  }
  .lb-row .lb-avatar .avatar-bubble { width: 28px !important; height: 28px !important; font-size: 11px !important; }
  /* Hide the trend column on small screens (still occupies a 0-width grid track). */
  .lb-row .lb-trend { display: none; }
  /* Tuck count under the name on its own row so APV + Share stay aligned right. */
  .lb-row .lb-count {
    grid-column: 3 / 4;
    grid-row: 2;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
  }
  /* Pin APV and Share to the right edge on row 1. */
  .lb-row .lb-apv { grid-column: 5; grid-row: 1; }
  .lb-row .lb-share { grid-column: 6; grid-row: 1; }
  .lb-row.has-pace .lb-pace,
  .lb-row.has-pace .lb-count {
    grid-column: 2 / -1;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    border-left: 0;
    padding-left: 0;
  }
}
.lb-share {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  transition: all var(--t) var(--ease);
  font-family: var(--font-sans);
}
.lb-share:hover {
  border-color: var(--champagne);
  color: var(--champagne);
}
.lb-share:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.lb-row:last-child { border-bottom: 0; }
.lb-rank {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--champagne);
  text-align: center;
}
.lb-name {
  font-weight: 500;
  color: var(--text);
}
.lb-count {
  color: var(--text-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.lb-apv {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  min-width: 90px;
  text-align: right;
}
[data-theme="dark"] .lb-apv { color: var(--silver); }

.lb-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.lb-filter {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.lb-filter:hover { border-color: var(--champagne); color: var(--text); }
.lb-filter[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
[data-theme="dark"] .lb-filter[aria-pressed="true"] {
  background: var(--champagne);
  border-color: var(--champagne);
  color: var(--navy);
}

.lb-board {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 8px 18px;
  box-shadow: var(--shadow-sm);
}
.lb-board .lb-row { padding: 14px 4px; }
.lb-board .lb-rank { font-size: 22px; }

.lb-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.lb-stat {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 16px 18px;
}
.lb-stat .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.lb-stat .value {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  margin-top: 4px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .lb-stats { grid-template-columns: 1fr; }
}

/* ===== Production row (stats + goal side-by-side) ===== */
.production-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 22px;
}
.production-row > .section { margin-bottom: 0; }

/* ===== Personal stats widget ===== */
.my-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.my-stat-streak::before {
  background: linear-gradient(180deg, #3b7fa3, rgba(59, 127, 163, 0));
}
.my-stat-streak .my-stat-value {
  color: #1C2F6B;
}
.my-stat {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 20px 22px 18px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  overflow: hidden;
}
.my-stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--champagne), rgba(184, 58, 92, 0));
  opacity: 0.6;
}
.my-stat:hover {
  border-color: rgba(184, 58, 92, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(28, 47, 107, 0.06);
}
.my-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-weight: 600;
}
.my-stat-value {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.05;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.my-stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
/* Period delta below stat value: ▲/▼ + diff + pct + label */
.my-stat-delta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  margin-top: 4px;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.my-stat-delta[hidden] { display: none; }
.my-stat-delta .delta-arrow {
  align-self: center;
  flex: 0 0 auto;
}
.my-stat-delta .delta-val { font-weight: 600; }
.my-stat-delta .delta-pct {
  color: var(--text-muted);
  font-size: 10.5px;
}
.my-stat-delta .delta-label {
  color: var(--text-muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.my-stat-delta .delta-detail {
  color: var(--text-muted);
  font-size: 10.5px;
}
.my-stat-delta.is-up { color: var(--champagne); }
.my-stat-delta.is-down { color: var(--silver); }
.my-stat-delta.is-flat { color: var(--text-muted); }
.my-stat-pace {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-color);
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.my-stat-pace strong {
  color: var(--champagne);
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  font-size: 14px;
}

/* ===== Wave 3.8: dual pace (vs goal · vs median) on MTD tile ===== */
.my-stat-pace-dual {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  column-gap: 10px;
  row-gap: 2px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}
.my-stat-pace-dual[hidden] { display: none; }
.pace-cell { min-width: 0; }
.pace-cell[hidden] { display: none; }
.pace-cell-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.2;
}
.pace-cell-value {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--champagne);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  line-height: 1.15;
  margin-top: 2px;
  white-space: nowrap;
}
/* Auto-shrink long currency strings (e.g. +$107,368) so the label never wraps. */
@supports (font-size: clamp(1px, 1cqi, 1px)) {
  .pace-cell { container-type: inline-size; }
  .pace-cell-value { font-size: clamp(11.5px, 4.6cqi, 14px); }
}
.pace-cell.is-down .pace-cell-value { color: var(--silver); }
.pace-cell-divider {
  width: 1px;
  height: 30px;
  background: var(--border-color);
  align-self: center;
}
.pace-cell-divider[hidden] { display: none; }

/* ===== Wave 3.8: Recent sales mini-feed ===== */
.recent-sales-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.recent-sale-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r-md, 10px);
  transition: border-color 160ms ease, transform 160ms ease;
}
.recent-sale-row:hover {
  border-color: rgba(184, 58, 92, 0.45);
  transform: translateY(-1px);
}
.recent-sale-main { min-width: 0; }
.recent-sale-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.recent-sale-title strong {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}
.recent-sale-count {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.recent-sale-meta {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-sale-date {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .recent-sale-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .recent-sale-date { justify-self: start; }
}

/* ===== On track for the year card (analytics top) ===== */
.on-track-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.on-track-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--champagne), rgba(184, 58, 92,0));
  opacity: 0.7;
}
.on-track-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.on-track-eyebrow {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}
.on-track-meta {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.on-track-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.on-track-stat { min-width: 0; }
.on-track-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
  margin-bottom: 6px;
}
.on-track-value {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.on-track-value.on-track-projection { color: var(--champagne); }
.on-track-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.on-track-delta.is-up { color: var(--champagne); font-weight: 600; }
.on-track-delta.is-down { color: var(--silver); font-weight: 600; }
.on-track-bar-wrap { margin-top: 18px; }
.on-track-bar-track {
  height: 8px;
  background: var(--border-color);
  border-radius: 999px;
  overflow: hidden;
}
.on-track-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--champagne), var(--champagne-light, #8B5BA1));
  border-radius: 999px;
  transition: width 600ms cubic-bezier(.2,.7,.2,1);
}
.on-track-bar-caption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.on-track-bar-caption strong { color: var(--text); font-family: var(--font-serif); font-weight: 600; }
@media (max-width: 720px) {
  .on-track-row { grid-template-columns: 1fr; }
  .on-track-value { font-size: 22px; }
}

/* ===== Team milestone banner (above personal-best slot on dashboard) ===== */
.team-milestone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 14px;
  background: linear-gradient(95deg, rgba(28,47,107,0.07), rgba(184, 58, 92,0.08));
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--champagne);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  animation: goalCelebSlide 480ms cubic-bezier(.2,.7,.2,1) both;
}
.team-milestone-mark { color: var(--champagne); flex: 0 0 auto; }
.team-milestone-body { flex: 1 1 auto; min-width: 0; }
.team-milestone-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}
.team-milestone-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.team-milestone-close {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.team-milestone-close:hover { color: var(--text); background: rgba(0,0,0,0.05); }
[data-theme="dark"] .team-milestone {
  background: linear-gradient(95deg, rgba(28,47,107,0.35), rgba(184, 58, 92,0.12));
}
[data-theme="dark"] .team-milestone-close:hover { background: rgba(255,255,255,0.06); }

/* ===== Goal celebration banner ===== */
.goal-celebration {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 14px;
  background: linear-gradient(95deg, rgba(184, 58, 92,0.16), rgba(216, 138, 160,0.08));
  border: 1px solid rgba(184, 58, 92,0.45);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  animation: goalCelebSlide 480ms cubic-bezier(.2,.7,.2,1) both;
}
.goal-celebration::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(250,246,239,0.35) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: goalCelebShine 1400ms ease 240ms 1 both;
  pointer-events: none;
}
.goal-celebration-mark { color: var(--champagne); flex: 0 0 auto; }
.goal-celebration-body { flex: 1 1 auto; min-width: 0; }
.goal-celebration-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}
.goal-celebration-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.goal-celebration-close {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.goal-celebration-close:hover { color: var(--text); background: rgba(0,0,0,0.05); }
[data-theme="dark"] .goal-celebration {
  background: linear-gradient(95deg, rgba(184, 58, 92,0.22), rgba(184, 58, 92,0.08));
  border-color: rgba(216, 138, 160,0.55);
}
[data-theme="dark"] .goal-celebration-close:hover { background: rgba(255,255,255,0.06); }
@keyframes goalCelebSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes goalCelebShine {
  to { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .goal-celebration { animation: none; }
  .goal-celebration::before { display: none; }
}

/* ===== Goal card ===== */
.goal-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.goal-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--champagne), rgba(184, 58, 92, 0));
  opacity: 0.65;
}
.goal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.goal-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.goal-value {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.goal-progress-track {
  width: 100%;
  height: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  overflow: hidden;
}
.goal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--champagne), #d1ad6b);
  transition: width 420ms cubic-bezier(.2,.6,.2,1);
  border-radius: 999px;
}
.goal-meta {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.goal-meta .on-pace { color: #3b7fa3; font-weight: 600; }
.goal-meta .behind-pace { color: #b06a4f; font-weight: 600; }

/* ===== Sub-tab strip (used on Tracker page to switch between Policy Tracker + Pipeline) ===== */
.sgf-subtab-strip {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-elev);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  margin: 0 0 var(--s-4) 0;
  flex-wrap: wrap;
}
.sgf-subtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font: 500 13px/1.2 var(--font-sans, "Inter", system-ui, sans-serif);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.sgf-subtab:hover { color: var(--text); }
.sgf-subtab.is-active,
.sgf-subtab[aria-selected="true"] {
  background: var(--navy);
  color: var(--ivory);
}
[data-theme="dark"] .sgf-subtab.is-active,
[data-theme="dark"] .sgf-subtab[aria-selected="true"] {
  background: var(--champagne);
  color: var(--navy-900, #0c1430);
}
.sgf-subtab svg { flex-shrink: 0; }
.sgf-subtab-pane[hidden] { display: none; }

/* iframe wrapper for embedded sub-pages (e.g. Pipeline inside Tracker) */
.sgf-subtab-frame-wrap {
  width: 100%;
  background: var(--bg);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.sgf-subtab-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 220px);
  min-height: 640px;
  border: 0;
  background: var(--bg);
}

/* Embed mode — when a page is loaded inside .sgf-subtab-frame (?embed=1),
   strip its outer chrome so it looks native under the parent's sub-tab. */
html.is-embedded,
body.is-embedded { background: var(--bg); }
body.is-embedded .site-header,
body.is-embedded .site-footer { display: none !important; }
body.is-embedded main.page {
  padding-top: var(--s-3);
  padding-bottom: var(--s-5);
  max-width: none;
}

/* ===== Monthly APV goal ring (Wave 4.1) ===== */
.goal-ring-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 24px;
  row-gap: 18px;
  align-items: center;
}
/* Forecast block sits on its own row underneath the ring + stats. */
.goal-ring-wrap > .goal-forecast {
  grid-column: 1 / -1;
}
.goal-ring-figure {
  position: relative;
  width: 144px;
  height: 144px;
  flex-shrink: 0;
}
.goal-ring-svg {
  display: block;
  width: 144px;
  height: 144px;
  overflow: visible;
}
.goal-ring-track {
  stroke: var(--border-color);
  opacity: 0.55;
}
.goal-ring-progress {
  stroke: var(--champagne);
  transition: stroke-dashoffset 700ms cubic-bezier(.2,.6,.2,1);
  filter: drop-shadow(0 0 4px rgba(184, 58, 92, 0.35));
}
.goal-ring-pacemark {
  stroke: var(--text-muted);
  fill: var(--bg);
  opacity: 0.9;
  transition: transform 700ms cubic-bezier(.2,.6,.2,1);
  transform-origin: 60px 60px;
}
.goal-ring-center {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.goal-ring-pct {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1;
}
.goal-ring-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
}
.goal-ring-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.goal-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.goal-stat-value {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.goal-stat-value .on-pace { color: #3b7fa3; font-weight: 600; }
.goal-stat-value .behind-pace { color: #b06a4f; font-weight: 600; }
@media (max-width: 720px) {
  .goal-ring-wrap { grid-template-columns: 1fr; justify-items: center; gap: 18px; }
  .goal-ring-stats { flex-direction: row; flex-wrap: wrap; width: 100%; justify-content: space-between; }
  .goal-ring-stats .goal-stat { flex: 1 1 30%; }
  .goal-ring-wrap > .goal-forecast { width: 100%; }
}

/* Responsive: stack at smaller widths */
@media (max-width: 1024px) {
  .production-row { grid-template-columns: 1fr; }
}

/* Safety: ensure top-level dashboard blocks always span the full content column.
   Guards against any flex/grid parent shrinking children to content width. */
.welcome-strip,
.verse-of-day,
.team-milestone,
.team-goal-card,
.production-row,
.production-row > .section,
.goal-card,
#team-milestone-slot,
#team-goal-slot,
#personal-best-slot,
#getting-started-tile-slot,
#demo-banner-slot {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Make stats grid behave on narrow viewports — fixed 2-up below 600px so tiles
   never overflow when the production-row card is narrower than 320px content. */
@media (max-width: 600px) {
  .my-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 380px) {
  .my-stats-grid { grid-template-columns: 1fr; }
}

/* ===== Breakdown widget (carrier + product) ===== */
.breakdown-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.breakdown-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}
.breakdown-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 14px;
}
.bd-row {
  margin-bottom: 14px;
}
.bd-row:last-child { margin-bottom: 0; }
.bd-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.bd-key {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.bd-apv {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.bd-track {
  height: 6px;
  background: var(--bg-elev, var(--surface-soft));
  border-radius: 999px;
  overflow: hidden;
}
.bd-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--champagne), #d1ad6b);
  border-radius: 999px;
  transition: width 320ms ease;
}
.bd-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  .breakdown-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .my-stats-grid { grid-template-columns: 1fr; }
  .my-stat { min-height: auto; }
  .goal-header { flex-direction: column; align-items: flex-start; }
}

/* ===== Analytics page ===== */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
.analytics-grid .analytics-block { margin-bottom: 0; }
.analytics-list { min-height: 80px; }
@media (max-width: 820px) {
  .analytics-grid { grid-template-columns: 1fr; }
}

/* ===== Verse archive page ===== */
.verse-today-section .verse-today {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 30px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.verse-today-section .verse-today::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--champagne), rgba(184, 58, 92, 0));
  opacity: 0.7;
}
.verse-today .verse-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  color: var(--navy, #1C2F6B);
  margin: 0 0 12px;
  letter-spacing: -0.005em;
}
.verse-today .verse-ref {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.verse-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.verse-controls input[type="search"] {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  width: 240px;
}
.verse-controls input[type="search"]:focus {
  outline: none;
  border-color: var(--champagne);
  box-shadow: var(--focus);
}
.verse-count {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.verse-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.verse-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 180ms ease, transform 180ms ease;
}
.verse-card:hover {
  border-color: rgba(184, 58, 92, 0.45);
  transform: translateY(-1px);
}
.verse-card .verse-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}
.verse-card .verse-ref {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.verse-card.is-today {
  border-color: var(--champagne);
  box-shadow: 0 6px 20px rgba(184, 58, 92, 0.12);
}
.verse-today-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--champagne);
  color: #ffffff;
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 700;
}
@media (max-width: 600px) {
  .verse-controls { flex-direction: column; align-items: stretch; gap: 8px; }
  .verse-controls input[type="search"] { width: 100%; }
}

/* Make the dashboard verse clickable to /verses */
.verse-of-day.verse-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--r-lg);
  transition: background 180ms ease;
}
.verse-of-day.verse-link:hover {
  background: rgba(184, 58, 92, 0.04);
}
.verse-of-day.verse-link:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.verse-archive-cue {
  /* Absolutely positioned so the reference stays visually centered.
     The cue floats to the right of the reference on hover. */
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(-4px, -50%);
  margin-left: 10px;
  white-space: nowrap;
  color: var(--champagne);
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}
.verse-of-day.verse-link:hover .verse-archive-cue {
  opacity: 1;
  transform: translate(0, -50%);
}
@media (max-width: 600px) {
  /* On narrow screens just hide it — there's no room to float it. */
  .verse-archive-cue { display: none; }
}

/* ============================================================
   Sale detail side-panel (admin)
   ============================================================ */
.detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 20, 48, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 220ms var(--ease);
  z-index: 90;
}
.detail-backdrop.open { opacity: 1; }

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(480px, 92vw);
  background: var(--surface);
  border-left: 1px solid var(--border-color);
  box-shadow: -16px 0 40px rgba(12, 20, 48, 0.18);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 24px 28px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 260ms var(--ease);
  z-index: 91;
}
.detail-panel.open { transform: translateX(0); }

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}
.detail-eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.detail-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
  line-height: 1.2;
}
.detail-title .tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  background: rgba(184, 58, 92, 0.14);
  color: var(--champagne-700);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  font-family: var(--font-sans, "Inter", sans-serif);
}
.detail-close {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.detail-close:hover {
  border-color: var(--champagne);
  color: var(--text);
  background: var(--surface-soft);
}

.detail-hero {
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--champagne);
  border-radius: var(--r-lg);
  padding: 16px 18px;
}
.detail-hero-apv {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.detail-hero-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin: 0;
}
.detail-grid > div {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}
.detail-grid dt {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.detail-grid dd {
  font-size: 14px;
  color: var(--text);
  margin: 0;
  word-break: break-word;
}

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.detail-section-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.detail-raw {
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--r-md, 10px);
  padding: 12px 14px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}
.detail-actions .btn { flex: 1 1 auto; }
.detail-actions .btn.danger {
  color: #c0392b;
  border-color: rgba(192, 57, 43, 0.25);
}
.detail-actions .btn.danger:hover {
  background: rgba(192, 57, 43, 0.08);
  border-color: rgba(192, 57, 43, 0.5);
}

@media (max-width: 600px) {
  .detail-panel {
    width: 100vw;
    padding: 18px 18px 24px;
  }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-title { font-size: 19px; }
  .detail-hero-apv { font-size: 26px; }
}

/* ============================================================
   Mobile polish pass — tighter spacing, swipeable stats
   ============================================================ */
@media (max-width: 700px) {
  .header-inner { padding: 10px 16px; gap: var(--s-3, 12px); }
  .header-logo img { height: 42px; }
  main, .page-shell { padding-left: 16px; padding-right: 16px; }
  .section { padding: 16px; }
  .section-head { gap: 8px; }

  /* Make stat rows swipeable on mobile when they would otherwise crowd */
  .my-stats-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    /* Break out of .section's 16px padding so the carousel reaches the screen edge,
       then re-add the same inset as padding so first/last tile align with the section. */
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    /* Trailing scroll padding makes the right peek feel intentional. */
    scroll-padding-left: 16px;
  }
  .my-stats-grid::-webkit-scrollbar { display: none; }
  .my-stats-grid > * {
    /* Each tile takes ~76% of viewport so the next one peeks ~16% on the right,
       making the swipe affordance obvious. */
    flex: 0 0 76%;
    min-width: 0;
    scroll-snap-align: start;
  }
}

@media (max-width: 520px) {
  .lb-row.has-pace {
    grid-template-columns: auto 1fr auto;
  }
  .lb-row.has-pace .lb-pace { display: none; }
  .header-inner { padding: 8px 14px; }
  .site-header { box-shadow: 0 1px 0 var(--border-color); }
}

/* ============================================================
   Wave 3.8 — Mobile polish: touch targets, tile grid, leaderboard
   ============================================================ */
@media (max-width: 700px) {
  /* Touch-target floor: WCAG 2.5.5 recommends >= 44x44 px for interactive controls */
  .btn, .btn-sm, .btn-ghost, .link-button, .tab-btn {
    min-height: 40px;
  }
  .btn-sm { padding: 8px 14px; font-size: 13px; }
  /* Section heads stack title + actions vertically when cramped */
  .section-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .section-head h2 { font-size: 17px; }
  /* Carrier + tile grids: single column on phones for full-width touch tiles */
  .tile-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  /* Production row already collapses; ensure goal card has breathing room */
  .production-goal .section-head h2 { font-size: 16px; }
}

@media (max-width: 520px) {
  /* Tighter type scale + single-column carrier tiles on small phones */
  .tile-grid.cols-3 { grid-template-columns: 1fr; }
  /* Recent sales rows already stack at 480 via the component CSS above */
  /* Leaderboard widget rows: ensure name + APV stack gracefully */
  .lb-widget .lb-row {
    gap: 8px;
  }
  /* Header logo: shrink slightly so nav buttons fit */
  .header-logo img { height: 36px; }

  /* Tighten the gap between PB banner and the production row — mobile only.
     The desktop layout uses --s-7 to separate sections but it reads as empty
     space on a narrow column. */
  .production-row { margin-top: 8px; }
  .section { margin-top: var(--s-5); }

  /* On very narrow phones, stack the dual-pace cells vertically inside the
     MTD tile so big numbers (5–6 digits) never crop the label. */
  .my-stat-pace-dual {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }
  .my-stat-pace-dual .pace-cell-divider {
    display: none;
  }
  .my-stat-pace-dual .pace-cell {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 8px;
    align-items: baseline;
    container-type: normal; /* disable cqi clamp so font stays at 14px */
  }
  .my-stat-pace-dual .pace-cell-label { margin: 0; }
  .my-stat-pace-dual .pace-cell-value {
    margin-top: 0;
    text-align: right;
    font-size: 14px;
  }
}

/* ============================================================
   Wave 3.8 — PWA install card (account.html only)
   ============================================================ */
.install-card[hidden] { display: none; }
.install-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: var(--s-3);
}
.install-card-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(184, 58, 92, 0.16), rgba(216, 138, 160, 0.06));
  color: var(--champagne);
  border: 1px solid rgba(184, 58, 92, 0.35);
}
.install-card-body { font-size: 14px; color: var(--text); }
.install-steps {
  list-style: none;
  padding: 0;
  margin: var(--s-3) 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.install-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
}
.install-steps .step-num {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--ivory, #faf6ef);
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
}
.install-steps .step-text { line-height: 1.5; }
.install-steps .step-text strong { font-weight: 600; color: var(--text); }

/* ====== Wave 1: Personal best banner ====== */
.personal-best-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(184, 58, 92, 0.14), rgba(216, 138, 160, 0.06));
  border: 1px solid rgba(184, 58, 92, 0.42);
  box-shadow: 0 6px 22px rgba(184, 58, 92, 0.08);
  color: var(--text);
  animation: pb-rise 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes pb-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.personal-best-banner .pb-spark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(184, 58, 92, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--champagne);
}
.personal-best-banner .pb-text { flex: 1 1 auto; min-width: 0; }
.personal-best-banner .pb-headline {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  margin: 0 0 2px;
}
.personal-best-banner .pb-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .personal-best-banner {
  background: linear-gradient(135deg, rgba(184, 58, 92, 0.18), rgba(216, 138, 160, 0.04));
  border-color: rgba(216, 138, 160, 0.55);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .personal-best-banner .pb-spark {
  background: rgba(216, 138, 160, 0.16);
  color: var(--champagne-light, #8B5BA1);
}

/* ====== Wave 1.1: Chase card (no-banner state) ====== */
.pb-chase-card {
  margin: 0 0 22px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border-color);
  animation: pb-rise 360ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.pb-chase-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--champagne);
}
.pb-chase-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(184, 58, 92, 0.14);
}
.pb-chase-title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
}
.pb-chase-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
}
.pb-chase-item { min-width: 0; }
.pb-chase-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.pb-chase-label {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.pb-chase-pct {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--champagne);
  font-variant-numeric: tabular-nums;
}
.pb-chase-track {
  position: relative;
  height: 5px;
  background: var(--surface-soft);
  border-radius: 3px;
  overflow: hidden;
}
.pb-chase-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--champagne), var(--champagne-700));
  border-radius: 3px;
  transition: width 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pb-chase-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .pb-chase-track { background: rgba(255, 255, 255, 0.06); }
@media (max-width: 720px) {
  .pb-chase-list { grid-template-columns: 1fr; gap: 14px; }
}

/* ====== Wave 1: Streak SVG flame ====== */
.my-stat-streak .my-stat-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.streak-flame-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.streak-flame {
  display: block;
  color: var(--champagne);
  filter: drop-shadow(0 1px 1px rgba(184, 58, 92, 0.25));
  animation: flame-flicker 2.2s ease-in-out infinite;
}
.streak-flame-inner {
  fill: #faf6ef;
  opacity: 0.85;
}
.streak-flame-1 { color: #c8a45b; }
.streak-flame-2 { color: var(--champagne); }
.streak-flame-3 { color: #2F0F40; }
.streak-flame-3 .streak-flame-inner { fill: #fff3d8; opacity: 0.95; }
@keyframes flame-flicker {
  0%, 100% { transform: scale(1) translateY(0); opacity: 1; }
  40% { transform: scale(1.04) translateY(-0.5px); opacity: 0.94; }
  60% { transform: scale(0.98) translateY(0.5px); opacity: 0.98; }
}
@media (prefers-reduced-motion: reduce) {
  .streak-flame { animation: none; }
  .personal-best-banner { animation: none; }
}
[data-theme="dark"] .streak-flame-inner { fill: #ffe4ad; opacity: 0.92; }

/* ====== Wave 1: Header theme toggle ====== */
.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
  padding: 0;
  flex: 0 0 auto;
}
.header-theme-btn:hover {
  color: var(--champagne);
  border-color: rgba(184, 58, 92, 0.55);
  background: rgba(184, 58, 92, 0.08);
}
.header-theme-btn:focus-visible {
  outline: 2px solid var(--champagne);
  outline-offset: 2px;
}
.header-theme-btn .theme-icon-sun { display: none; }
.header-theme-btn .theme-icon-moon { display: block; }
[data-theme="dark"] .header-theme-btn .theme-icon-sun { display: block; }
[data-theme="dark"] .header-theme-btn .theme-icon-moon { display: none; }
@media (max-width: 640px) {
  .header-theme-btn { width: 32px; height: 32px; }
  .header-theme-btn svg { width: 16px; height: 16px; }
}

/* ====== Wave 1: Sticky admin sales toolbar ====== */
.tab-panel[data-panel="sales"] .panel-toolbar {
  position: sticky;
  top: 64px;
  z-index: 5;
  background: var(--surface);
  margin-left: -8px;
  margin-right: -8px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .tab-panel[data-panel="sales"] .panel-toolbar {
  background: rgba(19, 28, 62, 0.96);
}
@media (max-width: 640px) {
  .tab-panel[data-panel="sales"] .panel-toolbar { top: 56px; }
}

/* ====== Wave 1: Softer empty states (admin + analytics) ====== */
.empty {
  text-align: center;
  padding: 28px 22px;
  color: var(--text-muted);
  background: var(--surface-soft);
  border: 1px dashed var(--border-color);
  border-radius: var(--r-lg);
  font-size: 14px;
  line-height: 1.55;
}
.empty .empty-headline,
.empty-state .empty-headline {
  font-family: var(--font-serif);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}
.empty .empty-verse,
.empty-state .empty-verse {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  font-style: italic;
  font-size: 12.5px;
  color: var(--text-muted);
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}
.empty .empty-verse .ref,
.empty-state .empty-verse .ref {
  display: block;
  margin-top: 4px;
  font-style: normal;
  letter-spacing: 0.02em;
  font-size: 11.5px;
  text-transform: uppercase;
  color: var(--champagne);
}

/* ---------- Team Goal Tiles (Admin Panel) ---------- */
.team-goal-group {
  margin-bottom: 20px;
}
.team-goal-group-header {
  font-family: var(--font-serif);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}
.team-goal-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.team-goal-tile {
  background: rgba(184, 58, 92, 0.06);
  border: 1px solid rgba(184, 58, 92, 0.35);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.team-goal-tile-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--champagne);
  font-weight: 600;
}
.team-goal-tile-value {
  font-family: var(--font-serif);
  color: var(--text);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}
.team-goal-tile-notes {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}
.team-goal-tile-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.team-goal-tile-actions button {
  font-size: 12px;
  padding: 4px 10px;
}

/* ---------- Team Goal Card (Dashboard / Analytics) ---------- */
.team-goal-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.team-goal-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.team-goal-card-title {
  font-family: var(--font-serif);
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}
.team-goal-card-eyebrow {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--champagne);
  font-weight: 600;
}
.team-goal-row {
  margin-bottom: 14px;
}
.team-goal-row:last-child {
  margin-bottom: 0;
}
.team-goal-row-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.team-goal-row-label {
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}
.team-goal-row-value {
  font-family: var(--font-serif);
  color: var(--text);
  font-size: 15px;
}
.team-goal-bar {
  height: 8px;
  background: rgba(28, 47, 107, 0.12);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.team-goal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--champagne), var(--champagne-light, #8B5BA1));
  border-radius: 999px;
  transition: width 480ms ease;
}
.team-goal-bar-fill.complete {
  background: linear-gradient(90deg, var(--navy, #1C2F6B), var(--champagne));
}
.team-goal-row-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ---------- PWA Install Button + Modal ---------- */
.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin-right: 6px;
  border: 1px solid var(--champagne, #4A1E5C);
  background: transparent;
  color: var(--champagne, #4A1E5C);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.pwa-install-btn:hover,
.pwa-install-btn:focus-visible {
  background: var(--champagne, #4A1E5C);
  color: var(--ivory, #faf6ef);
  outline: none;
}
.pwa-install-btn[hidden] { display: none; }

.pwa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 20, 48, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9000;
  animation: pwaFadeIn 180ms ease;
}
@keyframes pwaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.pwa-modal {
  position: relative;
  background: var(--surface, #faf6ef);
  color: var(--text, #1C2F6B);
  border-radius: var(--r-lg, 12px);
  padding: 28px 24px 22px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(12, 20, 48, 0.25);
  border: 1px solid var(--border-color, rgba(28, 47, 107, 0.15));
}
.pwa-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: 0;
  padding: 6px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pwa-modal-close:hover { color: var(--text); background: rgba(28,47,107,0.06); }
.pwa-modal-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--text);
}
.pwa-modal-sub {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}
.pwa-modal-steps {
  margin: 0 0 16px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
.pwa-modal-steps li { padding-left: 4px; }
.pwa-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 6px;
  vertical-align: middle;
  color: var(--champagne);
}
.pwa-modal-foot {
  margin: 0 0 18px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
  font-style: italic;
}
.pwa-modal-ok {
  width: 100%;
}

/* =========================================================================
   Wave 3.11 — Achievements card  |  Wave 3.12 — Pipeline summary card
   ========================================================================= */

.two-col-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6, 24px);
  margin-top: var(--s-7, 32px);
}
@media (max-width: 820px) {
  .two-col-row { grid-template-columns: 1fr; gap: var(--s-5, 16px); }
}

/* Achievements card */
.achievements-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.achievement-streaks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.achievement-streak {
  background: var(--surface-soft, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 14px 16px;
}
.achievement-streak-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.achievement-streak-value {
  font-family: var(--font-display, Fraunces), serif;
  font-size: 28px;
  line-height: 1.1;
  color: var(--text);
  font-weight: 500;
}
.achievement-streak-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
}
.achievement-latest {
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  padding-top: 14px;
}
.achievement-latest-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.achievement-latest-body {
  display: flex;
  align-items: center;
  gap: 12px;
}
.achievement-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(184, 58, 92, 0.12);
  color: var(--champagne, #4A1E5C);
  flex-shrink: 0;
}
.achievement-latest-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.achievement-latest-date {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.achievement-latest-empty .achievement-latest-name {
  color: var(--text-muted);
  font-weight: 400;
  font-style: italic;
}

/* Milestone list inside modal */
.achievements-modal {
  max-width: 520px;
}
.achievements-modal-body {
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 16px;
}
.milestone-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  background: var(--surface-soft, rgba(255, 255, 255, 0.03));
}
.milestone-row-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.milestone-row-date {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.milestone-row-text {
  flex: 1;
  min-width: 0;
}
.milestone-row-share,
.achievement-latest-share {
  flex-shrink: 0;
  font-size: 12.5px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.achievement-latest-share {
  margin-left: auto;
}
@media (max-width: 480px) {
  .milestone-row-share span,
  .achievement-latest-share span { display: none; }
}

/* Pipeline summary card */
.pipeline-summary-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pipeline-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.pipeline-totals-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.pipeline-totals-value {
  font-family: var(--font-display, Fraunces), serif;
  font-size: 26px;
  line-height: 1.1;
  color: var(--text);
  font-weight: 500;
}
.pipeline-stage-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pipeline-stage-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: baseline;
  padding: 8px 2px;
  font-size: 14px;
  color: var(--text);
}
.pipeline-stage-row + .pipeline-stage-row {
  border-top: 1px dashed var(--border, rgba(255, 255, 255, 0.06));
}
.pipeline-stage-empty {
  color: var(--text-muted);
}
.pipeline-stage-empty .pipeline-stage-apv {
  opacity: 0.55;
}
.pipeline-stage-name {
  font-weight: 500;
}
.pipeline-stage-count {
  font-size: 12.5px;
  color: var(--text-muted);
}
.pipeline-stage-apv {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text);
  min-width: 90px;
  text-align: right;
}

/* =========================================================================
   Wave 3.12 — Pipeline page
   ========================================================================= */

.pipeline-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: var(--s-6, 24px) 0 var(--s-5, 16px);
}
.pipeline-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.pipeline-toolbar-right {
  display: flex;
  gap: 10px;
}
.pipeline-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  overflow: hidden;
}
.pipeline-view-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 14px;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.pipeline-view-btn[aria-pressed="true"] {
  background: var(--champagne, #4A1E5C);
  color: var(--navy-deep, #0c1430);
  font-weight: 500;
}
.pipeline-view-btn + .pipeline-view-btn {
  border-left: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
.pipeline-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text);
}
.pipeline-filter-label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11.5px;
}
.pipeline-filter select {
  background: var(--surface, #fff);
  color: var(--text);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  border-radius: 6px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13.5px;
}
.pipeline-filter-checkbox {
  cursor: pointer;
}

/* Kanban */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.kanban-board[data-cols="6"] { grid-template-columns: repeat(6, minmax(220px, 1fr)); }
@media (max-width: 980px) {
  .kanban-board { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .kanban-board[data-cols="6"] { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
.kanban-col {
  background: var(--surface-soft, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}
.kanban-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.kanban-col-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
}
.kanban-col-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.kanban-col-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kanban-empty {
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 4px;
}
.kanban-card {
  background: var(--surface, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.kanban-card:hover {
  border-color: var(--champagne, #4A1E5C);
  transform: translateY(-1px);
}
.kanban-card:focus-visible {
  outline: 2px solid var(--champagne, #4A1E5C);
  outline-offset: 2px;
}
.kanban-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.kanban-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.kanban-card-apv {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--champagne, #4A1E5C);
  margin-top: 6px;
}
.kanban-card-agent {
  font-size: 12px;
  color: var(--text);
  margin-top: 4px;
}
.kanban-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Table view */
.pipeline-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
}
.pipeline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.pipeline-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 12px 14px;
  background: var(--surface-soft, rgba(255, 255, 255, 0.03));
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.pipeline-table thead th.num { text-align: right; }
.pipeline-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  color: var(--text);
}
.pipeline-table tbody td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.pipeline-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}
.pipeline-table tbody tr:hover {
  background: var(--surface-soft, rgba(255, 255, 255, 0.03));
}
.pipeline-table tbody tr:last-child td { border-bottom: none; }

/* Lead modal */
.lead-modal {
  max-width: 640px;
  width: calc(100% - 32px);
}
.lead-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.lead-form .form-row > span {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lead-form input,
.lead-form select,
.lead-form textarea,
.oo-form input,
.oo-form select,
.oo-form textarea {
  background: var(--surface, #fff);
  color: var(--text);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
}
.lead-form textarea,
.oo-form textarea {
  font-family: inherit;
  resize: vertical;
  min-height: 70px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 540px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}
.form-row-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.form-row-checkbox > span {
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--text);
}

.lead-touches {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.lead-touches h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
  color: var(--text-muted);
}
.lead-touches-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 10px;
}
.touch-row {
  background: var(--surface-soft, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  padding: 8px 10px;
}
.touch-meta {
  display: flex;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.touch-channel {
  color: var(--champagne, #4A1E5C);
  font-weight: 600;
}
.touch-note {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.4;
}
.touch-form {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
}
@media (max-width: 540px) {
  .touch-form { grid-template-columns: 1fr; }
}

/* Modal action layout helpers */
.modal-actions-right {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.muted-line {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  padding: 6px 2px;
}
.muted-line-inline {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* =========================================================================
   Wave 3.12 — 1:1 page
   ========================================================================= */

.oo-toolbar {
  margin: var(--s-6, 24px) 0 var(--s-5, 16px);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.oo-summary-card .section-head h2 {
  font-family: var(--font-display, Fraunces), serif;
  font-weight: 500;
}
.oo-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 820px) { .oo-summary-grid { grid-template-columns: repeat(2, 1fr); } }
.oo-summary-tile {
  background: var(--surface-soft, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 14px 16px;
}
.oo-summary-label {
  font-size: 11.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.oo-summary-value {
  font-family: var(--font-display, Fraunces), serif;
  font-size: 24px;
  line-height: 1.1;
  color: var(--text);
  font-weight: 500;
}
.oo-summary-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.oo-meta-line {
  font-size: 12.5px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.oo-detail-card .section-head h2 {
  font-size: 16px;
}
.oo-sales-list, .oo-leads-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.oo-sale-row, .oo-lead-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 6px 0;
  font-size: 13.5px;
  color: var(--text);
}
.oo-sale-row + .oo-sale-row,
.oo-lead-row + .oo-lead-row {
  border-top: 1px dashed var(--border, rgba(255, 255, 255, 0.06));
}
.oo-sale-date, .oo-lead-stage {
  font-size: 12px;
  color: var(--text-muted);
}
.oo-sale-meta, .oo-lead-name {
  color: var(--text);
}
.oo-sale-apv, .oo-lead-apv {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text);
  min-width: 90px;
  text-align: right;
}
.oo-bullet-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
}

.oo-notes-card .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.oo-shared-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--champagne, #4A1E5C);
  background: rgba(184, 58, 92, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
}
.oo-shared-badge-pending {
  color: var(--text-muted);
  background: var(--surface-soft, rgba(255, 255, 255, 0.06));
}
.oo-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.oo-form .form-row > span {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.oo-history {
  margin-top: 16px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  padding-top: 12px;
}
.oo-history summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
}
.oo-history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}
.oo-history-row {
  display: flex;
  justify-content: space-between;
  background: transparent;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  text-align: left;
}
.oo-history-row:hover {
  border-color: var(--champagne, #4A1E5C);
}
.oo-prewrap {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.oo-block + .oo-block { margin-top: 14px; }
.oo-block h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 6px;
}

/* ============================================================
   Getting Started checklist
   ============================================================ */
.gs-admin-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: var(--s-4) 0 var(--s-5);
  padding: 10px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  font-size: 14px;
  color: var(--text-muted);
}
.gs-admin-bar label { color: var(--text-muted); }
.gs-admin-bar select {
  padding: 6px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.gs-summary-card {
  margin: var(--s-5) 0 var(--s-6);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.gs-summary-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-5);
  align-items: center;
}
.gs-progress-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.gs-progress-meta { text-align: center; }
.gs-progress-count {
  font-size: 13px;
  color: var(--text-muted);
}
.gs-progress-name {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--text);
  margin-top: 2px;
}
.gs-next-up { min-width: 0; }
.gs-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  color: var(--champagne);
  font-weight: 600;
  margin-bottom: 6px;
}
.gs-next-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.25;
}
.gs-next-body {
  color: var(--text-muted);
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 600px) {
  .gs-summary-grid { grid-template-columns: 1fr; }
  .gs-progress-ring { align-items: flex-start; }
}

/* Phases */
.gs-phases { display: grid; gap: var(--s-5); }
.gs-phase {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t) var(--ease);
}
.gs-phase.is-complete { border-color: var(--champagne); }
.gs-phase-head { margin-bottom: var(--s-4); }
.gs-phase-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.gs-phase-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--text);
}
.gs-phase-summary {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 12px;
  line-height: 1.5;
}
.gs-phase-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gs-phase-bar {
  flex: 1;
  height: 6px;
  background: var(--border-color);
  border-radius: 999px;
  overflow: hidden;
}
.gs-phase-bar span {
  display: block;
  height: 100%;
  background: var(--champagne);
  border-radius: inherit;
  transition: width 280ms var(--ease);
}
.gs-phase-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Steps */
.gs-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.gs-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.gs-step.is-flash { animation: gsFlash 1.1s var(--ease); }
@keyframes gsFlash {
  0% { box-shadow: 0 0 0 2px var(--champagne); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.gs-step.is-done .gs-step-title { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--champagne); text-decoration-thickness: 1.5px; }
.gs-step-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ivory);
  flex-shrink: 0;
  margin-top: 1px;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.gs-step-check:hover { border-color: var(--champagne); transform: scale(1.05); }
.gs-step.is-done .gs-step-check {
  background: var(--champagne);
  border-color: var(--champagne);
  color: var(--navy-deep, #0c1430);
}
.gs-step-check[disabled] { opacity: 0.5; cursor: wait; }
.gs-step-body { min-width: 0; }
.gs-step-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}
.gs-step-desc {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}
.gs-step-links {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gs-step-links a {
  font-size: 13px;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--champagne);
  text-underline-offset: 3px;
}
[data-theme="dark"] .gs-step-links a { color: var(--ivory); }
.gs-step-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}
.gs-step-placeholder {
  padding: 14px;
  background: var(--surface-soft);
  border: 1px dashed var(--border-color);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
}

/* Dashboard tile */
.gs-tile {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  padding: var(--s-4) var(--s-5);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s-4);
  align-items: center;
  margin-bottom: var(--s-5);
}
.gs-tile-ring { color: var(--text); }
.gs-tile-body { min-width: 0; }
.gs-tile-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  color: var(--champagne);
  font-weight: 600;
  margin-bottom: 4px;
}
.gs-tile-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}
.gs-tile-sub { font-size: 13.5px; color: var(--text-muted); }
.gs-tile-cta {
  padding: 8px 14px;
  background: var(--navy);
  color: var(--ivory);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.gs-tile-cta:hover { background: var(--navy-700, var(--navy-mid, #182760)); color: var(--ivory); }

@media (max-width: 600px) {
  .gs-tile { grid-template-columns: auto 1fr; }
  .gs-tile-cta { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
}

/* Resources \u2014 Getting Started pin */
.doc-pin {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--s-4);
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.doc-pin:hover { border-color: var(--champagne); transform: translateY(-1px); }
.doc-pin-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--champagne);
}
.doc-pin-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
}
.doc-pin-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.doc-pin-cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
}
[data-theme="dark"] .doc-pin-cta { color: var(--ivory); }

/* ============================================================
   Carriers page — Insurance Toolkits feature card
   ============================================================ */
.toolkit-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-soft) 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--champagne, #4A1E5C);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.toolkit-card:hover {
  transform: translateY(-1px);
  border-color: var(--champagne, #4A1E5C);
  box-shadow: 0 8px 24px rgba(28, 47, 107, 0.12);
}
.toolkit-card-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(184, 58, 92, 0.12);
  color: var(--champagne, #4A1E5C);
}
.toolkit-card-body { flex: 1 1 auto; min-width: 0; }
.toolkit-card-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--champagne, #4A1E5C);
  margin-bottom: 4px;
}
.toolkit-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.toolkit-card-sub {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
}
.toolkit-card-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--champagne, #4A1E5C);
  color: var(--ivory, #faf6ef);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  transition: background var(--t) var(--ease);
}
.toolkit-card:hover .toolkit-card-cta {
  background: var(--champagne-700, #2F0F40);
  color: var(--ivory, #faf6ef);
}
[data-theme="dark"] .toolkit-card-cta {
  background: var(--silver, #C5CCD6);
  color: var(--champagne-700, #2F0F40);
}
[data-theme="dark"] .toolkit-card:hover .toolkit-card-cta {
  background: var(--silver-200, #e6eaf0);
  color: var(--champagne-700, #2F0F40);
}
@media (max-width: 640px) {
  .toolkit-card {
    flex-wrap: wrap;
    padding: 16px 18px;
    gap: 14px;
  }
  .toolkit-card-cta {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* ============================================================
   Admin console — visual polish
   Goal: clearly delineate sections, tabs, list rows, and actions.
   Winter palette only (no green). No emoji. SVG-only iconography.
   ============================================================ */

/* ---- Tab strip ---- */
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px;
  margin-bottom: var(--s-5);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.tabs button[role="tab"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: color var(--t) var(--ease), background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.tabs button[role="tab"]:hover {
  color: var(--text);
  background: rgba(255,255,255,0.4);
}
[data-theme="dark"] .tabs button[role="tab"]:hover {
  background: rgba(255,255,255,0.04);
}
.tabs button[role="tab"][aria-selected="true"] {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(28, 47, 107, 0.08);
}
.tabs button[role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -7px;
  height: 2px;
  background: var(--champagne);
  border-radius: 2px;
}
.tab-badge {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--danger, #c1392b);
  border-radius: 9px;
  line-height: 1;
}

/* ---- Tab panel + toolbar ---- */
.tab-panel { display: block; }
.tab-panel[hidden] { display: none !important; }

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border);
}
.panel-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.panel-toolbar .hint,
.tab-panel > .hint {
  margin: -8px 0 var(--s-3);
  font-size: 13px;
  color: var(--text-soft);
}

/* ---- Admin list ---- */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-list .loading,
.admin-list .error-state {
  padding: var(--s-5);
  text-align: center;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
}
.admin-list .empty {
  padding: var(--s-6) var(--s-5);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
}
.admin-list .empty-headline {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.admin-list .empty-verse {
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  font-style: italic;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.admin-list .empty-verse .ref {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---- Admin row ---- */
.admin-row {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.admin-row:hover {
  border-color: var(--champagne);
  box-shadow: 0 4px 12px rgba(28, 47, 107, 0.06);
}
[data-theme="dark"] .admin-row:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.admin-row .row-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--ivory);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  overflow: hidden;
}
.admin-row .row-avatar.row-avatar-img { padding: 0; }
.admin-row .row-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.admin-row .row-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-row .row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.admin-row .row-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.admin-row .row-body {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-row .row-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Pill tags (Pinned, File/Link, Admin, etc.) */
.admin-row .tag,
.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.tag.tag-accent {
  color: var(--champagne);
  background: rgba(184, 58, 92, 0.10);
  border-color: rgba(184, 58, 92, 0.30);
}

/* Mobile: stack rows */
@media (max-width: 640px) {
  .admin-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .admin-row .row-main { flex: 1 1 calc(100% - 52px); }
  .admin-row .row-actions {
    flex: 1 1 100%;
    justify-content: flex-end;
    border-top: 1px dashed var(--border);
    padding-top: 10px;
    margin-top: 4px;
  }
  .panel-toolbar {
    flex-wrap: wrap;
  }
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .tabs button[role="tab"] { flex: 0 0 auto; }
}

/* ---- Button sizing inside admin rows ---- */
.admin-row .btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.2;
}
.admin-row .btn-ghost.danger {
  color: var(--danger, #c1392b);
}
.admin-row .btn-ghost.danger:hover {
  background: rgba(193, 57, 43, 0.08);
  border-color: rgba(193, 57, 43, 0.30);
}

/* Admin page header — class names used by admin.html */
.page-header .eyebrow,
p.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--champagne);
}
.page-header .page-lede,
p.page-lede {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.55;
  max-width: 720px;
}

/* Deactivated agent row — dim + grayscale avatar */
.admin-row.is-deactivated {
  opacity: 0.72;
  background: var(--surface-soft);
}
.admin-row.is-deactivated .row-avatar { filter: grayscale(1); }
.admin-row.is-deactivated .row-title { color: var(--text-soft); }
.tag.tag-muted {
  color: var(--text-muted);
  background: var(--surface-soft);
  border-color: var(--border);
}

/* Admin avatar editor (inside Edit Agent modal) */
.admin-avatar-edit {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
  margin-bottom: 1rem;
}
.admin-avatar-preview {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--ivory);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  border: 2px solid var(--champagne);
  box-shadow: 0 4px 14px rgba(12, 20, 48, 0.18);
}
.admin-avatar-preview.has-photo {
  background: transparent;
}
.admin-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
}
.admin-avatar-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--champagne);
}
.admin-avatar-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-avatar-buttons .btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}
.admin-avatar-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}
@media (max-width: 480px) {
  .admin-avatar-edit {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-avatar-preview {
    width: 72px;
    height: 72px;
    font-size: 1.35rem;
  }
}

/* ====== Wave 1: Goal forecast block ====== */
.goal-forecast {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(184, 58, 92, 0.08);
  border: 1px solid rgba(184, 58, 92, 0.18);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.goal-forecast[hidden] { display: none; }
.goal-forecast-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.goal-forecast-sub {
  color: var(--text-muted);
  padding-left: 26px;
  font-size: 12.5px;
}
.goal-forecast-sub[hidden] { display: none; }
.goal-forecast-icon {
  flex: 0 0 auto;
  color: var(--champagne);
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.goal-forecast-text {
  flex: 1 1 auto;
  min-width: 0;
}
[data-theme="dark"] .goal-forecast {
  background: rgba(184, 58, 92, 0.12);
  border-color: rgba(184, 58, 92, 0.28);
}

/* ====== Wave 1: Recent activity feed ====== */
.recent-activity-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.activity-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border-color);
}
.activity-row:last-child { border-bottom: none; }
.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(184, 58, 92, 0.12);
  color: var(--champagne);
  flex: 0 0 auto;
}
.activity-body { min-width: 0; }
.activity-headline {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-meta {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.activity-apv {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}
.activity-when {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ====== Wave 1: Streak grid (GitHub-style) ====== */
.streak-grid-eyebrow {
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.streak-grid-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-x: auto;
}
.streak-grid-wrap {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 6px;
  align-items: end;
  min-width: 0;
}
.streak-grid-dows {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  gap: 3px;
  font-size: 10.5px;
  color: var(--text-muted);
  align-self: end;
  padding-bottom: 0;
}
.streak-grid-dows span {
  display: flex;
  align-items: center;
  height: 12px;
  line-height: 1;
}
.streak-grid-cols {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.streak-grid-months {
  display: grid;
  grid-template-columns: repeat(26, 12px);
  gap: 3px;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-bottom: 1px;
}
.streak-grid-months span {
  white-space: nowrap;
  text-align: left;
  overflow: visible;
  line-height: 1;
}
.streak-grid-cells {
  display: grid;
  grid-template-columns: repeat(26, 12px);
  gap: 3px;
}
.streak-grid-col {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  gap: 3px;
}
.streak-grid-cell {
  width: 12px;
  height: 12px;
  border-radius: 2.5px;
  background: rgba(28, 47, 107, 0.10);
  border: 1px solid rgba(28, 47, 107, 0.05);
}
.streak-grid-cell-future {
  background: transparent;
  border-color: transparent;
}
.streak-grid-tier-0 { background: rgba(28, 47, 107, 0.10); }
.streak-grid-tier-1 { background: rgba(184, 58, 92, 0.28); }
.streak-grid-tier-2 { background: rgba(184, 58, 92, 0.52); }
.streak-grid-tier-3 { background: rgba(184, 58, 92, 0.78); }
.streak-grid-tier-4 { background: var(--champagne); }
[data-theme="dark"] .streak-grid-tier-0 { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .streak-grid-tier-1 { background: rgba(184, 58, 92, 0.34); }
[data-theme="dark"] .streak-grid-tier-2 { background: rgba(184, 58, 92, 0.55); }
[data-theme="dark"] .streak-grid-tier-3 { background: rgba(184, 58, 92, 0.78); }
[data-theme="dark"] .streak-grid-tier-4 { background: var(--champagne); }
.streak-grid-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
  justify-content: flex-end;
}
.streak-grid-legend .streak-grid-cell {
  display: inline-block;
  margin: 0 1px;
}
.streak-grid-legend-label {
  margin: 0 4px;
}
@media (max-width: 720px) {
  .streak-grid-card { overflow-x: auto; }
}

/* === Cmd-K palette === */
.cmdk-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: none;
  align-items: flex-start; justify-content: center;
  padding-top: clamp(60px, 12vh, 140px);
}
.cmdk-overlay.is-open { display: flex; }
.cmdk-backdrop {
  position: absolute; inset: 0;
  background: rgba(12, 20, 48, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cmdk-panel {
  position: relative;
  width: min(620px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.18);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: min(70vh, 560px);
  animation: cmdk-in .14s ease-out;
}
@keyframes cmdk-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.cmdk-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
}
.cmdk-input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none;
  font-family: var(--font-sans);
  font-size: 15px; color: var(--text);
}
.cmdk-input::placeholder { color: var(--text-muted); }
.cmdk-esc {
  font-size: 10px; font-weight: 600; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 4px;
  background: var(--surface-alt, rgba(255,255,255,.04));
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-sans);
}
.cmdk-list {
  overflow-y: auto; padding: 4px 0;
  min-height: 60px;
}
.cmdk-group-label {
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 16px 4px;
}
.cmdk-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 9px 14px;
  background: transparent; border: 0;
  text-align: left; cursor: pointer;
  color: var(--text);
  font-family: var(--font-sans);
  border-left: 2px solid transparent;
  transition: background .08s ease, border-color .08s ease;
}
.cmdk-item.is-active { background: rgba(184, 58, 92, 0.10); border-left-color: var(--champagne); }
.cmdk-icon, .cmdk-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--navy-deep, #0c1430); color: var(--champagne);
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.cmdk-avatar { overflow: hidden; padding: 0; }
.cmdk-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cmdk-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cmdk-label { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-desc { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-empty {
  padding: 28px 16px; text-align: center; color: var(--text-muted);
  font-size: 13px;
}
.cmdk-footer {
  display: flex; gap: 14px;
  padding: 9px 14px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted); font-size: 11px;
}
.cmdk-footer kbd {
  font-family: var(--font-sans); font-size: 10px;
  padding: 1px 5px; margin-right: 4px;
  background: var(--surface-alt, rgba(255,255,255,.04));
  border: 1px solid var(--border-color);
  border-radius: 3px;
}
body.cmdk-open { overflow: hidden; }
@media (max-width: 540px) {
  .cmdk-overlay { padding-top: 32px; }
  .cmdk-panel { width: calc(100vw - 16px); max-height: calc(100vh - 64px); }
  .cmdk-footer { display: none; }
}

/* === Wave 5: Kanban drag-and-drop === */
.kanban-card[draggable="true"] { cursor: grab; }
.kanban-card[draggable="true"]:active { cursor: grabbing; }
.kanban-card.is-dragging { opacity: 0.45; transform: scale(0.98); }
.kanban-col.is-drop-target {
  outline: 2px dashed var(--champagne);
  outline-offset: -4px;
  background: rgba(184, 58, 92, 0.06);
  border-radius: 10px;
}
.kanban-col.is-drop-target .kanban-empty {
  color: var(--champagne);
  font-weight: 600;
}

/* === Wave 6: Shoutouts === */
.shoutouts-list { display: flex; flex-direction: column; gap: 0; background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.shoutout-row { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border-color); align-items: flex-start; }
.shoutout-row:last-child { border-bottom: 0; }
.shoutout-avatars { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.shoutout-arrow { color: var(--text-muted); font-size: 14px; }
.shoutout-body { flex: 1; min-width: 0; }
.shoutout-line { font-size: 13px; color: var(--text); margin-bottom: 4px; }
.shoutout-line strong { color: var(--champagne); font-weight: 600; }
.shoutout-when { color: var(--text-muted); font-weight: 400; }
.shoutout-msg { font-size: 14px; color: var(--text); line-height: 1.45; word-wrap: break-word; }

/* === Wave 6: Anniversaries === */
.anniversaries-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.anniv-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.anniv-text { min-width: 0; }
.anniv-name { font-weight: 600; color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anniv-meta { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }

/* === Wave 3: Bulk action bar (admin) === */
.bulk-action-bar {
  position: sticky; top: 8px; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  background: var(--navy-deep, #0c1430); color: var(--ivory, #faf6ef);
  border: 1px solid var(--champagne);
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-md, 0 6px 18px rgba(0,0,0,.18));
}
.bulk-action-count { font-weight: 600; flex: 1; }
.bulk-action-bar .btn { color: var(--ivory); border-color: rgba(250, 246, 239, 0.3); }
.bulk-action-bar .btn:hover { border-color: var(--champagne); color: var(--champagne); }
.bulk-action-bar .btn.danger:hover { color: #ff8a8a; border-color: #ff8a8a; }
.tag.tag-warn { background: rgba(184, 58, 92, 0.18); color: var(--champagne); border-color: var(--champagne); }
.tag.tag-error { background: rgba(185, 74, 74, 0.18); color: #d36e6e; border-color: #d36e6e; }

/* Licensed-states grid on My Account */
.states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}
.state-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  transition: background 0.12s ease, border-color 0.12s ease;
  background: var(--ivory);
}
.state-checkbox:hover { border-color: var(--champagne); }
.state-checkbox input[type=checkbox] {
  width: 16px; height: 16px; margin: 0;
  accent-color: var(--navy);
  flex-shrink: 0;
}
.state-checkbox .state-code {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  min-width: 24px;
}
.state-checkbox .state-name {
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.state-checkbox:has(input:checked) {
  background: rgba(28, 47, 107, 0.08);
  border-color: var(--navy);
}
.state-checkbox:has(input:checked) .state-name { color: var(--navy); }
@media (max-width: 480px) {
  .states-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .state-checkbox .state-name { display: none; }
  .state-checkbox { justify-content: center; }
}

/* ---------- Tabs (used on team page and elsewhere) ---------- */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-color);
  margin: 0 0 var(--s-5);
  overflow-x: auto;
}
.tab-btn {
  background: transparent;
  border: 0;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.is-active { color: var(--navy); border-bottom-color: var(--champagne); }

/* ---------- License map ---------- */
.license-map-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: var(--s-5);
  align-items: start;
}
@media (max-width: 900px) {
  .license-map-wrap { grid-template-columns: 1fr; }
}
.license-map {
  background: rgba(28, 47, 107, 0.03);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  min-height: 320px;
}
.license-map svg.us-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.us-state {
  fill: var(--ivory);
  stroke: var(--ivory);
  stroke-width: 0.003;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.12s ease, stroke 0.12s ease, stroke-width 0.12s ease;
  outline: none;
}
/* Heatmap buckets — navy ramp on ivory base */
.us-state.state-h0 { fill: #ece6d8; }
.us-state.state-h1 { fill: rgba(28, 47, 107, 0.30); }
.us-state.state-h2 { fill: rgba(28, 47, 107, 0.50); }
.us-state.state-h3 { fill: rgba(28, 47, 107, 0.72); }
.us-state.state-h4 { fill: rgba(28, 47, 107, 0.92); }
.us-state:hover,
.us-state:focus-visible {
  stroke: var(--champagne);
  stroke-width: 0.008;
}
.us-state.is-locked {
  stroke: var(--champagne);
  stroke-width: 0.012;
  filter: drop-shadow(0 0 4px rgba(184, 58, 92, 0.45));
}

.map-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.legend-swatch {
  display: inline-block;
  width: 18px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid var(--border-color);
}
.legend-swatch.state-h0 { background: #ece6d8; }
.legend-swatch.state-h1 { background: rgba(28, 47, 107, 0.30); }
.legend-swatch.state-h2 { background: rgba(28, 47, 107, 0.50); }
.legend-swatch.state-h3 { background: rgba(28, 47, 107, 0.72); }
.legend-swatch.state-h4 { background: rgba(28, 47, 107, 0.92); }
.legend-label { font-size: 11.5px; }

/* Side-panel sub-tabs (Agents / Licensing details) */
.lm-subtabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 10px 0 14px;
  background: rgba(28, 47, 107, 0.06);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.lm-subtab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  letter-spacing: 0.01em;
}
.lm-subtab:hover:not(.is-active):not([disabled]) {
  color: var(--navy);
  background: rgba(28, 47, 107, 0.04);
}
.lm-subtab.is-active {
  background: var(--ivory);
  color: var(--navy);
  box-shadow: 0 1px 2px rgba(28, 47, 107, 0.08);
}
.lm-subtab[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.lm-subpanel { margin-top: 0; }

.license-map-detail {
  background: var(--ivory);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: var(--s-4);
  min-height: 240px;
}
.license-map-detail-empty {
  color: var(--text-muted);
  font-size: 13.5px;
  text-align: center;
  padding: var(--s-5) var(--s-3);
}
.license-map-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-3);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.license-map-detail-state {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--navy);
  font-weight: 500;
}
.license-map-detail-count {
  font-size: 12.5px;
  color: var(--champagne);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.license-map-agent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  max-height: 380px;
  overflow-y: auto;
}
.lm-agent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px;
  border-radius: 8px;
  background: rgba(28, 47, 107, 0.04);
}
.lm-agent-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.lm-agent-avatar-img { background: transparent; }
.lm-agent-avatar-img img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
}
.lm-agent-meta { flex: 1; min-width: 0; }
.lm-agent-name { font-weight: 600; font-size: 13.5px; color: var(--navy); }
.lm-agent-title { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 1px; }
.lm-agent-contact {
  margin-top: 4px;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lm-agent-contact a { color: var(--ink-2); text-decoration: none; }
.lm-agent-contact a:hover { color: var(--navy); text-decoration: underline; }

/* License-map fee block (state click panel) */
.lm-fee-block {
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border-color);
}
.lm-fee-title {
  font-size: 12px;
  color: var(--champagne);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.lm-fee-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 12px;
  margin: 0 0 8px;
  font-size: 13px;
}
.lm-fee-grid dt {
  color: var(--text-muted);
  font-weight: 500;
}
.lm-fee-grid dd {
  margin: 0;
  color: var(--navy);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.lm-fee-note {
  font-size: 12.5px;
  color: var(--ink-2);
  margin: 6px 0 8px;
  font-style: italic;
}
.lm-fee-source {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0;
}

/* ===== Wave 4: Momentum tile (tone-aware) ===== */
.my-stat-momentum .my-stat-value[data-tone="good"]   { color: var(--navy); }
.my-stat-momentum .my-stat-value[data-tone="neutral"]{ color: var(--text-strong); }
.my-stat-momentum .my-stat-value[data-tone="warn"]   { color: var(--champagne); }
.my-stat-momentum .my-stat-value[data-tone="alert"]  { color: #c4564a; }

.my-stat-momentum .my-stat-pace[data-tone="good"]    { color: var(--navy); }
.my-stat-momentum .my-stat-pace[data-tone="warn"]    { color: var(--champagne); }
.my-stat-momentum .my-stat-pace[data-tone="alert"]   { color: #c4564a; }

/* Alert tile gets a subtle ring so dry-spell agents notice */
.my-stat-momentum .my-stat-value[data-tone="alert"] {
  position: relative;
}
.my-stat-momentum:has(.my-stat-value[data-tone="alert"]) {
  background:
    linear-gradient(180deg, rgba(196,86,74,0.04) 0%, transparent 60%),
    var(--surface);
  border-color: rgba(196,86,74,0.30);
}

/* ===== Wave 4: Coach view ===== */
.coach-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.coach-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.coach-chip-alert {
  background: rgba(196,86,74,0.10);
  color: #962f24;
  border-color: rgba(196,86,74,0.32);
}
.coach-chip-warn {
  background: rgba(184, 58, 92,0.12);
  color: #7a5a1f;
  border-color: rgba(184, 58, 92,0.36);
}
.coach-chip-neutral {
  background: rgba(28,47,107,0.07);
  color: var(--navy);
  border-color: rgba(28,47,107,0.20);
}
.coach-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.coach-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: border-color 0.15s, transform 0.15s;
}
.coach-row:hover { border-color: var(--champagne); transform: translateY(-1px); }
.coach-row[data-priority="3"] { border-left: 3px solid #c4564a; }
.coach-row[data-priority="2"] { border-left: 3px solid var(--champagne); }
.coach-row[data-priority="1"] { border-left: 3px solid var(--silver); }
.coach-row-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}
.coach-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.coach-row-info { min-width: 0; flex: 1; }
.coach-row-name {
  font-weight: 600;
  color: var(--text-strong);
  font-size: 15px;
  margin-bottom: 4px;
}
.coach-row-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.coach-row-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.coach-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.btn.btn-sm {
  padding: 5px 12px;
  font-size: 12.5px;
}
@media (max-width: 640px) {
  .coach-row {
    flex-direction: column;
    align-items: stretch;
  }
  .coach-row-actions {
    margin-top: 4px;
    justify-content: flex-end;
  }
}

/* ===== Carrier Finder Feedback (Wave 4 #6) ===== */
.product-feedback {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  flex-wrap: wrap;
}
.product-feedback-prompt {
  font-size: 12px;
  color: var(--text-soft);
  margin-right: 4px;
}
.product-feedback-done {
  color: var(--champagne, #4A1E5C);
  font-weight: 500;
  font-style: italic;
}
.fb-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-soft);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}
.fb-btn:hover:not(:disabled) {
  border-color: var(--champagne, #4A1E5C);
  color: var(--champagne, #4A1E5C);
}
.fb-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.fb-btn.fb-up:hover:not(:disabled) {
  background: rgba(184, 58, 92, 0.08);
}
.fb-btn.fb-down:hover:not(:disabled) {
  border-color: var(--silver, #C5CCD6);
  color: var(--text);
  background: rgba(197, 204, 214, 0.15);
}
.fb-btn.fb-decline {
  margin-left: auto;
  font-size: 11.5px;
  letter-spacing: 0.02em;
}
.fb-btn.fb-decline:hover:not(:disabled) {
  border-color: #c4564a;
  color: #c4564a;
  background: rgba(196, 86, 74, 0.06);
}
@media (max-width: 480px) {
  .product-feedback { gap: 4px; }
  .fb-btn.fb-decline { margin-left: 0; }
}

/* ===== Decline Patterns Admin Panel (Wave 4 #6) ===== */
.decline-patterns-wrap {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}
.decline-patterns-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.decline-patterns-head h3 {
  margin: 0;
  font-size: 16px;
}
.decline-patterns-sub {
  font-size: 12.5px;
  color: var(--text-soft);
}
.decline-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 13.5px;
}
.decline-table th,
.decline-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-color);
}
.decline-table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--surface-elevated, transparent);
}
.decline-table td.num,
.decline-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.decline-table tr:last-child td { border-bottom: 0; }
.decline-reason-pill {
  display: inline-block;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
  background: rgba(28, 47, 107, 0.06);
  color: var(--navy, #1C2F6B);
  border-radius: 999px;
  font-size: 11.5px;
}

/* ===== Onboarding Week Framework Banner (Wave 4 #8) ===== */
.wk-framework {
  margin: 20px 0 28px;
  padding: 22px 24px;
  background: linear-gradient(135deg, var(--surface-elevated, #fff) 0%, rgba(184, 58, 92, 0.06) 100%);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--champagne, #4A1E5C);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.wk-framework[data-week="0"] { border-left-color: var(--silver, #C5CCD6); }
.wk-framework[data-week="4"] { border-left-color: var(--navy, #1C2F6B); }
.wk-framework-head { flex: 1 1 280px; min-width: 0; }
.wk-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 4px;
}
.wk-title {
  font-family: Fraunces, serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.2;
}
.wk-focus {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.5;
}
.wk-rail {
  display: flex;
  gap: 18px;
  flex-shrink: 0;
}
.wk-rail-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  font-weight: 500;
}
.wk-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--silver, #C5CCD6);
  background: transparent;
  transition: all 0.2s ease;
}
.wk-dot.is-active {
  border-color: var(--champagne, #4A1E5C);
  background: var(--champagne, #4A1E5C);
}
.wk-dot.is-current {
  box-shadow: 0 0 0 4px rgba(184, 58, 92, 0.22);
  transform: scale(1.15);
}
@media (max-width: 600px) {
  .wk-framework {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 18px;
  }
  .wk-rail { align-self: stretch; justify-content: space-between; }
}

/* ===== Buddy picker on Account page (Wave 4 #8) ===== */
.buddy-card {
  margin-top: 20px;
  padding: 20px;
  background: var(--surface-elevated, #fff);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}
.buddy-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.buddy-card .text-muted { font-size: 13px; }
.buddy-current {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  background: rgba(184, 58, 92, 0.06);
  border-radius: 10px;
}
.buddy-current-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy, #1C2F6B);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.buddy-current-info { flex: 1; min-width: 0; }
.buddy-current-name { font-weight: 500; font-size: 14px; }
.buddy-current-meta { font-size: 12px; color: var(--text-soft); }
.buddy-picker-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.buddy-picker-form select {
  flex: 1 1 240px;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

/* ===== PWA update-available banner ===== */
.pwa-update-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 18px;
  background: var(--navy, #1C2F6B);
  color: #faf6ef;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(12, 20, 48, 0.32);
  font-size: 13.5px;
  font-weight: 500;
  max-width: calc(100vw - 32px);
}
.pwa-update-banner-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwa-update-banner-btn {
  background: #4A1E5C;
  color: #faf6ef;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
}
.pwa-update-banner-btn:hover { background: #8B5BA1; color: #0c1430; }
.pwa-update-banner-close {
  background: transparent;
  color: inherit;
  border: 0;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.78;
}
.pwa-update-banner-close:hover { opacity: 1; }
@media (max-width: 480px) {
  .pwa-update-banner { font-size: 12.5px; padding: 10px 12px 10px 14px; bottom: 16px; }
  .pwa-update-banner-text { max-width: 56vw; }
}

/* ===== Decline modal close glyph sizing ===== */
#decline-modal .rule-modal-head .close {
  font-size: 24px;
  line-height: 1;
  padding: 4px 10px;
  min-width: 36px;
  min-height: 36px;
}

/* ============================================================
   Wave 5 #1 — Calendar "My week" panel
   ============================================================ */
.my-week-section {
  background: var(--ivory, #faf6ef);
  border: 1px solid rgba(28, 47, 107, 0.08);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(12, 20, 48, 0.04);
}
.my-week-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
}
.my-week-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy, #1C2F6B);
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}
.my-week-sub {
  font-size: 0.85rem;
  color: rgba(28, 47, 107, 0.65);
  margin: 0;
}
.my-week-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.my-week-tabs {
  display: inline-flex;
  background: #fff;
  border: 1px solid rgba(28, 47, 107, 0.12);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.my-week-tab {
  background: transparent;
  border: 0;
  color: rgba(28, 47, 107, 0.7);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  min-height: 32px;
}
.my-week-tab:hover {
  color: var(--navy, #1C2F6B);
}
.my-week-tab.is-active {
  background: var(--navy, #1C2F6B);
  color: #fff;
}
.my-week-tab:focus-visible {
  outline: 2px solid var(--champagne, #4A1E5C);
  outline-offset: 2px;
}

.cal-day-group {
  margin-bottom: 18px;
}
.cal-day-group:last-child {
  margin-bottom: 0;
}
.cal-day-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--champagne, #4A1E5C);
  margin: 0 0 8px 2px;
}
.cal-day-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cal-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid rgba(28, 47, 107, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cal-item:hover {
  border-color: rgba(28, 47, 107, 0.18);
  box-shadow: 0 2px 6px rgba(12, 20, 48, 0.06);
}

.cal-item-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  min-height: 22px;
  line-height: 1;
}
.cal-chip-event {
  background: var(--navy, #1C2F6B);
  color: #fff;
}
.cal-chip-pipeline {
  background: var(--champagne, #4A1E5C);
  color: #fff;
}
.cal-chip-oneonone {
  background: var(--silver, #C5CCD6);
  color: var(--navy, #1C2F6B);
}
.cal-chip-onboarding {
  background: #8B5BA1;
  color: var(--navy, #1C2F6B);
}
.cal-chip-anniversary {
  background: var(--ivory, #faf6ef);
  color: var(--navy, #1C2F6B);
  border: 1px solid rgba(28, 47, 107, 0.2);
}
.cal-chip-sale {
  background: rgba(184, 58, 92, 0.15);
  color: var(--navy, #1C2F6B);
  border: 1px solid rgba(184, 58, 92, 0.4);
}

.cal-item-body {
  min-width: 0;
}
.cal-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy, #1C2F6B);
  line-height: 1.3;
  margin-bottom: 2px;
  word-wrap: break-word;
}
.cal-item-meta {
  font-size: 0.78rem;
  color: rgba(28, 47, 107, 0.65);
  margin-bottom: 4px;
}
.cal-item-desc {
  font-size: 0.82rem;
  color: rgba(28, 47, 107, 0.78);
  line-height: 1.4;
  margin-top: 4px;
}
.cal-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cal-item-link {
  color: var(--champagne, #4A1E5C);
  font-size: 1.05rem;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.cal-item-link:hover {
  background: rgba(184, 58, 92, 0.1);
}
.cal-item-actions button {
  background: transparent;
  border: 1px solid rgba(28, 47, 107, 0.15);
  color: var(--navy, #1C2F6B);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  min-height: 30px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.cal-item-actions button:hover {
  background: rgba(28, 47, 107, 0.06);
  border-color: rgba(28, 47, 107, 0.3);
}

@media (max-width: 600px) {
  .my-week-section {
    padding: 16px 14px;
  }
  .my-week-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .my-week-tab {
    font-size: 0.78rem;
    padding: 6px 11px;
  }
  .cal-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 11px 12px;
  }
  .cal-item-actions {
    justify-content: flex-end;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  [data-theme="dark"] .my-week-section,
  [data-theme="dark"] .my-week-section {
    background: #182760;
    border-color: rgba(197, 204, 214, 0.12);
  }
  [data-theme="dark"] .my-week-title,
  [data-theme="dark"] .my-week-title {
    color: #faf6ef;
  }
  [data-theme="dark"] .my-week-sub,
  [data-theme="dark"] .my-week-sub {
    color: rgba(250, 246, 239, 0.65);
  }
  [data-theme="dark"] .my-week-tabs,
  [data-theme="dark"] .my-week-tabs {
    background: #0c1430;
    border-color: rgba(197, 204, 214, 0.18);
  }
  [data-theme="dark"] .my-week-tab,
  [data-theme="dark"] .my-week-tab {
    color: rgba(250, 246, 239, 0.7);
  }
  [data-theme="dark"] .my-week-tab.is-active,
  [data-theme="dark"] .my-week-tab.is-active {
    background: var(--champagne, #4A1E5C);
    color: #0c1430;
  }
  [data-theme="dark"] .cal-item,
  [data-theme="dark"] .cal-item {
    background: #0c1430;
    border-color: rgba(197, 204, 214, 0.12);
  }
  [data-theme="dark"] .cal-item-title,
  [data-theme="dark"] .cal-item-title {
    color: #faf6ef;
  }
  [data-theme="dark"] .cal-item-meta,
  [data-theme="dark"] .cal-item-meta {
    color: rgba(250, 246, 239, 0.65);
  }
  [data-theme="dark"] .cal-item-desc,
  [data-theme="dark"] .cal-item-desc {
    color: rgba(250, 246, 239, 0.78);
  }
  [data-theme="dark"] .cal-item-actions button,
  [data-theme="dark"] .cal-item-actions button {
    color: #faf6ef;
    border-color: rgba(197, 204, 214, 0.2);
  }
}

/* ============================================================
   Wave 5 #3 — Goal coaching widget (dashboard)
   ============================================================ */
.goal-coach-panel {
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(184, 58, 92, 0.08);
  border: 1px solid rgba(184, 58, 92, 0.25);
  border-left: 4px solid var(--champagne, #4A1E5C);
}
.goal-coach-panel.is-warning {
  background: rgba(184, 58, 92, 0.12);
  border-color: rgba(184, 58, 92, 0.35);
  border-left-color: var(--champagne, #4A1E5C);
}
.goal-coach-panel.is-critical {
  background: rgba(196, 86, 74, 0.08);
  border-color: rgba(196, 86, 74, 0.3);
  border-left-color: #c4564a;
}
.goal-coach-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.goal-coach-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ivory, #faf6ef);
  color: var(--champagne, #4A1E5C);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.goal-coach-panel.is-critical .goal-coach-icon {
  color: #c4564a;
}
.goal-coach-text {
  min-width: 0;
  flex: 1 1 auto;
}
.goal-coach-headline {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy, #1C2F6B);
  margin-bottom: 2px;
}
.goal-coach-sub {
  font-size: 0.85rem;
  color: rgba(28, 47, 107, 0.8);
  line-height: 1.4;
  margin-bottom: 4px;
}
.goal-coach-plan {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy, #1C2F6B);
  margin-top: 6px;
}
.goal-coach-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.goal-coach-plan-detail {
  margin-top: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid rgba(28, 47, 107, 0.1);
  border-radius: 10px;
}
.goal-coach-plan-row {
  font-size: 0.85rem;
  color: var(--navy, #1C2F6B);
  margin-bottom: 4px;
}
.goal-coach-plan-list {
  margin: 8px 0 0 0;
  padding-left: 18px;
  font-size: 0.83rem;
  color: rgba(28, 47, 107, 0.85);
  line-height: 1.5;
}
.goal-coach-plan-list li {
  margin-bottom: 4px;
}

@media (prefers-color-scheme: dark) {
  [data-theme="dark"] .goal-coach-panel,
  [data-theme="dark"] .goal-coach-panel {
    background: rgba(184, 58, 92, 0.12);
    border-color: rgba(184, 58, 92, 0.3);
  }
  [data-theme="dark"] .goal-coach-panel.is-critical,
  [data-theme="dark"] .goal-coach-panel.is-critical {
    background: rgba(196, 86, 74, 0.12);
    border-color: rgba(196, 86, 74, 0.35);
  }
  [data-theme="dark"] .goal-coach-icon,
  [data-theme="dark"] .goal-coach-icon {
    background: #182760;
  }
  [data-theme="dark"] .goal-coach-headline,
  [data-theme="dark"] .goal-coach-plan,
  [data-theme="dark"] .goal-coach-headline,
  [data-theme="dark"] .goal-coach-plan {
    color: #faf6ef;
  }
  [data-theme="dark"] .goal-coach-sub,
  [data-theme="dark"] .goal-coach-sub {
    color: rgba(250, 246, 239, 0.8);
  }
  [data-theme="dark"] .goal-coach-plan-detail,
  [data-theme="dark"] .goal-coach-plan-detail {
    background: #0c1430;
    border-color: rgba(197, 204, 214, 0.15);
  }
  [data-theme="dark"] .goal-coach-plan-row,
  [data-theme="dark"] .goal-coach-plan-row {
    color: #faf6ef;
  }
  [data-theme="dark"] .goal-coach-plan-list,
  [data-theme="dark"] .goal-coach-plan-list {
    color: rgba(250, 246, 239, 0.85);
  }
}

/* ============================================================
   Wave 5 #3 — Off-pace agents (admin Coach tab)
   ============================================================ */
.offpace-wrap {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(28, 47, 107, 0.1);
}
.offpace-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.offpace-head h3 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
  color: var(--navy, #1C2F6B);
}
.offpace-sub {
  font-size: 0.82rem;
  color: rgba(28, 47, 107, 0.65);
  max-width: 560px;
}
.offpace-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid rgba(28, 47, 107, 0.08);
  border-left: 4px solid var(--champagne, #4A1E5C);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.offpace-row.is-warning { border-left-color: var(--champagne, #4A1E5C); }
.offpace-row.is-critical { border-left-color: #c4564a; }
.offpace-row-main {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}
.offpace-row-info {
  min-width: 0;
}
.offpace-row-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy, #1C2F6B);
  margin-bottom: 2px;
}
.offpace-row-stats {
  font-size: 0.82rem;
  color: rgba(28, 47, 107, 0.85);
  margin-bottom: 3px;
}
.offpace-stat strong {
  color: var(--navy, #1C2F6B);
  font-weight: 700;
}
.offpace-stat-gap {
  color: #c4564a;
  font-weight: 600;
}
.offpace-row.is-warning .offpace-stat-gap { color: var(--champagne, #4A1E5C); }
.offpace-sep {
  margin: 0 6px;
  color: rgba(28, 47, 107, 0.4);
}
.offpace-row-meta {
  font-size: 0.78rem;
  color: rgba(28, 47, 107, 0.65);
}
.offpace-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .offpace-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .offpace-row-actions {
    justify-content: flex-end;
  }
  .offpace-head {
    flex-direction: column;
  }
}
@media (prefers-color-scheme: dark) {
  [data-theme="dark"] .offpace-row,
  [data-theme="dark"] .offpace-row {
    background: #0c1430;
    border-color: rgba(197, 204, 214, 0.12);
  }
  [data-theme="dark"] .offpace-row-name,
  [data-theme="dark"] .offpace-row-name {
    color: #faf6ef;
  }
  [data-theme="dark"] .offpace-row-stats,
  [data-theme="dark"] .offpace-row-stats {
    color: rgba(250, 246, 239, 0.85);
  }
  [data-theme="dark"] .offpace-stat strong,
  [data-theme="dark"] .offpace-stat strong {
    color: #faf6ef;
  }
  [data-theme="dark"] .offpace-row-meta,
  [data-theme="dark"] .offpace-row-meta {
    color: rgba(250, 246, 239, 0.6);
  }
  [data-theme="dark"] .offpace-head h3,
  [data-theme="dark"] .offpace-head h3 {
    color: #faf6ef;
  }
  [data-theme="dark"] .offpace-sub,
  [data-theme="dark"] .offpace-sub {
    color: rgba(250, 246, 239, 0.65);
  }
  [data-theme="dark"] .offpace-wrap,
  [data-theme="dark"] .offpace-wrap {
    border-top-color: rgba(197, 204, 214, 0.15);
  }
}

/* ============================================================
   Wave 5 #9 — Dark mode polish for Wave 4 components
   ============================================================ */

/* Coach chips: hardcoded dark text needs lightening in dark mode */
[data-theme="dark"] .coach-chip-alert {
  background: rgba(196, 86, 74, 0.22);
  color: #f5b4ab;
  border-color: rgba(196, 86, 74, 0.45);
}
[data-theme="dark"] .coach-chip-warn {
  background: rgba(184, 58, 92, 0.22);
  color: #e6c890;
  border-color: rgba(184, 58, 92, 0.5);
}
[data-theme="dark"] .coach-chip-neutral {
  background: rgba(197, 204, 214, 0.12);
  color: var(--silver, #C5CCD6);
  border-color: rgba(197, 204, 214, 0.25);
}

/* Coach row priority borders — boost the silver to be visible */
[data-theme="dark"] .coach-row[data-priority="1"] {
  border-left-color: rgba(197, 204, 214, 0.55);
}

/* Coach avatar — already good (navy bg, ivory text), no change */

/* Decline patterns: pill text needs to lighten */
[data-theme="dark"] .decline-reason-pill {
  background: rgba(197, 204, 214, 0.12);
  color: var(--ivory, #faf6ef);
}

/* Week framework banner — surface-elevated isn't defined for dark, use fallback */
[data-theme="dark"] .wk-framework {
  background: linear-gradient(135deg, var(--surface, #131c3e) 0%, rgba(184, 58, 92, 0.12) 100%);
}
[data-theme="dark"] .wk-dot {
  border-color: rgba(197, 204, 214, 0.4);
}
[data-theme="dark"] .wk-dot.is-current {
  box-shadow: 0 0 0 4px rgba(184, 58, 92, 0.35);
}

/* Buddy card */
[data-theme="dark"] .buddy-card {
  background: var(--surface, #131c3e);
}
[data-theme="dark"] .buddy-current {
  background: rgba(184, 58, 92, 0.14);
}

/* PWA update banner — works in both themes (navy bg), but in dark theme
   the box-shadow disappears against the dark background. Use a soft ring. */
[data-theme="dark"] .pwa-update-banner {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(197, 204, 214, 0.18);
}

/* Decline modal close — inherits from button colors, already themed */

/* My-week (Wave 5 #1) — already themed via prior block but the var-based
   approach is cleaner. Keep the explicit overrides for the items inside
   the calendar that may be visited via :visited pseudo-classes. */
[data-theme="dark"] .cal-chip-onboarding {
  background: rgba(216, 138, 160, 0.4);
  color: var(--ivory, #faf6ef);
}
[data-theme="dark"] .cal-chip-anniversary {
  background: var(--surface, #131c3e);
  color: var(--ivory, #faf6ef);
  border-color: rgba(197, 204, 214, 0.25);
}

/* Off-pace rows in admin — already use surface, but border-left color needs
   to remain visible. Champagne and red work fine in dark. */

/* Generic momentum widget — uses var-based colors, but the [data-tone=neutral]
   case maps to var(--text-strong) which is correctly remapped to white-ish in
   dark mode. No fix needed. */

