/* ==========================================================================
   RippleCore CRM — full clickable prototype (the upgraded CRM, IOO north star).
   Shell chrome (navy sidebar + topbar) recreated from the real console.
   Reuses the .u-* component vocabulary from compare.css; this file adds the
   --u-* tokens on :root, the shell, the CRM tabs, and the per-view layouts.
   ========================================================================== */

@font-face { font-family:"Ubuntu"; font-weight:300; font-style:normal; font-display:swap; src:url("/dashboard/assets/fonts/Ubuntu-Light.ttf") format("truetype"); }
@font-face { font-family:"Ubuntu"; font-weight:400; font-style:normal; font-display:swap; src:url("/dashboard/assets/fonts/Ubuntu-Regular.ttf") format("truetype"); }
@font-face { font-family:"Ubuntu"; font-weight:500; font-style:normal; font-display:swap; src:url("/dashboard/assets/fonts/Ubuntu-Medium.ttf") format("truetype"); }
@font-face { font-family:"Ubuntu"; font-weight:700; font-style:normal; font-display:swap; src:url("/dashboard/assets/fonts/Ubuntu-Bold.ttf") format("truetype"); }

:root {
  --u-green:#1a8a4d;  --u-green-bg:#e4f5ec;
  --u-amber:#b06f14;  --u-amber-bg:#faedda;
  --u-red:#c62828;    --u-red-bg:#fbe6e6;
  --u-blue:#2a63bb;   --u-blue-bg:#e6effa;
  --u-violet:#6b46c1; --u-violet-bg:#efeafc;
  --u-navy:#1b2433;
  --u-brand:#cc0c1f;
  --u-line:#dde4eb;
  --u-line-2:#eaeef3;
  --u-card-3:#eef2f7;
  --u-ink:#141a21; --u-ink-2:#47535f; --u-ink-3:#68737f;
  --u-shadow:0 1px 2px rgba(20,26,33,.05),0 6px 20px rgba(20,26,33,.06);
  --u-mono:"Ubuntu Mono","SF Mono","Cascadia Code",Consolas,monospace;
  --side-w:236px;
}

* { box-sizing:border-box; }
html, body { margin:0; padding:0; }
body { font-family:"Ubuntu",system-ui,-apple-system,sans-serif; background:#eef2f6; color:var(--u-ink); font-size:13.5px; line-height:1.5; }

/* ---- app grid ---- */
.app { display:grid; grid-template-columns:var(--side-w) 1fr; height:100vh; overflow:hidden; }

/* ---- sidebar (navy, always dark) ---- */
.side { background:#1b2433; color:#c6d2e0; display:flex; flex-direction:column; overflow:hidden; }
.side-brand { display:flex; align-items:center; gap:9px; padding:15px 16px 13px; }
.side-brand img.bug { height:27px; width:auto; display:block; }
.side-brand img.wm { height:17px; width:auto; display:block; }
.side-nav { flex:1; overflow-y:auto; padding:6px 8px 20px; }
.side-nav::-webkit-scrollbar { width:8px; } .side-nav::-webkit-scrollbar-thumb { background:rgba(255,255,255,.14); border-radius:6px; }
.nav-grp { display:flex; align-items:center; font-size:9.5px; text-transform:uppercase; letter-spacing:.11em; color:#65758c; font-weight:700; padding:15px 12px 6px; }
.nav-grp .gchev { margin-left:auto; opacity:.55; }
.nav-grp .gchev svg { width:12px; height:12px; }
.nav-item { display:flex; align-items:center; gap:9px; padding:8px 8px 8px 6px; border-radius:8px; color:#b7c4d6; font-size:12.5px; font-weight:500; cursor:pointer; transition:background .12s ease, color .12s ease; position:relative; }
.nav-item .grip { color:#42506a; flex:none; display:flex; }
.nav-item .grip svg { width:12px; height:12px; }
.nav-item > svg.ico { width:17px; height:17px; flex:none; opacity:.9; }
.nav-item .lbl { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nav-item .star { color:#f0b429; font-size:13px; flex:none; }
.nav-item .chev { color:#5a6a82; flex:none; display:flex; } .nav-item .chev svg { width:13px; height:13px; }
.nav-item:hover { background:rgba(255,255,255,.06); color:#fff; }
.nav-item:hover .grip { color:#6b7c96; }
.nav-item.active { background:linear-gradient(90deg,rgba(204,12,31,.24),rgba(204,12,31,.04)); color:#fff; box-shadow:inset 3px 0 0 #cc0c1f; }
.nav-item.active > svg.ico { opacity:1; color:#ff6b78; }
.nav-sub { display:flex; flex-direction:column; margin:2px 0 4px 8px; padding-left:10px; border-left:1px solid rgba(255,255,255,.08); }
.nav-subitem { padding:6px 10px; border-radius:7px; color:#9fb0c4; font-size:12px; cursor:pointer; }
.nav-subitem:hover { background:rgba(255,255,255,.06); color:#fff; }
.nav-subitem.active { color:#fff; font-weight:600; }
.nav-subitem.active::before { content:"•"; color:#cc0c1f; margin-right:6px; }

/* ---- main column ---- */
.main { display:flex; flex-direction:column; min-width:0; overflow:hidden; }
.topbar { display:flex; align-items:center; gap:14px; height:58px; padding:0 20px; background:#1b2433; color:#fff; flex:none; box-shadow:0 2px 10px rgba(11,18,32,.18); z-index:5; }
.omni { flex:1; max-width:600px; margin:0 auto; display:flex; align-items:center; gap:11px; background:#fff; border-radius:11px; padding:9px 16px; color:#5a6b7b; cursor:pointer; box-shadow:0 2px 10px rgba(0,0,0,.18); }
.omni img.d { height:24px; width:auto; display:block; }
.omni .txt { font-weight:700; color:#1b2433; font-size:14px; }
.omni .chev { margin-left:auto; color:#98a6b8; }
.chat-bubble { position:fixed; bottom:22px; right:22px; width:54px; height:54px; border-radius:50%; background:#1b2433; color:#fff; display:grid; place-items:center; cursor:pointer; box-shadow:0 10px 28px rgba(11,18,32,.42); z-index:150; transition:transform .14s ease, background .14s ease; }
.chat-bubble:hover { background:#2b3a52; transform:translateY(-2px); }
.chat-bubble svg { width:24px; height:24px; }
.tb-icons { display:flex; align-items:center; gap:14px; }
.tb-ic { width:20px; height:20px; color:#c6d2e0; cursor:pointer; position:relative; }
.tb-ic:hover { color:#fff; }
.tb-ic .badge { position:absolute; top:-6px; right:-7px; background:#cc0c1f; color:#fff; font-size:9px; font-weight:800; min-width:15px; height:15px; border-radius:8px; display:grid; place-items:center; padding:0 3px; }
.tb-user { display:flex; align-items:center; gap:8px; cursor:pointer; }
.tb-user .av { width:30px; height:30px; border-radius:50%; background:#2a63bb; display:grid; place-items:center; color:#fff; font-weight:700; font-size:12px; }
.tb-user .nm { font-size:12.5px; font-weight:600; color:#e6edf5; }

.content { flex:1; overflow-y:auto; background:#eef2f6; }
.content::-webkit-scrollbar { width:11px; } .content::-webkit-scrollbar-thumb { background:#c7d1dd; border-radius:8px; border:2px solid transparent; background-clip:padding-box; }
/* kill the OS scrollbar arrow buttons that styled scrollbars turn on (the stray ▲▼) */
::-webkit-scrollbar-button { display:none; width:0; height:0; }
.wrap { max-width:1180px; margin:0 auto; padding:22px 26px 60px; }

/* ---- CRM header + tabs ---- */
.crm-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:6px; }
.crm-eyebrow { font-size:11px; text-transform:uppercase; letter-spacing:.09em; color:var(--u-ink-3); font-weight:700; }
.crm-h1 { font-size:25px; font-weight:700; color:#0b1220; letter-spacing:-.01em; margin:3px 0 2px; }
.crm-sub { font-size:13px; color:var(--u-ink-2); }
.crm-tabs { display:flex; align-items:flex-end; gap:22px; border-bottom:1px solid var(--u-line); margin:14px 0 20px; overflow-x:auto; overflow-y:hidden; }
.crm-tab { padding:9px 1px; font-size:13.5px; font-weight:600; color:var(--u-ink-3); cursor:pointer; white-space:nowrap; border-bottom:2px solid transparent; margin-bottom:-1px; }
.crm-tab:hover { color:var(--u-ink); }
.crm-tab.active { color:#0b1220; border-bottom-color:var(--u-brand); }

.view { animation:fade .18s ease; }
@keyframes fade { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }

/* ---- breadcrumb ---- */
.crumbs { display:flex; align-items:center; gap:7px; font-size:12px; color:var(--u-ink-3); margin-bottom:12px; }
.crumbs a { color:var(--u-brand); cursor:pointer; font-weight:600; text-decoration:none; }
.crumbs .sep { color:#c3ccd6; }

/* ==== OVERVIEW ==== */
.ov-kpis { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }
.ov-kpi { background:#fff; border:1px solid var(--u-line); border-radius:12px; box-shadow:var(--u-shadow); padding:14px 16px; cursor:pointer; transition:box-shadow .14s ease, transform .1s ease; }
.ov-kpi:hover { box-shadow:0 4px 12px rgba(20,26,33,.12); transform:translateY(-1px); }
.ov-kpi .l { display:flex; align-items:center; gap:7px; font-size:11.5px; font-weight:600; color:var(--u-ink-3); }
.ov-kpi .l svg { width:15px; height:15px; }
.ov-kpi .v { font-family:var(--u-mono); font-weight:700; font-size:27px; margin-top:6px; letter-spacing:-.01em; }
.ov-kpi .d { font-size:11px; color:var(--u-ink-3); margin-top:2px; }
.ov-kpi.hot .v { color:var(--u-red); } .ov-kpi.good .v { color:var(--u-green); } .ov-kpi.warn .v { color:var(--u-amber); }
.ov-grid { display:grid; grid-template-columns:1.4fr 1fr; gap:16px; align-items:start; }
.ov-card { background:#fff; border:1px solid var(--u-line); border-radius:12px; box-shadow:var(--u-shadow); overflow:hidden; margin-bottom:16px; }
.ov-card-h { display:flex; align-items:center; gap:8px; padding:12px 15px; border-bottom:1px solid var(--u-line-2); }
.ov-card-h .t { font-size:13.5px; font-weight:700; }
.ov-card-h .more { margin-left:auto; font-size:12px; font-weight:600; color:var(--u-brand); cursor:pointer; }
.ov-row { display:flex; align-items:center; gap:11px; padding:10px 15px; border-bottom:1px solid var(--u-line-2); cursor:pointer; }
.ov-row:last-child { border-bottom:0; }
.ov-row:hover { background:#f6f9fc; }
.ov-row .main { flex:1; min-width:0; }
.ov-row .tl { font-size:13px; font-weight:650; color:var(--u-ink); }
.ov-row .sb { font-size:11.5px; color:var(--u-ink-3); }
.ov-row .rt { margin-left:auto; flex:none; display:flex; align-items:center; gap:8px; }

/* ==== COMPANIES ==== */
.co-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.co-card { background:#fff; border:1px solid var(--u-line); border-radius:12px; box-shadow:var(--u-shadow); padding:14px 15px; cursor:pointer; transition:box-shadow .14s ease, border-color .14s ease; }
.co-card:hover { box-shadow:0 4px 12px rgba(20,26,33,.12); border-color:#c7d1dd; }
.co-card.risk { border-left:3px solid var(--u-red); }
.co-top { display:flex; align-items:flex-start; gap:11px; }
.co-logo { width:40px; height:40px; border-radius:9px; flex:none; display:grid; place-items:center; color:#fff; font-weight:800; font-size:15px; }
.co-nm { font-size:14.5px; font-weight:700; color:var(--u-ink); }
.co-meta { font-size:11.5px; color:var(--u-ink-3); margin-top:1px; }
.co-stats { display:flex; gap:16px; margin-top:12px; padding-top:11px; border-top:1px solid var(--u-line-2); }
.co-stat .n { font-family:var(--u-mono); font-weight:700; font-size:15px; }
.co-stat .k { font-size:10px; text-transform:uppercase; letter-spacing:.04em; color:var(--u-ink-3); font-weight:600; margin-top:1px; }

/* company detail */
.cd-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:18px; align-items:start; }
.cd-id { display:flex; align-items:center; gap:14px; margin-bottom:14px; }
.cd-id .logo { width:56px; height:56px; border-radius:12px; flex:none; display:grid; place-items:center; color:#fff; font-weight:800; font-size:20px; }
.cd-id .nm { font-size:22px; font-weight:700; color:#0b1220; }
.cd-id .mt { font-size:12.5px; color:var(--u-ink-2); margin-top:1px; }
.mini-list .row { display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--u-line-2); cursor:pointer; }
.mini-list .row:last-child { border-bottom:0; }
.mini-list .row:hover .nm { color:var(--u-brand); }
.mini-list .av { width:28px; height:28px; border-radius:50%; flex:none; display:grid; place-items:center; color:#fff; font-size:10.5px; font-weight:700; }
.mini-list .nm { font-size:13px; font-weight:600; color:var(--u-ink); }
.mini-list .sb { font-size:11px; color:var(--u-ink-3); }
.mini-list .rt { margin-left:auto; }

/* ==== DEALS board ==== */
.deals-board { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(240px,1fr); gap:14px; overflow-x:auto; padding-bottom:8px; }
.deal-col { background:#eef2f7; border-radius:12px; padding:10px; min-width:0; }
.deal-col-h { display:flex; align-items:center; gap:7px; padding:2px 4px 10px; font-size:12px; font-weight:700; color:var(--u-ink-2); }
.deal-col-h .ct { margin-left:auto; font-family:var(--u-mono); font-size:11px; color:var(--u-ink-3); background:#fff; border-radius:20px; padding:1px 8px; }
.deal-card { background:#fff; border:1px solid var(--u-line); border-radius:10px; box-shadow:0 1px 2px rgba(20,26,33,.05); padding:11px 12px; margin-bottom:9px; cursor:pointer; transition:box-shadow .12s ease; }
.deal-card:hover { box-shadow:0 3px 10px rgba(20,26,33,.13); }
.deal-card.risk { border-left:3px solid var(--u-red); }
.deal-card .nm { font-size:12.5px; font-weight:700; color:var(--u-ink); line-height:1.3; }
.deal-card .co { font-size:11px; color:var(--u-ink-3); margin-top:1px; }
.deal-card .rw { display:flex; align-items:center; gap:7px; margin-top:9px; }
.deal-card .val { font-family:var(--u-mono); font-weight:700; font-size:12.5px; margin-left:auto; }

/* ==== DUPLICATES ==== */
.dup-pair { background:#fff; border:1px solid var(--u-line); border-radius:12px; box-shadow:var(--u-shadow); padding:14px 15px; margin-bottom:12px; }
.dup-head { display:flex; align-items:center; gap:8px; font-size:12px; font-weight:700; color:var(--u-amber); margin-bottom:11px; }
.dup-head svg { width:15px; height:15px; }
.dup-cards { display:grid; grid-template-columns:1fr auto 1fr; gap:12px; align-items:center; }
.dup-c { border:1px solid var(--u-line); border-radius:10px; padding:11px 12px; }
.dup-c.keep { border-color:var(--u-green); box-shadow:0 0 0 2px var(--u-green-bg); }
.dup-c .nm { font-size:13px; font-weight:700; }
.dup-c .fld { font-size:11.5px; color:var(--u-ink-2); margin-top:4px; display:flex; gap:6px; }
.dup-c .fld .k { color:var(--u-ink-3); min-width:52px; }
.dup-vs { font-size:11px; font-weight:800; color:var(--u-ink-3); text-align:center; }
.dup-acts { display:flex; gap:8px; margin-top:12px; justify-content:flex-end; }

/* ==== PROJECT bounce stub ==== */
.proj-banner { display:flex; align-items:center; gap:12px; background:linear-gradient(180deg,#fff,#f7fafc); border:1px solid var(--u-line); border-left:3px solid var(--u-brand); border-radius:12px; padding:14px 16px; margin-bottom:16px; }
.proj-banner svg { width:22px; height:22px; color:var(--u-brand); flex:none; }
.proj-banner .t { font-size:13.5px; font-weight:700; }
.proj-banner .s { font-size:12px; color:var(--u-ink-2); margin-top:1px; }
.proj-tabs { display:flex; gap:18px; border-bottom:1px solid var(--u-line); margin-bottom:16px; }
.proj-tab { padding:8px 1px; font-size:13px; font-weight:600; color:var(--u-ink-3); border-bottom:2px solid transparent; margin-bottom:-1px; }
.proj-tab.active { color:#0b1220; border-bottom-color:var(--u-brand); }

/* ==== LIST: search + filter rail (IOO pattern) ==== */
.ltools { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.lsearch { flex:1; max-width:420px; display:flex; align-items:center; gap:9px; background:#fff; border:1px solid var(--u-line); border-radius:9px; padding:8px 12px; color:var(--u-ink-3); box-shadow:var(--u-shadow); }
.lsearch svg { width:15px; height:15px; flex:none; }
.lsearch input { border:0; outline:0; font:inherit; font-size:13px; flex:1; color:var(--u-ink); background:transparent; }
.lcount { margin-left:auto; font-size:12px; color:var(--u-ink-3); }
.list-wrap { display:grid; grid-template-columns:210px minmax(0,1fr); gap:16px; align-items:start; }
.frail { background:#fff; border:1px solid var(--u-line); border-radius:12px; box-shadow:var(--u-shadow); overflow:hidden; }
.frail-h { padding:11px 14px; border-bottom:1px solid var(--u-line-2); display:flex; align-items:center; }
.frail-h .t { font-size:12px; font-weight:700; } .frail-h .clr { margin-left:auto; font-size:11px; color:var(--u-brand); cursor:pointer; font-weight:600; }
.facet { padding:11px 14px; border-bottom:1px solid var(--u-line-2); }
.facet:last-child { border-bottom:0; }
.facet .ft { font-size:10px; text-transform:uppercase; letter-spacing:.06em; color:var(--u-ink-3); font-weight:700; margin-bottom:8px; }
.frow { display:flex; align-items:center; gap:9px; padding:4px 0; cursor:pointer; font-size:12.5px; color:var(--u-ink-2); user-select:none; }
.frow .cbx { width:16px; height:16px; border:1.5px solid var(--u-line); border-radius:5px; flex:none; display:grid; place-items:center; transition:.13s ease; }
.frow .cbx svg { width:11px; height:11px; color:#fff; opacity:0; }
.frow.on .cbx { background:var(--u-brand); border-color:var(--u-brand); } .frow.on .cbx svg { opacity:1; }
.frow.on .fl { color:var(--u-ink); font-weight:600; }
.frow .fct { margin-left:auto; font-family:var(--u-mono); font-size:11px; color:var(--u-ink-3); }

/* ==== RECORD (shared by Person + Company so they match) ==== */
.rec-id { display:flex; align-items:center; gap:14px; margin-bottom:16px; }
.rec-id .mk { width:58px; height:58px; border-radius:14px; flex:none; display:grid; place-items:center; color:#fff; font-weight:800; font-size:20px; }
.rec-id .mk.round { border-radius:50%; }
.rec-id .nm { font-size:22px; font-weight:700; color:#0b1220; letter-spacing:-.01em; }
.rec-id .mt { font-size:12.5px; color:var(--u-ink-2); margin-top:2px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.rec-id .mt a { color:var(--u-brand); cursor:pointer; text-decoration:none; }
.rec-id .acts { margin-left:auto; display:flex; gap:8px; }
.rec-grid { display:grid; grid-template-columns:minmax(0,1fr) 332px; gap:18px; align-items:start; }
.rec-side .ws-h { padding:12px 14px; border:1px solid var(--u-line); border-bottom:0; border-radius:12px 12px 0 0; background:#fff; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--u-ink-3); }
.rec-side .ws-b { border:1px solid var(--u-line); border-top:0; border-radius:0 0 12px 12px; background:#fff; padding:13px 14px; }
@media (max-width:1080px){ .rec-grid{grid-template-columns:1fr;} .list-wrap{grid-template-columns:1fr;} }

/* ==== OVERVIEW triage queue ==== */
.work { background:#fff; border:1px solid var(--u-line); border-radius:12px; box-shadow:var(--u-shadow); overflow:hidden; margin-bottom:16px; }
.work-h { display:flex; align-items:center; gap:9px; padding:13px 16px; border-bottom:1px solid var(--u-line-2); }
.work-h .t { font-size:14px; font-weight:700; } .work-h .ct { font-family:var(--u-mono); font-size:12px; color:#fff; background:var(--u-brand); border-radius:20px; padding:1px 9px; }
.work-h .sub { margin-left:auto; font-size:11.5px; color:var(--u-ink-3); }
.work-item { display:flex; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--u-line-2); cursor:pointer; }
.work-item:last-child { border-bottom:0; } .work-item:hover { background:#f6f9fc; }
.work-item .pri { width:6px; height:6px; border-radius:50%; flex:none; }
.work-item .pri.hi { background:var(--u-red); } .work-item .pri.md { background:var(--u-amber); } .work-item .pri.lo { background:var(--u-blue); }
.work-item .main { flex:1; min-width:0; }
.work-item .tl { font-size:13px; font-weight:650; color:var(--u-ink); }
.work-item .why { font-size:11.5px; color:var(--u-ink-3); margin-top:1px; }
.work-item .act { flex:none; font-size:11.5px; font-weight:700; color:var(--u-brand); display:inline-flex; align-items:center; gap:5px; }
.work-item .act svg { width:13px; height:13px; }
.ov-strip { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }
.ov-fq { display:grid; grid-template-columns:1.6fr 1fr; gap:16px; margin-bottom:16px; align-items:start; }
.ov-fq .ov-card { margin-bottom:0; }
@media (max-width:1080px){ .ov-fq{ grid-template-columns:1fr; } }

/* ==== IMPORT v2 (drop-first + preview table + file types) ==== */
.imp-types { display:flex; gap:6px; margin:2px 0 12px; }
.imp-types .tp { font-size:10px; font-weight:700; color:var(--u-ink-2); background:var(--u-card-3); border-radius:5px; padding:2px 8px; }
.imp-drop { border:2px dashed var(--u-line); border-radius:12px; padding:24px; text-align:center; cursor:pointer; background:#fafbfc; transition:.15s ease; }
.imp-drop:hover { border-color:var(--u-brand); background:var(--u-red-bg); }
.imp-drop .ic { width:40px; height:40px; border-radius:10px; background:var(--u-violet-bg); color:var(--u-violet); display:grid; place-items:center; margin:0 auto 10px; }
.imp-drop .ic svg { width:20px; height:20px; }
.imp-drop .big { font-size:14px; font-weight:700; color:var(--u-ink); }
.imp-drop .sm { font-size:11.5px; color:var(--u-ink-3); margin-top:4px; }
.imp-file { display:flex; align-items:center; gap:10px; padding:10px 12px; background:var(--u-green-bg); border:1px solid rgba(26,138,77,.25); border-radius:10px; margin-bottom:12px; }
.imp-file svg { width:16px; height:16px; color:var(--u-green); } .imp-file .fn { font-size:12.5px; font-weight:650; } .imp-file .rm { margin-left:auto; color:var(--u-ink-3); cursor:pointer; }
.imp-prev { border:1px solid var(--u-line); border-radius:10px; overflow:hidden; margin-bottom:12px; }
.imp-prev table { width:100%; border-collapse:collapse; font-size:11.5px; }
.imp-prev th { text-align:left; padding:7px 10px; background:#f6f8fb; color:var(--u-ink-3); font-weight:700; font-size:10px; text-transform:uppercase; letter-spacing:.04em; border-bottom:1px solid var(--u-line); }
.imp-prev td { padding:7px 10px; border-bottom:1px solid var(--u-line-2); color:var(--u-ink-2); white-space:nowrap; }
.imp-prev tr:last-child td { border-bottom:0; }
.imp-prev tr.dup td { background:var(--u-amber-bg); }
.imp-prev .tag { font-size:9px; font-weight:800; padding:1px 5px; border-radius:4px; }
.imp-prev .tag.new { background:var(--u-green-bg); color:var(--u-green); } .imp-prev .tag.dup { background:var(--u-amber-bg); color:var(--u-amber); }
.imp-more { padding:7px 10px; font-size:11px; color:var(--u-ink-3); background:#f6f8fb; }

/* ==== OVERVIEW · War Room command center ==== */
.scoreband { background:linear-gradient(135deg,#1b2433,#2b3a52); color:#fff; border-radius:14px; padding:16px 8px; display:grid; grid-auto-flow:column; grid-auto-columns:1fr; margin-bottom:16px; box-shadow:0 8px 24px rgba(11,18,32,.25); }
.sb-m { padding:2px 18px; } .sb-m + .sb-m { border-left:1px solid rgba(255,255,255,.12); }
.sb-m .k { font-size:10.5px; color:#9fb0c4; font-weight:600; text-transform:uppercase; letter-spacing:.05em; }
.sb-m .v { font-family:var(--u-mono); font-size:25px; font-weight:800; margin-top:5px; letter-spacing:-.01em; line-height:1.05; }
.sb-m .v.hot { color:#ff7480; } .sb-m .v.good { color:#5cd68a; }
.sb-m .d { font-size:10.5px; color:#8ea0b8; margin-top:3px; }
.ov-2col { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:16px; align-items:start; }
@media (max-width:1080px){ .ov-2col{grid-template-columns:1fr;} .scoreband{grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:repeat(2,1fr);} .sb-m + .sb-m{border-left:0;} }
.crew-item { display:flex; align-items:center; gap:11px; padding:11px 15px; border-bottom:1px solid var(--u-line-2); cursor:pointer; }
.crew-item:last-child { border-bottom:0; } .crew-item:hover { background:#f6f9fc; }
.crew-item .av { width:34px; height:34px; border-radius:50%; flex:none; display:grid; place-items:center; color:#fff; font-weight:700; font-size:12px; }
.crew-item .who { min-width:0; } .crew-item .nm { font-size:13px; font-weight:650; } .crew-item .rl { font-size:11px; color:var(--u-ink-3); }
.crew-item .mt { margin-left:auto; text-align:right; flex:none; } .crew-item .mt .p { font-family:var(--u-mono); font-weight:700; font-size:13px; } .crew-item .mt .s { font-size:10.5px; color:var(--u-ink-3); }
.crew-load { height:5px; border-radius:999px; background:var(--u-card-3); overflow:hidden; margin-top:5px; width:70px; margin-left:auto; } .crew-load i { display:block; height:100%; border-radius:999px; }
.advisor { background:linear-gradient(180deg,#f3effb,#fff); border:1px solid rgba(107,70,193,.22); border-radius:12px; padding:13px 14px; }
.advisor .h { display:flex; align-items:center; gap:7px; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--u-violet); margin-bottom:9px; }
.advisor .h svg { width:14px; height:14px; }
.adv-item { display:flex; gap:8px; font-size:12px; color:var(--u-ink-2); line-height:1.45; padding:6px 0; border-bottom:1px dashed rgba(107,70,193,.15); cursor:pointer; }
.adv-item:last-child { border-bottom:0; } .adv-item:hover { color:var(--u-ink); }
.adv-item svg { width:13px; height:13px; color:var(--u-violet); flex:none; margin-top:2px; } .adv-item b { color:var(--u-ink); }

/* ==== create-record form ==== */
.form-b { padding:16px 18px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px 14px; }
.fld { display:flex; flex-direction:column; gap:5px; } .fld.full { grid-column:1 / -1; }
.fld label { font-size:11px; font-weight:700; color:var(--u-ink-2); }
.fld input, .fld select { border:1px solid var(--u-line); border-radius:8px; padding:8px 11px; font:inherit; font-size:13px; color:var(--u-ink); background:#fff; }
.fld input:focus, .fld select:focus { outline:none; border-color:var(--u-brand); box-shadow:0 0 0 3px var(--u-red-bg); }
.form-foot { display:flex; align-items:center; gap:8px; justify-content:flex-end; padding:14px 18px; border-top:1px solid var(--u-line-2); }
.form-foot .hint { margin-right:auto; font-size:11px; color:var(--u-ink-3); }

/* ==== dedup: inline notes (copied from IOO directory pattern) + button/badge ==== */
.note { display:flex; gap:9px; align-items:flex-start; border-radius:9px; padding:10px 12px; font-size:12.5px; line-height:1.45; margin-top:10px; }
.note svg { width:15px; height:15px; flex:none; margin-top:1px; }
.note.warn { background:var(--u-amber-bg); color:#8a5a10; } .note.warn b { color:#6b430a; }
.note.info { background:var(--u-blue-bg); color:var(--u-blue); }
.note a { color:inherit; font-weight:700; text-decoration:underline; cursor:pointer; }
.note .na { margin-left:auto; flex:none; }
.dupbtn { position:relative; }
.dbadge { display:inline-flex; align-items:center; justify-content:center; background:var(--u-amber); color:#fff; font-family:var(--u-mono); font-size:10px; font-weight:800; border-radius:20px; min-width:16px; height:16px; padding:0 5px; margin-left:1px; }
.u-btn.dupbtn { border-color:rgba(176,111,20,.4); color:var(--u-amber); }
.u-btn.dupbtn:hover { background:var(--u-amber-bg); }
/* duplicate review rows (modal) — match key + reason + actions, directory-style */
.dupr { border:1px solid var(--u-line); border-radius:11px; padding:13px 14px; margin-bottom:11px; }
.dupr .dh { display:flex; align-items:center; gap:8px; font-size:12px; font-weight:700; color:#8a5a10; margin-bottom:4px; }
.dupr .dh svg { width:15px; height:15px; }
.dupr .key { font-family:var(--u-mono); font-size:11px; color:var(--u-ink-3); margin-bottom:11px; }
.dupr .key b { color:var(--u-ink-2); }
.dup-two { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.dup-side { border:1px solid var(--u-line-2); border-radius:9px; padding:10px 12px; }
.dup-side.keep { border-color:rgba(26,138,77,.4); background:var(--u-green-bg); }
.dup-side .lab { font-size:9px; text-transform:uppercase; letter-spacing:.05em; color:var(--u-ink-3); font-weight:800; }
.dup-side .nm { font-size:13.5px; font-weight:700; margin:2px 0 5px; }
.dup-side .f { font-size:11.5px; color:var(--u-ink-2); display:flex; gap:6px; padding:1px 0; } .dup-side .f .k { color:var(--u-ink-3); min-width:52px; }
.dup-acts { display:flex; gap:8px; justify-content:flex-end; margin-top:12px; }

/* ==== overview: greeting + pipeline funnel ==== */
.ov-greet { font-size:13px; color:var(--u-ink-2); margin:-2px 0 2px; }
.ov-greet b { color:var(--u-ink); }
.funnel-row { display:flex; align-items:center; gap:10px; margin-bottom:9px; }
.funnel-row:last-child { margin-bottom:0; }
.funnel-row .fl { font-size:12px; color:var(--u-ink-2); min-width:92px; }
.funnel-row .fbar { flex:1; height:10px; border-radius:6px; background:var(--u-card-3); overflow:hidden; }
.funnel-row .fbar i { display:block; height:100%; border-radius:6px; background:linear-gradient(90deg,#2a63bb,#3f7fd6); }
.funnel-row .fn { font-family:var(--u-mono); font-size:11.5px; color:var(--u-ink-3); min-width:64px; text-align:right; }

/* ==== distinct Companies rows (2-line, square logo + primary contact) ==== */
.co-name { display:flex; align-items:center; gap:10px; }
.co-name .lg { width:34px; height:34px; border-radius:8px; flex:none; display:grid; place-items:center; color:#fff; font-weight:800; font-size:12px; }
.co-name .cn { font-weight:700; color:var(--u-ink); }
.co-name .ct { font-size:11px; color:var(--u-ink-3); }
.co-pc { display:inline-flex; align-items:center; gap:6px; color:var(--u-ink-2); font-size:12px; }
.co-pc:hover { color:var(--u-brand); }

/* ==== CRM Settings (in-feature, distinct from the app-wide gear) ==== */
.crm-tab-cog { margin-left:auto; display:inline-flex; align-items:center; gap:6px; padding:9px 2px 9px 12px; font-size:12.5px; font-weight:600; color:var(--u-ink-3); cursor:pointer; white-space:nowrap; border-bottom:2px solid transparent; margin-bottom:-1px; }
.crm-tab-cog:hover { color:var(--u-ink); }
.crm-tab-cog.active { color:#0b1220; border-bottom-color:var(--u-brand); }
.crm-tab-cog svg { width:15px; height:15px; }
.set-wrap { display:grid; grid-template-columns:224px minmax(0,1fr); gap:18px; align-items:start; }
.set-nav { background:#fff; border:1px solid var(--u-line); border-radius:12px; box-shadow:var(--u-shadow); overflow:hidden; }
.set-nav-item { display:flex; align-items:center; gap:9px; padding:12px 14px; font-size:13px; color:var(--u-ink-2); cursor:pointer; border-bottom:1px solid var(--u-line-2); }
.set-nav-item:last-child { border-bottom:0; }
.set-nav-item svg { width:15px; height:15px; color:var(--u-ink-3); }
.set-nav-item:hover { background:#f6f9fc; }
.set-nav-item.active { color:var(--u-brand); font-weight:700; box-shadow:inset 3px 0 0 var(--u-brand); background:var(--u-red-bg); }
.set-nav-item.active svg { color:var(--u-brand); }
.set-stage, .set-field, .set-row { display:flex; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid var(--u-line-2); font-size:13px; }
.set-stage:last-child, .set-field:last-child, .set-row:last-child { border-bottom:0; }
.set-stage .sw { width:14px; height:14px; border-radius:4px; flex:none; }
.set-stage .snm { font-weight:650; min-width:118px; }
.set-stage .badge2, .set-field .ty { font-size:10px; font-weight:700; padding:2px 7px; border-radius:20px; background:var(--u-card-3); color:var(--u-ink-2); }
.set-stage .sla, .set-row .r2 { margin-left:auto; font-size:11.5px; color:var(--u-ink-3); }
.set-field .fn2 { font-weight:600; } .set-field .obj { font-size:11px; color:var(--u-ink-3); }
.set-row .k2 { color:var(--u-ink-2); } .set-row .r2 { color:var(--u-ink-2); }
.tgl { width:38px; height:22px; border-radius:999px; background:var(--u-card-3); border:1px solid var(--u-line); position:relative; cursor:pointer; flex:none; transition:.16s; }
.tgl::after { content:""; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.2); transition:.16s; }
.tgl.on { background:var(--u-green); border-color:var(--u-green); } .tgl.on::after { left:18px; }

/* funnel conversion % */
.funnel-row .conv { font-size:10px; font-weight:700; color:var(--u-green); min-width:36px; text-align:right; }

/* Deals · SF Pipeline-Inspection metric band + movement */
.pipe-band { background:linear-gradient(135deg,#1b2433,#2b3a52); color:#fff; border-radius:12px; padding:14px 6px; display:grid; grid-auto-flow:column; grid-auto-columns:1fr; margin-bottom:14px; box-shadow:0 6px 20px rgba(11,18,32,.22); }
.pipe-m { padding:2px 16px; cursor:pointer; } .pipe-m + .pipe-m { border-left:1px solid rgba(255,255,255,.12); }
.pipe-m .k { font-size:10px; color:#9fb0c4; font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.pipe-m .v { font-family:var(--u-mono); font-size:19px; font-weight:800; margin-top:4px; letter-spacing:-.01em; }
.pipe-m.movein .v { color:#5cd68a; } .pipe-m.moveout .v { color:#ff7480; }
.pipe-m:hover .k { color:#fff; }
.dtrend { font-size:10px; font-weight:700; margin-left:5px; } .dtrend.up { color:var(--u-green); } .dtrend.down { color:var(--u-red); }
.deal-card .age { font-size:10px; color:var(--u-ink-3); font-family:var(--u-mono); margin-left:auto; }

/* toast */
#toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:#1b2433; color:#fff; padding:10px 18px; border-radius:10px; font-size:12.5px; font-weight:600; z-index:200; box-shadow:0 10px 30px rgba(0,0,0,.35); opacity:0; transition:opacity .18s ease; pointer-events:none; }

/* section header reused */
.blk { background:#fff; border:1px solid var(--u-line); border-radius:12px; box-shadow:var(--u-shadow); overflow:hidden; margin-bottom:16px; }
.blk-h { display:flex; align-items:center; gap:9px; padding:12px 15px; border-bottom:1px solid var(--u-line-2); }
.blk-h .t { font-size:13.5px; font-weight:700; }
.blk-h .ct { font-size:11.5px; color:var(--u-ink-3); font-weight:600; }
.blk-h .r { margin-left:auto; }
.blk-b { padding:14px 15px; }

/* responsive-ish */
@media (max-width:1120px){ .ov-kpis{grid-template-columns:repeat(2,1fr);} .ov-grid{grid-template-columns:1fr;} .co-grid{grid-template-columns:1fr;} .cd-grid{grid-template-columns:1fr;} }
