/* ─── Functional CRM demo · component styles ──────────────────
   Loaded after crm-shell.css, theme-brand.css, demo.css. */

/* Row actions in tables */
.row-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.ra {
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  white-space: nowrap;
}
.ra:hover { background: var(--surface-2); border-color: var(--muted-2); }
.ra.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ra.primary:hover { filter: brightness(1.05); }
.ra.icon { padding: 5px 8px; color: var(--muted); }
.ra.icon svg { width: 14px; height: 14px; display: block; }
.ra.icon.danger:hover { color: var(--danger); border-color: var(--danger); background: rgba(227,74,107,.06); }
.ra-done { font-size: 11.5px; color: var(--success); font-weight: 600; font-family: var(--font-mono); }

/* Empty state */
.empty { padding: 46px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.empty a { color: var(--accent); font-weight: 600; cursor: pointer; }

/* Horizontal scroll wrapper for list tables (keeps action column reachable) */
.lv-scroll { overflow-x: auto; }
.lv-scroll .tbl { min-width: 720px; }
.lv-scroll::-webkit-scrollbar { height: 8px; }
.lv-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.lv-scroll::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* ─── Modal ───────────────────────────────────────────────── */
.cmodal-scrim {
  position: fixed; inset: 0; background: rgba(31,30,29,.4);
  z-index: 80; display: grid; place-items: center; padding: 28px;
  animation: cmfade .15s ease;
}
@keyframes cmfade { from { opacity: 0; } }
.cmodal {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  width: 560px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 30px 80px -24px rgba(31,30,29,.5);
  animation: cmpop .18s cubic-bezier(.22,.61,.36,1);
}
.cmodal.wide { width: 680px; }
@keyframes cmpop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.cmodal-hd {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--line);
}
.cmodal-hd h2 { margin: 0; font-size: 19px; font-weight: 600; color: var(--ink); letter-spacing: -.015em; }
.cmodal-hd p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); }
.cmodal-x {
  margin-left: auto; width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--muted);
  font-size: 14px;
}
.cmodal-x:hover { background: var(--surface-2); color: var(--ink); }
.cmodal-body { padding: 22px 24px; overflow-y: auto; }
.cmodal-foot {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface);
  border-radius: 0 0 12px 12px;
}
.cmodal-note { font-size: 12px; color: var(--muted); }
.cmodal-foot-right { margin-left: auto; display: flex; gap: 8px; }

.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Range slider */
.form-range { width: 100%; accent-color: var(--accent); margin-top: 8px; }

/* ─── Convert flow ────────────────────────────────────────── */
.conv-flow { display: flex; align-items: stretch; gap: 10px; margin-bottom: 18px; }
.conv-card {
  flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; position: relative;
}
.conv-card.on { border-color: var(--accent-3); background: var(--accent-tint); }
.conv-card.off { opacity: .5; }
.conv-card .conv-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); color: var(--accent); display: grid; place-items: center; margin-bottom: 8px; }
.conv-card.on .conv-ic { background: #fff; }
.conv-card .conv-ic svg { width: 16px; height: 16px; }
.conv-card b { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.conv-card span { font-size: 12px; color: var(--muted); }
.conv-card .conv-tag {
  margin-top: 8px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted-2); align-self: flex-start;
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px;
}
.conv-card .conv-tag.on { color: var(--accent); border-color: var(--accent-3); }
.conv-arrow { align-self: center; color: var(--muted-2); font-size: 18px; }
.conv-arrow.off { opacity: .3; }
.conv-toggle {
  display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2);
  padding: 11px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.conv-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ─── Toast ───────────────────────────────────────────────── */
.ctoast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 120; background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: 9px; font-size: 13.5px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 16px 40px -12px rgba(31,30,29,.55);
  animation: ctin .22s cubic-bezier(.22,.61,.36,1);
}
.ctoast svg { width: 16px; height: 16px; color: var(--success); }
@keyframes ctin { from { transform: translate(-50%, 10px); opacity: 0; } }

/* ─── Home metrics row ────────────────────────────────────── */
.home-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.hm { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.hm .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); }
.hm .v { font-size: 26px; font-weight: 600; color: var(--ink); margin-top: 6px; letter-spacing: -.02em; }
.hm .s { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ─── Stage select (inline in opp table) ──────────────────── */
.stage-select {
  font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; background: var(--surface);
  cursor: pointer;
}
.stage-select:hover { border-color: var(--muted-2); }

/* status pill: converted */
.status-pill.conv { background: rgba(93,169,83,.14); color: #2E7D46; }
.stage-pill.lost .dot { background: var(--danger); }

/* ─── Activities ──────────────────────────────────────────── */
.act-check {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--muted-2);
  display: inline-grid; place-items: center; cursor: pointer; color: #fff; font-size: 12px; font-weight: 700;
  background: var(--surface);
}
.act-check:hover { border-color: var(--accent); }
.act-done .act-check { background: var(--success); border-color: var(--success); }
.act-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); color: var(--accent); display: inline-grid; place-items: center; margin-right: 10px; vertical-align: middle; }
.act-ic svg { width: 15px; height: 15px; }
.act-done .name b { text-decoration: line-through; color: var(--muted); }
.ref-link { font-weight: 600; color: var(--ink-2); display: block; font-size: 12.5px; }
.ref-type { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }

/* ─── Quotes form · line items ────────────────────────────── */
.q-items { margin-top: 18px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.q-items-hd, .q-item { display: grid; grid-template-columns: 1fr 80px 120px 110px 32px; gap: 10px; align-items: center; }
.q-items-hd.q6, .q-item.q6 { grid-template-columns: 1fr 66px 100px 100px 100px 30px; }
.q-items-hd { background: var(--surface-2); padding: 9px 14px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.q-items-hd span:nth-child(2), .q-items-hd span:nth-child(3), .q-items-hd span:nth-child(4) { text-align: right; }
.q-item { padding: 8px 14px; border-bottom: 1px solid var(--line-2); }
.q-item:last-of-type { border-bottom: 0; }
.q-item .form-input { padding: 7px 10px; font-size: 13px; }
.q-item input[type=number] { text-align: right; }
.q-item-sum { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink); text-align: right; }
.q-item-rm { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 15px; }
.q-item-rm:hover:not(:disabled) { color: var(--danger); border-color: var(--danger); }
.q-item-rm:disabled { opacity: .35; cursor: not-allowed; }
.q-item-add { margin: 10px 14px; background: none; border: 1px dashed var(--line); border-radius: 7px; padding: 8px 14px; font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; color: var(--accent); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.q-item-add:hover { background: var(--accent-tint); }
.q-item-add svg { width: 13px; height: 13px; }
.q-totals { margin-top: 14px; margin-left: auto; width: 320px; }
.qt-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 13.5px; color: var(--muted); border-bottom: 1px solid var(--line-2); }
.qt-row span:last-child { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.qt-row.total { border-bottom: 0; border-top: 1.5px solid var(--line); margin-top: 4px; padding-top: 11px; font-size: 16px; color: var(--ink); font-weight: 600; }
.qt-row.total span:last-child { font-size: 17px; }
.qt-disc { width: 110px; padding: 6px 10px; text-align: right; font-size: 13px; }
.q-catalog { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.q-catalog .form-select { max-width: 420px; }
.q-approval { margin-top: 14px; background: rgba(227,74,107,.06); border: 1px solid rgba(227,74,107,.25); border-radius: 9px; padding: 12px 14px; }
.q-approval-hd { font-size: 13px; font-weight: 600; color: var(--danger); margin-bottom: 8px; }
.eval-box { margin-top: 16px; padding: 14px; background: var(--accent-tint); border: 1px solid var(--accent-3); border-radius: 9px; }
.eval-box .eval-res { margin-left: 12px; font-size: 13.5px; color: var(--ink-2); }
.eval-notes { margin: 10px 0 0; padding-left: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.eval-notes li { font-size: 12px; color: var(--muted); }
.q-approval-note { font-size: 12.5px; color: var(--muted); }

/* contact add button in drawer section header + line actions */
.sec-add { float: right; background: var(--accent-tint); color: var(--accent); border: 0; border-radius: 6px; padding: 3px 9px; font-family: var(--font-sans); font-size: 11px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; text-transform: none; letter-spacing: 0; }
.sec-add:hover { filter: brightness(.97); }
.line-actions { display: inline-flex; gap: 4px; align-items: center; }
.line-actions .ra.icon { padding: 4px 6px; }

/* ─── View toggle (list / board) ──────────────────────────── */
.view-toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 3px; }
.vt { font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 14px; border: 0; background: transparent; border-radius: 5px; cursor: pointer; }
.vt.active { background: var(--accent); color: #fff; }

/* ─── Pipeline board ──────────────────────────────────────── */
.opp-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(214px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.opp-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; min-height: 200px; }
.opp-col.over { border-color: var(--accent); background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--accent); }
.opp-col-hd { display: flex; align-items: center; justify-content: space-between; padding: 12px 13px 10px; border-bottom: 1px solid var(--line); }
.opp-col-meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.opp-col-body { padding: 10px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.opp-col-empty { border: 1px dashed var(--line); border-radius: 8px; padding: 18px; text-align: center; font-size: 11.5px; color: var(--muted-2); font-family: var(--font-mono); }
.opp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; cursor: grab; display: flex; flex-direction: column; gap: 5px; transition: box-shadow .12s, border-color .12s; }
.opp-card:hover { border-color: var(--muted-2); box-shadow: 0 4px 14px -8px rgba(31,30,29,.3); }
.opp-card.dragging { opacity: .4; }
.opp-card-top { display: flex; justify-content: space-between; align-items: center; }
.opp-card .oc-id { font-family: var(--font-mono); font-size: 10px; color: var(--muted-2); letter-spacing: .04em; }
.opp-card .oc-amt { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--ink); }
.opp-card b { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; letter-spacing: -.01em; }
.opp-card .oc-acc { font-size: 12px; color: var(--muted); }
.opp-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }
.opp-card .oc-owner { width: 22px; height: 22px; border-radius: 6px; background: var(--ink-2); color: #fff; font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; display: grid; place-items: center; }
.opp-card .oc-prob { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* ─── Calendar (Outlook-style week) ───────────────────────── */
.cal-card { padding: 0; overflow: hidden; }
.cal-toolbar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.cal-nav { display: flex; gap: 4px; }
.cal-nav button { width: 30px; height: 30px; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; cursor: pointer; color: var(--ink-2); font-size: 16px; line-height: 1; }
.cal-nav button:hover { background: var(--surface-2); }
.cal-nav .cal-today { width: auto; padding: 0 13px; font-size: 12px; font-weight: 600; font-family: var(--font-sans); }
.cal-label { font-size: 14.5px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.cal-head { display: grid; grid-template-columns: 56px repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.cal-dayhead { padding: 8px 6px 9px; text-align: center; border-left: 1px solid var(--line-2); }
.cal-dayhead .cdh-dow { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); display: block; }
.cal-dayhead .cdh-num { font-size: 16px; font-weight: 600; color: var(--ink); display: block; margin-top: 3px; }
.cal-dayhead.today .cdh-dow { color: var(--accent); }
.cal-dayhead.today .cdh-num { background: var(--accent); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; margin: 2px auto 0; }
.cal-body { display: grid; grid-template-columns: 56px repeat(7, 1fr); max-height: 560px; overflow-y: auto; }
.cal-hour { position: relative; border-bottom: 1px solid var(--line-2); }
.cal-hour span { position: absolute; top: -7px; right: 8px; font-family: var(--font-mono); font-size: 10px; color: var(--muted-2); background: var(--surface); padding: 0 3px; }
.cal-col { position: relative; border-left: 1px solid var(--line-2); }
.cal-slot { border-bottom: 1px solid var(--line-2); }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 4; }
.cal-now::before { content: ''; position: absolute; left: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.cal-ev { position: absolute; border-radius: 6px; padding: 4px 8px; overflow: hidden; cursor: grab; border-left: 3px solid; box-shadow: 0 1px 4px -1px rgba(31,30,29,.18); z-index: 2; }
.cal-ev:active { cursor: grabbing; }
.cal-ev.dragging { opacity: .4; }
.cal-ev b { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.cal-ev .ce-time { font-family: var(--font-mono); font-size: 9.5px; opacity: .85; }
.cal-ev .ce-ref { display: block; font-size: 10px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.cal-ev.call { background: var(--accent-tint); border-color: var(--accent); color: #234d82; }
.cal-ev.meeting { background: rgba(93,169,83,.15); border-color: var(--success); color: #2e6b34; }
.cal-ev.email { background: var(--surface-2); border-color: var(--muted-2); color: var(--ink-2); }
.cal-ev.task { background: rgba(253,189,26,.18); border-color: var(--warm); color: #7a5a0f; }
.cal-ev.done { opacity: .5; }
.cal-ev.done b { text-decoration: line-through; }

/* ─── Header global search ────────────────────────────────── */
.hdr-search { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; cursor: pointer; color: var(--muted); font-family: var(--font-sans); font-size: 12.5px; min-width: 210px; }
.hdr-search:hover { border-color: var(--muted-2); background: var(--surface); }
.hdr-search svg { width: 15px; height: 15px; flex-shrink: 0; }
.hdr-search span { flex: 1; text-align: left; }
.hdr-search kbd { font-family: var(--font-mono); font-size: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--muted-2); }

.gs-scrim { position: fixed; inset: 0; background: rgba(31,30,29,.4); z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; animation: cmfade .14s ease; }
.gs-panel { width: 620px; max-width: 92vw; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 30px 80px -24px rgba(31,30,29,.5); overflow: hidden; animation: cmpop .16s cubic-bezier(.22,.61,.36,1); }
.gs-input { display: flex; align-items: center; gap: 11px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.gs-input svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.gs-input input { flex: 1; border: 0; outline: 0; background: transparent; font-family: var(--font-sans); font-size: 15.5px; color: var(--ink); }
.gs-input kbd { font-family: var(--font-mono); font-size: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; color: var(--muted-2); }
.gs-results { max-height: 56vh; overflow-y: auto; padding: 6px; }
.gs-hint { padding: 22px 16px; text-align: center; font-size: 13px; color: var(--muted-2); }
.gs-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: center; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.gs-item.sel { background: var(--accent-tint); }
.gs-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); color: var(--accent); display: grid; place-items: center; }
.gs-ic svg { width: 16px; height: 16px; }
.gs-item.sel .gs-ic { background: #fff; }
.gs-text b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.gs-text span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.gs-type { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 3px 8px; }

/* ─── Home dashboard ──────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; margin-bottom: 22px; }
.dash-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; cursor: pointer; transition: border-color .15s; }
.dash-card:hover { border-color: var(--accent-3); }
.dash-hd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.dash-hd h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.dash-link { font-family: var(--font-mono); font-size: 11px; color: var(--accent); font-weight: 600; }
.pipe { display: flex; flex-direction: column; gap: 11px; }
.pipe-row { display: grid; grid-template-columns: 104px 1fr 84px; gap: 12px; align-items: center; }
.pipe-label .stage-pill { font-size: 10.5px; }
.pipe-track { height: 22px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.pipe-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-3), var(--accent)); border-radius: 5px; min-width: 2px; transition: width .3s ease; }
.pipe-val { text-align: right; }
.pipe-val b { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--ink); display: block; }
.pipe-val small { font-family: var(--font-mono); font-size: 10px; color: var(--muted-2); }
.funnel { display: flex; flex-direction: column; gap: 9px; }
.funnel-row { display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: center; }
.funnel-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.funnel-track { height: 26px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.funnel-fill { display: flex; align-items: center; justify-content: flex-end; height: 100%; border-radius: 5px; min-width: 2px; padding-right: 8px; transition: width .3s ease; }
.funnel-fill b { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: #fff; }
.funnel-fill.new { background: var(--accent); }
.funnel-fill.work { background: #6E8BB5; }
.funnel-fill.qual { background: var(--success); }
.funnel-fill.conv { background: var(--ink-2); }
.dash-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); display: flex; gap: 16px; }
.qstat { font-size: 11.5px; color: var(--muted); }
.qstat b { font-family: var(--font-mono); color: var(--ink); font-weight: 600; }

/* ─── Guided tour ─────────────────────────────────────────── */
.tour-btn { margin-left: 12px; background: #D8362F; color: #fff; border: 0; border-radius: 8px; padding: 8px 16px; font-family: var(--font-sans); font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 10px -2px rgba(216,54,47,.5); }
.tour-btn:hover { filter: brightness(1.06); }
.tour-wrap { position: fixed; left: 0; right: 0; bottom: 26px; z-index: 120; display: flex; justify-content: center; pointer-events: none; }
.tour-wrap.dragged { left: 0; right: auto; bottom: auto; display: block; }
.tour-card { pointer-events: auto; width: 460px; max-width: 92vw; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 60px -18px rgba(31,30,29,.45); padding: 20px 22px 16px; position: relative; animation: cmpop .2s cubic-bezier(.22,.61,.36,1); }
.tour-x { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; cursor: pointer; color: var(--muted); }
.tour-x:hover { background: var(--surface-2); color: var(--ink); }
.tour-hd { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; cursor: move; }
.tour-grip { color: var(--muted-2); font-size: 13px; }
.tour-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-tint); color: var(--accent); }
.tour-ic svg { width: 16px; height: 16px; }
.tour-step-n { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.tour-card h3 { margin: 0 0 7px; font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.tour-card p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.tour-progress { height: 4px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin: 16px 0 14px; }
.tour-progress span { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; }
.tour-right { display: flex; gap: 8px; }

/* ─── Next Best Action (kiki AI mockup) ───────────────────── */
.nba { background: linear-gradient(135deg, rgba(50,105,180,.07), rgba(120,90,200,.05)); border: 1px solid rgba(50,105,180,.22); border-radius: 12px; padding: 16px 18px; margin-bottom: 22px; }
.nba-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.nba-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff; background: linear-gradient(135deg, var(--accent), #6f57c4); padding: 4px 10px; border-radius: 6px; }
.nba-badge svg { width: 13px; height: 13px; }
.nba-title { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.nba-sub { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.nba-loading { display: flex; flex-direction: column; gap: 9px; }
.nba-shimmer { height: 46px; border-radius: 9px; background: linear-gradient(90deg, rgba(255,255,255,.5) 25%, rgba(50,105,180,.10) 37%, rgba(255,255,255,.5) 63%); background-size: 400% 100%; animation: nbash 1.2s ease infinite; }
@keyframes nbash { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.nba-list { display: flex; flex-direction: column; gap: 9px; }
.nba-item { display: grid; grid-template-columns: 26px 34px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; }
.nba-item:hover { border-color: var(--accent-3); }
.nba-rank { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--accent); text-align: center; }
.nba-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.nba-ic svg { width: 17px; height: 17px; }
.nba-body b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.nba-body p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.nba-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 150px; }
.nba-conf { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--muted); }
.nba-conf-bar { width: 60px; height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.nba-conf-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-3), var(--accent)); }
.nba-cta { font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: #fff; background: var(--accent); border: 0; border-radius: 7px; padding: 7px 13px; cursor: pointer; white-space: nowrap; }
.nba-cta:hover { filter: brightness(1.06); }

/* ─── Win/Loss competitor table ───────────────────────────── */
.wl-comp td { padding: 9px 10px; }
.wl-comp td b { font-weight: 600; color: var(--ink); }
.wl-wr { font-family: var(--font-mono); font-weight: 600; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.wl-wr.good { background: rgba(93,169,83,.14); color: #2E7D46; }
.wl-wr.bad { background: rgba(227,74,107,.12); color: var(--danger); }

/* ─── kiki comments ───────────────────────────────────────── */
.kiki-badge-sm { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--accent); color: #fff; font-family: var(--font-mono); font-size: 10px; font-weight: 700; flex-shrink: 0; }
.kiki-menu { position: fixed; z-index: 95; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 14px 40px -10px rgba(31,30,29,.35); padding: 5px; min-width: 190px; animation: cmpop .12s ease; }
.kiki-menu-hd { padding: 6px 10px 4px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kiki-menu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--ink); text-align: left; }
.kiki-menu-item:hover { background: var(--accent-tint); }
.kiki-menu-note { padding: 6px 10px 2px; font-size: 11px; color: var(--muted); }
.kiki-field-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.kiki-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.kiki-cat { height: 30px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 500; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.kiki-cat.on { border-color: var(--accent); background: var(--accent-tint); color: var(--ink-2); }
.kiki-field-row { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 8px; }
.kiki-voice { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; cursor: pointer; font-size: 12px; font-weight: 600; border: 1px solid var(--accent-3); background: var(--surface); color: var(--accent); }
.kiki-voice svg { width: 14px; height: 14px; }
.kiki-voice.on { border-color: var(--danger); background: rgba(227,74,107,.08); color: var(--danger); }
.kiki-listening { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--danger); }
.kiki-listening .dot { width: 8px; height: 8px; border-radius: 99px; background: var(--danger); animation: nbash 1s infinite; }
.kiki-err { margin-top: 8px; font-size: 12px; color: var(--danger); }
.kiki-existing { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.kiki-ex-item { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; margin-bottom: 8px; }
.kiki-ex-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.kiki-ex-ts { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-2); }
.kiki-ex-item p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink); }
.kiki-ex-del { margin-top: 6px; background: none; border: 0; padding: 0; font-size: 11.5px; color: var(--danger); cursor: pointer; font-family: var(--font-sans); }

/* ─── Customer Journey timeline ───────────────────────────── */
.jrny-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.jrny-filter { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; color: var(--muted); cursor: pointer; }
.jrny-filter.on { color: var(--ink); border-color: var(--muted-2); }
.jrny-filter input { display: none; }
.jrny-filter .jrny-dot { width: 8px; height: 8px; border-radius: 99px; opacity: .35; }
.jrny-filter.on .jrny-dot { opacity: 1; }
.jrny-count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }
.jrny { padding: 6px 18px 12px; }
.jrny-group { }
.jrny-day { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--muted); text-transform: capitalize; padding: 14px 0 8px 40px; position: sticky; top: 0; background: linear-gradient(var(--surface), var(--surface) 70%, transparent); z-index: 1; }
.jrny-item { display: grid; grid-template-columns: 40px 1fr; }
.jrny-rail { position: relative; display: flex; justify-content: center; }
.jrny-rail::before { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--line); }
.jrny-node { position: relative; z-index: 1; width: 13px; height: 13px; border-radius: 99px; margin-top: 12px; border: 2.5px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.jrny-card { padding: 8px 0 10px; margin-left: 4px; min-width: 0; }
.jrny-card-hd { display: flex; align-items: center; gap: 9px; }
.jrny-ic { display: inline-flex; flex-shrink: 0; }
.jrny-ic svg { width: 16px; height: 16px; }
.jrny-card-hd b { font-size: 13.5px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jrny-card-hd b.done { text-decoration: line-through; color: var(--muted); }
.jrny-time { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); flex-shrink: 0; }
.jrny-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; padding-left: 25px; font-size: 12px; color: var(--muted); }
.jrny-tag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; padding: 1px 7px; border: 1px solid; border-radius: 5px; opacity: .9; }
.jrny-ref { color: var(--accent); font-weight: 500; }
.jrny-owner { margin-left: auto; width: 20px; height: 20px; border-radius: 5px; background: var(--ink-2); color: #fff; font-family: var(--font-mono); font-size: 9px; font-weight: 600; display: inline-grid; place-items: center; }
.jrny-item:hover .jrny-card { background: var(--surface-2); border-radius: 8px; }

/* ─── Attachments ─────────────────────────────────────────── */
tr.file-drop-over td { background: var(--accent-tint) !important; box-shadow: inset 0 0 0 2px var(--accent); }
.att-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.att-ic svg { width: 16px; height: 16px; }
.att-ic.mail { background: var(--accent-tint); color: var(--accent); }
.att-ic.doc { background: rgba(181,148,78,.14); color: #806B3D; }
.att-files { display: flex; flex-direction: column; gap: 8px; }
.att-file { display: flex; align-items: center; gap: 11px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.att-file-m b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.att-file-m span { font-size: 11.5px; color: var(--muted); }
.att-list-wrap { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.att-list-hd { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.att-list-hd svg { width: 14px; height: 14px; }
.att-hint { margin-left: auto; text-transform: none; letter-spacing: 0; font-family: var(--font-sans); font-size: 11px; color: var(--muted-2); }
.att-drop { border: 1.5px dashed var(--line); border-radius: 9px; padding: 8px; transition: border-color .15s, background .15s; }
.att-drop.file-drop-over { border-color: var(--accent); background: var(--accent-tint); }
.att-empty { padding: 18px; text-align: center; font-size: 12.5px; color: var(--muted-2); }
.att-row { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 11px; align-items: center; padding: 9px 8px; border-radius: 7px; }
.att-row:hover { background: var(--surface-2); }
.att-row-m { min-width: 0; }
.att-row-m b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-row-m span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.att-when { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); white-space: nowrap; }

/* ─── Viewer / owner scope bar ────────────────────────────── */
.viewer-bar { display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 10px; padding: 12px 18px; margin-bottom: 20px; }
.viewer-ico { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; }
.viewer-ico svg { width: 16px; height: 16px; }
.viewer-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.65); }
.viewer-bar .form-select { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); font-weight: 600; }
.viewer-bar .form-select option { color: var(--ink); }
.viewer-note { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12.5px; color: rgba(255,255,255,.7); }
.viewer-note svg { width: 14px; height: 14px; }
.viewer-note.boss { color: #9Fd0a8; }
.viewer-note.boss svg { color: #9Fd0a8; }

/* ─── SAP Integration ─────────────────────────────────────── */
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.conn-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 15px 16px; }
.conn-hd { display: flex; align-items: center; gap: 8px; }
.conn-hd b { font-size: 14px; font-weight: 600; color: var(--ink); }
.conn-dot { width: 9px; height: 9px; border-radius: 99px; flex-shrink: 0; }
.conn-dot.ok { background: var(--success); box-shadow: 0 0 0 3px rgba(93,169,83,.18); }
.conn-dot.warn { background: var(--warm); }
.conn-status { margin-left: auto; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; }
.conn-status.ok { background: rgba(93,169,83,.14); color: #2E7D46; }
.conn-status.warn { background: rgba(253,189,26,.16); color: #7a5a0f; }
.conn-card p { margin: 9px 0 10px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.conn-meta { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-2); }
.conn-count { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--ink-2); }

.sap-pipe { display: flex; align-items: stretch; gap: 8px; padding: 16px; }
.sap-step { flex: 1; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 14px 14px; border-top: 3px solid var(--accent); display: flex; flex-direction: column; gap: 4px; }
.sap-step.busy { animation: sapPulse 1.2s ease infinite; }
@keyframes sapPulse { 0%,100% { border-top-color: var(--accent); } 50% { border-top-color: var(--accent-3); } }
.sap-step-n { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--accent); }
.sap-step b { font-size: 13.5px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.sap-step span:last-child { font-size: 12px; color: var(--muted); line-height: 1.4; }
.sap-arrow { align-self: center; color: var(--muted-2); font-size: 18px; flex-shrink: 0; }

.sap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.sap-kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; }
.sap-kpi .k { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); }
.sap-kpi .v { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.sap-flag { font-size: 12px; font-weight: 600; }
.sap-flag.ok { color: var(--success); }
.sap-flag.block { color: var(--danger); }

/* ─── Account hierarchy ───────────────────────────────────── */
.hq-badge { font-family: var(--font-mono); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; color: var(--accent); background: var(--accent-tint); border-radius: 4px; padding: 1px 6px; margin-left: 7px; vertical-align: middle; }
.hq-badge.sub { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.hier { display: flex; flex-direction: column; gap: 6px; }
.hier-node { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13px; }
.hier-node svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.hier-node.child { margin-left: 20px; background: var(--surface-2); }
.hier-node.self { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-3); }
.hier-node b { font-size: 13px; font-weight: 600; color: var(--ink); display: block; }
.hier-node span span { font-size: 11.5px; color: var(--muted); }

/* ─── Reports / dynamic dashboard ─────────────────────────── */
.rpt-layout { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: start; }
.rpt-palette { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; position: sticky; top: 12px; }
.rpt-pal-hd { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.rpt-pal-item { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); cursor: grab; font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.rpt-pal-item:hover { border-color: var(--accent-3); background: var(--accent-tint); }
.rpt-pal-item:active { cursor: grabbing; }
.rpt-pal-ic { display: inline-flex; color: var(--accent); }
.rpt-pal-ic svg { width: 16px; height: 16px; }
.rpt-pal-hint { font-size: 11px; color: var(--muted-2); margin-top: 6px; line-height: 1.4; }
.rpt-canvas { min-height: 420px; border: 1.5px dashed var(--line); border-radius: 12px; padding: 14px; transition: border-color .15s, background .15s; }
.rpt-canvas.over { border-color: var(--accent); background: var(--accent-tint); }
.rpt-canvas-empty { height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted-2); text-align: center; }
.rpt-canvas-empty svg { width: 40px; height: 40px; opacity: .4; }
.rpt-canvas-empty b { font-size: 16px; color: var(--muted); font-weight: 600; }
.rpt-canvas-empty span { font-size: 13px; }
.rpt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rpt-widget { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; }
.rpt-widget.wide { grid-column: span 2; }
.rpt-w-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rpt-title { flex: 1; border: 0; background: transparent; font-family: var(--font-sans); font-size: 14.5px; font-weight: 600; color: var(--ink); padding: 3px 4px; border-radius: 5px; }
.rpt-title:hover, .rpt-title:focus { background: var(--surface-2); outline: none; }
.rpt-wide, .rpt-rm { width: 26px; height: 26px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 12px; }
.rpt-wide:hover, .rpt-rm:hover { background: var(--surface-2); color: var(--ink); }
.rpt-cfg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.rpt-cfg select { font-family: var(--font-sans); font-size: 11.5px; font-weight: 500; color: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; background: var(--surface-2); cursor: pointer; }
.rpt-viz { flex: 1; min-height: 120px; }
.rpt-empty { padding: 30px; text-align: center; color: var(--muted-2); font-size: 13px; }
.rpt-bars { display: flex; flex-direction: column; gap: 8px; }
.rpt-bar-row { display: grid; grid-template-columns: 110px 1fr 80px; gap: 10px; align-items: center; }
.rpt-bar-lbl { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rpt-bar-track { height: 18px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.rpt-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-3), var(--accent)); border-radius: 4px; min-width: 2px; }
.rpt-bar-val { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--ink); text-align: right; }
.rpt-donut { display: flex; align-items: center; gap: 16px; }
.rpt-donut svg { width: 130px; height: 130px; flex-shrink: 0; }
.rpt-legend { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rpt-leg { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.rpt-leg-dot { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.rpt-leg b { margin-left: auto; padding-left: 12px; font-family: var(--font-mono); color: var(--ink); font-weight: 600; }
.rpt-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rpt-table td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); }
.rpt-table td.num { font-family: var(--font-mono); font-weight: 600; text-align: right; color: var(--ink); }
.rpt-pivot th { font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 6px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.rpt-pivot th.num, .rpt-pivot td.num { text-align: right; }
.rpt-pivot td { white-space: nowrap; }
.rpt-cols { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding: 8px 4px 0; overflow-x: auto; }
.rpt-col { flex: 1; min-width: 38px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.rpt-col-val { font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; white-space: nowrap; }
.rpt-col-bar { width: 100%; max-width: 46px; min-height: 3px; background: linear-gradient(180deg, var(--accent), var(--accent-3)); border-radius: 4px 4px 0 0; transition: height .25s; }
.rpt-col-lbl { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 6px; white-space: nowrap; }

/* Drawer note + clickable line */
.drawer-note { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.drawer-line.clickable { cursor: pointer; }
.drawer-line.clickable:hover { background: var(--surface-2); }

/* Reset button in sidebar foot */
.reset-btn {
  margin-left: auto; width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.16); background: transparent; color: rgba(255,255,255,.6);
  cursor: pointer; display: grid; place-items: center;
}
.reset-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.reset-btn svg { width: 15px; height: 15px; }

/* lead-status pill colors reuse demo.css .status-pill.new/.work/.qual */
