:root {
  --accent: #FF5A1F;
  --ink: #121212;
  --paper: #EEEDE8;
  --paper-2: #F8F8F5;
  --muted: #3A3A35;
  --mono-muted: #55554F;
  --border-soft: #C9C8C0;
  --divider: #E4E3DC;
  --dark-muted: #A3A29A;
  --dark-border: #3A3A35;
}

* { box-sizing: border-box; }

/* Several components (.btn-primary, .btn-dark, etc.) set an explicit
   display value, which otherwise overrides the browser's default
   "[hidden] { display: none }" rule — author CSS always wins over
   the user-agent stylesheet regardless of selector specificity. This
   one rule makes the hidden attribute/property reliably hide any
   element, however its own class styles it. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif;
  font-stretch: 100%;
}

a { color: var(--ink); }
a:hover { color: var(--accent); }
/* Inline links inside help/subtitle text (.book-note) default to
   var(--ink) (always dark) and only pick up the accent color on
   :hover -- invisible against a dark page until you mouse over it.
   Scoped to .book-note specifically, NOT a bare "a" selector: a
   blanket dark-mode override of every <a> outranks (by specificity)
   component classes like .ce-btn-primary and .ce-sidebar-link that
   legitimately set their own color/icon color for that link, which
   is what broke "Go to profile" and the orange sidebar icons. */
body[data-theme="dark"] .book-note a { color: var(--accent); }
body[data-theme="dark"] .book-note a:hover { filter: brightness(1.15); }

summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
input::placeholder, textarea::placeholder { color: var(--mono-muted); }

.mono { font-family: 'IBM Plex Mono', monospace; }

.page { min-height: 100vh; }

/* NAV */
.nav-header { background: var(--ink); border-bottom: 1px solid #2E2D29; position: sticky; top: 0; z-index: 20; }
.nav {
  max-width: 1280px; margin: 0 auto; padding: 18px 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 32px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.brand-logo { height: 34px; width: auto; display: block; }
.nav-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px;
  font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 500;
}
.nav-links a { text-decoration: none; padding: 12px 0; color: var(--paper); transition: color .2s; }
.nav-links a:hover { color: var(--accent) !important; }
.nav-links a.is-active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.nav-cta {
  padding: 12px 20px !important; border-radius: 12px; background: var(--accent) !important;
  color: var(--ink) !important; font-weight: 700; transition: transform .22s cubic-bezier(.2,.7,.2,1), box-shadow .22s ease;
}
.nav-cta:hover { color: var(--ink) !important; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(255,90,31,.35); }

/* NAV DROPDOWN */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { display: inline-flex !important; align-items: center; gap: 6px; }
.nav-dropdown-trigger svg { transition: transform .2s; }
.nav-dropdown:hover .nav-dropdown-trigger svg, .nav-dropdown:focus-within .nav-dropdown-trigger svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 0; margin-top: 8px; min-width: 300px;
  background: #1C1C1A; border: 1px solid #2E2D29; border-radius: 14px; padding: 10px;
  box-shadow: 0 20px 40px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-menu.wide { min-width: 560px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.nav-dropdown-item { display: flex !important; align-items: flex-start; gap: 12px; padding: 12px !important; border-radius: 10px; }
.nav-dropdown-item:hover { background: #2B2A26; color: var(--paper) !important; }
.nav-dropdown-item .ndi-icon { flex: none; color: var(--accent); margin-top: 2px; }
.nav-dropdown-item .ndi-title { display: block; font-weight: 700; font-size: 14px; color: var(--paper); }
.nav-dropdown-item .ndi-desc { display: block; font-family: 'Archivo', sans-serif; font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; color: #A9A79E; margin-top: 2px; }

.dot { width: 10px; height: 10px; background: var(--accent); display: inline-block; border-radius: 50%; }
.dot.live { background: #1E8E4A; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(30,142,74,.55); } 100% { box-shadow: 0 0 0 10px rgba(30,142,74,0); } }

/* HERO */
.hero {
  position: relative; overflow: hidden; background: var(--ink); color: var(--paper);
  max-width: none; margin: 0; padding: 72px 32px 0;
  display: flex; flex-direction: column; gap: 0;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; opacity: .22;
}
.hero::before { width: 640px; height: 640px; background: var(--accent); right: -180px; top: -160px; }
.hero::after { width: 420px; height: 420px; background: #FF9A6B; opacity: .12; left: -160px; bottom: -120px; }
.hero > * { position: relative; z-index: 1; }
.hero-inner { max-width: 1280px; margin: 0 auto; width: 100%; padding-bottom: 56px; }
.hero-lower { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.hero-copy { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.kicker {
  margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 10px;
}
.hero .kicker { color: var(--paper); border: 1px solid #35332E; border-radius: 30px; padding: 9px 16px; display: inline-flex; width: fit-content; }
.hero-title {
  margin: 0; font-size: clamp(44px, 7.4vw, 108px); line-height: 0.9; font-weight: 900;
  font-stretch: 68%; text-transform: uppercase; letter-spacing: -0.01em; width: 100%; color: var(--paper);
}
.hero-title .accent-text { color: var(--accent); }
.hero-sub { margin: 0; max-width: 480px; font-size: 19px; line-height: 1.55; color: #C9C7BE; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding-top: 4px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border-radius: 999px;
  background: var(--accent); color: var(--ink); text-decoration: none; font-weight: 800;
  font-size: 16px; border: none; cursor: pointer;
  transition: transform .22s cubic-bezier(.2,.7,.2,1), box-shadow .22s ease, background .2s ease;
}
.btn-primary:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(255,95,31,.35); background: #FF7440; }
.btn-primary.is-disabled { opacity: .45; pointer-events: none; cursor: not-allowed; }
.btn-primary.is-disabled:hover { transform: none; box-shadow: none; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border-radius: 999px;
  background: transparent; color: var(--paper); border: 2px solid #35332E; text-decoration: none;
  font-weight: 700; font-size: 16px; cursor: pointer; transition: all .2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
/* .btn-dark: used only inside the app (never on the marketing site --
   checked), so this one redefinition is a safe, global fix for every
   solid-black pill button across billing/admin/campaigns/inbox/leads
   at once. Glass secondary style, same family as #export-btn etc. */
.btn-dark {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 26px; border-radius: 999px;
  background: var(--glass-fallback-1, #fff); color: var(--text, var(--ink)); border: 1px solid var(--separator, rgba(18,18,18,.08));
  text-decoration: none; font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: var(--shadow-s1, 0 1px 2px rgba(16,16,32,.05), 0 8px 24px rgba(16,16,32,.06));
  transition: background .18s ease, box-shadow .18s ease, color .18s ease;
}
@supports (backdrop-filter: blur(1px)) {
  .btn-dark { background: var(--glass-1-bg); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); }
}
.btn-dark:hover { color: var(--text, var(--ink)); background: var(--accent-tint, rgba(255,90,31,.12)); box-shadow: var(--shadow-s2, 0 2px 4px rgba(16,16,32,.06), 0 16px 40px rgba(16,16,32,.10)); }
.link-mono { font-family: 'IBM Plex Mono', monospace; font-size: 15px; font-weight: 500; padding: 12px 0; text-decoration: none; }
.link-mono { font-family: 'IBM Plex Mono', monospace; font-size: 15px; font-weight: 500; padding: 12px 0; text-decoration: none; }

/* HERO GAUGE */
.hero-gauge-wrap { flex: 1 1 380px; min-width: 260px; max-width: 460px; position: relative; display: flex; justify-content: center; }
.gauge { position: relative; width: 100%; max-width: 400px; }
.gauge svg { width: 100%; height: auto; display: block; }
.gauge svg text { font-family: 'Archivo', sans-serif; }
.glowring { animation: pulsering 2.4s ease-in-out infinite; }
@keyframes pulsering { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
.needle { transform-origin: 200px 200px; transform-box: view-box; }
.gauge.idle .needle { animation: gaugesweep 7s cubic-bezier(.45,0,.25,1) infinite; }
@keyframes gaugesweep {
  0%, 100% { transform: rotate(-120deg); } 18% { transform: rotate(30deg); } 26% { transform: rotate(14deg); }
  40% { transform: rotate(88deg); } 48% { transform: rotate(70deg); } 64% { transform: rotate(128deg); }
  70% { transform: rotate(112deg); } 86% { transform: rotate(-20deg); }
}
.gauge.tgl .needle { transition: transform 1.1s cubic-bezier(.34,1.56,.64,1); }
.gauge-callout {
  position: absolute; background: var(--paper); color: var(--ink); border-radius: 10px;
  padding: 8px 14px; font-size: 13px; font-weight: 700; box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
.gauge-callout.c1 { top: 24%; right: -4%; }
.gauge-callout.c2 { bottom: 28%; left: -6%; background: #fff; }
.gauge-callout .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #1E8E4A; display: inline-block; margin-right: 6px; }
.gauge-callout .status-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #1E8E4A; }

/* STATS STRIP */
.stats-strip {
  max-width: 1280px; margin: 0 auto; padding: 0 32px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid #2E2D29;
}
.stats-strip .stat { padding: 28px 24px 28px; border-left: 1px solid #2E2D29; }
.stats-strip .stat:first-child { border-left: 0; padding-left: 0; }
.stats-strip .stat-num { font-family: 'Archivo', sans-serif; font-stretch: 125%; font-weight: 800; font-size: 44px; color: var(--paper); letter-spacing: -0.02em; }
.stats-strip .stat-label { margin-top: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: #A9A79E; }

/* MARQUEE STRIP */
.marquee-strip { background: var(--accent); padding: 18px 0; overflow: hidden; }
.marquee-strip .marq-track { display: flex; width: max-content; animation: marq 28s linear infinite; }
.marquee-strip:hover .marq-track { animation-play-state: paused; }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-strip span {
  display: inline-flex; align-items: center; gap: 24px; padding: 0 28px;
  font-family: 'Archivo', sans-serif; font-stretch: 125%; font-weight: 800; text-transform: uppercase;
  font-size: 22px; color: var(--ink); white-space: nowrap;
}
.marquee-strip .sep { width: 7px; height: 7px; background: var(--ink); border-radius: 50%; display: inline-block; }
@media (prefers-reduced-motion: reduce) { .marquee-strip .marq-track { animation: none; } }

/* SECTION LAYOUT */
.section-wrap { max-width: 1280px; margin: 0 auto; padding: 104px 32px 96px; }
.section-wrap.is-wide { max-width: none; }
.section-wrap.dark { background: var(--ink); color: var(--paper); max-width: none; }
.section-wrap.dark .section-inner { max-width: 1280px; margin: 0 auto; }
.section-eyebrow {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
}
.section-eyebrow::before { content: ''; width: 36px; height: 2px; background: var(--accent); display: inline-block; }
.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 24px 48px; margin-bottom: 56px;
}
.section-head h2 {
  margin: 0; font-size: clamp(32px, 4.6vw, 64px); line-height: 0.96; font-weight: 900;
  font-stretch: 68%; text-transform: uppercase; max-width: 680px;
}
.section-head-left { display: flex; flex-direction: column; gap: 18px; max-width: 620px; }
.section-lede { margin: 0; max-width: 380px; font-size: 17px; line-height: 1.55; color: var(--muted); }
.section-lede.light { color: #C9C8C0; }
.section-fine { margin: 14px 0 0; font-family: 'IBM Plex Mono', monospace; font-size: 12px; line-height: 1.6; color: var(--accent); font-style: italic; max-width: 480px; }
.fine-print { margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--mono-muted); }

/* THROTTLE (dial picker) */
.throttle-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.throttle-opts { display: flex; flex-direction: column; gap: 14px; }
.throttle-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 84px;
  padding: 0 24px; border: 2px solid var(--ink); border-radius: 16px; background: transparent; cursor: pointer;
  transition: all .25s; text-align: left;
}
.throttle-opt:hover { background: #E8E6DF; transform: translateX(6px); }
.throttle-opt .t { font-family: 'Archivo', sans-serif; font-stretch: 125%; font-weight: 800; font-size: 21px; text-transform: uppercase; letter-spacing: -.01em; }
.throttle-opt .s { font-size: 13px; color: var(--mono-muted); margin-top: 2px; }
.throttle-opt .b { flex: none; font-family: 'Archivo', sans-serif; font-stretch: 125%; font-weight: 800; font-size: 32px; }
.throttle-radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#th5:checked ~ .throttle-opts label[for="th5"],
#th10:checked ~ .throttle-opts label[for="th10"],
#th15:checked ~ .throttle-opts label[for="th15"] { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateX(10px); }
#th5:checked ~ .throttle-opts label[for="th5"] .s,
#th10:checked ~ .throttle-opts label[for="th10"] .s,
#th15:checked ~ .throttle-opts label[for="th15"] .s { color: #C9C7BE; }
#th5:checked ~ .throttle-opts label[for="th5"] .b,
#th10:checked ~ .throttle-opts label[for="th10"] .b,
#th15:checked ~ .throttle-opts label[for="th15"] .b { color: var(--accent); }
.gauge-demo .needle { transform: rotate(-45deg); }
#th10:checked ~ .gauge-demo .needle { transform: rotate(45deg); }
#th15:checked ~ .gauge-demo .needle { transform: rotate(135deg); }
.rdl { position: absolute; right: 0; bottom: 70px; background: var(--accent); color: var(--ink); padding: 7px 14px; border-radius: 20px; display: none; }
#th15:checked ~ .gauge-demo .rdl { display: block; }

/* DIALER DEMO (pick up a line) */
.dial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.dial-lines { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dial-line {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 0 18px;
  border: 1px solid #2E2D29; background: #1C1C1A; border-radius: 14px; cursor: pointer; color: var(--paper);
  transition: all .2s; text-align: left;
}
.dial-line:hover { border-color: var(--accent); transform: translateX(6px); }
.dial-line .dnum { flex: none; width: 34px; height: 34px; border-radius: 10px; background: #2B2A26; display: flex; align-items: center; justify-content: center; font: 700 13px 'IBM Plex Mono', monospace; color: #A9A79E; }
.dial-line .dwho { flex: 1; min-width: 0; }
.dial-line .dnm { display: block; font-size: 14px; font-weight: 700; }
.dial-line .dph { display: block; font-size: 12px; color: #A9A79E; margin-top: 1px; }
.dial-line .dtag { flex: none; display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #E0A100; text-transform: uppercase; }
.dial-line .dtag .blinker { width: 7px; height: 7px; border-radius: 50%; background: #E0A100; animation: blink 1.2s infinite; }
@keyframes blink { 0%,100% { opacity: .3; } 50% { opacity: 1; } }
.dial-line.vm { opacity: .4; cursor: default; }
.dial-line.vm:hover { border-color: #2E2D29; transform: none; }
.dial-line.vm .dtag { color: #8C8A82; }
.dial-radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#dl1:checked ~ .dial-lines label[for="dl1"],
#dl2:checked ~ .dial-lines label[for="dl2"],
#dl3:checked ~ .dial-lines label[for="dl3"],
#dl4:checked ~ .dial-lines label[for="dl4"],
#dl5:checked ~ .dial-lines label[for="dl5"] { border-color: var(--accent); background: #241A14; transform: none; }
#dl1:checked ~ .dial-lines label[for="dl1"] .dtag,
#dl2:checked ~ .dial-lines label[for="dl2"] .dtag,
#dl3:checked ~ .dial-lines label[for="dl3"] .dtag,
#dl4:checked ~ .dial-lines label[for="dl4"] .dtag,
#dl5:checked ~ .dial-lines label[for="dl5"] .dtag { color: #4FD080; }
#dl1:checked ~ .dial-lines label[for="dl1"] .dtag .blinker,
#dl2:checked ~ .dial-lines label[for="dl2"] .dtag .blinker,
#dl3:checked ~ .dial-lines label[for="dl3"] .dtag .blinker,
#dl4:checked ~ .dial-lines label[for="dl4"] .dtag .blinker,
#dl5:checked ~ .dial-lines label[for="dl5"] .dtag .blinker { background: #4FD080; animation: pulse 1.7s infinite; }
#dl1:checked ~ .dial-lines label[for="dl1"] .dnum,
#dl2:checked ~ .dial-lines label[for="dl2"] .dnum,
#dl3:checked ~ .dial-lines label[for="dl3"] .dnum,
#dl4:checked ~ .dial-lines label[for="dl4"] .dnum,
#dl5:checked ~ .dial-lines label[for="dl5"] .dnum { background: var(--accent); color: var(--ink); }
.dial-stage {
  background: #1C1C1A; border: 1px solid #2E2D29; border-radius: 20px; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px; text-align: center; color: var(--paper);
}
.dial-stage .dial-icon { color: var(--accent); }
.dial-stage h3 { margin: 0; font-size: 22px; font-weight: 850; font-stretch: 85%; text-transform: uppercase; }
.dial-stage p { margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.dial-stage-default { display: block; }
.dial-stage-answered { display: none; }
#dl1:checked ~ .dial-stage .dial-stage-default,
#dl2:checked ~ .dial-stage .dial-stage-default,
#dl3:checked ~ .dial-stage .dial-stage-default,
#dl4:checked ~ .dial-stage .dial-stage-default,
#dl5:checked ~ .dial-stage .dial-stage-default { display: none; }
#dl1:checked ~ .dial-stage .dial-stage-answered,
#dl2:checked ~ .dial-stage .dial-stage-answered,
#dl3:checked ~ .dial-stage .dial-stage-answered,
#dl4:checked ~ .dial-stage .dial-stage-answered,
#dl5:checked ~ .dial-stage .dial-stage-answered { display: flex; }
.dial-stage-answered { flex-direction: column; align-items: center; gap: 14px; }
.dial-stage-answered .dial-who { font-size: 20px; font-weight: 850; text-transform: uppercase; }
.dial-book-btn {
  margin-top: 6px; padding: 14px 22px; border-radius: 12px; background: var(--accent); color: var(--ink);
  font-weight: 800; border: none; cursor: pointer; font-size: 14px;
}

/* BENTO (CRM) */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(140px, auto); gap: 16px; }
.bento > div {
  border-radius: 20px; padding: 26px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s;
}
.bento > div:hover { transform: translateY(-8px); box-shadow: 0 30px 60px rgba(19,19,19,.14); }
.bento-eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; opacity: .6; }
.bento h3 { margin: 0; font-size: 21px; font-weight: 850; font-stretch: 85%; text-transform: uppercase; line-height: 1.05; }
.bento p { margin: 0; font-size: 14px; line-height: 1.4; opacity: .75; }
.bento-leads { grid-column: span 2; background: #fff; border: 1.5px solid var(--divider); }
.bento-pipeline { grid-column: span 2; background: var(--ink); color: var(--paper); }
.bento-calendar { grid-column: span 1; background: var(--paper-2); border: 1.5px solid var(--divider); }
.bento-documents { grid-column: span 1; background: #E7E5DD; }
.bento-teams { grid-column: span 2; background: #fff; border: 1.5px solid var(--divider); }
.bento-compliance { grid-column: span 2; background: var(--accent); color: var(--ink); }
.bento-reporting { grid-column: span 2; background: #fff; border: 1.5px solid var(--divider); }
.bento-bars { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.bento-bars i { display: block; height: 7px; border-radius: 4px; background: var(--divider); }
.bento-bars i:first-child { width: 72%; background: var(--accent); }
.bento-bars i:nth-child(2) { width: 48%; }
.bento-bars i:nth-child(3) { width: 30%; }
@media (max-width: 860px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-leads, .bento-pipeline, .bento-teams, .bento-compliance, .bento-reporting { grid-column: span 2; }
}

/* LEGAL CONTENT */
.legal-content { max-width: 760px; margin: 0 auto; padding: 24px 32px 120px; line-height: 1.7; }
.legal-content h2 { font-size: 26px; font-weight: 850; font-stretch: 90%; margin: 48px 0 14px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: 18px; font-weight: 800; margin: 28px 0 10px; }
.legal-content p { margin: 0 0 16px; color: var(--muted); }
.legal-content ul { margin: 0 0 16px; padding-left: 22px; color: var(--muted); }
.legal-content li { margin-bottom: 8px; }
.legal-content .legal-updated { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mono-muted); margin-bottom: 36px; }
.legal-content .legal-note { background: #fff; border: 1.5px solid var(--divider); border-radius: 12px; padding: 18px 22px; font-size: 14px; color: var(--muted); }

/* BLOG INDEX */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.blog-card { background: #fff; border: 1.5px solid var(--divider); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); transition: transform .2s ease, box-shadow .2s ease; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(19,19,19,.1); color: var(--ink); }
.blog-tag { align-self: flex-start; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; background: var(--paper-2); color: var(--mono-muted); }
.blog-tag.is-comparison { background: #FFF1E8; color: var(--accent); }
.blog-card h3 { margin: 0; font-size: 20px; font-weight: 850; font-stretch: 85%; line-height: 1.25; }
.blog-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); flex-grow: 1; }
.blog-card-meta { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--mono-muted); }
@media (max-width: 760px) { .blog-grid { grid-template-columns: 1fr; } }

/* ARTICLE */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 24px 32px 0; }
.article-byline { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--mono-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 36px; padding-bottom: 20px; border-bottom: 1px solid var(--divider); }
.article-tldr { background: var(--paper-2); border-left: 4px solid var(--accent); border-radius: 4px; padding: 20px 24px; margin-bottom: 40px; }
.article-tldr-label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 10px; }
.article-tldr p, .article-tldr li { margin: 0 0 8px; font-size: 15px; line-height: 1.55; color: var(--ink); }
.article-tldr ul { margin: 0; padding-left: 20px; }
.article-body h2 { font-size: 28px; font-weight: 850; font-stretch: 85%; margin: 48px 0 16px; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 19px; font-weight: 800; margin: 32px 0 12px; }
.article-body p { margin: 0 0 18px; font-size: 16px; line-height: 1.75; color: var(--muted); }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 24px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--accent); font-weight: 600; }
.article-body .compare-wrap { margin-top: 0; margin-bottom: 40px; }
.article-cta { background: var(--ink); color: var(--paper); border-radius: 20px; padding: 40px; text-align: center; margin: 48px 0 80px; }
.article-cta h3 { margin: 0 0 10px; font-size: 24px; color: var(--paper); }
.article-cta p { color: var(--dark-muted); margin: 0 0 20px; }
@media (max-width: 640px) { .article-wrap { padding: 24px 20px 0; } }

/* PRODUCT SCREENS */
.screens-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.screen-card { background: #fff; border: 1.5px solid var(--divider); border-radius: 16px; overflow: hidden; }
.screen-card img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--divider); }
.screen-card-body { padding: 16px 20px 20px; }
.screen-card-label { font-weight: 700; font-size: 15px; color: var(--ink); }
.screen-card-desc { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--dark-muted, #5E5C55); }
@media (max-width: 760px) { .screens-grid { grid-template-columns: 1fr; } }

/* COMPLIANCE */
.compliance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.compliance-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; background: var(--dark-border); border: 1px solid var(--dark-border); border-radius: 16px; overflow: hidden; }
.compliance-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px;
  background: #1C1C1A; font-size: 14px; font-weight: 600;
}
.compliance-status { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }

/* SYSTEMS (tabbed overview) */
.systems-radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.systems-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.systems-tabs { display: flex; flex-direction: column; border-top: 1px solid var(--divider); }
.systems-tab {
  display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 0 4px;
  border-bottom: 1px solid var(--divider); cursor: pointer; color: var(--mono-muted); transition: all .2s;
}
.systems-tab:hover { color: var(--ink); padding-left: 10px; }
.systems-tab-num { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.08em; }
.systems-tab-title { font-size: 24px; font-weight: 850; font-stretch: 85%; text-transform: uppercase; }
#sys-text:checked ~ .systems-grid .systems-tab-a,
#sys-call:checked ~ .systems-grid .systems-tab-b,
#sys-register:checked ~ .systems-grid .systems-tab-c,
#sys-track:checked ~ .systems-grid .systems-tab-d { color: var(--ink); border-bottom-color: var(--accent); border-bottom-width: 3px; padding-left: 10px; }
#sys-text:checked ~ .systems-grid .systems-tab-a .systems-tab-num,
#sys-call:checked ~ .systems-grid .systems-tab-b .systems-tab-num,
#sys-register:checked ~ .systems-grid .systems-tab-c .systems-tab-num,
#sys-track:checked ~ .systems-grid .systems-tab-d .systems-tab-num { color: var(--accent); }
.systems-panel { display: none; margin-top: 32px; }
.systems-panel h3 { margin: 0 0 10px; font-size: 22px; font-weight: 800; }
.systems-panel p { margin: 0 0 16px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.systems-points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.systems-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.5; }
.systems-points svg { flex: none; margin-top: 3px; }
#sys-text:checked ~ .systems-grid .systems-panel-a,
#sys-call:checked ~ .systems-grid .systems-panel-b,
#sys-register:checked ~ .systems-grid .systems-panel-c,
#sys-track:checked ~ .systems-grid .systems-panel-d { display: block; }
.systems-visual { position: sticky; top: 24px; }
.systems-visual-panel { display: none; }
#sys-text:checked ~ .systems-grid .systems-visual-a,
#sys-call:checked ~ .systems-grid .systems-visual-b,
#sys-register:checked ~ .systems-grid .systems-visual-c,
#sys-track:checked ~ .systems-grid .systems-visual-d { display: block; }

.inbox-card, .reg-checklist, .track-card, .dialer-mini-card {
  background: #fff; border: 1px solid var(--divider); border-radius: 22px; padding: 26px; box-shadow: 0 30px 60px rgba(19,19,19,.1);
}
.inbox-row { display: flex; align-items: center; gap: 14px; padding: 15px 4px; border-bottom: 1px solid var(--paper); }
.inbox-row:last-child { border-bottom: none; }
.inbox-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #FFE9DE; color: #B93D08; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.inbox-who { flex: 1; min-width: 0; }
.inbox-name { display: block; font-size: 15px; font-weight: 700; }
.inbox-msg { display: block; font-size: 13px; color: var(--mono-muted); }
.inbox-tag { flex: none; padding: 4px 11px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.inbox-tag-hot { background: #E1F3E7; color: #17703A; }
.inbox-tag-callback { background: #FFE9DE; color: #B93D08; }
.inbox-tag-new { background: #FFF1D6; color: #7A4F00; }
.inbox-tag-out { background: #E6E4DC; color: #2B2A26; }

.dialer-mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dialer-mini-cell { background: var(--paper-2); border-radius: 12px; padding: 12px; }
.dialer-mini-label { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--mono-muted); margin-bottom: 8px; }
.dialer-mini-stage { position: relative; height: 20px; }
.dmst { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; opacity: 0; font-size: 13px; font-weight: 600; }
.dmst::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dmst1 { color: var(--mono-muted); animation: dmst1cycle 9s infinite; }
.dmst1::before { background: #8C8A82; }
.dmst2 { color: #7A4F00; animation: dmst2cycle 9s infinite; }
.dmst2::before { background: #E0A100; }
.dmst3 { color: #17703A; animation: dmst3cycle 9s infinite; }
.dmst3::before { background: #1E8E4A; }
@keyframes dmst1cycle { 0%, 28% { opacity: 1; } 32%, 100% { opacity: 0; } }
@keyframes dmst2cycle { 0%, 30% { opacity: 0; } 34%, 62% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes dmst3cycle { 0%, 64% { opacity: 0; } 68%, 96% { opacity: 1; } 100% { opacity: 0; } }
.dialer-mini-cell:nth-child(2) .dmst { animation-delay: -1.5s; }
.dialer-mini-cell:nth-child(3) .dmst { animation-delay: -3s; }
.dialer-mini-cell:nth-child(4) .dmst { animation-delay: -4.5s; }
.dialer-mini-cell:nth-child(5) .dmst { animation-delay: -6s; }
.dialer-mini-cell:nth-child(6) .dmst { animation-delay: -7.5s; }

.reg-check-row { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--paper); font-size: 15px; font-weight: 700; }
.reg-check-row:last-child { border-bottom: none; }
.reg-check-icon { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.reg-check-icon.is-done { background: var(--ink); color: var(--accent); }
.reg-check-icon.is-active { background: #FFF1D6; color: #7A4F00; }
.reg-check-icon.is-pending { background: var(--divider); color: #7A4F00; }
.reg-check-label { flex: 1; }
.reg-check-status { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; color: var(--mono-muted); text-transform: none; }

.track-kicker { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--mono-muted); margin-bottom: 6px; text-transform: uppercase; }
.track-stat { padding: 12px 0; }
.track-stat-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.track-bar { height: 12px; border-radius: 6px; background: var(--divider); overflow: hidden; }
.track-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }

@media (max-width: 860px) { .systems-grid { grid-template-columns: 1fr; } .systems-visual { position: static; } }

/* THE DIFFERENCE (drag compare) */
.diff-compare { display: flex; align-items: stretch; border-radius: 24px; overflow: hidden; border: 1px solid var(--dark-border); min-height: 420px; }
.diff-before {
  position: relative; flex: none; width: 50%; min-width: 240px; max-width: 94%; overflow: hidden;
  resize: horizontal; background: #1C1C1A; border-right: 3px solid var(--accent);
}
.diff-after { flex: 1; min-width: 0; overflow: hidden; background: var(--paper); color: var(--ink); }
.diff-pane-inner { padding: 32px; }
.diff-pane-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.diff-badge { font-family: 'IBM Plex Mono', monospace; font-size: 13px; padding: 6px 12px; border-radius: 8px; }
.diff-badge-before { background: #3A1B1B; color: #FF8A80; }
.diff-badge-after { background: var(--ink); color: var(--accent); }
.diff-pane-title { font-size: 18px; font-weight: 800; font-family: 'Archivo', sans-serif; }
.diff-before .diff-pane-title { color: var(--paper); }
.diff-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 13px 0; font-size: 15px; border-bottom: 1px dashed #35332E; }
.diff-after .diff-row { border-bottom: 1px solid var(--border-soft); }
.diff-row-text { flex: 1 1 150px; min-width: 0; color: var(--dark-muted); text-decoration: line-through; text-decoration-color: #5E5C55; }
.diff-row-text-good { color: var(--ink); text-decoration: none; font-weight: 600; }
.diff-status { padding: 4px 11px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.diff-status-bad { background: #FDECEC; color: #B3261E; }
.diff-status-good { background: #E1F3E7; color: #17703A; }
.diff-handle { position: absolute; right: 0; bottom: 0; width: 64px; height: 64px; pointer-events: none; z-index: 4; }
.diff-handle::after {
  content: '\2194'; position: absolute; right: 10px; bottom: 12px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: var(--ink); font-size: 22px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 8px 24px rgba(255,95,31,.5); animation: diffnudge 3s ease-in-out infinite;
}
@keyframes diffnudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-10px); } }
.diff-resizer { position: absolute; right: 0; bottom: 0; width: 66px; height: 66px; cursor: ew-resize; z-index: 5; }
.diff-before::-webkit-resizer { background: transparent; }
@media (max-width: 760px) { .diff-compare { flex-direction: column; } .diff-before { width: 100%; max-width: 100%; resize: vertical; min-height: 200px; } }

/* REGISTRATION (timeline) */
.reg-section { background: var(--accent); color: var(--ink); max-width: none; padding-top: 104px; padding-bottom: 104px; }
.reg-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 64px; max-width: 1280px; margin-left: auto; margin-right: auto; padding: 0 32px; }
.reg-section .section-eyebrow::before { background: var(--ink); }
.reg-sub { margin: 0; font-size: 18px; line-height: 1.6; color: #2B2A26; }
.reg-timeline { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.reg-timeline-bar { position: absolute; left: calc(10% + 32px); right: calc(10% + 32px); top: 27px; height: 4px; background: rgba(19,19,19,.22); border-radius: 2px; overflow: hidden; }
.reg-timeline-bar i { display: block; height: 100%; width: 0; background: var(--ink); animation: regfill 12s linear infinite; }
@keyframes regfill { 0% { width: 0; } 80%, 92% { width: 100%; } 100% { width: 0; } }
.reg-step { position: relative; text-align: center; }
.reg-step-num {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--ink);
  display: flex; align-items: center; justify-content: center; font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 18px; color: var(--ink);
}
.reg-step-title { font-size: 17px; font-weight: 800; text-transform: uppercase; }
.reg-step-desc { font-size: 14px; color: #2B2A26; margin-top: 8px; line-height: 1.5; }
@media (max-width: 760px) { .reg-head, .reg-timeline { grid-template-columns: 1fr; } .reg-timeline { gap: 32px; } .reg-timeline-bar { display: none; } }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
.faq-head { position: sticky; top: 24px; }
.faq-list { border-top: 1px solid var(--dark-border); }
.faq-item { border-bottom: 1px solid var(--dark-border); padding: 4px 0; }
.faq-item summary { display: flex; align-items: center; gap: 16px; min-height: 72px; font-size: 20px; font-weight: 700; color: var(--paper); cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; margin-left: auto; font-size: 28px; color: var(--accent); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 24px; max-width: 640px; font-size: 16px; line-height: 1.65; color: var(--dark-muted); }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } .faq-head { position: static; } }

/* PRICING */
.pricing-section { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--paper-2); }
.pricing-group { margin-top: 72px; }
.pricing-group:first-of-type { margin-top: 48px; }
.pricing-group-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; margin-bottom: 36px; }
.pricing-group-head h3 { margin: 0; font-size: clamp(28px, 3.6vw, 44px); font-weight: 900; font-stretch: 70%; text-transform: uppercase; }
.pricing-group-sub { font-family: 'IBM Plex Mono', monospace; font-size: 14px; color: var(--mono-muted); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 24px; align-items: stretch; }
.plan-card { border: 2px solid var(--ink); border-radius: 18px; padding: 32px; display: flex; flex-direction: column; gap: 20px; background: #fff; }
.plan-card.is-dark { background: var(--ink); color: var(--paper); }
.plan-kicker { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.plan-name { margin: 0; font-size: 24px; font-weight: 900; font-stretch: 75%; text-transform: uppercase; }
.plan-blurb { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.plan-card.is-dark .plan-blurb { color: var(--dark-muted); }
.plan-badge { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 10px; border-radius: 20px; background: var(--accent); color: var(--ink); white-space: nowrap; }
.plan-price-row { display: flex; align-items: baseline; gap: 8px; }
.plan-price { font-size: 36px; font-weight: 900; font-stretch: 70%; line-height: 1; letter-spacing: -0.01em; }
.plan-price.placeholder { color: var(--accent); font-family: 'IBM Plex Mono', monospace; font-size: 22px; }
.plan-card.is-dark .plan-price.placeholder { color: var(--accent); }
.plan-period { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--muted); }
.plan-card.is-dark .plan-period { color: var(--dark-muted); }
.plan-sub { margin: -8px 0 0; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--mono-muted); }
.plan-card.is-dark .plan-sub { color: var(--dark-muted); }
.plan-items { margin: 0; padding: 16px 0 0; list-style: none; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--divider); font-size: 14px; line-height: 1.4; flex-grow: 1; }
.plan-card.is-dark .plan-items { border-top-color: var(--dark-border); }
.plan-items li { display: flex; gap: 9px; align-items: flex-start; }
.plan-items svg { flex: 0 0 15px; margin-top: 2px; }
.plan-cta {
  text-align: center; padding: 14px; border-radius: 12px; background: var(--ink); color: var(--paper);
  text-decoration: none; font-weight: 800; font-size: 15px; cursor: pointer; border: none;
}
.plan-cta:hover { color: var(--accent); }
.plan-card.is-dark .plan-cta { background: var(--accent); color: var(--ink); }
.plan-card.is-dark .plan-cta:hover { color: #fff; }

/* EXPLAINER CARDS (prepaid wallet / registration fee) */
/* PRICING FINDER */
.finder-card { border: 2px solid var(--ink); border-radius: 20px; background: #fff; padding: 36px; }
.finder-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 20px 32px; padding-bottom: 28px; border-bottom: 1px solid var(--divider); margin-bottom: 28px; }
.finder-title { margin: 0 0 6px; font-size: 26px; font-weight: 900; font-stretch: 75%; text-transform: uppercase; }
.finder-sub { margin: 0; font-size: 14px; color: var(--muted); max-width: 420px; }
.finder-sales { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.finder-sales-label { font-weight: 700; font-size: 14px; }
.finder-sales-sub { font-size: 12px; color: var(--mono-muted); margin-bottom: 6px; }
.finder-sales-btn { padding: 10px 18px !important; font-size: 13px !important; }
.finder-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; }
.finder-step-label { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; margin-bottom: 14px; }
.finder-step-num {
  flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper);
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.toggle-row { display: flex; flex-direction: column; gap: 10px; }
.toggle-card {
  position: relative; text-align: left; border: 2px solid var(--divider); border-radius: 12px; background: #fff;
  padding: 12px 16px; font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 14px; color: var(--ink);
  cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s, background .15s;
}
.toggle-card:hover { border-color: var(--ink); }
.toggle-card.is-selected { border-color: var(--accent); background: #FFF4EE; }
.toggle-card-sub { font-weight: 500; font-size: 12px; color: var(--mono-muted); }
.toggle-badge {
  position: absolute; top: -10px; right: 12px; background: var(--accent); color: var(--ink);
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 3px 9px; border-radius: 10px;
}
.volume-value { font-weight: 900; font-size: 20px; font-stretch: 80%; display: block; margin-bottom: 10px; }
.volume-slider { width: 100%; accent-color: var(--accent); }
.volume-minmax { display: flex; justify-content: space-between; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mono-muted); margin-top: 6px; }
@media (max-width: 860px) { .finder-steps { grid-template-columns: 1fr; } .finder-sales { align-items: flex-start; text-align: left; } }

/* COMPARE TABLE */
.compare-wrap { margin-top: 56px; }
.compare-title { margin: 0 0 20px; font-size: clamp(24px, 3vw, 34px); font-weight: 900; font-stretch: 70%; text-transform: uppercase; }
.compare-scroll { overflow-x: auto; border: 1.5px solid var(--divider); border-radius: 16px; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; background: #fff; }
.compare-table th, .compare-table td { padding: 14px 18px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--divider); }
.compare-table th { font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mono-muted); background: var(--paper-2); }
.compare-table td:not(:first-child), .compare-table th:not(:first-child) { text-align: center; }
.compare-table td:first-child { font-weight: 700; }
.compare-table tr.is-recommended td:not(:first-child) { background: #FFF4EE; }
.compare-table th.is-recommended { color: var(--accent); }
.compare-check { color: #1E8E4A; }
.compare-dash { color: var(--border-soft); }

.explainer-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.explainer-card { border: 2px solid var(--ink); border-radius: 16px; background: #fff; padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.explainer-kicker { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.explainer-name { font-weight: 800; font-size: 17px; }
.explainer-body { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.explainer-body .placeholder { color: var(--accent); font-family: 'IBM Plex Mono', monospace; font-weight: 700; }

/* CONTACT */
.contact-section { background: var(--ink); color: var(--paper); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-list { margin: 20px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.contact-list svg { flex: 0 0 16px; margin-top: 3px; color: var(--accent); }
.contact-email-block { margin-top: 40px; }
.contact-email-label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dark-muted); }
.contact-email-value { display: block; margin-top: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 16px; color: var(--accent); }
.contact-card { background: var(--paper); color: var(--ink); border-radius: 20px; padding: 32px; }
.contact-card-head { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mono-muted); margin-bottom: 20px; }
.checkout-form { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.book-field { display: flex; flex-direction: column; gap: 8px; }
.book-field label {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.book-field input, .book-field select, .book-field textarea {
  border: 2px solid var(--ink); border-radius: 10px; background: #fff; padding: 13px 15px;
  font-family: 'IBM Plex Mono', monospace; font-size: 14px; color: var(--ink);
}
.book-field textarea { resize: vertical; font-family: 'Archivo', sans-serif; font-size: 14px; }
.book-field input:focus, .book-field select:focus, .book-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.book-field-row { display: flex; flex-wrap: wrap; gap: 16px; }
.book-field-row .book-field { flex: 1 1 160px; }
.property-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px 20px; }
.property-form-section-label {
  grid-column: 1 / -1;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--mono-muted);
  margin: 22px 0 2px; padding-top: 16px; border-top: 1px solid var(--divider);
}
.property-form-section-label:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.property-form-grid .book-field.is-full { grid-column: 1 / -1; }
.property-lookup-link.is-disabled-link { opacity: 0.45; cursor: default; pointer-events: none; }

.comp-table-wrap { overflow-x: auto; }
.comp-table {
  display: grid;
  grid-template-columns: minmax(180px, 2.2fr) 100px 90px 130px 32px;
  gap: 8px 12px;
  align-items: center;
  min-width: 560px;
}
.comp-table[data-comp-type="sold"] {
  grid-template-columns: minmax(170px, 2fr) 64px 64px 90px 90px 90px 100px 130px 32px;
  min-width: 920px;
}
.comp-table-head {
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--mono-muted);
  padding-bottom: 6px; border-bottom: 1px solid var(--divider);
}
.comp-row { display: contents; }
.comp-row input {
  width: 100%; box-sizing: border-box; border: 1.5px solid var(--divider); border-radius: 8px;
  background: #fff; padding: 8px 10px; font-family: 'IBM Plex Mono', monospace;
  font-size: 13px; color: var(--ink);
}
.comp-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.comp-remove-btn {
  width: 28px; height: 28px; border: none; border-radius: 8px; background: transparent;
  color: var(--mono-muted); font-size: 16px; line-height: 1; cursor: pointer; justify-self: center;
}
.comp-remove-btn:hover { background: var(--accent-tint, rgba(255,90,31,.12)); color: var(--accent, #D9420F); }

.rehab-estimator-grid { display: grid; grid-template-columns: 1fr 280px; gap: 24px; margin-top: 4px; }
@media (max-width: 760px) { .rehab-estimator-grid { grid-template-columns: 1fr; } }
.rehab-checklist { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; }
.rehab-checklist label { display: flex; align-items: center; gap: 6px; font-family: 'Archivo', sans-serif; font-size: 13px; color: var(--ink); }
.rehab-estimate-box { background: var(--divider); border-radius: 14px; padding: 18px; align-self: start; }
.rehab-estimate-total { font-family: 'IBM Plex Mono', monospace; font-weight: 800; font-size: 26px; color: var(--ink); margin-top: 4px; }
.rehab-estimate-breakdown { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--mono-muted); display: flex; flex-direction: column; gap: 4px; }
.rehab-estimate-line { display: flex; align-items: center; justify-content: space-between; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--ink); }
.rehab-estimate-line.is-total { border-top: 1px solid var(--mono-muted); padding-top: 6px; margin-top: 4px; font-weight: 700; }

.ai-score-badge {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 62px; height: 62px; border-radius: 50%; border: 2px solid var(--ink);
  background: #fff; cursor: pointer; flex-shrink: 0; padding: 0;
}
.ai-score-badge:hover { background: var(--accent-tint, rgba(255,90,31,.12)); }
.ai-score-badge.is-hot { border-color: #D9420F; }
.ai-score-badge.is-hot .ai-score-value { color: #D9420F; }
.ai-score-badge.is-warm { border-color: #B8860B; }
.ai-score-badge.is-warm .ai-score-value { color: #B8860B; }
.ai-score-badge.is-cold { border-color: var(--mono-muted); }
.ai-score-value { font-family: 'IBM Plex Mono', monospace; font-size: 18px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.ai-score-label { font-family: 'IBM Plex Mono', monospace; font-size: 8px; font-weight: 700; letter-spacing: 0.04em; color: var(--mono-muted); }

.ai-score-panel-total { font-family: 'IBM Plex Mono', monospace; font-weight: 800; font-size: 40px; text-align: center; margin: 6px 0 2px; }
.ai-score-panel-bucket { text-align: center; font-size: 13px; font-weight: 700; color: var(--mono-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 18px; }
.ai-score-panel-summary { font-size: 14.5px; line-height: 1.6; color: var(--ink); background: var(--divider); border-radius: 12px; padding: 16px; }
.ai-score-panel-updated { font-size: 12px; color: var(--mono-muted); margin-top: 10px; }

.ai-score-category-list { display: flex; flex-direction: column; gap: 16px; margin-top: 4px; }
.ai-score-category-row { padding-bottom: 14px; border-bottom: 1px solid var(--divider); }
.ai-score-category-row:last-child { border-bottom: none; padding-bottom: 0; }
.ai-score-category-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.ai-score-category-label { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.ai-score-category-value { font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 800; }
.ai-score-category-value.is-hot { color: #D9420F; }
.ai-score-category-value.is-warm { color: #B8860B; }
.ai-score-category-value.is-cold { color: var(--mono-muted); }
.ai-score-category-bar { height: 6px; border-radius: 999px; background: var(--divider); overflow: hidden; }
.ai-score-category-bar-fill { height: 100%; border-radius: 999px; }
.ai-score-category-bar-fill.is-hot { background: #D9420F; }
.ai-score-category-bar-fill.is-warm { background: #B8860B; }
.ai-score-category-bar-fill.is-cold { background: var(--mono-muted); }
.ai-score-category-note { font-size: 12.5px; color: var(--mono-muted); margin: 6px 0 0; line-height: 1.5; }

.back-nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--mono-muted);
  text-decoration: none; padding: 6px 2px; transition: color .15s ease, gap .15s ease;
}
.back-nav-link:hover { color: var(--ink); gap: 10px; }
.back-nav-link svg { flex-shrink: 0; }
.book-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.auth-forgot-link { align-self: flex-end; font-size: 13px; font-weight: 700; color: var(--mono-muted); text-decoration: underline; }
.auth-forgot-link:hover { color: var(--ink); }
.book-submit { width: 100%; justify-content: center; margin-top: 4px; }
.book-submit:disabled { opacity: 0.6; cursor: default; }
.book-note { margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--mono-muted); min-height: 1em; }
.book-note-error { color: var(--accent); }

.announcement-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: #FFF1D6; border: 1px solid #F0CF8A; border-radius: 14px;
  padding: 12px 16px; margin-bottom: 20px; font-size: 13px; color: #7A4F00;
}
.announcement-banner button {
  background: none; border: none; font-size: 20px; line-height: 1; cursor: pointer; color: #7A4F00; flex: none;
}
.book-success { display: flex; flex-direction: column; gap: 10px; text-align: center; padding: 12px 0; }
.book-success-title { font-size: 26px; font-weight: 900; font-stretch: 72%; text-transform: uppercase; letter-spacing: -0.01em; }
.book-success p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* CTA ENGINE BAND */
.cta-engine {
  background: linear-gradient(160deg, #FF8A4A, var(--accent) 55%); text-align: center;
  padding: 72px 32px 0; display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.cta-engine-car { width: min(420px, 80vw); }
.cta-engine-title {
  margin: 0; font-size: clamp(36px, 6vw, 72px); line-height: 0.95; font-weight: 900; font-stretch: 68%;
  text-transform: uppercase; color: var(--ink);
}
.cta-engine-foot { padding-bottom: 56px; }

/* FOOTER */
.site-footer { background: var(--ink); color: var(--border-soft); }
.footer-wrap {
  max-width: 1280px; margin: 0 auto; padding: 48px 32px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 32px 40px;
  font-family: 'IBM Plex Mono', monospace; font-size: 13px;
}
.footer-wrap.footer-compact { padding: 20px 32px; align-items: center; }

/* APP TOPBAR (signed-in pages) */
.app-topbar { background: var(--ink); border-bottom: 1px solid #2E2D29; position: sticky; top: 0; z-index: 20; }
.app-topbar-inner { padding: 12px 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.app-logo-icon { height: 30px; width: auto; display: block; }
.app-workspace-name {
  margin-left: 12px; padding-left: 12px; border-left: 1px solid #2E2D29;
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--dark-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px;
}
.app-plan-name {
  margin-left: 10px; padding: 4px 10px; border-radius: 20px; background: #1C1C1A; border: 1px solid #2E2D29;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent); white-space: nowrap; flex: none;
}
.app-topbar-inner { flex-wrap: nowrap; }
.app-topbar-inner .app-workspace-name { flex: 1 1 auto; min-width: 0; }

/* CREDIT / USAGE BAR */
.credit-bar-track { height: 14px; border-radius: 7px; background: var(--divider); overflow: hidden; }
.credit-bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 7px; transition: width .3s ease; }
.credit-bar-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.billing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: start; }
.billing-card {
  background: #fff; border: 1px solid rgba(18,18,18,0.05); border-radius: 20px; padding: 28px;
  box-shadow: 0 1px 2px rgba(18,18,18,.03), 0 10px 28px -8px rgba(18,18,18,.08);
  transition: box-shadow .2s ease, transform .2s ease;
}
.billing-card-title { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mono-muted); margin-bottom: 16px; }
.billing-wallet-amount { font-size: 36px; font-weight: 900; font-stretch: 70%; margin-bottom: 18px; }
.txn-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow-y: auto; }
.txn-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.txn-row .txn-amount.is-positive { color: #17703A; font-weight: 700; }
.txn-row .txn-amount.is-negative { color: #B3261E; font-weight: 700; }
.txn-empty { font-size: 13px; color: var(--mono-muted); padding: 10px 0; }

/* BILLING page v2 */
.bl-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; margin-top: 24px; }
@media (max-width: 1000px) { .bl-grid-3 { grid-template-columns: 1fr; } }
.bl-card { display: flex; flex-direction: column; }
.bl-test-chip { font-family: var(--font-sans, inherit); text-transform: none; letter-spacing: normal; font-size: 10px; padding: 2px 8px; margin-left: 6px; vertical-align: 1px; }

.bl-ring-wrap { position: relative; width: 148px; height: 148px; margin: 4px auto 18px; }
.bl-ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.bl-ring-track { fill: none; stroke: var(--divider, rgba(18,18,18,.08)); stroke-width: 10; }
.bl-ring-fill { fill: none; stroke: var(--accent-solid, #D9420F); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .5s var(--ease-out, ease); }
.bl-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bl-ring-pct { font-size: 26px; font-weight: 900; font-stretch: 70%; line-height: 1; color: var(--text, var(--ink)); }
.bl-ring-label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3, var(--mono-muted)); margin-top: 3px; }

.bl-usage-rows { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.bl-usage-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--separator, rgba(18,18,18,.06)); }
.bl-usage-row:last-child { border-bottom: none; }
.bl-usage-row-total { font-weight: 700; }

.bl-wallet-balance { font-size: 34px; font-weight: 900; font-stretch: 70%; margin: 2px 0 6px; color: var(--accent-solid, #D9420F); }
.bl-quickadd-row { display: flex; gap: 8px; margin-top: 16px; }
.bl-quickadd-row .wallet-amount-btn { flex: 1; padding: 9px 0; }
.bl-custom-add-row { display: flex; gap: 8px; margin-top: 10px; }
.bl-custom-add-row .ce-input { height: 38px; }
.bl-custom-add-row .btn-primary { height: 38px; flex: none; }
.bl-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--separator, rgba(18,18,18,.08)); cursor: pointer; }
.bl-switch-row-label { font-size: 13px; font-weight: 600; }

.bl-packs-balance { font-size: 30px; font-weight: 900; font-stretch: 70%; margin: 2px 0 4px; }
.bl-packs-balance-unit { font-size: 14px; font-weight: 600; color: var(--text-2, var(--mono-muted)); }
.bl-pack-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-radius: var(--radius-btn, 12px); border: 1px solid var(--separator, rgba(18,18,18,.08)); margin-bottom: 8px; transition: background .15s ease; }
.bl-pack-row:hover { background: var(--accent-tint, rgba(255,90,31,.08)); }
.bl-pack-row-credits { font-size: 14px; font-weight: 700; }
.bl-pack-row-price { font-size: 12px; color: var(--text-2, var(--mono-muted)); margin-top: 1px; }

.bl-dev-tools { margin-top: auto; padding-top: 16px; }
.bl-dev-tools summary { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3, var(--mono-muted)); cursor: pointer; user-select: none; }
.bl-dev-tools[open] summary { margin-bottom: 4px; }

/* TEMPLATES + A/B tests page */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 20px; }
.tpl-card { display: flex; flex-direction: column; }
.tpl-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tpl-card-name { font-size: 15px; font-weight: 700; color: var(--text, var(--ink)); }
.tpl-card-body { font-size: 13px; color: var(--text-2, var(--mono-muted)); margin: 10px 0 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-icon-btn { padding: 5px 10px; font-size: 12px; }
.tpl-kpi-row { display: flex; gap: 18px; border-top: 1px solid var(--separator, rgba(18,18,18,.08)); padding-top: 12px; margin-top: auto; }
.tpl-kpi { display: flex; flex-direction: column; gap: 2px; }
.tpl-kpi-num { font-size: 17px; font-weight: 800; font-stretch: 75%; color: var(--text, var(--ink)); }
.tpl-kpi-num.tpl-kpi-highlight { color: var(--accent-solid, #D9420F); }
.tpl-kpi-label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3, var(--mono-muted)); }

.tpl-ab-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.tpl-ab-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-btn, 12px); border: 1px solid var(--separator, rgba(18,18,18,.08)); cursor: pointer; background: var(--glass-fallback-1, #fff); transition: background .15s ease; }
.tpl-ab-row:hover { background: var(--accent-tint, rgba(255,90,31,.06)); }
.tpl-ab-row.is-active { border-color: var(--accent-solid, #D9420F); background: var(--accent-tint, rgba(255,90,31,.08)); }
.tpl-ab-row-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.tpl-ab-row-name { font-size: 14px; font-weight: 700; }

.tpl-variant-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.tpl-variant-card { border: 1px solid var(--separator, rgba(18,18,18,.08)); border-radius: var(--radius-inner, 16px); padding: 16px; position: relative; }
.tpl-variant-card.is-winner { border-color: var(--accent-solid, #D9420F); box-shadow: 0 0 0 2px var(--accent-tint, rgba(255,90,31,.25)); }
.tpl-variant-label { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3, var(--mono-muted)); }
.tpl-variant-name { font-size: 15px; font-weight: 700; margin: 3px 0 12px; }
.tpl-recommendation { font-family: inherit; text-transform: none; font-size: 14px; font-weight: 600; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-btn, 12px); background: var(--accent-tint, rgba(255,90,31,.08)); color: var(--text, var(--ink)); }

.ab-template-checklist { max-height: 220px; overflow-y: auto; border: 1px solid var(--separator, rgba(18,18,18,.08)); border-radius: var(--radius-inner, 12px); padding: 6px; }
.ab-template-check-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: var(--radius-btn, 10px); cursor: pointer; }
.ab-template-check-row:hover { background: var(--separator, rgba(18,18,18,.05)); }
.ab-template-check-row input { margin-top: 3px; flex: none; }
.ab-template-check-row .name { font-size: 13.5px; font-weight: 700; }
.ab-template-check-row .body { font-size: 12px; color: var(--text-2, var(--mono-muted)); margin-top: 1px; }

.variation-preview-item { font-size: 13px; padding: 8px 10px; border: 1px solid var(--separator, rgba(18,18,18,.08)); border-radius: var(--radius-inner, 10px); margin-bottom: 6px; }

/* E-SIGNING: Documents page */
.esign-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0 18px; }
@media (max-width: 900px) { .esign-stats-row { grid-template-columns: repeat(2, 1fr); } }
.esign-stat-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; }
.esign-stat-num { font-size: 26px; font-weight: 900; font-stretch: 75%; color: var(--text, var(--ink)); }
.esign-stat-label { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3, var(--mono-muted)); }

.esign-needs-you-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%;
  padding: 14px 18px; border-radius: var(--radius-card, 16px); margin-bottom: 18px;
  background: var(--accent-tint, rgba(255,90,31,.1)); color: var(--text, var(--ink)); font-weight: 600; font-size: 14px;
}

.esign-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.esign-template-card { display: flex; flex-direction: column; }

.esign-panel-overlay { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: flex-end; background: rgba(0,0,0,.35); }
.esign-panel { width: 420px; max-width: 92vw; height: 100%; background: var(--glass-fallback-1, #fff); box-shadow: -10px 0 40px rgba(0,0,0,.15); padding: 24px; overflow-y: auto; }
.esign-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.esign-panel-head h2 { margin: 0; font-size: 19px; font-weight: 800; }
.esign-panel-head button { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-3, var(--mono-muted)); line-height: 1; }

/* E-SIGNING: editor */
.esign-editor-layout { display: grid; grid-template-columns: 220px 1fr 300px; gap: 16px; align-items: start; }
@media (max-width: 1150px) { .esign-editor-layout { grid-template-columns: 1fr; } }

.esign-editor-rail { position: sticky; top: 16px; }
.esign-field-type-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.esign-field-type-btn { text-align: left; padding: 9px 12px; border-radius: var(--radius-btn, 10px); border: 1px solid var(--separator, rgba(18,18,18,.1)); background: var(--glass-fallback-1, #fff); cursor: pointer; font-size: 13px; font-weight: 600; }
.esign-field-type-btn:hover { background: var(--accent-tint, rgba(255,90,31,.06)); }
.esign-field-type-btn.is-active { border-color: var(--accent-solid, #D9420F); background: var(--accent-tint, rgba(255,90,31,.12)); color: var(--accent-solid, #D9420F); }

.esign-signer-chip-list { display: flex; flex-direction: column; gap: 6px; }
.esign-signer-chip { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--radius-btn, 10px); border: 1.5px solid var(--separator, rgba(18,18,18,.1)); background: var(--glass-fallback-1, #fff); cursor: pointer; font-size: 13px; font-weight: 600; text-align: left; }
.esign-signer-chip.is-active { border-color: var(--chip-color, #D9420F); background: color-mix(in srgb, var(--chip-color, #D9420F) 10%, white); }
.esign-signer-chip-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.esign-editor-canvas-wrap { display: flex; justify-content: center; }
.esign-pdf-pages { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.esign-pdf-page { position: relative; box-shadow: 0 2px 10px rgba(0,0,0,.12); background: #fff; cursor: crosshair; }
.esign-pdf-page canvas { display: block; }
.esign-field-overlay { position: absolute; inset: 0; pointer-events: none; }
.esign-field-box {
  position: absolute; border: 2px dashed; border-radius: 4px; cursor: move; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; overflow: hidden; white-space: nowrap; user-select: none; pointer-events: auto;
}
.esign-field-box.is-selected { border-style: solid; box-shadow: 0 0 0 2px rgba(0,0,0,.08); }
.esign-field-label { padding: 0 4px; pointer-events: none; }
.esign-field-delete { position: absolute; top: -9px; right: -9px; width: 16px; height: 16px; border-radius: 50%; background: #1F2937; color: #fff; border: none; font-size: 11px; line-height: 1; cursor: pointer; }
.esign-field-resize { position: absolute; bottom: -3px; right: -3px; width: 10px; height: 10px; background: inherit; border: 1.5px solid currentColor; border-radius: 2px; cursor: nwse-resize; }

/* public signer page (sign.html) -- the fields a signer actually fills in */
.esign-sign-field {
  position: absolute; pointer-events: auto; border: 2px dashed var(--accent, #FF5A1F); border-radius: 4px;
  background: rgba(255,90,31,.06); display: flex; align-items: center; justify-content: center; box-sizing: border-box; overflow: visible;
}
.esign-sign-field.is-filled { border-style: solid; background: rgba(46,160,67,.08); border-color: #2EA043; }
.esign-sign-field.is-readonly { pointer-events: none; border-style: solid; border-color: #c9c9c9; background: rgba(0,0,0,.02); }
.esign-sign-field-sig {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-family: 'Alex Brush', cursive; font-size: clamp(22px, 3.4vw, 30px); color: var(--accent, #FF5A1F); padding: 0 6px;
  text-align: center; white-space: nowrap; line-height: 1;
}
.esign-sign-field.is-filled .esign-sign-field-sig { color: #1F6B2C; }
.esign-sign-field.is-readonly .esign-sign-field-sig { color: #555; cursor: default; }
.esign-sign-field-input {
  width: 100%; height: 100%; border: none; background: transparent; font-size: 12px; padding: 0 6px; font-family: inherit; outline: none;
}
.esign-sign-field-input:focus { background: #fff; }
.esign-sign-field.is-readonly { font-size: 12px; color: #555; padding: 0 6px; overflow: hidden; }

.esign-sign-actionbar {
  position: sticky; bottom: 0; background: #fff; padding: 14px 0; margin-top: 14px;
  border-top: 1px solid var(--separator, rgba(18,18,18,.1)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.esign-success-check { width: 72px; height: 72px; margin: 0 auto; }
.esign-success-check svg { width: 100%; height: 100%; }
.esign-success-circle {
  stroke: #2EA043; stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: esign-circle-draw .5s cubic-bezier(.65,0,.45,1) forwards;
}
.esign-success-tick {
  stroke: #2EA043; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 36; stroke-dashoffset: 36;
  animation: esign-tick-draw .35s cubic-bezier(.65,0,.45,1) .45s forwards;
}
@keyframes esign-circle-draw { to { stroke-dashoffset: 0; } }
@keyframes esign-tick-draw { to { stroke-dashoffset: 0; } }

.esign-editor-right { position: sticky; top: 16px; }
.esign-right-tabbar { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--separator, rgba(18,18,18,.08)); padding-bottom: 10px; }
.esign-right-tab { flex: 1; padding: 7px 6px; border-radius: var(--radius-btn, 8px); border: none; background: none; cursor: pointer; font-size: 11.5px; font-weight: 700; color: var(--text-3, var(--mono-muted)); }
.esign-right-tab.is-active { background: var(--accent-tint, rgba(255,90,31,.12)); color: var(--accent-solid, #D9420F); }

.esign-signer-row { display: flex; align-items: center; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--separator, rgba(18,18,18,.06)); }
.esign-signer-reorder { display: flex; flex-direction: column; flex: none; }
.esign-signer-move { background: none; border: none; cursor: pointer; font-size: 11px; line-height: 1.1; padding: 1px 2px; color: var(--text-3, var(--mono-muted)); }
.esign-signer-move:disabled { opacity: .25; cursor: default; }
.esign-signer-input { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--separator, rgba(18,18,18,.12)); font-size: 12.5px; font-family: inherit; }
.esign-signer-remove { flex: none; background: none; border: none; font-size: 18px; color: var(--text-3, var(--mono-muted)); cursor: pointer; }

/* E-SIGNING: document detail page */
.esign-detail-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-top: 24px; align-items: start; }
@media (max-width: 1000px) { .esign-detail-layout { grid-template-columns: 1fr; } }
.esign-detail-viewer-frame { width: 100%; height: 640px; border: 1px solid var(--separator, rgba(18,18,18,.1)); border-radius: var(--radius-inner, 12px); }

/* ADMIN -- the .admin-tab buttons now live in the #admin-sidebar nav
   (admin.html) and are styled entirely by .ce-sidebar-link (see
   styles/app.css); .admin-tab itself is just admin.js's click-
   wiring selector now, with no styling of its own. .ce-sidebar-link
   was written for <a> tags in the tenant sidebar, which have no
   native chrome -- these are <button>s, so the browser's default
   border/background/padding has to be stripped explicitly or it
   shows through on top of .ce-sidebar-link's own styling. */
#admin-sidebar button.ce-sidebar-link {
  width: 100%; border: none; cursor: pointer;
  font-family: inherit; font-size: inherit; text-align: left; appearance: none; -webkit-appearance: none;
}
/* The ID selector above beats .ce-sidebar-link.is-active's own
   (class-only) background rule, so a plain unconditional
   `background: transparent` here was blanking out the active
   orange fill too -- only reset it for the non-active state. */
#admin-sidebar button.ce-sidebar-link:not(.is-active) { background: transparent; }
.admin-panel { }
.admin-search {
  width: 100%; max-width: 420px; padding: 12px 18px; border: 1px solid rgba(18,18,18,0.08); border-radius: 999px;
  font-family: 'Archivo', sans-serif; font-size: 14px; margin-bottom: 20px; background: #fff;
}
.admin-search:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--ink); }
.admin-table-scroll {
  overflow-x: auto; border: 1px solid rgba(18,18,18,0.05); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(18,18,18,.03), 0 10px 28px -8px rgba(18,18,18,.08);
}
.admin-table { width: 100%; border-collapse: collapse; min-width: 640px; background: #fff; }
.admin-table th, .admin-table td { padding: 14px 16px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--divider); }
.admin-table th { font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mono-muted); background: var(--paper-2); }
.admin-table-row { cursor: pointer; transition: background .15s; }
.admin-table-row:hover { background: var(--paper-2); }
.admin-badge { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 999px; text-transform: uppercase; }
.admin-badge-good { background: #E1F3E7; color: #17703A; }
.admin-badge-bad { background: #FDECEC; color: #B3261E; }
.admin-badge-warn { background: #FFF1D6; color: #7A4F00; }

.campaign-wizard-steps { display: flex; gap: 8px; margin-bottom: 24px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; }
.campaign-wizard-steps span { padding: 6px 14px; border-radius: 20px; background: var(--paper-2); color: var(--mono-muted); }
.campaign-wizard-steps span.is-active { background: var(--ink); color: var(--paper); }

/* #bulk-sms-tabs now reuses .analytics-tabbar/.analytics-tab-btn, the
   shared pill-tab look used everywhere else, instead of its own. */
.bulk-sms-tab-panel[hidden] { display: none; }
.merge-field-btn { display: inline-block; margin: 2px 4px 2px 0; padding: 4px 10px; border-radius: 8px; border: 1.5px solid var(--divider); background: #fff; font-family: 'IBM Plex Mono', monospace; font-size: 12px; cursor: pointer; }
.merge-field-btn:hover { border-color: var(--ink); }
.campaign-preview-box { background: var(--paper-2); border: 1.5px solid var(--divider); border-radius: 12px; padding: 16px; font-size: 14px; white-space: pre-wrap; }
.block-reason-list { list-style: none; margin: 0; padding: 0; }
.block-reason-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.plan-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.admin-plan-card { border: 1.5px solid var(--divider); display: flex; flex-direction: column; }
.admin-plan-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.admin-plan-card-head input[type="text"] { font-size: 16px; font-weight: 800; border: none; background: transparent; padding: 0; width: 100%; }
.admin-plan-card-head input[type="text"]:focus { outline: none; border-bottom: 1.5px solid var(--accent); }
.admin-plan-price-row { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.admin-plan-price-row span { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--mono-muted); }
.admin-plan-price-row input { width: 110px; font-weight: 700; }
.admin-plan-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 14px; }
.admin-plan-field-grid .book-field { min-width: 0; }
.admin-plan-field-grid .book-field label { font-size: 10px; }
.admin-plan-field-grid .book-field input { width: 100%; box-sizing: border-box; }
.admin-plan-card-footer { margin-top: auto; display: flex; align-items: center; gap: 10px; }
.admin-details-cell { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mono-muted); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-topbar-actions { display: flex; align-items: center; gap: 8px; }
.app-icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid #2E2D29; background: transparent;
  color: var(--paper); display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s, border-color .15s; position: relative; flex: none;
}
.app-icon-btn:hover { background: #1C1C1A; border-color: var(--accent); }
.app-icon-btn .icon-moon { display: none; }
body[data-theme="dark"] .app-icon-btn .icon-sun { display: none; }
body[data-theme="dark"] .app-icon-btn .icon-moon { display: block; }
.app-icon-badge {
  position: absolute; top: -4px; right: -4px; background: var(--accent); color: var(--ink);
  font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-family: 'IBM Plex Mono', monospace; padding: 0 3px;
}
.app-profile { position: relative; margin-left: 4px; }
.app-profile-btn { display: flex; align-items: center; gap: 6px; background: transparent; border: none; cursor: pointer; padding: 2px; color: var(--paper); }
.app-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--ink);
  font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; font-family: 'Archivo', sans-serif;
}
.app-avatar-lg { width: 44px; height: 44px; font-size: 17px; }
.app-profile-menu {
  position: absolute; top: 100%; right: 0; margin-top: 10px; min-width: 240px; background: #1C1C1A;
  border: 1px solid #2E2D29; border-radius: 14px; padding: 8px; box-shadow: 0 20px 40px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease, visibility .18s; z-index: 30;
}
.app-profile.is-open .app-profile-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.app-profile-head { padding: 14px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; border-bottom: 1px solid #2E2D29; margin-bottom: 6px; }
.app-profile-name { font-weight: 700; font-size: 14px; color: var(--paper); }
.app-profile-email { font-size: 12px; color: var(--dark-muted); word-break: break-all; }
.app-profile-item {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; background: none; border: none;
  font-family: 'Archivo', sans-serif; font-size: 14px; color: var(--paper); text-decoration: none; cursor: pointer;
}
.app-profile-item:hover { background: #2B2A26; color: var(--accent); }
.app-profile-divider { height: 1px; background: #2E2D29; margin: 6px 4px; }
.app-profile-item-danger:hover { color: #FF6B6B; }

/* simple day/night toggle for signed-in page content */
body[data-theme="dark"] {
  background: #131313;
  /* var(--mono-muted) is the app's go-to "muted secondary text" color
     (help text, subtitles, labels, placeholders) and is used in
     dozens of places that assume a light card behind them -- #55554F
     is basically unreadable once that card is actually dark. Nearly
     every one of its app-page usages ends up on a dark surface once
     the theme is dark, so brightening it here (rather than patching
     each selector) fixes all of them at once. The couple of spots
     that intentionally stay light-card-always in both themes (e.g.
     the rehab cost estimate box) pin it back down locally below. */
  --mono-muted: #B9B8B1;
}
body[data-theme="dark"] .rehab-estimate-box { --mono-muted: #55554F; }
body[data-theme="dark"] .rehab-estimate-box .property-form-section-label { color: #55554F; }
body[data-theme="dark"] .book-hero .book-title,
body[data-theme="dark"] .book-hero .kicker { color: var(--paper); }
body[data-theme="dark"] .book-hero .hero-sub { color: var(--dark-muted); }
body[data-theme="dark"] .explainer-card { background: #1C1C1A; border-color: #2E2D29; color: var(--paper); }
body[data-theme="dark"] .explainer-body { color: var(--dark-muted); }

/* App "white cards" (billing-card, dash-kpi-card, etc.) never had a
   dark variant before the Step A theme toggle existed, so dark mode
   rendered light body text on top of their still-white background --
   same #1C1C1A/#2E2D29 convention as .explainer-card above. */
body[data-theme="dark"] .billing-card,
body[data-theme="dark"] .dash-kpi-card:not(.is-featured),
body[data-theme="dark"] .admin-table,
body[data-theme="dark"] .list-row,
body[data-theme="dark"] .import-result-card,
body[data-theme="dark"] .ce-modal,
body[data-theme="dark"] .lead-header-card,
body[data-theme="dark"] .inbox-col,
body[data-theme="dark"] .feed-chip,
body[data-theme="dark"] .analytics-tab-btn,
body[data-theme="dark"] .merge-field-btn {
  background: #1C1C1A; border-color: #2E2D29; color: var(--paper);
}
/* .lead-avatar-circle never got a dark override -- its background
   stayed the light var(--paper-2), but its text color still inherits
   the dark theme's light var(--paper) from .lead-header-card above,
   so the initials were light text on a light circle. */
body[data-theme="dark"] .lead-avatar-circle { background: #2E2D29; border-color: #3C3B36; color: var(--paper); }
body[data-theme="dark"] .admin-table th { background: #141412; }
body[data-theme="dark"] .admin-table-row:hover { background: #242420; }
body[data-theme="dark"] .admin-table td, body[data-theme="dark"] .admin-table th { border-color: #2E2D29; }
body[data-theme="dark"] .dash-kpi-label,
body[data-theme="dark"] .dash-kpi-sub,
body[data-theme="dark"] .billing-card-title,
body[data-theme="dark"] .list-row-count,
body[data-theme="dark"] .dash-campaign-stats,
body[data-theme="dark"] .sending-number-sub,
body[data-theme="dark"] .feed-row-time,
body[data-theme="dark"] .needs-reply-time {
  color: var(--dark-muted);
}
body[data-theme="dark"] .txn-row,
body[data-theme="dark"] .sending-number-row,
body[data-theme="dark"] .dash-campaign-row,
body[data-theme="dark"] .needs-reply-row,
body[data-theme="dark"] .feed-row,
body[data-theme="dark"] .credits-usage-row {
  border-color: #2E2D29;
}

/* Same gap, round two: hover/active tints and a couple of track
   backgrounds that were still hardcoded to var(--paper-2) (light),
   which washed out text on hover/selection in dark mode even though
   the cards themselves were already fixed above. */
body[data-theme="dark"] .admin-table-row:hover,
body[data-theme="dark"] .inbox-row:hover,
body[data-theme="dark"] .inbox-row.is-active,
body[data-theme="dark"] .needs-reply-row:hover,
body[data-theme="dark"] .dash-campaign-row:hover,
body[data-theme="dark"] .feed-row.is-clickable:hover,
body[data-theme="dark"] .geo-rank-row:hover {
  background: #242420;
}
body[data-theme="dark"] .quick-action-btn,
body[data-theme="dark"] .feed-row-icon,
body[data-theme="dark"] .message-bubble.is-in {
  background: #1C1C1A;
}
body[data-theme="dark"] .quick-action-btn { color: var(--paper); }
body[data-theme="dark"] .quick-action-btn:hover { background: #242420; }

/* The light-mode tabbar itself went flat/boxless by request (see the
   "drop the background/border box" commit) -- the old dark override
   above that re-added a background/border here is gone too, so dark
   mode matches: pills sit directly on the page in both themes now. */
body[data-theme="dark"] .analytics-tab-btn.is-active,
body[data-theme="dark"] .feed-chip.is-active {
  background: var(--accent); border-color: var(--accent); color: #0A0A0C;
}

/* Round three: components added after the dark-mode toggle existed
   (pipeline board, calendar grid, qualification/automation flow
   diagrams, the bulk-SMS sub-tabs) still had hardcoded light
   card/pill backgrounds with no dark counterpart, so inherited light
   body text (the html[data-ce-shell] body override) landed on a
   background that never got any darker -- invisible/ghosted text. */
body[data-theme="dark"] .pipeline-column { background: #1C1C1A; }
body[data-theme="dark"] .pipeline-column.is-dragover { background: #2E2114; }
body[data-theme="dark"] .pipeline-card { background: #242420; border-color: #2E2D29; color: var(--paper); }
body[data-theme="dark"] .pipeline-card-number,
body[data-theme="dark"] .pipeline-card-row,
body[data-theme="dark"] .pipeline-column-count { color: var(--dark-muted); }

body[data-theme="dark"] .cal-month-cell { background: #1C1C1A; }
body[data-theme="dark"] .cal-month-cell:hover { background: #242420; }
body[data-theme="dark"] .cal-grid { border-color: #2E2D29; }

body[data-theme="dark"] .qwf-node-action { background: #1C1C1A; border-color: #2E2D29; }
body[data-theme="dark"] .qwf-node-decision { background: #16261C; border-color: #244A33; }


/* Mixing an active chip color with literal "white" (e-signing's
   Seller/Buyer field-target chips) washed the light theme's tint and
   produced the same invisible-text problem on top. color-mix against
   the page's own background keeps the tint readable either way. */
body[data-theme="dark"] .esign-signer-chip.is-active {
  background: color-mix(in srgb, var(--chip-color, #D9420F) 22%, #1C1C1A);
}

/* Round four: lead detail page -- contact card, phone list, stage
   tracker, qualification framework accordion, and its own tab bar
   all had colors (var(--ink), fixed hex) that assume a light card,
   same invisible/low-contrast problem as everywhere else above. */
body[data-theme="dark"] .campaign-preview-box { background: #1C1C1A; border-color: #2E2D29; }

body[data-theme="dark"] .qual-group-head,
body[data-theme="dark"] .qual-group-body { background: #1C1C1A; }
body[data-theme="dark"] .qual-group { border-color: #2E2D29; }
body[data-theme="dark"] .qual-group-body { border-top-color: #2E2D29; }
body[data-theme="dark"] .qual-group-check { color: #3A3A35; }
body[data-theme="dark"] .qual-group-title,
body[data-theme="dark"] .qual-group-chevron,
body[data-theme="dark"] .qual-group-prompt,
body[data-theme="dark"] .qual-group-answer.is-empty { color: var(--dark-muted); }
body[data-theme="dark"] .qual-group.is-answered .qual-group-title,
body[data-theme="dark"] .qual-group.is-current .qual-group-title,
body[data-theme="dark"] .qual-group-answer { color: var(--paper); }

body[data-theme="dark"] .lead-info-item .label,
body[data-theme="dark"] .lead-header-sub,
body[data-theme="dark"] .lead-meta-text,
body[data-theme="dark"] .property-form-section-label { color: var(--dark-muted); }
body[data-theme="dark"] .lead-header-sub-link:hover,
body[data-theme="dark"] .lead-meta-text strong { color: var(--paper); }
body[data-theme="dark"] .property-form-section-label { border-top-color: #2E2D29; }
body[data-theme="dark"] .lead-phone-item.is-primary .value { color: var(--paper); }
body[data-theme="dark"] .lead-phone-item.is-secondary .value { color: var(--dark-muted); }
body[data-theme="dark"] .rehab-checklist label { color: var(--paper); }


body[data-theme="dark"] .stage-dot { background: #1C1C1A; border-color: #2E2D29; }
body[data-theme="dark"] .stage-dot-item::before { background: #2E2D29; }
body[data-theme="dark"] .stage-dot-item.is-past::before { background: var(--dark-muted); }
body[data-theme="dark"] .stage-dot-item.is-past .stage-dot { background: var(--dark-muted); border-color: var(--dark-muted); }
body[data-theme="dark"] .stage-dot-item:hover .stage-dot { border-color: var(--paper); }
body[data-theme="dark"] .stage-dot-label { color: var(--dark-muted); }
body[data-theme="dark"] .stage-dot-item.is-active .stage-dot-label { color: var(--paper); }

/* Admin portal dark mode. The admin pages used .checkout-summary-row with
   an inline color:var(--ink) -- fine in light mode, but --ink is near-black,
   so every label/value row was invisible on the dark cards. .ce-kv-row has
   no color of its own (it inherits the card's text color in both themes) and
   a theme-aware divider. The status badges were pale light-mode pills that
   glared on dark cards; these are the translucent equivalents. */
.ce-kv-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--divider); font-size: 15px; }
.ce-kv-row > span:first-child { color: var(--mono-muted); }
.ce-kv-row > span:last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }
body[data-theme="dark"] .ce-kv-row { border-bottom-color: #2E2D29; }
body[data-theme="dark"] .section-lede { color: var(--dark-muted); }
body[data-theme="dark"] .admin-badge { background: #2A2A26; color: var(--paper); }
body[data-theme="dark"] .admin-badge-good { background: rgba(46, 158, 107, 0.2); color: #6FD39E; }
body[data-theme="dark"] .admin-badge-warn { background: rgba(224, 160, 40, 0.2); color: #F0B84A; }
body[data-theme="dark"] .admin-badge-bad { background: rgba(217, 48, 37, 0.22); color: #FF8A80; }
body[data-theme="dark"] .admin-search { background: #1C1C1A; border-color: #2E2D29; color: var(--paper); }
body[data-theme="dark"] .admin-search::placeholder { color: var(--dark-muted); }
body[data-theme="dark"] .dash-card-icon { background: rgba(255, 90, 31, 0.16); }
/* Customer health score (admin). at_risk is rose, not orange -- orange is the
   brand accent and amber is already "watch"; critical is a solid fill so the two
   stay distinguishable without colour. */
.admin-badge-risk { background: #FCE4EC; color: #9D174D; }
.admin-badge-crit { background: #B3261E; color: #FFFFFF; }
.admin-badge-info { background: #E6EEF8; color: #1F4E8C; }
body[data-theme="dark"] .admin-badge-risk { background: rgba(236, 72, 153, 0.22); color: #F9A8D4; }
body[data-theme="dark"] .admin-badge-crit { background: #FF8A80; color: #1C1C1A; }
body[data-theme="dark"] .admin-badge-info { background: rgba(96, 165, 250, 0.2); color: #93C5FD; }
.health-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.health-cell .admin-badge { padding: 3px 9px; font-size: 11px; }
.health-cell .health-num { font-weight: 800; margin-right: 4px; }
.health-empty { color: #6B6A63; }
body[data-theme="dark"] .health-empty { color: #A8A69C; }
.health-lowconf { font-size: 11px; font-weight: 700; color: #6B6A63; border: 1px dashed #9A988F; border-radius: 999px; padding: 2px 7px; }
body[data-theme="dark"] .health-lowconf { color: #A8A69C; border-color: #4A4944; }
.health-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; margin-top: 8px; }
.health-score-num { font: 800 56px/1 'IBM Plex Mono', monospace; color: var(--ink); }
body[data-theme="dark"] .health-score-num { color: var(--paper); }
.health-score-of { font-size: 14px; color: #6B6A63; }
body[data-theme="dark"] .health-score-of { color: #A8A69C; }
.health-delta { font: 700 14px 'IBM Plex Mono', monospace; }
.health-delta.is-up { color: #17703A; } .health-delta.is-down { color: #B3261E; } .health-delta.is-flat { color: #6B6A63; }
body[data-theme="dark"] .health-delta.is-up { color: #6FD39E; }
body[data-theme="dark"] .health-delta.is-down { color: #FF8A80; }
body[data-theme="dark"] .health-delta.is-flat { color: #A8A69C; }
.health-drags { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.health-drags li { padding: 10px 12px; border-left: 3px solid #B3261E; background: #FDECEC; border-radius: 6px; font-size: 14px; color: var(--ink); }
body[data-theme="dark"] .health-drags li { border-left-color: #FF8A80; background: rgba(217, 48, 37, 0.16); color: var(--paper); }
.health-bar { display: inline-block; vertical-align: middle; width: 96px; height: 8px; border-radius: 4px; background: #E4E1D8; overflow: hidden; margin-right: 8px; }
body[data-theme="dark"] .health-bar { background: #2E2D29; }
.health-bar > i { display: block; height: 100%; background: #17703A; }
.health-bar > i.is-watch { background: #B26A00; } .health-bar > i.is-risk { background: #9D174D; } .health-bar > i.is-crit { background: #B3261E; }
body[data-theme="dark"] .health-bar > i { background: #6FD39E; }
body[data-theme="dark"] .health-bar > i.is-watch { background: #F0B84A; }
body[data-theme="dark"] .health-bar > i.is-risk { background: #F9A8D4; }
body[data-theme="dark"] .health-bar > i.is-crit { background: #FF8A80; }
.health-card-gap { margin-bottom: 20px; }
@media (max-width: 900px) { .health-score-num { font-size: 44px; } .health-bar { width: 64px; } }
.ce-kv-label { font-size: 12px; color: var(--mono-muted); font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.04em; }

.footer-brand { font-family: 'Archivo', sans-serif; font-size: 19px; font-weight: 850; font-stretch: 125%; color: var(--paper); letter-spacing: 0.02em; display: flex; align-items: center; gap: 10px; }
.footer-blurb { margin: 10px 0 0; max-width: 260px; font-family: 'Archivo', sans-serif; font-size: 14px; line-height: 1.5; color: var(--dark-muted); }
.footer-col-title { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 4px; }
.footer-links a { color: var(--border-soft); text-decoration: none; padding: 6px 0; }
.footer-bottom {
  max-width: 1280px; margin: 0 auto; padding: 0 32px 32px; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--dark-muted);
}
.footer-status { display: flex; align-items: center; gap: 8px; }

/* AUTH (sign in / sign up / account) */
.auth-section { max-width: 480px; margin: 0 auto; padding: 24px 32px 112px; }
.auth-card { display: flex; flex-direction: column; gap: 24px; }
.auth-switch { margin: 0; font-size: 14px; text-align: center; }
.auth-switch a { color: var(--ink); font-weight: 700; }
.book2-summary { position: static; margin: 0; }
.checkout-summary {
  background: var(--ink); color: var(--paper); border-radius: 16px; padding: 28px;
  display: flex; flex-direction: column; gap: 4px;
}
.checkout-summary-head { font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--dark-muted); margin-bottom: 14px; }
.checkout-summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--dark-border); font-size: 15px; }

/* BOOK HERO (shared by login/signup/account) */
.book-hero {
  max-width: 760px; margin: 0 auto; padding: 72px 32px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.book-hero .kicker { justify-content: center; color: var(--ink); border-color: var(--border-soft); }
.book-title {
  margin: 0; font-size: clamp(32px, 4.6vw, 56px); line-height: 0.96; font-weight: 900;
  font-stretch: 72%; text-transform: uppercase; letter-spacing: -0.01em;
}
.book-sub { max-width: 480px; margin: 0 auto; text-align: center; color: var(--muted); }

@media (max-width: 860px) {
  .throttle-grid, .dial-grid, .compliance-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-gauge-wrap { order: -1; max-width: 320px; }
}

@media (max-width: 640px) {
  .section-wrap { padding-left: 20px; padding-right: 20px; }
  .nav { padding: 14px 20px; }
  .hero { padding: 48px 20px 0; }
  .hero-lower { gap: 40px; }
}

/* APP NAV LINKS (Leads / Lists / Compliance, in the top bar) */
.app-sidebar {
  position: fixed; left: 0; top: 64px; bottom: 0; width: 76px; z-index: 19;
  background: var(--ink); border-right: 1px solid #2E2D29;
  display: flex; flex-direction: column; align-items: stretch; padding-top: 12px;
}
.app-sidebar[hidden] { display: none; }
.app-sidebar-link {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px; color: var(--dark-muted); text-decoration: none;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.02em;
  text-align: center; border-left: 3px solid transparent; transition: color .15s, background .15s;
}
.app-sidebar-badge {
  position: absolute; top: 8px; right: 14px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 800; border-radius: 999px; min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1;
}
.app-sidebar-link:hover { color: var(--paper); background: #1C1C1A; }
.app-sidebar-link.is-active { color: var(--accent); border-left-color: var(--accent); background: #1C1C1A; }
body.has-sidebar .page { padding-left: 76px; }
body.has-sidebar .app-topbar { margin-left: -76px; width: calc(100% + 76px); }
@media (max-width: 640px) {
  .app-sidebar { display: none; }
  body.has-sidebar .page { padding-left: 0; }
  body.has-sidebar .app-topbar { margin-left: 0; width: 100%; }
}

/* PAGE HEAD (compact, used by leads/lists/compliance/import screens) */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; }
.page-head h1 {
  margin: 0; font-family: var(--font-sans, -apple-system, Inter, 'Archivo', sans-serif);
  font-size: clamp(26px, 3vw, 34px); font-weight: 650; font-stretch: 100%;
  text-transform: none; letter-spacing: -0.02em; color: var(--text, var(--ink));
}

/* FILTER BAR (leads screen) */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.filter-bar input, .filter-bar select {
  padding: 10px 14px; border: 2px solid var(--divider); border-radius: 10px;
  font-family: 'Archivo', sans-serif; font-size: 14px; background: #fff;
}
.filter-bar input { flex: 1 1 220px; min-width: 160px; }
.filter-bar select { flex: 0 1 180px; }
.filter-bar input:focus, .filter-bar select:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--ink); }

/* PAGINATION */
.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.pagination-count { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--mono-muted); }
.pagination-buttons { display: flex; gap: 10px; }
.pagination-buttons button {
  padding: 8px 16px; border: 2px solid var(--ink); border-radius: 8px; background: #fff;
  font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 13px; cursor: pointer;
}
.pagination-buttons button:disabled { opacity: .4; cursor: default; }
.pagination-buttons button:not(:disabled):hover { background: var(--ink); color: var(--paper); }

/* LISTS SCREEN */
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: #fff; border: 1.5px solid var(--divider); border-radius: 12px; margin-bottom: 10px; }
.list-row-name { font-weight: 700; font-size: 15px; }
.list-row-count { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--mono-muted); margin-left: 10px; }
.list-row-actions { display: flex; gap: 8px; }
.list-row-actions button {
  padding: 6px 12px; border: 1.5px solid var(--divider); border-radius: 8px; background: #fff;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; cursor: pointer;
}
.list-row-actions button:hover { border-color: var(--ink); }
.list-row-actions button.is-danger:hover { border-color: #B3261E; color: #B3261E; }

/* LEAD DETAIL */
.contact-check { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.contact-check-pill {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.contact-check-pill.is-allowed { background: #E1F3E7; color: #17703A; }
.contact-check-pill.is-blocked { background: #FDECEC; color: #B3261E; }

/* IMPORT WIZARD */
.import-step { display: none; }
.import-step.is-active { display: block; }
.import-dropzone {
  border: 2px dashed var(--divider); border-radius: 16px; padding: 48px 24px; text-align: center;
  background: #fff; cursor: pointer;
}
.import-dropzone:hover { border-color: var(--ink); }
.import-map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 640px; }
.import-map-grid select { width: 100%; padding: 10px 14px; border: 2px solid var(--divider); border-radius: 10px; font-family: 'Archivo', sans-serif; font-size: 14px; }
.import-preview-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.import-preview-table th, .import-preview-table td { padding: 8px 10px; border-bottom: 1px solid var(--divider); text-align: left; white-space: nowrap; }
.import-progress-track { height: 16px; border-radius: 8px; background: var(--divider); overflow: hidden; margin: 20px 0 10px; }
.import-progress-fill { display: block; height: 100%; background: var(--accent); border-radius: 8px; transition: width .2s ease; }
.import-results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 20px 0; }
.import-results-grid.is-dense { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.import-results-grid.is-dense .import-result-card { padding: 16px 12px; }
.import-results-grid.is-dense .import-result-number { font-size: 26px; }
.import-result-card { background: #fff; border: 1.5px solid var(--divider); border-radius: 14px; padding: 20px; text-align: center; }
.import-result-number { font-size: 32px; font-weight: 900; font-stretch: 70%; }
.import-result-label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; color: var(--mono-muted); margin-top: 6px; }

/* MODALS */
.ce-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ce-modal { background: #fff; border-radius: 16px; padding: 24px; max-width: 560px; width: 100%; max-height: 85vh; overflow-y: auto; }
.ce-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.ce-modal-head h2 { margin: 0; font-size: 20px; font-weight: 900; font-stretch: 75%; }
.ce-modal-head button { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--mono-muted); line-height: 1; }
.ce-modal-head button:hover { color: var(--ink); }

/* DISPOSITION / JV tickets */
.jv-modal { max-width: 720px; padding: 32px; }
.jv-modal .ce-modal-head h2 { font-size: 24px; }
.jv-steps { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--separator, rgba(18,18,18,.08)); padding-bottom: 16px; }
.jv-step { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; font-weight: 700; color: var(--text-3, var(--mono-muted)); padding: 7px 14px; border-radius: var(--radius-pill, 999px); }
.jv-step.is-active { background: var(--accent-tint, rgba(255,90,31,.14)); color: var(--accent-solid, #D9420F); }
.jv-modal .book-field label { font-size: 13px; }
.jv-modal .book-field input, .jv-modal .book-field textarea { padding: 14px 16px; font-size: 15px; }
.jv-modal .dialer-lead-results { max-height: 320px; }
.jv-modal .dialer-lead-result-row { padding: 14px 16px; font-size: 14px; }
.jv-modal .dialer-lead-result-row .name { font-size: 15px; }
.jv-modal .dialer-lead-result-row .sub { font-size: 13px; margin-top: 2px; }
.jv-lead-summary { margin-top: 14px; }
.jv-file-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border: 2px dashed var(--separator, rgba(18,18,18,.16)); border-radius: 14px; padding: 36px 20px; margin-top: 14px;
  cursor: pointer; text-align: center; color: var(--text-2, var(--mono-muted)); font-size: 13px;
}
.jv-file-drop svg { width: 32px; height: 32px; opacity: .55; }
.jv-file-drop.is-drag { border-color: var(--accent-solid, #D9420F); background: var(--accent-tint, rgba(255,90,31,.08)); }
.jv-consent-box { background: var(--paper-2); border-radius: 12px; padding: 18px 20px; font-size: 13.5px; line-height: 1.6; }
.es-recent-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--separator, rgba(18,18,18,.08)); }
.es-recent-row:last-child { border-bottom: none; }
.es-recent-title { font-size: 14px; font-weight: 700; }
.jv-agreement-list { display: flex; flex-direction: column; gap: 8px; }
.jv-agreement-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--separator, rgba(18,18,18,.08)); border-radius: var(--radius-btn, 12px); cursor: pointer; }
.jv-agreement-row:has(input:checked) { border-color: var(--accent-solid, #D9420F); background: var(--accent-tint, rgba(255,90,31,.06)); }
.jv-agreement-row input { flex: none; }
.jv-agreement-title { font-size: 14px; font-weight: 700; }
.jv-consent-box strong { display: block; margin-bottom: 6px; font-size: 14px; }
.jv-consent-box p { margin: 0; color: var(--text-2, var(--mono-muted)); }
.jv-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.jv-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--separator, rgba(18,18,18,.08)); margin-bottom: 14px; }
.jv-detail-lead-name { font-size: 17px; font-weight: 700; color: var(--text, var(--ink)); }
.jv-detail-address { font-size: 13px; color: var(--text-2, var(--mono-muted)); margin-top: 2px; }
.jv-detail-meta-row { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 18px; }
.jv-detail-meta-item { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.jv-detail-meta-label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3, var(--mono-muted)); }
/* Scoped link-color fix -- the base `a { color: var(--ink); }` rule
   has no dark-mode override, so this link went near-invisible on a
   dark card. Scoped to this one spot rather than every <a> (a
   blanket dark-mode override of every link previously regressed the
   sidebar icons and button text via currentColor/specificity). */
.jv-detail-meta-item a { color: var(--accent, #FF5A1F); font-weight: 600; text-decoration: none; }
.jv-detail-meta-item a:hover { text-decoration: underline; }
.jv-deal-card { padding: 16px 18px; }
.jv-deal-card-save-row { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 14px; }
#jv-detail, #jv-admin-detail { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.jv-admin-detail { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.jv-detail-head { flex: none; }
.jv-thread-body { flex: 1; min-height: 160px; overflow-y: auto; }
.inbox-composer { flex: none; }
.jv-msg-sender { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .7; margin-bottom: 3px; }

/* PROFILE page v2: left rail + content */
.pf-shell { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
@media (max-width: 760px) { .pf-shell { grid-template-columns: 1fr; } }
.pf-rail { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 24px; }
.pf-rail-head { display: flex; align-items: center; gap: 10px; padding: 6px 10px 14px; }
.pf-rail-icon {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none;
  background: var(--accent-tint, rgba(255,90,31,.14)); color: var(--accent-solid, #D9420F);
}
.pf-rail-icon svg { width: 18px; height: 18px; }
.pf-rail-title { font-size: 15px; font-weight: 800; color: var(--text, var(--ink)); }
.pf-rail-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: none; background: none;
  font-size: 14px; font-weight: 600; color: var(--text-2, var(--mono-muted)); cursor: pointer; text-align: left; width: 100%;
}
.pf-rail-item svg { width: 17px; height: 17px; flex: none; opacity: .75; }
.pf-rail-item:hover { background: var(--paper-2); }
.pf-rail-item.is-active { background: var(--accent-tint, rgba(255,90,31,.14)); color: var(--accent-solid, #D9420F); }
.pf-rail-item.is-active svg { opacity: 1; }
.pf-content-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pf-content-head-title { font-size: 20px; font-weight: 800; color: var(--text, var(--ink)); }
.pf-tz-chip { display: inline-flex; align-items: center; gap: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; color: var(--text-2, var(--mono-muted)); background: var(--paper-2); padding: 6px 12px; border-radius: var(--radius-pill, 999px); }
.pf-tz-chip svg { width: 14px; height: 14px; }
.pf-row-head { display: flex; justify-content: flex-end; }

.pf-upload-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.pf-upload-item { display: flex; align-items: center; gap: 16px; }
.pf-upload-label { font-weight: 700; font-size: 14px; color: var(--text, var(--ink)); }

.pf-avatar-upload, .pf-logo-upload {
  position: relative; width: 72px; height: 72px; flex: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: var(--accent-tint, rgba(255,90,31,.14)); color: var(--accent-solid, #D9420F); overflow: hidden;
}
.pf-avatar-upload { border-radius: 50%; }
.pf-logo-upload { border-radius: 16px; }
.pf-avatar-upload img, .pf-logo-upload img { width: 100%; height: 100%; object-fit: cover; }
.pf-avatar-upload-fallback { font-size: 24px; font-weight: 800; }
.pf-logo-upload-fallback { width: 28px; height: 28px; }
.pf-avatar-upload-badge {
  position: absolute; bottom: -2px; right: -2px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--ink, #15130F); color: #fff; box-shadow: 0 0 0 3px var(--glass-fallback-1, #fff);
}
.pf-avatar-upload-badge svg { width: 13px; height: 13px; }

/* SETTINGS: quick links, stage rows, role page grid */
.settings-quicklinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.settings-quicklink {
  display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: var(--radius-lg, 14px);
  background: var(--paper-2); text-decoration: none; transition: background .15s ease;
}
.settings-quicklink:hover { background: var(--accent-tint, rgba(255,90,31,.14)); }
.settings-quicklink-label { font-weight: 700; font-size: 14px; color: var(--text, var(--ink)); }
.settings-quicklink-note { font-size: 12px; color: var(--text-2); }
.settings-stage-row .stage-move-up, .settings-stage-row .stage-move-down {
  width: 22px; height: 16px; border: none; background: var(--paper-2); border-radius: 4px; cursor: pointer; font-size: 11px; line-height: 1;
}
.settings-stage-row .stage-move-up:disabled, .settings-stage-row .stage-move-down:disabled { opacity: .35; cursor: not-allowed; }
.role-pages-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.role-pages-group { display: flex; flex-direction: column; gap: 6px; }
.role-page-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text, var(--ink)); cursor: pointer; }
.role-page-check input { margin: 0; }


/* BULK ACTION BAR */
.bulk-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 12px; margin-bottom: 14px;
  font-size: 13px; font-weight: 700;
}
.bulk-bar-link { font-weight: 600; text-decoration: underline; cursor: pointer; opacity: .85; }
.bulk-bar-link:hover { opacity: 1; }

/* STAGE PILLS in the leads table */
.leads-stage-pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.leads-tags-cell { font-size: 12px; color: var(--mono-muted); }
.leads-last-touch { font-size: 12px; color: var(--mono-muted); }

/* PIPELINE (Kanban board) */
.board-switcher-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
/* .board-switcher-list now also carries .analytics-tabbar, reusing
   the shared pill-tab look instead of its own bespoke (and never
   dark-mode-aware) pill style. */
.pipeline-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.pipeline-column { flex: none; width: 250px; background: var(--paper-2); border-radius: 14px; padding: 12px; }
.pipeline-column.is-dragover { background: #FFE7D9; }
.pipeline-column-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; }
.pipeline-column-name { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; }
.pipeline-column-count { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--mono-muted); }
.pipeline-cards { display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow-y: auto; }
.pipeline-card {
  background: #fff; border: 1.5px solid var(--divider); border-radius: 10px; padding: 10px 12px;
  cursor: grab; font-size: 13px;
}
.pipeline-card:active { cursor: grabbing; }
.pipeline-card.is-dragging { opacity: 0.4; }
.pipeline-card-top { display: flex; align-items: flex-start; gap: 8px; }
.pipeline-card-top input[type="checkbox"] { margin-top: 2px; flex: none; }
.pipeline-card-name { font-weight: 800; flex: 1 1 auto; min-width: 0; }
.pipeline-card-number { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mono-muted); flex: none; }
.pipeline-card-row { display: flex; align-items: center; gap: 6px; color: var(--mono-muted); font-size: 12px; margin-top: 6px; }
.pipeline-card-row svg { flex: none; opacity: 0.7; }
.pipeline-card-tag {
  display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 20px;
  background: #E1F3E7; color: #17703A; font-size: 11px; font-weight: 700;
}
.pipeline-card-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.pipeline-card-actions button {
  background: none; border: none; cursor: pointer; color: var(--mono-muted); padding: 2px;
  display: flex; align-items: center; justify-content: center;
}
.pipeline-card-actions button:hover { color: var(--ink); }
.pipeline-card-actions button.is-danger:hover { color: #B3261E; }

.dash-chart { width: 100%; }
.dash-chart svg { display: block; width: 100%; height: 100%; }
.dash-chart-center { width: 100%; display: flex; justify-content: center; }
.dash-chart-center svg { display: block; }

.dash-card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.dash-card-icon { flex: none; width: 36px; height: 36px; border-radius: 12px; background: #FFF1E8; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.dash-card-head-title { font-weight: 800; font-size: 15px; }
.dash-card-head-sub { font-size: 12px; color: var(--mono-muted); margin-top: 2px; }

.ring-row { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
.ring-item { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1 1 90px; }
.ring-svg-wrap { position: relative; width: 84px; height: 84px; }
.ring-svg-wrap svg { position: absolute; top: 0; left: 0; }
.ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; }
.ring-label { font-size: 11px; font-weight: 700; text-align: center; }
.ring-sub { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--mono-muted); text-align: center; }

.dash-ring-row { display: flex; align-items: center; gap: 18px; }
.dash-ring-row .ring-svg-wrap { flex: none; }
.dash-ring-stats { flex: 1 1 auto; min-width: 0; }
.dash-big-number { font-size: 26px; font-weight: 900; font-stretch: 75%; }
.dash-big-number .unit { font-size: 12px; font-weight: 600; color: var(--mono-muted); margin-left: 4px; }
.dash-progress-row { margin-top: 10px; }
.dash-progress-row .head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.dash-progress-track { height: 6px; border-radius: 4px; background: var(--divider); overflow: hidden; }
.dash-progress-fill { display: block; height: 100%; border-radius: 4px; }

.donut-row { display: flex; align-items: center; gap: 18px; }
.donut-row .donut-wrap { flex: none; width: 110px; height: 110px; }
.donut-legend { flex: 1 1 auto; min-width: 0; }

.velocity-segbar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin-bottom: 16px; }
.velocity-segbar span { height: 100%; }
.velocity-row .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }

.dash-range-picker { display: flex; gap: 6px; }
.dash-range-btn {
  padding: 8px 18px; border-radius: 999px; border: 1px solid rgba(18,18,18,0.06); background: #fff;
  font-weight: 700; font-size: 13px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(18,18,18,.03);
}
.dash-range-btn:hover { border-color: var(--ink); }
.dash-range-btn.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.dash-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 900px) { .dash-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.dash-kpi-card {
  background: #fff; border: 1px solid rgba(18,18,18,0.05); border-radius: 18px; padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(18,18,18,.03), 0 8px 20px -8px rgba(18,18,18,.07);
  transition: box-shadow .2s ease, transform .2s ease;
}
.dash-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(18,18,18,.04), 0 16px 28px -10px rgba(18,18,18,.12); }
.dash-kpi-label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; color: var(--mono-muted); }
.dash-kpi-value { font-size: 28px; font-weight: 900; font-stretch: 75%; margin-top: 6px; }
.dash-kpi-delta { font-size: 12px; font-weight: 700; margin-top: 4px; }
.dash-kpi-delta.is-up { color: #17703A; }
.dash-kpi-delta.is-down { color: #B3261E; }
.dash-kpi-sub { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mono-muted); margin-top: 4px; }

.dash-two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-bottom: 20px; align-items: start; }
.dash-three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; align-items: start; }
@media (max-width: 900px) { .dash-two-col, .dash-three-col { grid-template-columns: 1fr; } }

.funnel-row { margin-bottom: 10px; }
.funnel-row-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.funnel-row-head .n { font-family: 'IBM Plex Mono', monospace; color: var(--mono-muted); }
.funnel-bar-track { height: 10px; border-radius: 6px; background: var(--divider); overflow: hidden; }
.funnel-bar-fill { display: block; height: 100%; background: var(--ink); border-radius: 6px; }

.velocity-row { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--divider); }
.velocity-row:last-child { border-bottom: none; }
.velocity-row .days { font-family: 'IBM Plex Mono', monospace; font-weight: 700; }

.tag-legend-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 4px 0; }
.tag-legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }

.sms-activity-legend { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; margin: 10px 0 4px; }
.sms-activity-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.sms-activity-legend strong { font-weight: 900; margin-left: 2px; }

.geo-breadcrumb { font-family: 'IBM Plex Mono', monospace; font-size: 12px; margin: 10px 0; }
.geo-breadcrumb a { color: var(--ink); text-decoration: underline; }
.geo-crumb-sep { color: var(--mono-muted); margin: 0 4px; }
.geo-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; margin-bottom: 14px; color: var(--mono-muted); }
.geo-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.geo-map { background: #0B1626; border-radius: 14px; padding: 24px; max-width: 920px; margin: 0 auto; }
.geo-state-path { cursor: pointer; transition: opacity 0.1s; }
.geo-state-path:hover { opacity: 0.8; }
.geo-leaflet-map { height: 560px; max-width: 920px; margin: 0 auto; border-radius: 14px; overflow: hidden; background: #0B1626; }
.geo-tile-dark { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.9); }

/* CREDIT BANNER + NOTIFICATIONS */
.credit-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; font-size: 14px; font-weight: 600; }
.credit-banner.is-warning { background: #FCEFCB; color: #6B4E00; }
.credit-banner.is-critical { background: #FBE6E4; color: #8A1F18; }
.credit-banner .btn-primary { flex: none; }

.app-notif-wrap { position: relative; }
.app-notif-menu {
  position: absolute; top: 100%; right: 0; margin-top: 10px; width: 320px; max-height: 400px; overflow-y: auto;
  background: #1C1C1A; border: 1px solid #2E2D29; border-radius: 14px; padding: 8px; box-shadow: 0 20px 40px rgba(0,0,0,.45); z-index: 30;
}
.app-notif-row { padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.app-notif-row:hover { background: #2A2A26; }
.app-notif-row.is-unread { background: #262420; }
.app-notif-row-title { color: var(--paper); font-weight: 700; font-size: 13px; }
.app-notif-row-body { color: var(--dark-muted); font-size: 12px; margin-top: 2px; }
.app-notif-row-time { color: var(--dark-muted); font-size: 10px; font-family: 'IBM Plex Mono', monospace; margin-top: 4px; }
.app-notif-empty { color: var(--dark-muted); font-size: 13px; padding: 16px 12px; text-align: center; }
.geo-marker-label { background: rgba(11,22,38,0.85); border: none; color: #fff; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; padding: 1px 5px; box-shadow: none; }
.geo-marker-label::before { display: none; }

.lead-header-card { background: #fff; border: 1px solid rgba(18,18,18,0.05); border-radius: 20px; padding: 22px 24px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(18,18,18,.03), 0 10px 28px -8px rgba(18,18,18,.08); }
.lead-header-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lead-nav-btn {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--divider);
  background: #fff; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.lead-nav-btn:hover:not(:disabled) { border-color: var(--ink); }
.lead-nav-btn:disabled { opacity: 0.35; cursor: default; }
.lead-avatar-circle {
  flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--paper-2); border: 1.5px solid var(--divider);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
}
.lead-header-info { flex: 1 1 260px; min-width: 0; }
.lead-header-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lead-header-name-row h1 { margin: 0; font-size: 22px; font-weight: 900; font-stretch: 75%; }
.lead-header-sub { font-size: 13px; color: var(--mono-muted); margin-top: 4px; }
.lead-header-sub-link { color: inherit; text-decoration: none; }
.lead-header-sub-link:hover { text-decoration: underline; color: var(--ink); }
.lead-header-sub-dot { opacity: 0.5; margin: 0 2px; }
.lead-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lead-header-actions button, .lead-header-actions a { padding: 10px 16px; font-size: 14px; }
.lead-header-actions .lead-icon-btn { padding: 0; font-size: inherit; }

.lead-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.lead-meta-pill {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; background: var(--paper-2);
  border: 1px solid var(--divider); font-size: 11px; font-weight: 700; color: var(--mono-muted);
}
.lead-meta-pill.is-hot { background: #FDECEC; color: #B3261E; border-color: transparent; }
.lead-meta-pill.is-warm { background: #FFF1D6; color: #7A4F00; border-color: transparent; }
.lead-meta-pill.is-cold { background: #E7F0FF; color: #1C4E9E; border-color: transparent; }
.lead-meta-text { font-size: 12px; color: var(--mono-muted); }
.lead-meta-text strong { color: var(--ink); font-weight: 700; }

.lead-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.lead-tag-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px;
  background: #FDECEC; color: #B3261E; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700;
  text-transform: uppercase;
}
.lead-tag-pill button { background: none; border: none; cursor: pointer; color: inherit; font-size: 12px; line-height: 1; padding: 0; }
.lead-tag-add-btn {
  border: 1.5px dashed var(--divider); background: none; border-radius: 20px; padding: 4px 10px; font-size: 11px;
  font-weight: 700; color: var(--mono-muted); cursor: pointer; font-family: 'IBM Plex Mono', monospace;
}
.lead-tag-add-btn:hover { border-color: var(--ink); color: var(--ink); }
.add-tag-form { display: flex; gap: 8px; margin-top: 10px; }
.add-tag-form input { flex: 1 1 auto; padding: 8px 12px; border: 1.5px solid var(--divider); border-radius: 8px; font-size: 13px; }

.stage-stepper-wrap { margin-top: 18px; }
.stage-track { display: flex; gap: 0; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.stage-dot-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1 1 0; min-width: 84px;
  background: none; border: none; cursor: pointer; padding: 4px 2px; position: relative;
}
.stage-dot-item::before {
  content: ''; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: var(--divider); z-index: 0;
}
.stage-dot-item:first-child::before { display: none; }
.stage-dot-item.is-past::before, .stage-dot-item.is-active::before { background: var(--ink); }
.stage-dot {
  width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--divider); z-index: 1;
  transition: background .15s ease, border-color .15s ease;
}
.stage-dot-item:hover .stage-dot { border-color: var(--ink); }
.stage-dot-item.is-past .stage-dot { background: var(--ink); border-color: var(--ink); }
.stage-dot-item.is-active .stage-dot { background: var(--accent, #FF5A1F); border-color: var(--accent, #FF5A1F); }
.stage-dot-label { font-size: 11px; font-weight: 700; color: var(--mono-muted); text-align: center; white-space: nowrap; }
.stage-dot-item.is-active .stage-dot-label { color: var(--ink); }
.stage-dot-label .stage-day-count { display: block; font-family: 'IBM Plex Mono', monospace; font-weight: 500; opacity: 0.75; margin-top: 2px; }

.stage-exception-badge {
  padding: 3px 10px; border-radius: 20px; background: #FDECEC; color: #B3261E; font-size: 11px; font-weight: 700;
  font-family: 'IBM Plex Mono', monospace; text-transform: uppercase;
}
/* Call/Text icon buttons in the lead header -- same 36px white-circle
   chip as .lead-nav-btn (the prev/next lead arrows), just hosting an
   SVG icon instead of a glyph. Kept visually "always light" like that
   button rather than theme-flipped, matching the existing convention. */
.lead-icon-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--divider);
  background: #fff; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: border-color .15s ease, color .15s ease;
}
.lead-icon-btn svg { width: 18px; height: 18px; }
.lead-icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.lead-icon-btn.is-disabled { opacity: 0.35; pointer-events: none; }

/* ---- qualification tab: header ring + collapsible per-step groups ---- */
.qual-header-top { display: flex; align-items: center; gap: 14px; }
.qual-header-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px; background: #E1F3E7; color: #17703A;
  display: flex; align-items: center; justify-content: center;
}
.qual-header-icon svg { width: 22px; height: 22px; }
.qual-header-info { flex: 1 1 auto; min-width: 0; }
.qual-ring-wrap { flex: none; position: relative; width: 56px; height: 56px; }
.qual-ring-wrap svg { width: 56px; height: 56px; }
.qual-ring-pct {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 12px; font-weight: 800;
  font-family: 'IBM Plex Mono', monospace;
}

.qual-group { border: 1px solid rgba(18,18,18,0.07); border-radius: 14px; margin-top: 10px; overflow: hidden; }
.qual-group-head {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 16px; background: #fff; border: none;
  cursor: pointer; text-align: left; font-family: 'Archivo', sans-serif;
}
.qual-group-check { flex: none; width: 20px; height: 20px; color: var(--divider); }
.qual-group-check svg { width: 20px; height: 20px; display: block; }
.qual-group.is-answered .qual-group-check { color: #1AA368; }
.qual-group-title { flex: 1 1 auto; font-size: 14px; font-weight: 700; color: var(--mono-muted); }
.qual-group.is-answered .qual-group-title, .qual-group.is-current .qual-group-title { color: var(--ink); }
.qual-group-chevron { flex: none; width: 16px; height: 16px; color: var(--mono-muted); transition: transform .15s ease; }
.qual-group-chevron svg { width: 16px; height: 16px; display: block; }
.qual-group.is-open .qual-group-chevron { transform: rotate(180deg); }
.qual-group-body { padding: 0 16px 16px 46px; border-top: 1px solid rgba(18,18,18,0.06); }
.qual-group-prompt { font-size: 12px; color: var(--mono-muted); margin-top: 12px; }
.qual-group-answer { font-size: 14px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.qual-group-answer.is-empty { font-weight: 400; font-style: italic; color: var(--mono-muted); }

/* #lead-tabs now just reuses .analytics-tabbar/.analytics-tab-btn --
   the same shared pill-tab look used everywhere else in the app
   (Business KPIs/Messaging/..., e-signing's All/Waiting/..., the
   automations tabs) -- instead of its own bespoke tab style. Only
   the page-specific gap/margin stays here. */
#lead-tabs { margin: 20px 0 18px; }
#lead-tabs .analytics-tab-btn { display: flex; align-items: center; gap: 6px; }
#sms-count-badge:empty { display: none; }
#sms-count-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--accent); color: #fff; font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 800; line-height: 1;
}

.lead-page-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; margin-top: 16px; }
@media (max-width: 900px) { .lead-page-grid { grid-template-columns: 1fr; } }
.lead-side-col { position: sticky; top: 90px; }
@media (max-width: 900px) { .lead-side-col { position: static; } }

.qual-sidebar-toggle { width: 100%; background: none; border: none; cursor: pointer; padding: 0; text-align: left; font-family: inherit; }
.qual-sidebar-chevron { flex: none; width: 16px; height: 16px; color: var(--mono-muted); transition: transform .15s ease; }
.qual-sidebar-chevron svg { width: 16px; height: 16px; display: block; }
.qual-sidebar-card.is-open .qual-sidebar-chevron { transform: rotate(180deg); }
.qual-sidebar-body { margin-top: 4px; }

.property-photo-placeholder {
  position: relative; width: 100%; aspect-ratio: 4 / 3; background: var(--divider); border-radius: 12px;
  display: flex; align-items: flex-end; justify-content: flex-start; overflow: hidden;
}
/* The Overview card is a small summary, not a hero photo display --
   a 4:3 aspect-ratio box at full card width got absurdly tall once
   the page widened. Fixed, modest height instead. */
.property-photo-placeholder.is-compact { aspect-ratio: auto; height: 160px; }
.property-photo-placeholder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.property-photo-count {
  margin: 10px; padding: 4px 10px; border-radius: 10px; background: rgba(0,0,0,.75); color: #fff;
  font-size: 11px; font-weight: 700; position: relative; z-index: 1;
}

/* Listing-style gallery: one large hero + up to six smaller shots in
   a 3x2 grid beside it, with a "+N photos" overlay on the last
   visible cell when there are more than that. */
.property-gallery { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 8px; height: 320px; }
@media (max-width: 760px) { .property-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 160px repeat(2, 100px); height: auto; } }
.property-gallery-cell {
  position: relative; border: none; padding: 0; margin: 0; cursor: pointer; border-radius: 10px; overflow: hidden;
  background: var(--divider);
}
.property-gallery-cell.is-hero { grid-row: 1 / 3; }
@media (max-width: 760px) { .property-gallery-cell.is-hero { grid-column: 1 / 3; grid-row: 1; } }
.property-gallery-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.property-gallery-more-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 15px; font-weight: 800; gap: 6px;
}
.property-gallery-empty {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; color: var(--mono-muted);
  font-size: 13px; background: var(--divider); border-radius: 10px; height: 160px;
}
.property-detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 20px; margin-top: 14px; }
@media (max-width: 640px) { .property-detail-grid { grid-template-columns: repeat(2, 1fr); } }
.property-detail-item .label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; text-transform: uppercase; color: var(--mono-muted); }
.property-detail-item .value { font-size: 15px; font-weight: 700; margin-top: 2px; }

.lead-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 24px; }
@media (max-width: 640px) { .lead-info-grid { grid-template-columns: repeat(2, 1fr); } }
.lead-info-item .label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; text-transform: uppercase; color: var(--mono-muted); }
.lead-info-item .value { font-size: 14px; font-weight: 700; margin-top: 2px; }

/* Phone 1 is the only number Closer Engine can actually text (see
   pick_send_phone) -- shown bold/full-contrast; Phone 2/3 are shown
   dimmer so it's visually obvious which one is "the" number without
   needing to read the labels. */
.lead-phone-item .value { display: flex; align-items: center; gap: 6px; }
.lead-phone-item.is-primary .value { color: var(--ink); font-weight: 800; }
.lead-phone-item.is-secondary .value { color: var(--mono-muted); font-weight: 600; }
.lead-phone-item .value a { color: inherit; text-decoration: none; }
.lead-phone-item .value a:hover { text-decoration: underline; }
.lead-phone-type-icon { flex: none; opacity: .75; }

.task-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--divider); font-size: 14px; }
.task-row:last-child { border-bottom: none; }
.task-row.is-completed .task-title { text-decoration: line-through; color: var(--mono-muted); }
.task-due { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mono-muted); margin-left: auto; white-space: nowrap; }
.add-task-row { display: flex; gap: 8px; margin-top: 12px; }
.add-task-row input { flex: 1 1 auto; padding: 8px 10px; border: 1.5px solid var(--divider); border-radius: 8px; font-size: 13px; }

.note-card { padding: 12px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.note-card:last-child { border-bottom: none; }
.note-card .note-author { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mono-muted); margin-top: 6px; }
.add-note-row textarea { width: 100%; padding: 8px 10px; border: 1.5px solid var(--divider); border-radius: 8px; font-size: 13px; resize: vertical; }

.activity-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.activity-row:last-child { border-bottom: none; }
.activity-kind { font-family: 'IBM Plex Mono', monospace; font-size: 10px; text-transform: uppercase; color: var(--mono-muted); flex: none; width: 90px; }
.activity-body { flex: 1 1 auto; min-width: 0; }
.activity-time { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mono-muted); flex: none; }

.message-thread { display: flex; flex-direction: column; gap: 12px; max-height: 360px; overflow-y: auto; margin-bottom: 18px; padding-right: 4px; }
.message-bubble { max-width: 72%; padding: 11px 15px; border-radius: var(--radius-inner, 16px); font-size: 14px; line-height: 1.45; }
.message-bubble.is-out {
  align-self: flex-end; background: var(--accent, #FF5A1F); color: #fff; border-bottom-right-radius: 5px;
  box-shadow: 0 4px 14px -4px rgba(var(--accent-rgb, 255, 90, 31), .45);
}
.message-bubble.is-in {
  align-self: flex-start; background: var(--glass-fallback-3, #F7F7F9); color: var(--text, var(--ink));
  border: 1px solid var(--separator, rgba(18, 18, 18, .08)); border-bottom-left-radius: 5px;
}
.message-bubble-media { display: block; max-width: 100%; border-radius: 10px; margin-bottom: 8px; }
.message-meta { display: block; margin-top: 5px; font-family: 'IBM Plex Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; opacity: 0.75; }
.message-bubble.is-out .message-meta { color: rgba(255, 255, 255, .85); }
.message-bubble.is-in .message-meta { color: var(--text-2, var(--mono-muted)); }
.send-text-box textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--divider); border-radius: 12px;
  font-family: 'Archivo', sans-serif; font-size: 14px; resize: vertical;
}
.send-text-box textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.send-text-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.opt-out-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--divider); font-size: 14px; }
.state-rules-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.state-rules-table th, .state-rules-table td { padding: 10px 12px; border-bottom: 1px solid var(--divider); text-align: left; }
.state-rules-table th { font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; color: var(--mono-muted); background: var(--paper-2); }

.ce-found-row-plain { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--divider); }
.ce-found-row-plain:last-child { border-bottom: none; }
.ce-found-row-plain span:last-child { color: var(--mono-muted); text-align: right; }

/* Zillow "Getting around" + "Nearby schools" cards -- shared by the
   lead profile and the deal packet, styled to echo Zillow's own
   layout (icon + score + descriptor; a circular rating badge per
   school) using this app's existing visual language (IBM Plex Mono
   digits, accent-tint circles, the same badge recipe as the AI score). */
.zillow-ga-row { display: flex; flex-wrap: wrap; gap: 20px; }
.zillow-ga-item { display: flex; align-items: flex-start; gap: 10px; min-width: 170px; }
.zillow-ga-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-tint, rgba(255,90,31,.14)); color: var(--accent-solid, #D9420F); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.zillow-ga-icon svg { width: 20px; height: 20px; }
.zillow-ga-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.zillow-ga-value { font-family: 'IBM Plex Mono', monospace; font-weight: 800; font-size: 15px; color: var(--ink); }
.zillow-ga-of100 { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 11px; color: var(--mono-muted); margin-left: 2px; }
.zillow-ga-desc { font-size: 12px; color: var(--mono-muted); margin-top: 1px; }

.zillow-school-card { border: 1px solid var(--divider); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.zillow-school-card:last-child { margin-bottom: 0; }
.zillow-school-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.zillow-school-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.zillow-school-meta { display: block; font-size: 12px; font-weight: 400; color: var(--mono-muted); margin-top: 2px; }
.zillow-rating-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--mono-muted); background: #fff; flex-shrink: 0; }
.zillow-rating-badge.is-strong { border-color: #1F8A4C; }
.zillow-rating-badge.is-strong .zillow-rating-value { color: #1F8A4C; }
.zillow-rating-badge.is-mid { border-color: #B8860B; }
.zillow-rating-badge.is-mid .zillow-rating-value { color: #B8860B; }
.zillow-rating-value { font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.zillow-rating-of { font-family: 'IBM Plex Mono', monospace; font-size: 7.5px; font-weight: 700; color: var(--mono-muted); }
.zillow-school-subrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.zillow-school-pill { font-size: 11.5px; padding: 4px 10px; border-radius: 999px; background: var(--divider); color: var(--ink); }
.zillow-school-pill strong { font-weight: 700; }

.zillow-change-up { color: #1F8A4C; font-weight: 600; }
.zillow-change-down { color: #C1361B; font-weight: 600; }

/* PROFILE page */
.profile-id-card { display: flex; }
.profile-page-head { display: flex; align-items: center; gap: 18px; width: 100%; }
.profile-page-avatar {
  width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 22px; background: var(--accent-tint, rgba(255, 90, 31, .14)); color: var(--accent-solid, #D9420F); flex: none;
  box-shadow: 0 0 0 3px var(--glass-fallback-1, #fff), 0 0 0 4px var(--separator, rgba(18, 18, 18, .08));
}
.profile-page-head-text { flex: 1; min-width: 0; }
.profile-page-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-page-name { font-size: 20px; font-weight: 700; color: var(--text, var(--ink)); }
.profile-page-email { font-size: 13px; color: var(--text-2, var(--mono-muted)); margin-top: 3px; }
.profile-page-since { font-size: 12px; color: var(--text-3, var(--mono-muted)); margin-top: 1px; }
.profile-id-meta-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--text-3, var(--mono-muted)); font-family: 'IBM Plex Mono', monospace; }
.profile-id-meta-dot { opacity: .5; }
.profile-id-meta-item:empty { display: none; }
.profile-subhead { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3, var(--mono-muted)); border-top: 1px solid var(--separator, rgba(18,18,18,.08)); padding-top: 16px; }
.profile-section-note { font-family: inherit; text-transform: none; font-size: 13px; margin-top: 4px; }
.profile-field-hint { font-family: inherit; text-transform: none; font-size: 12px; margin-top: 10px; }
.profile-edit-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* SETTINGS page */
.settings-toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--separator, rgba(18, 18, 18, .08)); }
.settings-toggle-row:last-child { border-bottom: none; }
.settings-toggle-label { font-weight: 650; font-size: 14px; color: var(--text, var(--ink)); }
.settings-toggle-note { font-family: inherit; text-transform: none; letter-spacing: normal; font-size: 13px; margin-top: 2px; }

/* HELP page */
.help-faq-item { padding: 14px 0; border-bottom: 1px solid var(--separator, rgba(18, 18, 18, .08)); }
.help-faq-item:last-child { border-bottom: none; }
.help-faq-item summary { cursor: pointer; font-weight: 650; font-size: 14px; color: var(--text, var(--ink)); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.help-faq-item summary::-webkit-details-marker { display: none; }
.help-faq-item summary::after { content: "+"; font-size: 18px; font-weight: 400; color: var(--text-3, var(--mono-muted)); flex: none; }
.help-faq-item[open] summary::after { content: "\2212"; }
.help-faq-item p { font-size: 14px; line-height: 1.6; color: var(--text-2, var(--mono-muted)); margin: 10px 0 0; }
.help-faq-item p a { color: var(--accent-solid, #D9420F); }

/* Qualification framework -- branching workflow diagram */
.qwf-scroll { overflow-x: auto; padding: 10px 0 20px; }
.qwf-canvas { position: relative; }
.qwf-node {
  position: absolute; border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-s1, 0 1px 3px rgba(0,0,0,.08));
  border: 1px solid var(--separator, rgba(18,18,18,.08));
}
.qwf-node-action { background: #fff; }
.qwf-node-decision { background: #E9F7EF; border-color: #BFE6CC; }
.qwf-node-end { background: var(--ink); color: var(--paper); border-radius: 999px; display: flex; flex-direction: column; justify-content: center; }
.qwf-node-end .qwf-node-prompt { color: rgba(255,255,255,.75); }
.qwf-start-badge {
  position: absolute; top: -11px; left: 12px; background: var(--accent-solid, #D9420F); color: #fff; font-size: 10px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px;
}
.qwf-node-title { font-weight: 800; font-size: 13.5px; }
.qwf-node-prompt { font-size: 12px; line-height: 1.4; color: var(--text-2, var(--mono-muted)); margin-top: 5px; }
.qwf-node-tag { font-size: 10px; font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .04em; opacity: .8; margin-top: 6px; }

.call-row { padding: 14px 0; border-bottom: 1px solid var(--divider); }
.call-row:last-child { border-bottom: none; }
.call-row-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.call-row-dir { font-weight: 700; }
.call-row-duration, .call-row-time { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mono-muted); }
.call-row-time { margin-left: auto; }
.call-row-summary { margin-top: 10px; font-size: 13px; }
.call-row-summary strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--mono-muted); margin-bottom: 3px; }
.call-row-summary p { margin: 0; }
.call-row-transcript { margin-top: 8px; font-size: 13px; }
.call-row-transcript summary { cursor: pointer; font-weight: 600; color: var(--mono-muted); font-size: 12px; }
.call-row-transcript p { margin: 8px 0 0; color: var(--mono-muted); white-space: pre-wrap; }

/* CALENDAR page */
.cal-nav-group { display: flex; align-items: center; gap: 6px; background: var(--glass-fallback-3, #F7F7F9); border: 1px solid var(--divider); border-radius: 999px; padding: 4px 6px; }
.cal-nav-btn { width: 26px; height: 26px; border-radius: 50%; border: none; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--mono-muted); }
.cal-nav-btn:hover { background: var(--divider); color: var(--ink); }
.cal-nav-btn svg { width: 15px; height: 15px; }
.cal-range-label { font-size: 13px; font-weight: 700; white-space: nowrap; padding: 0 4px; }

.cal-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; margin-top: 20px; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: 1fr; } }
.cal-grid-card { padding: 0; overflow: hidden; }
.cal-aside { display: flex; flex-direction: column; gap: 20px; }

.cal-grid { overflow-x: auto; }
.cal-grid-header-row { display: flex; border-bottom: 1px solid var(--divider); }
.cal-grid-gutter { flex: none; width: 56px; }
.cal-grid-header-cell { flex: 1; min-width: 90px; text-align: center; padding: 10px 4px; }
.cal-grid-header-cell .dow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--mono-muted); }
.cal-grid-header-cell .dom { font-size: 15px; font-weight: 700; margin-top: 2px; width: 26px; height: 26px; line-height: 26px; border-radius: 50%; margin-left: auto; margin-right: auto; }
.cal-grid-header-cell.is-today .dom { background: var(--accent); color: #fff; }
.cal-grid-body { display: flex; position: relative; max-height: 560px; overflow-y: auto; }
.cal-grid-gutter-col { flex: none; width: 56px; }
.cal-grid-hour-label { font-size: 10.5px; color: var(--mono-muted); text-align: right; padding-right: 8px; box-sizing: border-box; border-top: 1px solid var(--divider); transform: translateY(-6px); }
.cal-grid-day-col { flex: 1; min-width: 90px; position: relative; border-left: 1px solid var(--divider); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, var(--divider) 47px, var(--divider) 48px); }
.cal-grid-day-col.is-weekend { background-color: var(--paper-2, #F7F7F5); }
.cal-event {
  position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 4px 6px; overflow: hidden;
  font-size: 11px; line-height: 1.25; cursor: pointer; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.cal-event .title { font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event .sub { display: block; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cal-upcoming-row { padding: 10px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.cal-upcoming-row:last-child { border-bottom: none; }
.cal-upcoming-date {
  flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--paper-2, #F7F7F5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; line-height: 1.1;
}
.cal-upcoming-date .mon { font-size: 9px; text-transform: uppercase; color: var(--mono-muted); font-weight: 700; }
.cal-upcoming-date .day { font-size: 13px; }
.cal-upcoming-item { display: flex; gap: 10px; align-items: center; }
.cal-upcoming-body .title { font-weight: 700; }
.cal-upcoming-body .sub { color: var(--mono-muted); font-size: 12px; }

.cal-legend-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; }
.cal-legend-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.cal-month-cell { background: #fff; min-height: 90px; padding: 8px; cursor: pointer; }
.cal-month-cell:hover { background: var(--accent-tint, rgba(255, 90, 31, .06)); }
.cal-month-cell .num { font-size: 13px; font-weight: 700; }
.cal-month-cell.is-today .num { color: var(--accent, #FF5A1F); }
.cal-month-cell .dot-row { display: flex; gap: 3px; margin-top: 8px; flex-wrap: wrap; }
.cal-month-cell .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent, #FF5A1F); }

/* DIALER page */
.dialer-layout { display: grid; grid-template-columns: 460px 1fr; justify-content: center; gap: 20px; height: calc(100vh - 230px); min-height: 520px; }
@media (max-width: 1000px) { .dialer-layout { grid-template-columns: 1fr; height: auto; } }

.dialer-history-col { display: flex; flex-direction: column; }
.dialer-history-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--separator, rgba(18, 18, 18, .08)); }
.dialer-history-list { flex: 1; overflow-y: auto; }
.dialer-history-row { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-bottom: 1px solid var(--separator, rgba(18, 18, 18, .06)); cursor: pointer; }
.dialer-history-row:last-child { border-bottom: none; }
.dialer-history-row:hover { background: var(--accent-tint, rgba(255, 90, 31, .08)); }
.dialer-history-dir-icon { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.dialer-history-dir-icon.is-out { background: var(--info-tint, rgba(10, 108, 255, .12)); color: var(--info, #0A6CFF); }
.dialer-history-dir-icon.is-in { background: var(--success-tint, rgba(31, 157, 85, .12)); color: var(--success, #1F9D55); }
.dialer-history-dir-icon.is-missed { background: var(--danger-tint, rgba(217, 48, 37, .12)); color: var(--danger, #D93025); }
.dialer-history-dir-icon svg { width: 15px; height: 15px; }
.dialer-history-body { flex: 1; min-width: 0; }
.dialer-history-name { font-weight: 650; font-size: 14px; color: var(--text, var(--ink)); }
.dialer-history-sub { font-size: 12px; color: var(--text-2, var(--mono-muted)); margin-top: 2px; }
.dialer-history-time { font-size: 11px; color: var(--text-3, var(--mono-muted)); white-space: nowrap; flex: none; }

.dialer-pad-col { display: flex; flex-direction: column; align-items: center; padding: 28px; gap: 14px; overflow-y: auto; }
.dialer-lead-card { width: 100%; max-width: 640px; text-align: center; padding: 16px; border-radius: var(--radius-inner, 16px); background: var(--accent-tint, rgba(255, 90, 31, .1)); }
.dialer-lead-card .name { font-weight: 700; font-size: 16px; }
.dialer-lead-card .sub { font-size: 13px; color: var(--text-2, var(--mono-muted)); margin-top: 2px; }
.dialer-top-search-wrap { position: relative; width: 260px; flex: none; }
.dialer-top-search-wrap .inbox-search-input { width: 100%; }
.dialer-lead-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5; max-height: 220px; overflow-y: auto;
  background: var(--glass-fallback-1, #fff); border: 1px solid var(--separator, rgba(18, 18, 18, .1)); border-radius: var(--radius-inner, 16px);
  box-shadow: var(--shadow-s2, 0 2px 4px rgba(16, 16, 32, .06), 0 16px 40px rgba(16, 16, 32, .10));
}
.dialer-lead-result-row { padding: 10px 14px; cursor: pointer; font-size: 13px; }
.dialer-lead-result-row:hover { background: var(--accent-tint, rgba(255, 90, 31, .1)); }
.dialer-lead-result-row .name { font-weight: 650; }
.dialer-lead-result-row .sub { color: var(--text-2, var(--mono-muted)); font-size: 12px; }
.dialer-number-display-row { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 560px; }
.dialer-number-display {
  flex: 1; width: 100%; border: none; background: transparent; outline: none;
  font-family: 'IBM Plex Mono', monospace; font-size: 26px; font-weight: 650; min-height: 36px;
  color: var(--text, var(--ink)); text-align: center; letter-spacing: .01em;
}
.dialer-number-display::placeholder { font-family: var(--font-sans, inherit); font-size: 15px; font-weight: 500; color: var(--text-3, var(--mono-muted)); letter-spacing: normal; }
.dialer-match-note {
  margin: -8px 0 0; font-size: 12.5px; font-weight: 600; color: var(--accent-solid, #D9420F);
  display: flex; align-items: center; gap: 6px;
}
.dialer-match-note svg { width: 13px; height: 13px; flex: none; }

.dialer-keypad { display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: 10px 28px; width: 100%; max-width: 360px; }
.dialer-key {
  width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--separator, rgba(18, 18, 18, .06));
  background: var(--glass-fallback-1, #fff); color: var(--text, var(--ink)); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  box-shadow: 0 1px 2px rgba(16, 16, 32, .04), 0 6px 16px -4px rgba(16, 16, 32, .08);
  transition: transform .08s var(--ease-out, ease), box-shadow .15s ease, background .15s ease;
}
.dialer-key-num { font-size: 17px; font-weight: 650; line-height: 1; }
.dialer-key-letters { font-size: 7px; font-weight: 700; letter-spacing: .06em; color: var(--text-3, var(--mono-muted)); }
.dialer-key:hover { background: var(--accent-tint, rgba(255, 90, 31, .1)); }
.dialer-key:active { transform: scale(0.94); background: var(--accent-tint, rgba(255, 90, 31, .18)); box-shadow: 0 1px 2px rgba(16, 16, 32, .04); }

.dialer-action-row { display: flex; align-items: center; justify-content: center; gap: 24px; width: 100%; max-width: 360px; margin-top: 2px; }
.dialer-side-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--glass-fallback-3, #F7F7F9); color: var(--text-2, var(--mono-muted));
  display: flex; align-items: center; justify-content: center;
}
.dialer-side-btn svg { width: 17px; height: 17px; }
.dialer-side-btn:hover { background: var(--separator, rgba(18, 18, 18, .1)); color: var(--text, var(--ink)); }
.dialer-side-btn[hidden] { visibility: hidden; }
.dialer-call-btn {
  flex: none; width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--success, #1F9D55); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px -2px rgba(31, 157, 85, .5);
}
.dialer-call-btn svg { width: 19px; height: 19px; }
.dialer-call-btn:hover { background: #17824a; }
.dialer-call-btn:active { transform: scale(0.95); }

/* EMAILS page */
.email-provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.email-provider-card { text-align: left; }
.email-provider-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.email-provider-icon svg { width: 22px; height: 22px; }
.email-provider-note { font-family: inherit; text-transform: none; letter-spacing: normal; font-size: 13px; min-height: 36px; }

/* ONBOARDING wizard */
.onboarding-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.onboarding-step-pill {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--radius-pill, 999px);
  font-size: 13px; font-weight: 600; background: var(--separator, rgba(18, 18, 18, .08)); color: var(--text-2, var(--mono-muted));
}
.onboarding-step-num { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.12); font-size: 11px; flex: none; }
.onboarding-step-pill.is-active { background: var(--text, var(--ink)); color: #fff; }
.onboarding-step-pill.is-active .onboarding-step-num { background: rgba(255,255,255,.25); }
.onboarding-step-pill.is-done { background: var(--success-tint, rgba(31, 157, 85, .12)); color: var(--success, #1F9D55); }
.onboarding-step-pill.is-done .onboarding-step-num { background: var(--success, #1F9D55); color: #fff; }

.onboarding-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .onboarding-layout { grid-template-columns: 1fr; } }
.onboarding-panel { display: none; }
.onboarding-panel.is-active { display: block; }
.onboarding-checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2, var(--mono-muted)); margin-top: 10px; }
.onboarding-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.onboarding-aside { display: flex; flex-direction: column; gap: 16px; }
.onboarding-aside-card { font-size: 13px; }
.onboarding-aside-card .billing-card-title { font-size: 13px; }
.onboarding-aside-card p { font-size: 13px; line-height: 1.6; color: var(--text-2, var(--mono-muted)); margin: 0; }
.onboarding-check-item { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; color: var(--text-2, var(--mono-muted)); }
.onboarding-check-item svg { flex: none; width: 15px; height: 15px; }
.onboarding-check-item.is-met { color: var(--text, var(--ink)); }
.onboarding-check-item.is-met svg { color: var(--success, #1F9D55); }
.onboarding-check-item:not(.is-met) svg { color: var(--text-3, var(--mono-muted)); }
.onboarding-numbers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.onboarding-number-card { border: 1px solid var(--separator, rgba(18, 18, 18, .08)); border-radius: var(--radius-inner, 16px); padding: 16px; }
.onboarding-number-card .billing-card-title { margin-bottom: 6px; }
.review-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--separator, rgba(18, 18, 18, .06)); font-size: 13px; }
.review-row dt { color: var(--text-2, var(--mono-muted)); }
.review-row dd { margin: 0; font-weight: 600; color: var(--text, var(--ink)); text-align: right; max-width: 60%; }
.review-section-title { font-weight: 700; font-size: 14px; margin: 18px 0 4px; }
.review-section-title:first-child { margin-top: 0; }

/* TEAM page */
.team-invite-row { display: flex; gap: 10px; }
@media (max-width: 640px) { .team-invite-row { flex-wrap: wrap; } .team-invite-row select { width: 100% !important; } }
.team-member-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--separator, rgba(18, 18, 18, .08)); }
.team-member-row:last-child { border-bottom: none; }
.team-member-avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; background: var(--accent-tint, rgba(255, 90, 31, .14)); color: var(--accent-solid, #D9420F);
}
.team-member-body { flex: 1; min-width: 0; }
.team-member-name { font-weight: 650; font-size: 14px; color: var(--text, var(--ink)); }
.team-member-name .is-you-tag { font-weight: 500; font-size: 12px; color: var(--text-3, var(--mono-muted)); margin-left: 6px; }
.team-member-email { font-size: 13px; color: var(--text-2, var(--mono-muted)); }
.team-member-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.team-role-select {
  height: 32px; padding: 0 28px 0 10px; border-radius: var(--radius-btn, 12px); border: 1px solid var(--separator, rgba(18, 18, 18, .12));
  background-color: var(--glass-fallback-3, #F7F7F9); font-family: inherit; font-size: 13px; color: var(--text, var(--ink));
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'><path d='M5 8l5 5 5-5' stroke='%236E6E73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 12px;
}
.team-remove-btn {
  background: none; border: none; cursor: pointer; color: var(--text-3, var(--mono-muted)); padding: 6px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; transition: background .15s ease, color .15s ease;
}
.team-remove-btn:hover { background: var(--danger-tint, rgba(217, 48, 37, .12)); color: var(--danger, #D93025); }
.team-remove-btn svg { width: 16px; height: 16px; }

/* COMING SOON placeholder pages */
.ce-coming-soon {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  max-width: 460px; margin: 48px auto 0; padding: 48px 32px;
  background: var(--glass-fallback-1, #fff); border: 1px solid var(--separator, rgba(18, 18, 18, .08));
  border-radius: var(--radius-card, 22px); box-shadow: var(--shadow-s1, 0 1px 2px rgba(16, 16, 32, .05), 0 8px 24px rgba(16, 16, 32, .06));
}
@supports (backdrop-filter: blur(1px)) {
  .ce-coming-soon { background: var(--glass-1-bg); backdrop-filter: blur(var(--glass-1-blur, 28px)) saturate(var(--glass-1-sat, 1.6)); -webkit-backdrop-filter: blur(var(--glass-1-blur, 28px)) saturate(var(--glass-1-sat, 1.6)); border-color: var(--glass-1-border); }
}
.ce-coming-soon-icon {
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--accent-tint, rgba(255, 90, 31, .14)); color: var(--accent-solid, #D9420F);
}
.ce-coming-soon-icon svg { width: 26px; height: 26px; }
.ce-coming-soon-note { font-family: inherit; text-transform: none; letter-spacing: normal; font-size: 14px; color: var(--text-2, var(--mono-muted)); }

/* ---------- generic status pill (glass) ---------- */
.ce-status-pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: var(--radius-pill, 999px); white-space: nowrap; }
.ce-status-pill.is-info { background: var(--info-tint, rgba(10, 108, 255, .12)); color: var(--info, #0A6CFF); }
.ce-status-pill.is-success { background: var(--success-tint, rgba(31, 157, 85, .12)); color: var(--success, #1F9D55); }
.ce-status-pill.is-warn { background: var(--warning-tint, rgba(178, 106, 0, .14)); color: var(--warning, #B26A00); }
.ce-status-pill.is-danger { background: var(--danger-tint, rgba(217, 48, 37, .12)); color: var(--danger, #D93025); }
.ce-status-pill.is-accent { background: var(--accent-tint, rgba(255, 90, 31, .14)); color: var(--accent-solid, #D9420F); }
.ce-status-pill.is-neutral { background: var(--separator, rgba(18, 18, 18, .08)); color: var(--text-2, var(--mono-muted)); }

/* ---------- BULK SMS: status cards on the campaigns list ---------- */
.bulk-sms-status-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 1200px) { .bulk-sms-status-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .bulk-sms-status-row { grid-template-columns: repeat(2, 1fr); } }
.bulk-sms-status-card.billing-card { display: block; text-decoration: none; color: inherit; cursor: pointer; padding: 18px; transition: transform .18s var(--ease-out, ease), box-shadow .18s ease; }
.bulk-sms-status-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-s2, 0 2px 4px rgba(16, 16, 32, .06), 0 16px 40px rgba(16, 16, 32, .10)); }
.bulk-sms-status-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.bulk-sms-status-head .ce-text-overline { font-size: 10px; }
.bulk-sms-status-head .ce-status-pill { font-size: 11px; padding: 3px 9px; }
.bulk-sms-status-title { font-weight: 700; font-size: 14px; color: var(--text, var(--ink)); line-height: 1.3; }
.bulk-sms-status-note { font-family: inherit; text-transform: none; letter-spacing: normal; font-size: 12px; margin-top: 4px; color: var(--text-2, var(--mono-muted)); line-height: 1.4; }
.bulk-sms-mini-progress { display: flex; gap: 3px; margin-top: 12px; }
.bulk-sms-mini-progress span { flex: 1; height: 4px; border-radius: 3px; background: var(--separator, rgba(18, 18, 18, .1)); }
.bulk-sms-mini-progress span.is-done { background: var(--success, #1F9D55); }
.bulk-sms-mini-progress span.is-active { background: var(--accent, #FF5A1F); }

/* ---------- 10DLC REGISTRATION page ---------- */
.reg-stepper { display: flex; gap: 0; margin: 20px 0 4px; }
.reg-step { flex: 1; position: relative; padding-top: 14px; }
.reg-step::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 4px; background: var(--separator, rgba(18, 18, 18, .1)); border-radius: 2px; }
.reg-step:first-child::before { left: 0; }
.reg-step.is-done::before, .reg-step.is-active::before { background: var(--success, #1F9D55); }
.reg-step.is-active::before { background: linear-gradient(90deg, var(--success, #1F9D55) 50%, var(--separator, rgba(18, 18, 18, .1)) 50%); }
.reg-step.is-rejected::before { background: var(--danger, #D93025); }
.reg-step-dot { position: absolute; top: -2px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--separator, rgba(18, 18, 18, .2)); border: 2px solid var(--glass-fallback-1, #fff); }
.reg-step.is-done .reg-step-dot, .reg-step.is-active .reg-step-dot { background: var(--success, #1F9D55); }
.reg-step.is-rejected .reg-step-dot { background: var(--danger, #D93025); }
.reg-step-label { font-weight: 650; font-size: 13px; color: var(--text, var(--ink)); }
.reg-step-date { display: block; font-size: 12px; color: var(--text-2, var(--mono-muted)); margin-top: 2px; }

.reg-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.reg-detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--separator, rgba(18, 18, 18, .06)); font-size: 13px; }
.reg-detail-row:last-child { border-bottom: none; }
.reg-detail-row dt { color: var(--text-2, var(--mono-muted)); }
.reg-detail-row dd { margin: 0; font-weight: 600; color: var(--text, var(--ink)); text-align: right; }

.reg-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 20px; }
.reg-stat-value { font-size: 28px; font-weight: 700; color: var(--text, var(--ink)); }
.reg-stat-label { font-size: 13px; color: var(--text-2, var(--mono-muted)); margin-bottom: 4px; }
.reg-stat-sub { font-size: 12px; color: var(--text-3, var(--mono-muted)); margin-top: 4px; }

.reg-optout-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- SENDING LEVELS page ---------- */
.level-banner {
  background: var(--info-tint, rgba(10, 108, 255, .1)); color: var(--text, var(--ink)); border: 1px solid var(--info-tint, rgba(10, 108, 255, .18));
  border-radius: var(--radius-inner, 16px); padding: 14px 18px; font-size: 13px; margin-bottom: 20px;
}
.level-banner.is-warn { background: var(--warning-tint, rgba(178, 106, 0, .12)); border-color: var(--warning-tint, rgba(178, 106, 0, .2)); }
.level-current-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .level-current-grid { grid-template-columns: 1fr; } }
.level-current-number { font-size: 40px; font-weight: 750; letter-spacing: -0.02em; color: var(--text, var(--ink)); margin: 4px 0; }
.level-criteria-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 12px; }
.level-criteria-box { border: 1px solid var(--separator, rgba(18, 18, 18, .08)); border-radius: var(--radius-inner, 16px); padding: 12px 14px; }
.level-criteria-box .ce-text-overline { margin-bottom: 4px; display: block; }
.level-criteria-box.is-met { border-color: var(--success-tint, rgba(31, 157, 85, .3)); }
.level-progress-track { height: 10px; border-radius: 6px; background: var(--separator, rgba(18, 18, 18, .1)); overflow: hidden; margin: 10px 0 6px; }
.level-progress-fill { display: block; height: 100%; background: var(--accent, #FF5A1F); border-radius: 6px; }

.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 20px; }
.level-card { position: relative; }
.level-card.is-current { border-color: var(--accent, #FF5A1F); box-shadow: 0 0 0 2px var(--accent-tint, rgba(255, 90, 31, .25)); }
.level-card.is-locked { opacity: .6; }
.level-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.level-card-name { font-weight: 700; font-size: 15px; color: var(--text, var(--ink)); }
.level-card-cap { font-size: 20px; font-weight: 700; color: var(--text, var(--ink)); margin-bottom: 10px; }
.level-check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2, var(--mono-muted)); margin-top: 6px; }
.level-check-row svg { flex: none; width: 15px; height: 15px; }
.level-check-row.is-met { color: var(--success, #1F9D55); }
.level-check-row.is-met svg { color: var(--success, #1F9D55); }
.level-check-row:not(.is-met) svg { color: var(--text-3, var(--mono-muted)); }

/* INBOX */
.inbox-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; height: calc(100vh - 230px); min-height: 480px; }
@media (max-width: 1100px) { .inbox-layout { grid-template-columns: 1fr; height: auto; } }

.inbox-col {
  background: var(--glass-fallback-1, #fff); border: 1px solid var(--separator, rgba(18, 18, 18, .08));
  border-radius: var(--radius-card, 22px); display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  box-shadow: var(--shadow-s1, 0 1px 2px rgba(16, 16, 32, .05), 0 8px 24px rgba(16, 16, 32, .06));
}
@supports (backdrop-filter: blur(1px)) {
  .inbox-col { background: var(--glass-1-bg); backdrop-filter: blur(var(--glass-1-blur, 28px)) saturate(var(--glass-1-sat, 1.6)); -webkit-backdrop-filter: blur(var(--glass-1-blur, 28px)) saturate(var(--glass-1-sat, 1.6)); border-color: var(--glass-1-border); }
}

.inbox-head-controls { display: flex; align-items: center; gap: 12px; flex: none; }
.inbox-search-input {
  width: 240px; padding: 9px 14px; border-radius: var(--radius-pill, 999px); border: 1px solid var(--separator, rgba(18, 18, 18, .1));
  background: var(--glass-fallback-1, #fff); font-family: inherit; font-size: 13px; color: var(--text, var(--ink));
}
.inbox-search-input:focus { outline: 2px solid var(--accent, #FF5A1F); outline-offset: 1px; }
.inbox-filter-bar { margin: 0; flex-wrap: nowrap; }
@media (max-width: 900px) {
  .page-head:has(.inbox-head-controls) { flex-wrap: wrap; }
  .inbox-head-controls { flex-wrap: wrap; width: 100%; }
  .inbox-search-input { width: 100%; }
}

.inbox-list { flex: 1; overflow-y: auto; }
.inbox-row { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--separator, rgba(18, 18, 18, .06)); cursor: pointer; transition: background .15s ease; }
.inbox-row:last-child { border-bottom: none; }
.inbox-row:hover { background: var(--accent-tint, rgba(255, 90, 31, .08)); }
.inbox-row.is-active { background: var(--accent-tint, rgba(255, 90, 31, .12)); box-shadow: inset 3px 0 0 var(--accent, #FF5A1F); }
.inbox-row-avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; background: var(--accent-tint, rgba(255, 90, 31, .14)); color: var(--accent-solid, #D9420F);
}
.inbox-row-body { flex: 1; min-width: 0; }
.inbox-row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.inbox-row-name { font-weight: 650; font-size: 14px; color: var(--text, var(--ink)); }
.inbox-row-time { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-3, var(--mono-muted)); white-space: nowrap; }
.inbox-row-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 3px; }
.inbox-row-preview { font-size: 13px; color: var(--text-2, #55554F); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-unread-dot { flex: none; background: var(--accent, #FF5A1F); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.inbox-row-badges { margin-top: 7px; display: flex; gap: 6px; flex-wrap: wrap; }
.inbox-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-pill, 999px); letter-spacing: .01em; }
.inbox-badge-campaign { background: var(--info-tint, rgba(10, 108, 255, .12)); color: var(--info, #0A6CFF); }
.inbox-badge-optout { background: var(--danger-tint, rgba(217, 48, 37, .12)); color: var(--danger, #D93025); }

.inbox-thread-col { padding: 16px; }
.inbox-thread-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--separator, rgba(18, 18, 18, .08)); margin-bottom: 14px; }
.inbox-thread-name { font-weight: 650; font-size: 15px; color: var(--text, var(--ink)); }
.inbox-thread-body { flex: 1; max-height: none; }

.inbox-empty-state {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--text-3, var(--mono-muted)); text-align: center; padding: 40px 20px;
}
.inbox-empty-state svg { width: 40px; height: 40px; opacity: .4; }
.inbox-empty-state span { font-size: 14px; }

.inbox-composer { border-top: 1px solid var(--separator, rgba(18, 18, 18, .08)); padding-top: 14px; margin-top: 4px; }
.inbox-composer textarea {
  width: 100%; resize: vertical; min-height: 40px; max-height: 160px; overflow-y: auto;
  border-radius: var(--radius-inner, 16px); border: 1px solid var(--separator, rgba(18, 18, 18, .1));
  padding: 10px 14px; font-family: inherit; font-size: 14px; background: var(--glass-fallback-3, #F7F7F9);
  box-sizing: border-box;
}
.inbox-composer textarea:focus { outline: 2px solid var(--accent, #FF5A1F); outline-offset: 1px; }
.inbox-composer-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 10px; flex-wrap: nowrap; }
.inbox-composer-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-composer-row button { flex: none; }

.inbox-right-col { background: none; border: none; padding: 0; gap: 14px; overflow-y: auto; box-shadow: none; }
.inbox-right-col .billing-card {
  background: var(--glass-fallback-1, #fff); border: 1px solid var(--separator, rgba(18, 18, 18, .08)); box-shadow: var(--shadow-s1, 0 1px 2px rgba(16, 16, 32, .05), 0 8px 24px rgba(16, 16, 32, .06));
}
@supports (backdrop-filter: blur(1px)) {
  .inbox-right-col .billing-card { background: var(--glass-1-bg); backdrop-filter: blur(var(--glass-1-blur, 28px)) saturate(var(--glass-1-sat, 1.6)); -webkit-backdrop-filter: blur(var(--glass-1-blur, 28px)) saturate(var(--glass-1-sat, 1.6)); border-color: var(--glass-1-border); }
}
.inbox-panel-name { font-weight: 700; font-size: 17px; color: var(--text, var(--ink)); }
.inbox-panel-sub { font-size: 13px; color: var(--text-2, var(--mono-muted)); margin-top: 2px; }

#inbox-stage-select {
  width: 100%; padding: 10px 34px 10px 12px; border-radius: var(--radius-btn, 12px); border: 1px solid var(--separator, rgba(18, 18, 18, .12));
  background-color: var(--glass-fallback-3, #F7F7F9); font-family: inherit; font-size: 14px; color: var(--text, var(--ink));
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'><path d='M5 8l5 5 5-5' stroke='%236E6E73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
}
#inbox-stage-select:focus { outline: 2px solid var(--accent, #FF5A1F); outline-offset: 1px; }

.inbox-quick-btn { text-align: center; }
.inbox-quick-btn.is-qualified { background: var(--success-tint, rgba(31, 157, 85, .12)); color: var(--success, #1F9D55); border-color: transparent; }
.inbox-quick-btn.is-dead { background: var(--danger-tint, rgba(217, 48, 37, .12)); color: var(--danger, #D93025); border-color: transparent; }
.inbox-quick-actions .inbox-quick-btn:last-child { margin-bottom: 0; }

/* DASHBOARD home-screen additions */
.dash-section-label { font-family: 'IBM Plex Mono', monospace; font-size: 12px; text-transform: uppercase; color: var(--mono-muted); margin: 28px 0 10px; }
.needs-reply-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--divider); cursor: pointer; }
.needs-reply-row:last-child { border-bottom: none; }
.needs-reply-row:hover { background: var(--paper-2); }
.needs-reply-name { font-weight: 800; font-size: 13px; }
.needs-reply-preview { font-size: 12px; color: var(--mono-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.needs-reply-time { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mono-muted); white-space: nowrap; flex: none; }
.dash-campaign-row { padding: 10px 0; border-bottom: 1px solid var(--divider); cursor: pointer; }
.dash-campaign-row:last-child { border-bottom: none; }
.dash-campaign-row:hover { background: var(--paper-2); }
.dash-campaign-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 800; }
.dash-campaign-stats { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mono-muted); margin-top: 3px; }
.dash-campaign-progress-track { height: 5px; border-radius: 4px; background: var(--divider); overflow: hidden; margin-top: 6px; }
.dash-campaign-progress-fill { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.dash-section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }

.s2l-bucket-track { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--divider); }
.s2l-bucket-track span { height: 100%; }
.s2l-bucket-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 11px; color: var(--mono-muted); flex-wrap: wrap; }
.s2l-bucket-legend span { display: inline-flex; align-items: center; gap: 5px; }
.s2l-bucket-legend .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.s2l-waiting-row { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--divider); font-size: 13px; }
.s2l-waiting-row a { font-weight: 700; }

.followup-tabbar { display: flex; gap: 6px; background: var(--paper-2); border-radius: 999px; padding: 4px; width: fit-content; margin-bottom: 14px; }
.followup-tab-btn { padding: 6px 14px; border-radius: 999px; border: none; background: transparent; font-size: 12px; font-weight: 700; color: var(--mono-muted); cursor: pointer; }
.followup-tab-btn.is-active { background: var(--ink); color: var(--paper); }
.followup-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.followup-row:last-child { border-bottom: none; }
.followup-row-name { font-weight: 700; }
.followup-row-sub { color: var(--mono-muted); font-size: 12px; }

.books-year-nav { display: flex; align-items: center; gap: 10px; font-family: 'IBM Plex Mono', monospace; font-weight: 700; }
.books-year-nav button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--divider); background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.books-year-nav button:hover { border-color: var(--ink); }
body[data-theme="dark"] .books-year-nav button { background: #141412; border-color: #2E2D29; color: var(--paper); }

.books-pnl-row { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--divider); }
.books-pnl-row:last-child { border-bottom: none; }
.books-pnl-row.is-total { border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 14px; font-weight: 700; }
.books-pnl-month { flex: 0 0 90px; font-size: 13px; font-weight: 700; }
.books-pnl-track { flex: 1 1 auto; display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--divider); }
.books-pnl-track span { height: 100%; }
.books-pnl-figures { flex: 0 0 auto; display: flex; gap: 22px; }
.books-pnl-figure { text-align: right; min-width: 72px; }
.books-pnl-figure-label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mono-muted); }
.books-pnl-figure-value { font-size: 13px; font-weight: 700; }
.books-pnl-figure-value.is-income { color: #17A34A; }
.books-pnl-figure-value.is-expense { color: #E3453C; }

.dash-campaign-kpi-row { display: flex; gap: 18px; margin-top: 10px; }
.dash-campaign-kpi { display: flex; flex-direction: column; }
.dash-campaign-kpi-value { font-size: 15px; font-weight: 800; }
.dash-campaign-kpi-label { font-size: 11px; color: var(--mono-muted); margin-top: 1px; }

/* DASHBOARD v2: bento controls + grid + gauge + tiles */
.dash-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-custom-range { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.dash-custom-range input[type="date"] { padding: 7px 10px; border-radius: 10px; border: 1px solid rgba(18,18,18,0.1); font-family: 'Archivo', sans-serif; }
.dash-compare-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.dash-customize-panel {
  position: absolute; top: 100%; right: 0; margin-top: 8px; width: 240px; background: #fff; border-radius: 16px;
  box-shadow: 0 1px 2px rgba(18,18,18,.05), 0 16px 40px -8px rgba(18,18,18,.2); padding: 14px; z-index: 25;
}
.dash-customize-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; cursor: pointer; }

/* DASHBOARD HEADER — Apple-glass pass (replaces the flat white pills
   and solid-black Export/Customize buttons with the new tokens; kept
   as overrides of the existing selectors/ids so dashboard.js's class
   and id hooks, and every other .btn-dark on the site, are untouched). */
.dash-range-picker {
  display: flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: var(--glass-fallback-3, #F7F7F9); border: 1px solid var(--separator, rgba(18,18,18,.08));
}
@supports (backdrop-filter: blur(1px)) {
  .dash-range-picker { background: var(--glass-3-bg); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); }
}
.dash-range-btn {
  padding: 7px 16px; border-radius: 999px; border: none; background: transparent; box-shadow: none;
  font-weight: 600; font-size: 13px; color: var(--text-2, var(--mono-muted)); cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.dash-range-btn:hover { border-color: transparent; color: var(--text, var(--ink)); }
.dash-range-btn.is-active {
  background: var(--glass-fallback-1, #fff); color: var(--text, var(--ink)); border-color: transparent;
  box-shadow: var(--shadow-s1, 0 1px 2px rgba(16,16,32,.05), 0 8px 24px rgba(16,16,32,.06));
}
.dash-custom-range input[type="date"] { background: var(--glass-fallback-1, #fff); border-color: var(--separator, rgba(18,18,18,.1)); color: var(--text, var(--ink)); }
/* Native date/time inputs draw their placeholder text and
   calendar/clock glyph themselves -- CSS color/background on the
   input doesn't reach them, only the UA's color-scheme does. Without
   this, those glyphs stay drawn for a light field even once we've
   made the field itself dark, rendering as dark-on-dark. */
body[data-theme="dark"] .dash-custom-range input[type="date"] { color-scheme: dark; }
.dash-compare-toggle input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent, #FF5A1F); }
.dash-compare-toggle { color: var(--text-2, var(--mono-muted)); }

#export-btn, #customize-btn {
  padding: 9px 18px !important; border-radius: 999px; font-weight: 700; font-size: 13px;
  background: var(--glass-fallback-1, #fff) !important; color: var(--text, var(--ink)) !important;
  border: 1px solid var(--separator, rgba(18,18,18,.08)); box-shadow: var(--shadow-s1, 0 1px 2px rgba(16,16,32,.05), 0 8px 24px rgba(16,16,32,.06));
}
@supports (backdrop-filter: blur(1px)) {
  #export-btn, #customize-btn { background: var(--glass-1-bg) !important; backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); }
}
#export-btn:hover, #customize-btn:hover {
  color: var(--text, var(--ink)) !important; background: var(--accent-tint, rgba(255,90,31,.12)) !important;
  transform: none; box-shadow: var(--shadow-s2, 0 2px 4px rgba(16,16,32,.06), 0 16px 40px rgba(16,16,32,.10));
}
.dash-customize-panel {
  background: var(--glass-fallback-2, #fff); border: 1px solid var(--separator, rgba(18,18,18,.08));
  box-shadow: var(--shadow-s2, 0 2px 4px rgba(16,16,32,.06), 0 16px 40px rgba(16,16,32,.10));
}
@supports (backdrop-filter: blur(1px)) {
  .dash-customize-panel { background: var(--glass-2-bg); backdrop-filter: blur(32px) saturate(1.6); -webkit-backdrop-filter: blur(32px) saturate(1.6); }
}

.bento-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; margin-bottom: 20px; align-items: stretch; }
.bento-span-4 { grid-column: span 4; }
.bento-span-8 { grid-column: span 8; }
.bento-stack { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 1100px) { .bento-row { grid-template-columns: 1fr; } .bento-span-4, .bento-span-8 { grid-column: span 1; } }

.dash-kpi-card.is-featured { background: var(--ink); color: var(--paper); }
.dash-kpi-card.is-featured .dash-kpi-label { color: var(--dark-muted); }
.dash-kpi-card.is-featured .dash-kpi-value { color: var(--paper); }
.dash-kpi-sparkline { margin-top: 8px; height: 32px; }
.dash-kpi-delta-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; font-weight: 700; }
.dash-kpi-delta-row.is-good { color: #17703A; }
.dash-kpi-delta-row.is-bad { color: #B3261E; }
.dash-kpi-card.is-featured .dash-kpi-delta-row.is-good { color: #5FD88A; }
.dash-kpi-card.is-featured .dash-kpi-delta-row.is-bad { color: #FF8A80; }

.dash-gauge-wrap { position: relative; display: flex; flex-direction: column; align-items: center; margin-bottom: 10px; }
.dash-gauge-value { position: absolute; top: 58%; font-size: 26px; font-weight: 900; font-stretch: 75%; }
.dash-gauge-label { margin-top: 2px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; color: var(--mono-muted); }

.sending-number-row { padding: 9px 0; border-bottom: 1px solid var(--divider); }
.sending-number-row:last-child { border-bottom: none; }
.sending-number-top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; justify-content: space-between; }
.sending-number-name { display: flex; align-items: center; gap: 8px; }
.health-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; vertical-align: middle; margin-right: 6px; }
.health-dot.is-good { background: #17703A; }
.health-dot.is-warn { background: #E0A100; }
.health-dot.is-bad { background: #B3261E; }
.sending-number-cap-track { height: 6px; border-radius: 4px; background: var(--divider); overflow: hidden; margin-top: 6px; }
.sending-number-cap-fill { display: block; height: 100%; border-radius: 4px; }
.sending-number-sub { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--mono-muted); margin-top: 3px; }

/* LIVE FEED */
.live-feed-card { display: flex; flex-direction: column; }
.live-feed-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mono-muted); margin-top: 2px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #17703A; animation: ce-pulse 1.6s ease-in-out infinite; }
.live-dot.is-paused { background: var(--dark-muted, #A3A29A); animation: none; }
@keyframes ce-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.live-feed-controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.live-feed-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.feed-chip { padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(18,18,18,0.08); background: #fff; font-size: 11px; font-weight: 700; cursor: pointer; }
.feed-chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.feed-new-events-btn {
  display: block; width: 100%; margin-bottom: 8px; padding: 7px; border-radius: 999px; border: none;
  background: var(--accent); color: var(--ink); font-weight: 800; font-size: 12px; cursor: pointer;
}
/* height:0 (not just min-height:0) is the actual fix here: without
   it, this list's real (unbounded, many-rows-tall) content height was
   feeding back into the grid row's own auto-sizing, making Live Feed
   the tallest item and inflating the whole row -- the opposite of
   "stretch to match the stack". An explicit height makes its intrinsic
   contribution 0 regardless of content, so the grid row is sized by
   the stack alone; flex-grow then expands this list to fill whatever
   height the card is stretched to, scrolling internally beyond that. */
.live-feed-list { flex: 1; height: 0; min-height: 0; overflow-y: auto; }
.feed-day-label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; text-transform: uppercase; color: var(--mono-muted); margin: 10px 0 4px; }
.feed-day-label:first-child { margin-top: 0; }
.feed-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--divider); cursor: default; }
.feed-row.is-clickable { cursor: pointer; }
.feed-row.is-clickable:hover { background: var(--paper-2); }
.feed-row.is-new { animation: ce-highlight 2.4s ease-out; }
@keyframes ce-highlight { 0% { background: #FFF1E8; } 100% { background: transparent; } }
.feed-row-icon { flex: none; width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--paper-2); }
.feed-row-body { flex: 1; min-width: 0; }
.feed-row-summary { font-size: 12.5px; line-height: 1.35; }
.feed-row-time { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--mono-muted); margin-top: 2px; }

/* QUICK ACTIONS */
.quick-actions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 900px) { .quick-actions-grid { grid-template-columns: repeat(2, 1fr); } }
.quick-action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 8px; border-radius: 16px; background: var(--paper-2); color: var(--ink); text-decoration: none;
  font-size: 12px; font-weight: 700; text-align: center; position: relative; transition: background .15s;
}
.quick-action-btn:hover { background: var(--divider); color: var(--ink); }
.quick-action-badge {
  position: absolute; top: 6px; right: 6px; background: var(--accent); color: var(--ink); font-size: 10px;
  font-weight: 800; border-radius: 999px; min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* CREDITS & USAGE CARD */
.credits-usage-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.credits-usage-row:last-child { border-bottom: none; }

/* INTERACTIVE CHARTS (chart-helpers.js areaChart/barChart) */
.ce-chart-container { position: relative; }
.ce-chart-container .ce-chart-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ce-chart-tooltip {
  /* Deliberately a dark bubble regardless of theme (not a themed
     glass token) -- it used to borrow --glass-2-bg/--glass-fallback-2
     for this, which resolved dark back when dark mode existed; now
     that the app is light-only those tokens resolve light too,
     which made this render as white-on-white and unreadable. */
  position: absolute; left: 0; top: 0; pointer-events: none; z-index: 6; opacity: 0;
  background: #1C1C1A; color: #EEEDE8;
  border-radius: 10px; padding: 7px 11px; font-size: 12px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 8px 20px -6px rgba(16,16,32,.3);
  transition: opacity .12s ease; transform: translate(-50%, -50%);
}
@supports (backdrop-filter: blur(1px)) { .ce-chart-tooltip { background: rgba(28,28,26,.92); backdrop-filter: blur(20px) saturate(1.6); } }
.ce-chart-tooltip.is-visible { opacity: 1; }
.ce-chart-tooltip .ce-tip-sub { display: block; font-weight: 500; font-size: 11px; opacity: 0.75; margin-top: 1px; }

/* ANALYTICS TABS */
.analytics-tabbar { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; padding: 10px 0; margin-bottom: 8px; }
.analytics-tab-btn { padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(18,18,18,0.1); background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.analytics-tab-btn.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.analytics-tab-panel[hidden] { display: none; }

/* MARKETS TAB: map + ranking list side by side */
.markets-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .markets-row { grid-template-columns: 1fr; } }
.geo-rank-list { max-height: 480px; overflow-y: auto; }
.geo-rank-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--divider); font-size: 12.5px; cursor: pointer; }
.geo-rank-row:last-child { border-bottom: none; }
.geo-rank-row:hover { background: var(--paper-2); }
.geo-rank-tier-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.geo-rank-stats { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mono-muted); white-space: nowrap; }


/* ---- Message compliance (admin) ---- */
.comp-quote { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid #B3261E; background: var(--paper-2); border-radius: 6px; font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.comp-row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.feed-row-compliance .feed-row-icon { background: #FDECEC; }
.comp-pattern { font-family: 'IBM Plex Mono', monospace; font-size: 11px; word-break: break-all; display: inline-block; max-width: 320px; }
.comp-textarea { width: 100%; box-sizing: border-box; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--divider); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; resize: vertical; }
body[data-theme="dark"] .feed-row-compliance .feed-row-icon { background: rgba(217, 48, 37, 0.22); }
body[data-theme="dark"] .comp-quote { border-left-color: #FF8A80; }
#error-monitor-list.live-feed-list { flex: none; height: auto; max-height: 520px; }
body[data-theme="dark"] .comp-quote { background: #131313; color: var(--paper); border-left-color: #FF8A80; }
body[data-theme="dark"] .comp-textarea { background: #131313; color: var(--paper); border-color: #2E2D29; }
.comp-textarea { background: #fff; }
.admin-table .admin-badge { white-space: nowrap; }
#comp-rule-msg:empty { display: none; }

/* ---- Support (tenant + admin) ---- */
.sp-badge-muted { background: #E6E4DC; color: #2B2A26; }
.sp-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 8px; background: var(--paper-2); color: var(--mono-muted); border: 1px solid var(--divider); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sp-num { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mono-muted); }
.sp-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-count { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 11px; background: rgba(18, 18, 18, .08); }
.analytics-tab-btn.is-active .sp-count { background: rgba(255, 255, 255, .2); }
.sp-count.is-crit { background: #B3261E; color: #fff; }
.sp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-adm-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 12px; }
.sp-sel { padding: 8px 10px; border: 1px solid var(--divider); border-radius: 10px; background: var(--paper-2); color: var(--ink); font: inherit; font-size: 13px; max-width: 100%; }
.sp-sel:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sp-adm-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr) 300px; gap: 16px; height: calc(100vh - 300px); min-height: 520px; }
.sp-adm-grid .inbox-col { min-height: 0; }
.sp-rcol { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; min-height: 0; }
.sp-qlist { min-height: 200px; }
.sp-qrow { align-items: flex-start; }
.sp-q-l1, .sp-q-l2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sp-q-l2 { margin-top: 5px; flex-wrap: wrap; font-size: 12px; color: var(--mono-muted); }
.sp-q-subject { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.sp-qrow.is-unread .sp-q-subject { font-weight: 700; }
.sp-qrow.is-overdue:not(.is-active) { box-shadow: inset 3px 0 0 #B3261E; }
.sp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #FF5A1F); flex: none; }
.sp-avatar { width: 22px; height: 22px; border-radius: 50%; background: #FFE9DE; color: #B93D08; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sp-avatar.is-none { background: transparent; border: 1px dashed var(--mono-muted); color: var(--mono-muted); }
.sp-detail { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.sp-dhead { padding: 14px 16px 6px; border-bottom: 1px solid var(--divider); }
.sp-dtitle { display: flex; gap: 10px; align-items: flex-start; }
.sp-back { display: none; }
.sp-dsubj { font-size: 16px; font-weight: 700; }
.sp-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.sp-fields { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.sp-fields label { display: flex; flex-direction: column; gap: 3px; }
.sp-fieldlabel { font: 700 10px 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--mono-muted); }
.sp-sla { display: flex; gap: 8px; align-items: center; padding: 8px 16px; font-size: 12.5px; border-bottom: 1px solid var(--divider); background: var(--paper-2); }
.sp-sla.is-warn { background: #FFF1D6; color: #7A4F00; }
.sp-sla.is-crit { background: #FDECEC; color: #B3261E; }
.sp-sla.is-good { background: #E1F3E7; color: #17703A; }
.sp-athread { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.sp-msg { max-width: 88%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--divider); background: var(--paper-2); }
.sp-msg.is-me { align-self: flex-end; background: var(--accent-tint, rgba(255, 90, 31, .10)); border-color: rgba(255, 90, 31, .25); }
.sp-msg.is-first { max-width: 100%; }
.sp-msg-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--mono-muted); margin-bottom: 4px; }
.sp-msg-head b { color: var(--ink); }
.sp-evt { align-self: center; font-size: 12px; color: var(--mono-muted); font-family: 'IBM Plex Mono', monospace; text-align: center; }
.sp-evt.is-internal { font-style: italic; }
.sp-note { padding: 12px 14px 12px 16px; border-radius: 12px; background: #FFF4D6; color: #4A3500; border: 1px dashed #D9A623; border-left: 4px solid #D9A623; }
.sp-note-head { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7A4F00; margin-bottom: 4px; }
.sp-composer { border-top: 1px solid var(--divider); padding: 12px 14px; background: var(--paper-2); flex: none; }
.sp-ctabs { display: flex; gap: 8px; }
.sp-composer textarea { width: 100%; box-sizing: border-box; min-height: 96px; padding: 10px 12px; border: 1px solid var(--divider); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; resize: vertical; }
.sp-composer textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sp-composer.is-note { background: #FFF4D6; border-top: 2px dashed #D9A623; }
.sp-composer.is-note textarea { background: #FFFAEB; border-color: #D9A623; color: #4A3500; }
.sp-composer-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.sp-composer-tools .sp-spacer { flex: 1; }
.sp-after { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--mono-muted); }
.sp-btn-note { background: transparent; border: 2px solid #B07D00; color: #7A4F00; border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.sp-canned { position: absolute; left: 14px; right: 14px; bottom: 100%; margin-bottom: 6px; z-index: 20; background: var(--paper); border: 1px solid var(--divider); border-radius: 14px; box-shadow: 0 12px 40px rgba(16, 16, 32, .18); display: flex; flex-direction: column; max-height: 420px; }
.sp-canned-top { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--divider); }
.sp-canned-list { overflow-y: auto; min-height: 120px; flex: 1; }
.sp-canned-group { position: sticky; top: 0; padding: 6px 12px; font: 700 10.5px 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .08em; color: var(--mono-muted); background: var(--paper-2); }
.sp-canned-opt { display: flex; gap: 10px; padding: 8px 12px; cursor: pointer; font-size: 13px; }
.sp-canned-opt .sp-sc { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mono-muted); min-width: 96px; }
.sp-canned-opt[aria-selected="true"], .sp-canned-opt:hover { background: var(--accent-tint, rgba(255, 90, 31, .12)); }
.sp-canned-prev { border-top: 1px solid var(--divider); padding: 10px 12px; max-height: 150px; overflow-y: auto; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-canned-foot { padding: 8px 12px; border-top: 1px solid var(--divider); }
mark.sp-missing { background: #FFF1D6; color: #7A4F00; border-radius: 4px; padding: 0 3px; }
.sp-set-team { padding: 10px 0; border-bottom: 1px solid var(--divider); }
.sp-members { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.sp-chk-l { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.sp-num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 8px; }
.sp-num-field { display: flex; flex-direction: column; gap: 4px; }
.sp-num-field input { padding: 8px 10px; border: 1px solid var(--divider); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; }
.sp-cr-form { padding: 12px 0; }
@media (max-width: 1279px) { .sp-adm-grid { grid-template-columns: 340px minmax(0, 1fr); } .sp-rcol { display: none; } }
@media (max-width: 1100px) {
  .sp-adm-grid { grid-template-columns: 1fr; height: auto; }
  .sp-adm-grid[data-view="detail"] .sp-qcol { display: none; }
  .sp-adm-grid[data-view="list"] .sp-dcol { display: none; }
  .sp-back { display: inline-block; }
  .sp-detail { height: auto; min-height: 480px; }
}
@media (max-width: 640px) {
  .sp-canned { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 16px 16px 0 0; max-height: 70vh; }
  .sp-msg { max-width: 100%; }
  .sp-chips { flex-wrap: nowrap; overflow-x: auto; }
}
/* dark */
body[data-theme="dark"] .sp-badge-muted { background: #2A2A26; color: #B9B8B1; }
body[data-theme="dark"] .sp-tag { background: #1F1F1C; border-color: #2E2D29; color: #B9B8B1; }
body[data-theme="dark"] .sp-count { background: rgba(255, 255, 255, .12); }
body[data-theme="dark"] .sp-sel { background: #1B1B19; border-color: #2E2D29; color: var(--paper); }
body[data-theme="dark"] .sp-avatar { background: rgba(255, 90, 31, .22); color: #FFB899; }
body[data-theme="dark"] .sp-sla { background: #1B1B19; border-color: #2E2D29; }
body[data-theme="dark"] .sp-sla.is-warn { background: rgba(224, 160, 40, .16); color: #F0B84A; }
body[data-theme="dark"] .sp-sla.is-crit { background: rgba(217, 48, 37, .2); color: #FF8A80; }
body[data-theme="dark"] .sp-sla.is-good { background: rgba(46, 158, 107, .16); color: #6FD39E; }
body[data-theme="dark"] .sp-msg { background: #1B1B19; border-color: #2E2D29; }
body[data-theme="dark"] .sp-msg.is-me { background: rgba(255, 90, 31, .14); border-color: rgba(255, 90, 31, .35); }
body[data-theme="dark"] .sp-msg-head b { color: var(--paper); }
body[data-theme="dark"] .sp-note { background: rgba(224, 160, 40, .12); color: #F7E3B0; border-color: rgba(240, 184, 74, .55); }
body[data-theme="dark"] .sp-note-head { color: #F0B84A; }
body[data-theme="dark"] .sp-composer { background: #1B1B19; border-color: #2E2D29; }
body[data-theme="dark"] .sp-composer textarea { background: #131313; color: var(--paper); border-color: #2E2D29; }
body[data-theme="dark"] .sp-composer.is-note { background: rgba(224, 160, 40, .12); border-top-color: rgba(240, 184, 74, .6); }
body[data-theme="dark"] .sp-composer.is-note textarea { background: rgba(0, 0, 0, .35); border-color: rgba(240, 184, 74, .55); color: #F7E3B0; }
body[data-theme="dark"] .sp-btn-note { border-color: #F0B84A; color: #F0B84A; }
body[data-theme="dark"] .sp-canned { background: #1B1B19; border-color: #2E2D29; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
body[data-theme="dark"] .sp-canned-group { background: #131313; }
body[data-theme="dark"] mark.sp-missing { background: rgba(224, 160, 40, .25); color: #F0B84A; }
body[data-theme="dark"] .sp-num-field input { background: #131313; color: var(--paper); border-color: #2E2D29; }
body[data-theme="dark"] .sp-qrow.is-overdue:not(.is-active) { box-shadow: inset 3px 0 0 #FF8A80; }

/* ---- Support (tenant page) ---- */
.sp-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.sp-sub { color: var(--mono-muted); font-size: 14px; margin: 4px 0 0; }
.sp-list { margin: 0; padding: 0; list-style: none; }
.sp-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: start; padding: 14px 8px; border-bottom: 1px solid var(--divider); text-decoration: none; color: var(--ink); border-radius: 10px; }
.sp-list li:last-child .sp-row { border-bottom: none; }
.sp-row:hover, .sp-row:focus-visible { background: var(--accent-tint, rgba(255, 90, 31, .08)); }
.sp-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sp-row .sp-dot { background: transparent; margin-top: 7px; }
.sp-row.is-unread .sp-dot { background: var(--accent, #FF5A1F); }
.sp-row.is-unread .sp-row-title { font-weight: 700; }
.sp-row-title { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 4px; font-size: 12.5px; color: var(--mono-muted); }
.sp-row-preview { display: block; margin-top: 4px; font-size: 13px; color: var(--mono-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--mono-muted); }
.sp-empty { text-align: center; padding: 48px 16px; color: var(--mono-muted); list-style: none; }
.sp-empty h3 { color: var(--ink); margin: 12px 0 4px; font-size: 17px; }
.sp-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-seg input { position: absolute; opacity: 0; pointer-events: none; }
.sp-seg label { padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(18, 18, 18, .1); background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.sp-seg input:checked + label { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sp-seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.sp-textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--divider); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; resize: vertical; }
.sp-link { background: none; border: none; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }
.sp-err { padding: 10px 12px; border-radius: 10px; background: #FDECEC; color: #B3261E; font-size: 13px; margin-bottom: 12px; }
.sp-toast { position: fixed; right: 20px; bottom: 96px; z-index: 40; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 13px; box-shadow: 0 8px 28px rgba(0, 0, 0, .25); }
.sp-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 10px; }
@media (min-width: 1000px) { .sp-detail-grid { grid-template-columns: minmax(0, 1fr) 280px; } }
.sp-dhdr { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.sp-dtitle { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.sp-steps { display: flex; list-style: none; margin: 14px 0; padding: 0; }
.sp-step { flex: 1; position: relative; text-align: center; font-size: 12px; color: var(--mono-muted); padding-top: 20px; }
.sp-step::before { content: ""; position: absolute; top: 4px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--divider); background: var(--paper-2); }
.sp-step::after { content: ""; position: absolute; top: 9px; left: calc(50% + 10px); right: calc(-50% + 10px); height: 2px; background: var(--divider); }
.sp-step:last-child::after { display: none; }
.sp-step.is-done::before { background: var(--ink); border-color: var(--ink); }
.sp-step.is-done::after { background: var(--ink); }
.sp-step.is-current { color: var(--ink); font-weight: 700; }
.sp-step.is-current::before { background: var(--accent, #FF5A1F); border-color: var(--accent, #FF5A1F); }
.sp-step.is-attn.is-current::before { background: #9D174D; border-color: #9D174D; }
.sp-thread { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.sp-banner { padding: 12px 14px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--divider); font-size: 13.5px; margin: 8px 0; }
.sp-banner.is-attn { background: #FCE4EC; color: #9D174D; border-color: #F4B6CB; }
.sp-banner.is-good { background: #E1F3E7; color: #17703A; border-color: #B5DFC4; }
.sp-tcomposer { margin-top: 8px; }
.sp-rail { align-self: start; }
@media (max-width: 640px) {
  .sp-row { grid-template-columns: 10px 1fr; }
  .sp-row-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
  .sp-textarea, .sp-sel, #sp-view-new input[type=text] { font-size: 16px; }
  .sp-seg label { min-height: 44px; display: inline-flex; align-items: center; }
}
body[data-theme="dark"] .sp-row { color: var(--paper); }
body[data-theme="dark"] .sp-empty h3 { color: var(--paper); }
body[data-theme="dark"] .sp-seg label { background: #1F1F1C; border-color: #2E2D29; color: var(--paper); }
body[data-theme="dark"] .sp-seg input:checked + label { background: var(--paper); color: var(--ink); border-color: var(--paper); }
body[data-theme="dark"] .sp-textarea { background: #131313; color: var(--paper); border-color: #2E2D29; }
body[data-theme="dark"] .sp-link { color: var(--paper); }
body[data-theme="dark"] .sp-err { background: rgba(217, 48, 37, .2); color: #FF8A80; }
body[data-theme="dark"] .sp-toast { background: var(--paper); color: var(--ink); }
body[data-theme="dark"] .sp-step::before { background: #1F1F1C; border-color: #3A3935; }
body[data-theme="dark"] .sp-step::after { background: #3A3935; }
body[data-theme="dark"] .sp-step.is-done::before, body[data-theme="dark"] .sp-step.is-done::after { background: var(--paper); border-color: var(--paper); }
body[data-theme="dark"] .sp-step.is-current { color: var(--paper); }
body[data-theme="dark"] .sp-banner { background: #1B1B19; border-color: #2E2D29; }
body[data-theme="dark"] .sp-banner.is-attn { background: rgba(236, 72, 153, .16); color: #F9A8D4; border-color: rgba(236, 72, 153, .35); }
body[data-theme="dark"] .sp-banner.is-good { background: rgba(46, 158, 107, .16); color: #6FD39E; border-color: rgba(46, 158, 107, .35); }

/* ---- Support: hunter fixes ---- */
.sp-adm-grid { height: calc(100vh - 220px); min-height: 680px; }
.sp-detail { overflow: hidden; }
.sp-athread { min-height: 260px; }
.sp-composer textarea { min-height: 64px; }
@media (min-width: 641px) { .sp-composer-tools { flex-wrap: nowrap; } }
.sp-dtitle .sp-back { display: none; flex: none; white-space: nowrap; }
@media (max-width: 1100px) { .sp-dtitle .sp-back { display: inline-block; } .sp-adm-grid { height: auto; min-height: 0; } }
.sp-dtitle .sp-num, .sp-dsubj .sp-num { white-space: nowrap; flex: none; }
.ce-kv-row a { color: inherit; text-decoration: underline; }
.book-field .sp-seg input:checked + label { color: var(--paper); }
.sp-row { grid-template-columns: 10px minmax(0, 1fr) auto; border-radius: 0; }
.sp-row:hover, .sp-row:focus-visible { border-radius: 10px; }
#sp-f-search { min-width: 300px; max-width: none; }
@media (max-width: 640px) { .sp-row { grid-template-columns: 10px minmax(0, 1fr); } #sp-f-search { min-width: 0; width: 100%; } }
body[data-theme="dark"] .sp-row,
body[data-theme="dark"] .sp-set-team,
body[data-theme="dark"] .sp-dhead,
body[data-theme="dark"] .sp-canned-top,
body[data-theme="dark"] .sp-canned-prev,
body[data-theme="dark"] .sp-canned-foot,
body[data-theme="dark"] .sp-canned-group { border-color: #2E2D29; }
body[data-theme="dark"] .sp-step.is-current::before { background: var(--accent, #FF5A1F); border-color: var(--accent, #FF5A1F); }
body[data-theme="dark"] .sp-step.is-attn.is-current::before { background: #F472B6; border-color: #F472B6; }
body[data-theme="dark"] .book-field .sp-seg input:checked + label { color: var(--ink); }

/* ---- Support admin v2: compact, readable layout ---- */
#panel-support-tickets > .analytics-tabbar { margin-bottom: 10px; }
#panel-support-tickets > .analytics-tabbar .analytics-tab-btn { padding: 6px 16px; font-size: 13px; }
.sp-topbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.sp-kinds { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--divider); }
.sp-kind-btn { border: none; background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.sp-kind-btn.is-active { background: var(--ink); color: var(--paper); }
.sp-kcount { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(18, 18, 18, .1); }
.sp-kind-btn.is-active .sp-kcount { background: rgba(255, 255, 255, .22); }
.sp-chips { gap: 4px; flex-wrap: wrap; }
.sp-chip { border: 1px solid transparent; background: transparent; color: var(--mono-muted); font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.sp-chip:hover { background: var(--paper-2); color: var(--ink); }
.sp-chip.is-active { background: var(--paper-2); border-color: var(--divider); color: var(--ink); }
.sp-chip-n { font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 999px; background: #FFF1D6; color: #7A4F00; }
.sp-chip-n.is-crit { background: #B3261E; color: #fff; }
.sp-adm-filters { gap: 8px; margin: 6px 0 12px; }
.sp-adm-filters .sp-sel, .sp-adm-filters .inbox-search-input { height: 34px; padding: 0 10px; font-size: 12.5px; box-sizing: border-box; border-radius: 10px; }
.sp-adm-filters .inbox-search-input { flex: 1; min-width: 200px; max-width: 360px; }
#sp-f-search { min-width: 200px; }
.sp-adm-grid { grid-template-columns: 340px minmax(0, 1fr) 280px; gap: 14px; height: calc(100vh - 250px); min-height: 600px; }
.sp-qcol { overflow: hidden; }
.sp-qrow { padding: 12px 14px; }
.sp-q-l1 { gap: 6px; }
.sp-kind-ico { font-size: 13px; line-height: 1; flex: none; }
.sp-q-subject { font-weight: 600; }
.sp-dcol { overflow: hidden; }
.sp-dhead { padding: 14px 16px 10px; background: var(--paper); }
.sp-dtop { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.sp-dtitlewrap { flex: 1; min-width: 200px; }
.sp-dsubj { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sp-dsubj-text { overflow-wrap: anywhere; }
.sp-dmeta { font-size: 12.5px; color: var(--mono-muted); margin-top: 3px; }
.sp-dmeta a { color: inherit; text-decoration: underline; }
.sp-dbadges { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-props { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px 10px; margin-top: 12px; }
.sp-props label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sp-props .sp-sel { width: 100%; height: 34px; padding: 0 8px; font-size: 12.5px; }
.sp-dactions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sp-btn-ghost { background: transparent; border: 1px solid var(--divider); color: var(--ink); border-radius: 999px; padding: 5px 13px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.sp-btn-ghost:hover { background: var(--paper-2); }
.sp-athread { padding: 16px 18px; gap: 10px; background: var(--paper-2); }
.sp-msg { background: var(--paper); }
.sp-msg.is-me { background: var(--accent-tint, rgba(255, 90, 31, .10)); }
.sp-msg.is-first { background: var(--paper); border-style: dashed; }
.sp-composer { padding: 10px 14px 12px; background: var(--paper); }
.sp-ctabs { display: flex; gap: 4px; margin-bottom: 8px; }
.sp-ctab { border: none; background: transparent; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--mono-muted); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.sp-ctab.is-active { background: var(--paper-2); color: var(--ink); }
.sp-composer.is-note .sp-ctab.is-active { background: rgba(217, 166, 35, .25); color: #7A4F00; }
.sp-newtk { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--divider); background: var(--paper-2); max-height: 60%; overflow-y: auto; }
.sp-newtk-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sp-newtk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sp-newtk-grid label { display: flex; flex-direction: column; gap: 3px; }
.sp-nt-wide { grid-column: 1 / -1; }
.sp-newtk-grid input[type=text] { height: 34px; padding: 0 10px; border: 1px solid var(--divider); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; }
.sp-newtk-foot { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.sp-rcol .billing-card { padding: 14px 16px; }
@media (max-width: 1279px) { .sp-adm-grid { grid-template-columns: 330px minmax(0, 1fr); } }
@media (max-width: 1100px) { .sp-adm-grid { grid-template-columns: 1fr; height: auto; min-height: 0; } .sp-dtop .sp-back { display: inline-block; } }
.sp-dtop .sp-back { display: none; flex: none; }
@media (max-width: 1100px) { .sp-dtop .sp-back { display: inline-block; } }
body[data-theme="dark"] .sp-kinds { background: #1B1B19; border-color: #2E2D29; }
body[data-theme="dark"] .sp-kind-btn { color: var(--paper); }
body[data-theme="dark"] .sp-kind-btn.is-active { background: var(--paper); color: var(--ink); }
body[data-theme="dark"] .sp-kcount { background: rgba(255, 255, 255, .14); }
body[data-theme="dark"] .sp-kind-btn.is-active .sp-kcount { background: rgba(0, 0, 0, .18); }
body[data-theme="dark"] .sp-chip:hover, body[data-theme="dark"] .sp-chip.is-active { background: #1B1B19; color: var(--paper); }
body[data-theme="dark"] .sp-chip.is-active { border-color: #2E2D29; }
body[data-theme="dark"] .sp-chip-n { background: rgba(224, 160, 40, .2); color: #F0B84A; }
body[data-theme="dark"] .sp-btn-ghost { border-color: #2E2D29; color: var(--paper); }
body[data-theme="dark"] .sp-btn-ghost:hover { background: #1B1B19; }
body[data-theme="dark"] .sp-dhead, body[data-theme="dark"] .sp-composer { background: #1B1B19; }
body[data-theme="dark"] .sp-athread { background: #131313; }
body[data-theme="dark"] .sp-msg, body[data-theme="dark"] .sp-msg.is-first { background: #1B1B19; border-color: #2E2D29; }
body[data-theme="dark"] .sp-msg.is-me { background: rgba(255, 90, 31, .14); border-color: rgba(255, 90, 31, .35); }
body[data-theme="dark"] .sp-ctab.is-active { background: #131313; color: var(--paper); }
body[data-theme="dark"] .sp-composer.is-note .sp-ctab.is-active { background: rgba(224, 160, 40, .22); color: #F0B84A; }
body[data-theme="dark"] .sp-newtk { background: #1B1B19; border-color: #2E2D29; }
body[data-theme="dark"] .sp-newtk-grid input[type=text] { background: #131313; color: var(--paper); border-color: #2E2D29; }
body[data-theme="dark"] .sp-dmeta a { color: inherit; }

/* ---- Support admin v2: QA fixes ---- */
.sp-newtk { flex: 1 1 auto; min-height: 0; max-height: none; }
.sp-detail:has(.sp-newtk:not([hidden])) .sp-composer { display: none; }
.sp-detail:has(.sp-newtk:not([hidden])) .sp-athread { flex: 0 0 130px; min-height: 0; }
.sp-newtk textarea { width: 100%; box-sizing: border-box; }
.sp-adm-grid { height: auto; min-height: 420px; max-height: calc(100vh - 250px); align-items: start; }
.sp-adm-grid .sp-qcol, .sp-adm-grid .sp-dcol { max-height: calc(100vh - 250px); }
.sp-adm-grid .sp-dcol { min-height: 420px; }
.sp-rcol:empty { display: none; }
.sp-chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
body[data-theme="dark"] .sp-chip.is-active { background: var(--paper); color: var(--ink); border-color: var(--paper); }
@media (max-width: 1100px) { .sp-adm-grid { max-height: none; } .sp-adm-grid .sp-qcol, .sp-adm-grid .sp-dcol { max-height: none; } }

/* ---- Support admin v3: right-hand slide-over (same pattern as the AI lead score panel) ---- */
.sp-adm-grid { display: block; height: auto; min-height: 0; max-height: none; }
.sp-adm-grid .sp-qcol { max-height: none; }
.sp-adm-grid .sp-qlist { overflow: visible; }
.sp-drawer-overlay { justify-content: flex-end; align-items: stretch; }
.sp-drawer { width: min(680px, 100vw); height: 100%; background: var(--paper); box-shadow: -12px 0 44px rgba(0, 0, 0, .28); display: flex; flex-direction: column; overflow: hidden; }
.sp-drawer #sp-detail { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.sp-drawer .sp-detail { height: 100%; }
.sp-drawer .sp-dhead { padding-top: 16px; }
.sp-close { order: 3; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--divider); background: transparent; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.sp-close:hover { background: var(--paper-2); }
.sp-dtop .sp-dbadges { order: 2; }
.sp-ctx { border-bottom: 1px solid var(--divider); padding: 0 16px; flex: none; }
.sp-ctx summary { cursor: pointer; font-size: 12.5px; font-weight: 700; padding: 9px 0; color: var(--mono-muted); list-style-position: inside; }
.sp-ctx[open] summary { color: var(--ink); }
.sp-ctx .sp-rcol { display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; max-height: 260px; overflow-y: auto; }
.sp-ctx .sp-rcol:empty { display: none; }
.sp-drawer .sp-athread { flex: 1 1 auto; min-height: 0; }
.sp-drawer .sp-newtk { flex: 1 1 auto; max-height: none; }
@media (max-width: 640px) { .sp-drawer { width: 100vw; } }
body[data-theme="dark"] .sp-drawer { background: #171715; box-shadow: -12px 0 44px rgba(0, 0, 0, .6); }
body[data-theme="dark"] .sp-close { border-color: #2E2D29; color: var(--paper); }
body[data-theme="dark"] .sp-close:hover { background: #232320; }
body[data-theme="dark"] .sp-ctx { border-color: #2E2D29; }
body[data-theme="dark"] .sp-ctx[open] summary { color: var(--paper); }
body[data-theme="dark"] .sp-drawer .sp-dhead, body[data-theme="dark"] .sp-drawer .sp-composer { background: #1B1B19; }

/* ---- Support admin v4: conversation drawer (top / action bar / tabs / body) ---- */
.sp-drawer { color: var(--ink); width: min(620px, 100vw); }
body[data-theme="dark"] .sp-drawer { color: var(--paper); }
.sp-drawer #sp-detail { height: 100%; }
.spd { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.spd-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--divider); flex: none; }
.spd-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-tint, rgba(255, 90, 31, .12)); display: grid; place-items: center; font-size: 17px; flex: none; }
.spd-titlewrap { flex: 1; min-width: 0; }
.spd-title { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spd-sub { font-size: 12.5px; color: var(--mono-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.spd-badges { display: flex; gap: 6px; flex: none; }
.spd-top .sp-close { order: 0; }
.spd-bar { display: flex; align-items: flex-end; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--divider); flex: none; flex-wrap: wrap; background: var(--paper-2); }
.spd-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.spd-flabel { font: 700 10px 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--mono-muted); display: block; margin-bottom: 3px; }
.spd-bar .sp-sel { height: 34px; padding: 0 8px; font-size: 13px; min-width: 150px; max-width: 200px; }
.spd-bar .sp-btn-ghost, .spd-bar .btn-dark { height: 34px; }
.spd-spacer { flex: 1; }
.spd-saved { margin: 0 0 8px; font-size: 12px; min-width: 60px; }
.spd-tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--divider); flex: none; }
.spd-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 12px; font: inherit; font-size: 13px; font-weight: 700; color: var(--mono-muted); cursor: pointer; }
.spd-tab:hover { color: var(--ink); }
.spd-tab.is-active { color: var(--ink); border-bottom-color: var(--accent, #FF5A1F); }
.spd-body { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.spd-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.spd-pane[hidden], .spd-sheet[hidden] { display: none; }
.spd-pane .sp-athread { flex: 1 1 auto; min-height: 0; overflow-y: auto; background: var(--paper-2); padding: 16px; }
.spd-pane .sp-composer { flex: none; }
.spd-details { overflow-y: auto; padding: 16px; gap: 14px; background: var(--paper-2); }
.spd-card { background: var(--paper); border: 1px solid var(--divider); border-radius: 14px; padding: 14px 16px; }
.spd-card-title { font: 700 11px 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .07em; color: var(--mono-muted); margin-bottom: 10px; }
.spd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 12px; }
.spd-grid label, .spd-wide { display: flex; flex-direction: column; }
.spd-grid .sp-sel, .spd-wide input[type=text] { width: 100%; height: 36px; padding: 0 10px; box-sizing: border-box; }
.spd-wide { margin-bottom: 12px; }
.spd-wide input[type=text] { border: 1px solid var(--divider); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13.5px; }
.spd-wide textarea { width: 100%; box-sizing: border-box; }
.spd-link { margin: 10px 0 0; font-size: 12.5px; }
.spd-link a, .spd-card a { color: inherit; text-decoration: underline; }
.spd-sheet { position: absolute; inset: 0; z-index: 6; background: var(--paper); display: flex; flex-direction: column; }
.spd-sheet-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--divider); flex: none; }
.spd-sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; }
.spd-sheet-body .spd-grid { margin-bottom: 12px; }
.spd-sheet-foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--divider); flex: none; }
.spd .sp-composer { padding: 8px 14px 12px; }
.spd .sp-composer textarea { min-height: 56px; }
.spd .sp-composer-tools { margin-top: 6px; }
.sp-adm-grid .sp-qcol { border-radius: 16px; }
.sp-adm-grid .sp-qlist { min-height: 0; }
body[data-theme="dark"] .spd-top, body[data-theme="dark"] .spd-bar, body[data-theme="dark"] .spd-tabs, body[data-theme="dark"] .spd-card,
body[data-theme="dark"] .spd-sheet-head, body[data-theme="dark"] .spd-sheet-foot { border-color: #2E2D29; }
body[data-theme="dark"] .spd-bar { background: #1B1B19; }
body[data-theme="dark"] .spd-tab:hover, body[data-theme="dark"] .spd-tab.is-active { color: var(--paper); }
body[data-theme="dark"] .spd-pane .sp-athread, body[data-theme="dark"] .spd-details { background: #131313; }
body[data-theme="dark"] .spd-card, body[data-theme="dark"] .spd-sheet { background: #1B1B19; }
body[data-theme="dark"] .spd-wide input[type=text] { background: #131313; color: var(--paper); border-color: #2E2D29; }
body[data-theme="dark"] .spd-ico { background: rgba(255, 90, 31, .18); }
@media (max-width: 640px) { .spd-bar .sp-sel { min-width: 130px; } .spd-badges { display: none; } }

/* ---- Support drawer: QA fixes ---- */
.spd .sp-composer { position: relative; }
.spd-saved:empty { display: none; }
.spd-bar .btn-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
body[data-theme="dark"] .spd-bar .btn-dark { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.spd-sheet-body textarea { min-height: 220px; }
.spd-sheet-body .book-note { font-family: inherit; text-transform: none; letter-spacing: normal; }

/* Create-ticket sheet takes over the drawer below the header: no duplicate assignee control */
.spd:has(.spd-sheet:not([hidden])) .spd-bar,
.spd:has(.spd-sheet:not([hidden])) .spd-tabs { display: none; }

/* ---- Admin staff and roles ---- */
.stf-card { margin-bottom: 16px; max-width: 1100px; }
.stf-lead { margin: 0 0 10px; font-size: 14px; }
.stf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stf-chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--divider); color: var(--ink); white-space: nowrap; }
.stf-mini .stf-chip { font-size: 11px; padding: 2px 8px; }
.stf-add { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.stf-field { display: flex; flex-direction: column; min-width: 0; }
.stf-field input, .stf-edit-box input[type=text] { height: 36px; padding: 0 10px; border: 1px solid var(--divider); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13.5px; min-width: 240px; box-sizing: border-box; }
.stf-field .sp-sel { height: 36px; min-width: 200px; }
.stf-wide { grid-column: 1 / -1; }
.stf-wide input { width: 100%; }
.stf-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 14px; }
.stf-role-card { border: 1px solid var(--divider); border-radius: 14px; padding: 14px 16px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; }
.stf-role-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.stf-role-actions { display: flex; gap: 6px; flex: none; }
.stf-edit-box { margin-top: 14px; padding: 16px; border: 1px dashed var(--divider); border-radius: 14px; background: var(--paper-2); }
.stf-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.stf-perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.stf-perm { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--divider); border-radius: 10px; background: var(--paper); cursor: pointer; }
.stf-perm small { display: block; color: var(--mono-muted); font-size: 11.5px; margin-top: 1px; }
.stf-perm input { margin-top: 3px; }
body[data-theme="dark"] .stf-chip { background: #1B1B19; border-color: #2E2D29; color: var(--paper); }
body[data-theme="dark"] .stf-role-card, body[data-theme="dark"] .stf-perm { background: #1B1B19; border-color: #2E2D29; }
body[data-theme="dark"] .stf-edit-box { background: #171715; border-color: #3A3935; }
body[data-theme="dark"] .stf-field input, body[data-theme="dark"] .stf-edit-box input[type=text] { background: #131313; color: var(--paper); border-color: #2E2D29; }

/* ---- Staff and roles: QA fixes ---- */
.stf-perm input[type=checkbox] { accent-color: var(--accent, #FF5A1F); width: 16px; height: 16px; flex: none; }
body[data-theme="dark"] .stf-perm input[type=checkbox] { color-scheme: dark; }
.stf-roles { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.stf-perm-grid { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.stf-field input, .stf-edit-box input[type=text] { min-width: 0; width: 100%; }
.stf-add .stf-field { flex: 1 1 220px; }
.stf-edit-box input:disabled { opacity: .6; cursor: not-allowed; }
.stf-card .admin-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) { .stf-card .admin-table th:nth-child(4), .stf-card .admin-table td:nth-child(4) { display: none; } }

/* ---- Admin team chat ---- */
.tc-app { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: calc(100vh - 150px); min-height: 520px; border: 1px solid var(--divider); border-radius: 16px; overflow: hidden; background: var(--paper); }
.tc-side { border-right: 1px solid var(--divider); display: flex; flex-direction: column; min-height: 0; background: var(--paper-2); }
.tc-side-top { padding: 12px 12px 6px; }
.tc-side-top input, .tc-pop-search { width: 100%; box-sizing: border-box; height: 34px; padding: 0 12px; border: 1px solid var(--divider); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; }
.tc-side-scroll { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.tc-group { display: flex; justify-content: space-between; align-items: center; margin: 14px 6px 4px; font: 700 10.5px 'IBM Plex Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--mono-muted); }
.tc-group-actions { display: inline-flex; gap: 4px; }
.tc-mini { background: transparent; border: 1px solid var(--divider); border-radius: 8px; padding: 1px 8px; font: inherit; font-size: 12px; font-weight: 700; color: var(--ink); cursor: pointer; line-height: 1.5; }
.tc-mini:hover { background: var(--paper); }
.tc-chan { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: none; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.tc-chan:hover { background: var(--paper); }
.tc-chan.is-active { background: var(--ink); color: var(--paper); }
.tc-chan.is-unread .tc-chan-name { font-weight: 800; }
.tc-chan.is-muted { opacity: .6; }
.tc-chan-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-hash { width: 22px; text-align: center; font-weight: 800; color: var(--mono-muted); flex: none; }
.tc-chan.is-active .tc-hash { color: var(--paper); }
.tc-hash-lg { font-size: 22px; width: 32px; }
.tc-avatar { width: 26px; height: 26px; border-radius: 50%; background: #FFE9DE; color: #B93D08; font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tc-avatar-lg { width: 36px; height: 36px; font-size: 13px; }
.tc-badge { min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--accent, #FF5A1F); color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.tc-badge.is-mention { background: #B3261E; }
.tc-empty-side { margin: 6px 8px; font-size: 12.5px; color: var(--mono-muted); }
.tc-result { display: block; width: 100%; text-align: left; border: none; background: transparent; padding: 8px; border-radius: 10px; cursor: pointer; font: inherit; color: var(--ink); }
.tc-result:hover { background: var(--paper); }
.tc-result span { display: block; font-size: 12.5px; color: var(--mono-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-result em { font-size: 11px; color: var(--mono-muted); font-style: normal; }
.tc-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.tc-welcome { margin: auto; text-align: center; max-width: 380px; padding: 24px; color: var(--mono-muted); }
.tc-welcome-ico { font-size: 38px; }
.tc-welcome h3 { margin: 8px 0 6px; color: var(--ink); }
.tc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--divider); flex: none; }
.tc-head-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tc-title { font-size: 16px; font-weight: 800; }
.tc-sub { font-size: 12.5px; color: var(--mono-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.tc-head-actions { display: flex; gap: 6px; flex: none; }
.tc-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 18px; background: var(--paper); }
.tc-more { text-align: center; margin: 4px 0 10px; }
.tc-start { text-align: center; padding: 30px 10px; color: var(--mono-muted); }
.tc-start strong { color: var(--ink); }
.tc-day { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; font-size: 11.5px; color: var(--mono-muted); }
.tc-day::before, .tc-day::after, .tc-newline::before, .tc-newline::after { content: ""; flex: 1; height: 1px; background: var(--divider); }
.tc-newline { display: flex; align-items: center; gap: 10px; margin: 8px 0; font: 700 10.5px 'IBM Plex Mono', monospace; text-transform: uppercase; color: #B3261E; }
.tc-newline::before, .tc-newline::after { background: #B3261E; opacity: .5; }
.tc-msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 3px 6px; border-radius: 10px; position: relative; align-items: start; }
.tc-msg:hover { background: var(--paper-2); }
.tc-msg .tc-avatar { width: 32px; height: 32px; font-size: 11.5px; margin-top: 2px; }
.tc-msg.is-mine .tc-avatar { background: var(--ink); color: var(--paper); }
.tc-gutter { font-size: 10px; color: transparent; text-align: center; padding-top: 4px; font-family: 'IBM Plex Mono', monospace; }
.tc-msg:hover .tc-gutter { color: var(--mono-muted); }
.tc-meta { display: flex; gap: 8px; align-items: baseline; }
.tc-meta strong { font-size: 13.5px; }
.tc-meta span { font-size: 11.5px; color: var(--mono-muted); }
.tc-text { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.tc-edited { font-size: 11px; color: var(--mono-muted); }
.tc-deleted { color: var(--mono-muted); }
.tc-quote { margin: 2px 0 4px; padding: 3px 10px; border-left: 3px solid var(--divider); color: var(--mono-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-actions { position: absolute; right: 8px; top: -12px; display: none; gap: 2px; background: var(--paper); border: 1px solid var(--divider); border-radius: 10px; padding: 2px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.tc-msg:hover .tc-actions, .tc-msg:focus-within .tc-actions { display: flex; }
.tc-actions button { background: transparent; border: none; border-radius: 8px; padding: 3px 9px; font: inherit; font-size: 12px; font-weight: 700; color: var(--ink); cursor: pointer; }
.tc-actions button:hover { background: var(--paper-2); }
.tc-chip { display: inline-block; padding: 0 7px; border-radius: 7px; font-size: 13px; font-weight: 700; text-decoration: none; border: none; cursor: pointer; font-family: inherit; line-height: 1.5; vertical-align: baseline; background: #E6EEF8; color: #1F4E8C; }
.tc-chip.tc-user { background: #FFE9DE; color: #B93D08; }
.tc-chip.tc-user.is-me { background: #FFD3BD; box-shadow: 0 0 0 1px #FF8A5B; }
.tc-chip.tc-team { background: #EDE7F6; color: #4A2C8A; }
.tc-chip.tc-ticket { background: #FFF1D6; color: #7A4F00; }
.tc-chip.tc-campaign { background: #E1F3E7; color: #17703A; }
.tc-chip.tc-registration { background: #FCE4EC; color: #9D174D; }
.tc-chip.tc-disposition { background: #E0F2F1; color: #00695C; }
.tc-chip.tc-alert { background: #FDECEC; color: #B3261E; }
.tc-chip.is-locked { cursor: default; opacity: .75; }
a.tc-chip:hover, button.tc-chip:hover { filter: brightness(.95); text-decoration: underline; }
.tc-compose { border-top: 1px solid var(--divider); padding: 10px 14px 12px; position: relative; flex: none; background: var(--paper); }
.tc-compose textarea { width: 100%; box-sizing: border-box; min-height: 56px; padding: 10px 12px; border: 1px solid var(--divider); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; resize: none; }
.tc-compose textarea:focus-visible, .tc-side-top input:focus-visible { outline: 2px solid var(--accent, #FF5A1F); outline-offset: 1px; }
.tc-tools { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tc-spacer { flex: 1; }
.tc-replybar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; padding: 6px 10px; border-radius: 10px; background: var(--paper-2); font-size: 12.5px; }
.tc-pop { position: absolute; left: 14px; right: 14px; bottom: 100%; margin-bottom: 6px; z-index: 20; background: var(--paper); border: 1px solid var(--divider); border-radius: 14px; box-shadow: 0 12px 40px rgba(16, 16, 32, .2); overflow: hidden; max-height: 340px; display: flex; flex-direction: column; }
.tc-pop[hidden] { display: none; }
.tc-pop-kinds { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px 10px; border-bottom: 1px solid var(--divider); }
.tc-pk { border: 1px solid transparent; background: transparent; border-radius: 999px; padding: 3px 11px; font: inherit; font-size: 12px; font-weight: 700; color: var(--mono-muted); cursor: pointer; }
.tc-pk.is-active { background: var(--ink); color: var(--paper); }
.tc-pop .tc-pop-search { margin: 8px 10px 0; width: calc(100% - 20px); }
.tc-pop-list { overflow-y: auto; padding: 6px; }
.tc-pop-item, .tc-sp-item { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; padding: 7px 10px; border: none; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.tc-pop-item:hover, .tc-pop-item.is-sel, .tc-sp-item:hover { background: var(--accent-tint, rgba(255, 90, 31, .12)); }
.tc-pop-label { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-pop-sub { font-size: 12px; color: var(--mono-muted); }
.tc-pop-empty { margin: 8px 10px; font-size: 12.5px; color: var(--mono-muted); }
.tc-modal-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .4); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tc-modal { width: min(460px, 100%); max-height: 86vh; background: var(--paper); color: var(--ink); border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); display: flex; flex-direction: column; overflow: hidden; }
.tc-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--divider); }
.tc-modal-body { padding: 16px 18px 18px; overflow-y: auto; }
.tc-f { display: flex; flex-direction: column; margin-bottom: 10px; }
.tc-f input[type=text] { height: 36px; padding: 0 10px; border: 1px solid var(--divider); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; }
.tc-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 4px 0; cursor: pointer; }
.tc-check small { color: var(--mono-muted); }
.tc-sp-list { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; max-height: 280px; overflow-y: auto; }
.tc-sp-item { flex-direction: row; align-items: center; gap: 10px; }
.tc-sp-item small, .tc-br-row small { display: block; color: var(--mono-muted); font-size: 12px; }
.tc-br-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--divider); }
.admin-tab.has-mention .ce-sidebar-label { color: #FF5A1F; font-weight: 800; }
@media (max-width: 800px) {
  .tc-app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 130px); }
  .tc-side { max-height: 170px; border-right: none; border-bottom: 1px solid var(--divider); }
  .tc-sub { max-width: 60vw; }
  .tc-actions { right: 2px; }
}
body[data-theme="dark"] .tc-app, body[data-theme="dark"] .tc-msgs, body[data-theme="dark"] .tc-compose, body[data-theme="dark"] .tc-modal, body[data-theme="dark"] .tc-pop { background: #171715; color: var(--paper); }
body[data-theme="dark"] .tc-side, body[data-theme="dark"] .tc-msg:hover, body[data-theme="dark"] .tc-replybar { background: #1B1B19; }
body[data-theme="dark"] .tc-app, body[data-theme="dark"] .tc-side, body[data-theme="dark"] .tc-head, body[data-theme="dark"] .tc-compose, body[data-theme="dark"] .tc-pop, body[data-theme="dark"] .tc-pop-kinds,
body[data-theme="dark"] .tc-modal-head, body[data-theme="dark"] .tc-br-row, body[data-theme="dark"] .tc-actions, body[data-theme="dark"] .tc-mini { border-color: #2E2D29; }
body[data-theme="dark"] .tc-side-top input, body[data-theme="dark"] .tc-pop-search, body[data-theme="dark"] .tc-f input[type=text], body[data-theme="dark"] .tc-compose textarea { background: #131313; color: var(--paper); border-color: #2E2D29; }
body[data-theme="dark"] .tc-chan, body[data-theme="dark"] .tc-result, body[data-theme="dark"] .tc-pop-item, body[data-theme="dark"] .tc-sp-item, body[data-theme="dark"] .tc-mini, body[data-theme="dark"] .tc-actions button { color: var(--paper); }
body[data-theme="dark"] .tc-chan:hover, body[data-theme="dark"] .tc-result:hover, body[data-theme="dark"] .tc-mini:hover, body[data-theme="dark"] .tc-actions button:hover { background: #232320; }
body[data-theme="dark"] .tc-chan.is-active { background: var(--paper); color: var(--ink); }
body[data-theme="dark"] .tc-chan.is-active .tc-hash { color: var(--ink); }
body[data-theme="dark"] .tc-actions { background: #1B1B19; }
body[data-theme="dark"] .tc-avatar { background: rgba(255, 90, 31, .22); color: #FFB899; }
body[data-theme="dark"] .tc-msg.is-mine .tc-avatar { background: var(--paper); color: var(--ink); }
body[data-theme="dark"] .tc-pk.is-active { background: var(--paper); color: var(--ink); }
body[data-theme="dark"] .tc-welcome h3, body[data-theme="dark"] .tc-start strong { color: var(--paper); }
body[data-theme="dark"] .tc-chip { background: rgba(31, 78, 140, .35); color: #A9C8F2; }
body[data-theme="dark"] .tc-chip.tc-user { background: rgba(255, 90, 31, .22); color: #FFB899; }
body[data-theme="dark"] .tc-chip.tc-user.is-me { background: rgba(255, 90, 31, .4); box-shadow: 0 0 0 1px #FF8A5B; }
body[data-theme="dark"] .tc-chip.tc-team { background: rgba(124, 77, 255, .25); color: #CDB8FF; }
body[data-theme="dark"] .tc-chip.tc-ticket { background: rgba(224, 160, 40, .22); color: #F0B84A; }
body[data-theme="dark"] .tc-chip.tc-campaign { background: rgba(46, 158, 107, .22); color: #6FD39E; }
body[data-theme="dark"] .tc-chip.tc-registration { background: rgba(236, 72, 153, .22); color: #F9A8D4; }
body[data-theme="dark"] .tc-chip.tc-disposition { background: rgba(0, 150, 136, .25); color: #7FD6CC; }
body[data-theme="dark"] .tc-chip.tc-alert { background: rgba(217, 48, 37, .25); color: #FF8A80; }

/* ---- Admin sidebar: compact so every item fits without scrolling ---- */
#admin-sidebar { padding: 10px 8px; }
#admin-sidebar .ce-sidebar-scroll { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
#admin-sidebar .ce-sidebar-scroll::-webkit-scrollbar { display: none; }
#admin-sidebar .ce-sidebar-link {
  flex: none; justify-content: center; padding: 0;
  /* 18 slots is the most items any role can see; shrink with the window, never grow past 36px */
  height: clamp(26px, calc((100vh - 84px) / 17), 38px);
  border-radius: 10px;
}
#admin-sidebar .ce-sidebar-link svg { width: 19px; height: 19px; }
#admin-sidebar .ce-sidebar-link.is-active { transform: none; box-shadow: 0 4px 12px -4px rgba(var(--accent-rgb), .45); }

/* ---- Team chat: one-box tag picker + QA fixes ---- */
.tc-pop { max-height: 320px; }
.tc-pop-item { flex-direction: row; align-items: center; gap: 10px; }
.tc-pop-kind { flex: none; min-width: 86px; text-align: center; font: 700 10.5px 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 7px; background: #E6EEF8; color: #1F4E8C; }
.tc-pop-kind.tc-user { background: #FFE9DE; color: #B93D08; }
.tc-pop-kind.tc-team { background: #EDE7F6; color: #4A2C8A; }
.tc-pop-kind.tc-ticket { background: #FFF1D6; color: #7A4F00; }
.tc-pop-kind.tc-campaign { background: #E1F3E7; color: #17703A; }
.tc-pop-kind.tc-registration { background: #FCE4EC; color: #9D174D; }
.tc-pop-kind.tc-disposition { background: #E0F2F1; color: #00695C; }
.tc-pop-kind.tc-alert { background: #FDECEC; color: #B3261E; }
.tc-pop-main { display: flex; flex-direction: column; min-width: 0; }
.tc-pop-main .tc-pop-label, .tc-pop-main .tc-pop-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-pop-search:focus-visible, .tc-f input:focus-visible { outline: 2px solid var(--accent, #FF5A1F); outline-offset: 1px; }
.tc-compose .btn-dark, .tc-modal .btn-dark, .tc-welcome .btn-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); backdrop-filter: none; }
.tc-head-title { flex: 1; min-width: 0; }
.tc-head-title > div { min-width: 0; }
.tc-title { line-height: 1.25; }
.tc-chip.is-locked { opacity: .85; outline: 1px dashed currentColor; outline-offset: -1px; }
.tc-quote { border-left-color: rgba(120, 118, 110, .5); }
.tc-chan.is-muted.is-unread .tc-chan-name { font-weight: inherit; }
@media (max-width: 800px) {
  .tc-app { grid-template-columns: minmax(0, 1fr); }
  .tc-sub { max-width: none; }
  .tc-side { max-height: 30vh; }
  .tc-compose textarea { min-height: 48px; }
  .tc-tools .sp-btn-ghost { padding: 4px 10px; }
  .tc-pop-kind { min-width: 70px; }
}
@media (hover: none) {
  .tc-actions { display: flex; position: static; margin-top: 4px; box-shadow: none; border: none; padding: 0; background: transparent; grid-column: 2; }
}
body[data-theme="dark"] .tc-compose .btn-dark, body[data-theme="dark"] .tc-modal .btn-dark, body[data-theme="dark"] .tc-welcome .btn-dark { background: var(--paper); color: var(--ink); border-color: var(--paper); }
body[data-theme="dark"] .tc-modal { border: 1px solid #2E2D29; box-shadow: 0 20px 60px rgba(0, 0, 0, .7); }
body[data-theme="dark"] .tc-modal-overlay { background: rgba(0, 0, 0, .6); }
body[data-theme="dark"] .tc-newline { color: #FF8A80; }
body[data-theme="dark"] .tc-pop-kind { background: rgba(31, 78, 140, .35); color: #A9C8F2; }
body[data-theme="dark"] .tc-pop-kind.tc-user { background: rgba(255, 90, 31, .22); color: #FFB899; }
body[data-theme="dark"] .tc-pop-kind.tc-team { background: rgba(124, 77, 255, .25); color: #CDB8FF; }
body[data-theme="dark"] .tc-pop-kind.tc-ticket { background: rgba(224, 160, 40, .22); color: #F0B84A; }
body[data-theme="dark"] .tc-pop-kind.tc-campaign { background: rgba(46, 158, 107, .22); color: #6FD39E; }
body[data-theme="dark"] .tc-pop-kind.tc-registration { background: rgba(236, 72, 153, .22); color: #F9A8D4; }
body[data-theme="dark"] .tc-pop-kind.tc-disposition { background: rgba(0, 150, 136, .25); color: #7FD6CC; }
body[data-theme="dark"] .tc-pop-kind.tc-alert { background: rgba(217, 48, 37, .25); color: #FF8A80; }
