@font-face { font-family:"Geist"; src:url("https://cdn.jsdelivr.net/npm/@fontsource/geist@5.0.3/files/geist-latin-400-normal.woff2") format("woff2"); font-weight:400; font-display:swap; }
@font-face { font-family:"Geist"; src:url("https://cdn.jsdelivr.net/npm/@fontsource/geist@5.0.3/files/geist-latin-500-normal.woff2") format("woff2"); font-weight:500; font-display:swap; }
@font-face { font-family:"Geist"; src:url("https://cdn.jsdelivr.net/npm/@fontsource/geist@5.0.3/files/geist-latin-600-normal.woff2") format("woff2"); font-weight:600; font-display:swap; }
@font-face { font-family:"Geist Mono"; src:url("https://cdn.jsdelivr.net/npm/@fontsource/geist-mono@5.0.3/files/geist-mono-latin-400-normal.woff2") format("woff2"); font-weight:400; font-display:swap; }

*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }

:root {
  --bg-page:#f7f7f7; --bg-card:#ffffff; --bg-hover:#fafafa; --bg-active:#f5f5f5;
  --fg-primary:#171717; --fg-secondary:#737373; --fg-muted:#6d6d6d; --fg-placeholder:#a3a3a3;
  --border:#e5e5e5; --border-subtle:#ebebeb;
  --shadow-card:rgba(12,10,9,0.08) 0px 2px 6px, rgba(23,23,23,0.08) 0px 0px 0px 1px;
  --shadow-sm:rgba(0,0,0,0.05) 0px 1px 2px;
  --radius:12px; --radius-sm:8px; --radius-badge:100px;
  --font-display:"Geist",system-ui,sans-serif;
  --font-body:"Inter",system-ui,sans-serif;
  --font-mono:"Geist Mono",ui-monospace,monospace;
  --sidebar-w:240px;
  --badge-success-bg:rgb(203,235,214); --badge-success-fg:rgb(51,117,62);
  --badge-warning-bg:rgba(248,215,73,0.25); --badge-warning-fg:#8a6d00;
  --badge-info-bg:rgba(71,159,219,0.15); --badge-info-fg:#266ef0;
  --badge-error-bg:rgba(218,49,74,0.12); --badge-error-fg:#da314a;
  --badge-default-bg:#f5f5f5; --badge-default-fg:#737373;
  --badge-committed-bg:rgba(38,110,240,0.08); --badge-committed-fg:#1a4fd0;
  --accent-mint:#4CD6C2; --accent-sky:#6EC6F5;
}

/* ─── BRAND THEME OVERRIDE (IronArc 2026 Brand Guidelines) ─────────────── */
:root[data-theme="brand"] {
  --bg-page:#0D1B2A; --bg-card:#13263B; --bg-hover:#1A2F47; --bg-active:#1F3853;
  --fg-primary:#E3EAF1; --fg-secondary:#8D9EB1; --fg-muted:#8D9EB1; --fg-placeholder:#6A7C8F;
  --border:rgba(200,208,216,0.14); --border-subtle:rgba(200,208,216,0.08);
  --shadow-card:rgba(0,0,0,0.4) 0px 2px 8px, rgba(76,214,194,0.10) 0px 0px 0px 1px;
  --shadow-sm:rgba(0,0,0,0.3) 0px 1px 2px;
  --font-display:"EB Garamond", Georgia, serif;
  --badge-success-bg:rgba(76,214,194,0.18); --badge-success-fg:#4CD6C2;
  --badge-info-bg:rgba(110,198,245,0.18); --badge-info-fg:#6EC6F5;
  --badge-warning-bg:rgba(248,215,73,0.18); --badge-warning-fg:#F8D749;
  --badge-error-bg:rgba(218,49,74,0.20); --badge-error-fg:#FF6B82;
  --badge-default-bg:rgba(200,208,216,0.10); --badge-default-fg:#C8D0D8;
  --badge-committed-bg:rgba(110,198,245,0.14); --badge-committed-fg:#6EC6F5;
}
:root[data-theme="light"] {
  --bg-page:#E7EBF0; --bg-card:#EDF1F6; --bg-hover:#DCE3EB; --bg-active:#D8DFE8;
  --fg-primary:#18222E; --fg-secondary:#566170; --fg-muted:#566170; --fg-placeholder:#8A929C;
  --border:rgba(24,34,46,0.13); --border-subtle:rgba(24,34,46,0.07);
  --shadow-card:rgba(24,34,46,0.14) 0px 2px 8px, rgba(19,138,123,0.10) 0px 0px 0px 1px;
  --shadow-sm:rgba(24,34,46,0.10) 0px 1px 2px;
  --font-display:"EB Garamond", Georgia, serif;
  --accent-mint:#138A7B; --accent-sky:#3F6EA0;
  --badge-success-bg:rgba(19,138,123,0.14); --badge-success-fg:#138A7B;
  --badge-info-bg:rgba(63,110,160,0.14); --badge-info-fg:#3F6EA0;
  --badge-warning-bg:rgba(148,111,0,0.14); --badge-warning-fg:#946F00;
  --badge-error-bg:rgba(176,42,62,0.12); --badge-error-fg:#B02A3E;
  --badge-default-bg:rgba(24,34,46,0.08); --badge-default-fg:#566170;
  --badge-committed-bg:rgba(63,110,160,0.12); --badge-committed-fg:#3F6EA0;
}
:root[data-theme="brand"] .page-title h2,
:root[data-theme="brand"] .section-title,
:root[data-theme="brand"] .stat-value { letter-spacing:0; font-weight:500; }
:root[data-theme="brand"] .nav-section-label,
:root[data-theme="brand"] .notes-group-date { color:var(--accent-mint); letter-spacing:0.18em; }
:root[data-theme="brand"] em, :root[data-theme="brand"] i { color:var(--accent-sky); font-style:italic; }
:root[data-theme="brand"] .notes-save-btn { background:var(--accent-mint); color:#0D1B2A; }
:root[data-theme="brand"] .notes-save-btn:hover { opacity:0.9; }
:root[data-theme="brand"] .btn-sync-now { background:transparent; color:var(--accent-mint); border-color:rgba(76,214,194,0.4); }
:root[data-theme="brand"] .btn-sync-now:hover { color:#0D1B2A; background:var(--accent-mint); border-color:var(--accent-mint); }
:root[data-theme="brand"] .sidebar-logo h1 { color:var(--fg-primary); }
:root[data-theme="brand"] .nav-link.active { color:var(--accent-mint); }
:root[data-theme="brand"] .deal-dot { background:var(--accent-mint); }
:root[data-theme="brand"] .nav-link { color:var(--fg-secondary); }
:root[data-theme="brand"] .nav-link:hover { color:var(--fg-primary); }
:root[data-theme="brand"] body { background:var(--bg-page); color:var(--fg-primary); }
:root[data-theme="light"] .page-title h2,
:root[data-theme="light"] .section-title,
:root[data-theme="light"] .stat-value { letter-spacing:0; font-weight:500; }
:root[data-theme="light"] .nav-section-label,
:root[data-theme="light"] .notes-group-date { color:var(--accent-mint); letter-spacing:0.18em; }
:root[data-theme="light"] em, :root[data-theme="light"] i { color:var(--accent-sky); font-style:italic; }
:root[data-theme="light"] .notes-save-btn { background:var(--accent-mint); color:#FFFFFF; }
:root[data-theme="light"] .notes-save-btn:hover { opacity:0.9; }
:root[data-theme="light"] .btn-sync-now { background:transparent; color:var(--accent-mint); border-color:rgba(19,138,123,0.4); }
:root[data-theme="light"] .btn-sync-now:hover { color:#FFFFFF; background:var(--accent-mint); border-color:var(--accent-mint); }
:root[data-theme="light"] .sidebar-logo h1 { color:var(--fg-primary); }
:root[data-theme="light"] .nav-link.active { color:var(--accent-mint); }
:root[data-theme="light"] .deal-dot { background:var(--accent-mint); }
:root[data-theme="light"] .nav-link { color:var(--fg-secondary); }
:root[data-theme="light"] .nav-link:hover { color:var(--fg-primary); }
:root[data-theme="light"] body { background:var(--bg-page); color:var(--fg-primary); }

/* Theme toggle pill */
.btn-theme-toggle { display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); font-family:var(--font-body); font-size:12px; font-weight:500; cursor:pointer; border:1px solid var(--border); white-space:nowrap; transition:color 0.15s, border-color 0.15s; }
.btn-theme-toggle:hover { color:var(--fg-primary); border-color:var(--fg-placeholder); }
.btn-theme-toggle .tt-dot { width:8px; height:8px; border-radius:50%; background:var(--accent-mint); display:inline-block; }
:root[data-theme="brand"] .btn-theme-toggle .tt-dot { background:var(--accent-sky); }
.auth-user-pill { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); font-size:12px; font-weight:500; max-width:280px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.auth-user-pill strong { color:var(--fg-primary); font-weight:600; overflow:hidden; text-overflow:ellipsis; }
.auth-user-pill button { border:0; background:transparent; color:var(--fg-muted); font:inherit; cursor:pointer; padding:0; }
.auth-user-pill button:hover { color:var(--fg-primary); }

html { height:100%; }
body { font-family:var(--font-body); font-size:14px; line-height:1.4; letter-spacing:-0.2px; color:var(--fg-primary); background:var(--bg-page); height:100vh; overflow:hidden; -webkit-font-smoothing:antialiased; }

/* ─── LOCK SCREEN ─────────────────────────────────────── */
.lock-screen { position:fixed; inset:0; z-index:9999; background:#000; display:flex; align-items:center; justify-content:center; flex-direction:column; }
.lock-screen.hidden { display:none; }
.lock-logo { font-family:var(--font-display); font-size:18px; font-weight:600; letter-spacing:3px; color:#fff; text-transform:uppercase; margin-bottom:8px; }
.lock-sub { font-size:13px; color:#737373; margin-bottom:32px; }
.lock-form { display:flex; flex-direction:column; align-items:center; gap:12px; width:280px; }
.lock-input { width:100%; padding:10px 14px; border:1px solid #333; border-radius:var(--radius-sm); background:#111; color:#fff; font-family:var(--font-body); font-size:14px; outline:none; text-align:center; letter-spacing:1px; transition:border-color 0.2s; }
.lock-input:focus { border-color:#555; }
.lock-input::placeholder { color:#555; letter-spacing:0; }
.lock-btn { width:100%; padding:10px; border:none; border-radius:var(--radius-sm); background:#fff; color:#000; font-family:var(--font-body); font-size:13px; font-weight:500; cursor:pointer; transition:opacity 0.15s; }
.lock-btn:hover { opacity:0.85; }
.lock-btn-secondary { background:#111; color:#fff; border:1px solid #333; }
.lock-btn-secondary:hover { border-color:#555; opacity:1; }
.lock-divider { display:flex; align-items:center; gap:10px; width:100%; color:#555; font-size:11px; text-transform:uppercase; letter-spacing:0.08em; }
.lock-divider::before, .lock-divider::after { content:""; height:1px; background:#222; flex:1; }
.lock-fallback { display:flex; flex-direction:column; align-items:center; gap:12px; width:100%; }
.lock-fallback[hidden] { display:none; }
.lock-error { font-size:12px; color:#da314a; height:16px; }
.admin-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
.admin-toolbar-left { display:flex; align-items:center; gap:10px; flex:1; min-width:260px; }
.admin-search { flex:1; min-width:240px; max-width:420px; }
.user-name-cell { display:flex; flex-direction:column; gap:2px; min-width:180px; }
.user-name-cell strong { font-weight:600; color:var(--fg-primary); }
.user-name-cell span { color:var(--fg-secondary); font-size:12px; }
.user-status { display:inline-flex; align-items:center; justify-content:center; min-width:70px; padding:3px 8px; border-radius:var(--radius-badge); font-size:11px; font-weight:500; text-transform:capitalize; }
.user-status-active { background:var(--badge-success-bg); color:var(--badge-success-fg); }
.user-status-disabled { background:var(--badge-warning-bg); color:var(--badge-warning-fg); }
.user-status-revoked { background:var(--badge-error-bg); color:var(--badge-error-fg); }
.user-status-invited { background:var(--badge-info-bg); color:var(--badge-info-fg); }
.user-actions { display:flex; justify-content:flex-end; align-items:center; gap:6px; flex-wrap:wrap; }
.user-action-btn { border:1px solid var(--border); background:var(--bg-card); color:var(--fg-secondary); border-radius:var(--radius-sm); padding:5px 8px; font:inherit; font-size:12px; cursor:pointer; }
.user-action-btn:hover { color:var(--fg-primary); border-color:var(--fg-placeholder); }
.user-auth-dot { display:inline-flex; align-items:center; gap:6px; color:var(--fg-secondary); font-size:12px; white-space:nowrap; }
.user-auth-dot::before { content:""; display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--badge-error-fg); }
.user-auth-dot.linked::before { background:var(--badge-success-fg); }

/* ─── JOY LOADERS (rotate on unlock) ──────────────────── */
.ld-stage { display:flex; flex-direction:column; align-items:center; gap:24px; }
.ld-art { display:flex; align-items:center; justify-content:center; min-height:200px; }
.ld-caption { font-family:var(--font-body); font-size:14px; color:#a3a3a3; letter-spacing:-0.2px; }
.ld-sub { font-size:12px; color:#595959; font-family:var(--font-mono); letter-spacing:0.5px; }

/* globe */
.ld-globe-wrap { position:relative; width:180px; height:180px; }
.ld-globe-wrap > svg { position:absolute; inset:0; }
.ld-sphere { animation:ldGlobeSpin 12s linear infinite; transform-origin:center; }
.ld-pin { position:absolute; transform:translate(-50%, -100%); animation:ldPinDrop 1.2s ease-out; }
@keyframes ldGlobeSpin { to { transform:rotate(360deg); } }
@keyframes ldPinDrop {
  0%   { transform:translate(-50%,-220%) scale(0.5); opacity:0; }
  40%  { transform:translate(-50%,-100%) scale(1.15); opacity:1; }
  55%  { transform:translate(-50%,-100%) scale(0.95); }
  70%  { transform:translate(-50%,-100%) scale(1); }
  100% { transform:translate(-50%,-100%) scale(1); opacity:1; }
}

/* race car */
.ld-race { position:relative; width:420px; height:110px; overflow:hidden; }
.ld-track-top { position:absolute; bottom:14px; left:0; right:0; height:1px; background:#fff; }
.ld-track-bot { position:absolute; bottom:8px; left:0; right:0; height:1px; background:#fff; opacity:0.4; }
.ld-kerb { position:absolute; bottom:10px; left:0; right:0; height:3px; display:flex; animation:ldKerb 280ms linear infinite; }
.ld-kerb > div { width:10px; height:3px; flex-shrink:0; }
.ld-speedlines { position:absolute; bottom:48px; left:30px; display:flex; flex-direction:column; gap:5px; animation:ldSpeedFade 3s cubic-bezier(0.5,0,0.5,1) infinite; }
.ld-speedlines > div { height:1px; background:#fff; }
.ld-car { position:absolute; bottom:14px; animation:ldDrive 3s cubic-bezier(0.5,0,0.5,1) infinite; }
.ld-crew { position:absolute; bottom:22px; left:180px; display:flex; gap:78px; opacity:0; animation:ldCrew 3s cubic-bezier(0.5,0,0.5,1) infinite; }
.ld-lolly { position:absolute; bottom:42px; left:232px; opacity:0; animation:ldLolly 3s cubic-bezier(0.5,0,0.5,1) infinite; text-align:center; }
.ld-lolly-stick { width:2px; height:30px; background:#fff; margin:0 auto; }
.ld-lolly-sign { padding:3px 8px; background:#fff; color:#000; font-family:var(--font-display); font-weight:700; font-size:9px; letter-spacing:1px; border-radius:2px; }
@keyframes ldDrive {
  0%   { left:-160px; }
  35%  { left:170px; }
  62%  { left:170px; }
  100% { left:480px; }
}
@keyframes ldSpeedFade {
  0%,34%   { opacity:0.6; }
  35%,62%  { opacity:0; }
  63%,100% { opacity:0.6; }
}
@keyframes ldCrew {
  0%,36%    { opacity:0; }
  40%,60%   { opacity:1; }
  62%,100%  { opacity:0; }
}
@keyframes ldLolly {
  0%,36%    { opacity:0; transform:translateY(-6px); }
  40%,58%   { opacity:1; transform:translateY(0); }
  62%,100%  { opacity:0; transform:translateY(-6px); }
}
@keyframes ldKerb { to { transform:translateX(-20px); } }

/* bull & bear */
.ld-bb { position:relative; width:280px; height:120px; }
.ld-bb-ground { position:absolute; bottom:8px; left:20px; right:20px; height:1px; background:#fff; opacity:0.3; }
.ld-bull { position:absolute; bottom:8px; left:0; animation:ldBullWalk 3s ease-in-out infinite; }
.ld-bear { position:absolute; bottom:8px; right:0; animation:ldBearWalk 3s ease-in-out infinite; }
.ld-spark { position:absolute; left:50%; bottom:44px; transform:translateX(-50%); animation:ldSpark 3s ease-in-out infinite; }
@keyframes ldBullWalk {
  0%   { transform:translateX(-40px); }
  30%  { transform:translateX(60px); }
  55%  { transform:translateX(60px); }
  70%  { transform:translateX(-40px); }
  100% { transform:translateX(-40px); }
}
@keyframes ldBearWalk {
  0%   { transform:translateX(40px); }
  30%  { transform:translateX(-60px); }
  55%  { transform:translateX(-60px); }
  70%  { transform:translateX(40px); }
  100% { transform:translateX(40px); }
}
@keyframes ldSpark {
  0%,34%    { opacity:0; transform:translateX(-50%) scale(0.5) rotate(0deg); }
  38%,48%   { opacity:1; transform:translateX(-50%) scale(1) rotate(30deg); }
  55%,100%  { opacity:0; transform:translateX(-50%) scale(0.5) rotate(0deg); }
}

.app-content { display:none; }
.app-content.visible { display:flex; width:100%; height:100vh; }

/* ─── SIDEBAR ──────────────────────────────────────────── */
.sidebar { width:var(--sidebar-w); min-width:var(--sidebar-w); background:var(--bg-card); border-right:1px solid var(--border); display:flex; flex-direction:column; height:100vh; position:fixed; left:0; top:0; z-index:10; }
.sidebar-logo { padding:24px 20px 20px; border-bottom:1px solid var(--border); }
.sidebar-logo h1 { font-family:var(--font-display); font-size:15px; font-weight:600; letter-spacing:2.5px; color:var(--fg-primary); text-transform:uppercase; }
.sidebar-logo .logo-sub { font-family:var(--font-body); font-size:11px; color:var(--fg-placeholder); letter-spacing:0; margin-top:2px; font-weight:400; text-transform:none; }
.sidebar-nav { padding:12px 8px; flex:1; }
.nav-section-label { font-size:10px; font-weight:500; text-transform:uppercase; letter-spacing:0.8px; color:var(--fg-placeholder); padding:12px 12px 6px; }
.nav-link { display:flex; align-items:center; gap:10px; padding:8px 12px; border-radius:6px; font-size:13px; font-weight:400; color:#595959; cursor:pointer; transition:background 0.15s ease,color 0.15s ease; text-decoration:none; }
.nav-link:hover { background:var(--bg-hover); color:var(--fg-primary); }
.nav-link.active { background:var(--bg-active); color:#000; font-weight:500; }
.nav-link.nav-hidden { display:none; }
.nav-link svg { width:16px; height:16px; flex-shrink:0; opacity:0.5; }
.nav-link.active svg { opacity:0.85; }
.nav-link .nav-count { margin-left:auto; font-size:11px; font-family:var(--font-mono); color:var(--fg-placeholder); font-weight:400; }
.sidebar-footer { padding:16px 20px; border-top:1px solid var(--border); position:relative; }
.deal-context { display:flex; align-items:center; gap:8px; cursor:pointer; user-select:none; border-radius:6px; padding:4px 6px; margin:-4px -6px; transition:background 0.12s; }
.deal-context:hover { background:var(--bg-active); }
.deal-context .deal-caret { margin-left:auto; opacity:0.4; transition:transform 0.12s; flex-shrink:0; }
.sidebar-footer.open .deal-context .deal-caret { transform:rotate(180deg); opacity:0.7; }
.deal-dot { width:6px; height:6px; border-radius:50%; background:rgb(51,117,62); flex-shrink:0; }
.deal-context > span { font-size:12px; color:var(--fg-secondary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.deal-context .deal-name { font-weight:500; color:var(--fg-primary); }
.fund-switcher { position:absolute; bottom:calc(100% - 4px); left:12px; right:12px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); box-shadow:var(--shadow-card); padding:4px; z-index:200; display:none; max-height:60vh; overflow-y:auto; }
.sidebar-footer.open .fund-switcher { display:block; }
.fund-switcher-item { display:flex; flex-direction:column; gap:2px; padding:8px 10px; border-radius:4px; cursor:pointer; font-size:12px; color:var(--fg-primary); }
.fund-switcher-item:hover { background:var(--bg-active); }
.fund-switcher-item.active { background:var(--bg-active); }
.fund-switcher-item .fs-line1 { display:flex; align-items:center; gap:6px; }
.fund-switcher-item .fs-name { font-weight:500; }
.fund-switcher-item .fs-meta { font-size:11px; color:var(--fg-muted); }
.fund-switcher-item .fs-dot { width:5px; height:5px; border-radius:50%; flex-shrink:0; }
.fund-switcher-item .fs-dot.fundraising { background:rgb(51,117,62); }
.fund-switcher-item .fs-dot.closed { background:var(--fg-muted); }
.fund-switcher-divider { height:1px; background:var(--border); margin:4px 0; }

/* ─── MAIN ─────────────────────────────────────────────── */
.main { margin-left:var(--sidebar-w); flex:1; overflow-y:auto; height:100vh; }
.main-inner { padding:32px 40px 80px; }

/* ─── HEADER ───────────────────────────────────────────── */
.page-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:32px; position:relative; z-index:100; }
.page-title h2 { font-family:var(--font-display); font-size:28px; font-weight:500; letter-spacing:-0.56px; color:var(--fg-primary); line-height:1.2; }
.page-title .subtitle { font-size:13px; color:var(--fg-secondary); margin-top:4px; }
.page-title h2:has(.vehicle-header-title) { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.vehicle-header-edit { display:inline-flex; align-items:center; padding:4px 9px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); font-family:var(--font-body); font-size:11px; font-weight:500; letter-spacing:0; cursor:pointer; white-space:nowrap; }
.vehicle-header-edit:hover { color:var(--fg-primary); border-color:var(--fg-placeholder); background:var(--bg-hover); }
/* Deal pill in page header — Owen's discoverability fix from 5/13. Sidebar
   popover stays as a secondary entry point. */
.deal-pill-wrap { position:relative; flex:0 0 auto; margin-top:6px; }
.deal-pill { display:flex; align-items:center; gap:8px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-badge); padding:6px 12px; font-size:13px; font-weight:500; color:var(--fg-primary); cursor:pointer; transition:background 0.12s, border-color 0.12s; font-family:inherit; }
.deal-pill:hover { background:var(--bg-active); border-color:var(--fg-placeholder); }
.deal-pill .dp-dot { width:6px; height:6px; border-radius:50%; background:rgb(51,117,62); flex:0 0 6px; }
.deal-pill .dp-caret { color:var(--fg-secondary); }
.deal-pill-panel { position:absolute; top:calc(100% + 6px); right:0; min-width:280px; max-width:340px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-card); padding:8px; z-index:1000; }
.deal-pill-wrap { z-index:1000; }
.deal-pill-search { width:100%; box-sizing:border-box; padding:8px 10px; font-size:13px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-elevated, var(--bg-card)); color:var(--fg-primary); margin-bottom:6px; font-family:inherit; }
.deal-pill-search:focus { outline:none; border-color:var(--fg-secondary); }
.deal-pill-list { max-height:340px; overflow-y:auto; display:flex; flex-direction:column; gap:2px; }
.deal-pill-item { display:flex; flex-direction:column; gap:2px; padding:8px 10px; border-radius:var(--radius-sm); cursor:pointer; transition:background 0.1s; }
.deal-pill-item:hover { background:var(--bg-active); }
.deal-pill-item.active { background:var(--bg-active); border:1px solid var(--border); }
.deal-pill-item .dpi-line1 { display:flex; align-items:center; gap:6px; font-size:13px; font-weight:500; color:var(--fg-primary); }
.deal-pill-item .dpi-dot { width:6px; height:6px; border-radius:50%; flex:0 0 6px; }
.deal-pill-item .dpi-dot.fundraising { background:rgb(51,117,62); }
.deal-pill-item .dpi-dot.closed { background:var(--fg-placeholder); }
.deal-pill-item .dpi-meta { font-size:11px; color:var(--fg-secondary); padding-left:12px; }
.deal-pill-empty { padding:14px 10px; text-align:center; font-size:12px; color:var(--fg-placeholder); }

/* ─── STAT CARDS ───────────────────────────────────────── */
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(120px, 1fr)); gap:8px; margin-bottom:20px; }
.stat-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 14px; box-shadow:var(--shadow-sm); }
.stat-value { font-family:var(--font-display); font-size:22px; font-weight:500; letter-spacing:-0.44px; color:var(--fg-primary); line-height:1.15; }
.stat-label { font-size:11px; color:var(--fg-secondary); margin-top:3px; letter-spacing:-0.1px; }
.stat-sub { font-size:10px; color:var(--fg-tertiary,var(--fg-secondary)); margin-top:2px; font-variant-numeric:tabular-nums; opacity:0.75; }

/* ─── BADGES ───────────────────────────────────────────── */
.badge { display:inline-flex; align-items:center; padding:3px 10px; border-radius:var(--radius-badge); font-size:12px; font-weight:500; letter-spacing:-0.1px; white-space:nowrap; line-height:1.5; }
.badge-success { background:var(--badge-success-bg); color:var(--badge-success-fg); }
.badge-warning { background:var(--badge-warning-bg); color:var(--badge-warning-fg); }
.badge-info { background:var(--badge-info-bg); color:var(--badge-info-fg); }
.badge-error { background:var(--badge-error-bg); color:var(--badge-error-fg); }
.badge-default { background:var(--badge-default-bg); color:var(--badge-default-fg); }
.badge-committed { background:var(--badge-committed-bg); color:var(--badge-committed-fg); }

/* ─── STATUS BAR ───────────────────────────────────────── */
.status-bar { display:flex; gap:8px; margin-bottom:32px; }
.status-chip { display:flex; align-items:center; gap:6px; padding:8px 14px; border-radius:var(--radius-badge); font-size:13px; font-weight:500; }
.status-chip .chip-count { font-family:var(--font-mono); font-size:13px; font-weight:400; }

/* ─── SECTIONS ─────────────────────────────────────────── */
.section { margin-bottom:32px; }
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.section-title { font-family:var(--font-display); font-size:16px; font-weight:500; letter-spacing:-0.32px; color:var(--fg-primary); }
.section-count { font-size:12px; color:var(--fg-placeholder); font-family:var(--font-mono); }

/* ─── PENDING CARDS ────────────────────────────────────── */
.pending-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.pending-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:10px; animation:pc-in 0.22s ease; }
@keyframes pc-in { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }

/* ─── MEETING NOTES ────────────────────────────────────── */
.notes-input-row { display:flex; gap:8px; margin-bottom:16px; align-items:stretch; }
.notes-input { flex:1; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); font-family:var(--font-body); font-size:13px; color:var(--fg-primary); resize:vertical; min-height:44px; outline:none; transition:border-color 0.15s; }
.notes-input:focus { border-color:var(--fg-muted); }
.notes-input::placeholder { color:var(--fg-placeholder); }
.notes-rich-wrap { flex:1; display:flex; flex-direction:column; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); overflow:hidden; transition:border-color 0.15s; }
.notes-rich-wrap:focus-within { border-color:var(--fg-muted); }
.notes-toolbar { display:flex; align-items:center; gap:2px; padding:4px 6px; border-bottom:1px solid var(--border-subtle); background:var(--bg-page); }
.notes-tb-btn { display:inline-flex; align-items:center; justify-content:center; width:26px; height:24px; padding:0; border:none; background:transparent; color:var(--fg-secondary); font-size:12px; cursor:pointer; border-radius:3px; font-family:var(--font-body); }
.notes-tb-btn:hover { background:var(--bg-active); color:var(--fg-primary); }
.notes-tb-sep { width:1px; height:14px; background:var(--border); margin:0 4px; }
.notes-richtext { border:none; padding:10px 12px; min-height:44px; max-height:200px; overflow-y:auto; line-height:1.5; }
.notes-richtext:empty::before { content:attr(data-placeholder); color:var(--fg-placeholder); pointer-events:none; }
.notes-richtext ul, .notes-richtext ol { margin:4px 0; padding-left:20px; }
.notes-richtext p { margin:4px 0; }
.notes-richtext a { color:var(--fg-primary); text-decoration:underline; }
.notes-save-btn { padding:10px 16px; border:none; border-radius:var(--radius-sm); background:var(--fg-primary); color:#fff; font-family:var(--font-body); font-size:13px; font-weight:500; cursor:pointer; transition:opacity 0.15s; white-space:nowrap; align-self:flex-start; }
.notes-save-btn:hover { opacity:0.85; }
.notes-mic-btn { padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); font-family:var(--font-body); font-size:13px; cursor:pointer; transition:all 0.15s; align-self:flex-start; display:inline-flex; align-items:center; gap:6px; height:42px; }
.notes-mic-btn:hover { border-color:var(--fg-muted); color:var(--fg-primary); }
.notes-mic-btn.active { background:var(--badge-error-bg); border-color:var(--badge-error-fg); color:var(--badge-error-fg); }
.notes-mic-btn .mic-dot { width:7px; height:7px; border-radius:50%; background:currentColor; display:none; animation:micPulse 1.1s ease-in-out infinite; }
.notes-mic-btn.active .mic-dot { display:inline-block; }
@keyframes micPulse { 0%,100% { opacity:1; transform:scale(1) } 50% { opacity:0.45; transform:scale(0.85) } }
.notes-list { display:flex; flex-direction:column; gap:16px; }
.notes-list-compact { gap:10px; }
.notes-preview-card { display:flex; align-items:flex-start; gap:10px; padding:10px 14px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); }
.notes-preview-card .note-text { max-height:86px; overflow:hidden; }
.notes-preview-actions { display:flex; align-items:center; gap:8px; }
.notes-open-btn { display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-primary); font-family:var(--font-body); font-size:12px; font-weight:500; cursor:pointer; transition:background 0.15s,border-color 0.15s,color 0.15s; }
.notes-open-btn:hover { border-color:var(--fg-muted); background:var(--bg-hover); }
.notes-group { display:flex; flex-direction:column; gap:6px; }
.notes-group-date { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:0.8px; color:var(--fg-placeholder); padding-bottom:4px; border-bottom:1px solid var(--border-subtle); }
.note-item { display:flex; align-items:flex-start; gap:10px; padding:10px 14px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); transition:border-color 0.15s; }
.note-item:hover { border-color:var(--border-subtle); }
.note-text { flex:1; font-size:13px; color:var(--fg-primary); line-height:1.5; word-wrap:break-word; }
.note-text p { margin:0 0 8px; }
.note-text p:last-child { margin-bottom:0; }
.note-text ul, .note-text ol { margin:4px 0 8px; padding-left:20px; list-style-position:outside; }
.note-text ul { list-style:disc; }
.note-text ul ul { list-style:circle; margin:2px 0; }
.note-text ul ul ul { list-style:square; }
.note-text li { margin:2px 0; }
.note-text li > ul, .note-text li > ol { margin:2px 0 4px; }
.note-text strong { font-weight:600; }
.note-text em { font-style:italic; }
.note-text a { color:var(--accent, #2563eb); text-decoration:underline; }
.note-badge { font-size:9px; font-weight:500; text-transform:uppercase; letter-spacing:0.5px; color:var(--fg-placeholder); background:var(--bg-active); padding:3px 6px; border-radius:4px; flex-shrink:0; align-self:flex-start; }
.note-del { background:none; border:none; color:var(--fg-placeholder); cursor:pointer; font-size:18px; line-height:1; padding:0 4px; border-radius:4px; transition:color 0.15s,background 0.15s; }
.note-del:hover { color:var(--badge-error-fg); background:var(--badge-error-bg); }
.note-edit-btn { background:none; border:none; color:var(--fg-placeholder); cursor:pointer; font-size:13px; line-height:1; padding:0 4px; border-radius:4px; transition:color 0.15s,background 0.15s; align-self:flex-start; }
.note-edit-btn:hover { color:var(--fg-primary); background:var(--bg-active); }
.note-edited { font-size:9px; font-weight:500; text-transform:uppercase; letter-spacing:0.5px; color:var(--fg-placeholder); background:var(--bg-active); padding:3px 6px; border-radius:4px; flex-shrink:0; align-self:flex-start; }
.note-editor { border:1px solid var(--border); border-radius:var(--radius-sm); padding:8px 10px; min-height:60px; outline:none; font-size:13px; line-height:1.5; }
.note-editor:focus { border-color:var(--fg-primary); }
.note-edit-hint { font-size:11px; color:var(--fg-placeholder); margin-top:4px; font-style:italic; }
.note-edit-actions { display:flex; gap:8px; margin-top:8px; }
.note-edit-actions button { padding:5px 12px; font-size:12px; font-weight:500; border-radius:4px; cursor:pointer; font-family:var(--font-body); }
.note-edit-actions button[disabled] { opacity:0.6; cursor:wait; }
.note-edit-save { background:var(--fg-primary); color:var(--bg-card); border:1px solid var(--fg-primary); }
.note-edit-cancel { background:var(--bg-card); color:var(--fg-secondary); border:1px solid var(--border); }
.note-edit-cancel:hover { border-color:var(--fg-muted); color:var(--fg-primary); }
.note-item-editing { background:var(--bg-active); border-radius:var(--radius-sm); padding:8px; }
.notes-empty { padding:20px; text-align:center; color:var(--fg-placeholder); font-size:13px; font-style:italic; }
.notes-overlay { position:fixed; inset:0; z-index:9994; pointer-events:none; }
.notes-panel { position:absolute; top:16px; right:16px; bottom:16px; width:min(430px, calc(100vw - var(--sidebar-w) - 40px)); min-width:360px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); box-shadow:-10px 16px 40px rgba(0,0,0,0.16), var(--shadow-card); transform:translateX(calc(100% + 24px)); transition:transform 0.2s ease; pointer-events:auto; display:flex; flex-direction:column; overflow:hidden; }
.notes-overlay.open .notes-panel { transform:translateX(0); }
#notes-overlay-content { display:flex; flex:1; min-height:0; flex-direction:column; }
.notes-panel-header { padding:18px 20px 16px; border-bottom:1px solid var(--border); display:flex; align-items:flex-start; justify-content:space-between; gap:12px; background:var(--bg-card); }
.notes-panel-kicker { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:0.8px; color:var(--fg-placeholder); margin-bottom:4px; }
.notes-panel-title { font-family:var(--font-display); font-size:17px; font-weight:500; color:var(--fg-primary); letter-spacing:-0.24px; line-height:1.2; }
.notes-panel-subtitle { font-size:12px; color:var(--fg-muted); margin-top:4px; line-height:1.35; }
.notes-panel-close { width:30px; height:30px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); cursor:pointer; font-size:20px; line-height:1; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.notes-panel-close:hover { background:var(--bg-active); color:var(--fg-primary); }
.notes-panel-body { flex:1; min-height:0; padding:18px 20px 22px; overflow-y:auto; display:flex; flex-direction:column; gap:16px; }
.notes-target-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 10px; border:1px solid var(--border-subtle); border-radius:var(--radius-sm); background:var(--bg-page); font-size:12px; color:var(--fg-secondary); }
.notes-target-row strong { color:var(--fg-primary); font-weight:500; }
.notes-overlay-compose { flex-direction:column; align-items:stretch; margin-bottom:0; }
.notes-overlay-compose .notes-richtext { min-height:96px; }
.notes-overlay-compose-actions { display:flex; align-items:center; gap:8px; justify-content:flex-end; }
.notes-overlay-compose .notes-save-btn, .notes-overlay-compose .notes-mic-btn { align-self:auto; }
.notes-panel-list-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:2px; }
.notes-panel-list-title { font-family:var(--font-display); font-size:14px; font-weight:500; color:var(--fg-primary); }
.notes-panel-list-count { font-family:var(--font-mono); font-size:11px; color:var(--fg-placeholder); }
.notes-panel-list { padding-bottom:4px; }
/* /add slash-command preview (F2) */
.slash-preview { display:none; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-page); font-size:12px; color:var(--fg-secondary); }
.slash-preview.active { display:block; }
.slash-preview-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.slash-preview-row-bare .slash-preview-detail-muted { color:var(--fg-muted); font-family:var(--font-body); font-size:12px; font-style:italic; }
.slash-preview-header { font-family:var(--font-mono); font-size:11px; text-transform:uppercase; letter-spacing:0.5px; color:var(--fg-placeholder); margin-right:6px; }
.slash-preview-firm { font-family:var(--font-display); font-size:14px; font-weight:500; color:var(--fg-primary); }
.slash-preview-detail { font-family:var(--font-mono); font-size:12px; color:var(--fg-secondary); }
.slash-preview-link-chip { display:inline-block; padding:1px 7px; border-radius:var(--radius-pill, 10px); background:var(--bg-active); color:var(--fg-primary); font-size:10px; font-weight:500; text-transform:uppercase; letter-spacing:0.5px; }
.slash-preview-actions { margin-left:auto; display:flex; gap:6px; }
.slash-preview-btn { padding:6px 10px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-primary); font-size:12px; cursor:pointer; }
.slash-preview-btn.primary { background:var(--fg-primary); color:var(--bg-card); border-color:var(--fg-primary); }
.slash-preview-btn:hover { background:var(--bg-active); }
.slash-preview-btn.primary:hover { opacity:0.92; }
/* Syntax hint footer — always visible inside the preview panel */
.slash-preview-hint { margin-top:8px; padding-top:8px; border-top:1px dashed var(--border-subtle); display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:10.5px; color:var(--fg-muted); line-height:1.5; }
.slash-preview-hint-label { font-family:var(--font-mono); font-size:9.5px; text-transform:uppercase; letter-spacing:0.6px; color:var(--fg-placeholder); margin-right:2px; }
.slash-preview-hint code { font-family:var(--font-mono); font-size:10.5px; padding:1px 5px; border-radius:3px; background:var(--bg-card); border:1px solid var(--border-subtle); color:var(--fg-secondary); }
.slash-preview-hint-sep { color:var(--fg-placeholder); }
.slash-preview-hint-eg { color:var(--fg-muted); }
/* In-note success pill rendered after a /add commits */
.note-add-pill-success { display:inline-flex; align-items:center; gap:6px; padding:2px 8px; margin:0 2px; border:1px solid var(--border-subtle); border-radius:var(--radius-pill, 12px); background:var(--bg-active); color:var(--fg-primary); font-size:11px; font-family:var(--font-mono); cursor:pointer; }
.note-add-pill-success:hover { background:var(--bg-card); border-color:var(--fg-primary); }
/* @-mention chip (F4) */
.mention { display:inline-block; padding:1px 7px; margin:0 4px 0 1px; border-radius:var(--radius-sm); background:var(--bg-active); color:var(--fg-primary); font-weight:500; cursor:pointer; line-height:1.45; }
.mention:hover { background:var(--fg-primary); color:var(--bg-card); }
/* Mention autocomplete picker — opens when user types @ in a note */
.mention-picker { display:none; max-height:240px; overflow-y:auto; padding:4px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); box-shadow:0 4px 12px rgba(0,0,0,0.06); }
.mention-picker.active { display:block; }
.mention-item { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:var(--radius-sm); cursor:pointer; font-size:13px; }
.mention-item:hover, .mention-item.active { background:var(--bg-active); }
.mention-item-type { width:18px; height:18px; border-radius:50%; background:var(--border); color:var(--fg-secondary); font-size:10px; font-weight:600; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
.mention-item-type.t-entity { background:var(--fg-primary); color:var(--bg-card); }
.mention-item-name { font-weight:500; color:var(--fg-primary); }
.mention-item-sub { font-size:11px; color:var(--fg-muted); margin-left:auto; font-family:var(--font-mono); }
.mention-empty { padding:8px 10px; font-size:12px; color:var(--fg-muted); }
/* Surfaced-on-mention badge in CRM contact history */
.crm-history-mention-badge { display:inline-block; margin-left:6px; padding:0 6px; border-radius:var(--radius-pill, 10px); border:1px solid var(--border); background:var(--bg-page); color:var(--fg-secondary); font-size:10px; font-weight:500; text-transform:uppercase; letter-spacing:0.5px; }
/* Clickable history row when it represents a note mention — opens the note */
.crm-history-row.crm-history-mention[data-mention-note-id] { cursor:pointer; transition:background 0.12s; }
.crm-history-row.crm-history-mention[data-mention-note-id]:hover { background:var(--bg-active); }
/* Brief flash when a note is scroll-targeted from a history row click */
@keyframes noteHighlightFlash { 0% { background:var(--bg-active); } 100% { background:transparent; } }
.note-highlight-flash { animation: noteHighlightFlash 1.6s ease-out; border-radius:var(--radius-sm); }
.pending-card-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.pending-name { font-family:var(--font-display); font-size:14px; font-weight:500; color:var(--fg-primary); letter-spacing:-0.14px; cursor:pointer; }
.pending-name:hover { text-decoration:underline; }
.pending-entity { font-size:12px; color:var(--fg-secondary); margin-top:1px; }
.pending-amount { font-family:var(--font-mono); font-size:18px; font-weight:400; color:var(--fg-primary); letter-spacing:-0.2px; }
.pending-notes { font-size:12px; color:var(--fg-muted); font-style:italic; line-height:1.5; }

/* ─── ACTIVITY LIST ────────────────────────────────────── */
.activity-list { display:flex; flex-direction:column; }
.activity-item { display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--border-subtle); }
.activity-item:last-child { border-bottom:none; }
.activity-dot { width:6px; height:6px; border-radius:50%; background:var(--border); flex-shrink:0; }
.activity-text { font-size:13px; color:var(--fg-primary); flex:1; }
.activity-text strong { font-weight:500; }
.activity-amount { font-family:var(--font-mono); font-size:13px; color:var(--fg-secondary); flex-shrink:0; min-width:90px; text-align:right; }

/* ─── FILTER BAR ───────────────────────────────────────── */
.filter-bar { display:flex; gap:10px; margin-bottom:16px; align-items:center; }
/* Vehicles directory (fund/deal search) */
.vehicles-filter-bar { flex-wrap:wrap; }
.vehicles-group-toggle { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--fg-secondary); font-family:var(--font-body); cursor:pointer; user-select:none; }
.vehicles-group-toggle input { cursor:pointer; }
.vehicles-group { margin-bottom:22px; }
.vehicles-group-header { font-size:13px; font-weight:600; color:var(--fg-primary); text-transform:uppercase; letter-spacing:0.5px; margin:0 0 10px; display:flex; align-items:center; gap:8px; }
.vehicles-group-header .count { font-family:var(--font-mono); font-size:12px; font-weight:500; color:var(--fg-placeholder); }
.filter-input { padding:8px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); font-family:var(--font-body); font-size:13px; color:var(--fg-primary); background:var(--bg-card); outline:none; transition:border-color 0.15s; min-width:220px; }
.filter-input:focus { border-color:#000; }
.filter-input::placeholder { color:var(--fg-placeholder); }
.filter-select { padding:8px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); font-family:var(--font-body); font-size:13px; color:var(--fg-primary); background:var(--bg-card); outline:none; cursor:pointer; appearance:none; background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; padding-right:32px; }
.filter-select:focus { border-color:#000; }
.filter-count { font-size:12px; color:var(--fg-placeholder); font-family:var(--font-mono); margin-left:auto; }
.filter-chip { padding:8px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); font-family:var(--font-body); font-size:13px; color:var(--fg-primary); background:var(--bg-card); cursor:pointer; transition:background 0.15s,color 0.15s,border-color 0.15s; }
.filter-chip:hover { border-color:#000; }
.filter-chip.is-active { background:var(--fg-primary); color:var(--bg-card); border-color:var(--fg-primary); }

/* ─── DATA TABLES ──────────────────────────────────────── */
.table-wrapper { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow-x:auto; box-shadow:var(--shadow-sm); }
.data-table { width:100%; border-collapse:collapse; font-size:13px; }
.data-table thead th { font-size:11px; font-weight:500; text-transform:uppercase; letter-spacing:0.5px; color:var(--fg-placeholder); padding:10px 12px; text-align:left; border-bottom:1px solid var(--border); white-space:nowrap; position:sticky; top:0; background:var(--bg-card); cursor:pointer; user-select:none; transition:color 0.15s; }
.data-table thead th:hover { color:var(--fg-primary); }
.data-table thead th.align-right, .data-table tbody td.align-right { text-align:right; }
.data-table thead th .sort-icon { display:inline-block; margin-left:4px; font-size:10px; color:var(--fg-placeholder); opacity:0; transition:opacity 0.15s; }
.data-table thead th:hover .sort-icon { opacity:0.5; }
.data-table thead th.sort-active .sort-icon { opacity:1; color:var(--fg-primary); }
.data-table tbody tr { transition:background 0.1s ease; }
.data-table tbody tr:hover { background:var(--bg-hover); }
.data-table tbody td { padding:8px 12px; border-bottom:1px solid var(--border-subtle); color:var(--fg-primary); vertical-align:middle; }
.data-table tbody tr:last-child td { border-bottom:none; }
.data-table .col-mono { font-family:var(--font-mono); text-align:right; letter-spacing:-0.2px; white-space:nowrap; }
.data-table .col-email { color:var(--fg-secondary); font-size:12px; }
.data-table .col-type { color:var(--fg-secondary); font-size:12px; }
.data-table .col-investor { font-weight:500; cursor:pointer; }
.data-table .col-investor:hover { text-decoration:underline; }
.data-table .col-entity { color:var(--fg-secondary); font-size:12px; max-width:200px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.data-table .col-share-class { color:var(--fg-muted); font-size:12px; font-family:var(--font-mono); white-space:nowrap; }
.data-table .col-muted { color:var(--fg-placeholder); }
.data-table .col-clause { min-width:360px; max-width:560px; }
.fee-cell { display:inline-flex; align-items:baseline; gap:6px; justify-content:flex-end; }
.fee-cell .fee-pct { font-size:10px; color:var(--fg-placeholder); font-weight:400; }
.data-table tfoot td { padding:10px 12px; border-top:2px solid var(--border); font-weight:500; font-size:13px; }
.data-table tfoot .col-mono { font-family:var(--font-mono); font-weight:500; }

/* ─── SIDE LETTER CLAUSES ─────────────────────────────── */
.clause-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.clause-stat-grid { grid-template-columns:repeat(4,minmax(140px,1fr)); }
.clause-text { font-size:12px; line-height:1.45; color:var(--fg-primary); max-height:78px; overflow:hidden; position:relative; }
.clause-text.expanded { max-height:none; }
.clause-source { display:flex; flex-direction:column; gap:3px; max-width:260px; position:relative; }
.clause-source a { color:var(--fg-primary); text-decoration:underline; text-underline-offset:2px; }
.clause-path { font-size:11px; color:var(--fg-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.clause-meta { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:6px; font-size:11px; color:var(--fg-muted); }
.clause-reason { margin-top:5px; font-size:11px; line-height:1.35; color:var(--fg-secondary); max-width:540px; }
.clause-priority { font-family:var(--font-mono); font-size:10px; color:var(--fg-placeholder); text-transform:uppercase; letter-spacing:0.4px; }
.clause-preview { display:none; position:absolute; right:0; top:calc(100% + 6px); width:360px; height:240px; z-index:150; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); box-shadow:var(--shadow-card); overflow:hidden; }
.clause-source:hover .clause-preview { display:block; }
.clause-preview iframe { width:100%; height:100%; border:0; background:var(--bg-page); }
.clause-preview-empty { padding:18px; color:var(--fg-muted); font-size:12px; line-height:1.5; }
.review-actions { display:flex; gap:4px; align-items:center; flex-wrap:wrap; min-width:190px; }
.review-btn { display:inline-flex; align-items:center; justify-content:center; min-width:28px; height:28px; padding:0 8px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); font-family:var(--font-body); font-size:11px; cursor:pointer; transition:color 0.15s,border-color 0.15s,background 0.15s; }
.review-btn:hover { color:var(--fg-primary); border-color:var(--fg-muted); background:var(--bg-hover); }
.review-btn.active { color:var(--fg-primary); border-color:var(--fg-primary); background:var(--bg-active); font-weight:500; }
.clause-empty { padding:40px; text-align:center; color:var(--fg-placeholder); font-size:13px; font-style:italic; border:1px solid var(--border); border-radius:var(--radius); background:var(--bg-card); }

/* ─── KNOWLEDGE BASE CATALOG ──────────────────────────── */
.kb-workbench { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; flex-wrap:wrap; }
.kb-view-tabs { display:inline-flex; gap:4px; padding:4px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); }
.kb-view-tab { border:0; border-radius:6px; background:transparent; color:var(--fg-secondary); font-family:var(--font-body); font-size:12px; font-weight:500; padding:8px 12px; cursor:pointer; white-space:nowrap; }
.kb-view-tab:hover { color:var(--fg-primary); background:var(--bg-hover); }
.kb-view-tab.active { color:var(--fg-primary); background:var(--bg-active); box-shadow:inset 0 0 0 1px var(--border); }
.kb-subview { display:none; }
.kb-subview.active { display:block; }
.kb-review-hub { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.kb-review-card { border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); padding:14px; min-width:0; }
.kb-review-title { font-size:13px; font-weight:600; color:var(--fg-primary); margin-bottom:5px; }
.kb-review-count { font-family:var(--font-display); font-size:28px; font-weight:600; line-height:1; margin-bottom:6px; }
.kb-review-copy { font-size:12px; color:var(--fg-secondary); line-height:1.45; min-height:34px; }
.kb-review-actions { margin-top:12px; display:flex; gap:6px; flex-wrap:wrap; }
.kb-stat-grid { grid-template-columns:repeat(4,minmax(140px,1fr)); }
.kb-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.kb-path { max-width:360px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; color:var(--fg-muted); }
.kb-doc-name { font-weight:500; color:var(--fg-primary); max-width:360px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.kb-doc-name a { color:var(--fg-primary); text-decoration:underline; text-underline-offset:2px; }
.kb-guardrail-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:16px; }
.kb-guardrail { border:1px solid var(--border); border-radius:var(--radius-sm); padding:10px 12px; background:var(--bg-card); min-width:0; }
.kb-guardrail-title { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--fg-primary); margin-bottom:5px; }
.kb-guardrail-text { font-size:11px; color:var(--fg-secondary); line-height:1.35; }
.kb-actions { display:flex; gap:4px; align-items:center; flex-wrap:wrap; min-width:170px; }
.kb-action-btn { border:1px solid var(--border); background:var(--bg-card); color:var(--fg-secondary); border-radius:6px; padding:5px 8px; font-size:11px; font-family:var(--font-body); cursor:pointer; white-space:nowrap; }
.kb-action-btn:hover { border-color:var(--fg-muted); color:var(--fg-primary); background:var(--bg-hover); }
.kb-action-btn.active { color:var(--fg-primary); border-color:var(--fg-primary); background:var(--bg-active); font-weight:500; }
.kb-empty { padding:40px; text-align:center; color:var(--fg-placeholder); font-size:13px; font-style:italic; border:1px solid var(--border); border-radius:var(--radius); background:var(--bg-card); }

/* ─── COMPANY IDENTITY GRAPH ──────────────────────────── */
.company-stat-grid { grid-template-columns:repeat(4,minmax(140px,1fr)); }
.company-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.company-name { font-weight:600; color:var(--fg-primary); max-width:300px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.company-meta { margin-top:5px; display:flex; gap:5px; flex-wrap:wrap; color:var(--fg-muted); font-size:11px; }
.company-pill { display:inline-flex; align-items:center; max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border:1px solid var(--border); border-radius:999px; padding:2px 7px; background:var(--bg-active); color:var(--fg-secondary); font-size:11px; }
.company-actions { display:flex; gap:4px; align-items:center; flex-wrap:wrap; min-width:190px; }
.company-panel-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(340px,0.8fr); gap:16px; align-items:start; }
.company-review-item { border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); padding:12px; margin-bottom:8px; }
.company-review-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:6px; }
.company-review-title { font-weight:600; font-size:13px; color:var(--fg-primary); }
.company-review-note { color:var(--fg-secondary); font-size:12px; line-height:1.4; margin-top:5px; }
.company-empty { padding:40px; text-align:center; color:var(--fg-placeholder); font-size:13px; font-style:italic; border:1px solid var(--border); border-radius:var(--radius); background:var(--bg-card); }
@media (max-width: 1180px) {
  .company-panel-grid, .kb-guardrail-grid, .kb-review-hub { grid-template-columns:1fr; }
}

/* ─── ALLOCATION BAR ───────────────────────────────────── */
.alloc-cell { display:flex; align-items:center; gap:8px; justify-content:flex-end; }
.alloc-bar-track { width:48px; height:5px; background:var(--border-subtle); border-radius:100px; overflow:hidden; flex-shrink:0; }
.alloc-bar-fill { height:100%; background:var(--fg-primary); border-radius:100px; min-width:1px; transition:width 0.3s ease; }
.alloc-pct { font-family:var(--font-mono); font-size:11px; color:var(--fg-secondary); min-width:38px; text-align:right; }

/* ─── CLICKABLE STAT CARDS ────────────────────────────── */
.stat-card { position:relative; }
.stat-card:hover { z-index:50; }
.stat-card.clickable { cursor:pointer; transition:box-shadow 0.15s,transform 0.15s; }
.stat-card.clickable:hover { box-shadow:var(--shadow-card); transform:translateY(-1px); }
.stat-card.clickable .stat-label { text-decoration:underline; text-decoration-color:var(--border); text-underline-offset:2px; }

/* ─── STAT CARD TOOLTIPS — "how this is calculated" ───── */
.stat-tip { position:absolute; top:calc(100% + 6px); left:0; z-index:50; min-width:220px; max-width:280px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); box-shadow:0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06), 0 0 0 1px rgba(23,23,23,0.04); padding:10px 12px; opacity:0; transform:translateY(-4px); pointer-events:none; transition:opacity 0.12s ease,transform 0.12s ease; text-align:left; }
.stat-card:hover .stat-tip { opacity:1; transform:translateY(0); }
.stat-card.tip-right .stat-tip { left:auto; right:0; }
.stat-tip-title { font-family:var(--font-display); font-size:12px; font-weight:500; color:var(--fg-primary); letter-spacing:-0.1px; margin-bottom:4px; }
.stat-tip-body { font-size:11px; color:var(--fg-secondary); line-height:1.45; margin-bottom:6px; }
.stat-tip-formula { font-family:var(--font-mono); font-size:11px; color:var(--fg-primary); padding:6px 8px; background:var(--bg-page); border-radius:4px; margin-bottom:6px; word-break:break-word; }
.stat-tip-source { font-size:10px; color:var(--fg-placeholder); border-top:1px solid var(--border-subtle); padding-top:6px; line-height:1.4; }
.stat-tip-source .mono { font-family:var(--font-mono); color:var(--fg-secondary); }

/* ─── STATUS DROPDOWN ─────────────────────────────────── */
.status-dropdown-wrap { position:relative; display:inline-flex; }
.status-dropdown-trigger { cursor:pointer; transition:opacity 0.15s; }
.status-dropdown-trigger:hover { opacity:0.8; }
.status-dropdown { position:absolute; top:calc(100% + 4px); right:0; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); box-shadow:var(--shadow-card); z-index:100; min-width:170px; padding:4px; display:none; }
/* Cap-table dropdowns sit inside a wrapper with overflow-x:auto, so right-anchored
   dropdowns get clipped on the left edge. Anchor them left instead so they extend
   rightward into the Investor column area. */
#cap-table .status-dropdown { right:auto; left:0; }
.status-dropdown.open { display:block; }
.status-dropdown-item { padding:8px 12px; font-size:12px; font-family:var(--font-body); cursor:pointer; border-radius:4px; display:flex; align-items:center; gap:8px; transition:background 0.1s; white-space:nowrap; }
.status-dropdown-item:hover { background:var(--bg-hover); }
.status-dropdown-item .sdi-dot { width:6px; height:6px; border-radius:50%; flex-shrink:0; }
.status-dropdown-item.sdi-active { font-weight:500; background:var(--bg-active); }

/* ─── ACTIVITY NAME LINK ──────────────────────────────── */
.activity-name-link { cursor:pointer; }
.activity-name-link:hover { text-decoration:underline; }

/* ─── ADD / EDIT BUTTONS ──────────────────────────────── */
.header-actions { display:flex; flex-direction:column; align-items:flex-end; gap:8px; flex-shrink:0; }
.btn-add { display:inline-flex; align-items:center; gap:6px; padding:7px 14px; border-radius:var(--radius-sm); background:#000; color:#fff; font-family:var(--font-body); font-size:13px; font-weight:500; cursor:pointer; border:none; transition:opacity 0.15s; white-space:nowrap; }
.btn-add:hover { opacity:0.85; }
.btn-add svg { width:13px; height:13px; flex-shrink:0; }
.btn-sync-now { display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); font-family:var(--font-body); font-size:12px; font-weight:500; cursor:pointer; border:1px solid var(--border); transition:color 0.15s,border-color 0.15s,opacity 0.15s; white-space:nowrap; }
.btn-sync-now:hover { color:var(--fg-primary); border-color:var(--fg-placeholder); }
.btn-sync-now:disabled { opacity:0.55; cursor:not-allowed; }
.btn-sync-now svg { width:13px; height:13px; flex-shrink:0; }
.btn-sync-now.is-syncing svg { animation:syncspin 0.9s linear infinite; }
.btn-notes { display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); font-family:var(--font-body); font-size:12px; font-weight:500; cursor:pointer; border:1px solid var(--border); transition:color 0.15s,border-color 0.15s,background 0.15s; white-space:nowrap; }
.btn-notes:hover, .btn-notes.active { color:var(--fg-primary); border-color:var(--fg-placeholder); background:var(--bg-hover); }
.btn-notes svg { width:13px; height:13px; flex-shrink:0; }
.btn-notes-count { font-family:var(--font-mono); font-size:10px; min-width:16px; height:16px; padding:0 5px; border-radius:999px; background:var(--bg-active); color:var(--fg-secondary); display:inline-flex; align-items:center; justify-content:center; }
@keyframes syncspin { from{transform:rotate(0)} to{transform:rotate(360deg)} }
.toast-stack { position:fixed; bottom:20px; right:20px; z-index:9999; display:flex; flex-direction:column; gap:8px; }
.toast-stack .toast { background:var(--bg-card); color:var(--fg-primary); border:1px solid var(--border); border-radius:var(--radius-sm); padding:10px 14px; font-size:13px; box-shadow:var(--shadow-card); min-width:240px; }
.toast-stack .toast.err { border-color:var(--badge-error-fg,#c92a2a); color:var(--badge-error-fg,#c92a2a); }
.btn-edit { display:inline-flex; align-items:center; gap:5px; padding:6px 14px; border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); font-family:var(--font-body); font-size:12px; font-weight:500; cursor:pointer; border:1px solid var(--border); transition:color 0.15s,border-color 0.15s; margin-left:auto; flex-shrink:0; }
.btn-edit:hover { color:var(--fg-primary); border-color:var(--fg-placeholder); }
.status-chip.clickable { cursor:pointer; transition:opacity 0.15s; }
.status-chip.clickable:hover { opacity:0.75; }

/* ─── MODAL ───────────────────────────────────────────── */
.modal-overlay { position:fixed; inset:0; z-index:9998; background:rgba(0,0,0,0.4); display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity 0.2s; pointer-events:none; }
.modal-overlay.open { opacity:1; pointer-events:auto; }
.modal { background:var(--bg-card); border-radius:var(--radius); box-shadow:0 16px 48px rgba(0,0,0,0.15), var(--shadow-card); width:480px; max-width:calc(100vw - 40px); max-height:calc(100vh - 80px); overflow-y:auto; transform:translateY(8px); transition:transform 0.2s; }
.modal-overlay.open .modal { transform:translateY(0); }
.modal.modal-wide { width:820px; }
.modal-header { display:flex; align-items:center; justify-content:space-between; padding:20px 24px 0; }
.modal-title { font-family:var(--font-display); font-size:18px; font-weight:500; letter-spacing:-0.36px; }
.modal-close { width:28px; height:28px; border:none; background:none; cursor:pointer; display:flex; align-items:center; justify-content:center; border-radius:6px; color:var(--fg-secondary); font-size:16px; transition:background 0.15s,color 0.15s; }
.modal-close:hover { background:var(--bg-active); color:var(--fg-primary); }
.modal-body { padding:20px 24px 24px; }
.modal-row { display:flex; gap:12px; margin-bottom:14px; }
.modal-field { display:flex; flex-direction:column; gap:4px; flex:1; }
.modal-label { font-size:11px; font-weight:500; text-transform:uppercase; letter-spacing:0.5px; color:var(--fg-placeholder); }
.modal-input { padding:8px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); font-family:var(--font-body); font-size:13px; color:var(--fg-primary); background:var(--bg-card); outline:none; transition:border-color 0.15s; width:100%; }
.modal-input:focus { border-color:#000; }
.modal-input::placeholder { color:var(--fg-placeholder); }
.modal-hint { font-size:12px; color:var(--fg-placeholder); margin-top:-4px; margin-bottom:8px; min-height:16px; font-style:italic; }
.modal-hint.modal-hint-match { color:var(--badge-success-fg); font-style:normal; }
.modal-hint.crm-touch-hint { font-size:12.5px; color:var(--fg-muted); margin:10px 0 2px; line-height:1.45; min-height:0; font-style:normal; }
.modal-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:20px; padding-top:16px; border-top:1px solid var(--border-subtle); }
.modal-btn { padding:8px 20px; border-radius:var(--radius-sm); font-family:var(--font-body); font-size:13px; font-weight:500; cursor:pointer; transition:opacity 0.15s; border:none; }
.modal-btn-primary { background:#000; color:#fff; }
.modal-btn-primary:hover { opacity:0.85; }
.modal-btn-secondary { background:var(--bg-card); color:var(--fg-primary); border:1px solid var(--border); }
.modal-btn-secondary:hover { background:var(--bg-hover); }

/* ─── DISCREPANCY BANNER ──────────────────────────────── */
.disc-banner { display:flex; align-items:center; gap:12px; padding:12px 16px; background:rgba(248,215,73,0.12); border:1px solid rgba(248,215,73,0.3); border-radius:var(--radius-sm); margin-bottom:24px; }
.disc-banner svg { width:16px; height:16px; flex-shrink:0; color:var(--badge-warning-fg); }
.disc-banner-text { flex:1; font-size:13px; color:var(--fg-primary); }
.disc-banner-text strong { font-weight:500; }
.disc-banner-btn { font-size:12px; font-weight:500; color:var(--badge-warning-fg); cursor:pointer; white-space:nowrap; background:none; border:none; font-family:var(--font-body); text-decoration:underline; text-underline-offset:2px; }
.disc-banner-btn:hover { color:var(--fg-primary); }
.disc-panel { display:none; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:20px 24px; margin-bottom:24px; box-shadow:var(--shadow-sm); }
.disc-panel.open { display:block; }
.disc-panel h4 { font-family:var(--font-display); font-size:14px; font-weight:500; margin-bottom:12px; }
.disc-item { display:flex; align-items:flex-start; gap:10px; padding:10px 0; border-bottom:1px solid var(--border-subtle); font-size:13px; }
.disc-item:last-child { border-bottom:none; }
.disc-item .disc-status { flex-shrink:0; font-size:11px; font-weight:500; padding:2px 8px; border-radius:var(--radius-badge); }
.disc-item .disc-body { flex:1; }
.disc-resolve-btn { flex-shrink:0; align-self:flex-start; padding:4px 10px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-primary); font-family:var(--font-body); font-size:11px; font-weight:500; cursor:pointer; transition:background 0.15s,border-color 0.15s; }
.disc-resolve-btn:hover { background:var(--bg-hover); border-color:var(--fg-muted); }
.resolve-opts { display:flex; flex-direction:column; gap:8px; margin:8px 0 16px; }
.resolve-opt { display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:10px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); cursor:pointer; text-align:left; font-family:var(--font-body); transition:background 0.15s,border-color 0.15s; }
.resolve-opt:hover { background:var(--bg-hover); border-color:var(--fg-primary); }
.resolve-opt-src { font-size:10px; font-weight:500; text-transform:uppercase; letter-spacing:0.5px; color:var(--fg-placeholder); }
.resolve-opt-val { font-size:14px; color:var(--fg-primary); font-weight:500; }
.disc-resolved { background:var(--badge-success-bg); color:var(--badge-success-fg); }
.disc-open { background:var(--badge-warning-bg); color:var(--badge-warning-fg); }

/* ─── TOAST NOTIFICATION ──────────────────────────────── */
.toast-container { position:fixed; bottom:24px; right:24px; z-index:10010; display:flex; flex-direction:column; gap:8px; pointer-events:none; }
.toast { background:var(--fg-primary); color:#fff; padding:10px 16px; border-radius:var(--radius-sm); font-size:13px; font-family:var(--font-body); box-shadow:0 8px 24px rgba(0,0,0,0.2); pointer-events:auto; display:flex; align-items:center; gap:8px; transform:translateY(8px); opacity:0; animation:toastIn 0.3s ease forwards; }
.toast svg { width:14px; height:14px; flex-shrink:0; color:var(--badge-success-fg); }
.toast.toast-error { background:linear-gradient(var(--badge-error-bg),var(--badge-error-bg)), var(--bg-card); color:var(--badge-error-fg); border:1px solid var(--badge-error-fg); }
.toast.toast-error svg { color:var(--badge-error-fg); }
.toast.toast-info { background:var(--bg-card); color:var(--fg-secondary); border:1px solid var(--border); }
.toast.toast-info svg { color:var(--fg-secondary); }
@keyframes toastIn { to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { to { opacity:0; transform:translateY(-8px); } }

/* ─── CMD+K SEARCH PALETTE ────────────────────────────── */
.cmdk-overlay { position:fixed; inset:0; z-index:9995; background:rgba(0,0,0,0.4); display:flex; align-items:flex-start; justify-content:center; padding-top:min(11vh,96px); opacity:0; transition:opacity 0.15s; pointer-events:none; }
.cmdk-overlay.open { opacity:1; pointer-events:auto; }
.cmdk { background:var(--bg-card); border-radius:var(--radius); box-shadow:0 16px 48px rgba(0,0,0,0.2); width:760px; max-width:calc(100vw - 48px); overflow:hidden; transform:scale(0.97); transition:transform 0.15s; }
.cmdk-overlay.open .cmdk { transform:scale(1); }
.cmdk-input-wrap { display:flex; align-items:center; gap:10px; padding:14px 18px; border-bottom:1px solid var(--border); }
.cmdk-input-wrap svg { width:16px; height:16px; color:var(--fg-placeholder); flex-shrink:0; }
.cmdk-input { flex:1; border:none; outline:none; font-family:var(--font-body); font-size:15px; color:var(--fg-primary); background:none; }
.cmdk-input::placeholder { color:var(--fg-placeholder); }
.cmdk-kbd { font-size:11px; font-family:var(--font-mono); color:var(--fg-placeholder); background:var(--bg-active); padding:2px 6px; border-radius:4px; border:1px solid var(--border); }
.cmdk-results { max-height:min(62vh,560px); overflow-y:auto; padding:8px; }
.cmdk-group-label { font-size:10px; font-weight:500; text-transform:uppercase; letter-spacing:0.5px; color:var(--fg-placeholder); padding:8px 10px 4px; }
.cmdk-item { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:6px; cursor:pointer; transition:background 0.1s; }
.cmdk-item:hover, .cmdk-item.active { background:var(--bg-active); }
.cmdk-item-icon { width:28px; height:28px; border-radius:50%; background:var(--bg-active); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-size:11px; font-weight:500; color:var(--fg-secondary); flex-shrink:0; }
.cmdk-item-text { flex:1; }
.cmdk-item-name { font-size:13px; font-weight:500; color:var(--fg-primary); }
.cmdk-item-sub { font-size:11px; color:var(--fg-secondary); }
.cmdk-item-badge { font-size:10px; padding:2px 8px; border-radius:var(--radius-badge); }
.cmdk-empty { padding:24px; text-align:center; font-size:13px; color:var(--fg-placeholder); }
.cmdk-footer { border-top:1px solid var(--border); padding:8px 18px; display:flex; gap:16px; }
.cmdk-hint { font-size:11px; color:var(--fg-placeholder); display:flex; align-items:center; gap:4px; }

/* ─── DEAL NARRATIVE ──────────────────────────────────── */
.deal-narrative { font-size:14px; color:var(--fg-secondary); line-height:1.6; margin-bottom:24px; }
.deal-narrative strong { color:var(--fg-primary); font-weight:500; }

/* ─── EXPORT BUTTON ───────────────────────────────────── */
.btn-export { display:inline-flex; align-items:center; gap:5px; padding:6px 12px; border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); font-family:var(--font-body); font-size:12px; font-weight:500; cursor:pointer; border:1px solid var(--border); transition:color 0.15s,border-color 0.15s; }
.btn-export:hover { color:var(--fg-primary); border-color:var(--fg-placeholder); }
.btn-export svg { width:12px; height:12px; }

/* ─── 1.6 — PIPELINE LAYOUT (Zones; merged Overview+Pipeline) ─── */
.layout-zones { display:flex; flex-direction:column; gap:16px; }
.pipeline-funnel-slot { margin-bottom:2px; }
.pipeline-funnel-section { border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); box-shadow:var(--shadow-sm); overflow:hidden; }
.pipeline-funnel-section > summary { display:flex; align-items:center; justify-content:flex-start; gap:12px; padding:14px 16px; cursor:pointer; list-style:none; text-align:left; }
.pipeline-funnel-section > summary::-webkit-details-marker { display:none; }
.pipeline-funnel-section > summary::before { content:'›'; color:var(--fg-muted); font-size:20px; line-height:1; transform:rotate(0deg); transition:transform .15s ease; }
.pipeline-funnel-section[open] > summary::before { transform:rotate(90deg); }
.pipeline-funnel-section > summary > span { display:flex; flex-direction:column; gap:3px; min-width:0; }
.pipeline-funnel-section > summary strong { font-family:var(--font-display); font-size:16px; font-weight:500; color:var(--fg-primary); }
.pipeline-funnel-section > summary small { color:var(--fg-muted); font-size:12px; }
.pipeline-funnel-archive-toggle { display:inline-flex; align-items:center; gap:7px; flex:0 0 auto; margin-left:auto; color:var(--fg-secondary); font-size:12px; white-space:nowrap; }
.pipeline-funnel-archive-toggle input { accent-color:var(--fg-primary); }
.pipeline-funnel-body { padding:0 16px 16px; }
.pipeline-funnel-body .analytics-panel-head { margin-bottom:10px; }
.pipeline-funnel-archive-note { margin:-2px 0 10px; padding:7px 9px; border-left:2px solid var(--badge-warning-fg); color:var(--fg-secondary); background:var(--badge-warning-bg); font-size:12px; line-height:1.35; }
.pipeline-funnel-loading, .pipeline-funnel-error { padding:16px; color:var(--fg-muted); font-size:13px; }
.pipeline-funnel-error { color:var(--badge-error-fg); }
.lp-intelligence-page { max-width:1280px; }
.lp-intelligence-page .analytics-grid { align-items:start; }
.analytics-row-action { border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); padding:5px 8px; font:inherit; font-size:11px; cursor:pointer; white-space:nowrap; }
.analytics-row-action:hover { color:var(--fg-primary); border-color:var(--fg-primary); background:var(--bg-hover); }
.lp-intelligence-page .cold-card { display:flex; flex-direction:column; align-items:flex-start; gap:2px; text-align:left; width:100%; }
.lp-intelligence-page .cold-card .analytics-row-action { margin-top:7px; }
.lp-intelligence-page, .pipeline-funnel-body, #analytics-drawer { min-width:0; }
.lp-intelligence-page .analytics-grid > *, .lp-intelligence-page .analytics-panel-head > *, .lp-intelligence-page .cold-strip > *, #analytics-drawer .analytics-drawer-head > *, #analytics-drawer .drawer-person > * { min-width:0; }
.lp-intelligence-page .cold-card, .lp-intelligence-page .cold-card .score-name, .lp-intelligence-page .cold-card .score-meta,
.lp-intelligence-page .score-table th, .lp-intelligence-page .score-table td, .lp-intelligence-page .why-kv > *,
#analytics-drawer .drawer-person, #analytics-drawer .drawer-person .score-name, #analytics-drawer .drawer-person .score-meta,
.pipeline-funnel-body .analytics-panel-head > * { overflow-wrap:anywhere; word-break:break-word; }
.lp-intelligence-page .score-name, .lp-intelligence-page .score-meta { white-space:normal; }
.lp-intelligence-page .score-table td, .lp-intelligence-page .why-kv b, #analytics-drawer .drawer-person { min-width:0; }
.layout-zones .zone-fund-summary { display:flex; flex-direction:column; gap:12px; }
.layout-zones .zone-pipeline { display:flex; flex-direction:column; gap:12px; border-top:1px solid var(--border); padding-top:16px; }
.layout-zones .zone-fund-state-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width: 1200px) {
  .layout-zones .zone-fund-state-grid { grid-template-columns:1fr; }
}
@media (max-width: 980px) {
  .pipeline-funnel-section > summary { align-items:flex-start; flex-wrap:wrap; }
  .pipeline-funnel-archive-toggle { margin-left:24px; }
}

/* LP Intelligence profile scorecard — self-contained so CRM does not depend on
   analytics.js having injected its page styles first. */
.lp-profile-layout { min-width:0; }
.lp-profile-layout.has-lp-scorecard { display:grid; grid-template-columns:minmax(0,1fr) minmax(340px,380px); gap:24px; align-items:start; }
.lp-profile-layout.has-profile-sidebar { display:grid; grid-template-columns:minmax(0,1fr) minmax(340px,380px); gap:24px; align-items:start; }
.lp-profile-main, .lp-scorecard-column { min-width:0; }
.lp-scorecard-column { display:none; }
.lp-profile-layout.has-lp-scorecard .lp-scorecard-column { display:block; position:sticky; top:20px; }
.lp-profile-layout.has-profile-sidebar .lp-scorecard-column { display:flex; flex-direction:column; gap:16px; position:sticky; top:20px; }
.lp-scorecard { width:100%; box-sizing:border-box; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow-sm); color:var(--fg-primary); min-width:0; overflow:hidden; }
.lp-scorecard-header, .lp-scorecard-header > *, .lp-scorecard-header-badges { min-width:0; }
.lp-scorecard-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.lp-scorecard-title { font-size:16px; font-weight:650; line-height:1.25; overflow-wrap:anywhere; }
.lp-scorecard-subtitle, .lp-scorecard-detail, .lp-scorecard-muted { color:var(--fg-muted); font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.lp-scorecard-subtitle { margin-top:3px; }
.lp-scorecard-header-badges { display:flex; align-items:flex-end; flex-direction:column; gap:5px; flex:0 0 auto; }
.lp-scorecard-tag, .lp-scorecard-new, .lp-capacity-chip { display:inline-flex; align-items:center; border:1px solid var(--border); border-radius:999px; padding:3px 7px; color:var(--fg-secondary); background:var(--bg-active); font-size:10px; font-weight:600; white-space:nowrap; }
.lp-scorecard-new { border-color:#3b82f6; color:#3b82f6; background:transparent; }
.lp-score-row { display:grid; grid-template-columns:78px minmax(0,1fr) 28px; gap:8px; align-items:center; margin-top:13px; min-width:0; }
.lp-score-label { color:var(--fg-secondary); font-size:12px; }
.lp-score-bar { height:8px; min-width:0; border-radius:999px; background:var(--border); overflow:hidden; }
.lp-score-bar span { display:block; height:100%; border-radius:999px; }
.lp-score-bar.warm span { background:#2f9e6f; }
.lp-score-bar.prop span { background:#3b82f6; }
.lp-score-value { font-size:12px; color:var(--fg-secondary); text-align:right; }
.lp-scorecard-fact-row, .lp-scorecard-fact-grid { min-width:0; }
.lp-scorecard-fact-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:14px; font-size:12px; color:var(--fg-muted); }
.lp-scorecard-fact-row b { color:var(--fg-secondary); font-weight:500; min-width:0; overflow-wrap:anywhere; }
.lp-scorecard-override-detail { margin-top:5px; color:var(--fg-muted); font-size:11px; line-height:1.4; overflow-wrap:anywhere; }
.lp-confidence-dots { letter-spacing:2px; color:var(--fg-primary); white-space:nowrap; }
.lp-scorecard-fact-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:14px; }
.lp-scorecard-fact-grid > div { display:flex; flex-direction:column; gap:4px; min-width:0; }
.lp-scorecard-fact-grid span { color:var(--fg-muted); font-size:11px; }
.lp-scorecard-fact-grid b { color:var(--fg-secondary); font-size:12px; font-weight:550; overflow-wrap:anywhere; }
.lp-stated-value { cursor:pointer; }
.lp-stated-value:focus-visible { outline:2px solid var(--fg-primary); outline-offset:2px; border-radius:4px; }
.lp-stated-editor { display:flex; align-items:center; gap:4px; cursor:default; }
.lp-stated-editor input { width:70px; font-size:12.5px; padding:2px 6px; border:1px solid var(--border); border-radius:4px; background:var(--bg-card); color:var(--fg-primary); font-family:inherit; box-sizing:border-box; }
.lp-scorecard-section { border-top:1px solid var(--border); margin-top:14px; padding-top:13px; min-width:0; }
.lp-scorecard-section-title { font-size:12px; font-weight:650; color:var(--fg-primary); margin-bottom:5px; }
.lp-scorecard-mismatch { display:inline-flex; margin-top:9px; border:1px solid var(--badge-warning-fg); border-radius:999px; padding:3px 7px; color:var(--badge-warning-fg); background:var(--badge-warning-bg); font-size:10px; font-weight:600; overflow-wrap:anywhere; }
.lp-scorecard-mismatch.info { border-color:var(--badge-info-fg); color:var(--badge-info-fg); background:var(--badge-info-bg); }
.lp-scorecard-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:15px; padding-top:13px; border-top:1px solid var(--border); min-width:0; }
.lp-scorecard-touch { border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); padding:6px 9px; font:inherit; font-size:11px; cursor:pointer; white-space:nowrap; }
.lp-scorecard-touch:hover, .lp-scorecard-link:hover { color:var(--fg-primary); border-color:var(--fg-primary); }
.lp-scorecard-link { color:var(--fg-secondary); font-size:11px; text-decoration:none; white-space:nowrap; margin-left:auto; }
@media (max-width:1100px) {
  .lp-profile-layout.has-lp-scorecard { display:flex; flex-direction:column; gap:16px; }
  .lp-profile-layout.has-profile-sidebar { display:flex; flex-direction:column; gap:16px; }
  .lp-profile-layout.has-lp-scorecard .lp-scorecard-column { order:-1; position:static; width:100%; }
  .lp-profile-layout.has-profile-sidebar .lp-scorecard-column { order:-1; position:static; width:100%; }
}

/* Pipeline 6-card stat row: hidden by default (overlaps the deal-cards row),
   reveals as a fixed bar at top when user scrolls past the fund summary. */
.layout-zones #pipeline-stat-grid { display:none; }
.layout-zones #pipeline-stat-grid.is-floating {
  display:grid;
  position:fixed;
  top:0;
  left:var(--sidebar-w);
  right:0;
  z-index:80;
  margin:0;
  padding:10px 32px;
  background:rgba(250,250,249,0.96);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
  box-shadow:0 4px 16px rgba(0,0,0,0.06);
  animation:pipelineStatsSlideDown 0.18s ease-out;
}
.layout-zones #pipeline-stat-grid.is-floating .stat-card { min-height:0; padding:16px 20px; }
.layout-zones #pipeline-stat-grid.is-floating .stat-card .stat-value { font-size:32px; }
.layout-zones #pipeline-stat-grid.is-floating .stat-card .stat-label { font-size:13px; margin-top:5px; }
.layout-zones #pipeline-stat-grid.is-floating .stat-card .stat-sub { font-size:12px; margin-top:3px; }
@keyframes pipelineStatsSlideDown {
  from { transform:translateY(-100%); opacity:0; }
  to   { transform:translateY(0); opacity:1; }
}
@media (max-width: 900px) {
  .layout-zones #pipeline-stat-grid.is-floating { left:0; padding:10px 16px; }
}

/* ─── KANBAN BOARD ─────────────────────────────────────── */
.kanban { display:flex; gap:12px; overflow-x:auto; padding-bottom:8px; min-height:400px; }
.kanban-col { min-width:210px; flex:1; display:flex; flex-direction:column; }
.kanban-col-header { padding:10px 12px; border-radius:var(--radius-sm) var(--radius-sm) 0 0; display:flex; align-items:center; gap:8px; margin-bottom:0; position:sticky; top:0; }
.kanban-col-dot { width:8px; height:8px; border-radius:2px; flex-shrink:0; }
.kanban-col-title { font-family:var(--font-display); font-size:13px; font-weight:500; color:var(--fg-primary); }
.kanban-col-count { font-family:var(--font-mono); font-size:11px; color:var(--fg-placeholder); margin-left:auto; }
/* B1b 2026-05-27 — per-column scenario subtotals + delta chip */
.kanban-col-substat { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:4px 12px 8px; min-height:22px; }
.kanban-col-sum { font-family:var(--font-mono); font-size:11px; color:var(--fg-secondary); font-weight:500; }
.kanban-col-sum-empty { color:var(--fg-placeholder); }
.kanban-col-delta { font-family:var(--font-body); font-size:10px; font-weight:500; padding:2px 6px; border-radius:999px; line-height:1; }
.kanban-col-delta.delta-positive { background:rgba(51,117,62,0.12); color:rgb(51,117,62); }
.kanban-col-delta.delta-negative { background:rgba(180,35,24,0.12); color:rgb(180,35,24); }
.kanban-col-delta.delta-neutral  { background:var(--bg-active); color:var(--fg-placeholder); }
.kanban-col-value { font-family:var(--font-mono); font-size:11px; color:var(--fg-secondary); }
.kanban-col-cards { display:flex; flex-direction:column; gap:8px; flex:1; padding:8px 0; }
.kanban-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 14px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:6px; transition:box-shadow 0.15s,transform 0.15s; cursor:default; }
.kanban-card:hover { box-shadow:var(--shadow-card); transform:translateY(-1px); }
.kanban-card .kc-firm { font-family:var(--font-display); font-size:13px; font-weight:500; color:var(--fg-primary); line-height:1.3; }
.kanban-card .kc-contact { font-size:12px; color:var(--fg-secondary); }
.kanban-card .kc-link { cursor:pointer; }
.kanban-card .kc-link:hover { text-decoration:underline; }
.kanban-card .kc-bottom { display:flex; align-items:center; justify-content:space-between; gap:6px; margin-top:2px; }
.kanban-card .kc-range { font-family:var(--font-mono); font-size:12px; color:var(--fg-primary); font-weight:400; }
.kanban-card .kc-fee { color:var(--fg-secondary); font-weight:500; }
.kanban-card .kc-badges { display:flex; gap:4px; align-items:center; }
.kanban-card .kc-lead { font-size:10px; font-weight:600; font-family:var(--font-mono); color:var(--fg-placeholder); background:var(--bg-active); padding:2px 6px; border-radius:4px; text-transform:uppercase; }
.kanban-card .kc-dr { font-size:10px; color:var(--badge-success-fg); background:var(--badge-success-bg); padding:2px 6px; border-radius:4px; font-weight:500; }
.kanban-card .kc-status { font-size:11px; color:var(--fg-muted); }
.kanban-card .kc-pass-reason { font-size:11px; color:var(--fg-muted); font-style:italic; }
.kanban-card.kc-passed { opacity:0.7; background:var(--bg-active); }
.kanban-card.kc-passed .kc-firm { color:var(--fg-secondary); }
.kanban-card { position:relative; }
.kanban-card .kc-actions { position:absolute; top:6px; right:6px; display:flex; gap:2px; opacity:0; transition:opacity 0.12s; }
.kanban-card:hover .kc-actions { opacity:1; }
.kanban-card .kc-act { background:transparent; border:1px solid transparent; border-radius:4px; width:20px; height:20px; padding:0; display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--fg-secondary); }
.kanban-card .kc-act:hover { background:var(--bg-active); border-color:var(--border); color:var(--fg-primary); }
.kanban-card .kc-act-del:hover { color:var(--badge-error-fg, #b42318); }
.kanban-card .kc-act-anchor.is-anchor { color:var(--accent, #b8860b); }
.kanban-card .kc-act-anchor:hover { color:var(--accent, #b8860b); }
.kanban-card .kc-anchor-badge { font-size:10px; font-weight:600; color:var(--accent-fg, #8a6d0b); background:var(--accent-bg, #fdf3d6); border:1px solid var(--accent-border, #f0dca0); padding:2px 6px; border-radius:4px; white-space:nowrap; }
.kanban-card .kc-note { font-size:11px; color:var(--fg-secondary); background:var(--bg-active); border-radius:4px; padding:6px 8px; line-height:1.35; cursor:pointer; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.kanban-card .kc-note:hover { background:var(--bg-hover, var(--bg-active)); }
.kanban-card .kc-note p, .kanban-card .kc-note ul, .kanban-card .kc-note ol { margin:0; padding:0; padding-left:14px; }
.kanban-card .kc-note a { color:var(--fg-primary); text-decoration:underline; }

/* Kanban column accent colors */
.kanban-col[data-stage="due_diligence"] .kanban-col-dot { background:var(--badge-success-fg); }
.kanban-col[data-stage="due_diligence"] .kanban-col-header { background:rgba(203,235,214,0.3); }
.kanban-col[data-stage="committed"] .kanban-col-dot { background:var(--badge-info-fg); }
.kanban-col[data-stage="committed"] .kanban-col-header { background:rgba(71,159,219,0.08); }
.kanban-col[data-stage="interested"] .kanban-col-dot { background:var(--badge-committed-fg); }
.kanban-col[data-stage="interested"] .kanban-col-header { background:rgba(38,110,240,0.05); }
.kanban-col[data-stage="followup"] .kanban-col-dot { background:var(--fg-placeholder); }
.kanban-col[data-stage="followup"] .kanban-col-header { background:var(--bg-active); }
.kanban-col[data-stage="passed"] .kanban-col-dot { background:var(--badge-warning-fg); }
.kanban-col[data-stage="passed"] .kanban-col-header { background:rgba(248,215,73,0.1); }

/* Pipeline summary bar */
/* ─── PORTFOLIO LANDING PAGE ───────────────────────────── */
.portfolio-header { margin-bottom:24px; }
.portfolio-title { font-family:var(--font-display); font-size:22px; font-weight:500; letter-spacing:-0.4px; color:var(--fg-primary); }
.portfolio-subtitle { font-size:13px; color:var(--fg-muted); margin-top:4px; }
.portfolio-empty { padding:40px; text-align:center; color:var(--fg-placeholder); font-size:13px; font-style:italic; }
.portfolio-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(320px, 1fr)); gap:16px; }
.thesis-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(340px, 1fr)); gap:16px; }
.thesis-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:10px; cursor:pointer; transition:border-color 0.15s, box-shadow 0.15s; }
.thesis-card:hover { border-color:var(--fg-muted); }
.thesis-card.expanded { box-shadow:var(--shadow-card); border-color:var(--fg-muted); }
.thesis-card.compare-mode { cursor:default; }
.thesis-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.thesis-card-head-right { display:flex; align-items:center; gap:10px; }
.thesis-company { font-weight:600; font-size:15px; color:var(--fg-primary); }
.thesis-meta { font-size:12px; color:var(--fg-muted); text-align:right; }
.thesis-pillars { margin:0; padding-left:18px; display:flex; flex-direction:column; gap:6px; font-size:13px; line-height:1.45; color:var(--fg-secondary); }
.thesis-pillars li { padding-left:2px; }
.thesis-expand-hint { font-size:11px; color:var(--fg-placeholder); margin-top:auto; padding-top:8px; border-top:1px solid var(--border-subtle); letter-spacing:0.2px; }
.thesis-check { width:16px; height:16px; cursor:pointer; }
.thesis-detail { display:flex; flex-direction:column; gap:14px; margin-top:6px; padding-top:14px; border-top:1px solid var(--border-subtle); }
.thesis-section-title { font-size:11px; font-weight:500; text-transform:uppercase; letter-spacing:0.5px; color:var(--fg-placeholder); margin-bottom:6px; }
.thesis-prose { font-size:13px; line-height:1.5; color:var(--fg-primary); }
.thesis-chips { display:flex; flex-wrap:wrap; gap:6px; }
.thesis-chip { display:inline-block; padding:3px 9px; font-size:11px; border:1px solid var(--border); border-radius:999px; color:var(--fg-secondary); background:var(--bg-page); }
.thesis-risks, .thesis-comps { margin:0; padding-left:18px; display:flex; flex-direction:column; gap:8px; font-size:13px; line-height:1.45; color:var(--fg-secondary); }
.thesis-risk-head { color:var(--fg-primary); }
.thesis-risk-sev { font-size:10px; text-transform:uppercase; letter-spacing:0.4px; color:var(--fg-muted); margin-left:6px; font-family:var(--font-mono); }
.thesis-risk-mit { font-size:12px; color:var(--fg-muted); margin-top:3px; }
.thesis-moic { display:flex; gap:14px; flex-wrap:wrap; }
.thesis-moic-cell { flex:1; min-width:90px; padding:8px 12px; border:1px solid var(--border); border-radius:6px; background:var(--bg-page); }
.thesis-moic-label { font-size:10px; text-transform:uppercase; letter-spacing:0.4px; color:var(--fg-placeholder); margin-bottom:2px; }
.thesis-moic-val { font-size:13px; font-family:var(--font-mono); color:var(--fg-primary); }
.thesis-meta-row { font-size:12px; color:var(--fg-muted); line-height:1.5; }
.thesis-muted { color:var(--fg-muted); font-style:italic; }
.thesis-compare-empty { padding:24px; text-align:center; color:var(--fg-placeholder); font-size:13px; border:1px dashed var(--border); border-radius:var(--radius); margin-bottom:16px; }
.thesis-compare-wrap { margin-bottom:20px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); padding:16px; }
.thesis-compare-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.thesis-compare-scroll { overflow-x:auto; }
.thesis-compare-table { border-collapse:collapse; width:100%; font-size:13px; }
.thesis-compare-table th, .thesis-compare-table td { border-bottom:1px solid var(--border-subtle); padding:10px 12px; vertical-align:top; text-align:left; }
.thesis-compare-table thead th { font-weight:600; color:var(--fg-primary); border-bottom:2px solid var(--border); position:relative; min-width:200px; }
.thesis-compare-label { font-size:11px; text-transform:uppercase; letter-spacing:0.5px; color:var(--fg-placeholder); font-weight:500; white-space:nowrap; }
.thesis-compare-remove { background:none; border:none; color:var(--fg-muted); cursor:pointer; font-size:14px; padding:0 4px; }
.thesis-compare-remove:hover { color:var(--fg-primary); }
.thesis-compare-pillars, .thesis-compare-risks { margin:0; padding-left:18px; display:flex; flex-direction:column; gap:4px; }
.fund-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow-sm); cursor:pointer; transition:box-shadow 0.15s,transform 0.15s,border-color 0.15s,background 0.15s; display:flex; flex-direction:column; gap:14px; position:relative; will-change:transform; transform:translateZ(0); }
.fund-card:hover { box-shadow:var(--shadow-card); transform:translateY(-2px); border-color:var(--fg-primary); background:var(--bg-hover); z-index:60; }
.fund-card:active { transform:translateY(-1px); box-shadow:var(--shadow-sm); }
.fund-card-action span.arrow { display:inline-block; transition:transform 0.15s; }
.fund-card:hover .fund-card-action span.arrow { transform:translateX(3px); }
.fund-card-active { border-color:var(--fg-primary); box-shadow:var(--shadow-card); }
.fund-card-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.fund-name { font-family:var(--font-display); font-size:15px; font-weight:500; color:var(--fg-primary); }
.fund-company { font-size:12px; color:var(--fg-secondary); margin-top:3px; }
.fund-progress { display:flex; flex-direction:column; gap:6px; }
.fund-progress-track { height:6px; background:var(--border-subtle); border-radius:100px; overflow:hidden; display:flex; }
.fund-progress-wired { background:var(--fg-primary); border-radius:100px 0 0 100px; }
.fund-progress-committed { background:var(--fg-placeholder); }
.fund-progress-labels { display:flex; justify-content:space-between; font-size:12px; }
.fund-progress-labels strong { font-weight:500; font-family:var(--font-mono); color:var(--fg-primary); }
.fund-progress-pct { font-family:var(--font-mono); font-weight:500; color:var(--fg-primary); }
.fund-card-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding-top:12px; border-top:1px solid var(--border-subtle); }
.fund-card-stats .fc-tile { position:relative; }
.fund-card-stats .fc-tile:hover { z-index:50; }
.fund-card-stats .fc-tile:hover .stat-tip { opacity:1; transform:translateY(0); }
.fund-card-stats .fc-tile.fc-overalloc .fc-val { color:var(--badge-error-fg, #c92a2a); }
.fund-card-stats .fc-val { font-family:var(--font-mono); font-size:14px; font-weight:500; color:var(--fg-primary); }
.fund-card-stats .fc-lbl { font-size:10px; font-weight:500; text-transform:uppercase; letter-spacing:0.5px; color:var(--fg-placeholder); margin-top:2px; }
.fund-progress-hover { position:relative; }
.fund-progress-hover:hover { z-index:50; }
.fund-progress-hover:hover > .stat-tip { opacity:1; transform:translateY(0); }
/* Anchor the last column's tooltips to the right edge so they don't clip */
.fund-card-stats .fc-tile:nth-child(3) .stat-tip { left:auto; right:0; }
.fund-card-action { font-size:12px; font-weight:500; color:var(--fg-muted); text-align:right; transition:color 0.15s; }
.fund-card:hover .fund-card-action { color:var(--fg-primary); }
.fund-card-current { font-size:11px; font-weight:500; text-transform:uppercase; letter-spacing:0.5px; color:var(--badge-success-fg); text-align:right; }
.fund-card-status { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex:0 0 auto; max-width:160px; }
.spv-status-select { max-width:154px; height:30px; padding:4px 28px 4px 10px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); font-family:var(--font-body); font-size:12px; font-weight:500; cursor:pointer; }
.spv-status-select:hover { border-color:var(--fg-placeholder); color:var(--fg-primary); }
.spv-status-select:focus { outline:none; border-color:var(--fg-primary); box-shadow:0 0 0 2px rgba(0,0,0,0.05); }
.fund-edit-btn { max-width:154px; height:26px; padding:3px 9px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); font-family:var(--font-body); font-size:11px; font-weight:500; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fund-edit-btn:hover { border-color:var(--fg-placeholder); color:var(--fg-primary); }
.fund-metadata-edit-btn { font-weight:600; }
.modal-static { padding:8px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); font-size:13px; color:var(--fg-primary); }
.vehicle-metadata-more { margin:2px 0 14px; border-top:1px solid var(--border-subtle); border-bottom:1px solid var(--border-subtle); }
.vehicle-metadata-more > summary { padding:10px 0; color:var(--fg-secondary); font-size:12px; font-weight:600; cursor:pointer; user-select:none; }
.vehicle-metadata-more[open] > summary { color:var(--fg-primary); }
.vehicle-metadata-more .modal-row { margin-top:4px; }
.vehicle-metadata-help { font-size:12px; line-height:1.45; color:var(--fg-muted); }

/* Portfolio: filter pills in section header */
.section-header-filtered { flex-wrap:wrap; gap:12px; }
.section-header-left { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.section-filters { display:flex; gap:6px; align-items:center; }
.section-filter-label { font-size:11px; color:var(--fg-placeholder); text-transform:uppercase; letter-spacing:0.5px; font-weight:500; margin-right:4px; }
.badge-filter { background:var(--bg-card); border:1px solid var(--border); color:var(--fg-secondary); padding:6px 12px; font-size:13px; font-weight:500; border-radius:100px; cursor:pointer; display:inline-flex; align-items:center; gap:6px; transition:background 0.15s,border-color 0.15s,color 0.15s,box-shadow 0.15s; font-family:var(--font-body); }
.badge-filter:hover { border-color:var(--fg-primary); color:var(--fg-primary); box-shadow:0 1px 3px rgba(0,0,0,0.06); }
.badge-filter.is-active { background:var(--fg-primary); border-color:var(--fg-primary); color:var(--bg-card); box-shadow:0 1px 3px rgba(0,0,0,0.12); }
.badge-filter .count { font-family:var(--font-mono); font-size:12px; opacity:0.7; }
.badge-filter.is-active .count { opacity:0.85; }
.empty-state { padding:32px 20px; text-align:center; color:var(--fg-placeholder); font-size:13px; font-style:italic; background:var(--bg-card); border:1px dashed var(--border); border-radius:var(--radius); }
.stat-tip-legend { display:flex; flex-direction:column; gap:4px; margin-top:8px; padding-top:8px; border-top:1px solid var(--border-subtle); }
.stat-tip-legend .legend-item { font-size:11px; color:var(--fg-secondary); display:flex; align-items:center; gap:6px; }
.stat-tip-legend .legend-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }

.pipeline-total { display:flex; align-items:center; gap:24px; margin-bottom:16px; padding:12px 16px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); }
.pipeline-total .pt-group { display:flex; flex-direction:column; gap:2px; }
.pipeline-total .pt-label { font-size:11px; color:var(--fg-placeholder); text-transform:uppercase; letter-spacing:0.5px; font-weight:500; }
.pipeline-total .pt-value { font-family:var(--font-mono); font-size:16px; font-weight:500; color:var(--fg-primary); }
.pipeline-total .pt-count { font-size:12px; color:var(--fg-secondary); }
.pipeline-control-row { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.pipeline-control-group { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.segmented { display:inline-flex; border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; background:var(--bg-card); }
.segmented button { border:0; border-right:1px solid var(--border); background:transparent; color:var(--fg-secondary); padding:8px 12px; font-family:var(--font-body); font-size:12px; font-weight:500; cursor:pointer; }
.segmented button:last-child { border-right:0; }
.segmented button.active { background:var(--fg-primary); color:var(--bg-card); }
.pipeline-chip { border:1px solid var(--border); border-radius:999px; background:var(--bg-card); color:var(--fg-placeholder); padding:6px 10px; font-family:var(--font-body); font-size:12px; font-weight:500; cursor:pointer; transition:background 0.15s,border-color 0.15s,color 0.15s; }
.pipeline-chip:hover { color:var(--fg-secondary); border-color:var(--fg-muted); }
.pipeline-chip.active { background:var(--fg-primary); color:var(--bg-card); border-color:var(--fg-primary); }
.pipeline-chip.active:hover { color:var(--bg-card); border-color:var(--fg-primary); opacity:0.92; }
.pipeline-chip-label { font-size:11px; color:var(--fg-placeholder); text-transform:uppercase; letter-spacing:0.5px; font-weight:500; }
.pipeline-action-btn { border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-primary); padding:8px 12px; font-family:var(--font-body); font-size:12px; font-weight:500; cursor:pointer; }
.pipeline-action-btn:hover { border-color:var(--fg-primary); background:var(--bg-hover); }
.pipeline-action-btn.primary { background:var(--fg-primary); color:var(--bg-card); border-color:var(--fg-primary); }
.pipeline-action-btn[disabled] { opacity:0.45; cursor:not-allowed; }
.pipeline-scenario-banner { display:none; margin-bottom:12px; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-active); color:var(--fg-secondary); font-size:12px; line-height:1.4; }
.pipeline-scenario-banner.active { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.pipeline-stat-grid { margin-bottom:14px; }
.dashboard-sticky-stat-grid { position:sticky; top:10px; z-index:70; padding:8px; margin:0 -8px 14px; background:rgba(250,250,249,0.94); border:1px solid var(--border-subtle); border-radius:var(--radius-sm); box-shadow:0 10px 28px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,0.7) inset; backdrop-filter:blur(10px); }
.dashboard-sticky-stat-grid .stat-card { min-height:118px; transition:box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease; }
.pipeline-delta-row { display:flex; justify-content:space-between; gap:6px; margin-top:8px; padding-top:7px; border-top:1px solid var(--border-subtle); font-family:var(--font-mono); font-size:10px; color:var(--fg-placeholder); line-height:1.25; }
.pipeline-delta-row span { min-width:0; white-space:nowrap; }
.pipeline-delta-chip { display:inline-flex; align-items:center; max-width:100%; margin-top:5px; padding:2px 6px; border-radius:999px; font-size:10px; font-weight:600; line-height:1.35; white-space:nowrap; }
.pipeline-delta-chip.delta-neutral { color:var(--fg-placeholder); background:var(--bg-active); }
.pipeline-delta-chip.delta-positive { color:var(--badge-success-fg); background:var(--badge-success-bg); }
.pipeline-delta-chip.delta-negative { color:var(--badge-error-fg, #b42318); background:var(--badge-error-bg, #fee4e2); }
.pipeline-delta-chip.delta-warning { color:var(--badge-warning-fg); background:var(--badge-warning-bg); }
.stat-card.metric-changed { animation:pipelineMetricPulse 0.75s ease both; }
.pipeline-delta-chip.delta-pop { animation:pipelineDeltaPop 0.55s ease both; }
.stat-card.scenario-negative .stat-value { color:var(--badge-error-fg, #b42318); }
@keyframes pipelineMetricPulse {
  0% { transform:translateY(0); box-shadow:var(--shadow-sm); border-color:var(--border); }
  35% { transform:translateY(-1px); box-shadow:0 8px 22px rgba(0,0,0,0.12), 0 0 0 2px rgba(23,23,23,0.08); border-color:var(--fg-placeholder); }
  100% { transform:translateY(0); box-shadow:var(--shadow-sm); border-color:var(--border); }
}
@keyframes pipelineDeltaPop {
  0% { transform:translateY(2px); opacity:0.65; }
  45% { transform:translateY(-1px); opacity:1; }
  100% { transform:translateY(0); opacity:1; }
}
.kanban-card[draggable="true"] { cursor:grab; }
.kanban-card.dragging { opacity:0.55; transform:rotate(1deg); }
.kanban-col-cards.drag-over { outline:1px dashed var(--fg-primary); outline-offset:2px; background:var(--bg-active); border-radius:var(--radius-sm); }
.kc-note-count { font-size:10px; color:var(--fg-secondary); background:var(--bg-active); border-radius:999px; padding:2px 6px; font-weight:500; }
.kc-scenario-delta { font-size:10px; font-weight:500; color:var(--badge-warning-fg); background:var(--badge-warning-bg); padding:2px 6px; border-radius:999px; align-self:flex-start; }
.kc-soft-dup { font-size:10px; font-weight:500; color:var(--badge-warning-fg); background:var(--badge-warning-bg); padding:2px 6px; border-radius:999px; align-self:flex-start; cursor:help; }
.pipeline-table-wrap { display:none; margin-top:12px; }
.pipeline-table-wrap.active { display:block; }
.pipeline-amount-input { width:118px; max-width:100%; padding:6px 8px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-primary); font-family:var(--font-mono); font-size:12px; }
.pipeline-table-wrap [data-pipeline-cell]:focus { outline:2px solid rgba(23,23,23,0.22); outline-offset:1px; border-color:var(--fg-primary); box-shadow:0 0 0 1px var(--fg-primary); }
.pipeline-table-wrap [data-pipeline-readonly="true"] { background:var(--bg-active); color:var(--fg-secondary); }
.drawer-overlay { position:fixed; inset:0; z-index:9997; background:rgba(0,0,0,0.24); opacity:0; pointer-events:none; transition:opacity 0.18s; display:flex; justify-content:flex-end; }
.drawer-overlay.open { opacity:1; pointer-events:auto; }
.drawer-panel { width:min(520px, calc(100vw - 24px)); height:100%; background:var(--bg-card); border-left:1px solid var(--border); box-shadow:-12px 0 32px rgba(0,0,0,0.14); transform:translateX(24px); transition:transform 0.18s; display:flex; flex-direction:column; }
.drawer-overlay.open .drawer-panel { transform:translateX(0); }
.drawer-header { padding:18px 20px; border-bottom:1px solid var(--border); display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.drawer-title { font-family:var(--font-display); font-size:16px; font-weight:500; color:var(--fg-primary); }
.drawer-subtitle { font-size:12px; color:var(--fg-muted); margin-top:3px; }
.drawer-close { border:1px solid var(--border); background:var(--bg-card); color:var(--fg-secondary); border-radius:var(--radius-sm); width:30px; height:30px; cursor:pointer; font-size:18px; line-height:1; }
.drawer-body { padding:18px 20px 24px; overflow:auto; display:flex; flex-direction:column; gap:18px; }
.drawer-section { display:flex; flex-direction:column; gap:10px; }
.drawer-section-title { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:var(--fg-placeholder); display:flex; align-items:center; gap:10px; }

/* LP onboarding — data-room share UI (drawer read-back + share modal) */
.di-share-muted { font-size:12px; color:var(--fg-placeholder); }
.di-share-row { display:flex; flex-direction:column; gap:2px; padding:8px 10px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); }
.di-share-row.revoked { opacity:0.55; }
.di-share-doc { font-size:13px; font-weight:500; color:var(--fg-primary); }
.di-share-revoked { font-size:10px; text-transform:uppercase; letter-spacing:0.5px; color:#c83232; border:1px solid #c83232; border-radius:4px; padding:0 4px; }
.di-share-meta { font-size:11px; color:var(--fg-placeholder); }
.di-share-open { font-size:12px; color:var(--fg-primary); text-decoration:none; }
.di-share-open:hover { text-decoration:underline; }
.di-share-modal { display:flex; flex-direction:column; gap:14px; width:440px; max-width:100%; box-sizing:border-box; }
/* the mode wrappers are plain divs — make them stack their controls with real spacing
   so labels (which are inline by default) don't collide with the inputs */
#share-mode-single, #share-mode-room { display:flex; flex-direction:column; gap:10px; }
#share-mode-single .filter-input, #share-mode-room .filter-input,
.di-share-room-editor .filter-input { width:100%; box-sizing:border-box; display:block; }
.di-share-label { display:block; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:var(--fg-placeholder); margin:0 0 4px; }
.di-share-check { font-size:13px; color:var(--fg-primary); display:flex; align-items:center; gap:8px; margin-top:4px; }
.di-share-files { max-height:180px; overflow-y:auto; border:1px solid var(--border-subtle, #e5e5e5); border-radius:6px; padding:6px 8px; margin-bottom:6px; }
.di-share-filerow { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--fg-primary); padding:3px 0; cursor:pointer; }
.di-share-filerow input { flex:none; }
.di-share-modal .pipeline-control-group { margin-top:6px; }
.di-share-copyrow { display:flex; gap:8px; align-items:center; }
.di-share-copyrow .filter-input { flex:1; }
.di-share-body { min-height:160px; resize:vertical; font-family:var(--font-body); line-height:1.5; }
.di-share-ok { font-size:12px; color:#1a7f37; font-weight:500; }
.di-share-err { font-size:12px; color:#c83232; font-weight:500; }
/* Tiered data-room share modes (LP onboarding item 25 Phase B) */
.di-share-tabs { display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:4px; }
.di-share-tab { background:none; border:none; border-bottom:2px solid transparent; padding:6px 10px; font-size:13px; font-weight:500; color:var(--fg-placeholder); cursor:pointer; }
.di-share-tab:hover { color:var(--fg-primary); }
.di-share-tab.active { color:var(--fg-primary); border-bottom-color:var(--fg-primary); }
.di-share-roomrow { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:4px; }
.di-share-manage-link { font-size:12px; font-weight:500; color:var(--fg-primary); text-decoration:none; cursor:pointer; white-space:nowrap; }
.di-share-manage-link:hover { text-decoration:underline; }
.di-share-room-editor { display:flex; flex-direction:column; gap:8px; margin-top:8px; padding-top:8px; border-top:1px solid var(--border); }
/* Click-to-expand per-share history timeline (drawer read-back) */
.di-share-doc { display:flex; align-items:center; gap:6px; }
.di-share-clickable { cursor:pointer; border-radius:6px; padding:2px 6px; margin:-2px -6px; transition:background 0.12s; }
.di-share-clickable:hover { background:var(--bg-active); }
.di-share-clickable:hover .di-share-doc { color:var(--fg-primary); }
.di-share-caret { margin-left:auto; color:var(--fg-muted); font-size:16px; line-height:1; flex:none; transition:color 0.12s; }
.di-share-clickable:hover .di-share-caret { color:var(--fg-primary); }
.di-share-timeline { margin-top:8px; }
.di-timeline { display:flex; flex-direction:column; gap:8px; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); }
.di-tl-head { display:flex; flex-direction:column; gap:3px; font-size:11px; color:var(--fg-muted); padding-bottom:8px; border-bottom:1px dashed var(--border); }
.di-tl-k { display:inline-block; min-width:70px; font-weight:600; text-transform:uppercase; letter-spacing:0.4px; color:var(--fg-placeholder); }
.di-tl-item { display:flex; gap:10px; align-items:flex-start; }
.di-tl-dot { width:8px; height:8px; border-radius:50%; background:var(--fg-muted); margin-top:4px; flex:none; }
.di-tl-viewed .di-tl-dot { background:#1a7f37; }
.di-tl-created .di-tl-dot, .di-tl-room_created .di-tl-dot { background:var(--fg-primary); }
.di-tl-body { display:flex; flex-direction:column; gap:1px; }
.di-tl-label { font-size:12px; font-weight:500; color:var(--fg-primary); }
.di-tl-actor { font-weight:400; color:var(--fg-muted); }
.di-tl-time { font-size:11px; color:var(--fg-placeholder); }
.drawer-contact-link { font-size:11px; font-weight:500; text-transform:none; letter-spacing:0; color:var(--fg-primary); text-decoration:none; border-bottom:1px dashed var(--fg-muted); padding-bottom:1px; cursor:pointer; }
.drawer-contact-link:hover { color:var(--accent, var(--fg-primary)); border-bottom-color:var(--fg-primary); }
.drawer-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.drawer-field { display:flex; flex-direction:column; gap:5px; }
.drawer-field label { font-size:11px; color:var(--fg-secondary); }
.drawer-field input, .drawer-field select, .drawer-field textarea { padding:8px 10px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-primary); font-family:var(--font-body); font-size:13px; }
.drawer-field textarea { min-height:84px; resize:vertical; line-height:1.45; }
.prospect-note-list { display:flex; flex-direction:column; gap:8px; }
.prospect-note-item { border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-page); padding:10px 12px; }
.prospect-note-meta { font-size:11px; color:var(--fg-placeholder); margin-bottom:5px; display:flex; justify-content:space-between; gap:8px; align-items:center; }
.prospect-note-meta-right { display:flex; align-items:center; gap:8px; }
.prospect-note-actions { display:inline-flex; gap:4px; opacity:0; transition:opacity .12s; }
.prospect-note-item:hover .prospect-note-actions, .prospect-note-actions:focus-within { opacity:1; }
.note-act-btn { font-size:11px; color:var(--fg-muted); background:none; border:none; padding:1px 5px; cursor:pointer; border-radius:4px; }
.note-act-btn:hover { background:var(--bg-hover); color:var(--fg-primary); }
.note-act-btn.danger:hover { color:var(--danger, #da314a); }
.note-edit-area { width:100%; min-height:64px; font-size:13px; line-height:1.45; font-family:inherit; padding:8px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-page); color:var(--fg-primary); resize:vertical; box-sizing:border-box; }
.note-edit-controls { display:flex; gap:6px; margin-top:6px; }
.prospect-note-body { font-size:13px; line-height:1.45; color:var(--fg-primary); }
.pipeline-total .pt-count { font-size:13px; color:var(--fg-muted); margin-left:auto; }

/* ─── INVESTOR PROFILE ─────────────────────────────────── */
.profile-back { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--fg-secondary); cursor:pointer; margin-bottom:20px; padding:6px 0; transition:color 0.15s; }
.profile-back:hover { color:var(--fg-primary); }
.profile-back svg { width:14px; height:14px; }
.profile-header { display:flex; align-items:flex-start; gap:20px; margin-bottom:32px; }
.profile-avatar { width:56px; height:56px; border-radius:50%; background:var(--fg-primary); color:#fff; display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-size:20px; font-weight:500; flex-shrink:0; }
.profile-info h3 { font-family:var(--font-display); font-size:22px; font-weight:500; letter-spacing:-0.44px; color:var(--fg-primary); }
.profile-info .profile-entity { font-size:14px; color:var(--fg-secondary); margin-top:2px; }
.profile-info .profile-email { font-size:13px; color:var(--fg-muted); }
.profile-info .profile-meta { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:4px; font-size:13px; color:var(--fg-muted); }
.profile-info .profile-meta-sep { color:var(--fg-placeholder); }
.profile-info .profile-location { display:inline-flex; align-items:center; gap:4px; }
.profile-info .profile-location svg { opacity:0.6; }
.profile-info .profile-touch { font-family:var(--font-mono); font-size:12px; }
.profile-info .profile-touch.touch-stale { color:var(--badge-warning-fg); font-weight:500; }
.badge.badge-tier { background:rgba(123,97,255,0.12); color:#6044d0; font-weight:500; }
.activity-item .activity-when { font-family:var(--font-mono); font-size:11px; color:var(--fg-placeholder); margin-left:8px; white-space:nowrap; }

/* Excel cell comment indicator on cap table rows (#4) */
.comment-indicator { display:inline-flex; align-items:center; gap:3px; margin-left:6px; padding:2px 5px 2px 4px; border-radius:4px; background:var(--bg-hover); color:var(--fg-muted); cursor:pointer; vertical-align:middle; transition:background 0.15s, color 0.15s; }
.comment-indicator:hover { background:rgba(123,97,255,0.12); color:#6044d0; }
.comment-indicator svg { width:12px; height:12px; }
.comment-indicator .comment-count { font-family:var(--font-mono); font-size:10px; font-weight:500; line-height:1; }

/* Cell comment modal body */
.comments-list { display:flex; flex-direction:column; gap:12px; max-height:400px; overflow-y:auto; }
.comment-item { padding:12px 14px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); }
.comment-item .comment-meta { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:6px; font-size:11px; }
.comment-item .comment-author { font-weight:500; color:var(--fg-primary); }
.comment-item .comment-when { font-family:var(--font-mono); color:var(--fg-placeholder); }
.comment-item .comment-body { font-size:13px; line-height:1.5; color:var(--fg-secondary); white-space:pre-wrap; word-break:break-word; }
.profile-info .profile-badges { display:flex; gap:6px; margin-top:8px; }
.profile-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:32px; }
.profile-stat { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:16px 20px; }
.profile-stat .ps-val { font-family:var(--font-display); font-size:24px; font-weight:500; letter-spacing:-0.48px; }
.profile-stat .ps-lbl { font-size:12px; color:var(--fg-secondary); margin-top:4px; }

/* ─── PROGRESS PRIMITIVES (fund-page bar removed 2026-07-21 FR-042;
   these two classes remain in use by .crm-docshare-progress) ───── */
.progress-labels { display:flex; justify-content:space-between; margin-bottom:8px; }
.progress-track { height:8px; background:var(--border-subtle); border-radius:100px; overflow:hidden; display:flex; }
.progress-legend { display:flex; gap:20px; margin-top:8px; }
.legend-item { display:flex; align-items:center; gap:6px; font-size:11px; color:var(--fg-secondary); }
.legend-dot { width:8px; height:8px; border-radius:2px; }
.legend-dot.wired { background:var(--fg-primary); }
.legend-dot.committed { background:var(--fg-placeholder); }
.legend-dot.remaining { background:var(--border-subtle); }

/* ─── ANIMATION ────────────────────────────────────────── */
@keyframes fadeUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.animate-in { animation:fadeUp 0.4s ease both; }
.delay-1{animation-delay:.05s} .delay-2{animation-delay:.1s} .delay-3{animation-delay:.15s} .delay-4{animation-delay:.2s} .delay-5{animation-delay:.25s} .delay-6{animation-delay:.3s}

/* ─── RESPONSIVE ───────────────────────────────────────── */
.tab-content { display:none; }
.tab-content.active { display:block; }
@media(max-width:1200px) { .pending-grid{grid-template-columns:repeat(2,1fr)} .profile-stats{grid-template-columns:repeat(2,1fr)} .kanban-col{min-width:180px} }
@media(max-width:900px) { .pending-grid{grid-template-columns:1fr} .main-inner{padding:24px 20px 80px} .kanban{flex-direction:column} .kanban-col{min-width:100%} .dashboard-sticky-stat-grid{display:flex; overflow-x:auto; grid-template-columns:none; scroll-snap-type:x proximity; padding-bottom:10px} .dashboard-sticky-stat-grid .stat-card{flex:0 0 156px; scroll-snap-align:start} .notes-panel{top:auto; left:0; right:0; bottom:0; width:100%; min-width:0; max-height:82vh; border-radius:var(--radius) var(--radius) 0 0; transform:translateY(calc(100% + 24px));} .notes-overlay.open .notes-panel{transform:translateY(0)} .notes-overlay-compose-actions{justify-content:stretch} .notes-overlay-compose-actions .notes-save-btn{flex:1} }
/* ─── MOBILE NAV DRAWER (FR-069) ────────────────────────
   Below 861px the 240px fixed sidebar left ~150px of content at 390px, so
   body copy wrapped to one or two words per line and cards clipped at the
   right edge. The sidebar becomes an off-canvas drawer and `.main` reclaims
   the full width. Above the breakpoint nothing changes.                     */
.nav-toggle, .nav-scrim { display:none; }
@media(max-width:860px) {
  /* Seated ABOVE page chrome (which reaches z-index:1000 — sticky stat grids,
     floating headers) but deliberately BELOW the lock screen (9999), modal
     overlays (9998) and toasts (10010), so the drawer can never cover the auth
     gate or swallow a confirmation dialog. At z-index:60 the page title and
     sticky elements painted straight through the open drawer. */
  .sidebar {
    transform:translateX(-100%);
    transition:transform 0.22s ease;
    box-shadow:none;
    z-index:9992;
  }
  .sidebar.nav-open {
    transform:translateX(0);
    box-shadow:2px 0 24px rgba(0,0,0,0.18);
  }
  .main { margin-left:0; }
  .main-inner { padding:64px 16px 80px; }
  /* The toggle stays visible over the open drawer as the close affordance, so
     the logo has to clear it rather than sit under it. */
  .sidebar-logo { padding-left:60px; }

  .nav-toggle {
    display:flex; flex-direction:column; justify-content:center; gap:4px;
    position:fixed; top:10px; left:10px; z-index:9993;
    width:40px; height:40px; padding:0 9px;
    background:var(--bg-card); border:1px solid var(--border);
    border-radius:var(--radius-sm); cursor:pointer;
  }
  .nav-toggle-bar { display:block; height:2px; width:100%; background:var(--fg-primary); border-radius:2px; }
  .nav-toggle:focus-visible { outline:2px solid var(--fg-primary); outline-offset:2px; }

  .nav-scrim {
    display:block; position:fixed; inset:0; z-index:9990;
    background:rgba(0,0,0,0.42);
  }
  .nav-scrim[hidden] { display:none; }

  /* The floating stat strip is positioned against the sidebar width. */
  .layout-zones #pipeline-stat-grid.is-floating { left:0; }

  /* FR-083: the header put a 252px non-shrinking action column beside the
     title on a 390px screen, so the account pill and the Theme/Notes/Sync
     buttons ran past the right edge and were unreachable. Stack the header and
     let the actions wrap onto their own rows. */
  .page-header { flex-direction:column; align-items:stretch; gap:12px; }
  .header-actions { flex-direction:row; align-items:center; flex-wrap:wrap;
                    justify-content:flex-start; gap:8px; }
  .auth-user-pill { max-width:100%; }

  /* The filter chips are a fixed-width row that clipped its last chips off the
     screen with no way to reach them. Same swipe treatment the sticky stat grid
     already uses at this width. */
  /* `min-width:0` is load-bearing: a flex item defaults to min-content width,
     so without it .section-header-left stayed 517px wide, the scroller never
     engaged (scrollWidth == clientWidth) and the chips were simply clipped. */
  .section-header-left { min-width:0; max-width:100%; }
  .section-filters { min-width:0; max-width:100%;
                     overflow-x:auto; scroll-snap-type:x proximity;
                     padding-bottom:4px; -webkit-overflow-scrolling:touch; }
  .section-filters > * { flex:0 0 auto; scroll-snap-align:start; }
}
@media(max-width:860px) and (prefers-reduced-motion:reduce) {
  .sidebar { transition:none; }
}

@media(prefers-reduced-motion:reduce) { .stat-card.metric-changed, .pipeline-delta-chip.delta-pop, .crm-skeleton-bar { animation:none; } }

/* ─── CRM ────────────────────────────────────────────────── */
.crm-filter-bar { flex-wrap:wrap; row-gap:8px; }
.crm-filter-bar .filter-input { flex:1 1 240px; min-width:200px; }
.crm-filter-bar .filter-select { flex:0 0 auto; }
.crm-filter-bar .filter-count { flex:1 1 auto; text-align:right; }

/* Toolbar dropdown menus (Lists / Tools / Add to list) */
.crm-menu { position:relative; display:inline-flex; flex:0 0 auto; }
.crm-menu-trigger { white-space:nowrap; }
.crm-menu-caret { opacity:0.55; font-size:10px; margin-left:1px; }
.crm-menu-panel { display:none; position:absolute; top:calc(100% + 5px); left:0; z-index:60; min-width:212px; max-width:300px; max-height:340px; overflow-y:auto; padding:5px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); box-shadow:0 8px 28px rgba(0,0,0,0.16); }
.crm-menu.open .crm-menu-panel { display:block; }
.crm-menu.crm-addtolist-menu .crm-menu-panel { right:0; left:auto; }
.crm-menu-label { font-size:10px; text-transform:uppercase; letter-spacing:0.05em; color:var(--fg-placeholder); padding:5px 9px 3px; }
.crm-menu-item { display:flex; align-items:center; gap:7px; width:100%; text-align:left; box-sizing:border-box; padding:7px 9px; border:none; background:none; border-radius:var(--radius-sm); font-family:var(--font-body); font-size:12.5px; color:var(--fg-primary); cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.crm-menu-item:hover { background:var(--bg-hover); }
.crm-menu-item.is-active { font-weight:600; }
.crm-menu-toggle { cursor:pointer; }
.crm-menu-toggle input { margin:0; cursor:pointer; }
.crm-menu-sep { height:1px; margin:5px 3px; background:var(--border-subtle); }
.crm-list-context { display:inline-flex; align-items:center; gap:6px; flex:0 0 auto; font-size:12px; color:var(--fg-secondary); }

/* Contextual selection bar — appears only when rows are selected */
.crm-selection-bar { flex-wrap:wrap; row-gap:8px; align-items:center; padding:9px 12px; margin:8px 0 2px; background:var(--bg-hover); border:1px solid var(--border); border-radius:var(--radius-sm); }
.crm-selection-bar[hidden] { display:none; }
.crm-selection-count { font-size:13px; color:var(--fg-primary); flex:0 0 auto; }
.crm-selection-count strong { font-weight:600; }
.crm-selall-link { border:none; background:none; padding:0 4px; font-family:var(--font-body); font-size:12px; color:var(--accent, #2563eb); cursor:pointer; text-decoration:underline; }
.crm-selall-link[hidden] { display:none; }
.crm-selection-bar .btn-export { background:var(--bg-card); }
.crm-selbar-clear { margin-left:auto; }

/* Batch document sharing modal */
.modal:has(.crm-docshare-intro) { width:760px; }
.crm-docshare-intro { font-size:13px; line-height:1.5; color:var(--fg-secondary); margin-bottom:16px; }
.crm-docshare-intro strong { color:var(--fg-primary); }
.crm-docshare-flags { align-items:center; flex-wrap:wrap; padding:8px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); }
.crm-docshare-flags .crm-toggle { margin-right:10px; }
.crm-docshare-expiry { display:flex; align-items:center; gap:7px; margin-left:auto; font-size:12px; color:var(--fg-secondary); }
.crm-docshare-expiry .modal-input { width:76px; padding:6px 8px; }
textarea.modal-input.crm-docshare-subject { min-height:34px; height:34px; resize:vertical; }
.crm-docshare-template { min-height:178px; font-family:var(--font-mono); font-size:12px; line-height:1.45; }
.crm-docshare-help { font-size:11px; color:var(--fg-placeholder); }
.crm-docshare-help code { font-family:var(--font-mono); color:var(--fg-secondary); }
.crm-docshare-note { padding:8px 10px; background:var(--bg-hover); border-radius:var(--radius-sm); font-size:11.5px; color:var(--fg-secondary); }
.crm-docshare-progress { margin:16px 0 10px; }
.crm-docshare-progress .progress-labels { font-size:12px; color:var(--fg-secondary); }
.crm-docshare-progress .progress-track { height:6px; }
.crm-docshare-progress-fill { height:100%; background:var(--fg-primary); border-radius:100px; transition:width .15s; }
.crm-docshare-error { margin-top:6px; font-size:11.5px; line-height:1.4; color:var(--badge-error-fg); }
.crm-docshare-results { max-height:280px; overflow:auto; margin-top:14px; border:1px solid var(--border); border-radius:var(--radius-sm); }
.crm-docshare-table { margin:0; width:100%; font-size:12px; }
.crm-docshare-table th { position:sticky; top:0; z-index:1; background:var(--bg-card); }
.crm-docshare-table td { vertical-align:middle; }
.crm-docshare-table .badge { white-space:nowrap; }
.crm-docshare-reason { margin-top:3px; color:var(--fg-placeholder); font-size:10.5px; }
.crm-docshare-link { white-space:nowrap; }
.crm-docshare-copy { border:0; background:none; color:var(--accent,#2563eb); cursor:pointer; font:inherit; margin-left:8px; padding:0; }
@media(max-width:700px) { .crm-docshare-expiry { margin-left:0; } .crm-docshare-results { max-height:220px; } }

/* Header select-all checkbox */
.col-select-head .crm-head-check { margin:0; cursor:pointer; vertical-align:middle; }
.crm-toggle { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--fg-secondary); user-select:none; cursor:pointer; padding:6px 0; }
.crm-toggle input { margin:0; cursor:pointer; }
.crm-grain-toggle { display:inline-flex; align-items:center; gap:6px; flex:0 0 auto; }
.crm-table { table-layout:auto; width:100%; }
.crm-table tbody td { vertical-align:middle; }
.crm-table .crm-row { cursor:pointer; }
.crm-table .crm-name { font-weight:500; display:inline-flex; align-items:center; gap:6px; flex-wrap:wrap; max-width:100%; }
/* Contact column is fixed-width via table-layout:fixed (set on .crm-table)
   so it stops absorbing slack and pushing the numerics off-screen. The wide
   "Linked entities" column truncates with ellipsis to absorb remaining width. */
/* Auto layout: numeric columns size to their (nowrap) content and stay compact;
   the text-heavy columns below are capped so long emails, entity lists, and
   type badges truncate / wrap INSIDE their own column instead of bleeding into
   the next one (the bug fixed-layout-with-no-header-widths caused). */
.crm-table { table-layout:auto; }
.crm-table .col-contact { word-break:break-word; }
.crm-table .col-contact .crm-name { max-width:200px; }
.crm-table .col-contact2 .crm-name { max-width:190px; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.crm-table .col-email { color:var(--fg-secondary); font-size:12px; max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.crm-table .col-type { white-space:normal; }
.crm-table .col-entities { color:var(--fg-secondary); font-size:12px; max-width:300px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.crm-table .col-entities-head { width:auto; min-width:180px; }
.crm-table .col-funds { font-variant-numeric:tabular-nums; }
.crm-table .col-meta { font-size:12px; color:var(--fg-secondary); }
.crm-table .col-meta-head { font-size:11px; }
.crm-table .col-strong { font-weight:600; }
.crm-table .dim { color:var(--fg-placeholder); }
.crm-table .sort-icon { font-size:10px; opacity:0.5; margin-left:4px; }
.crm-table .sort-active .sort-icon { opacity:1; }
.crm-skeleton-bar { display:block; height:12px; border-radius:4px; background:linear-gradient(90deg, var(--border-subtle) 0%, var(--bg-active) 40%, var(--border-subtle) 80%); background-size:200% 100%; animation:crmSkeletonShimmer 1.4s ease-in-out infinite; }
.crm-skeleton-bar.title { height:18px; width:160px; }
.crm-skeleton-bar.control { height:30px; width:104px; border-radius:var(--radius-sm); }
.crm-skeleton-bar.input { height:34px; min-width:220px; flex:1 1 280px; border-radius:var(--radius-sm); }
.crm-skeleton-bar.chip { height:30px; width:86px; border-radius:var(--radius-badge); }
.crm-skeleton-table tbody td { height:54px; }
.crm-skeleton-table tbody tr:hover { background:transparent; }
.crm-skeleton-cell { display:flex; align-items:center; gap:12px; }
.crm-skeleton-avatar { flex:0 0 28px; width:28px; height:28px; border-radius:6px; }
.crm-skeleton-subline { margin-top:6px; height:10px; width:44%; opacity:0.72; }
@keyframes crmSkeletonShimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.crm-chip { display:inline-flex; align-items:center; justify-content:center; min-width:18px; padding:1px 6px; border-radius:999px; background:var(--bg-active); color:var(--fg-secondary); font-size:11px; font-weight:500; }
.crm-chip-pipeline { font-size:10px; padding:2px 8px; }
.crm-cap-notice { margin-top:8px; font-size:12px; color:var(--fg-placeholder); text-align:center; }
.crm-segment-bar { gap:6px; flex-wrap:wrap; margin-bottom:12px; align-items:center; }
.crm-chip-btn { background:var(--bg-card); border:1px solid var(--border); color:var(--fg-secondary); padding:5px 10px; font-size:12px; border-radius:999px; cursor:pointer; font-family:inherit; }
.crm-chip-btn:hover { color:var(--fg-primary); border-color:var(--border-strong, var(--fg-secondary)); }
.crm-chip-btn.active { background:var(--fg-primary); color:var(--bg-card); border-color:var(--fg-primary); }
.crm-refiner-toggle { background:transparent; border:none; color:var(--fg-secondary); font-size:12px; cursor:pointer; padding:5px 8px; font-family:inherit; margin-left:auto; }
.crm-refiner-toggle:hover { color:var(--fg-primary); text-decoration:underline; }
.crm-refiners { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px; align-items:flex-end; padding:10px 12px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); }
.crm-refiner { display:flex; flex-direction:column; gap:4px; font-size:11px; color:var(--fg-secondary); }
.crm-refiner .filter-input, .crm-refiner .filter-select { min-width:160px; }
.crm-refiner-hint { font-size:10px; color:var(--fg-placeholder); }
.crm-refiner-clear { align-self:flex-end; }
.crm-multi { position:relative; min-width:200px; }
.crm-multi-summary { list-style:none; display:inline-flex; align-items:center; gap:8px; padding:6px 10px; min-width:200px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); font-size:12px; color:var(--fg-primary); cursor:pointer; user-select:none; }
.crm-multi-summary::-webkit-details-marker { display:none; }
.crm-multi-summary:hover { border-color:var(--fg-secondary); }
.crm-multi[open] > .crm-multi-summary { border-color:var(--fg-primary); }
.crm-multi-label { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.crm-multi-count { background:var(--fg-primary); color:var(--bg-card); font-size:10px; padding:1px 7px; border-radius:999px; font-weight:600; }
.crm-multi-caret { font-size:10px; color:var(--fg-placeholder); }
.crm-multi[open] > .crm-multi-summary .crm-multi-caret { transform:rotate(180deg); }
.crm-multi-panel { position:absolute; top:calc(100% + 4px); left:0; min-width:240px; max-width:340px; max-height:320px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); box-shadow:var(--shadow-card, 0 4px 16px rgba(0,0,0,0.08)); z-index:50; overflow:hidden; display:flex; flex-direction:column; }
.crm-multi-panel-header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; border-bottom:1px solid var(--border); font-size:11px; color:var(--fg-secondary); text-transform:uppercase; letter-spacing:0.4px; }
.crm-multi-clear { background:transparent; border:none; color:var(--fg-secondary); font-size:11px; cursor:pointer; padding:0; font-family:inherit; text-decoration:underline; }
.crm-multi-clear:hover { color:var(--fg-primary); }
.crm-multi-list { overflow-y:auto; padding:4px 0; }
.crm-multi-item { display:flex; align-items:center; gap:8px; padding:6px 10px; font-size:13px; color:var(--fg-primary); cursor:pointer; }
.crm-multi-item:hover { background:var(--bg-hover); }
.crm-multi-item.checked { background:var(--bg-active); }
.crm-multi-item input { margin:0; cursor:pointer; }
.crm-multi-empty { padding:10px; font-size:12px; color:var(--fg-placeholder); }
.crm-selection { font-size:12px; color:var(--fg-secondary); }
.crm-table .col-select-head, .crm-table .col-select { width:32px; text-align:center; }
.crm-table .col-select input { cursor:pointer; }
.crm-sentinel td { text-align:center; padding:16px 12px !important; color:var(--fg-placeholder); font-size:12px; font-style:italic; }
.crm-back { margin-bottom:12px; font-size:12px; }
.crm-back a { color:var(--fg-secondary); text-decoration:none; }
.crm-back a:hover { color:var(--fg-primary); text-decoration:underline; }
.crm-profile-meta { font-size:12px; color:var(--fg-secondary); margin-bottom:16px; }
.crm-meta-row { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.crm-meta-row .crm-profile-meta { margin-bottom:0; }
.crm-edit-btn { flex:0 0 auto; display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); font-family:var(--font-body); font-size:12px; font-weight:500; cursor:pointer; border:1px solid var(--border); white-space:nowrap; transition:color 0.15s, border-color 0.15s; }
.crm-edit-btn:hover { color:var(--fg-primary); border-color:var(--fg-placeholder); }
.crm-edit-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); padding:16px; margin-bottom:16px; box-shadow:var(--shadow-sm); }
.crm-refresh-retry-card { align-items:center; justify-content:space-between; gap:12px; min-width:0; }
.crm-refresh-retry-card > div { min-width:0; }
.crm-edit-grid { display:flex; gap:12px; flex-wrap:wrap; }
.crm-edit-field { display:flex; flex-direction:column; gap:5px; }
.crm-edit-field label { font-size:10px; font-weight:500; color:var(--fg-placeholder); text-transform:uppercase; letter-spacing:0.5px; }
.crm-edit-field .filter-input { min-width:0; width:100%; }
.crm-edit-field.crm-ed-name-wrap { flex:1 1 240px; }
.crm-edit-field.crm-ed-seg { flex:1 1 150px; }
.crm-edit-actions { display:flex; gap:8px; margin-top:16px; }
.crm-profile-stats { grid-template-columns:repeat(4,1fr); }
.crm-action-cell { white-space:nowrap; }
.crm-action-cell .btn-export { padding:4px 10px; font-size:11px; }
.crm-identity-card { font-size:13px; }
.crm-identity-card .crm-email-list { margin-top:14px; }
.crm-identity-meta { margin-top:6px; font-size:11px; }
.crm-email-list { display:flex; flex-direction:column; gap:4px; }
.crm-email-row { display:flex; align-items:center; gap:6px; flex-wrap:wrap; overflow-wrap:anywhere; }
.crm-header-actions { display:inline-flex; gap:8px; }
.crm-danger-btn { color:var(--badge-error-fg,#c0392b); }
.crm-danger-btn:hover { color:var(--badge-error-fg,#c0392b); border-color:var(--badge-error-fg,#c0392b); }
.crm-timeline { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.crm-timeline-row { display:grid; grid-template-columns:90px 140px 1fr; gap:12px; padding:8px 12px; border-bottom:1px solid var(--border-subtle); align-items:baseline; font-size:13px; }
.crm-timeline-row:last-child { border-bottom:none; }
.crm-timeline-date { font-size:11px; color:var(--fg-secondary); }
.crm-timeline-type { font-size:10px; text-transform:uppercase; letter-spacing:0.5px; color:var(--fg-placeholder); }
/* Vertical Stripe-style history feed */
.crm-history { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:6px 0; }
.crm-history-row { display:grid; grid-template-columns:42px 1fr; gap:12px; padding:10px 14px; position:relative; }
.crm-history-row + .crm-history-row::before { content:''; position:absolute; left:34px; top:-6px; height:16px; width:1px; background:var(--border); }
.crm-history-rail { display:flex; align-items:flex-start; justify-content:center; padding-top:2px; }
.crm-history-glyph { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:50%; background:var(--bg-active); color:var(--fg-secondary); font-size:12px; font-weight:600; }
.crm-history-commitment_added .crm-history-glyph { background:var(--fg-primary); color:var(--bg-card); }
.crm-history-wire_received   .crm-history-glyph { background:#16a34a; color:#fff; }
.crm-history-prospect_added  .crm-history-glyph { background:#f59e0b; color:#fff; }
.crm-history-note            .crm-history-glyph { background:#3b82f6; color:#fff; }
.crm-history-title { font-size:13px; color:var(--fg-primary); }
.crm-history-meta { font-size:11px; color:var(--fg-placeholder); margin-top:2px; }
.crm-history-more { padding:10px 14px; font-size:11px; color:var(--fg-placeholder); border-top:1px dashed var(--border); }
/* Inline stage chips on the pipeline section of the profile */
.crm-stage-chips { display:inline-flex; flex-wrap:wrap; gap:4px; align-items:center; }
.crm-stage-chip { background:var(--bg-card); border:1px solid var(--border); color:var(--fg-secondary); padding:3px 8px; font-size:11px; border-radius:999px; cursor:pointer; font-family:inherit; }
.crm-stage-chip:hover { color:var(--fg-primary); border-color:var(--fg-secondary); }
.crm-stage-chip.active { background:var(--fg-primary); color:var(--bg-card); border-color:var(--fg-primary); }
.crm-stage-chips.is-locked .crm-stage-chip { cursor:not-allowed; opacity:0.55; }
.crm-stage-chips.is-locked .crm-stage-chip:hover { color:var(--fg-secondary); border-color:var(--border); }
.crm-stage-lock { font-size:11px; margin-left:4px; color:var(--fg-placeholder); }
.crm-pipeline-row { cursor:pointer; }
.crm-pipeline-row:hover { background:var(--bg-hover); }
.crm-link { color:var(--fg-primary); text-decoration:none; border-bottom:1px solid var(--border); transition:border-color 0.12s; }
.crm-link:hover { border-bottom-color:var(--fg-primary); }
.crm-side-letter-link { color:var(--fg-primary); text-decoration:none; font-weight:600; }
.crm-side-letter-link:hover { color:var(--badge-success-fg, #16a34a); }
.crm-side-letter-add { background:transparent; border:none; color:var(--fg-placeholder); cursor:pointer; font-size:11px; padding:0 2px; font-family:inherit; }
.crm-side-letter-add:hover { color:var(--fg-primary); }
.empty-cell { padding:24px 12px !important; text-align:center !important; color:var(--fg-placeholder) !important; font-style:italic; }
.data-table thead th.col-sort { cursor:pointer; }

/* CRM responsive — table-layout is fixed. Column order:
     1 Select  2 Contact  3 Linked entities  4 Committed  5 Net LP $  6 Funds */
@media(max-width:1200px) { .crm-profile-stats { grid-template-columns:repeat(2,1fr); } }
@media(max-width:900px) {
  /* Tablet: drop Linked entities (3) + Committed (4); Net LP $ remains. */
  .crm-table thead th:nth-of-type(3), .crm-table tbody td:nth-of-type(3),
  .crm-table thead th:nth-of-type(4), .crm-table tbody td:nth-of-type(4) { display:none; }
  .crm-table .col-contact { width:auto; }
  .crm-table thead th:nth-of-type(5), .crm-table tbody td:nth-of-type(5) { width:35%; }
  .crm-table thead th:nth-of-type(6), .crm-table tbody td:nth-of-type(6) { width:60px; }
  .crm-filter-bar { flex-direction:column; align-items:stretch; }
  .crm-filter-bar .filter-input { flex:0 0 auto; width:100%; }
  .crm-filter-bar .filter-select { flex:0 0 auto; width:100%; }
  .crm-filter-bar .btn-export { width:100%; justify-content:center; }
  .crm-filter-bar .crm-toggle { width:100%; }
  .crm-filter-bar .filter-count { text-align:left; flex:0 0 auto; }
  .crm-segment-bar { flex-direction:row; flex-wrap:wrap; }
  .crm-segment-bar .crm-refiner-toggle { margin-left:0; width:100%; text-align:left; padding-left:0; }
  .crm-refiners { flex-direction:column; align-items:stretch; }
  .crm-refiner { width:100%; }
  .crm-refiner .filter-input, .crm-refiner .filter-select { width:100%; min-width:0; }
  .crm-table .col-mono { padding:8px 6px; }
  .crm-timeline-row { grid-template-columns:80px 1fr; row-gap:2px; }
  .crm-timeline-row .crm-timeline-type { grid-column:1 / -1; }
  .crm-history-row { grid-template-columns:34px 1fr; gap:8px; padding:8px 10px; }
  .crm-stage-chips { gap:3px; }
  .crm-stage-chip { padding:2px 6px; font-size:10px; }
}
@media(max-width:600px) {
  /* Phone: drop Funds (6) too. Leaves Select + Contact + Net LP $. */
  .crm-table thead th:nth-of-type(6), .crm-table tbody td:nth-of-type(6) { display:none; }
  .crm-profile-stats { grid-template-columns:repeat(2,1fr); gap:8px; }
  .crm-profile-stats .profile-stat { padding:12px 14px; }
  .crm-profile-stats .ps-val { font-size:20px; }
  .crm-refresh-retry-card { flex-direction:column; align-items:stretch; }
  .crm-refresh-retry-card .modal-btn { width:100%; }
}

/* ============================================================
   CRM Tasks (9.6) + Activity/Audit feed (2.5)
   ============================================================ */

/* shared bits used by the confirm modals + alert stat card */
.modal-btn-danger { background:var(--badge-error-fg,#c0392b); color:#fff; border:1px solid var(--badge-error-fg,#c0392b); }
.modal-btn-danger:hover { filter:brightness(0.95); }
.modal-confirm-body { font-size:14px; color:var(--fg-secondary); line-height:1.5; padding:4px 0 8px; }
.modal-confirm-body strong { color:var(--fg-primary); }
.modal-confirm-sub { margin-top:8px; font-size:12.5px; color:var(--fg-muted); }
.stat-card.stat-alert .stat-value { color:var(--badge-error-fg,#c0392b); }
textarea.modal-input { resize:vertical; min-height:64px; font-family:var(--font-body); }

/* ---- Tasks ---- */
.task-group { margin-top:18px; }
.task-group:first-child { margin-top:8px; }
.task-group-head {
  display:flex; align-items:center; gap:8px;
  font-size:11px; font-weight:600; letter-spacing:0.05em; text-transform:uppercase;
  color:var(--fg-muted); padding:0 4px 8px;
}
.task-group-head.task-group-over { color:var(--badge-error-fg,#c0392b); }
.task-group-count {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:18px; height:18px; padding:0 5px; border-radius:9px;
  background:var(--bg-active); color:var(--fg-secondary); font-size:11px; font-weight:600;
}
.task-row {
  display:flex; align-items:flex-start; gap:12px;
  padding:12px 14px; border:1px solid var(--border-subtle);
  border-radius:var(--radius-sm); background:var(--bg-card);
  margin-bottom:8px; cursor:pointer; transition:border-color .12s, background .12s;
}
.task-row:hover { border-color:var(--border); background:var(--bg-hover); }
.task-row-closed { opacity:0.62; }
.task-row-closed .task-title { text-decoration:line-through; text-decoration-color:var(--fg-muted); }
.task-check {
  flex:0 0 auto; width:20px; height:20px; margin-top:1px;
  border:1.6px solid var(--border); border-radius:6px; background:transparent;
  display:inline-flex; align-items:center; justify-content:center; cursor:pointer;
  color:#fff; transition:background .12s, border-color .12s;
}
.task-check:hover { border-color:var(--fg-secondary); }
.task-check.checked { background:var(--accent-positive,#2f9e6f); border-color:var(--accent-positive,#2f9e6f); }
.task-check svg { width:12px; height:12px; }
.task-check[disabled] { cursor:default; opacity:0.5; }
.task-main { flex:1 1 auto; min-width:0; }
.task-title { font-size:14px; font-weight:500; color:var(--fg-primary); line-height:1.35; }
.task-meta { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-top:5px; font-size:12px; color:var(--fg-muted); }
.task-meta-sep { color:var(--border); }
.task-owner-chip {
  display:inline-flex; align-items:center; padding:1px 8px; border-radius:var(--radius-badge,10px);
  background:var(--bg-active); color:var(--fg-secondary); font-size:11.5px; font-weight:500;
}
.task-linked { color:var(--fg-secondary); text-decoration:none; border-bottom:1px dotted var(--border); }
.task-linked:hover { color:var(--fg-primary); }
.task-linked-static { border-bottom:none; }
.task-badge { display:inline-flex; align-items:center; padding:1px 7px; border-radius:var(--radius-badge,10px); font-size:11px; font-weight:600; }
.task-pri-urgent { background:var(--badge-error-bg); color:var(--badge-error-fg); }
.task-pri-high   { background:var(--badge-warning-bg); color:var(--badge-warning-fg); }
.task-pri-normal { background:var(--badge-default-bg); color:var(--badge-default-fg); }
.task-pri-low    { background:var(--badge-default-bg); color:var(--fg-muted); }
.task-side { flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end; gap:5px; text-align:right; }
.task-due { font-size:11.5px; color:var(--fg-muted); white-space:nowrap; }
.task-due-over { color:var(--badge-error-fg,#c0392b); font-weight:600; }
.task-due-soon { color:var(--badge-warning-fg); font-weight:500; }
.task-due-soft, .task-due-none { color:var(--fg-muted); }
.task-status-pill { font-size:10.5px; font-weight:600; letter-spacing:0.03em; text-transform:uppercase; }
.task-st-open { color:#b8860b; }
.task-st-prog { color:#3b82f6; }
.task-st-done { color:var(--accent-positive,#2f9e6f); }
.task-st-cancel { color:var(--fg-muted); }
.task-actions { flex:0 0 auto; display:flex; gap:6px; align-items:center; }
.task-act-btn {
  padding:3px 9px; font-size:12px; border:1px solid var(--border);
  border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary);
  cursor:pointer; transition:background .12s, border-color .12s;
}
.task-act-btn:hover { background:var(--bg-hover); border-color:var(--fg-secondary); }
.task-act-del:hover { color:var(--badge-error-fg,#c0392b); border-color:var(--badge-error-fg,#c0392b); }
.crm-row-actions { white-space:nowrap; }
.crm-row-actions .task-act-btn { padding:2px 7px; font-size:11px; margin-left:4px; }

/* ---- Audit / Activity feed ---- */
.audit-note { font-size:12.5px; color:var(--fg-muted); margin:2px 0 14px; line-height:1.5; }
.audit-table td { vertical-align:top; }
.audit-when { color:var(--fg-muted); white-space:nowrap; font-size:12.5px; }
.audit-actor { color:var(--fg-secondary); font-size:12.5px; max-width:200px; }
.audit-act { display:inline-flex; padding:1px 8px; border-radius:var(--radius-badge,10px); font-size:11px; font-weight:600; }
.audit-act-create { background:var(--badge-success-bg); color:var(--badge-success-fg); }
.audit-act-update { background:var(--badge-info-bg); color:var(--badge-info-fg); }
.audit-act-delete { background:var(--badge-error-bg); color:var(--badge-error-fg); }
.audit-act-other  { background:var(--badge-default-bg); color:var(--badge-default-fg); }
.audit-resource { max-width:260px; }
.audit-rtype { display:block; font-size:11px; color:var(--fg-muted); font-family:var(--font-mono); }
.audit-rlabel { display:block; font-size:13px; color:var(--fg-primary); overflow:hidden; text-overflow:ellipsis; }
.audit-change { font-size:12.5px; color:var(--fg-secondary); max-width:320px; }
.audit-muted { color:var(--fg-muted); }
.audit-cls { display:inline-flex; padding:1px 7px; border-radius:var(--radius-badge,10px); font-size:10.5px; font-weight:700; }
.audit-cls-a { background:var(--badge-success-bg); color:var(--badge-success-fg); }
.audit-cls-b { background:var(--badge-default-bg); color:var(--fg-muted); }
.audit-cls-c { background:var(--badge-default-bg); color:var(--badge-default-fg); }
.audit-cls-rev { background:var(--badge-warning-bg); color:var(--badge-warning-fg); }
.audit-reverted { font-size:12px; color:var(--badge-warning-fg); }
.audit-row-reverted { opacity:0.6; }
.audit-revert-btn:hover { color:var(--badge-error-fg,#c0392b); border-color:var(--badge-error-fg,#c0392b); }
.audit-more { display:flex; justify-content:center; padding:14px 0 4px; }

/* CRM Investor Type column + badge (migration 088/089) */
.col-type-head, .col-type { white-space:nowrap; }
.crm-type-badge {
  display:inline-block; padding:1px 8px; border-radius:var(--radius-badge,10px);
  background:var(--bg-active); color:var(--fg-secondary); font-size:11.5px; font-weight:500;
}

/* ---- Deal Intake + IC Memo (roadmap item 12) ---- */
#tab-deal-intake .btn { display:inline-flex; align-items:center; gap:6px; padding:7px 14px; border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-secondary); font-family:var(--font-body); font-size:13px; font-weight:500; cursor:pointer; border:1px solid var(--border); transition:color .15s,border-color .15s,opacity .15s; white-space:nowrap; }
#tab-deal-intake .btn:hover { color:var(--fg-primary); border-color:var(--fg-placeholder); }
#tab-deal-intake .btn:disabled { opacity:.55; cursor:not-allowed; }
#tab-deal-intake .btn-primary { background:#000; color:#fff; border-color:#000; }
#tab-deal-intake .btn-primary:hover { opacity:.85; color:#fff; }
#tab-deal-intake .btn-sm { padding:5px 10px; font-size:12px; }
.di-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px; margin-bottom:18px; }
.di-card-h { font-family:var(--font-display); font-size:15px; font-weight:600; color:var(--fg-primary); margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.di-badge { background:var(--bg-active); color:var(--fg-secondary); border-radius:var(--radius-badge); padding:1px 9px; font-size:12px; font-weight:500; }
.di-textarea { width:100%; min-height:120px; box-sizing:border-box; padding:12px; border:1px solid var(--border); border-radius:var(--radius-sm); font-family:var(--font-body); font-size:13px; color:var(--fg-primary); background:var(--bg-page); resize:vertical; }
.di-row { display:flex; gap:10px; align-items:center; margin-top:12px; }
.di-select { padding:7px 10px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-primary); font-size:13px; }
.di-extracted { margin-top:16px; padding-top:16px; border-top:1px solid var(--border-subtle); }
.di-x-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.di-x-f { display:flex; flex-direction:column; gap:2px; min-width:0; }
.di-x-f span { font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--fg-muted); }
.di-x-f b { font-size:13px; color:var(--fg-primary); font-weight:600; overflow-wrap:anywhere; }
.di-x-summary { margin-top:12px; font-size:13px; color:var(--fg-secondary); font-style:italic; }
.di-x-match { margin-top:12px; font-size:12px; }
.di-match-exact { color:var(--accent-mint, #2e9e8b); font-weight:600; }
.di-match-cand { color:var(--badge-warning-fg, #b7791f); font-weight:600; }
.di-match-new { color:var(--fg-secondary); font-weight:600; }
.di-extracted .btn { margin-top:14px; }
.di-list { display:flex; flex-direction:column; gap:8px; }
.di-item { display:block; padding:12px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-page); }
.di-item-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.di-item-main { flex:1; min-width:0; cursor:pointer; }
.di-item-main:hover .di-item-name { color:var(--accent-sky, #4a90d9); }
.di-caret { display:inline-block; font-size:10px; color:var(--fg-muted); transition:transform .15s ease; margin-right:3px; }
.di-item.expanded .di-caret { transform:rotate(90deg); }
.di-item-name { font-size:14px; font-weight:600; color:var(--fg-primary); }
.di-item-meta { font-size:12px; color:var(--fg-muted); margin-top:2px; }
.di-item-actions { display:flex; gap:6px; flex-shrink:0; }
.di-item-detail { margin-top:12px; padding-top:12px; border-top:1px solid var(--border); }
.di-detail-src { margin-top:12px; font-size:12px; }
.di-detail-src a { color:var(--fg-secondary); text-decoration:underline; cursor:pointer; }
.di-src-box { display:block; margin-top:8px; max-height:220px; overflow:auto; white-space:pre-wrap; font-size:11px; line-height:1.5; color:var(--fg-secondary); background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); padding:8px 10px; }
/* Visual scorecard in the review queue — compact chips (collapsed row) + bars (expanded) */
.di-qscores { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.di-qchip { display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:700; padding:2px 8px; border-radius:100px; line-height:1.7; }
.di-qchip .lbl { font-weight:500; opacity:.85; }
.di-sc-good { background:var(--badge-success-bg); color:var(--badge-success-fg); }
.di-sc-info { background:var(--badge-info-bg); color:var(--badge-info-fg); }
.di-sc-warn { background:var(--badge-warning-bg); color:var(--badge-warning-fg); }
.di-sc-bad  { background:var(--badge-error-bg); color:var(--badge-error-fg); }
.di-sc-none { background:var(--badge-default-bg); color:var(--badge-default-fg); }
.di-scoretitle { font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--fg-muted); margin:4px 0 6px; }
.di-scorebars { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 22px; margin:2px 0 6px; }
.di-scorebar { display:flex; align-items:center; gap:10px; }
.di-scorebar .lbl { flex:0 0 110px; font-size:11px; color:var(--fg-secondary); }
.di-scorebar .track { flex:1; height:7px; background:var(--border); border-radius:100px; overflow:hidden; }
.di-scorebar .fill { display:block; height:100%; border-radius:100px; }
.di-scorebar .val { flex:0 0 30px; text-align:right; font-size:11px; font-weight:700; }
.di-scorebar.di-fill-good .fill { background:var(--badge-success-fg); } .di-scorebar.di-fill-good .val { color:var(--badge-success-fg); }
.di-scorebar.di-fill-info .fill { background:var(--badge-info-fg); }    .di-scorebar.di-fill-info .val { color:var(--badge-info-fg); }
.di-scorebar.di-fill-warn .fill { background:var(--badge-warning-fg); } .di-scorebar.di-fill-warn .val { color:var(--badge-warning-fg); }
.di-scorebar.di-fill-bad .fill { background:var(--badge-error-fg); }    .di-scorebar.di-fill-bad .val { color:var(--badge-error-fg); }
.di-scorebar.di-fill-none .fill { background:var(--badge-default-fg); } .di-scorebar.di-fill-none .val { color:var(--fg-muted); }
.di-sc-rats { margin-top:6px; }
.di-sc-rat { padding:7px 0; border-top:1px solid var(--border); font-size:12px; line-height:1.5; }
.di-sc-rat:first-child { border-top:none; }
.di-sc-rat b { color:var(--fg-primary); }
.di-sc-rat .rt { color:var(--fg-secondary); }
.di-memo-banner { background:rgba(183,121,31,.10); border:1px solid rgba(183,121,31,.30); color:var(--badge-warning-fg, #b7791f); border-radius:var(--radius-sm); padding:8px 12px; font-size:12px; font-weight:500; margin-bottom:14px; }
.di-sec { margin-top:18px; }
.di-sec h3 { font-family:var(--font-display); font-size:14px; font-weight:600; color:var(--fg-primary); margin:0 0 6px; padding-bottom:4px; border-bottom:1px solid var(--border-subtle); }
.di-sec p { font-size:13px; line-height:1.55; color:var(--fg-secondary); margin:6px 0; }
.di-sec ul { margin:6px 0; padding-left:20px; }
.di-sec li { font-size:13px; line-height:1.5; color:var(--fg-secondary); margin:3px 0; }
.di-cite { color:var(--accent-sky, #4a90d9); font-size:10px; font-weight:600; }
.di-sources { font-size:12px; color:var(--fg-muted); padding-left:18px; }
.di-src-cat { color:var(--fg-placeholder); font-size:11px; }
.di-spin { color:var(--fg-muted); font-weight:400; font-size:12px; }
.di-loading { display:flex; align-items:center; gap:10px; color:var(--fg-secondary); font-size:13px; padding:6px 2px; }
.di-spinner { width:16px; height:16px; flex:0 0 auto; border:2px solid var(--border); border-top-color:var(--fg-secondary); border-radius:50%; animation:diSpin 0.8s linear infinite; }
.di-load-msg { line-height:1.4; }
@keyframes diSpin { to { transform:rotate(360deg); } }
.di-file-hidden { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
#tab-deal-intake .di-upload-label { cursor:pointer; }
.di-pdf-status { font-size:12px; color:var(--fg-muted); flex:1; min-width:0; }
.di-pdf-status a { color:var(--fg-secondary); text-decoration:underline; margin-left:4px; }
.di-pdf-status b { color:var(--fg-primary); }
.di-prior { margin-top:8px; font-size:12px; color:var(--badge-warning-fg,#b7791f); background:rgba(183,121,31,.08); border:1px solid rgba(183,121,31,.22); border-radius:var(--radius-sm); padding:6px 10px; }
.di-prior a { color:var(--badge-warning-fg,#b7791f); text-decoration:underline; }
.di-prior b { color:var(--badge-warning-fg,#b7791f); }
.di-scorecards { margin-top:18px; }
.di-scorecards h3 { font-family:var(--font-display); font-size:14px; font-weight:600; color:var(--fg-primary); margin:0 0 10px; }
.di-hint { font-size:11px; font-weight:400; color:var(--fg-muted); font-style:italic; }
.di-scard { border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 14px; margin-bottom:10px; background:var(--bg-page); }
.di-scard-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.di-scard-head b { font-size:13px; color:var(--fg-primary); }
.di-score { width:56px; }
.di-scard-q { font-size:12px; color:var(--fg-secondary); margin-top:4px; font-style:italic; }
.di-scard-rat { font-size:13px; color:var(--fg-secondary); margin-top:8px; }
.di-scard-rat p { margin:4px 0; }
.di-scard-lf { font-size:11px; color:var(--fg-muted); margin-top:8px; }
.di-scard-lf span { text-transform:uppercase; letter-spacing:.04em; }

/* ===== Deal Intake — Board view (roadmap item 27) ===== */
.di-viewbar { display:flex; align-items:center; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
.di-viewbar-sub { font-size:12px; color:var(--fg-muted); }
.di-readonly-note { font-size:11px; color:var(--fg-placeholder); font-style:italic; }
.di-board-filters { flex-wrap:wrap; }
.di-board-toggle { display:inline-flex; align-items:center; gap:5px; font-size:12px; color:var(--fg-secondary); cursor:pointer; white-space:nowrap; }
.di-board-toggle input { margin:0; }
.di-board-kanban { min-height:300px; }
.di-board-col[data-board-stage="passed"] .kanban-col-dot { background:var(--badge-warning-fg,#b7791f); }
.di-board-col[data-board-stage="invested"] .kanban-col-dot { background:var(--badge-success-fg,#2f9e6f); }
.di-board-col[data-board-stage="tracking"] .kanban-col-dot { background:var(--fg-placeholder); }
.di-board-col[data-board-stage="negotiations"] .kanban-col-dot { background:var(--badge-info-fg,#479fdb); }
.di-board-col[data-board-stage="diligence"] .kanban-col-dot { background:var(--badge-committed-fg,#266ef0); }
.di-board-col[data-board-stage="intake"] .kanban-col-dot { background:var(--fg-secondary); }
.di-board-cards.drag-over { background:var(--bg-active); border-radius:var(--radius-sm); outline:1px dashed var(--border); }
.di-board-empty { padding:18px 12px; text-align:center; font-size:12px; color:var(--fg-placeholder); }
.di-board-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); padding:11px 13px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:5px; cursor:pointer; transition:box-shadow .15s, transform .15s; }
.di-board-card:hover { box-shadow:var(--shadow-card); transform:translateY(-1px); }
.di-board-card[draggable="true"] { cursor:grab; }
.di-board-card.dragging { opacity:.5; }
.di-board-name { font-family:var(--font-display); font-size:13px; font-weight:500; color:var(--fg-primary); line-height:1.3; }
.di-board-meta { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.di-board-sector { font-size:10px; font-weight:500; color:var(--fg-muted); background:var(--bg-active); padding:2px 6px; border-radius:4px; }
.di-board-act { font-size:11px; color:var(--fg-placeholder); }
.di-board-reason { font-size:11px; color:var(--fg-muted); font-style:italic; }
.di-board-foot { display:flex; gap:4px; align-items:center; }
/* Agent score — DE-EMPHASIZED (Pat's caveat): neutral gray, never a verdict color. */
.di-board-score { font-family:var(--font-mono); font-size:10px; font-weight:500; color:var(--fg-muted); background:var(--bg-active); border:1px solid var(--border); padding:2px 6px; border-radius:4px; white-space:nowrap; }
.di-board-badge { font-size:10px; color:var(--fg-muted); background:var(--bg-active); border:1px dashed var(--border); border-radius:4px; padding:3px 6px; line-height:1.3; }
.di-board-badge a { color:var(--fg-secondary); text-decoration:underline; }
.di-board-stale { display:inline-block; font-size:10px; color:#9a6b1f; background:#fbf3e0; border:1px solid #f0e2c0; border-radius:4px; padding:2px 6px; margin-top:6px; line-height:1.3; }
.modal:has(.di-board-detail) { max-width:720px; width:720px; }
.di-board-detail .di-x-grid { margin-top:10px; }
.di-board-detail-score { margin-top:12px; font-size:12px; color:var(--fg-muted); display:flex; align-items:center; gap:6px; }
.di-board-detail-note { margin-top:10px; font-size:12px; color:var(--fg-secondary); }
.di-board-detail-link { margin-top:10px; font-size:12px; color:var(--fg-secondary); text-decoration:underline; cursor:pointer; text-underline-offset:2px; transition:color .15s, text-decoration-color .15s; }
.di-board-detail-link a { color:var(--fg-secondary); text-decoration:underline; cursor:pointer; text-underline-offset:2px; transition:color .15s, text-decoration-color .15s; }
.di-board-detail-link:hover,
.di-board-detail-link a:hover { color:var(--fg-primary); text-decoration-color:var(--fg-primary); }
.di-company-page-back { display:flex; align-items:center; gap:10px; margin-bottom:4px; }
.di-company-page > .section-header { margin-bottom:10px; }
.di-company-one-liner { margin-top:4px; font-size:13px; line-height:1.4; color:var(--fg-muted); max-width:780px; }
.di-company-page-meta { display:flex; align-items:center; gap:7px; flex-wrap:wrap; margin-top:8px; }
.di-company-sector-chip { display:inline-flex; align-items:center; min-height:20px; padding:2px 7px; border:1px solid var(--border); border-radius:4px; background:var(--bg-active); color:var(--fg-muted); font-size:11px; font-weight:500; line-height:1.2; }
.di-company-page-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,380px); gap:16px; align-items:start; }
.di-company-page-grid.is-single { grid-template-columns:minmax(0,1fr); }
.di-company-page,
.di-company-page-grid,
.di-company-page-main,
.di-company-page-side,
.di-company-page-side .di-detail-section,
.di-company-page-side .di-detail-head,
.di-company-page-side .di-news-actions,
.di-company-page-side .di-company-task-list,
.di-company-page-side .di-company-task,
.di-company-page-side .di-news-list,
.di-company-page-side .di-news-item { min-width:0; box-sizing:border-box; }
.di-company-page-main .di-x-grid { margin-top:0; margin-bottom:12px; }
.di-company-page-main .di-note-list-wrap { max-height:none; overflow-y:visible; }
.di-company-page-side .di-detail-section:first-child { margin-top:0; padding-top:0; border-top:0; }
.di-company-about { margin:6px 0 14px; padding:12px 14px; border:1px solid var(--border-subtle); border-radius:var(--radius-sm); background:var(--bg-card); }
.di-company-about h3 { margin:0 0 5px; font-family:var(--font-display); font-size:13px; font-weight:600; color:var(--fg-primary); }
.di-company-about p { margin:0; font-size:13px; line-height:1.5; color:var(--fg-secondary); }
.di-detail-subtitle { margin-top:3px; font-size:12px; color:var(--fg-muted); }
.di-agent-scorecard-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.di-agent-scorecard-card { appearance:none; width:100%; min-width:0; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-page); color:var(--fg-primary); font:inherit; padding:13px 14px; text-align:left; cursor:pointer; }
.di-agent-scorecard-card:hover { border-color:var(--fg-muted); background:var(--bg-card); }
.di-agent-scorecard-card:focus-visible { outline:2px solid var(--accent-sky,#4a90d9); outline-offset:2px; }
.di-agent-scorecard-top { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.di-agent-scorecard-title { min-width:0; font-size:13px; font-weight:600; line-height:1.25; color:var(--fg-primary); overflow-wrap:anywhere; }
.di-agent-score { flex:0 0 50px; width:50px; height:38px; border-radius:var(--radius-sm); display:inline-flex; align-items:center; justify-content:center; gap:2px; padding:0 7px; font-family:var(--font-mono); font-weight:700; line-height:1; box-sizing:border-box; }
.di-agent-score span { display:inline-block; font-size:17px; line-height:1; }
.di-agent-score small { display:inline-block; font-size:10px; line-height:1; opacity:.75; transform:translateY(1px); }
.di-agent-score.is-good { background:var(--badge-success-bg); color:var(--badge-success-fg); }
.di-agent-score.is-neutral { background:var(--badge-default-bg); color:var(--badge-default-fg); }
.di-agent-score.is-bad { background:var(--badge-error-bg); color:var(--badge-error-fg); }
.di-agent-score.is-muted { background:var(--bg-active); color:var(--fg-muted); border:1px solid var(--border); }
.di-agent-scorecard-label { display:inline-flex; margin-top:5px; padding:1px 5px; border:1px solid var(--border); border-radius:4px; background:var(--bg-active); color:var(--fg-muted); font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:0; }
.di-agent-scorecard-reason { margin-top:9px; font-size:12px; line-height:1.45; color:var(--fg-secondary); display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow:hidden; }
.di-agent-scorecard-card.is-expanded .di-agent-scorecard-reason { display:block; overflow:visible; }
.di-company-task-composer { display:grid; grid-template-columns:minmax(160px,1fr) 96px 132px auto; gap:8px; align-items:center; margin-bottom:10px; }
.di-company-page-side .di-company-task-composer { grid-template-columns:minmax(0,1fr); align-items:stretch; }
.di-company-page-side .di-company-task-composer .filter-input,
.di-company-page-side .di-company-task-composer .pipeline-action-btn { min-width:0; width:100%; box-sizing:border-box; }
.di-company-task-list { display:flex; flex-direction:column; gap:8px; }
.di-company-task { display:flex; align-items:flex-start; gap:10px; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-page); }
.di-company-page-side .task-title,
.di-company-page-side .task-meta { overflow-wrap:anywhere; }
.di-detail-section { margin-top:18px; padding-top:16px; border-top:1px solid var(--border-subtle); }
.di-detail-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.di-detail-head h3 { font-family:var(--font-display); font-size:14px; font-weight:600; color:var(--fg-primary); margin:0; }
.di-note-composer { display:flex; flex-direction:column; align-items:flex-start; gap:8px; margin-bottom:10px; }
.di-note-new { width:100%; min-height:72px; box-sizing:border-box; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--fg-primary); font-family:var(--font-body); font-size:13px; line-height:1.45; padding:9px 10px; resize:vertical; }
.di-note-composer .notes-rich-wrap, .di-note-body .notes-rich-wrap { width:100%; }
.di-note-new.notes-richtext { width:auto; border:none; border-radius:0; resize:none; }
.di-mention-picker { width:min(280px, 100%); margin-top:-4px; margin-bottom:6px; z-index:5; }
.di-note-list-wrap { max-height:320px; overflow-y:auto; padding-right:2px; }
.di-note-list { display:flex; flex-direction:column; gap:8px; }
.di-note-item { border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-page); padding:10px 12px; }
.di-note-meta { font-size:11px; color:var(--fg-placeholder); margin-bottom:5px; display:flex; justify-content:space-between; gap:8px; align-items:center; }
.di-note-meta-right { display:flex; align-items:center; gap:8px; }
.di-note-actions { display:inline-flex; gap:4px; opacity:0; transition:opacity .12s; }
.di-note-item:hover .di-note-actions, .di-note-actions:focus-within { opacity:1; }
.di-note-badge { display:inline-flex; align-items:center; margin-left:6px; padding:1px 5px; border:1px solid var(--border); border-radius:4px; background:var(--bg-active); color:var(--fg-muted); font-size:10px; font-weight:500; }
.di-note-body { font-size:13px; line-height:1.45; color:var(--fg-primary); }
.di-note-body p { margin:6px 0; }
.di-note-body ul { margin:6px 0; padding-left:18px; }
.di-news-actions { display:flex; align-items:center; gap:8px; }
.di-news-stale { font-size:11px; color:var(--badge-warning-fg,#b7791f); }
.di-news-list { display:flex; flex-direction:column; gap:8px; }
.di-news-item { border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-page); padding:10px 12px; }
.di-news-title { font-size:13px; line-height:1.35; color:var(--fg-primary); }
.di-news-title a { color:var(--fg-primary); text-decoration:none; border-bottom:1px solid var(--border); }
.di-news-title a:hover { border-bottom-color:var(--fg-primary); }
.di-news-meta { margin-top:4px; font-size:11px; color:var(--fg-placeholder); }
.di-news-page-refreshed { margin-top:3px; font-size:12px; color:var(--fg-muted); }
.di-news-filterbar { flex-wrap:wrap; }
.di-news-company-select { max-width:240px; }
.di-news-filterbar .filter-input { flex:1 1 220px; min-width:0; }
.di-news-feed { display:flex; flex-direction:column; gap:8px; }
.di-news-day { margin:14px 0 2px; font-size:11px; font-weight:600; color:var(--fg-muted); text-transform:uppercase; letter-spacing:0; }
.di-news-day:first-child { margin-top:0; }
.di-news-feed-item { background:var(--bg-card); }
.di-news-feed-meta { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:8px; }
.di-news-company,
.di-news-open { border:1px solid var(--border); border-radius:var(--radius-badge); background:var(--bg-card); color:var(--fg-secondary); padding:3px 9px; font-family:var(--font-body); font-size:12px; font-weight:500; cursor:pointer; }
.di-news-company:hover,
.di-news-open:hover { border-color:var(--fg-secondary); color:var(--fg-primary); }
.di-company-page-side .di-detail-head { align-items:flex-start; flex-wrap:wrap; }
.di-company-page-side .di-news-actions { flex-wrap:wrap; justify-content:flex-end; }
.di-company-page-side .di-news-title,
.di-company-page-side .di-news-meta,
.di-company-page-side .di-news-stale { overflow-wrap:anywhere; }
.di-board-prompt p { font-size:13px; color:var(--fg-secondary); margin:0 0 10px; }
.di-board-prompt-actions { margin-top:14px; display:flex; gap:8px; justify-content:flex-end; }
@media(max-width:900px){
  .di-company-page-grid { grid-template-columns:1fr; }
  .di-agent-scorecard-grid { grid-template-columns:1fr; }
  .di-company-task-composer { grid-template-columns:1fr; }
}
@media(min-width:1500px){
  .di-agent-scorecard-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

/* ===== Overview — cross-fundraise hub (roadmap 23) ===== */
.ov-att-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.ov-att-card{appearance:none;text-align:left;border:1px solid var(--border,#e5e5e5);border-radius:9px;padding:12px;background:var(--bg-card,var(--bg-elevated,#fff));color:var(--fg-primary);cursor:pointer;min-width:0;transition:border-color .15s,transform .15s}
.ov-att-card:hover{border-color:var(--fg-muted,#999);transform:translateY(-1px)}
.ov-att-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-size:12px;font-weight:600}
.ov-att-top strong{font-size:20px;font-variant-numeric:tabular-nums}
.ov-att-preview{margin-top:8px;display:flex;flex-direction:column;gap:4px;color:var(--fg-muted,#777);font-size:11px}
.ov-att-preview div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ov-att-clear{margin-top:8px;color:var(--badge-success-fg,#2f9e6f);font-size:11px}
.ov-att-urgent{border-top:3px solid var(--badge-danger-fg,#c24141)}
.ov-att-warn{border-top:3px solid var(--badge-warning-fg,#d4a017)}
.ov-att-data{border-top:3px solid var(--badge-info-fg,#3b82f6)}
.ov-att-trust{border-top:3px solid var(--badge-committed-fg,#6366f1)}
.ov-att-generated{font-size:11px;color:var(--fg-muted,#888)}
@media(max-width:1200px){.ov-att-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.ov-att-grid{grid-template-columns:1fr}}
.ov-two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:40px;align-items:start}
@media(max-width:900px){.ov-two-col{grid-template-columns:1fr}}
.ov-fund-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}
.ov-fund-card{border:1px solid var(--border,#e5e5e5);border-radius:10px;padding:14px 16px;cursor:pointer;transition:border-color .15s,box-shadow .15s;background:var(--bg-card,var(--bg-elevated,#fff))}
.ov-fund-card:hover{border-color:var(--fg-muted,#999);box-shadow:0 1px 6px rgba(0,0,0,.06)}
.ov-fund-top{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.ov-fund-name{font-weight:600;font-size:14px}
.ov-fund-co{color:var(--fg-muted,#888);font-weight:400}
.ov-fund-status{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;vertical-align:middle;margin-left:2px}
.ov-fund-pct{font-weight:600;font-size:13px;font-variant-numeric:tabular-nums}
.ov-bar{height:5px;border-radius:3px;background:var(--border,#eee);margin:9px 0;overflow:hidden}
.ov-bar-fill{height:100%;border-radius:3px;background:var(--badge-committed-fg,#6366f1)}
.ov-fund-meta{display:flex;flex-wrap:wrap;gap:10px;font-size:12px;color:var(--fg-muted,#777)}
.ov-pending-warn{color:var(--badge-warning-fg,#d4a017);font-weight:500}
.ov-pending-ok{color:var(--badge-success-fg,#2f9e6f)}
.ov-act-list,.ov-oi-list{display:flex;flex-direction:column}
.ov-act-row{display:flex;gap:10px;align-items:flex-start;padding:9px 0;border-bottom:1px solid var(--border,#f0f0f0)}
.ov-act-row:last-child{border-bottom:none}
.ov-act-badge{flex:none;margin-top:1px}
.ov-act-body{flex:1;min-width:0}
.ov-act-text{font-size:13px}
.ov-act-amt{color:var(--fg-muted,#777);font-variant-numeric:tabular-nums}
.ov-act-sub{font-size:12px;color:var(--fg-muted,#888);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ov-act-right{flex:none;text-align:right;display:flex;flex-direction:column;gap:1px}
.ov-act-fund{font-size:11px;color:var(--fg-muted,#999)}
.ov-act-when{font-size:11px;color:var(--fg-placeholder,#aaa)}
.ov-head-link,.ov-oi-more a{font-size:12px;color:var(--badge-info-fg,#3b82f6);text-decoration:none}
.ov-head-link:hover,.ov-oi-more a:hover{text-decoration:underline}
.ov-add{display:flex;gap:6px;margin-bottom:12px;flex-wrap:wrap}
.ov-add .filter-input{flex:1;min-width:120px}
.ov-oi-row{display:flex;gap:9px;align-items:flex-start;padding:8px 0;border-bottom:1px solid var(--border,#f0f0f0)}
.ov-oi-row:last-child{border-bottom:none}
.ov-oi-check{flex:none;border:none;background:none;cursor:pointer;font-size:15px;line-height:1;color:var(--fg-muted,#999);padding:0;margin-top:1px}
.ov-oi-check:hover:not(:disabled){color:var(--badge-success-fg,#2f9e6f)}
.ov-oi-check:disabled{cursor:default;opacity:.5}
.ov-oi-check.is-done,.ov-oi-check.is-done:disabled{color:#fff;background:var(--badge-success-fg,#2f9e6f);border-radius:50%;width:16px;height:16px;font-size:11px;display:inline-flex;align-items:center;justify-content:center;opacity:1}
.ov-oi-body{flex:1;min-width:0}
.ov-oi-clickable{cursor:pointer;border-radius:6px;margin:-2px -6px;padding:2px 6px;transition:background .12s}
.ov-oi-clickable:hover{background:var(--bg-subtle,#f6f6f6)}
.ov-oi-clickable:focus-visible{outline:2px solid var(--accent,#3b82f6);outline-offset:1px}
.ov-oi-title{font-size:13px}
.ov-oi-note{font-size:11px;color:var(--fg-muted,#999);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ov-oi-meta{display:flex;flex-wrap:wrap;gap:8px;font-size:11px;color:var(--fg-muted,#999);margin-top:2px}
.ov-oi-tag{color:var(--badge-info-fg,#3b82f6)}
.ov-oi-more{padding-top:8px}

/* ===== Docs tab — Atlas document operations (FR-039) ===== */
.docs-pane{display:flex;flex-direction:column;gap:8px;min-width:0}
.docs-pane-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px}
.docs-pane-copy{min-width:0}
.docs-pane-title{font-family:var(--font-display);font-size:24px;font-weight:500;line-height:1.15;letter-spacing:-.48px;color:var(--fg-primary)}
.docs-pane-subtitle,.docs-section-subtitle{margin-top:4px;font-size:13px;line-height:1.45;color:var(--fg-secondary)}
.docs-console-link{display:inline-flex;align-items:center;text-decoration:none;white-space:nowrap}
.docs-section{margin-bottom:28px}
.docs-section-header{align-items:flex-start;margin-bottom:14px}
.docs-section-copy{min-width:0}
.docs-library-host,.docs-analytics-host,.docs-never-host{min-width:0}
.docs-table thead th{cursor:default}
.docs-table thead th:hover{color:var(--fg-placeholder)}
.docs-library-table-wrap{overflow-x:auto}
.docs-library-table{min-width:820px}
.docs-library-row.is-expanded{background:var(--bg-active)}
.docs-document-cell{min-width:240px}
.docs-document-title{max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;color:var(--fg-primary)}
.docs-document-date,.docs-recipient-name{margin-top:2px;font-size:11px;color:var(--fg-placeholder)}
.docs-expand-cell{text-align:right;white-space:nowrap}
.docs-expand-btn{padding:5px 9px}
.docs-detail-row:hover{background:transparent!important}
.docs-detail-cell{padding:0!important;background:var(--bg-page);border-bottom:1px solid var(--border)!important}
.docs-recipient-panel{padding:16px 18px 18px;border-left:3px solid var(--border);background:var(--bg-page)}
.docs-recipient-toolbar{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.docs-search-wrap{flex:1 1 260px;min-width:220px}
.docs-search-input{width:100%;min-width:0;background:var(--bg-card)}
.docs-search-hint{margin-top:4px;font-size:11px;color:var(--badge-warning-fg)}
.docs-status-filter{flex:0 0 auto;background-color:var(--bg-card)}
.docs-recipient-table-wrap{box-shadow:none}
.docs-recipient-table{min-width:940px}
.docs-recipient-cell{min-width:210px;max-width:300px;overflow-wrap:anywhere}
.docs-recipient-email{font-size:12px;color:var(--fg-primary)}
.docs-added-later{display:inline-flex;margin-top:5px;font-size:10px;line-height:1.2}
.docs-date-cell{min-width:132px;font-size:12px;color:var(--fg-secondary);white-space:nowrap}
.docs-badge-cell{min-width:170px}
.docs-badge-cell .badge{margin:2px 5px 2px 0}
.docs-actions-cell{min-width:158px}
.docs-actions-cell>.pipeline-action-btn{margin:2px 5px 2px 0}
.docs-actions-cell>.docs-state{width:100%}
.docs-add-recipient-inline{display:flex;align-items:center;gap:5px;min-width:270px}
.docs-add-recipient-input{width:150px;min-width:0;padding:5px 7px;font-size:12px;background:var(--bg-card)}
.docs-add-recipient-inline .pipeline-action-btn{padding:5px 8px;white-space:nowrap}
.docs-inline-cancel{color:var(--fg-muted)}
.docs-readonly-label{font-size:11px;color:var(--fg-placeholder);white-space:nowrap}
.docs-revoke-btn{color:var(--badge-error-fg)}
.docs-revoke-btn:hover{border-color:var(--badge-error-fg);color:var(--badge-error-fg)}
.docs-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:10px}
.docs-pagination-label,.docs-page-number{font-family:var(--font-mono);font-size:11px;color:var(--fg-placeholder);white-space:nowrap}
.docs-pagination-actions{display:flex;align-items:center;gap:8px}
.docs-pagination-actions .pipeline-action-btn{padding:5px 9px}
.docs-state{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:22px 18px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-card)}
.docs-state-loading{color:var(--fg-secondary)}
.docs-state-empty{color:var(--fg-secondary)}
.docs-state-error{border-color:var(--badge-error-bg)}
.docs-state-title{font-size:13px;font-weight:500;color:var(--fg-primary)}
.docs-state-detail{max-width:580px;font-size:12px;line-height:1.45;color:var(--fg-secondary)}
.docs-state-error .docs-state-title{color:var(--badge-error-fg)}
.docs-state-action{margin-top:5px;padding:5px 9px}
.docs-stat-grid{grid-template-columns:repeat(6,minmax(110px,1fr));margin-bottom:14px}
.docs-top-section{padding:16px 18px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);box-shadow:var(--shadow-sm)}
.docs-subsection-title,.docs-never-title{font-family:var(--font-display);font-size:14px;font-weight:500;color:var(--fg-primary)}
.docs-top-list{list-style:none;margin-top:10px;display:flex;flex-direction:column}
.docs-top-list li{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 0;border-bottom:1px solid var(--border-subtle)}
.docs-top-list li:last-child{border-bottom:0}
.docs-top-copy{min-width:0}
.docs-top-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:var(--fg-primary)}
.docs-never-host{margin-top:14px}
.docs-never-panel{padding:16px 18px;border:1px solid var(--border);border-left:3px solid var(--badge-warning-fg);border-radius:var(--radius);background:var(--bg-card);box-shadow:var(--shadow-sm)}
.docs-never-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.docs-never-panel .docs-recipient-table-wrap{background:var(--bg-card)}
.docs-never-panel .docs-recipient-toolbar{margin-bottom:12px}
.docs-dialog-overlay{position:fixed;inset:0;z-index:9998;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(0,0,0,.3)}
.docs-dialog{width:480px;max-width:100%;transform:none}
.docs-dialog-copy,.docs-dialog-note{font-size:13px;line-height:1.5;color:var(--fg-primary)}
.docs-dialog-note{margin-top:10px;color:var(--fg-secondary)}
.docs-dialog-error{margin-top:12px;font-size:12px;line-height:1.45;color:var(--badge-error-fg)}
.docs-mint-result{width:min(390px,80vw);padding:10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-card)}
.docs-mint-success{font-size:12px;font-weight:500;color:var(--badge-success-fg)}
.docs-copy-field{margin-top:9px}
.docs-copy-field .di-share-copyrow{align-items:stretch}
.docs-copy-field .filter-input{min-width:0;width:100%;font-family:var(--font-mono);font-size:11px}
.docs-mint-note{margin-top:7px;font-size:11px;line-height:1.4;color:var(--fg-secondary)}
.docs-add-results{position:fixed;right:20px;bottom:20px;z-index:9997;width:min(380px,calc(100vw - 40px));padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-card);box-shadow:var(--shadow-card)}
.docs-add-result{padding:4px 0;font-size:12px;line-height:1.4;color:var(--fg-secondary)}
.docs-add-result+.docs-add-result{border-top:1px solid var(--border-subtle)}
.docs-add-result-success{color:var(--badge-success-fg)}
.docs-add-result-error{color:var(--badge-error-fg)}
@media(max-width:1200px){.docs-stat-grid{grid-template-columns:repeat(3,minmax(110px,1fr))}}
@media(max-width:900px){.docs-pane-header{flex-direction:column}.docs-console-link{align-self:flex-start}.docs-library-table-wrap,.docs-recipient-table-wrap{overflow-x:auto}.docs-stat-grid{grid-template-columns:repeat(2,minmax(110px,1fr))}.docs-pagination{align-items:flex-start;flex-direction:column}.docs-pagination-actions{width:100%;justify-content:space-between}}
@media(max-width:560px){.docs-stat-grid{grid-template-columns:1fr 1fr}.docs-recipient-panel,.docs-never-panel{padding:13px 12px}.docs-recipient-toolbar{flex-direction:column}.docs-search-wrap,.docs-status-filter{width:100%;min-width:0}.docs-dialog{width:100%}.docs-add-recipient-inline{min-width:240px}.docs-add-results{right:12px;bottom:12px;width:calc(100vw - 24px)}}

/* FR-039 staging screenshot-loop fixes */
.docs-recipient-email{overflow-wrap:anywhere}
.docs-document-col{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--fg-secondary)}
.docs-table th.docs-num,.docs-table td.docs-num{text-align:right;padding-right:24px}
.docs-document-clickable{cursor:pointer}
.docs-document-clickable:hover .docs-document-title{text-decoration:underline}
