/* Account Command — /dept/sales?tab=account.
   Dense, dark-accent work surface. Scoped under .sac-*. Reuses the shared
   theme variables from departments.css so it tracks light/dark automatically. */

.sac-root { --sac-accent: var(--accent, #3b82f6); }
/* Author `display:` rules beat the UA [hidden] stylesheet — without this
   the empty state stays painted under a selected account. */
.sac-root [hidden] { display: none !important; }

/* ── command bar ─────────────────────────────────────────────── */
.sac-cmdbar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin: 0 0 12px;
}
.sac-root.has-account .sac-cmdbar-hint { display: none; }
.sac-search-wrap { position: relative; flex: 0 0 460px; max-width: 100%; }
.sac-search-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-muted, #94a3b8); pointer-events: none;
}
.sac-search-input {
  width: 100%; box-sizing: border-box; padding: 13px 14px 13px 42px;
  font-size: 15px; border: 1px solid var(--border, #e5e7eb); border-radius: 12px;
  background: var(--bg-card, #fff); color: var(--text-primary, #0f172a);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.sac-search-input:focus {
  outline: none; border-color: var(--sac-accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.16);
}
.sac-cmdbar-hint { font-size: 12.5px; color: var(--text-muted, #94a3b8); }
.sac-back { display: none; }
.sac-root.has-account .sac-back { display: inline-flex; align-items: center; }

/* ── landing book (segmentable roster) ───────────────────────── */
.sac-book-head { margin: 2px 0 14px; }
.sac-book-h { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.sac-book-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.sac-book-kpis { margin-bottom: 16px; }
.sac-book-segs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.sac-book-panel {
  border: 1px solid var(--border, #e5e7eb); border-radius: 14px;
  background: var(--bg-card, #fff); padding: 12px 14px; min-width: 0;
}
.sac-book-panel-h {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-secondary); margin-bottom: 10px;
}
.sac-book-bars { display: flex; flex-direction: column; gap: 6px; max-height: 236px; overflow-y: auto; }
.sac-book-bar {
  appearance: none; cursor: pointer; text-align: left; width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(46px, 30%) auto;
  gap: 8px; align-items: center; background: none; border: 0;
  padding: 4px 6px; border-radius: 8px;
}
.sac-book-bar:hover { background: rgba(59,130,246,0.07); }
.sac-book-bar.active { background: rgba(59,130,246,0.13); }
.sac-book-bar-lab { font-size: 12px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sac-book-bar-track { height: 7px; border-radius: 999px; background: rgba(148,163,184,0.18); overflow: hidden; }
.sac-book-bar-track > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--sac-accent), rgba(59,130,246,0.55)); }
.sac-book-bar-n { font-size: 11px; font-weight: 700; color: var(--text-secondary); text-align: right; white-space: nowrap; }
.sac-book-filters { align-items: flex-end; }
.sac-book-search { flex: 1 1 220px; }
.sac-book-search .sac-input.sm { max-width: none; width: 100%; }
.sac-book-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.sac-chip-x { appearance: none; cursor: pointer; font: inherit; }
.sac-chip-x:hover { border-color: var(--sac-accent); color: var(--sac-accent); }
.sac-book-acct { font-weight: 650; color: var(--text-primary); }
.sac-book-table td { white-space: nowrap; }
.sac-book-table .sac-row-click:hover .sac-book-acct { color: var(--sac-accent); }

.sac-results {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--bg-card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,0.14);
  max-height: 340px; overflow-y: auto; padding: 6px;
}
.sac-result {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; border-radius: 8px; cursor: pointer;
}
.sac-result:hover, .sac-result.active { background: rgba(59,130,246,0.10); }
.sac-result-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.sac-result-meta { font-size: 11.5px; color: var(--text-muted); }
.sac-result-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 6px; background: rgba(148,163,184,0.18); color: var(--text-secondary);
}

/* ── empty / loading ─────────────────────────────────────────── */
.sac-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 56px 20px; color: var(--text-muted);
}
.sac-empty-glyph svg { width: 54px; height: 54px; color: var(--border, #cbd5e1); margin-bottom: 14px; }
.sac-empty-title { font-size: 17px; font-weight: 700; color: var(--text-secondary); }
.sac-empty-sub { font-size: 13px; margin-top: 6px; max-width: 460px; line-height: 1.5; }
.sac-loading { padding: 48px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }
.sac-spin {
  display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-right: 8px;
  border: 2px solid var(--border, #e5e7eb); border-top-color: var(--sac-accent);
  border-radius: 50%; animation: sac-spin .8s linear infinite;
}
@keyframes sac-spin { to { transform: rotate(360deg); } }

/* ── hero ────────────────────────────────────────────────────── */
.sac-hero {
  border: 1px solid var(--border, #e5e7eb); border-radius: 16px;
  padding: 18px 20px; margin-bottom: 0;
  background:
    linear-gradient(135deg, rgba(59,130,246,0.10), rgba(59,130,246,0) 60%),
    var(--bg-card, #fff);
}
.sac-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sac-hero-name { font-size: 22px; font-weight: 800; color: var(--text-primary); line-height: 1.15; }
.sac-hero-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.sac-hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sac-hero-grid {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; align-items: flex-start;
}
.sac-hero-heat { min-width: 168px; flex: 0 0 auto; }
.sac-hero-heat-h {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); margin-bottom: 4px;
}
.sac-badge.quota { background: rgba(79,70,229,.14); color: #4338ca; }
[data-theme="dark"] .sac-badge.quota { background: rgba(129,140,248,.18); color: #c7d2fe; }
.sac-hero-x { opacity: .88; }
.sac-bi-kicker {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--sac-accent); margin-bottom: 6px;
}
.sac-bi-summary { font-size: 14.5px; line-height: 1.55; color: var(--text-primary); }
.sac-bi-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 12px; }
.sac-bi-field dt { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: 0 0 2px; }
.sac-bi-field dd { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--text-secondary); }
.sac-bi-empty { font-size: 13px; color: var(--text-muted); font-style: italic; }
.sac-badge {
  font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: rgba(148,163,184,0.16); color: var(--text-secondary);
}
.sac-badge.good { background: rgba(16,185,129,0.16); color: #047857; }
.sac-badge.warn { background: rgba(245,158,11,0.18); color: #b45309; }
.sac-badge.risk { background: rgba(239,68,68,0.16); color: #b91c1c; }
.sac-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.sac-kpis { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 0; }
.sac-kpi { min-width: 88px; }
.sac-kpi-val { font-size: 19px; font-weight: 800; color: var(--text-primary); }
.sac-kpi-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-top: 2px; }

/* ── strip (what changed + plays) ────────────────────────────── */
.sac-strip { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 12px; margin-bottom: 12px; }
.sac-strip:empty { display: none; }
.sac-card {
  border: 1px solid var(--border, #e5e7eb); border-radius: 14px;
  background: var(--bg-card, #fff); padding: 14px 16px;
}
.sac-card-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-secondary); margin-bottom: 10px;
}
.sac-play { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--border, #f1f5f9); }
.sac-play:first-of-type { border-top: 0; }
.sac-play-rank {
  flex: 0 0 20px; height: 20px; border-radius: 6px; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  background: var(--sac-accent); color: #fff;
}
.sac-play-body { flex: 1; }
.sac-play-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.sac-play-why { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sac-changed-item { font-size: 12.5px; color: var(--text-secondary); padding: 3px 0; }

/* ── columns: left = hero + lens, right = compose from the top ─ */
.sac-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 38%);
  gap: 14px;
  align-items: stretch;
  min-height: calc(100vh - 160px);
}
@media (max-width: 1180px) {
  .sac-cols { grid-template-columns: 1fr; min-height: 0; }
}
.sac-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }

.sac-lens-tabs, .sac-side-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border, #e5e7eb); margin-bottom: 14px; }
.sac-hero .sac-lens-tabs { margin: 10px 0 0; flex-wrap: wrap; gap: 0 2px; }
.sac-hero .sac-lens-tab { padding: 6px 9px; font-size: 12px; }
.sac-lens-tab, .sac-side-tab {
  appearance: none; background: none; border: 0; cursor: pointer;
  padding: 9px 13px; font-size: 13px; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.sac-lens-tab.active, .sac-side-tab.active { color: var(--sac-accent); border-bottom-color: var(--sac-accent); }
.sac-lens-tab:hover, .sac-side-tab:hover { color: var(--text-primary); }

.sac-lens-body { min-height: 200px; }
.sac-section { margin-bottom: 20px; }
.sac-section-h {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-secondary); margin: 0 0 8px;
}
.sac-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sac-section-head .sac-section-h { margin-bottom: 0; }
.sac-empty-line { font-size: 13px; color: var(--text-muted); font-style: italic; padding: 6px 0; }

/* tables / lists */
.sac-mini-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sac-mini-table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); padding: 6px 8px; border-bottom: 1px solid var(--border, #e5e7eb);
}
.sac-mini-table td { padding: 7px 8px; border-bottom: 1px solid var(--border, #f1f5f9); color: var(--text-secondary); }
.sac-mini-table td.num, .sac-mini-table th.num { text-align: right; }
.sac-mini-table a { color: var(--sac-accent); text-decoration: none; }
.sac-mini-table a:hover { text-decoration: underline; }
.sac-row-click { cursor: pointer; }
.sac-row-click:hover td { background: rgba(59,130,246,0.06); }

.sac-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sac-chip {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: rgba(148,163,184,0.14); color: var(--text-secondary); border: 1px solid var(--border, #e5e7eb);
}
.sac-chip strong { color: var(--text-primary); font-weight: 700; }

.sac-statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.sac-stat { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 10px 12px; background: var(--bg-card, #fff); }
.sac-stat-val { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.sac-stat-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-top: 3px; }

/* people */
.sac-person { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border, #f1f5f9); }
.sac-person:first-child { border-top: 0; }
.sac-person-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.sac-person-title { font-size: 11.5px; color: var(--text-muted); }
.sac-person-actions { display: flex; gap: 6px; }
.sac-seat { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.sac-seat.vacant { border-style: dashed; }
.sac-seat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sac-seat-role { font-size: 12.5px; font-weight: 700; color: var(--text-primary); }
.sac-seat-status { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sac-seat-status.vacant { color: #b45309; }
.sac-seat-status.filled { color: #047857; }

/* ── sidecar ─────────────────────────────────────────────────── */
.sac-sidecar {
  position: sticky; top: 8px; align-self: start;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 24px);
  border: 1px solid var(--border, #e5e7eb); border-radius: 16px;
  background: var(--bg-card, #fff); padding: 14px 16px;
  overflow: hidden;
}
.sac-side-head { margin-bottom: 12px; flex: 0 0 auto; }
.sac-side-kicker {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--sac-accent);
}
.sac-side-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sac-side-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.sac-field { margin-bottom: 10px; }
.sac-field { margin-bottom: 8px; }
.sac-field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 4px; }
.sac-input, .sac-textarea {
  width: 100%; box-sizing: border-box; padding: 9px 11px; font-size: 13px;
  border: 1px solid var(--border, #e5e7eb); border-radius: 9px;
  background: var(--bg-primary, #fff); color: var(--text-primary); font-family: inherit;
}
.sac-textarea { min-height: 150px; resize: vertical; line-height: 1.45; }
.sac-input:focus, .sac-textarea:focus { outline: none; border-color: var(--sac-accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.14); }

.sac-recip-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sac-recip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(59,130,246,0.12); color: var(--text-primary); }
.sac-recip button { appearance: none; border: 0; background: none; cursor: pointer; color: var(--text-muted); font-size: 14px; line-height: 1; padding: 0; }

.sac-btn {
  appearance: none; cursor: pointer; font-size: 12.5px; font-weight: 600;
  padding: 8px 13px; border-radius: 9px; border: 1px solid var(--border, #e5e7eb);
  background: var(--bg-card, #fff); color: var(--text-primary);
  transition: background .12s ease, border-color .12s ease, transform .1s ease;
}
.sac-btn:hover { border-color: var(--sac-accent); }
.sac-btn:active { transform: translateY(1px); }
.sac-btn.primary { background: var(--sac-accent); border-color: var(--sac-accent); color: #fff; }
.sac-btn.primary:hover { filter: brightness(1.05); }
.sac-btn.sm { padding: 4px 9px; font-size: 11.5px; border-radius: 7px; }
.sac-btn:disabled { opacity: .55; cursor: not-allowed; }
.sac-btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.sac-side-msg { font-size: 12.5px; margin-top: 10px; padding: 8px 10px; border-radius: 8px; display: none; }
.sac-side-msg.ok { display: block; background: rgba(16,185,129,0.14); color: #047857; }
.sac-side-msg.err { display: block; background: rgba(239,68,68,0.14); color: #b91c1c; }
.sac-side-msg.info { display: block; background: rgba(59,130,246,0.12); color: var(--text-secondary); }

.sac-side-hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }
.sac-contact-pick { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border, #f1f5f9); }
.sac-contact-pick:first-child { border-top: 0; }

/* ── market cards (2-up, meta-rich) ──────────────────────────── */
.sac-mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 860px) { .sac-mgrid { grid-template-columns: 1fr; } }
.sac-mcard { border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 12px 13px; background: var(--bg-card, #fff); min-width: 0; }
.sac-mcard-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sac-mcard-h h3 { margin: 0; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-secondary); }
.sac-mcard-count { font-size: 11px; color: var(--text-muted); }
.sac-mrow { padding: 7px 0; border-top: 1px solid var(--border, #f1f5f9); }
.sac-mrow:first-of-type { border-top: 0; }
.sac-mrow-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.sac-mrow-title a { color: var(--sac-accent); text-decoration: none; }
.sac-mrow-title a:hover { text-decoration: underline; }
.sac-mrow-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.sac-mrow-snip { font-size: 12px; color: var(--text-secondary); margin-top: 3px; line-height: 1.4; }

/* ── year trend + portfolio table ────────────────────────────── */
.sac-years { display: flex; gap: 8px; align-items: flex-end; height: 72px; margin: 8px 0 4px; }
.sac-year { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.sac-year-bar { width: 100%; max-width: 36px; background: var(--sac-accent); border-radius: 4px 4px 0 0; min-height: 3px; opacity: .85; }
.sac-year-amt { font-size: 10.5px; font-weight: 700; color: var(--text-secondary); }
.sac-year-lbl { font-size: 10px; color: var(--text-muted); }

/* ── behavior model ──────────────────────────────────────────── */
.sac-person-card { border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--bg-card, #fff); }
.sac-person-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sac-dims { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.sac-dim { min-width: 0; }
.sac-dim-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.sac-dim-track { height: 5px; background: rgba(148,163,184,0.22); border-radius: 99px; margin-top: 3px; overflow: hidden; }
.sac-dim-fill { height: 100%; background: var(--sac-accent); border-radius: 99px; }
.sac-dim-val { font-size: 10.5px; font-weight: 700; color: var(--text-secondary); }
.sac-sbar { display: inline-block; width: 56px; height: 6px; background: rgba(148,163,184,0.22); border-radius: 99px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.sac-sbar > span { display: block; height: 100%; background: var(--sac-accent); }
.sac-band { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sac-band.strong { color: #047857; }
.sac-band.rising { color: #0369a1; }
.sac-band.cooling { color: #b45309; }
.sac-band.dormant { color: #94a3b8; }

/* ── narrative cards ─────────────────────────────────────────── */
.sac-narr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 860px) { .sac-narr-grid { grid-template-columns: 1fr; } }
.sac-narr {
  border: 1px solid var(--border, #e5e7eb); border-radius: 12px;
  padding: 12px 14px; background: var(--bg-card, #fff); min-width: 0;
}
.sac-narr.wide { grid-column: 1 / -1; }
.sac-narr-h {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--sac-accent); margin: 0 0 8px;
}
.sac-narr-prose { font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); }
.sac-narr-kv { display: grid; gap: 6px; }
.sac-narr-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: start; }
.sac-narr-k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding-top: 1px; }
.sac-narr-v { font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; overflow-wrap: anywhere; }
.sac-insight {
  border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 11px 13px;
  margin-bottom: 8px; background: var(--bg-card, #fff);
}
.sac-insight-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.sac-insight-title { font-size: 13px; font-weight: 650; color: var(--text-primary); }
.sac-insight-meta { font-size: 11.5px; color: var(--text-muted); }
.sac-insight-body { font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; margin-top: 6px; }
.sac-opp-link { color: var(--sac-accent); text-decoration: none; font-weight: 650; }
.sac-opp-link:hover { text-decoration: underline; }

/* ── compose editor + wizard ─────────────────────────────────── */
.sac-need-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sac-need {
  appearance: none; cursor: pointer; border: 1px solid var(--border, #e5e7eb);
  background: var(--bg-card, #fff); color: var(--text-secondary);
  font-size: 11.5px; font-weight: 650; padding: 5px 9px; border-radius: 999px;
}
.sac-need.active { background: rgba(59,130,246,0.12); border-color: var(--sac-accent); color: var(--sac-accent); }
.sac-wizard {
  border: 1px dashed var(--border, #cbd5e1); border-radius: 10px;
  padding: 10px 11px; margin-bottom: 12px; background: rgba(59,130,246,0.04);
}
.sac-wizard-below {
  margin-top: 14px; margin-bottom: 0;
  border-style: solid;
  padding: 12px 13px;
}
.sac-wizard-h { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.sac-wizard-hint { font-size: 12px; color: var(--text-muted); line-height: 1.45; margin-bottom: 8px; }
.sac-compose-block { margin-bottom: 4px; }
.sac-wiz-pick {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 0; border-top: 1px solid var(--border, #f1f5f9);
}
.sac-wiz-pick:first-of-type { border-top: 0; }
.sac-editor-bar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.sac-editor-bar button {
  appearance: none; cursor: pointer; border: 1px solid var(--border, #e5e7eb);
  background: var(--bg-card, #fff); border-radius: 6px; padding: 3px 8px;
  font-size: 12px; font-weight: 700; color: var(--text-secondary);
}
.sac-editor-bar button:hover { border-color: var(--sac-accent); color: var(--sac-accent); }
.sac-editor {
  min-height: 280px; max-height: none; overflow-y: visible;
  border: 1px solid var(--border, #e5e7eb); border-radius: 9px;
  padding: 10px 12px; font-size: 13.5px; line-height: 1.5;
  background: var(--bg-primary, #fff); color: var(--text-primary);
}
.sac-editor.compact { min-height: 72px; max-height: 140px; overflow-y: auto; }
.sac-editor:focus { outline: none; border-color: var(--sac-accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.14); }
.sac-editor p { margin: 0 0 0.7em; }
.sac-editor ul, .sac-editor ol { margin: 0 0 0.7em; padding-left: 1.3em; }

/* ── people filters ──────────────────────────────────────────── */
.sac-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sac-filter { min-width: 140px; }
.sac-filter label { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 3px; }
.sac-filter select {
  width: 100%; box-sizing: border-box; padding: 6px 8px; font-size: 12.5px;
  border: 1px solid var(--border, #e5e7eb); border-radius: 8px;
  background: var(--bg-card, #fff); color: var(--text-primary);
}
.sac-person-actions { display: flex; gap: 6px; margin-top: 8px; }

/* ── stacked product bars ────────────────────────────────────── */
.sac-chart-toggle { display: flex; gap: 6px; margin-bottom: 10px; }
.sac-stack-wrap { display: flex; gap: 10px; align-items: flex-end; min-height: 160px; padding: 8px 0 4px; }
.sac-stack { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.sac-stack-col { width: 100%; max-width: 42px; height: 120px; display: flex; flex-direction: column-reverse; border-radius: 5px 5px 0 0; overflow: hidden; background: rgba(148,163,184,0.12); }
.sac-stack-seg { width: 100%; min-height: 0; }
.sac-stack-seg.events { background: #3b82f6; }
.sac-stack-seg.subs { background: #10b981; }
.sac-stack-seg.dg { background: #f59e0b; }
.sac-stack-seg.other { background: #94a3b8; }
.sac-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--text-muted); margin-top: 8px; }
.sac-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.sac-swatch.events { background: #3b82f6; }
.sac-swatch.subs { background: #10b981; }
.sac-swatch.dg { background: #f59e0b; }
.sac-swatch.other { background: #94a3b8; }

/* ── won book (chart spine + year → product → lines) ─────────── */
.sac-bk-chart {
  display: flex; gap: 12px; align-items: flex-end; min-height: 180px;
  padding: 10px 4px 4px; margin-bottom: 12px;
}
.sac-bk-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.sac-bk-amt { font-size: 11px; font-weight: 800; color: var(--text-secondary); }
.sac-bk-stack {
  width: 100%; max-width: 54px; display: flex; flex-direction: column-reverse;
  border-radius: 6px 6px 0 0; overflow: hidden; background: rgba(148,163,184,0.10);
}
.sac-bk-seg { width: 100%; min-height: 2px; }
.sac-bk-yr { font-size: 11px; font-weight: 700; color: var(--text-muted); }

.sac-book-year, .sac-book-prod {
  border: 1px solid var(--border, #e5e7eb); border-radius: 12px;
  background: var(--bg-card, #fff); margin-bottom: 8px;
}
.sac-book-year > summary, .sac-book-prod > summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 14px; cursor: pointer; font-size: 13px; font-weight: 700;
  color: var(--text-primary); list-style: none;
}
.sac-book-year > summary::-webkit-details-marker,
.sac-book-prod > summary::-webkit-details-marker { display: none; }
.sac-book-year > summary:hover, .sac-book-prod > summary:hover { color: var(--sac-accent); }
.sac-bk-count, .sac-bk-prodmeta { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.sac-bk-prodname { font-size: 12.5px; font-weight: 650; color: var(--text-primary); }
.sac-book-prod { margin: 0 10px 10px; border-radius: 10px; background: rgba(148,163,184,0.06); }
.sac-bk-prodbar { height: 6px; margin: 0 12px 8px; border-radius: 99px; background: rgba(148,163,184,0.18); overflow: hidden; }
.sac-bk-prodbar > span { display: block; height: 100%; border-radius: 99px; }
.sac-book-prod .sac-mini-table { margin: 0 8px 8px; width: calc(100% - 16px); }
.sac-seeall { margin-top: 8px; }

/* ── pipeline: funnel + deal cards ───────────────────────────── */
.sac-funnel { display: flex; flex-direction: column; gap: 8px; }
.sac-funnel-row { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: center; }
.sac-funnel-lbl { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sac-funnel-track { position: relative; height: 22px; background: rgba(148,163,184,0.12); border-radius: 6px; overflow: hidden; }
.sac-funnel-fill { height: 100%; background: linear-gradient(90deg, var(--sac-accent), rgba(59,130,246,0.55)); border-radius: 6px; }
.sac-funnel-val { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 700; color: var(--text-secondary); }

.sac-deal { border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 11px 13px; margin-bottom: 8px; background: var(--bg-card, #fff); }
.sac-deal-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.sac-deal-name { font-size: 13px; font-weight: 650; color: var(--text-primary); }
.sac-deal-name .sac-opp-link { font-weight: 650; }
.sac-deal-amt { font-size: 13.5px; font-weight: 800; color: var(--text-primary); white-space: nowrap; }
.sac-deal-pct { font-size: 11px; font-weight: 700; color: var(--sac-accent); }
.sac-deal-stage { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); margin-top: 3px; }
.sac-deal-prob { height: 5px; background: rgba(148,163,184,0.2); border-radius: 99px; margin: 7px 0 5px; overflow: hidden; }
.sac-deal-prob-fill { height: 100%; background: var(--sac-accent); border-radius: 99px; }
.sac-deal-meta { font-size: 11.5px; color: var(--text-muted); }

/* ── usage: hero band + per-product charts ───────────────────── */
.sac-uhero { display: flex; flex-wrap: wrap; gap: 22px; }
.sac-uhero-cell { min-width: 120px; }
.sac-uhero-lbl { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 5px; }
.sac-uhero-val { font-size: 14px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sac-uhero-sub { font-size: 12px; color: var(--text-muted); font-weight: 600; }

.sac-usage-card {
  border: 1px solid var(--border, #e5e7eb); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px; background: var(--bg-card, #fff);
}
.sac-usage-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.sac-usage-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.sac-usage-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.sac-usage-charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
@media (max-width: 720px) { .sac-usage-charts { grid-template-columns: 1fr; } }
.sac-usage-chart-h { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 4px; }
.sac-spark { display: flex; gap: 4px; align-items: flex-end; height: 58px; }
.sac-spark-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-width: 0; }
.sac-spark-bar { width: 100%; max-width: 22px; background: var(--sac-accent); border-radius: 3px 3px 0 0; opacity: .85; }
.sac-spark-lbl { font-size: 9.5px; color: var(--text-muted); }
.sac-usage-facts { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; font-size: 12px; color: var(--text-secondary); }
.sac-usage-facts span { position: relative; }
.sac-usage-facts span:not(:last-child)::after { content: '·'; position: absolute; right: -9px; color: var(--text-muted); }

/* ── Shared helpers (added with the lens expansion) ───────────────────────── */
.sac-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sac-sub-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); margin: 12px 0 6px; }
.sac-hint-xs { font-size: 11px; color: var(--text-muted); font-weight: 500; }
a.sac-btn { text-decoration: none; display: inline-flex; align-items: center; }
.sac-btn.xs { padding: 3px 8px; font-size: 11px; border-radius: 6px; }
.sac-input.sm { padding: 5px 9px; font-size: 12px; max-width: 280px; }

/* ── Sortable + filterable data table ─────────────────────────────────────── */
.sac-table-wrap { overflow-x: auto; }
.sac-tfilter { margin-bottom: 8px; }
.sac-dtable td { vertical-align: top; }
.sac-th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.sac-th-sort:hover { color: var(--sac-accent); }

/* ── Overview: aggregate stat band ────────────────────────────────────────── */
.sac-agg-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.sac-agg { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 10px 12px; background: var(--bg-card, #fff); text-align: left; display: block; width: 100%; }
button.sac-agg, a.sac-agg { font: inherit; cursor: pointer; text-decoration: none; appearance: none; }
.sac-agg.linkable:hover { border-color: var(--sac-accent); box-shadow: 0 0 0 3px rgba(59,130,246,.10); }
.sac-agg-val { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.sac-agg-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-top: 3px; }
.sac-agg-sub { font-size: 11px; color: var(--text-secondary); margin-top: 3px; }

/* ── Overview: deal risk heatmap (stage × probability band) ───────────────── */
.sac-heatmap { display: flex; flex-direction: column; gap: 6px; }
.sac-hm-row { display: grid; grid-template-columns: 128px repeat(3, 1fr); gap: 6px; align-items: stretch; }
.sac-hm-stage { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); align-self: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sac-hm-cell { border-radius: 8px; padding: 8px 6px; min-height: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.sac-hm-cell.head { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); padding: 2px; min-height: 0; }
.sac-hm-cell.hot { background: rgba(16,185,129, calc(var(--i, .5) * .7)); }
.sac-hm-cell.warm { background: rgba(245,158,11, calc(var(--i, .5) * .7)); }
.sac-hm-cell.cold { background: rgba(239,68,68, calc(var(--i, .5) * .7)); }
.sac-hm-cell.empty { background: rgba(148,163,184,.07); border: 1px dashed var(--border, #e5e7eb); }
.sac-hm-amt { font-size: 12px; font-weight: 800; color: var(--text-primary); }
.sac-hm-cnt { font-size: 10px; color: var(--text-secondary); }

/* ── Overview: why-we-lost reason bars ────────────────────────────────────── */
.sac-whylost { display: flex; flex-direction: column; gap: 6px; }
.sac-whylost-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; }
.sac-whylost-lbl { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sac-whylost-track { position: relative; height: 22px; background: rgba(148,163,184,.12); border-radius: 6px; overflow: hidden; }
.sac-whylost-fill { height: 100%; background: linear-gradient(90deg, rgba(239,68,68,.85), rgba(239,68,68,.5)); border-radius: 6px; }
.sac-whylost-val { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 700; color: var(--text-secondary); }

/* ── Events: calendar + territory map ─────────────────────────────────────── */
.sac-cal { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.sac-cal-month { flex: 0 0 190px; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 8px 9px; background: var(--bg-card, #fff); }
.sac-cal-mh { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 6px; }
.sac-cal-ev { display: flex; align-items: baseline; gap: 6px; padding: 5px 7px; border-radius: 7px; margin-bottom: 4px; font-size: 11.5px; background: rgba(148,163,184,.1); border-left: 3px solid var(--text-muted); }
.sac-cal-ev.pipe { border-left-color: #16a34a; background: rgba(16,185,129,.12); }
.sac-cal-ev.ws { border-left-color: #f59e0b; background: rgba(245,158,11,.12); }
.sac-cal-ev.prospect { border-left-color: var(--sac-accent); background: rgba(59,130,246,.08); }
.sac-cal-d { font-weight: 800; font-size: 11px; color: var(--text-secondary); flex: 0 0 auto; }
.sac-cal-nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.sac-cal-lv { font-size: 10px; color: var(--text-muted); flex: 0 0 auto; }
.sac-terr { display: flex; flex-wrap: wrap; gap: 8px; }
.sac-terr-tile { min-width: 72px; border-radius: 8px; padding: 8px 10px; background: rgba(59,130,246, calc(var(--i, .5) * .55)); display: flex; flex-direction: column; gap: 2px; }
.sac-terr-st { font-size: 12px; font-weight: 800; color: var(--text-primary); }
.sac-terr-v { font-size: 11px; color: var(--text-secondary); }

/* ── Demand Gen: banner creative art ──────────────────────────────────────── */
.sac-artgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.sac-art-card { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; overflow: hidden; background: var(--bg-card, #fff); }
.sac-art-thumb { display: flex; align-items: center; justify-content: center; min-height: 90px; background: rgba(148,163,184,.08); }
.sac-art-thumb img { width: 100%; height: auto; display: block; }
.sac-art-thumb.noart { min-height: 70px; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.sac-art-meta { padding: 8px 10px; }
.sac-art-name { font-size: 12px; font-weight: 650; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sac-art-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ── Usage: interest footprint ────────────────────────────────────────────── */
.sac-if-dim { margin-bottom: 10px; }
.sac-if-dh { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 5px; }

/* ── Compose wizard: scrollable name-search picks ─────────────────────────── */
.sac-wiz-picks { max-height: 168px; overflow-y: auto; margin-top: 6px; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; }
.sac-wizard-below .sac-wiz-picks { max-height: min(420px, 46vh); }
.sac-wiz-picks .sac-wiz-pick { padding: 7px 10px; }
.sac-la { color: var(--text-muted); font-size: 11px; margin-top: 2px; }

/* ── Lead Analysis island (Account Command → Leads) ───────────────────────── */
.sac-lav {
  --lav-bg: #0b1220;
  --lav-panel: #121a2b;
  --lav-line: rgba(148, 163, 184, 0.16);
  --lav-text: #e2e8f0;
  --lav-muted: #94a3b8;
  --lav-accent: #3b82f6;
  background: linear-gradient(165deg, #0f172a 0%, #0b1220 55%, #0a1628 100%);
  color: var(--lav-text);
  border-radius: 18px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
}
.sac-lav-head {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  align-items: flex-start; margin-bottom: 16px;
}
.sac-lav-kicker {
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #60a5fa; margin-bottom: 4px;
}
.sac-lav-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: #f8fafc; line-height: 1.15; }
.sac-lav-sub { font-size: 12.5px; color: var(--lav-muted); margin-top: 6px; max-width: 420px; line-height: 1.45; }
.sac-lav-head-acts { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sac-lav-toggles { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.sac-lav-tog {
  appearance: none; cursor: pointer; border: 1px solid rgba(148,163,184,0.28);
  background: transparent; color: var(--lav-muted);
  font-size: 11.5px; font-weight: 650; padding: 5px 10px; border-radius: 999px;
}
.sac-lav-tog:hover { color: #e2e8f0; border-color: rgba(96,165,250,0.5); }
.sac-lav-tog.active { background: var(--lav-accent); border-color: var(--lav-accent); color: #fff; }
.sac-lav-head-acts .sac-btn {
  background: rgba(59,130,246,0.14); border-color: rgba(59,130,246,0.35); color: #93c5fd;
}
.sac-lav-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 900px) { .sac-lav-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sac-lav-kpi {
  background: rgba(255,255,255,0.03); border: 1px solid var(--lav-line);
  border-radius: 12px; padding: 12px 14px;
}
.sac-lav-kpi-v { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -0.03em; line-height: 1; }
.sac-lav-kpi-l {
  margin-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--lav-muted);
}
.sac-lav-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px;
}
@media (max-width: 900px) { .sac-lav-grid { grid-template-columns: 1fr; } }
.sac-lav-panel {
  background: var(--lav-panel); border: 1px solid var(--lav-line);
  border-radius: 14px; padding: 12px 13px; min-width: 0;
}
.sac-lav-panel-h {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  margin-bottom: 10px; font-size: 11px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: #cbd5e1;
}
.sac-lav-panel-n { color: var(--lav-muted); font-weight: 700; letter-spacing: 0; text-transform: none; }
.sac-lav-bars { display: flex; flex-direction: column; gap: 7px; max-height: 280px; overflow-y: auto; }
.sac-lav-bar {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  gap: 8px; align-items: center;
}
.sac-lav-bar-lab {
  font-size: 12px; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sac-lav-bar-track {
  height: 7px; border-radius: 999px; background: rgba(148,163,184,0.18); overflow: hidden;
}
.sac-lav-bar-track > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}
.sac-lav-bar-n { font-size: 12px; font-weight: 750; color: #f8fafc; text-align: right; white-space: nowrap; }
.sac-lav-bar-sub { font-weight: 600; color: var(--lav-muted); }
.sac-lav-loading {
  padding: 28px 8px; text-align: center; color: var(--lav-muted); font-size: 13px;
}
.sac-lav .sac-table-wrap { margin-top: 4px; }
.sac-lav .sac-mini-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px; color: #e2e8f0;
}
.sac-lav .sac-mini-table th {
  text-align: left; font-size: 10.5px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--lav-muted);
  border-bottom: 1px solid var(--lav-line); padding: 8px 6px;
}
.sac-lav .sac-mini-table td {
  border-bottom: 1px solid rgba(148,163,184,0.1); padding: 8px 6px; color: #cbd5e1;
}
.sac-lav .sac-mini-table td.num, .sac-lav .sac-mini-table th.num { text-align: right; }
.sac-lav .sac-mini-table a { color: #93c5fd; }
.sac-lav .sac-input {
  background: rgba(255,255,255,0.04); border-color: rgba(148,163,184,0.28); color: #e2e8f0;
}
.sac-lav .sac-empty-line { color: var(--lav-muted); }

/* ── People: search + click-to-expand score detail ───────────────────────── */
.sac-people-search { margin-bottom: 10px; }
.sac-person-top { cursor: pointer; }
.sac-person-scorewrap { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.sac-person-chev { color: var(--text-muted); font-size: 12px; transition: transform .15s ease; }
.sac-person-card.open .sac-person-chev { transform: rotate(180deg); }
.sac-person-detail { display: none; margin-top: 10px; border-top: 1px solid var(--border, #f1f5f9); padding-top: 10px; }
.sac-person-card.open .sac-person-detail { display: block; }

/* ── Spend type bar + git-style calendar heatmap ─────────────────────────── */
.sac-spend-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: rgba(148,163,184,.16); }
.sac-spend-seg { height: 100%; }
.sac-spend-seg.ev { background: #3b82f6; }
.sac-spend-seg.sub { background: #10b981; }
.sac-spend-seg.dg { background: #f59e0b; }
.sac-spend-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 6px; font-size: 11.5px; color: var(--text-secondary); }
.sac-spend-lg::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.sac-spend-lg.ev::before { background: #3b82f6; }
.sac-spend-lg.sub::before { background: #10b981; }
.sac-spend-lg.dg::before { background: #f59e0b; }
.sac-chip.quota { background: rgba(79,70,229,.12); color: #4338ca; }
.sac-cal-hm { display: flex; flex-direction: column; gap: 3px; }
.sac-cal-hm-row { display: grid; grid-template-columns: 42px repeat(4, 22px) minmax(52px, auto); gap: 4px; align-items: center; }
.sac-cal-hm.compact .sac-cal-hm-row { grid-template-columns: 36px repeat(4, 18px); }
.sac-cal-hm-yr { font-size: 11px; font-weight: 700; color: var(--text-secondary); }
.sac-cal-hm-tot { font-size: 11px; font-weight: 650; color: var(--text-secondary); text-align: right; }
.sac-cal-hm-cell {
  width: 22px; height: 16px; border-radius: 3px;
  background: rgba(16,185,129, var(--i, .15));
  display: inline-block;
}
.sac-cal-hm.compact .sac-cal-hm-cell { width: 18px; height: 13px; }
.sac-cal-hm-cell.head { background: transparent; font-size: 10px; font-weight: 700; color: var(--text-muted); text-align: center; line-height: 16px; }
.sac-cal-hm-cell.empty { background: rgba(148,163,184,.14); }
.sac-cal-hm-key { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 11px; color: var(--text-muted); }
.sac-crosslinks-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 8px; }
.sac-crosslinks-row { display: flex; flex-wrap: wrap; gap: 6px; }
