/* ============================================================================
   UPH Admissions LMS — Mockup Design System
   "Admissions Cockpit": warm-paper, deep-maroon accent, editorial + dense.
   Typography: Fraunces (display/numbers) · Plus Jakarta Sans (UI) · JetBrains Mono (data)
   This file is the single source of truth for all mockup screens.
   ============================================================================ */

/* ---- Tokens ---- */
:root {
  /* Brand */
  --maroon-900:#4E141E;
  --maroon-800:#661C29;
  --maroon-700:#822634;  /* primary */
  --maroon-600:#9A3140;
  --maroon-500:#B23E4E;
  --maroon-tint:#F6EBEC;
  --gold:#BE9540;
  --gold-soft:#F4ECD8;

  /* Ink / neutrals (warm) */
  --ink:#221B18;
  --ink-soft:#574E47;
  --muted:#8C8278;
  --faint:#B6ABA0;
  --paper:#FAF6F1;
  --surface:#FFFFFF;
  --surface-2:#F4EEE6;
  --surface-3:#EDE5DB;
  --line:#E9E1D7;
  --line-strong:#D9CDBF;

  /* Semantic */
  --green:#2E7D5B; --green-bg:#E6F1EB;
  --amber:#B0760F; --amber-bg:#FAEFD8;
  --red:#C0392B;   --red-bg:#F8E7E3;
  --blue:#2C6E9B;  --blue-bg:#E6EFF6;
  --violet:#6B4E9A; --violet-bg:#EEE9F5;

  /* Channels */
  --c-wa:#1FAD5B; --c-meta:#2C6E9B; --c-tiktok:#221B18; --c-email:#7A6E62;
  --c-web:#2E8B8B; --c-expo:#BE9540; --c-pks:#6B4E9A; --c-agent:#9A6A3A; --c-referral:#B23E4E;

  /* Geometry */
  --r-xs:5px; --r-sm:8px; --r-md:12px; --r-lg:16px; --r-xl:22px; --r-pill:999px;
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:24px; --sp-6:32px; --sp-7:48px;

  /* Shadows (soft, warm) */
  --sh-1:0 1px 2px rgba(40,28,20,.05), 0 1px 1px rgba(40,28,20,.04);
  --sh-2:0 2px 8px rgba(50,32,22,.07), 0 1px 2px rgba(50,32,22,.05);
  --sh-3:0 10px 30px rgba(50,32,22,.12), 0 2px 6px rgba(50,32,22,.06);
  --sh-pop:0 18px 50px rgba(40,24,18,.20);

  --sidebar-w:248px;
  --topbar-h:62px;

  --font-display:"Fraunces", Georgia, "Times New Roman", serif;
  --font-ui:"Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-mono:"JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

/* ---- Reset ---- */
*,*::before,*::after{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family:var(--font-ui);
  color:var(--ink);
  background:var(--paper);
  font-size:14px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  /* subtle paper grain */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(190,149,64,.05), transparent 38%),
    radial-gradient(circle at 88% 8%, rgba(130,38,52,.045), transparent 42%);
  background-attachment:fixed;
}
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
::selection{ background:var(--maroon-tint); color:var(--maroon-800); }
:focus-visible{ outline:2px solid var(--maroon-600); outline-offset:2px; border-radius:4px; }

/* scrollbars */
*{ scrollbar-width:thin; scrollbar-color:var(--line-strong) transparent; }
*::-webkit-scrollbar{ width:9px; height:9px; }
*::-webkit-scrollbar-thumb{ background:var(--line-strong); border-radius:99px; border:2px solid var(--paper); }
*::-webkit-scrollbar-thumb:hover{ background:var(--faint); }

/* ---- Typography helpers ---- */
.display{ font-family:var(--font-display); font-optical-sizing:auto; }
.mono{ font-family:var(--font-mono); }
.h1{ font-family:var(--font-display); font-weight:600; font-size:26px; letter-spacing:-.01em; line-height:1.12; }
.h2{ font-family:var(--font-display); font-weight:600; font-size:19px; letter-spacing:-.01em; }
.h3{ font-weight:700; font-size:15px; letter-spacing:-.005em; }
.eyebrow{ font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); }
.muted{ color:var(--muted); }
.soft{ color:var(--ink-soft); }
.tnum{ font-variant-numeric:tabular-nums; }
.num{ font-family:var(--font-display); font-weight:560; font-variant-numeric:tabular-nums lining-nums; letter-spacing:-.01em; }

/* ============================================================================
   APP SHELL
   ============================================================================ */
.app{ display:grid; grid-template-columns:var(--sidebar-w) 1fr; min-height:100vh; }

/* Sidebar */
.sidebar{
  background:linear-gradient(180deg,#3F1018 0%, #4E141E 42%, #5A1822 100%);
  color:#Eadfd6; position:sticky; top:0; height:100vh;
  display:flex; flex-direction:column; padding:0; overflow:hidden;
  border-right:1px solid rgba(0,0,0,.2);
}
.brand{ display:flex; align-items:center; gap:11px; padding:17px 18px 16px; border-bottom:1px solid rgba(255,255,255,.08); }
.brand-mark{
  width:34px; height:34px; border-radius:9px; flex:0 0 auto;
  background:radial-gradient(circle at 35% 28%, #f0d488, #BE9540 55%, #8f6e21);
  display:grid; place-items:center; color:#3F1018; font-family:var(--font-display); font-weight:700; font-size:18px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.25), 0 2px 6px rgba(0,0,0,.3);
}
.brand-name{ font-family:var(--font-display); font-weight:600; font-size:16px; color:#fff; line-height:1; }
.brand-sub{ font-size:10.5px; letter-spacing:.13em; text-transform:uppercase; color:rgba(255,255,255,.55); margin-top:3px; }

.nav{ padding:12px 12px; overflow-y:auto; flex:1; }
.nav-group{ margin:6px 0 14px; }
.nav-label{ font-size:10px; letter-spacing:.16em; text-transform:uppercase; color:rgba(255,255,255,.4); padding:6px 10px; }
.nav-item{
  display:flex; align-items:center; gap:11px; padding:8.5px 11px; border-radius:9px;
  color:rgba(255,255,255,.78); font-size:13.5px; font-weight:500; margin:1px 0; position:relative;
  transition:background .15s, color .15s;
}
.nav-item .ico{ width:18px; height:18px; flex:0 0 auto; opacity:.85; }
.nav-item:hover{ background:rgba(255,255,255,.07); color:#fff; }
.nav-item.active{ background:rgba(255,255,255,.12); color:#fff; }
.nav-item.active::before{ content:""; position:absolute; left:-12px; top:7px; bottom:7px; width:3px; border-radius:0 3px 3px 0; background:var(--gold); }
.nav-item .badge-count{ margin-left:auto; background:var(--maroon-500); color:#fff; font-size:11px; font-weight:700; padding:1px 7px; border-radius:99px; }
.sidebar-foot{ padding:12px 14px; border-top:1px solid rgba(255,255,255,.08); display:flex; align-items:center; gap:10px; }

/* Main column */
.main{ display:flex; flex-direction:column; min-width:0; }

/* Topbar */
.topbar{
  height:var(--topbar-h); background:rgba(250,246,241,.86); backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line); display:flex; align-items:center; gap:16px;
  padding:0 24px; position:sticky; top:0; z-index:30;
}
.searchbar{
  display:flex; align-items:center; gap:9px; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-pill); padding:8px 15px; width:min(420px,40vw); color:var(--muted); box-shadow:var(--sh-1);
}
.searchbar input{ border:0; background:transparent; outline:none; font-family:inherit; font-size:13.5px; color:var(--ink); width:100%; }
.searchbar kbd{ font-family:var(--font-mono); font-size:11px; background:var(--surface-2); border:1px solid var(--line); border-radius:5px; padding:1px 6px; color:var(--muted); }
.topbar-spacer{ flex:1; }

/* Page content */
.page{ padding:24px 28px 56px; max-width:1480px; width:100%; margin:0 auto; }
.page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:20px; flex-wrap:wrap; }
.page-title-wrap{ display:flex; flex-direction:column; gap:5px; }
.crumbs{ font-size:12px; color:var(--muted); display:flex; align-items:center; gap:7px; }
.crumbs .sep{ color:var(--faint); }

/* ============================================================================
   PRIMITIVES
   ============================================================================ */

/* Buttons */
.btn{ display:inline-flex; align-items:center; gap:7px; border:1px solid var(--line-strong); background:var(--surface);
  color:var(--ink); padding:8px 14px; border-radius:var(--r-sm); font-size:13px; font-weight:600; box-shadow:var(--sh-1);
  transition:transform .08s, box-shadow .15s, background .15s, border-color .15s; white-space:nowrap; }
.btn:hover{ box-shadow:var(--sh-2); border-color:var(--faint); }
.btn:active{ transform:translateY(1px); }
.btn .ico{ width:16px; height:16px; }
.btn-primary{ background:linear-gradient(180deg,var(--maroon-600),var(--maroon-700)); color:#fff; border-color:var(--maroon-800); box-shadow:0 2px 6px rgba(130,38,52,.28); }
.btn-primary:hover{ background:linear-gradient(180deg,var(--maroon-500),var(--maroon-700)); border-color:var(--maroon-800); }
.btn-gold{ background:linear-gradient(180deg,#cda64f,var(--gold)); color:#3a2c08; border-color:#9d7a25; }
.btn-ghost{ background:transparent; border-color:transparent; box-shadow:none; }
.btn-ghost:hover{ background:var(--surface-2); box-shadow:none; }
.btn-sm{ padding:5px 10px; font-size:12px; border-radius:var(--r-xs); }
.btn-icon{ padding:8px; border-radius:var(--r-sm); }
.btn-wa{ background:var(--c-wa); color:#fff; border-color:#178a47; box-shadow:0 2px 6px rgba(31,173,91,.3); }

/* Cards & panels */
.card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--sh-1); }
.card-pad{ padding:18px 20px; }
.card-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 18px; border-bottom:1px solid var(--line); }
.card-head .h3{ display:flex; align-items:center; gap:9px; }
.panel-divider{ height:1px; background:var(--line); margin:0; border:0; }

/* Grids */
.grid{ display:grid; gap:16px; }
.g-2{ grid-template-columns:repeat(2,1fr); }
.g-3{ grid-template-columns:repeat(3,1fr); }
.g-4{ grid-template-columns:repeat(4,1fr); }
.g-5{ grid-template-columns:repeat(5,1fr); }
.row{ display:flex; align-items:center; gap:10px; }
.col{ display:flex; flex-direction:column; }
.between{ justify-content:space-between; }
.wrap{ flex-wrap:wrap; }
.gap-sm{ gap:6px; } .gap-lg{ gap:18px; }

/* KPI stat */
.stat{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); padding:16px 17px; box-shadow:var(--sh-1); position:relative; overflow:hidden; }
.stat::after{ content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--maroon-600); opacity:.0; transition:opacity .2s; }
.stat:hover::after{ opacity:1; }
.stat-label{ font-size:11.5px; font-weight:600; color:var(--muted); letter-spacing:.02em; display:flex; align-items:center; gap:6px; }
.stat-value{ font-family:var(--font-display); font-weight:600; font-size:30px; letter-spacing:-.02em; line-height:1.05; margin:7px 0 4px; font-variant-numeric:tabular-nums; }
.stat-value small{ font-size:15px; color:var(--muted); font-weight:500; }
.stat-delta{ font-size:12px; font-weight:600; display:inline-flex; align-items:center; gap:4px; }
.delta-up{ color:var(--green); } .delta-down{ color:var(--red); } .delta-flat{ color:var(--muted); }
.stat-spark{ position:absolute; right:14px; bottom:12px; opacity:.85; }

/* Badges / chips */
.badge{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:600; padding:2.5px 9px; border-radius:var(--r-pill); border:1px solid transparent; white-space:nowrap; line-height:1.4; }
.badge .dot{ width:6px; height:6px; border-radius:50%; background:currentColor; }
.b-green{ background:var(--green-bg); color:#216147; }
.b-amber{ background:var(--amber-bg); color:#85590a; }
.b-red{ background:var(--red-bg); color:#992318; }
.b-blue{ background:var(--blue-bg); color:#1f5378; }
.b-violet{ background:var(--violet-bg); color:#503a78; }
.b-gold{ background:var(--gold-soft); color:#7c5e16; }
.b-neutral{ background:var(--surface-2); color:var(--ink-soft); }
.b-maroon{ background:var(--maroon-tint); color:var(--maroon-800); }
.b-outline{ background:transparent; border-color:var(--line-strong); color:var(--ink-soft); }

/* Score chips (fit A–C / engagement 1–3 => tier like A2) */
.score{ display:inline-flex; align-items:center; gap:0; font-family:var(--font-mono); font-weight:700; font-size:12px;
  border-radius:6px; overflow:hidden; border:1px solid var(--line-strong); }
.score b{ padding:2px 7px; background:var(--surface-2); }
.score i{ padding:2px 7px; font-style:normal; background:var(--ink); color:#fff; }
.score.s-a b{ background:#E6F1EB; color:#216147; } .score.s-a i{ background:#2E7D5B; }
.score.s-b b{ background:#E6EFF6; color:#1f5378; } .score.s-b i{ background:#2C6E9B; }
.score.s-c b{ background:#FAEFD8; color:#85590a; } .score.s-c i{ background:#B0760F; }

/* Channel pill */
.chan{ display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:600; padding:2.5px 9px 2.5px 7px; border-radius:var(--r-pill); background:var(--surface-2); color:var(--ink-soft); }
.chan .gly{ width:14px; height:14px; border-radius:4px; display:grid; place-items:center; color:#fff; font-size:9px; font-weight:800; flex:0 0 auto; }
.gly-wa{ background:var(--c-wa);} .gly-meta{ background:var(--c-meta);} .gly-tiktok{ background:var(--c-tiktok);}
.gly-email{ background:var(--c-email);} .gly-web{ background:var(--c-web);} .gly-expo{ background:var(--c-expo);}
.gly-pks{ background:var(--c-pks);} .gly-agent{ background:var(--c-agent);} .gly-referral{ background:var(--c-referral);}

/* Avatars */
.av{ width:32px; height:32px; border-radius:50%; display:grid; place-items:center; font-weight:700; font-size:12px;
  color:#fff; flex:0 0 auto; box-shadow:inset 0 0 0 1px rgba(255,255,255,.25); letter-spacing:.01em; }
.av-sm{ width:24px; height:24px; font-size:10px; }
.av-lg{ width:54px; height:54px; font-size:19px; font-family:var(--font-display); }
.av-1{ background:linear-gradient(135deg,#9A3140,#661C29);} .av-2{ background:linear-gradient(135deg,#2C6E9B,#214f70);}
.av-3{ background:linear-gradient(135deg,#2E7D5B,#1f5a40);} .av-4{ background:linear-gradient(135deg,#BE9540,#8f6e21);}
.av-5{ background:linear-gradient(135deg,#6B4E9A,#4a3570);} .av-6{ background:linear-gradient(135deg,#9A6A3A,#6e4a26);}
.av-stack{ display:flex; } .av-stack .av{ margin-left:-8px; border:2px solid var(--surface); } .av-stack .av:first-child{ margin-left:0; }

/* SLA timer */
.sla{ display:inline-flex; align-items:center; gap:5px; font-family:var(--font-mono); font-size:11.5px; font-weight:600; padding:2px 8px; border-radius:var(--r-pill); }
.sla-ok{ background:var(--green-bg); color:#216147; }
.sla-warn{ background:var(--amber-bg); color:#85590a; }
.sla-breach{ background:var(--red-bg); color:#992318; }
.sla .pulse{ width:6px; height:6px; border-radius:50%; background:currentColor; box-shadow:0 0 0 0 currentColor; animation:pulse 1.8s infinite; }
@keyframes pulse{ 0%{ box-shadow:0 0 0 0 rgba(192,57,43,.5);} 70%{ box-shadow:0 0 0 6px rgba(192,57,43,0);} 100%{ box-shadow:0 0 0 0 rgba(192,57,43,0);} }

/* Progress / meters */
.meter{ height:8px; border-radius:99px; background:var(--surface-2); overflow:hidden; }
.meter > i{ display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,var(--maroon-600),var(--maroon-500)); }
.meter.green > i{ background:linear-gradient(90deg,#2E7D5B,#3a9a70);}
.meter.gold > i{ background:linear-gradient(90deg,#BE9540,#d6b25e);}
.meter.thin{ height:5px; }

/* Tables */
.table{ width:100%; border-collapse:separate; border-spacing:0; font-size:13px; }
.table th{ text-align:left; font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted);
  padding:10px 14px; border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--surface); }
.table td{ padding:11px 14px; border-bottom:1px solid var(--line); vertical-align:middle; }
.table tbody tr:hover{ background:var(--surface-2); }
.table tbody tr:last-child td{ border-bottom:0; }
.table .num{ font-size:14px; }

/* Bar list (channels/programs breakdown) */
.barlist{ display:flex; flex-direction:column; gap:11px; }
.barrow{ display:grid; grid-template-columns:130px 1fr 52px; align-items:center; gap:12px; }
.barrow .lab{ font-size:12.5px; font-weight:600; color:var(--ink-soft); display:flex; align-items:center; gap:7px; }
.barrow .track{ height:9px; border-radius:99px; background:var(--surface-2); overflow:hidden; }
.barrow .track > i{ display:block; height:100%; border-radius:99px; }
.barrow .val{ text-align:right; font-family:var(--font-mono); font-size:12.5px; font-weight:600; color:var(--ink); }

/* Tabs */
.tabs{ display:flex; gap:2px; border-bottom:1px solid var(--line); }
.tab{ padding:9px 14px; font-size:13px; font-weight:600; color:var(--muted); border-bottom:2px solid transparent; margin-bottom:-1px; }
.tab:hover{ color:var(--ink); }
.tab.active{ color:var(--maroon-700); border-bottom-color:var(--maroon-700); }

/* Segmented control / filter pills */
.seg{ display:inline-flex; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-pill); padding:3px; }
.seg button{ border:0; background:transparent; padding:5px 13px; font-size:12.5px; font-weight:600; color:var(--muted); border-radius:var(--r-pill); }
.seg button.active{ background:var(--surface); color:var(--ink); box-shadow:var(--sh-1); }
.filter{ display:inline-flex; align-items:center; gap:7px; padding:7px 12px; border:1px solid var(--line-strong); background:var(--surface);
  border-radius:var(--r-sm); font-size:12.5px; font-weight:600; color:var(--ink-soft); box-shadow:var(--sh-1); }
.filter .ico{ width:14px; height:14px; opacity:.7; }
.filter .caret{ color:var(--faint); }

/* Funnel */
.funnel{ display:flex; flex-direction:column; gap:9px; }
.fstage{ position:relative; }
.fstage .fbar{ height:42px; border-radius:9px; display:flex; align-items:center; justify-content:space-between; padding:0 16px;
  color:#fff; box-shadow:var(--sh-1); position:relative; overflow:hidden; }
.fstage .fbar .fname{ font-weight:600; font-size:13.5px; display:flex; align-items:center; gap:9px; z-index:1; }
.fstage .fbar .fcount{ font-family:var(--font-display); font-weight:600; font-size:18px; font-variant-numeric:tabular-nums; z-index:1; }
.fstage .conv{ display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--muted); padding:2px 0 2px 16px; }
.fstage .conv b{ color:var(--ink-soft); font-family:var(--font-mono); font-weight:600; }

/* Timeline */
.timeline{ position:relative; padding-left:26px; }
.timeline::before{ content:""; position:absolute; left:9px; top:4px; bottom:4px; width:2px; background:var(--line); }
.tl-item{ position:relative; padding:0 0 18px; }
.tl-item .tl-dot{ position:absolute; left:-22px; top:2px; width:20px; height:20px; border-radius:50%; background:var(--surface);
  border:2px solid var(--line-strong); display:grid; place-items:center; }
.tl-item .tl-dot.accent{ border-color:var(--maroon-600); }
.tl-item .tl-dot .ico{ width:11px; height:11px; }
.tl-time{ font-family:var(--font-mono); font-size:11px; color:var(--muted); }
.tl-title{ font-size:13.5px; font-weight:600; margin:1px 0 2px; }
.tl-body{ font-size:12.5px; color:var(--ink-soft); }

/* Consent toggle */
.consent-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 0; border-bottom:1px solid var(--line); }
.consent-row:last-child{ border-bottom:0; }
.toggle{ width:38px; height:22px; border-radius:99px; background:var(--line-strong); position:relative; transition:background .18s; flex:0 0 auto; }
.toggle::after{ content:""; position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:var(--sh-1); transition:left .18s; }
.toggle.on{ background:var(--green); } .toggle.on::after{ left:18px; }
.toggle.off-locked{ background:var(--red-bg); }

/* Kanban */
.board{ display:flex; gap:14px; overflow-x:auto; padding:4px 2px 12px; align-items:flex-start; }
.kcol{ width:282px; flex:0 0 282px; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-lg); display:flex; flex-direction:column; max-height:calc(100vh - 220px); }
.kcol-head{ display:flex; align-items:center; justify-content:space-between; padding:12px 13px; position:sticky; top:0; }
.kcol-head .kt{ display:flex; align-items:center; gap:8px; font-weight:700; font-size:13px; }
.kcol-head .kt .kdot{ width:9px; height:9px; border-radius:50%; }
.kcol-head .kmeta{ font-family:var(--font-mono); font-size:11px; color:var(--muted); }
.kcol-body{ padding:0 9px 10px; overflow-y:auto; display:flex; flex-direction:column; gap:9px; }
.kcard{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md); padding:11px 12px; box-shadow:var(--sh-1);
  cursor:grab; transition:box-shadow .15s, transform .08s, border-color .15s; }
.kcard:hover{ box-shadow:var(--sh-2); border-color:var(--line-strong); transform:translateY(-1px); }
.kcard .kname{ font-weight:700; font-size:13.5px; letter-spacing:-.005em; }
.kcard .kprog{ font-size:12px; color:var(--ink-soft); margin-top:1px; }
.kcard .kfoot{ display:flex; align-items:center; justify-content:space-between; margin-top:10px; gap:8px; }
.kcol.is-drop{ outline:2px dashed var(--maroon-500); outline-offset:-3px; }
.kcard.ghost{ opacity:.5; }

/* Inbox */
.inbox{ display:grid; grid-template-columns:330px 1fr 312px; height:calc(100vh - var(--topbar-h)); }
.conv-list{ border-right:1px solid var(--line); background:var(--surface); display:flex; flex-direction:column; min-height:0; }
.conv-search{ padding:12px; border-bottom:1px solid var(--line); }
.conv-scroll{ overflow-y:auto; }
.conv{ display:flex; gap:11px; padding:12px 14px; border-bottom:1px solid var(--line); cursor:pointer; position:relative; }
.conv:hover{ background:var(--surface-2); }
.conv.active{ background:var(--maroon-tint); }
.conv.active::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--maroon-700); }
.conv .cmeta{ min-width:0; flex:1; }
.conv .cname{ font-weight:700; font-size:13.5px; display:flex; align-items:center; gap:6px; }
.conv .cprev{ font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px; }
.conv .ctime{ font-size:10.5px; color:var(--faint); font-family:var(--font-mono); }
.conv .unread{ background:var(--maroon-700); color:#fff; font-size:10px; font-weight:700; border-radius:99px; padding:0 6px; min-width:17px; height:17px; display:grid; place-items:center; }

.thread{ display:flex; flex-direction:column; min-width:0; background:
  linear-gradient(0deg, rgba(244,238,230,.5), rgba(244,238,230,.5)),
  radial-gradient(circle at 20% 10%, rgba(190,149,64,.04), transparent 40%); }
.thread-head{ display:flex; align-items:center; justify-content:space-between; padding:12px 18px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.7); backdrop-filter:blur(6px); }
.thread-body{ flex:1; overflow-y:auto; padding:20px 22px; display:flex; flex-direction:column; gap:11px; }
.msg{ max-width:74%; padding:9px 13px; border-radius:14px; font-size:13.5px; line-height:1.45; box-shadow:var(--sh-1); position:relative; }
.msg .mt{ font-family:var(--font-mono); font-size:10px; color:var(--muted); margin-top:4px; display:block; text-align:right; }
.msg.in{ align-self:flex-start; background:#fff; border:1px solid var(--line); border-bottom-left-radius:5px; }
.msg.out{ align-self:flex-end; background:#DCF6E3; border:1px solid #bfe9cb; border-bottom-right-radius:5px; }
.msg.note{ align-self:center; background:var(--gold-soft); border:1px solid #e6d6a6; font-size:12px; color:#6a5314; max-width:80%; border-radius:10px; }
.day-sep{ align-self:center; font-size:11px; color:var(--muted); background:var(--surface); border:1px solid var(--line); border-radius:99px; padding:2px 12px; }
.composer{ border-top:1px solid var(--line); padding:12px 16px; background:var(--surface); }
.composer .cbox{ display:flex; align-items:flex-end; gap:10px; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-lg); padding:8px 10px; }
.composer textarea{ flex:1; border:0; background:transparent; outline:none; resize:none; font-family:inherit; font-size:13.5px; color:var(--ink); max-height:120px; }
.window-note{ font-size:11px; color:var(--amber); display:flex; align-items:center; gap:6px; margin-bottom:8px; }

.ctx{ border-left:1px solid var(--line); background:var(--surface); overflow-y:auto; }

/* Utility */
.divider{ height:1px; background:var(--line); margin:14px 0; border:0; }
.hr-dot{ color:var(--faint); margin:0 2px; }
.pill-count{ font-family:var(--font-mono); font-size:11px; font-weight:600; color:var(--muted); background:var(--surface-2); border:1px solid var(--line); border-radius:99px; padding:1px 8px; }
.note-block{ background:var(--surface-2); border:1px dashed var(--line-strong); border-radius:var(--r-md); padding:12px 14px; font-size:12.5px; color:var(--ink-soft); }
.link{ color:var(--maroon-700); font-weight:600; }
.link:hover{ text-decoration:underline; }
.kv{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 0; font-size:13px; border-bottom:1px solid var(--line); }
.kv:last-child{ border-bottom:0; }
.kv .k{ color:var(--muted); font-size:12.5px; }
.kv .v{ font-weight:600; text-align:right; }
.flag{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; padding:5px 10px; border-radius:var(--r-sm); }
.flag-gold{ background:var(--gold-soft); color:#7c5e16; border:1px solid #e6d6a6; }
.flag-green{ background:var(--green-bg); color:#216147; border:1px solid #bfe0cf; }

/* staggered reveal */
.reveal{ opacity:0; transform:translateY(8px); animation:reveal .5s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes reveal{ to{ opacity:1; transform:none; } }
.r1{ animation-delay:.03s; } .r2{ animation-delay:.08s; } .r3{ animation-delay:.13s; } .r4{ animation-delay:.18s; }
.r5{ animation-delay:.23s; } .r6{ animation-delay:.28s; }

/* mockup ribbon */
.mock-ribbon{ position:fixed; bottom:14px; right:14px; z-index:60; background:var(--ink); color:#fff; font-size:11px; font-weight:600;
  padding:6px 12px; border-radius:99px; box-shadow:var(--sh-3); display:flex; align-items:center; gap:7px; opacity:.92; }
.mock-ribbon .dot{ width:7px; height:7px; border-radius:50%; background:var(--gold); }

@media (max-width:1180px){
  .g-4{ grid-template-columns:repeat(2,1fr);} .g-5{ grid-template-columns:repeat(3,1fr);} .g-3{ grid-template-columns:repeat(2,1fr);}
  .inbox{ grid-template-columns:300px 1fr; } .ctx{ display:none; }
}

/* ============================================================================
   v2 — ENTERPRISE LAYER  (additions + overrides; later cascade wins)
   ============================================================================ */
:root{
  /* categorical data-viz palette (separate from semantic) */
  --dv-1:#822634; --dv-2:#2C6E9B; --dv-3:#BE9540; --dv-4:#2E7D5B;
  --dv-5:#6B4E9A; --dv-6:#9A6A3A; --dv-7:#2E8B8B; --dv-8:#B23E4E;
  /* sequential funnel stages */
  --dv-stage-1:#8C8278; --dv-stage-2:#9A6A3A; --dv-stage-3:#BE9540;
  --dv-stage-4:#2C6E9B; --dv-stage-5:#6B4E9A; --dv-stage-6:#2E7D5B;
  /* contrast-fixed text shades (AA on paper/tints) */
  --amber-ink:#85580B; --gold-ink:#6E5414;
  /* motion */
  --ease-out:cubic-bezier(.2,.8,.2,1); --ease-in-out:cubic-bezier(.4,0,.2,1);
  --dur-fast:120ms; --dur:180ms; --dur-slow:240ms;
  /* density (comfortable default) */
  --row-h:46px; --cell-pad-y:11px; --cell-pad-x:14px; --card-pad:18px;
  --control-h:34px; --list-pad-y:12px; --conv-pad-y:12px;
}
[data-density="compact"]{
  --row-h:36px; --cell-pad-y:6px; --cell-pad-x:11px; --card-pad:13px;
  --control-h:30px; --list-pad-y:8px; --conv-pad-y:8px;
}

/* flatten chrome: border-first, shadow only when truly floating */
body{ background-attachment:scroll; }
.card{ box-shadow:none; }
.stat{ box-shadow:none; border-radius:var(--r-md); }
.stat:hover{ box-shadow:var(--sh-2); }
.kcard{ box-shadow:none; }
.kcard:hover{ box-shadow:var(--sh-2); }
.kcol{ border-radius:var(--r-md); }
.searchbar{ box-shadow:none; }
.btn{ box-shadow:none; }
.btn:hover{ box-shadow:var(--sh-1); }
.filter{ box-shadow:none; }

/* density applied */
.table td{ padding:var(--cell-pad-y) var(--cell-pad-x); height:var(--row-h); }
.table th{ padding:8px var(--cell-pad-x); }
.card-pad{ padding:var(--card-pad); }
.conv{ padding:var(--conv-pad-y) 14px; }
.btn{ min-height:var(--control-h); }

/* data figures: mono + tabular, right-aligned magnitudes */
.dnum{ font-family:var(--font-mono); font-variant-numeric:tabular-nums lining-nums; letter-spacing:-.02em; font-weight:600; }
.table td.num, .table td.dnum, .stat-delta, .sla, .kcard .score, .barrow .val, .kcol-head .kmeta{
  font-variant-numeric:tabular-nums lining-nums; }
.num-right{ text-align:right; }

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ animation-duration:.01ms!important; animation-iteration-count:1!important;
    transition-duration:.01ms!important; scroll-behavior:auto!important; }
}

/* topbar: density + theme controls */
.tb-controls{ display:flex; align-items:center; gap:6px; }
.icontoggle{ display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px;
  border:1px solid var(--line-strong); background:var(--surface); border-radius:var(--r-sm); color:var(--ink-soft); }
.icontoggle:hover{ background:var(--surface-2); color:var(--ink); }
.icontoggle .ico{ width:17px; height:17px; }
.densitytoggle{ display:inline-flex; border:1px solid var(--line-strong); border-radius:var(--r-sm); overflow:hidden; }
.densitytoggle button{ border:0; background:var(--surface); color:var(--muted); padding:0 9px; height:34px; font-size:12px; font-weight:600; display:flex; align-items:center; gap:5px; }
.densitytoggle button[aria-pressed="true"]{ background:var(--maroon-tint); color:var(--maroon-800); }
.densitytoggle button .ico{ width:14px; height:14px; }

/* ⌘K command palette */
.cmdk-scrim{ position:fixed; inset:0; background:rgba(30,18,14,.42); backdrop-filter:blur(3px); z-index:200;
  display:none; align-items:flex-start; justify-content:center; padding-top:12vh; }
.cmdk-scrim.open{ display:flex; animation:fade .14s var(--ease-out); }
@keyframes fade{ from{ opacity:0 } to{ opacity:1 } }
.cmdk{ width:min(620px,92vw); background:var(--surface); border:1px solid var(--line-strong); border-radius:var(--r-lg);
  box-shadow:var(--sh-pop); overflow:hidden; animation:pop .16s var(--ease-out); }
@keyframes pop{ from{ transform:translateY(-8px) scale(.99); opacity:.6 } to{ transform:none; opacity:1 } }
.cmdk-input{ display:flex; align-items:center; gap:11px; padding:14px 16px; border-bottom:1px solid var(--line); }
.cmdk-input .ico{ width:18px; height:18px; color:var(--muted); }
.cmdk-input input{ flex:1; border:0; background:transparent; outline:none; font-family:inherit; font-size:15px; color:var(--ink); }
.cmdk-body{ max-height:48vh; overflow-y:auto; padding:7px; }
.cmdk-group{ padding:7px 9px 3px; font-size:10.5px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:var(--muted); }
.cmdk-item{ display:flex; align-items:center; gap:11px; padding:9px 11px; border-radius:var(--r-sm); cursor:pointer; color:var(--ink); }
.cmdk-item .ico{ width:17px; height:17px; color:var(--ink-soft); }
.cmdk-item .ci-main{ flex:1; font-size:13.5px; font-weight:500; }
.cmdk-item .ci-sub{ font-size:11.5px; color:var(--muted); }
.cmdk-item[aria-selected="true"], .cmdk-item:hover{ background:var(--maroon-tint); }
.cmdk-item[aria-selected="true"] .ico{ color:var(--maroon-700); }
.cmdk-foot{ display:flex; align-items:center; gap:14px; padding:8px 14px; border-top:1px solid var(--line); font-size:11px; color:var(--muted); }
.kbd{ font-family:var(--font-mono); font-size:10.5px; background:var(--surface-2); border:1px solid var(--line); border-radius:5px; padding:1px 6px; color:var(--muted); }
.kbd-row{ margin-left:auto; display:flex; gap:4px; }

/* bulk action bar */
.bulkbar{ position:sticky; bottom:14px; z-index:50; margin:14px auto 0; width:fit-content;
  display:none; align-items:center; gap:14px; padding:9px 12px 9px 16px; border-radius:var(--r-pill);
  background:linear-gradient(180deg,var(--maroon-700),var(--maroon-800)); color:#fff; box-shadow:var(--sh-pop); }
.bulkbar.show{ display:flex; animation:slideup .2s var(--ease-out); }
@keyframes slideup{ from{ transform:translateY(10px); opacity:0 } to{ transform:none; opacity:1 } }
.bulkbar .bb-count{ font-weight:700; font-size:13px; display:flex; align-items:center; gap:8px; }
.bulkbar .bb-count b{ background:rgba(255,255,255,.18); border-radius:99px; padding:1px 9px; font-variant-numeric:tabular-nums; }
.bulkbar .bb-sep{ width:1px; height:20px; background:rgba(255,255,255,.22); }
.bulkbar .bb-act{ display:inline-flex; align-items:center; gap:6px; padding:6px 11px; border-radius:var(--r-sm); background:rgba(255,255,255,.12); color:#fff; font-size:12.5px; font-weight:600; border:0; }
.bulkbar .bb-act:hover{ background:rgba(255,255,255,.22); }
.bulkbar .bb-act .ico{ width:15px; height:15px; }
.bulkbar .bb-close{ color:rgba(255,255,255,.8); background:transparent; border:0; padding:4px; }

/* checkbox */
.ckbox{ width:17px; height:17px; border:1.5px solid var(--line-strong); border-radius:5px; background:var(--surface);
  display:inline-grid; place-items:center; flex:0 0 auto; cursor:pointer; transition:border-color .12s, background .12s; }
.ckbox .ico{ width:12px; height:12px; color:#fff; opacity:0; }
.ckbox.checked{ background:var(--maroon-700); border-color:var(--maroon-700); }
.ckbox.checked .ico{ opacity:1; }
.row-check{ opacity:0; transition:opacity .12s; }
tr:hover .row-check, .kcard:hover .card-check, .selected .row-check, .selected .card-check{ opacity:1; }
.selected{ background:var(--maroon-tint) !important; }

/* saved-view / filter chips */
.viewbar{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.chip{ display:inline-flex; align-items:center; gap:7px; padding:5px 10px; border:1px solid var(--line-strong); background:var(--surface);
  border-radius:var(--r-pill); font-size:12.5px; font-weight:600; color:var(--ink-soft); }
.chip .cn{ background:var(--surface-2); border-radius:99px; padding:0 6px; font-size:11px; font-variant-numeric:tabular-nums; }
.chip.active{ background:var(--maroon-tint); border-color:var(--maroon-500); color:var(--maroon-800); }
.chip .x{ color:var(--faint); display:inline-flex; }
.chip .x:hover{ color:var(--ink); }
.chip-add{ border-style:dashed; color:var(--muted); }

/* skeleton / empty / error / zero states */
.skel{ background:linear-gradient(90deg,var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size:400% 100%; animation:shimmer 1.4s ease infinite; border-radius:6px; }
@keyframes shimmer{ from{ background-position:100% 0 } to{ background-position:0 0 } }
.sk-line{ height:11px; margin:7px 0; } .sk-line.w60{ width:60% } .sk-line.w40{ width:40% } .sk-line.w80{ width:80% }
.state{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:10px; padding:40px 24px; color:var(--muted); }
.state .si{ width:46px; height:46px; border-radius:50%; display:grid; place-items:center; background:var(--surface-2); color:var(--ink-soft); }
.state .si .ico{ width:22px; height:22px; }
.state h4{ font-size:15px; color:var(--ink); margin:0; }
.state p{ font-size:13px; margin:0; max-width:42ch; }
.state.error .si{ background:var(--red-bg); color:#992318; }

/* lead-360: Path stage strip */
.path{ display:flex; border:1px solid var(--line); border-radius:var(--r-md); overflow:hidden; background:var(--surface); }
.path-step{ position:relative; flex:1; padding:9px 10px 9px 22px; font-size:12px; font-weight:600; color:var(--muted); background:var(--surface);
  display:flex; align-items:center; gap:7px; border-right:1px solid var(--line); }
.path-step:first-child{ padding-left:14px; }
.path-step::after{ content:""; position:absolute; right:-9px; top:50%; width:16px; height:16px; transform:translateY(-50%) rotate(45deg);
  background:var(--surface); border-top:1px solid var(--line); border-right:1px solid var(--line); z-index:2; }
.path-step:last-child{ border-right:0; } .path-step:last-child::after{ display:none; }
.path-step.done{ color:var(--green); }
.path-step.current{ background:var(--maroon-700); color:#fff; }
.path-step.current::after{ background:var(--maroon-700); border-color:var(--maroon-700); }
.path-step .ico{ width:14px; height:14px; }

/* highlights panel (record header facts) */
.highlights{ display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:0; border-top:1px solid var(--line); }
.highlights .hl{ padding:10px 14px; border-right:1px solid var(--line); }
.highlights .hl:last-child{ border-right:0; }
.highlights .hl .hk{ font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); font-weight:700; }
.highlights .hl .hv{ font-size:13.5px; font-weight:600; margin-top:3px; display:flex; align-items:center; gap:6px; }

/* record navbar */
.recordnav{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 0; font-size:12.5px; color:var(--muted); }
.recordnav .rn-pos{ font-variant-numeric:tabular-nums; }
.recordnav .rn-btns{ display:flex; gap:4px; }

/* generic dropdown menu */
.menu{ position:absolute; min-width:190px; background:var(--surface); border:1px solid var(--line-strong); border-radius:var(--r-md);
  box-shadow:var(--sh-3); padding:5px; z-index:80; }
.menu-item{ display:flex; align-items:center; gap:9px; padding:7px 10px; border-radius:var(--r-xs); font-size:13px; color:var(--ink); cursor:pointer; }
.menu-item:hover{ background:var(--surface-2); }
.menu-item .ico{ width:15px; height:15px; color:var(--ink-soft); }
.menu-sep{ height:1px; background:var(--line); margin:5px 0; }

/* aria-live announcer (visually hidden) */
.visually-hidden{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* segmented view-type toggle reuse .seg; add icon support already present */

/* ============================================================================
   DARK MODE  (warm charcoal, layered — not inverted)
   ============================================================================ */
[data-theme="dark"]{
  --ink:#F2EBE3; --ink-soft:#CDBFB1; --muted:#A89C8F; --faint:#7C7064;
  --paper:#15110F; --surface:#1E1814; --surface-2:#261E18; --surface-3:#2E251E;
  --line:#322A22; --line-strong:#463B30;
  --maroon-700:#C24A5A; --maroon-600:#CF5A69; --maroon-500:#D9697A; --maroon-800:#A23C4A;
  --maroon-tint:#2C1B1E; --gold:#D9B45C; --gold-soft:#322813; --gold-ink:#E4C679; --amber-ink:#E0A23C;
  --green-bg:#16271F; --amber-bg:#2A2110; --red-bg:#2C1714; --blue-bg:#132330; --violet-bg:#221B30; --gold-soft:#2A2210;
  --sh-1:0 1px 2px rgba(0,0,0,.4); --sh-2:0 4px 14px rgba(0,0,0,.5); --sh-3:0 12px 34px rgba(0,0,0,.55); --sh-pop:0 22px 60px rgba(0,0,0,.6);
}
[data-theme="dark"] body{ background-image:none; }
[data-theme="dark"] .topbar{ background:rgba(21,17,15,.85); }
[data-theme="dark"] .sidebar{ background:linear-gradient(180deg,#241015 0%, #1c0d11 60%, #170b0e 100%); border-right:1px solid #000; }
[data-theme="dark"] .b-green{ background:color-mix(in srgb,var(--green) 26%, var(--surface)); color:#86D6AC; }
[data-theme="dark"] .b-amber{ background:color-mix(in srgb,var(--amber) 26%, var(--surface)); color:#E6B868; }
[data-theme="dark"] .b-red{ background:color-mix(in srgb,var(--red) 26%, var(--surface)); color:#E89B90; }
[data-theme="dark"] .b-blue{ background:color-mix(in srgb,var(--blue) 26%, var(--surface)); color:#86BBE0; }
[data-theme="dark"] .b-violet{ background:color-mix(in srgb,var(--violet) 30%, var(--surface)); color:#B9A2E0; }
[data-theme="dark"] .b-neutral, [data-theme="dark"] .b-maroon{ background:var(--surface-3); color:var(--ink-soft); }
[data-theme="dark"] .sla-ok{ background:color-mix(in srgb,var(--green) 24%, var(--surface)); color:#86D6AC; }
[data-theme="dark"] .sla-warn{ background:color-mix(in srgb,var(--amber) 26%, var(--surface)); color:#E6B868; }
[data-theme="dark"] .sla-breach{ background:color-mix(in srgb,var(--red) 28%, var(--surface)); color:#E89B90; }
[data-theme="dark"] .msg.in{ background:var(--surface-2); border-color:var(--line); color:var(--ink); }
[data-theme="dark"] .msg.out{ background:#14392A; border-color:#1d5640; color:#E6F4EC; }
[data-theme="dark"] .msg.note{ background:#2A2210; border-color:#473811; color:#E4C679; }
[data-theme="dark"] .thread{ background:radial-gradient(circle at 20% 10%, rgba(190,149,64,.05), transparent 42%), var(--paper); }
[data-theme="dark"] .score b{ background:var(--surface-3); }
[data-theme="dark"] .stat::after{ background:var(--maroon-600); }
[data-theme="dark"] .chip.active, [data-theme="dark"] .cmdk-item[aria-selected="true"], [data-theme="dark"] .conv.active, [data-theme="dark"] .selected{ background:var(--maroon-tint) !important; }
[data-theme="dark"] .av{ box-shadow:inset 0 0 0 1px rgba(255,255,255,.12); }
[data-theme="dark"] .meter, [data-theme="dark"] .barrow .track, [data-theme="dark"] .seg{ background:var(--surface-3); }
[data-theme="dark"] .path-step.current{ color:#fff; }

/* theme transition (respect reduced-motion above) */
body, .card, .sidebar, .topbar, .stat, .kcol, .kcard, .table td, .msg{ transition:background-color var(--dur) var(--ease-in-out), border-color var(--dur) var(--ease-in-out), color var(--dur) var(--ease-in-out); }

/* ============================================================================
   v3 — LEAD-MANAGEMENT additions (nav dot, import stepper, dropzone, integrations)
   ============================================================================ */
.nav-dot{ width:7px; height:7px; border-radius:50%; background:var(--green); margin-left:auto; box-shadow:0 0 0 2px rgba(46,125,91,.22); flex:0 0 auto; }

.stepper{ display:flex; align-items:center; gap:0; margin:0 0 20px; }
.stepper .step{ display:flex; align-items:center; gap:9px; }
.stepper .step .sx{ width:26px; height:26px; border-radius:50%; display:grid; place-items:center; font-size:12px; font-weight:700;
  background:var(--surface-2); color:var(--muted); border:1px solid var(--line-strong); flex:0 0 auto; }
.stepper .step .sl{ font-size:12.5px; font-weight:600; color:var(--muted); white-space:nowrap; }
.stepper .sbar{ flex:1; height:2px; background:var(--line); margin:0 12px; min-width:18px; }
.stepper .step.active .sx{ background:var(--maroon-700); color:#fff; border-color:var(--maroon-700); }
.stepper .step.active .sl{ color:var(--ink); }
.stepper .step.done .sx{ background:var(--green); color:#fff; border-color:var(--green); }
.stepper .step.done .sl{ color:var(--ink-soft); }

.dropzone{ border:1.5px dashed var(--line-strong); border-radius:var(--r-lg); background:var(--surface-2); padding:34px 20px;
  text-align:center; color:var(--muted); display:flex; flex-direction:column; align-items:center; gap:11px; }
.dropzone .dz-ic{ width:48px; height:48px; border-radius:13px; background:var(--surface); border:1px solid var(--line); display:grid; place-items:center; color:var(--maroon-600); }
.dropzone .dz-ic .ico{ width:24px; height:24px; }
.filechip{ display:inline-flex; align-items:center; gap:10px; padding:8px 13px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface); font-size:13px; }
.filechip .fi{ width:30px; height:30px; border-radius:7px; background:var(--green-bg); color:#216147; display:grid; place-items:center; flex:0 0 auto; }
[data-theme="dark"] .filechip .fi{ background:color-mix(in srgb,var(--green) 26%, var(--surface)); color:#86D6AC; }

.mapping{ width:100%; border-collapse:separate; border-spacing:0; }
.mapping td{ padding:9px 12px; border-bottom:1px solid var(--line); font-size:13px; vertical-align:middle; }
.mapping tr:last-child td{ border-bottom:0; }
.mapping .arrow{ color:var(--faint); padding:0 4px; }
.selectish{ display:inline-flex; align-items:center; justify-content:space-between; gap:8px; min-width:150px; padding:6px 11px;
  border:1px solid var(--line-strong); border-radius:var(--r-sm); background:var(--surface); font-size:13px; font-weight:600; color:var(--ink); }
.selectish .caret{ color:var(--faint); }

.conn-card{ display:flex; gap:16px; align-items:flex-start; }
.conn-logo{ width:54px; height:54px; border-radius:14px; display:grid; place-items:center; background:var(--maroon-tint); color:var(--maroon-700); flex:0 0 auto; }
.conn-logo .ico{ width:30px; height:30px; }
.codefield{ display:flex; align-items:center; gap:10px; padding:9px 12px; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-sm);
  font-family:var(--font-mono); font-size:12.5px; color:var(--ink-soft); }
.codefield .grow{ flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.radiochip{ display:inline-flex; align-items:center; gap:7px; padding:7px 13px; border:1px solid var(--line-strong); border-radius:var(--r-sm);
  font-size:13px; font-weight:600; cursor:pointer; color:var(--ink-soft); background:var(--surface); }
.radiochip.sel{ border-color:var(--maroon-600); background:var(--maroon-tint); color:var(--maroon-800); }
.radiochip .rd{ width:14px; height:14px; border-radius:50%; border:1.5px solid var(--line-strong); display:inline-grid; place-items:center; }
.radiochip.sel .rd{ border-color:var(--maroon-600); } .radiochip.sel .rd::after{ content:""; width:7px; height:7px; border-radius:50%; background:var(--maroon-700); }

.srccard{ display:flex; flex-direction:column; gap:10px; }
.srccard .sc-top{ display:flex; align-items:center; gap:11px; }
.srccard .sc-ic{ width:38px; height:38px; border-radius:10px; display:grid; place-items:center; background:var(--surface-2); flex:0 0 auto; }
