/* ============================================================
   BeavrDam V2.5 Room App — design system (canonical brand).
   Cool near-black + orange hero. Poppins is the brand face but
   the room app is CSP-strict (no webfonts), so --font-sans falls
   back to system-ui; swap to self-hosted Poppins later if needed.
   bd-* classes ported verbatim from the Claude Design handoff.
   Brand webfonts (Poppins + JetBrains Mono) are now self-hosted below as
   same-origin woff2 (CSP-safe) — the canonical brand face, no system-ui in normal use.
   ============================================================ */

/* ── Self-hosted brand webfonts (CSP-safe, same-origin) ── */
@font-face { font-family:'Poppins'; font-style:normal; font-weight:400; font-display:swap; src:url('assets/fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:500; font-display:swap; src:url('assets/fonts/poppins-500.woff2') format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:600; font-display:swap; src:url('assets/fonts/poppins-600.woff2') format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:700; font-display:swap; src:url('assets/fonts/poppins-700.woff2') format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:800; font-display:swap; src:url('assets/fonts/poppins-800.woff2') format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:900; font-display:swap; src:url('assets/fonts/poppins-900.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:400; font-display:swap; src:url('assets/fonts/jetbrains-mono-400.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:500; font-display:swap; src:url('assets/fonts/jetbrains-mono-500.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:600; font-display:swap; src:url('assets/fonts/jetbrains-mono-600.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  /* ── Brand orange (hero) ── */
  --orange-light:#FF8A1A; --orange:#FF6A00; --orange-deep:#E65C00;
  /* ── UI foundations ── */
  --bg:#060A0F; --panel:#0D1420; --panel-raised:#1A2535;
  /* ── Text ── */
  --text:#E2E8F0; --text-muted:#94A3B8; --text-faint:#64748B;
  --on-orange:#1B1204; --on-lime:#14210A;
  /* ── Lime (success/growth) ── */
  --lime:#C8FF00; --lime-dim:#A6D400;
  /* ── Crew accents ──
     --crew-research is Research Beaver's IDENTITY color (lime safari hat) —
     used wherever the crew member appears (crew cards, avatar rings).
     --research (cyan) remains a chart-palette color only (rings, stage dots). */
  --research:#00B4FF; --sales:#FF6A00; --enforcer:#2563EB; --captain:#A855F7;
  --crew-research:var(--lime);
  /* ── Semantic ── */
  --success:#C8FF00; --warning:#F59E0B; --error:#EF4444; --info:#94A3B8;
  /* ── Hairlines ── */
  --line:rgba(255,255,255,0.08); --line-strong:rgba(255,255,255,0.14); --line-orange:rgba(255,106,0,0.35);
  /* ── Tinted fills ── */
  --orange-soft:rgba(255,106,0,0.10); --lime-soft:rgba(200,255,0,0.12);
  --research-soft:rgba(0,180,255,0.12); --enforcer-soft:rgba(37,99,235,0.14);
  --captain-soft:rgba(168,85,247,0.14); --error-soft:rgba(239,68,68,0.12); --warning-soft:rgba(245,158,11,0.12);
  /* ── Aliases ── */
  --accent:var(--orange); --focus-ring:var(--orange);
  /* ── Type ── */
  --font-sans:'Poppins',system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:'JetBrains Mono',ui-monospace,"SF Mono",Menlo,monospace;
  /* Small stat numerals: the self-hosted Poppins subset carries NO layout
     features (tnum is a silent no-op, digits proportional -> columns jitter)
     and JetBrains Mono's dotted zero reads as an 8 at 11-13px. The system UI
     faces (Segoe UI / SF / Roboto) have real tabular figures + plain zeros. */
  --font-num:system-ui,'Segoe UI',Roboto,sans-serif;
  --text-xs:11px; --text-sm:13px; --text-base:16px; --text-lg:18px; --text-xl:22px; --text-2xl:28px; --text-3xl:40px;
  --leading-tight:1.15; --leading-snug:1.4; --leading-normal:1.55;
  /* ── Spacing ── */
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:20px; --space-6:24px; --space-8:32px; --space-10:40px;
  /* ── Radii ── */
  --radius-sm:4px; --radius:8px; --radius-md:12px; --radius-lg:16px; --radius-pill:999px;
  /* ── Elevation ── */
  --shadow-sm:0 1px 2px rgba(0,0,0,0.40);
  --shadow-card:0 1px 2px rgba(0,0,0,0.40),0 8px 24px rgba(0,0,0,0.25);
  --shadow-pop:0 12px 40px rgba(0,0,0,0.45);
  --glow-orange:0 0 0 1px rgba(255,106,0,0.30),0 8px 28px rgba(255,106,0,0.28);
  --glow-lime:0 0 0 1px rgba(200,255,0,0.30),0 8px 24px rgba(200,255,0,0.20);
  --wash-orange:radial-gradient(1200px 400px at 70% -10%,rgba(255,106,0,0.07),transparent 60%);
  /* ── Motion ── */
  --t-fast:150ms ease; --t-base:200ms ease; --ease-out:cubic-bezier(0.22,1,0.36,1);
}
*,*::before,*::after { box-sizing:border-box; }
html,body { margin:0; }
body {
  font-family:var(--font-sans); font-size:var(--text-base); line-height:var(--leading-normal);
  color:var(--text); background:var(--wash-orange),var(--bg);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; overflow-x:hidden;
}
::selection { background:rgba(255,106,0,0.30); color:#fff; }
:focus-visible { outline:2px solid var(--focus-ring); outline-offset:2px; border-radius:var(--radius-sm); }
svg { display:block; }
h1,h2,h3 { margin:0; }

/* ── DS primitives (vanilla equivalents of the React kit) ── */
.bd-card { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-md); box-shadow:var(--shadow-card); }
.bd-card.is-interactive { transition:border-color var(--t-fast), transform var(--t-fast); cursor:pointer; }
.bd-card.is-interactive:hover { border-color:var(--line-strong); transform:translateY(-1px); }
.bd-badge { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; border-radius:var(--radius-pill); padding:3px 10px; border:1px solid transparent; }
.bd-badge.is-success { background:var(--lime-soft); color:var(--lime); border-color:rgba(200,255,0,0.3); }
.bd-badge.is-neutral { background:var(--panel-raised); color:var(--text-muted); border-color:var(--line); }
.bd-badge.is-warning { background:var(--warning-soft); color:var(--warning); border-color:rgba(245,158,11,0.3); }
.bd-badge.is-sm { font-size:11px; padding:2px 8px; }
.bd-badge-dot { width:7px; height:7px; border-radius:50%; background:currentColor; }
.bd-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; font:inherit; font-size:14px; font-weight:600;
  border-radius:var(--radius); padding:10px 16px; cursor:pointer; border:1px solid transparent; transition:background var(--t-fast),border-color var(--t-fast),box-shadow var(--t-fast),opacity var(--t-fast); }
.bd-btn.v-primary { background:var(--orange); color:var(--on-orange); }
.bd-btn.v-primary:hover { background:var(--orange-light); box-shadow:var(--glow-orange); }
.bd-btn.v-secondary { background:var(--panel); color:var(--text); border-color:var(--line-strong); }
.bd-btn.v-secondary:hover { border-color:var(--orange); }
.bd-btn.v-ghost { background:none; color:var(--text-muted); }
.bd-btn.v-ghost:hover { color:var(--text); background:var(--panel); }
.bd-btn.v-danger { background:none; color:var(--error); border-color:rgba(239,68,68,0.5); }
.bd-btn.v-danger:hover { background:var(--error); color:#fff; }
.bd-btn.is-sm { padding:7px 12px; font-size:13px; }
.bd-btn:disabled { opacity:0.45; cursor:not-allowed; box-shadow:none; }
.bd-input { width:100%; background:var(--bg); color:var(--text); border:1px solid var(--line-strong); border-radius:var(--radius);
  padding:11px 13px; font:inherit; font-size:14px; transition:border-color var(--t-fast),box-shadow var(--t-fast); }
.bd-input:focus { outline:none; border-color:var(--orange); box-shadow:0 0 0 3px var(--orange-soft); }
.bd-label { display:block; font-size:12px; color:var(--text-muted); margin-bottom:6px; font-weight:600; }

/* ── App layout ── */
.bd-app { display:flex; min-height:100vh; align-items:flex-start; }
.bd-sidebar { position:sticky; top:0; height:100vh; width:248px; flex:0 0 248px; background:#070B11; border-right:1px solid var(--line);
  display:flex; flex-direction:column; padding:var(--space-5) var(--space-3) var(--space-4); }
.bd-logo { display:flex; align-items:center; gap:9px; padding:4px 10px var(--space-5); }
.bd-logo img { height:30px; width:30px; object-fit:contain; flex:0 0 auto; display:block; }
.bd-logo-word { font-size:21px; font-weight:800; letter-spacing:-0.02em; line-height:30px; }
.bd-logo-word span { color:var(--orange); }
.bd-nav { display:flex; flex-direction:column; gap:2px; flex:1; overflow-y:auto; }
.bd-navitem { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:var(--radius); background:none; border:0;
  color:var(--text-muted); font:inherit; font-size:14px; font-weight:500; cursor:pointer; position:relative;
  transition:background var(--t-fast),color var(--t-fast); text-align:left; width:100%; }
.bd-navitem:hover { background:var(--panel); color:var(--text); }
.bd-navitem.is-active { background:var(--orange-soft); color:var(--orange-light); font-weight:600; }
.bd-navitem.is-active::before { content:''; position:absolute; left:-12px; top:8px; bottom:8px; width:3px; background:var(--orange); border-radius:0 3px 3px 0; }
.bd-navitem-ico { display:inline-flex; flex:0 0 auto; }
.bd-navitem-label { flex:1; }
.bd-navitem-badge { font-size:11px; font-weight:700; background:var(--panel-raised); color:var(--text-muted); border-radius:var(--radius-pill); padding:1px 8px; min-width:20px; text-align:center; }
.bd-navitem-badge.is-orange { background:var(--orange); color:var(--on-orange); }
.bd-nav-sep { height:1px; background:var(--line); margin:4px 12px; }
.bd-sidebar-foot { border-top:1px solid var(--line); padding-top:var(--space-3); display:flex; flex-direction:column; gap:6px; }
.bd-sidebar-user { font-size:12px; color:var(--text-muted); padding:2px 12px; font-family:var(--font-mono); }
.bd-signout { display:flex; align-items:center; gap:8px; background:none; border:0; color:var(--text-muted); font:inherit; font-size:14px; cursor:pointer; padding:8px 12px; border-radius:var(--radius); }
.bd-signout:hover { color:var(--error); background:var(--panel); }
/* Pending-approvals notification box (sidebar, above sign-out) */
.bd-pending-wrap { margin:6px 0; }
.bd-pending { display:flex; align-items:center; gap:9px; width:100%; padding:10px 12px; border-radius:var(--radius); border:1px solid var(--line); font:inherit; font-size:13px; text-align:left; }
.bd-pending svg { flex:0 0 auto; }
.bd-pending-txt { flex:1; }
.bd-pending.is-alert { background:var(--orange-soft); border-color:var(--orange); color:var(--orange-light); cursor:pointer; transition:background var(--t-fast),color var(--t-fast); }
.bd-pending.is-alert:hover { background:var(--orange); color:var(--on-orange); }
.bd-pending.is-alert b { font-weight:700; }
.bd-pending.is-alert:focus-visible { outline:2px solid var(--orange); outline-offset:2px; }
.bd-pending.is-clear { background:transparent; border-color:transparent; color:var(--text-muted); }
/* Founder-editable pipeline stage (Pipeline lead detail) */
.bd-stage-select { appearance:none; -webkit-appearance:none; background-color:var(--panel-raised); color:var(--text); border:1px solid var(--line); border-radius:var(--radius-pill); padding:4px 28px 4px 12px; font:inherit; font-size:12px; font-weight:600; cursor:pointer;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat:no-repeat; background-position:right 9px center; }
.bd-stage-select:hover { border-color:var(--orange); }
.bd-stage-select:focus-visible { outline:2px solid var(--orange); outline-offset:1px; }
.bd-stage-select:disabled { opacity:0.55; cursor:default; }

.bd-shellmain { flex:1; min-width:0; }
.bd-topbar { display:flex; align-items:center; justify-content:flex-end; gap:var(--space-4); height:60px; padding:0 var(--space-8);
  border-bottom:1px solid var(--line); position:sticky; top:0; z-index:15; background:rgba(6,10,15,0.86); backdrop-filter:blur(10px); }
.bd-org { font-size:13px; font-weight:600; color:var(--text); border:1px solid var(--line-strong); border-radius:var(--radius-pill); padding:6px 14px; }
.bd-bell { background:none; border:0; color:var(--text-muted); cursor:pointer; display:inline-flex; }
.bd-bell:hover { color:var(--orange); }
.bd-content { padding:var(--space-8); }
.bd-hamburger { display:none; background:none; border:0; color:var(--text-muted); cursor:pointer; padding:8px; border-radius:var(--radius-sm); }
.bd-hamburger:hover { color:var(--text); background:var(--panel); }
.bd-backdrop { display:none; position:fixed; inset:0; z-index:25; background:rgba(0,0,0,0.5); }
.bd-backdrop.is-on { display:block; }
.bd-screen { max-width:none; display:flex; flex-direction:column; gap:var(--space-5); animation:bd-enter 0.28s var(--ease-out) both; }
@keyframes bd-enter { from { opacity:0; transform:translateY(6px); } }

.bd-screenhead { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--space-4); }
.bd-screenhead-title { font-size:30px; font-weight:800; letter-spacing:-0.02em; margin:0; display:flex; align-items:center; gap:12px; }
.bd-screenhead-badge { font-size:14px; font-weight:700; background:var(--orange); color:var(--on-orange); border-radius:var(--radius-pill); padding:2px 11px; }
.bd-screenhead-sub { color:var(--text-muted); margin:6px 0 0; font-size:14px; }
.bd-screenhead-right { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.bd-lead-replied { color:var(--lime); font-size:9px; vertical-align:middle; }
.bd-eyebrow { font-size:12px; font-weight:600; color:var(--text-muted); }
.bd-iconbtn { display:inline-flex; align-items:center; gap:7px; background:var(--panel); border:1px solid var(--line-strong); color:var(--text);
  font:inherit; font-size:13px; font-weight:600; border-radius:var(--radius); padding:8px 13px; cursor:pointer; transition:border-color var(--t-fast),background var(--t-fast); }
.bd-iconbtn:hover { border-color:var(--orange); }
.bd-iconbtn.is-solid { background:var(--orange); color:var(--on-orange); border-color:var(--orange); }
.bd-iconbtn:disabled { opacity:0.45; cursor:not-allowed; }

.bd-tabs { display:flex; gap:8px; flex-wrap:wrap; padding-bottom:2px; }
.bd-tab { background:none; border:1px solid transparent; color:var(--text-muted); font:inherit; font-size:13px; font-weight:600;
  border-radius:var(--radius-pill); padding:7px 15px; cursor:pointer; white-space:nowrap; transition:all var(--t-fast); }
.bd-tab:hover { color:var(--text); background:var(--panel); }
.bd-tab.is-active { background:var(--orange-soft); color:var(--orange-light); border-color:var(--line-orange); }
.bd-tab-count { opacity:0.7; margin-left:3px; }

/* ── Dashboard / Reports ── */
.bd-dash-greet { display:flex; align-items:center; gap:var(--space-4); }
.bd-dash-coffee { color:var(--orange); display:inline-flex; }
.bd-dash-h { font-size:30px; font-weight:800; letter-spacing:-0.02em; margin:0; }
.bd-dash-date { color:var(--text-muted); margin:4px 0 0; font-size:14px; }
.bd-dash-greet-actions { margin-left:auto; display:flex; gap:10px; }
.bd-metric-row { display:grid; grid-template-columns:repeat(4,1fr); gap:var(--space-4); }
.bd-metric { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-md); padding:var(--space-5); position:relative; overflow:hidden; transition:border-color var(--t-fast),transform var(--t-fast); }
.bd-metric:hover { border-color:var(--line-strong); transform:translateY(-2px); }
/* Metric cards: ONE neutral icon tint (accent discipline) — the VALUE carries
   the weight in default ink; crew colors only where a crew member appears. */
.bd-metric-top { display:flex; align-items:center; gap:8px; color:var(--text-muted); margin-bottom:14px; }
.bd-metric-ico { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:var(--radius-sm); background:var(--panel-raised); }
.bd-metric-label { font-size:12px; font-weight:600; }
.bd-metric-val { font-size:34px; font-weight:700; font-family:var(--font-mono); font-variant-numeric:tabular-nums; line-height:1; color:var(--text); }
.bd-metric-unit { font-size:18px; color:var(--text-muted); margin-left:2px; }
.bd-metric-sub { font-size:12px; color:var(--text-muted); margin-top:6px; }
.bd-dash-grid { display:grid; grid-template-columns:1.5fr 1fr; gap:var(--space-4); }
.bd-enginewrap { display:flex; flex-direction:column; }
.bd-engine-head { display:flex; align-items:center; gap:12px; padding:var(--space-4) var(--space-5) 0; }
.bd-engine-motion { margin-left:auto; font-size:11px; font-family:var(--font-mono); color:var(--text-muted); }
.bd-engine { position:relative; width:100%; aspect-ratio:1; max-width:380px; margin:0 auto; padding:var(--space-3); }
.bd-engine-svg { width:100%; height:100%; display:block; }
.bd-engine-svg g { transform-origin:200px 200px; }
.bd-engine-center { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.bd-engine-label { font-size:12px; font-weight:600; color:var(--text-muted); }
.bd-engine-num { font-size:60px; font-weight:800; line-height:1; color:var(--text); font-variant-numeric:tabular-nums; }
.bd-engine-week { font-size:13px; color:var(--lime); font-weight:600; margin-top:2px; }
.bd-engine-legend { display:flex; flex-wrap:wrap; gap:16px; justify-content:center; padding:0 var(--space-5) var(--space-5); }
.bd-leg { font-size:12px; color:var(--text-muted); display:inline-flex; align-items:center; gap:6px; text-transform:capitalize; }
.bd-leg b { color:var(--text); font-family:var(--font-num); font-variant-numeric:tabular-nums; font-weight:700; }
@keyframes bd-spin { to { transform:rotate(360deg); } }
.bd-dash-rail { display:flex; flex-direction:column; gap:var(--space-4); height:100%; }
.bd-dash-rail > .bd-card:last-child { flex:1; }
.bd-rail-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:var(--space-3); }
.bd-stage { display:flex; align-items:center; gap:10px; padding:7px 0; }
.bd-leg-dot { width:8px; height:8px; border-radius:50%; flex:0 0 auto; display:inline-block; }
.bd-stage-label { font-size:13px; color:var(--text); text-transform:capitalize; width:92px; }
.bd-stage-track { flex:1; height:6px; background:var(--panel-raised); border-radius:var(--radius-pill); overflow:hidden; }
.bd-stage-fill { height:100%; border-radius:var(--radius-pill); transition:width 1s var(--ease-out); }
/* Zero-glyph + column-jitter fix: small stat numerals use --font-num
   (system stack: plain zeros AND real tabular figures - see the :root note;
   the Poppins subset has no tnum, JetBrains Mono has the dotted zero). */
.bd-stage-val { font-family:var(--font-num); font-variant-numeric:tabular-nums; font-weight:600; font-size:13px; color:var(--text); width:28px; text-align:right; }
.bd-replies { margin-top:var(--space-3); display:flex; flex-direction:column; gap:9px; }
.bd-reply { display:flex; align-items:center; gap:10px; font-size:13px; }
.bd-reply-label { color:var(--text); flex:1; }
.bd-reply-pct { font-family:var(--font-num); font-variant-numeric:tabular-nums; color:var(--text-muted); }
.bd-reply-n { font-family:var(--font-num); font-variant-numeric:tabular-nums; color:var(--text-muted); width:18px; text-align:right; }
.bd-dash-tworow { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-4); margin-top:var(--space-4); }
.bd-bigstat { display:flex; align-items:center; gap:var(--space-4); padding:var(--space-5); }
.bd-bigstat-ico { display:inline-flex; color:var(--text-muted); }
.bd-bigstat-val { font-size:30px; font-weight:800; line-height:1; font-variant-numeric:tabular-nums; }
.bd-bigstat-lab { font-size:14px; color:var(--text); margin-top:3px; }
.bd-bigstat-link { font-size:12px; margin-top:2px; color:var(--text-muted); }
.bd-kpiband { padding:var(--space-6); }
.bd-kpiband-head { display:flex; align-items:center; justify-content:space-between; }
.bd-kpiband-date { font-size:12px; color:var(--text-muted); font-family:var(--font-mono); }
.bd-kpiband-row { display:flex; align-items:baseline; justify-content:space-between; margin:var(--space-3) 0; }
.bd-kpiband-big { font-size:40px; font-weight:800; font-variant-numeric:tabular-nums; }
.bd-kpiband-tgt { font-size:20px; color:var(--text-muted); font-weight:500; }
.bd-kpiband-pct { font-size:18px; color:var(--lime); font-weight:700; font-family:var(--font-mono); }
.bd-kpiband-track { height:8px; background:var(--panel-raised); border-radius:var(--radius-pill); overflow:hidden; }
.bd-kpiband-fill { height:100%; background:linear-gradient(90deg,var(--orange-deep),var(--orange-light)); border-radius:var(--radius-pill); box-shadow:var(--glow-orange); transition:width 1.2s var(--ease-out); }
.bd-kpiband-legend { display:flex; align-items:center; gap:var(--space-5); margin-top:var(--space-4); font-size:13px; color:var(--text-muted); flex-wrap:wrap; }
.bd-kpiband-legend span { display:inline-flex; align-items:center; gap:6px; }
.bd-kpiband-legend b { color:var(--text); }
.bd-kpiband-gap { color:var(--orange-light) !important; font-weight:600; }
.bd-kpiband-ask { margin-left:auto; }
.bd-dash-section { margin-top:var(--space-8); }
.bd-dash-section:first-child { margin-top:0; }
.bd-dash-seplabel { display:flex; align-items:center; gap:var(--space-3); margin-bottom:var(--space-4); color:var(--text-muted); font-size:11px; font-weight:700; letter-spacing:.04em; }
.bd-dash-seplabel::after { content:''; flex:1; height:1px; background:var(--line); }
.bd-integrations { display:flex; flex-wrap:wrap; gap:10px; }
.bd-int { display:inline-flex; align-items:center; gap:8px; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-pill); padding:7px 14px; font-size:13px; }
.bd-int b { font-weight:600; }
.bd-int-dot { width:8px; height:8px; border-radius:50%; }
.bd-int-detail { color:var(--text-muted); font-size:12px; }

/* ── Approvals ── */
.bd-apr-list { display:flex; flex-direction:column; gap:var(--space-4); }
.bd-apr-in { padding:var(--space-5) var(--space-6); display:flex; flex-direction:column; gap:var(--space-4); }
.bd-apr-top { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--space-4); }
.bd-apr-name { font-size:17px; font-weight:600; }
.bd-apr-title { color:var(--text-muted); font-weight:400; }
.bd-apr-co { font-size:13px; color:var(--text-muted); margin-top:2px; }
/* ONE link-on-dark rule: brand orange (accent discipline; cyan retired). */
.bd-apr-verify { font-size:12px; color:var(--orange-light); text-decoration:none; display:inline-flex; align-items:center; gap:5px; margin-top:6px; }
.bd-apr-verify:hover { text-decoration:underline; }
.bd-shield { display:inline-flex; align-items:center; gap:5px; font-family:var(--font-mono); font-weight:600; font-size:14px; border:1px solid; border-radius:var(--radius-pill); padding:4px 11px; flex:0 0 auto; }
.bd-apr-tags { display:flex; gap:8px; flex-wrap:wrap; }
.bd-tag { font-size:12px; font-weight:600; background:var(--panel-raised); color:var(--text-muted); border-radius:var(--radius-pill); padding:4px 11px; }
.bd-tag.is-followup { background:var(--captain-soft); color:#c89bfb; }
.bd-manual { display:flex; align-items:center; gap:10px; background:var(--panel-raised); border:1px solid var(--line-strong); border-radius:var(--radius-md); padding:11px 14px; font-size:13px; color:var(--text); }
.bd-manual b { color:var(--orange-light); }
.bd-manual svg { color:var(--orange-light); flex:0 0 auto; }
.bd-manual-copy { margin-left:auto; flex:0 0 auto; }
.bd-apr-subj { font-size:13px; }
.bd-apr-subj span { font-family:var(--font-mono); font-size:11px; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.08em; margin-right:6px; }
.bd-apr-subj.is-editable { display:flex; align-items:center; gap:6px; }
.bd-apr-subj-input { flex:1; background:var(--bg); color:var(--text); border:1px solid var(--line-strong); border-radius:var(--radius-sm); padding:8px 12px; font:inherit; font-size:13px; transition:border-color var(--t-fast),box-shadow var(--t-fast); }
.bd-apr-subj-input:focus { outline:none; border-color:var(--orange); box-shadow:0 0 0 3px var(--orange-soft); }
.bd-apr-body { width:100%; background:var(--bg); color:var(--text); border:1px solid var(--line-strong); border-radius:var(--radius-sm); padding:14px;
  font-family:var(--font-sans); font-size:14px; line-height:1.6; min-height:120px; resize:vertical; transition:border-color var(--t-fast),box-shadow var(--t-fast); }
.bd-apr-body:focus { outline:none; border-color:var(--orange); box-shadow:0 0 0 3px var(--orange-soft); }
/* Thin dark scrollbars on the draft containers (Windows showed raw double
   scrollbars on overflowing textareas). */
.bd-apr-body, .bd-apr-readbody { scrollbar-width:thin; scrollbar-color:var(--panel-raised) transparent; overflow-x:hidden; }
.bd-apr-body::-webkit-scrollbar, .bd-apr-readbody::-webkit-scrollbar { width:8px; }
.bd-apr-body::-webkit-scrollbar-track, .bd-apr-readbody::-webkit-scrollbar-track { background:transparent; }
.bd-apr-body::-webkit-scrollbar-thumb, .bd-apr-readbody::-webkit-scrollbar-thumb { background:var(--panel-raised); border-radius:4px; }
.bd-apr-body::-webkit-scrollbar-thumb:hover, .bd-apr-readbody::-webkit-scrollbar-thumb:hover { background:var(--line-strong); }
.bd-apr-rationale { display:flex; gap:12px; background:var(--panel-raised); border:1px solid var(--line); border-radius:var(--radius-md); padding:12px 14px; }
.bd-apr-rationale.is-borderline { background:var(--orange-soft); border-color:var(--line-orange); }
.bd-apr-rationale-lab { font-size:12px; font-weight:600; color:var(--text-muted); display:block; margin-bottom:5px; }
.bd-apr-rationale.is-borderline .bd-apr-rationale-lab { color:var(--orange-light); }
.bd-apr-rationale-txt { margin:0; font-size:13px; color:var(--text); line-height:1.5; }
.bd-apr-thoughts { margin:0; padding-left:18px; }
.bd-apr-thoughts li { font-size:13px; line-height:1.5; margin-bottom:3px; }
.bd-chipmini { width:38px; height:38px; border-radius:10px; overflow:hidden; flex:0 0 auto; padding:2px;
  background:radial-gradient(circle at 50% 26%,rgba(255,255,255,.12),rgba(0,0,0,.30)); box-shadow:inset 0 0 0 1.5px var(--c),0 0 12px -3px var(--c); display:inline-flex; }
.bd-chipmini img { width:100%; height:100%; object-fit:contain; }
.bd-chipmini--sm { width:26px; height:26px; border-radius:7px; padding:1px; }
.bd-apr-actions { display:flex; gap:12px; flex-wrap:wrap; }
.bd-teach { border-top:1px solid var(--line); padding-top:var(--space-4); }
.bd-teach-lab { color:var(--lime); font-weight:700; font-size:13px; }
.bd-teach-hint { color:var(--text-muted); font-size:13px; margin-left:6px; }
.bd-teach-chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.bd-teach-chip { display:inline-flex; align-items:center; gap:6px; background:color-mix(in oklab, var(--lime) 12%, transparent); color:var(--text); border:1px solid color-mix(in oklab, var(--lime) 40%, var(--line-strong)); border-radius:var(--radius-sm); padding:5px 10px; font-size:12.5px; line-height:1.35; }
.bd-teach-chip svg { color:var(--lime); flex:0 0 auto; }
.bd-taught-badge { display:inline-flex; align-items:center; gap:5px; margin-left:10px; padding:3px 9px; border-radius:999px; font-size:11.5px; font-weight:600; background:color-mix(in oklab, var(--lime) 14%, transparent); color:var(--text); border:1px solid color-mix(in oklab, var(--lime) 40%, var(--line-strong)); }
.bd-taught-badge svg { color:var(--lime); }
.bd-applied-chip { display:inline-flex; align-items:center; gap:6px; margin:8px 0; padding:5px 10px; border-radius:var(--radius-sm); font-size:12px; color:var(--text-muted); background:var(--panel-raised); width:fit-content; }
.bd-applied-chip svg { color:var(--lime); flex:0 0 auto; }
.bd-funnel { display:flex; flex-wrap:wrap; align-items:stretch; gap:6px; padding:var(--space-5); }
.bd-funnel-step { display:flex; flex-direction:column; gap:2px; flex:1; min-width:96px; padding:10px 12px; border-radius:var(--radius-sm); background:var(--panel-raised); }
.bd-funnel-lab { font-size:12px; color:var(--text-muted); }
.bd-funnel-big { font-family:var(--font-num); font-variant-numeric:tabular-nums; font-size:22px; font-weight:700; color:var(--text); line-height:1.1; }
.bd-funnel-sub { font-size:11.5px; color:var(--text-muted); }
.bd-funnel-arrow { display:flex; align-items:center; color:var(--text-faint); flex:0 0 auto; }
.bd-funnel-note { margin:10px 0 0; font-size:12.5px; color:var(--text-muted); }
.bd-teach-row { display:flex; gap:10px; margin-top:10px; }
.bd-teach-input { flex:1; background:var(--bg); color:var(--text); border:1px solid var(--line-strong); border-radius:var(--radius-sm); padding:10px 12px; font:inherit; font-size:13px; }
.bd-teach-input:focus { outline:none; border-color:var(--lime); }
@keyframes bd-decide-pulse { 0%{box-shadow:inset 0 0 0 1px var(--decide-c,transparent),0 0 0 0 var(--decide-c,transparent)} 40%{box-shadow:inset 0 0 0 1px var(--decide-c,transparent),0 0 28px 0 var(--decide-c,transparent)} 100%{box-shadow:none} }
@keyframes bd-done-enter { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }
.bd-apr--deciding { animation:bd-decide-pulse .55s var(--ease-out); }
.bd-apr--done .bd-apr-donerow { display:flex; align-items:center; gap:14px; font-size:14px; padding:var(--space-5) var(--space-6); }
.bd-apr-done-content { animation:bd-done-enter .35s var(--ease-out) .1s both; display:flex; flex-direction:column; gap:2px; }
.bd-apr-done-verdict { display:flex; align-items:center; gap:8px; font-weight:600; }
.bd-apr-done-sub { font-size:12px; color:var(--text-muted); line-height:1.4; }
.bd-apr-diff { font-size:12px; color:var(--text-muted); margin-top:8px; line-height:1.5; }
.bd-apr-diff del { color:var(--text-faint); text-decoration:line-through; }
.bd-apr-diff ins { color:var(--lime); text-decoration:none; }
/* Approvals: 2-column card — who it's for (left) + the draft & actions (right) */
.bd-apr-grid { display:grid; grid-template-columns:280px 1fr; gap:var(--space-5); padding:var(--space-5) var(--space-6); align-items:start; }
.bd-apr-meta { display:flex; flex-direction:column; gap:7px; padding-right:var(--space-5); border-right:1px solid var(--line); }
.bd-apr-title2 { font-size:13px; color:var(--text-muted); }
.bd-apr-chiprow { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:6px; }
.bd-tag--ghost { background:transparent; border:1px solid var(--line-strong); color:var(--text-muted); }
.bd-apr-links { display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.bd-apr-link { display:inline-flex; align-items:center; gap:7px; font-size:13px; color:var(--orange-light); text-decoration:none; word-break:break-word; }
.bd-apr-link:hover { text-decoration:underline; }
.bd-apr-main { display:flex; flex-direction:column; gap:var(--space-4); min-width:0; }
.bd-apr-verdict { display:inline-flex; align-items:center; gap:8px; font-weight:600; font-size:14px; }
.bd-apr-verdict.is-approved { color:var(--lime); }
.bd-apr-verdict.is-rejected { color:var(--error); }
.bd-apr-verdict.is-expired { color:var(--text-muted); }
.bd-apr-readbody { background:var(--bg); border:1px solid var(--line); border-radius:var(--radius-sm); padding:14px; font-size:14px; line-height:1.6; color:var(--text-muted); white-space:pre-wrap; }
.bd-apr-feedback { font-size:13px; color:var(--text); background:var(--panel-raised); border:1px solid var(--line); border-radius:var(--radius-sm); padding:10px 12px; }
.bd-apr-feedback-lab { display:block; font-size:12px; font-weight:600; color:var(--text-muted); margin-bottom:5px; }
.bd-tab-n { display:inline-block; min-width:18px; padding:0 5px; border-radius:999px; background:rgba(148,163,184,0.18); font-size:11px; font-weight:700; text-align:center; }
.bd-tab.is-active .bd-tab-n { background:var(--orange); color:#1a0e00; }
@media (max-width:900px) { .bd-apr-grid { grid-template-columns:1fr; } .bd-apr-meta { border-right:none; border-bottom:1px solid var(--line); padding-right:0; padding-bottom:var(--space-4); } }
.bd-empty { display:flex; align-items:center; gap:var(--space-5); padding:var(--space-5); }
.bd-empty img { height:76px; object-fit:contain; filter:drop-shadow(0 8px 16px rgba(0,0,0,.35)); }
.bd-empty-h { font-size:16px; font-weight:700; }
.bd-empty-s { font-size:13px; color:var(--text-muted); margin-top:3px; }

/* ── Messages / Activity list ── */
.bd-msglist { display:flex; flex-direction:column; }
.bd-msgrow { display:flex; align-items:center; gap:var(--space-4); padding:15px var(--space-5); border-bottom:1px solid var(--line); }
.bd-msgrow:last-child { border-bottom:0; }
.bd-msg-ico { color:var(--text-faint); display:inline-flex; flex:0 0 auto; }
.bd-msg-main { flex:1; min-width:0; }
.bd-msg-subj { font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bd-msg-who { font-size:12px; color:var(--text-muted); margin-top:2px; }
.bd-msg-score { font-family:var(--font-mono); font-size:12px; flex:0 0 auto; }
.bd-msg-status { font-size:11px; font-weight:600; text-transform:capitalize; }
.bd-actrow { display:flex; align-items:center; gap:var(--space-3); padding:13px var(--space-5); border-bottom:1px solid var(--line); }
.bd-actrow:last-child { border-bottom:0; }
.bd-act-q { width:30px; height:30px; border-radius:50%; background:var(--panel-raised); color:var(--text-faint); display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; font-size:14px; }
.bd-act-title { font-size:14px; }
.bd-act-meta { font-size:12px; color:var(--text-muted); margin-top:2px; font-family:var(--font-mono); }

/* ── Pipeline ── */
.bd-search { display:inline-flex; align-items:center; gap:8px; background:var(--panel); border:1px solid var(--line-strong); border-radius:var(--radius); padding:8px 13px; color:var(--text-faint); }
.bd-search input { background:none; border:0; color:var(--text); font:inherit; font-size:13px; outline:none; width:180px; }
.bd-pipe-grid { display:grid; grid-template-columns:340px 1fr; gap:var(--space-4); align-items:start; }
.bd-leadlist { display:flex; flex-direction:column; max-height:560px; overflow-y:auto; }
.bd-leadrow { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:13px var(--space-4); border:0; border-bottom:1px solid var(--line);
  background:none; border-left:2px solid transparent; cursor:pointer; text-align:left; font:inherit; color:var(--text); width:100%; }
.bd-leadrow:last-child { border-bottom:0; }
.bd-leadrow:hover { background:var(--panel-raised); }
.bd-leadrow.is-active { background:var(--panel-raised); border-left-color:var(--orange); }
.bd-lead-name { font-size:13px; font-weight:600; }
.bd-lead-contact { font-size:12px; color:var(--text-muted); margin-top:2px; }
.bd-lead-date { font-size:11px; color:var(--text-muted); margin-top:3px; font-family:var(--font-mono); }
.bd-lead-meta { text-align:right; flex:0 0 auto; }
.bd-lead-stage { font-size:11px; color:var(--lime); display:block; text-transform:capitalize; }
.bd-lead-score { font-family:var(--font-mono); font-weight:600; font-size:13px; }
.bd-leaddetail-head { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--space-4); margin-bottom:var(--space-5); }
.bd-leaddetail-name { font-size:22px; font-weight:700; margin:0; }
.bd-leaddetail-sub { font-size:13px; color:var(--text-muted); margin-top:4px; }
.bd-leaddetail-grid { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-4); margin-bottom:var(--space-5); }
.bd-dl-lab { font-size:12px; font-weight:600; color:var(--text-muted); margin-bottom:5px; }
.bd-dl-val { font-size:14px; color:var(--text); }
.bd-pipe-replied { display:flex; align-items:flex-start; gap:10px; padding:var(--space-4) var(--space-5); background:rgba(200,255,0,0.06); border:1px solid rgba(200,255,0,.28); border-radius:var(--radius); margin-bottom:var(--space-4); }
.bd-pipe-replied b { color:var(--lime); }
.bd-pipe-msg { background:var(--bg); border:1px solid var(--line); border-radius:var(--radius); padding:12px; margin-top:8px; }
.bd-pipe-msg.is-reply { border-color:rgba(200,255,0,.28); }
.bd-pipe-msg-head { display:flex; align-items:center; justify-content:space-between; font-size:12px; color:var(--text-muted); margin-bottom:6px; }
.bd-pipe-msg-body { font-size:13px; line-height:1.5; white-space:pre-wrap; }
.bd-pipe-msg-av { display:flex; gap:10px; align-items:flex-start; }
.bd-book-toggle { margin-bottom:var(--space-4); }
.bd-book-form { display:flex; flex-direction:column; gap:var(--space-4); margin-bottom:var(--space-5); padding:var(--space-4); background:var(--bg); border:1px solid var(--line); border-radius:var(--radius); }
.bd-book-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:var(--space-3); }
.bd-book-notes { min-height:88px; resize:vertical; }
.bd-book-invite { display:flex; align-items:center; gap:8px; color:var(--text-muted); font-size:13px; }
.bd-book-actions { display:flex; gap:var(--space-2); }

/* ── Crew ── */
.bd-crew-grid { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-4); }
.bd-crewcard-in { display:flex; gap:var(--space-4); align-items:center; padding:var(--space-5); }
/* Crew identity lives in the name text + this avatar ring (stripe decoration
   is banned by DESIGN.md — the old per-card top stripe is gone). */
.bd-crewcard-img { width:96px; height:96px; object-fit:contain; flex:0 0 auto; padding:8px; border-radius:var(--radius-lg);
  background:radial-gradient(circle at 50% 26%,rgba(255,255,255,.10),rgba(0,0,0,.28));
  box-shadow:inset 0 0 0 1.5px var(--c,var(--line-strong)),0 0 16px -6px var(--c,transparent); }
.bd-crewcard-body { flex:1; min-width:0; }
.bd-crewcard-name { font-size:17px; font-weight:700; display:flex; align-items:center; gap:8px; }
.bd-crewcard-role { font-size:13px; color:var(--text-muted); margin:6px 0 14px; line-height:1.45; }
.bd-crewcard-stats { display:flex; gap:10px; }
.bd-crewstat { background:var(--panel-raised); border:1px solid var(--line); border-radius:var(--radius); padding:9px 12px; flex:1; }
.bd-crewstat-val { font-size:18px; font-weight:700; font-variant-numeric:tabular-nums; }
.bd-crewstat-lab { font-size:11px; color:var(--text-muted); margin-top:2px; }

/* ── Calendar ── */
.bd-screen--full { max-width:none; }
.bd-cal-card { padding:var(--space-6); }
.bd-cal-month { font-size:18px; font-weight:700; min-width:150px; text-align:center; }
#cal-today { margin-left:6px; }
.bd-cal-dow { display:grid; grid-template-columns:repeat(7,1fr); gap:var(--space-2); margin-bottom:var(--space-2); }
.bd-cal-dow span { font-size:11px; color:var(--text-muted); font-weight:600; letter-spacing:0.08em; padding-left:4px; }
.bd-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:var(--space-2); }
.bd-cal-cell { min-height:116px; border:1px solid var(--line); border-radius:var(--radius); padding:8px; background:var(--bg); display:flex; flex-direction:column; }
.bd-cal-cell.is-empty { background:none; border:0; }
.bd-cal-cell.is-today { border-color:var(--lime); }
.bd-cal-num { font-size:13px; color:var(--text-muted); }
.bd-cal-cell.is-today .bd-cal-num { color:var(--lime); font-weight:700; }
.bd-cal-event { display:flex; align-items:center; gap:6px; font-size:11px; color:var(--text); margin-top:8px; background:var(--captain-soft); border-radius:var(--radius-sm); padding:4px 6px; }
.bd-cal-event--meeting { color:var(--lime); background:var(--lime-soft); border:1px solid rgba(200,255,0,0.28); }

/* ── Memory ── */
.bd-mem-head { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.bd-mem-type { font-weight:700; font-size:13px; }
.bd-mem-meta { font-size:12px; color:var(--text-muted); font-family:var(--font-mono); }
.bd-mem-body { margin:0; font-size:13px; color:var(--text-muted); line-height:1.6; }
.bd-mem-summary { display:flex; align-items:center; gap:var(--space-5); padding:var(--space-5) var(--space-6); }
.bd-mem-summary-av { width:54px; height:54px; border-radius:14px; }
.bd-mem-summary-body { flex:1; min-width:0; }
.bd-mem-summary-h { font-size:18px; font-weight:700; }
.bd-mem-summary-s { font-size:13px; color:var(--text-muted); margin:5px 0 0; line-height:1.5; max-width:540px; }
.bd-mem-summary-stats { display:flex; gap:var(--space-6); flex:0 0 auto; }
.bd-mem-stat { text-align:center; }
.bd-mem-stat-val { font-size:26px; font-weight:800; font-variant-numeric:tabular-nums; line-height:1; }
.bd-mem-stat-lab { font-size:11px; font-weight:600; color:var(--text-muted); margin-top:4px; }
.bd-mem-grid { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-4); align-items:start; }
.bd-mem-col { padding:var(--space-5) var(--space-6); }
.bd-mem-col-head { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:700; margin-bottom:var(--space-3); }
.bd-mem-item { display:flex; gap:12px; padding:14px 0; border-bottom:1px solid var(--line); }
.bd-mem-item:last-child { border-bottom:0; }
.bd-mem-item-body { min-width:0; }
.bd-mem-note { margin:0; font-size:13.5px; color:var(--text); line-height:1.5; }
.bd-mem-item-meta { font-size:11px; color:var(--text-muted); margin-top:6px; font-family:var(--font-mono); }
.bd-mem-empty { font-size:13px; color:var(--text-muted); margin:8px 0 0; line-height:1.5; }
.bd-rule-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:var(--space-4); }
.bd-rule-card { padding:var(--space-5); display:flex; flex-direction:column; gap:10px; }
.bd-rule-card.is-retired { opacity:0.6; }
.bd-rule-top { display:flex; align-items:center; gap:8px; }
.bd-rule-reinforced { display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:600; color:var(--lime); }
.bd-rule-retire { margin-left:auto; }
.bd-rule-text { margin:0; font-size:14px; color:var(--text); line-height:1.5; }
.bd-rule-meta { font-size:11.5px; color:var(--text-muted); font-family:var(--font-mono); }
.bd-rule-retired { margin-top:var(--space-4); }
.bd-rule-retired summary { cursor:pointer; font-size:13px; color:var(--text-muted); font-weight:600; }
.bd-rule-retired .bd-rule-grid { margin-top:var(--space-4); }
.bd-contradiction-banner { padding:var(--space-5); border:1px solid color-mix(in oklab, var(--orange) 45%, var(--line-strong)); margin-bottom:var(--space-4); }
.bd-contradiction-head { display:flex; align-items:center; gap:8px; font-weight:700; font-size:14px; color:var(--orange); margin-bottom:6px; }
.bd-sharp-card { padding:var(--space-5) var(--space-6); }
.bd-sharp-headline { margin:0 0 var(--space-4); font-size:15px; color:var(--text); line-height:1.5; }
.bd-sharp-headline b { color:var(--text-muted); }
.bd-sharp-headline.is-good b { color:var(--lime); }
.bd-sharp-stats { display:flex; gap:var(--space-6); }

/* ── Import ── */
.bd-steps { display:flex; align-items:center; gap:var(--space-5); }
.bd-step { display:inline-flex; align-items:center; gap:8px; font-size:13px; color:var(--text-muted); font-weight:600; }
.bd-step.is-active { color:var(--lime); }
.bd-step-n { width:22px; height:22px; border-radius:50%; border:1px solid currentColor; display:inline-flex; align-items:center; justify-content:center; font-size:12px; }
.bd-import-sources { display:grid; grid-template-columns:repeat(3,1fr); gap:var(--space-3); }
.bd-source { padding:var(--space-4); cursor:pointer; }
.bd-source.is-on { border-color:rgba(200,255,0,.4); }
.bd-source-name { font-size:14px; font-weight:600; margin-bottom:5px; }
.bd-source-desc { font-size:12px; color:var(--text-muted); line-height:1.45; }
.bd-dropzone { border-style:dashed !important; display:flex; flex-direction:column; align-items:center; text-align:center; gap:10px; padding:var(--space-8); }
.bd-drop-h { font-size:16px; font-weight:700; }
.bd-drop-s { font-size:12px; color:var(--text-muted); }
.bd-preview-row { display:flex; gap:var(--space-4); font-size:12px; font-family:var(--font-mono); color:var(--text-muted); padding:6px 0; border-bottom:1px solid var(--line); }
.bd-preview-row span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bd-source { text-align:left; font:inherit; color:var(--text); width:100%; }
.bd-source-name { display:flex; align-items:center; gap:6px; }
.bd-step-sep { flex:1; height:1px; background:var(--line); min-width:24px; max-width:64px; }
.bd-step.is-done { color:var(--text-muted); }
.bd-step.is-done .bd-step-n { color:var(--lime); border-color:var(--lime); }
.bd-step.is-active .bd-step-n { background:var(--lime-soft); }
.bd-dropzone.is-drag { border-color:var(--lime) !important; background:var(--lime-soft); }
.bd-imp-grid { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-4); align-items:start; }
.bd-map { display:flex; flex-direction:column; gap:var(--space-3); }
.bd-map-row { display:grid; grid-template-columns:128px 1fr; align-items:center; gap:var(--space-4); }
.bd-imp-preview { display:flex; flex-direction:column; }
.bd-imp-done { padding:var(--space-10) var(--space-8); text-align:center; display:flex; flex-direction:column; align-items:center; }
.bd-imp-done-ico { color:var(--lime); }
.bd-imp-done-h { font-size:20px; font-weight:800; margin-top:12px; }
.bd-imp-stats { display:flex; gap:var(--space-10); margin-top:var(--space-6); }
.bd-imp-stat-val { font-size:34px; font-weight:800; font-variant-numeric:tabular-nums; line-height:1; }
.bd-imp-stat-lab { font-size:11px; font-weight:600; color:var(--text-muted); margin-top:5px; }
.bd-imp-errs { margin-top:var(--space-6); width:100%; max-width:540px; display:flex; flex-direction:column; gap:6px; }
.bd-imp-err { font-size:12px; color:var(--orange-light); display:flex; align-items:center; gap:8px; background:var(--warning-soft); border-radius:var(--radius-sm); padding:7px 11px; text-align:left; }

/* ── Settings ── */
.bd-set-h { font-size:18px; font-weight:700; margin:0 0 var(--space-4); }
.bd-set-cats { display:grid; grid-template-columns:repeat(2,1fr); gap:var(--space-4); align-items:start; }
.bd-cat-head { display:flex; gap:12px; align-items:flex-start; margin-bottom:var(--space-5); }
.bd-cat-ico { width:36px; height:36px; border-radius:var(--radius); background:var(--orange-soft); color:var(--orange); display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; }
.bd-cat-label { font-size:16px; font-weight:700; margin:0; }
.bd-cat-sub { font-size:13px; color:var(--text-muted); margin:4px 0 0; line-height:1.45; }
.bd-cred-note--wide { margin:0 0 var(--space-2); }
.bd-conn-list { display:flex; flex-direction:column; gap:10px; }
.bd-conn-row { display:flex; align-items:center; gap:12px; padding:12px 14px; background:var(--panel-raised); border:1px solid var(--line); border-radius:var(--radius-sm); }
.bd-conn-row.is-soon { opacity:0.72; }
.bd-conn-rowbody { flex:1; min-width:0; }
.bd-conn-name { font-size:14px; font-weight:600; }
.bd-conn-badge { font-size:11px; font-weight:700; padding:3px 9px; border-radius:999px; display:inline-flex; align-items:center; gap:4px; white-space:nowrap; }
.bd-conn-badge.is-on { background:rgba(200,255,0,0.14); color:var(--lime); }
.bd-conn-badge.is-off { background:rgba(148,163,184,0.16); color:var(--text-muted); }
.bd-conn-badge.is-soon { background:rgba(148,163,184,0.12); color:var(--text-muted); }
.bd-conn-badge.is-managed { background:var(--orange-soft); color:var(--orange-light); }
.bd-cat-ico--sm { width:30px; height:30px; flex:0 0 auto; }
.bd-keyrow { display:flex; gap:8px; }
.bd-lights { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.bd-light { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; padding:5px 11px; border-radius:999px; }
.bd-light.is-on { background:rgba(200,255,0,0.14); color:var(--lime); }
.bd-light.is-off { background:rgba(148,163,184,0.12); color:var(--text-muted); }
/* Messages — conversation threads */
.bd-threads { display:flex; flex-direction:column; gap:var(--space-4); }
.bd-thread-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:var(--space-4) var(--space-5); border-bottom:1px solid var(--line); }
.bd-thread-who { font-weight:600; font-size:15px; }
.bd-thread-co { color:var(--text-muted); font-weight:400; font-size:13px; }
.bd-thread-reply { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:700; color:var(--lime); background:rgba(200,255,0,0.14); padding:4px 10px; border-radius:999px; white-space:nowrap; }
.bd-thread-msgs { display:flex; flex-direction:column; gap:10px; padding:var(--space-4) var(--space-5); }
.bd-bub { max-width:78%; padding:11px 14px; border-radius:var(--radius-md); font-size:14px; line-height:1.5; }
.bd-bub.has-av { display:flex; gap:10px; align-items:flex-start; padding:11px 14px; }
.bd-bub-meta { font-size:11px; font-weight:600; margin-bottom:4px; opacity:0.85; }
.bd-bub.is-out { align-self:flex-end; background:var(--panel-raised); border:1px solid var(--line); color:var(--text-muted); }
.bd-bub.is-in { align-self:flex-start; background:rgba(200,255,0,0.10); border:1px solid rgba(200,255,0,0.30); color:var(--text); }
.bd-bub-body { white-space:pre-wrap; word-break:break-word; }
.bd-set-row { display:flex; gap:var(--space-4); align-items:flex-end; flex-wrap:wrap; }
.bd-set-section { padding:var(--space-6); }
.bd-bill-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:var(--space-3); }
.bd-bill { background:var(--bg); border:1px solid var(--line); border-radius:var(--radius-md); padding:var(--space-4); }
.bd-bill-val { font-size:18px; font-weight:700; margin-top:6px; }
.bd-icp { display:flex; flex-direction:column; gap:var(--space-4); }
.bd-cred-grid { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-4); }
.bd-cred { display:flex; flex-direction:column; gap:6px; }
.bd-cred-status { font-size:11px; font-weight:600; display:inline-flex; align-items:center; gap:5px; }
.bd-cred-status.is-set { color:var(--lime); }
.bd-cred-status.is-unset { color:var(--text-muted); }
.bd-cred-note { font-size:12px; color:var(--text-muted); line-height:1.5; display:flex; gap:8px; background:var(--panel-raised); border:1px solid var(--line); border-radius:var(--radius); padding:11px 13px; }

/* ── Director Chat ── */
.bd-dir-screen { height:calc(100vh - 124px); display:flex; flex-direction:column; gap:var(--space-4); max-width:none; }
.bd-dir-head { display:flex; align-items:center; gap:var(--space-4); flex:0 0 auto; }
.bd-d-av { width:42px; height:42px; border-radius:11px; overflow:hidden; flex:0 0 auto; padding:2px;
  background:radial-gradient(circle at 50% 26%,rgba(255,255,255,.12),rgba(0,0,0,.32)); box-shadow:inset 0 0 0 1.5px var(--c),0 0 14px -4px var(--c); }
.bd-d-av img { width:100%; height:100%; object-fit:contain; display:block; }
.bd-d-av--user { border-radius:11px; display:inline-flex; align-items:center; justify-content:center; color:var(--orange); box-shadow:inset 0 0 0 1.5px var(--line-orange); background:var(--orange-soft); }
.bd-dir { flex:1; min-height:0; display:flex; flex-direction:column; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow-card); overflow:hidden; }
.bd-dir-thread { flex:1; min-height:0; overflow-y:auto; padding:var(--space-6); display:flex; flex-direction:column; gap:var(--space-5); }
.bd-d-msg { display:flex; gap:12px; max-width:720px; }
.bd-d-msg.is-user { margin-left:auto; flex-direction:row-reverse; }
.bd-d-bubble { background:var(--panel-raised); border:1px solid var(--line); border-radius:4px 16px 16px 16px; padding:14px 16px; min-width:0; }
.bd-d-msg.is-user .bd-d-bubble { background:var(--orange-soft); border-color:var(--line-orange); border-radius:16px 4px 16px 16px; }
.bd-d-name { font-size:12px; font-weight:700; margin-bottom:5px; }
.bd-d-bubble p { margin:0; font-size:14.5px; line-height:1.55; color:var(--text); white-space:pre-wrap; }
.bd-dir-compose { flex:0 0 auto; border-top:1px solid var(--line); padding:var(--space-4) var(--space-5); background:rgba(13,20,32,0.6); }
.bd-dir-chips { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.bd-dir-chip { font-size:12px; font-weight:600; color:var(--text-muted); background:var(--panel-raised); border:1px solid var(--line); border-radius:var(--radius-pill); padding:6px 13px; cursor:pointer; transition:border-color var(--t-fast),color var(--t-fast); }
.bd-dir-chip:hover { border-color:var(--orange); color:var(--text); }
.bd-dir-inputrow { display:flex; gap:12px; }
.bd-dir-inputrow input { flex:1; background:var(--bg); border:1px solid var(--line-strong); border-radius:var(--radius); color:var(--text); font:inherit; font-size:14px; padding:13px 16px; outline:none; transition:border-color var(--t-fast),box-shadow var(--t-fast); }
.bd-dir-inputrow input:focus { border-color:var(--orange); box-shadow:0 0 0 3px var(--orange-soft); }
.bd-pulse { width:7px; height:7px; border-radius:50%; background:var(--lime); display:inline-block; flex:0 0 auto; animation:bd-pulse 1.8s ease-in-out infinite; }
@keyframes bd-pulse { 0%,100% { opacity:1; } 50% { opacity:0.25; } }
.bd-typing span { display:inline-block; width:6px; height:6px; margin:0 1px; border-radius:50%; background:var(--text-muted); animation:bd-typing 1.2s infinite; }
.bd-typing span:nth-child(2) { animation-delay:.2s; } .bd-typing span:nth-child(3) { animation-delay:.4s; }
@keyframes bd-typing { 0%,60%,100% { opacity:.3; } 30% { opacity:1; } }

/* ── Toast ── */
.bd-toast { position:fixed; bottom:var(--space-5); right:var(--space-5); background:var(--panel-raised); border:1px solid var(--orange); border-radius:var(--radius-md);
  padding:12px 16px; box-shadow:var(--shadow-pop); max-width:340px; font-size:14px; display:flex; align-items:center; gap:10px;
  opacity:0; transform:translateY(8px); pointer-events:none; transition:opacity var(--t-base),transform var(--t-base); z-index:50; }
.bd-toast.is-on { opacity:1; transform:translateY(0); }
.bd-toast.is-err { border-color:var(--error); }

/* ── Login ── */
.bd-login-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:var(--space-6); }
.bd-login-admin { position:fixed; top:18px; right:18px; z-index:5; min-height:34px; display:inline-flex; align-items:center; justify-content:center; padding:0 12px; border:1px solid var(--line); border-radius:var(--radius); background:var(--panel); color:var(--text-muted); text-decoration:none; font-size:12px; font-weight:800; box-shadow:var(--shadow-card); }
.bd-login-admin:hover { color:var(--text); border-color:var(--orange); }
.bd-login { width:100%; max-width:420px; text-align:center; }
.bd-login-logo { width:168px; height:168px; object-fit:contain; margin:0 auto var(--space-5); display:block; border-radius:var(--radius-lg); background:#000; box-shadow:0 14px 34px -14px rgba(255,106,0,.55); }
.bd-login h1 { font-size:24px; font-weight:800; }
.bd-login h1 span { color:var(--orange); }
.bd-login-sub { color:var(--text-muted); font-size:14px; margin:8px 0 var(--space-6); }
.bd-login-card { text-align:left; padding:var(--space-6); display:flex; flex-direction:column; gap:var(--space-4); }
.bd-login-msg { color:var(--error); font-size:13px; min-height:1em; }

/* ── Skeleton / loading ── */
.bd-skel { height:14px; border-radius:6px; background:linear-gradient(90deg,var(--panel),var(--panel-raised),var(--panel)); background-size:200% 100%; animation:bd-sh 1.2s infinite; }
@keyframes bd-sh { to { background-position:-200% 0; } }
.bd-loading { padding:var(--space-8); text-align:center; color:var(--text-muted); }
.bd-skel-row { display:grid; gap:var(--space-4); }
.bd-skel-row.is-4 { grid-template-columns:repeat(4,1fr); }
.bd-skel-card { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-md); padding:var(--space-5); }

/* ── Error screen ── */
.bd-errscreen { display:flex; flex-direction:column; align-items:center; text-align:center; padding:var(--space-10) var(--space-6); gap:var(--space-3); }
.bd-errscreen img { height:64px; object-fit:contain; filter:grayscale(1) opacity(0.5); }
.bd-errscreen-h { font-size:16px; font-weight:700; }
.bd-errscreen-s { font-size:13px; color:var(--text-muted); max-width:380px; line-height:1.5; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:0.001ms !important; transition-duration:0.001ms !important; } }
@media (max-width:1100px) {
  .bd-metric-row { grid-template-columns:repeat(2,1fr); }
  .bd-dash-grid,.bd-crew-grid,.bd-import-sources,.bd-bill-grid,.bd-pipe-grid,.bd-cred-grid,.bd-leaddetail-grid,.bd-dash-tworow,.bd-mem-grid,.bd-imp-grid,.bd-set-cats { grid-template-columns:1fr; }
}
@media (max-width:768px) {
  .bd-hamburger { display:inline-flex; align-items:center; }
  .bd-sidebar { position:fixed; top:0; left:0; z-index:30; width:248px; height:100vh; flex:0 0 auto; transform:translateX(-100%); transition:transform .28s var(--ease-out); }
  .bd-sidebar.is-open { transform:translateX(0); }
  .bd-backdrop.is-on { display:block; }
  .bd-content { padding:var(--space-5); }
  .bd-topbar { padding:0 var(--space-5); }
  .bd-screenhead { flex-direction:column; gap:var(--space-3); }
  .bd-dash-greet { flex-wrap:wrap; }
  .bd-pipe-grid { grid-template-columns:1fr; }
  .bd-leadlist { max-height:320px; }
  .bd-apr-grid { grid-template-columns:1fr; }
  .bd-apr-meta { border-right:none; border-bottom:1px solid var(--line); padding-right:0; padding-bottom:var(--space-4); }
}
@media (max-width:640px) {
  .bd-login-wrap { padding-top:64px; }
  .bd-login-admin { top:12px; right:12px; min-height:44px; }
  .bd-metric-row { grid-template-columns:1fr; }
  .bd-iconbtn { min-height:44px; }
  .bd-screenhead-title { font-size:24px; }
  .bd-dash-h { font-size:24px; }
  .bd-kpiband-big { font-size:28px; }
  .bd-kpiband { padding:var(--space-4); }
  .bd-crewcard-in { flex-direction:column; text-align:center; }
  .bd-crewcard-img { width:64px; height:64px; }
}

/* ── CRM ── */
.bd-crm-stack { display:flex; flex-direction:column; gap:var(--space-8); width:100%; min-width:0; }
.bd-crm-section-title { font-size:var(--text-lg); font-weight:700; margin:0 0 var(--space-3); }
.bd-crm-cardlist { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:var(--space-3); min-width:0; }
.bd-crm-reply { padding:var(--space-4); }
.bd-crm-reply p { margin:var(--space-3) 0 0; color:var(--text-muted); font-size:var(--text-sm); line-height:var(--leading-normal); }
.bd-crm-rowhead { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--space-3); font-size:var(--text-xs); color:var(--text-muted); }
.bd-crm-rowhead > div { display:flex; flex-direction:column; min-width:0; }
.bd-crm-rowhead b { color:var(--text); font-size:var(--text-sm); }
.bd-crm-list { display:flex; flex-direction:column; min-width:0; }
.bd-crm-listrow { display:flex; align-items:center; gap:var(--space-3); padding:var(--space-4) var(--space-5); border-bottom:1px solid var(--line); }
.bd-crm-listrow:last-child { border-bottom:0; }
.bd-crm-listrow > div { display:flex; flex-direction:column; flex:1; min-width:0; }
.bd-crm-listrow > div span,.bd-crm-age { color:var(--text-muted); font-size:var(--text-xs); }
.bd-crm-table-wrap { width:100%; max-width:100%; min-width:0; overflow-x:auto; overscroll-behavior-inline:contain; }
.bd-crm-table { width:100%; min-width:760px; border-collapse:collapse; font-size:var(--text-sm); }
.bd-crm-table th { color:var(--text-muted); font-size:var(--text-xs); font-weight:600; text-align:left; padding:var(--space-3) var(--space-4); border-bottom:1px solid var(--line-strong); white-space:nowrap; }
.bd-crm-table td { padding:var(--space-3) var(--space-4); border-bottom:1px solid var(--line); vertical-align:middle; }
.bd-crm-table tbody tr:last-child td { border-bottom:0; }
.bd-crm-table tbody tr[role="button"] { cursor:pointer; transition:background var(--t-fast); }
.bd-crm-table tbody tr[role="button"]:hover { background:var(--panel-raised); }
.bd-crm-stagechips,.bd-crm-flags,.bd-crm-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-1); }
.bd-crm-stagechips .bd-tag { padding:2px 7px; font-size:var(--text-xs); }
.bd-crm-cell-sub { display:block; color:var(--text-muted); font-size:var(--text-xs); margin-top:2px; }
.bd-crm-company-head { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--space-4); width:100%; min-width:0; }
.bd-crm-company-head > div:first-child,.bd-crm-data-head > div:first-child { min-width:0; }
.bd-crm-company-head p,.bd-crm-data-head p { margin:var(--space-1) 0 0; color:var(--text-muted); font-size:var(--text-sm); }
.bd-crm-company-title { display:flex; align-items:center; flex-wrap:wrap; gap:var(--space-2); min-width:0; max-width:100%; }
.bd-crm-company-title h2 { font-size:var(--text-2xl); overflow-wrap:anywhere; }
.bd-crm-head-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:var(--space-2); }
.bd-crm-detail-grid { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr); gap:var(--space-4); align-items:start; width:100%; min-width:0; }
.bd-crm-detail-grid > div { display:flex; flex-direction:column; gap:var(--space-4); min-width:0; max-width:100%; }
.bd-crm-panel { padding:var(--space-5); min-width:0; max-width:100%; overflow-wrap:anywhere; }
.bd-crm-panel-head { display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); margin-bottom:var(--space-4); }
.bd-crm-panel-head h2,.bd-crm-panel-head h3 { font-size:var(--text-lg); }
.bd-crm-summary-text { margin:0; color:var(--text); font-size:14px; line-height:var(--leading-normal); white-space:pre-wrap; }
.bd-crm-summary-meta,.bd-crm-footnote { margin-top:var(--space-3); color:var(--text-muted); font-size:var(--text-xs); }
.bd-crm-spin { display:inline-flex; animation:bd-spin 1s linear infinite; }
.bd-crm-actions { margin-top:var(--space-3); }
.bd-crm-fallback { margin:0; padding-left:var(--space-5); color:var(--text-muted); font-size:var(--text-sm); line-height:var(--leading-normal); }
.bd-crm-fallback li + li { margin-top:var(--space-2); }
.bd-crm-fallback a { color:var(--orange-light); }
.bd-crm-inline-error { margin-top:var(--space-3); padding:var(--space-3); color:var(--error); background:var(--error-soft); border:1px solid var(--error); border-radius:var(--radius); font-size:var(--text-sm); }
.bd-crm-contacts { display:flex; flex-direction:column; gap:var(--space-3); }
.bd-crm-contact { padding:var(--space-4); background:var(--bg); border:1px solid var(--line); border-radius:var(--radius); min-width:0; }
.bd-crm-contact-main { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--space-3); }
.bd-crm-contact-main > div:first-child { display:flex; flex-direction:column; min-width:0; }
.bd-crm-contact-main span { color:var(--text-muted); font-size:var(--text-xs); word-break:break-word; }
.bd-crm-contact-controls,.bd-crm-contact-actions { display:flex; align-items:center; flex-wrap:wrap; gap:var(--space-2); }
.bd-crm-contact-actions { margin-top:var(--space-3); }
.bd-crm-contact-actions .bd-pipe-replied,.bd-crm-book-form { flex-basis:100%; }
.bd-crm-book-form { min-width:0; max-width:100%; }
.bd-crm-timeline { display:flex; flex-direction:column; }
.bd-crm-event { display:grid; grid-template-columns:30px minmax(0,1fr); gap:var(--space-3); padding:var(--space-4) 0 var(--space-4) var(--space-3); border-bottom:1px solid var(--line); border-left:2px solid transparent; }
.bd-crm-event:last-child { border-bottom:0; }
.bd-crm-event.is-inbound { border-left-color:var(--orange); }
.bd-crm-event-icon { width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; color:var(--text-muted); background:var(--panel-raised); border-radius:var(--radius); }
.bd-crm-event-meta { display:flex; align-items:center; flex-wrap:wrap; gap:var(--space-2); color:var(--text-muted); font-size:var(--text-xs); }
.bd-crm-event-subject { display:block; margin-top:var(--space-2); font-size:var(--text-sm); }
.bd-crm-event p { margin:var(--space-1) 0 0; color:var(--text-muted); font-size:var(--text-sm); line-height:var(--leading-normal); white-space:pre-wrap; word-break:break-word; }
.bd-crm-next { list-style:none; margin:0; padding:0; }
.bd-crm-next li { display:flex; justify-content:space-between; align-items:flex-start; gap:var(--space-3); padding:var(--space-3) 0; border-bottom:1px solid var(--line); font-size:var(--text-sm); }
.bd-crm-next li:last-child { border-bottom:0; }
.bd-crm-form-panel { width:100%; max-width:860px; min-width:0; padding:var(--space-6); }
.bd-crm-form-panel form { min-width:0; max-width:100%; }
.bd-crm-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-4); }
.bd-crm-form-grid > * { min-width:0; }
.bd-crm-form-grid .bd-label { margin:0; }
.bd-crm-notes { min-height:120px; resize:vertical; margin-top:var(--space-1); }
.bd-crm-form-actions { display:flex; gap:var(--space-2); margin-top:var(--space-5); }
.bd-crm-filter-tabs { padding:0; }
.bd-crm-board { display:grid; grid-template-columns:repeat(9,minmax(240px,1fr)); gap:var(--space-4); width:100%; max-width:100%; min-width:0; overflow-x:auto; overscroll-behavior-inline:contain; padding-bottom:var(--space-2); }
.bd-crm-column { min-width:240px; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-md); padding:var(--space-3); }
.bd-crm-column-head { display:flex; align-items:center; justify-content:space-between; gap:var(--space-2); padding:var(--space-1) var(--space-1) var(--space-3); }
.bd-crm-column-head h2 { font-size:var(--text-sm); }
.bd-crm-column-head span { min-width:24px; text-align:center; color:var(--text-muted); background:var(--panel-raised); border-radius:var(--radius-pill); font-size:var(--text-xs); }
.bd-crm-column-cards { display:flex; flex-direction:column; gap:var(--space-2); }
.bd-crm-board-card { display:flex; flex-direction:column; align-items:flex-start; gap:var(--space-1); padding:var(--space-3); min-width:0; }
.bd-crm-board-card > span:not(.bd-lead-score) { color:var(--text-muted); font-size:var(--text-xs); }
.bd-crm-board-card p { margin:var(--space-2) 0; color:var(--text-muted); font-size:var(--text-xs); line-height:var(--leading-snug); }
.bd-crm-board-card .bd-stage-select { margin-top:var(--space-2); width:100%; }
.bd-crm-data-head { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--space-4); width:100%; min-width:0; }
.bd-crm-data-head h2 { font-size:var(--text-xl); }
.bd-crm-data-grid { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr); gap:var(--space-4); align-items:start; width:100%; max-width:100%; min-width:0; }
.bd-crm-data-grid > * { min-width:0; max-width:100%; }
.bd-crm-data-grid .bd-crm-panel .bd-crm-table-wrap { margin:0; width:100%; max-width:100%; }
.bd-crm-table .bd-btn,.bd-crm-data-head .bd-btn { text-decoration:none; }
.bd-crm-cost-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:var(--space-3); align-items:center; padding:var(--space-3) 0; border-bottom:1px solid var(--line); font-size:var(--text-sm); }
.bd-crm-cost-row:last-child { border-bottom:0; }
.bd-crm-cost-row b { font-family:var(--font-num); font-variant-numeric:tabular-nums; font-size:var(--text-xs); }
@media (max-width:900px) {
  .bd-crm-detail-grid,.bd-crm-data-grid { grid-template-columns:minmax(0,1fr); }
  .bd-crm-board { grid-template-columns:repeat(9,260px); }
}
@media (max-width:640px) {
  .bd-crm-cardlist { grid-template-columns:minmax(0,1fr); }
  .bd-crm-company-head,.bd-crm-data-head,.bd-crm-contact-main { flex-direction:column; }
  .bd-crm-head-actions { justify-content:flex-start; }
  .bd-crm-form-grid { grid-template-columns:1fr; }
  .bd-crm-listrow { align-items:flex-start; flex-wrap:wrap; }
  .bd-crm-cost-row { grid-template-columns:1fr; gap:var(--space-1); }
  .bd-crm-form-actions { flex-direction:column; }
}
