/* Ops Template Kit — shared utility styles.
 *
 * One design system shared by two template modules:
 *   • HR OS               — people / org / settings pages
 *   • Mailbox Analytics   — leaderboard / dashboard / portfolio / mailbox /
 *                           conversations / taxonomy / run pages
 *
 * These are small component-y classes that are easier to read than long
 * Tailwind class strings. They use raw color values (matching the tokens in
 * assets/tailwind-config.js) so they work without the Tailwind JIT @apply
 * machinery (the Play CDN doesn't process external stylesheets).
 *
 * Layout of this file:
 *   1. Shared base + Mailbox Analytics components  (ported from the app)
 *   2. HR OS-only components  (quick search, sub-nav, org chart, faceted
 *      drawer, menus — kept because the HR template pages still use them)
 *   3. Leaderboard / Portfolio / Saved-Views  (reusable analytics chrome)
 */

/* ============================================================
   SECTION 1 — Shared base + Mailbox Analytics components
   ============================================================ */

/* ---- Body baseline ---- */
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #1A1816;
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
input, button, select, textarea { font-family: inherit; }
input::placeholder, textarea::placeholder { color: #9A968F; }
[x-cloak] { display: none !important; }

/* ---- Page canvas + content card (2026-06 design refresh) ----
   Soft paper canvas with a whisper of dot-grid texture; page content sits
   in a white card with a hairline border. */
body.page-canvas {
  background-color: #F7F5F0;
  background-image: radial-gradient(rgba(122,118,111,0.13) 1px, transparent 1.2px);
  background-size: 22px 22px;
}
.page-card {
  background: #fff;
  border: 1px solid #E8E3D9;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(28,24,18,0.04), 0 12px 32px -20px rgba(28,24,18,0.10);
  padding: 14px 16px 12px;
}
@media (max-width: 767px) { .page-card { padding: 10px 10px 12px; border-radius: 10px; } }
.page-title-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: #fff; border: 1px solid #E8E3D9;
  display: inline-flex; align-items: center; justify-content: center;
  color: #3A3833; flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(28,24,18,0.05);
}

/* ---- Brand wordmark ---- */
.wordmark { letter-spacing: -0.02em; }
.wordmark .brand-accent { color: #DC2626; font-weight: 700; }
.wordmark .brand-rest { color: #1A1816; font-weight: 500; }

/* ---- Left nav items ---- */
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #3A3833;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.nav-link:hover { background: #F4F1EA; }
.nav-link.is-active { background: #F4F1EA; color: #1A1816; font-weight: 600; }
.nav-link .nav-icon { color: #6B6862; display: inline-flex; }
.nav-link:hover .nav-icon { color: #3A3833; }
.nav-link.is-active .nav-icon { color: #DC2626; }
.nav-icon svg { width: 15px; height: 15px; }
/* Disabled ("coming soon") nav items */
.nav-link.is-disabled { color: #B8B3A9; cursor: default; pointer-events: none; }
.nav-link.is-disabled .nav-icon { color: #CBC6BC; }

/* Small-caps group labels between nav sections */
.nav-section-label {
  padding: 16px 12px 5px;
  font-size: 10.5px; font-weight: 600;
  color: #9A968F;
  letter-spacing: 0.08em; text-transform: uppercase;
  user-select: none;
}
.nav-soon {
  margin-left: auto;
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em;
  color: #B0ABA1; background: #F1EEE7;
  padding: 1px 6px; border-radius: 5px; text-transform: uppercase;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 6px;
  font-size: 12.5px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost   { background: #fff; border-color: #DDD8CE; color: #1A1816; }
.btn-ghost:hover:not(:disabled) { background: #FBFAF7; }
.btn-primary { background: #1A1816; border-color: #1A1816; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #2E2A24; border-color: #2E2A24; }
.btn-accent  { background: #DC2626; border-color: #DC2626; color: #fff; }
.btn-accent:hover:not(:disabled) { background: #B91C1C; border-color: #B91C1C; }
.btn-link    { color: #DC2626; font-weight: 500; padding: 0; background: transparent; border: 0; cursor: pointer; }

/* ---- Inputs ---- */
.input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #DDD8CE;
  border-radius: 6px;
  background: #fff;
  color: #1A1816;
  font-size: 13px;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus { border-color: #1A1816; box-shadow: 0 0 0 3px rgba(26,24,22,0.06); }
.input[disabled], .input:disabled { background: #FBFAF7; color: #7A766F; }
.label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #3A3833;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.help { font-size: 11.5px; color: #7A766F; margin-top: 4px; }

/* ---- Status pill ---- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 3px; }
.pill-active      { background: #E7F3EC; color: #0F7A3C; }
.pill-active .dot { background: #1F9D55; }
.pill-leave       { background: #FFF3DA; color: #8A5A00; }
.pill-leave .dot  { background: #D89B14; }
.pill-off         { background: #FBE1E1; color: #A02323; }
.pill-off .dot    { background: #D33A3A; }
.pill-pending     { background: #F1EEE7; color: #7A766F; }
.pill-pending .dot{ background: #B0ABA1; }
/* Pulsing dot for the running pill */
.pill-leave .dot.is-live { animation: dot-pulse 1.3s ease-in-out infinite; }
@keyframes dot-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---- Chip ---- */
.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #F4F1EA;
  color: #3A3833;
  font-size: 12px;
  font-weight: 500;
}

/* ---- Keyboard chip ---- */
.kbd {
  font-size: 10.5px; color: #7A766F;
  border: 1px solid #E4DFD4; border-radius: 4px;
  padding: 2px 6px; letter-spacing: 0.05em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---- Popover menu ---- */
.pop { background: #fff; border: 1px solid #EDEAE3; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04); padding: 6px; min-width: 120px; }
.pop-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px; font-size: 12.5px; color: #1A1816; cursor: pointer; }
.pop-item:hover { background: #F4F1EA; }

/* ---- Table-like flex rows ---- */
.row {
  display: flex; align-items: center;
  padding: 0 8px;
  height: 52px;
  border-bottom: 1px solid #F4F1EA;
  background: #fff;
  font-size: 13px;
  color: #3A3833;
  transition: background .08s;
  text-decoration: none;
}
.row:hover { background: #FCFBF7; }
.row .cell {
  display: flex; align-items: center;
  padding: 0 10px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-head {
  display: flex; align-items: center;
  padding: 0 8px; height: 34px;
  border-bottom: 1px solid #EDEAE3;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: #9A968F;
}
.row-head .cell { padding: 0 10px; }

/* ---- Cards ---- */
.card { background: #fff; border: 1px solid #EDEAE3; border-radius: 8px; }
.card-head { padding: 14px 16px; border-bottom: 1px solid #EDEAE3; display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 13px; font-weight: 600; color: #1A1816; }
.card-body { padding: 16px; }

/* ---- Toast ---- */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { min-width: 260px; max-width: 420px; background: #1A1816; color: #fff; border-radius: 6px; padding: 10px 14px; font-size: 13px; line-height: 1.4; box-shadow: 0 8px 24px rgba(0,0,0,0.18); display: flex; gap: 10px; align-items: flex-start; pointer-events: auto; }
.toast.success { background: #0F7A3C; }
.toast.error { background: #A02323; }

/* ---- Indeterminate progress bar ---- */
.progress-bar { position: relative; width: 100%; height: 3px; border-radius: 999px; background: #EDEAE3; overflow: hidden; }
.progress-bar::before {
  content: ""; position: absolute; top: 0; left: 0; bottom: 0;
  width: 40%; border-radius: 999px; background: #DC2626;
  animation: progress-indeterminate 1.1s ease-in-out infinite;
}
@keyframes progress-indeterminate { 0% { left: -40%; } 100% { left: 100%; } }

/* ---- Modal ---- */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15,12,8,0.42); }
.modal-card {
  width: 100%; max-width: 460px; background: #fff; border: 1px solid #E8E3D9;
  border-radius: 12px; box-shadow: 0 24px 60px -12px rgba(28,24,18,0.35);
  overflow: hidden;
}
.modal-head { padding: 16px 20px; border-bottom: 1px solid #EDEAE3; display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 15px; font-weight: 600; color: #1A1816; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid #EDEAE3; display: flex; align-items: center; justify-content: flex-end; gap: 8px; background: #FBFAF7; }
.modal-x { width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #8A8579; background: transparent; border: 0; cursor: pointer; }
.modal-x:hover { background: #F0EDE4; color: #1A1816; }

/* ---- Segmented preset control ---- */
.seg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.seg-btn {
  padding: 6px 12px; border-radius: 7px; border: 1px solid #E4DFD4;
  background: #fff; color: #7A766F; font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.seg-btn:hover { background: #FBFAF7; }
.seg-btn.is-active { background: #1A1816; border-color: #1A1816; color: #fff; }

/* ---- Toggle switch ---- */
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #D9D4C9; cursor: pointer; transition: background .15s; flex-shrink: 0; border: 0; padding: 0; }
.switch.is-on { background: #DC2626; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: transform .15s; }
.switch.is-on::after { transform: translateX(16px); }
.switch:disabled { opacity: .5; cursor: default; }

/* ---- Key entry panel (401 / missing key) ---- */
.key-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px;
  background-color: #F7F5F0; background-image: radial-gradient(rgba(122,118,111,0.13) 1px, transparent 1.2px); background-size: 22px 22px; }
.key-card { background: #fff; border: 1px solid #E8E3D9; border-radius: 12px; box-shadow: 0 1px 2px rgba(28,24,18,0.04), 0 12px 32px -20px rgba(28,24,18,0.10); padding: 36px 40px; max-width: 420px; width: 100%; text-align: center; }

/* ============================================================
   Run-activity components (Mailbox Analytics-specific)
   ============================================================ */

/* ---- Stat card ---- */
.stat {
  background: #fff; border: 1px solid #EDEAE3; border-radius: 10px;
  padding: 14px 15px; display: flex; flex-direction: column; gap: 2px;
}
.stat-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #9A968F; display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: #1A1816; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 11.5px; color: #7A766F; margin-top: 1px; }

/* ---- Stage timeline ---- */
.timeline { display: flex; flex-direction: column; }
.tl-stage { display: flex; gap: 12px; position: relative; padding-bottom: 4px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 16px; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; border: 2px solid #fff; box-shadow: 0 0 0 1px #E0DBD0; z-index: 1; }
.tl-dot.is-succeeded { background: #1F9D55; box-shadow: 0 0 0 1px #1F9D55; }
.tl-dot.is-running   { background: #D89B14; box-shadow: 0 0 0 1px #D89B14; animation: dot-pulse 1.3s ease-in-out infinite; }
.tl-dot.is-failed    { background: #D33A3A; box-shadow: 0 0 0 1px #D33A3A; }
.tl-dot.is-pending   { background: #fff; box-shadow: 0 0 0 1.5px #D6D1C6; }
.tl-line { flex: 1; width: 2px; background: #EDEAE3; margin: 2px 0; min-height: 12px; }
.tl-line.is-done { background: #CDE6D6; }
.tl-body { flex: 1; min-width: 0; padding-bottom: 14px; }
.tl-name { font-size: 13px; font-weight: 600; color: #1A1816; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tl-name.is-pending { color: #9A968F; font-weight: 500; }
.tl-meta { font-size: 11.5px; color: #7A766F; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tl-dur { font-size: 11px; color: #9A968F; font-variant-numeric: tabular-nums; font-weight: 500; }

/* ---- Tier / assignment bars ---- */
.tier-row { display: flex; align-items: center; gap: 10px; }
.tier-key { width: 96px; flex-shrink: 0; font-size: 12px; color: #3A3833; display: flex; align-items: center; gap: 7px; }
.tier-swatch { width: 9px; height: 9px; border-radius: 2.5px; flex-shrink: 0; }
.tier-track { flex: 1; height: 8px; border-radius: 999px; background: #F1EEE7; overflow: hidden; }
.tier-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.tier-val { width: 96px; flex-shrink: 0; text-align: right; font-size: 12px; color: #3A3833; font-variant-numeric: tabular-nums; }

/* ---- Spend meter ---- */
.spend-track { width: 100%; height: 8px; border-radius: 999px; background: #F1EEE7; overflow: hidden; }
.spend-fill { height: 100%; border-radius: 999px; background: #DC2626; transition: width .4s ease; }
.spend-fill.is-ok { background: #1F9D55; }
.spend-fill.is-warn { background: #D89B14; }

/* ---- Approval banner ---- */
.approve-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 10px; background: #FFF3DA; border: 1px solid #F0E2C8; }
.approve-icon { width: 34px; height: 34px; border-radius: 9px; background: #fff; border: 1px solid #F0E2C8; color: #8A5A00; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---- Activity feed ---- */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 11px; padding: 11px 2px; border-bottom: 1px solid #F4F1EA; }
.feed-item:last-child { border-bottom: 0; }
.feed-dot { width: 7px; height: 7px; border-radius: 50%; background: #C5C0B6; margin-top: 5px; flex-shrink: 0; }
.feed-msg { font-size: 12.5px; color: #3A3833; line-height: 1.4; }
.feed-meta { font-size: 11px; color: #9A968F; margin-top: 2px; display: flex; align-items: center; gap: 7px; }
.feed-stage { font-size: 10px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: #8A5A00; background: #FFF3DA; padding: 0 6px; border-radius: 4px; }

/* ---- Empty state ---- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 44px 20px; color: #9A968F; }
.empty-icon { width: 44px; height: 44px; border-radius: 12px; background: #F4F1EA; color: #B0ABA1; display: grid; place-items: center; margin-bottom: 12px; }
.empty-title { font-size: 14px; font-weight: 600; color: #3A3833; }
.empty-sub { font-size: 12.5px; color: #9A968F; margin-top: 4px; max-width: 320px; }

/* ---- Mailbox card ---- */
.mbx-card { display: block; background: #fff; border: 1px solid #EDEAE3; border-radius: 10px; padding: 15px 16px; transition: border-color .12s, box-shadow .12s, transform .12s; }
.mbx-card:hover { border-color: #DDD8CE; box-shadow: 0 6px 18px -8px rgba(28,24,18,0.16); transform: translateY(-1px); }
.mbx-avatar { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; color: #fff; font-weight: 600; font-size: 14px; }

/* ---- Taxonomy L1 accent-cycled cards ---- */
.tx-card { border: 1px solid #EDEAE3; border-radius: 12px; overflow: hidden; background: #fff; }
.tx-head { display: flex; align-items: center; gap: 11px; padding: 13px 16px; border-bottom: 1px solid #F1EEE7; border-left: 4px solid var(--tx-accent, #DC2626); }
.tx-badge { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; font-size: 13px; font-weight: 700; color: #fff; background: var(--tx-accent, #DC2626); }
.tx-title { font-size: 14px; font-weight: 600; color: #1A1816; }
.tx-vol { font-size: 11.5px; color: #7A766F; font-variant-numeric: tabular-nums; }
.tx-body { padding: 6px 16px 14px; }
.tx-l2 { padding: 12px 0 4px; }
.tx-l2 + .tx-l2 { border-top: 1px solid #F4F1EA; }
.tx-l2-name { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: #9A968F; display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.tx-l2-vol { font-size: 10.5px; color: #B0ABA1; font-variant-numeric: tabular-nums; letter-spacing: 0; text-transform: none; font-weight: 500; }
.tx-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.tx-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; border-radius: 7px; background: #F7F5F0; border: 1px solid #EDE9DF; font-size: 12px; color: #3A3833; }
.tx-chip-vol { font-size: 10.5px; font-weight: 600; color: #8A857A; background: #fff; border: 1px solid #E4DFD4; border-radius: 5px; padding: 0 5px; font-variant-numeric: tabular-nums; }

/* ============================================================
   Results & analytics (API_CONTRACT Addendum 1)
   ============================================================ */

/* ---- Hash-driven tab bar ---- */
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid #EDEAE3; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 10px 14px; font-size: 13px; font-weight: 500; color: #7A766F; white-space: nowrap; cursor: pointer; border: 0; background: transparent; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .12s, border-color .12s; }
.tab:hover { color: #1A1816; }
.tab.is-active { color: #1A1816; font-weight: 600; border-bottom-color: #DC2626; }

/* ---- Horizontal distribution bars ---- */
.hbar-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.hbar-label { width: 168px; flex-shrink: 0; font-size: 12.5px; color: #3A3833; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { flex: 1; min-width: 40px; height: 8px; border-radius: 999px; background: #F1EEE7; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.hbar-val { width: 96px; flex-shrink: 0; text-align: right; font-size: 12px; color: #3A3833; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .hbar-label { width: 120px; } .hbar-val { width: 76px; } }
/* Compact variant for narrow multi-column lists (People tab) */
.people-list .hbar-label { width: auto; flex: 1; min-width: 0; }
.people-list .hbar-track { flex: 0 0 52px; min-width: 52px; }
.people-list .hbar-val { width: 46px; }

/* ---- Compact mini-stat ---- */
.mini { background: #FBFAF7; border: 1px solid #EDEAE3; border-radius: 9px; padding: 11px 12px; }
.mini-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: #9A968F; }
.mini-value { font-size: 19px; font-weight: 600; color: #1A1816; font-variant-numeric: tabular-nums; margin-top: 2px; letter-spacing: -0.01em; line-height: 1.15; }
.mini-sub { font-size: 11px; color: #9A968F; margin-top: 1px; }

/* ---- Chart wrappers — fixed height, no infinite-growth canvas ---- */
.chart-wrap { position: relative; width: 100%; }
.chart-h-sm { height: 180px; }
.chart-h-md { height: 232px; }
.chart-h-lg { height: 300px; }

/* ---- Category chips ---- */
.cat-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; border-radius: 5px; background: #F4F1EA; color: #3A3833; font-size: 11px; font-weight: 500; white-space: nowrap; max-width: 100%; }
.cat-chip .cc-dot { width: 6px; height: 6px; border-radius: 2px; flex-shrink: 0; }
.cat-chip b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

/* ---- Slide-over thread reader ---- */
.slideover { position: fixed; inset: 0; z-index: 60; }
.slideover-backdrop { position: absolute; inset: 0; background: rgba(15,12,8,0.42); }
.slideover-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(660px, 100vw); background: #fff; border-left: 1px solid #E8E3D9; box-shadow: -16px 0 44px rgba(28,24,18,0.16); display: flex; flex-direction: column; }
.slideover-head { padding: 13px 18px; border-bottom: 1px solid #EDEAE3; flex-shrink: 0; }
.slideover-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.slideover-body::-webkit-scrollbar { width: 10px; }
.slideover-body::-webkit-scrollbar-thumb { background: #E0DBD0; border-radius: 5px; border: 3px solid #fff; }

/* ---- Thread messages ---- */
.msg { border: 1px solid #EDEAE3; border-radius: 9px; padding: 11px 13px; margin-bottom: 10px; background: #fff; }
.msg.is-owner { background: #FBFAF7; border-color: #E8E3D9; }
.msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.msg-avatar { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; color: #fff; font-size: 11px; font-weight: 600; }
.msg-from { font-size: 12.5px; font-weight: 600; color: #1A1816; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-date { font-size: 11px; color: #9A968F; margin-left: auto; flex-shrink: 0; }
.msg-body { font-size: 12.5px; color: #3A3833; line-height: 1.55; white-space: pre-wrap; word-break: break-word; font-family: inherit; }

/* ---- Enrich gradient panel ---- */
.enrich-panel { border: 1px solid #E6DFF3; border-radius: 11px; padding: 15px 16px; background: linear-gradient(135deg, #F6F3FF 0%, #F0F5FF 100%); }
.enrich-label { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #7C3AED; }
.enrich-ai-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: rgba(124,58,237,0.10); color: #7C3AED; font-size: 10.5px; font-weight: 600; }

/* ---- Spinner ---- */
.spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.spinner.dark { border-color: rgba(124,58,237,0.25); border-top-color: #7C3AED; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Faceted explorer layout ---- */
.conv-layout { display: flex; gap: 16px; align-items: flex-start; }
.conv-main { flex: 1; min-width: 0; }
.facet-panel { width: 268px; flex-shrink: 0; align-self: flex-start; position: sticky; top: 68px; max-height: calc(100vh - 84px); overflow-y: auto; background: #fff; border: 1px solid #EDEAE3; border-radius: 10px; }
.facet-panel::-webkit-scrollbar { width: 8px; }
.facet-panel::-webkit-scrollbar-thumb { background: #E5E0D5; border-radius: 4px; border: 2px solid #fff; }
.facet-mobile-toggle { display: none; }
@media (max-width: 900px) {
  .facet-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(330px, 92vw); z-index: 60; border-radius: 0; border: 0; border-left: 1px solid #E8E3D9; box-shadow: -16px 0 44px rgba(28,24,18,0.16); max-height: none; transform: translateX(100%); transition: transform .28s cubic-bezier(.22,.61,.36,1); }
  .facet-panel.is-open { transform: translateX(0); }
  .facet-mobile-toggle { display: inline-flex; }
}
.facet-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(15,12,8,0.42); }
@media (min-width: 901px) { .facet-backdrop { display: none; } }

/* ---- Facet sections (from HR OS filter drawer) ---- */
.fsec { padding: 4px 0 10px; }
.fsec + .fsec { border-top: 1px solid #EFEBE1; }
.fsec-head { width: 100%; display: flex; align-items: center; gap: 7px; padding: 9px 8px 7px; border: 0; background: transparent; cursor: pointer; font-size: 10.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: #7A766F; border-radius: 6px; text-align: left; }
.fsec-head:hover { color: #1A1816; }
.fsec-n { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: #DC2626; color: #fff; font-size: 10px; letter-spacing: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.fsec-chev { margin-left: auto; color: #B5B0A4; transition: transform .18s; flex-shrink: 0; }
.fsec.is-open .fsec-chev { transform: rotate(180deg); }
.fsec-body { padding: 1px 8px 0; }
.fs-list { display: flex; flex-direction: column; gap: 1px; max-height: 240px; overflow-y: auto; margin: 0 -4px; padding-right: 2px; }
.fs-list::-webkit-scrollbar { width: 8px; }
.fs-list::-webkit-scrollbar-thumb { background: #E5E0D5; border-radius: 4px; border: 2px solid #fff; }
.fs-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px; font-size: 12.5px; color: #3A3833; cursor: pointer; user-select: none; transition: background .1s; }
.fs-item:hover { background: #F1EDE3; }
.fs-item.is-active { color: #1A1816; }
.fs-item.is-active .fs-label { font-weight: 600; }
.fs-check { width: 15px; height: 15px; border: 1.5px solid #C9C4B9; border-radius: 4.5px; display: inline-flex; align-items: center; justify-content: center; background: #fff; flex-shrink: 0; transition: background .12s, border-color .12s; }
.fs-item.is-active .fs-check { background: #DC2626; border-color: #DC2626; }
.fs-check svg { display: none; color: #fff; }
.fs-item.is-active .fs-check svg { display: block; }
.fs-radio .fs-check { border-radius: 50%; }
.fs-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-count { font-size: 11px; color: #A39E92; font-variant-numeric: tabular-nums; }
.fs-item.is-active .fs-count { color: #DC2626; font-weight: 600; }
.fhead { display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 10px 0 16px; border-bottom: 1px solid #EDE9DF; flex-shrink: 0; }
.fhead-title { font-size: 13px; font-weight: 600; color: #1A1816; }
.fbtn { width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #8A8579; background: transparent; border: 0; cursor: pointer; transition: background .12s, color .12s; }
.fbtn:hover { background: #F0EDE4; color: #1A1816; }
.ffoot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid #EDE9DF; background: #FBFAF6; font-size: 12px; color: #7A766F; position: sticky; bottom: 0; }
.ffoot b { color: #1A1816; font-weight: 600; font-variant-numeric: tabular-nums; }
.ffoot-clear { margin-left: auto; border: 0; background: transparent; cursor: pointer; font-size: 11.5px; font-weight: 600; color: #DC2626; padding: 4px 8px; border-radius: 6px; }
.ffoot-clear:hover { background: rgba(220,38,38,0.07); }
.filter-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #DC2626; color: #fff; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- Pagination buttons (from HR OS) ---- */
.flist-page-btn { min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; font-size: 12.5px; color: #3A3833; border: 1px solid transparent; cursor: pointer; user-select: none; background: transparent; }
.flist-page-btn:hover:not([disabled]) { background: #F4F1EA; }
.flist-page-btn.is-current { background: #1A1816; color: #fff; }
.flist-page-btn[disabled] { color: #C5C0B6; cursor: not-allowed; }

/* ---- Facet date inputs ---- */
.fdate { width: 100%; height: 32px; padding: 0 9px; border: 1px solid #E2DDD2; border-radius: 7px; background: #fff; color: #1A1816; font-size: 12px; outline: none; }
.fdate:focus { border-color: #1A1816; box-shadow: 0 0 0 3px rgba(28,24,18,0.05); }

/* ============================================================
   Work-type proportional hierarchy (Work Types tab)
   L1 > L2 > L3 expandable rows; each bar's width encodes volume
   relative to the largest sibling at its level.
   ============================================================ */
.wt-tree { display: flex; flex-direction: column; gap: 14px; }
.wt-row { display: flex; align-items: center; gap: 12px; border-radius: 8px; text-decoration: none; }
.wt-l1 { padding: 8px 12px; cursor: pointer; user-select: none; }
.wt-l2 { padding: 5px 12px; border-radius: 6px; }
.wt-l2.has-l3 { cursor: pointer; }
.wt-l2.has-l3:hover { background: #F4F1EA; }
.wt-l3 { padding: 3px 12px; border-radius: 6px; cursor: pointer; }
.wt-l3:hover { background: #F4F1EA; }

.wt-chev { flex-shrink: 0; width: 14px; height: 14px; color: #B5B0A4; display: inline-flex; align-items: center; justify-content: center; transition: transform .18s ease; }
.wt-chev svg { width: 14px; height: 14px; }
.wt-chev.is-collapsed { transform: rotate(-90deg); }
.wt-chev.is-hidden { visibility: hidden; }

.wt-label { flex-shrink: 0; width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-l1 .wt-label { font-size: 13px; font-weight: 600; }
.wt-l2 .wt-label { font-size: 12px; color: #57534E; }
.wt-l3 .wt-label { font-size: 11px; color: #7A766F; width: 11rem; }

.wt-track { flex: 1; min-width: 40px; position: relative; border-radius: 999px; overflow: hidden; }
.wt-l1 .wt-track { height: 20px; }
.wt-l2 .wt-track { height: 14px; background: #F4F1EA; }
.wt-l3 .wt-track { height: 10px; background: #F4F1EA; }
.wt-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; transition: width .4s ease; }

.wt-cnt { flex-shrink: 0; width: 4rem; text-align: right; font-variant-numeric: tabular-nums; text-decoration: none; }
.wt-l1 .wt-cnt { font-size: 13px; font-weight: 700; }
.wt-l2 .wt-cnt { font-size: 12px; color: #9A968F; }
.wt-l3 .wt-cnt { font-size: 11px; color: #9A968F; }
a.wt-cnt:hover { text-decoration: underline; }

.wt-dot { flex-shrink: 0; width: 6px; height: 6px; border-radius: 999px; margin-left: 2px; }

/* Dim stat mini-columns (automated %, median reply, sent) — md+ only */
.wt-stats { flex-shrink: 0; display: none; gap: 8px; }
@media (min-width: 768px) { .wt-stats { display: flex; } }
.wt-stat { width: 4.25rem; text-align: right; font-size: 10.5px; color: #9A968F; font-variant-numeric: tabular-nums; }
/* Addendum 3 — "work done" sent column, dimmer + a touch wider for the label. */
.wt-stat-sent { width: 5rem; color: #B5B0A4; }

.wt-l2-wrap { margin-top: 6px; margin-left: 1rem; display: flex; flex-direction: column; gap: 2px; }
.wt-l3-wrap { margin-top: 2px; margin-left: 1.25rem; display: flex; flex-direction: column; gap: 1px; }

@media (max-width: 640px) {
  .wt-row { gap: 8px; }
  .wt-label { width: 7.5rem; }
  .wt-l3 .wt-label { width: 6.5rem; }
  .wt-cnt { width: 3.25rem; }
  .wt-l1, .wt-l2, .wt-l3 { padding-left: 8px; padding-right: 8px; }
}

/* ---- Shared category picker (Addendum 2) ---- */
.catpick-overlay { position: fixed; inset: 0; z-index: 120; }
.catpick { position: fixed; display: flex; flex-direction: column; max-height: min(440px, 82vh); padding: 0; overflow: hidden; }
.catpick-head { padding: 10px 10px 9px; border-bottom: 1px solid #EDEAE3; flex-shrink: 0; }
.catpick-title { font-size: 12.5px; font-weight: 600; color: #1A1816; }
.catpick-scope { font-size: 11px; color: #7A766F; margin-top: 2px; line-height: 1.45; }
.catpick-search { height: 32px; margin-top: 9px; font-size: 12.5px; }
.catpick-list { flex: 1 1 auto; overflow-y: auto; padding: 6px; min-height: 0; }
.catpick-list::-webkit-scrollbar { width: 8px; }
.catpick-list::-webkit-scrollbar-thumb { background: #E5E0D5; border-radius: 4px; border: 2px solid #fff; }
.catpick-l1 { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #9A968F; padding: 8px 8px 2px; }
.catpick-l2 { font-size: 10.5px; font-weight: 600; color: #7A766F; padding: 3px 8px 2px 14px; }
.catpick-item { justify-content: space-between; padding-left: 20px; }
.catpick-item.is-selected, .catpick-item.is-selected:hover { background: #FBE9E9; color: #B91C1C; }
.catpick-l3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catpick-current { font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #0F7A3C; background: #E7F3EC; border-radius: 4px; padding: 1px 5px; flex-shrink: 0; margin-left: 8px; }
.catpick-empty { padding: 18px; text-align: center; font-size: 12px; color: #9A968F; }
.catpick-foot { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-top: 1px solid #EDEAE3; background: #FBFAF6; flex-shrink: 0; }
.catpick-sel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #7A766F; }
.catpick-confirm { height: 30px; padding: 0 12px; font-size: 12px; flex-shrink: 0; }

/* ---- New Analysis: mailbox address + Browse button row ---- */
.mbx-input-row { display: flex; gap: 8px; align-items: stretch; }
.mbx-input-row .input { flex: 1 1 auto; min-width: 0; }
.mbx-browse-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mbx-browse-btn svg { color: #7A766F; }

/* ---- New Analysis: mailbox-discovery picker (modal sub-view) ---- */
.mbxpick-list { margin-top: 12px; max-height: min(340px, 52vh); overflow-y: auto; border: 1px solid #ECE7DC; border-radius: 9px; padding: 5px; }
.mbxpick-list::-webkit-scrollbar { width: 8px; }
.mbxpick-list::-webkit-scrollbar-thumb { background: #E5E0D5; border-radius: 4px; border: 2px solid #fff; }
.mbxpick-row {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 8px 10px; border-radius: 7px; background: transparent; border: 0; cursor: pointer;
}
.mbxpick-row:hover { background: #F6F3EC; }
.mbxpick-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.mbxpick-name { font-size: 13px; font-weight: 600; color: #1A1816; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbxpick-addr { font-size: 11.5px; color: #7A766F; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbxpick-row.is-disabled .mbxpick-name { color: #8A857A; }
.mbxpick-row.is-disabled .mbxpick-addr { color: #A8A399; }
.mbxpick-tag {
  flex-shrink: 0; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: #8A857A; background: #F1EEE7; border-radius: 4px; padding: 2px 6px;
}
.mbxpick-msg { padding: 22px 12px; text-align: center; font-size: 12.5px; color: #9A968F; line-height: 1.5; }
.mbxpick-msg.is-error { color: #A02323; }
.mbxpick-fix { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; color: #B91C1C; text-decoration: none; }
.mbxpick-fix:hover { text-decoration: underline; }
/* Loading skeleton rows */
.mbxpick-skel { display: flex; flex-direction: column; gap: 5px; padding: 9px 10px; }
.mbxpick-skel-a { height: 11px; width: 45%; border-radius: 4px; background: #EEEAE1; }
.mbxpick-skel-b { height: 10px; width: 65%; border-radius: 4px; background: #F2EFE8; }
.mbxpick-skel { animation: mbxpick-pulse 1.2s ease-in-out infinite; }
@keyframes mbxpick-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ---- Taxonomy per-L3 cluster affordance (Addendum 2) ---- */
.tx-l3-item { display: flex; flex-direction: column; gap: 6px; }
.tx-l3-item.is-open { flex-basis: 100%; width: 100%; }
.tx-chip.tx-chip-btn { cursor: pointer; }
.tx-chip.tx-chip-btn:hover { background: #F1ECE1; }
.tx-chip.tx-chip-btn.is-open { background: #EFE9FB; border-color: #E0D5F5; color: #4338CA; }
.tx-chip-caret { color: #B5B0A4; transition: transform .16s; flex-shrink: 0; }
.tx-chip.is-open .tx-chip-caret { transform: rotate(180deg); color: #7C3AED; }
.tx-clusters { width: 100%; margin-top: 2px; padding: 8px; background: #FBFAF6; border: 1px solid #EFEBE1; border-radius: 8px; display: flex; flex-direction: column; gap: 6px; }
.cl-chip { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #fff; border: 1px solid #ECE7DC; border-radius: 7px; }
.cl-count { font-size: 10.5px; font-weight: 600; color: #7A766F; background: #F4F1EA; border-radius: 5px; padding: 1px 6px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.cl-sample { flex: 1; min-width: 0; font-size: 11.5px; color: #3A3833; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-move { flex-shrink: 0; height: 24px; padding: 0 9px; font-size: 11px; }

/* ---- Taxonomy edit mode (Addendum 4): rename / move / merge ---- */
.btn-sm { padding: 5px 10px; font-size: 11.5px; }
.btn-xs { padding: 3px 9px; font-size: 11px; border-radius: 5px; }
.btn-disabled { opacity: 0.5; pointer-events: none; }

/* Per-row kebab (only visible in edit mode). Sits at the row end, after the
   stat columns, so proportional bars/tracks are never disturbed. */
.wt-kebab-wrap { position: relative; flex-shrink: 0; display: inline-flex; align-items: center; }
.wt-kebab {
  width: 22px; height: 22px; border-radius: 5px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #9A968F; cursor: pointer; border: 1px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.wt-kebab:hover { background: #F1ECE1; color: #3A3833; }
.wt-kebab svg { width: 15px; height: 15px; }

/* Anchored menu / rename popover, reuses .pop / .pop-item visuals. */
.wt-menu { position: absolute; right: 0; top: 100%; margin-top: 5px; z-index: 45; min-width: 158px; }
.wt-menu-items { display: flex; flex-direction: column; }
.wt-menu .pop-item svg { width: 14px; height: 14px; color: #9A968F; flex-shrink: 0; }
.wt-menu .pop-item.is-danger { color: #B91C1C; }
.wt-menu .pop-item.is-danger svg { color: #DC2626; }
.wt-rename-panel { display: flex; flex-direction: column; gap: 8px; padding: 4px; width: 224px; }
.wt-rename-panel .input { height: 32px; font-size: 12.5px; }
.wt-rename-hint { font-size: 11px; color: #7A766F; line-height: 1.4; }
.wt-rename-actions { display: flex; justify-content: flex-end; gap: 6px; }

/* Centered modal shell for the move picker + merge confirmation. */
.wt-modal-overlay { position: fixed; inset: 0; z-index: 130; background: rgba(26,24,22,0.28); display: flex; align-items: center; justify-content: center; padding: 16px; }
.wt-move-panel { display: flex; flex-direction: column; width: 340px; max-width: calc(100vw - 32px); max-height: min(460px, 82vh); padding: 0; overflow: hidden; }
.wt-move-panel .catpick-list { padding: 6px; }
.wt-confirm { width: 340px; max-width: calc(100vw - 32px); padding: 18px; }
.wt-confirm-msg { font-size: 13px; color: #1A1816; line-height: 1.55; }
.wt-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ---- Taxonomy edit-at-the-gate (Addendum 4 ported to the approval gate) ----
   Reuses .wt-kebab / .wt-menu / .wt-rename-panel / .wt-move-panel / .wt-confirm.
   These rules only re-home the affordances inside the taxonomy L1 cards. */
.tx-card.is-editable { overflow: visible; }               /* let anchored menus escape the card */
.tx-card.is-editable .tx-head { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.tx-head .wt-kebab-wrap { margin-left: 6px; }
.tx-l2-name .wt-kebab-wrap { margin-left: auto; }
.tx-l3-head { display: inline-flex; align-items: center; gap: 2px; }
.tx-l3-head .wt-kebab { width: 22px; height: 22px; }
.tx-l3-head .wt-kebab svg { width: 13px; height: 13px; }
/* Guidance line under the Approve/Reject card while a draft is at the gate. */
.tx-guidance { display: flex; align-items: flex-start; gap: 8px; margin-top: 11px; padding: 9px 11px; background: #FBFAF6; border: 1px solid #EFEBE1; border-radius: 8px; font-size: 12px; color: #6A665E; line-height: 1.5; }
.tx-guidance svg { width: 15px; height: 15px; color: #B5B0A4; flex-shrink: 0; margin-top: 1px; }
/* Sticky repeat of Approve/Reject so they stay reachable on a long/mobile tree. */
.tx-approve-bar { position: sticky; bottom: 12px; z-index: 40; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding: 11px 14px; background: rgba(255,255,255,0.94); backdrop-filter: blur(6px); border: 1px solid #E8E3D9; border-radius: 12px; box-shadow: 0 6px 20px rgba(28,24,18,0.10); }
.tx-approve-bar-text { flex: 1; min-width: 160px; font-size: 12px; color: #7A766F; line-height: 1.45; }
.tx-approve-bar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ============================================================
   Addendum 5 — Operational metrics batch
   ============================================================ */

/* ---- Global period control (mailbox header, all tabs) ---- */
.period-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 9px 12px; background: #fff; border: 1px solid #E8E3D9; border-radius: 10px; box-shadow: 0 1px 2px rgba(28,24,18,0.04); }
.period-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: #9A968F; display: inline-flex; align-items: center; gap: 6px; }
.period-label svg { width: 14px; height: 14px; color: #B5B0A4; }
.period-custom { display: inline-flex; align-items: center; gap: 6px; }
.period-custom .fdate { width: 148px; height: 32px; }
.period-dash { color: #B5B0A4; }
.period-summary { font-size: 11.5px; color: #7A766F; margin-left: auto; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .period-custom { width: 100%; }
  .period-custom .fdate { flex: 1 1 0; width: auto; min-width: 0; }
  .period-summary { margin-left: 0; width: 100%; }
}

/* ---- KPI card as a link + accent state (awaiting reply > 0) ---- */
a.stat { text-decoration: none; transition: border-color .12s, box-shadow .12s, transform .12s; }
a.stat:hover { border-color: #DDD8CE; box-shadow: 0 6px 18px -8px rgba(28,24,18,0.16); transform: translateY(-1px); }
.stat.is-accent { border-color: #F1C7C7; background: linear-gradient(135deg, #FEF4F4 0%, #FFF 60%); }
.stat.is-accent .stat-value { color: #B91C1C; }
.stat.is-accent .stat-label { color: #C05252; }

/* ---- Hour x weekday heatmap (Performance) ---- */
.heatmap-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.heatmap-scroll::-webkit-scrollbar { height: 8px; }
.heatmap-scroll::-webkit-scrollbar-thumb { background: #E0DBD0; border-radius: 4px; border: 2px solid #fff; }
.heatmap-table { border-collapse: separate; border-spacing: 2px; }
.heatmap-table th { font-size: 9.5px; font-weight: 600; color: #9A968F; font-variant-numeric: tabular-nums; padding: 0 0 3px; text-align: center; }
.heatmap-table th.hm-corner, .heatmap-table td.hm-daylabel { position: sticky; left: 0; z-index: 1; background: #fff; }
.heatmap-table td.hm-daylabel { font-size: 10.5px; font-weight: 600; color: #7A766F; text-align: right; padding-right: 7px; white-space: nowrap; }
.hm-cell { width: 20px; height: 20px; min-width: 20px; border-radius: 3px; display: block; text-decoration: none; transition: outline .1s; outline: 1px solid transparent; }
.hm-cell:hover { outline: 1.5px solid #1A1816; }
.heatmap-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: #9A968F; }
.heatmap-legend .hm-ramp { display: inline-flex; gap: 2px; }
.heatmap-legend .hm-ramp span { width: 14px; height: 12px; border-radius: 2px; }

/* ---- Signal tier KPI cards + tier composition bars ---- */
.tier-card { display: block; text-decoration: none; }
.tiers-l1-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.tiers-l1-label { width: 168px; flex-shrink: 0; font-size: 12.5px; color: #3A3833; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tiers-l1-track { flex: 1; min-width: 60px; height: 14px; border-radius: 4px; overflow: hidden; display: flex; background: #F1EEE7; }
.tiers-seg { height: 100%; transition: width .4s ease; }
.tiers-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.tiers-legend .tl-key { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #3A3833; }
.tiers-legend .tl-sw { width: 10px; height: 10px; border-radius: 2px; }
@media (max-width: 640px) { .tiers-l1-label { width: 108px; } }

/* ---- People: participant bars + split proportion bar ---- */
.split-bar { display: flex; height: 16px; border-radius: 5px; overflow: hidden; background: #F1EEE7; }
.split-seg { height: 100%; transition: width .4s ease; }
.split-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.split-legend .sl-key { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #3A3833; }
.split-legend .sl-sw { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.ppl-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; text-decoration: none; border-bottom: 1px solid #F4F1EA; }
.ppl-row:last-child { border-bottom: 0; }
.ppl-row:hover { background: #FCFBF7; }
.ppl-name { min-width: 0; flex: 1; }
.ppl-name .pn-primary { font-size: 12.5px; color: #1A1816; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppl-name .pn-sub { font-size: 11px; color: #9A968F; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppl-track { flex: 0 0 90px; height: 8px; border-radius: 999px; background: #F1EEE7; overflow: hidden; }
.ppl-fill { height: 100%; border-radius: 999px; }
.ppl-val { flex: 0 0 auto; text-align: right; font-size: 12px; color: #3A3833; font-variant-numeric: tabular-nums; min-width: 40px; }
.ppl-tag { font-size: 9.5px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; border-radius: 4px; padding: 1px 5px; flex-shrink: 0; }
.ppl-tag.is-internal { background: #EDEBE6; color: #57534E; }
.ppl-tag.is-external { background: #FBE9E9; color: #B91C1C; }
@media (max-width: 640px) { .ppl-track { flex-basis: 52px; } }

/* ---- Conversations: active-filter chips ---- */
.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 10px; border-radius: 999px; background: #F4F1EA; border: 1px solid #E4DFD4; font-size: 11.5px; color: #3A3833; }
.fchip b { font-weight: 600; color: #1A1816; }
.fchip-x { width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #8A8579; cursor: pointer; border: 0; background: transparent; flex-shrink: 0; }
.fchip-x:hover { background: #E4DFD4; color: #1A1816; }
.fchip-x svg { width: 10px; height: 10px; }
.fchip-clear { border: 0; background: transparent; color: #DC2626; font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 3px 8px; border-radius: 999px; }
.fchip-clear:hover { background: rgba(220,38,38,0.07); }

/* ---- Thread reader: visual timeline ---- */
.thread-timeline { position: relative; margin: 4px 0 18px; padding: 22px 8px 6px; }
.tl-track { position: relative; height: 2px; background: #EDEAE3; border-radius: 999px; }
.tl-msg-dot { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid #fff; box-shadow: 0 0 0 1px #E0DBD0; cursor: pointer; padding: 0; transition: transform .12s; }
.tl-msg-dot:hover { transform: translate(-50%, -50%) scale(1.28); z-index: 3; }
.tl-msg-dot.is-outbound { background: #DC2626; box-shadow: 0 0 0 1px #DC2626; }
.tl-msg-dot.is-inbound { background: #7A766F; box-shadow: 0 0 0 1px #7A766F; }
.tl-msg-dot.is-first { width: 15px; height: 15px; z-index: 2; }
.tl-gap { position: absolute; top: -2px; transform: translateX(-50%); font-size: 9.5px; font-weight: 600; color: #B0ABA1; background: #fff; padding: 0 4px; white-space: nowrap; }
.tl-gap::after { content: ""; position: absolute; left: 50%; top: 15px; width: 1px; height: 8px; background: #E0DBD0; }
.thread-tl-legend { display: flex; gap: 14px; margin-top: 10px; font-size: 10.5px; color: #9A968F; }
.thread-tl-legend .ttl-key { display: inline-flex; align-items: center; gap: 5px; }
.thread-tl-legend .ttl-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ---- Thread message extras (folder / attachment / importance / unread) ---- */
.msg-flags { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; flex-shrink: 0; }
.msg-folder { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 600; color: #7A766F; background: #F1EEE7; border-radius: 4px; padding: 1px 5px; }
.msg-folder svg { width: 10px; height: 10px; }
.msg-clip { color: #9A968F; display: inline-flex; }
.msg-clip svg { width: 13px; height: 13px; }
.msg-flag { color: #DC2626; display: inline-flex; }
.msg-flag svg { width: 12px; height: 12px; }
.msg-flag.is-low { color: #B0ABA1; }
.msg-unread { width: 8px; height: 8px; border-radius: 50%; background: #1D6FB8; flex-shrink: 0; box-shadow: 0 0 0 2px #E3EEF7; }
.msg.is-unread { border-color: #CFE0F0; }
.msg-scroll-flash { animation: msg-flash 1.1s ease; }
@keyframes msg-flash { 0%, 40% { box-shadow: 0 0 0 2px rgba(220,38,38,0.45); } 100% { box-shadow: 0 0 0 2px rgba(220,38,38,0); } }

/* ---- Overview summary dashboard (additions) ---- */
/* Bug fix: .hbar-fill / .ppl-fill are inline spans by default, so width/height
   are ignored and the proportional coloured fill collapses to 0x0 (only the grey
   track shows). Blockify them so the fill paints, matching the .wt-fill idiom. */
.hbar-fill { display: block; }
.ppl-fill { display: block; }

/* "View details ->" card-header links */
.card-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: #B91C1C; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.card-link:hover { text-decoration: underline; }
.card-link svg { width: 13px; height: 13px; }

/* Compact tier-composition rows (Overview summary reuse of the Signal markup) */
.tiers-compact .tiers-l1-row { padding: 3px 0; gap: 9px; }
.tiers-compact .tiers-l1-label { width: 132px; font-size: 12px; }
.tiers-compact .tiers-l1-track { height: 11px; }
@media (max-width: 640px) { .tiers-compact .tiers-l1-label { width: 96px; font-size: 11.5px; } }

/* Overview tier mini-boxes (clickable) */
.ov-tier { display: block; text-decoration: none; transition: border-color .12s, background .12s; }
.ov-tier:hover { border-color: #D8D2C6; background: #fff; }
.ov-tier .mini-label { display: flex; align-items: center; gap: 6px; }

/* ============================================================
   Addendum 6 — Deletion (runs + mailboxes)
   ============================================================ */

/* Per-row / per-card overflow (kebab) affordance + anchored menu.
   Reuses the .pop / .pop-item popover visuals. */
.kebab-wrap { position: relative; display: inline-flex; align-items: center; }
.kebab-btn {
  width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #9A968F; cursor: pointer; border: 1px solid transparent; background: transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.kebab-btn:hover { background: #F1ECE1; color: #3A3833; }
.kebab-btn svg { width: 16px; height: 16px; }
.kebab-menu { position: absolute; right: 0; top: 100%; margin-top: 5px; z-index: 45; min-width: 170px; }
.kebab-menu .pop-item svg { width: 15px; height: 15px; color: #9A968F; flex-shrink: 0; }
.pop-item.is-danger { color: #B91C1C; }
.pop-item.is-danger:hover { background: #FBE9E9; }
.pop-item.is-danger svg { color: #DC2626; }

/* Mailbox-card kebab sits at the card's top-right without disturbing the link. */
.mbx-card { position: relative; }
.mbx-kebab { flex-shrink: 0; }
.mbx-kebab .kebab-menu { min-width: 176px; }

/* Danger-confirmation modal callout + inline error (reuses .modal-* shell). */
.del-warn { display: flex; gap: 11px; align-items: flex-start; padding: 12px 13px; border-radius: 10px; background: #FBFAF7; border: 1px solid #EDEAE3; }
.del-warn.is-danger { background: #FFF6F3; border-color: #F0D2C8; }
.del-warn-icon { flex-shrink: 0; color: #8A857A; margin-top: 1px; }
.del-warn.is-danger .del-warn-icon { color: #A02323; }
.del-warn-title { font-size: 13px; font-weight: 600; color: #1A1816; }
.del-warn-text { font-size: 12.5px; color: #57534E; line-height: 1.5; margin-top: 3px; }
.del-warn-text b { color: #1A1816; font-weight: 600; }
.del-confirm-label { font-size: 12px; color: #57534E; margin: 16px 0 7px; line-height: 1.5; }
.del-confirm-label b { color: #1A1816; font-weight: 600; word-break: break-all; }
.del-error { font-size: 12px; color: #A02323; margin-top: 12px; background: #FFF6F3; border: 1px solid #F0D2C8; border-radius: 8px; padding: 9px 11px; line-height: 1.45; }

/* Mobile: modal action buttons meet the 44px touch target (375px-safe). */
@media (max-width: 767px) {
  .modal-foot .btn { min-height: 44px; }
  .modal-foot { flex-wrap: wrap; }
}

/* ============================================================
   Taxonomy drag-and-drop editing (desktop >=1024px, draft only)
   Pointer-event engine — not native HTML5 DnD. See setupTaxonomyDnd().
   Grips/highlights/clone are additive: the kebab menus remain the
   universal (and only mobile / a11y) editing path.
   ============================================================ */

/* Drag grip — six-dot handle, absolutely positioned at the row start so flex
   gap never reserves space for it. Revealed (and made interactive) on row hover
   in draft mode; the row makes room via an animated padding-left. */
.tx-l3-head, .tx-l2-name, .cl-chip { position: relative; transition: padding-left .12s ease; }
.tx-grip {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 15px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  color: #C0BBB0; cursor: grab; opacity: 0; pointer-events: none;
  transition: opacity .12s ease; touch-action: none; -webkit-user-select: none; user-select: none;
}
.tx-grip svg { width: 13px; height: 13px; }
.cl-chip > .tx-grip { left: 6px; }
.tx-l3-head:hover { padding-left: 16px; }
.tx-l2-name:hover { padding-left: 16px; }
.cl-chip:hover { padding-left: 23px; }
.tx-l3-head:hover > .tx-grip,
.tx-l2-name:hover > .tx-grip,
.cl-chip:hover > .tx-grip { opacity: 1; pointer-events: auto; }
.tx-grip:hover { color: #8A857A; }
.tx-grip:active { cursor: grabbing; }
/* Below the desktop breakpoint: no grips at all — mobile keeps kebabs only. */
@media (max-width: 1023px) {
  .tx-grip { display: none !important; }
  .tx-l3-head:hover, .tx-l2-name:hover, .cl-chip:hover { padding-left: initial; }
}

/* Force the grabbing cursor everywhere while a drag is in flight. */
body.tx-dragging, body.tx-dragging * { cursor: grabbing !important; }
body.tx-dragging { -webkit-user-select: none; user-select: none; }

/* Lifted clone that tracks the pointer (position:fixed + transform only). */
.tx-drag-clone {
  position: fixed; top: 0; left: 0; z-index: 200; margin: 0; pointer-events: none;
  will-change: transform; opacity: 0.97; background: #fff; border-radius: 9px; padding: 4px 6px;
  box-shadow: 0 16px 38px -10px rgba(28,24,18,0.45), 0 0 0 1px rgba(28,24,18,0.07);
}
.tx-drag-clone .tx-chip { background: #fff; }
/* Original dims to 40% while its clone is airborne. */
.tx-drag-source { opacity: 0.4 !important; }

/* Live drop-target affordances. */
.tx-drop-move   { outline: 2px solid #DC2626; outline-offset: -2px; background: rgba(220,38,38,0.06) !important; border-radius: 8px; }
.tx-drop-merge  { outline: 2px dashed #DC2626; outline-offset: -2px; background: rgba(220,38,38,0.05) !important; border-radius: 8px; }
/* Current parent — shown, but inert (cannot drop onto where it already lives). */
.tx-drop-current { outline: 1.5px dashed #C9C4B9; outline-offset: -2px; opacity: 0.65; border-radius: 8px; }

/* Floating "merge into …" hint chip that trails the pointer. */
.tx-hint-chip {
  position: fixed; top: 0; left: 0; z-index: 210; pointer-events: none; will-change: transform;
  background: #B91C1C; color: #fff; font-size: 11px; font-weight: 600; line-height: 1;
  padding: 5px 8px; border-radius: 6px; box-shadow: 0 6px 18px rgba(28,24,18,0.28);
  white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis;
}

/* Post-drop flash — a ~1s background/ring pulse on the node's new location. */
@keyframes tx-flash-pulse {
  0%   { box-shadow: 0 0 0 3px rgba(220,38,38,0.0); background: rgba(220,38,38,0.18); }
  18%  { box-shadow: 0 0 0 3px rgba(220,38,38,0.55); }
  100% { box-shadow: 0 0 0 3px rgba(220,38,38,0.0); background: transparent; }
}
.tx-flash { animation: tx-flash-pulse 1s ease; border-radius: 8px; }

/* Desktop-only DnD tip line, sits under the guidance text. */
.tx-tip-dnd { display: none; }
.tx-tip-dnd .tx-tip-grip { width: 12px; height: 12px; vertical-align: -2px; color: #B5B0A4; }
@media (min-width: 1024px) {
  .tx-tip-dnd { display: block; margin-top: 6px; color: #8A857A; font-weight: 500; }
}


/* ============================================================
   SECTION 2 — HR OS-only components
   (quick search, expandable sub-nav, org chart, faceted drawer,
    popover menus, filter pills, group bars, mobile list cards)
   Kept because the HR OS template pages still use them; the app
   trimmed them from its own stylesheet.
   ============================================================ */

/* ---- Expandable parent nav items (<button> variant) ---- */
/* Expandable parents (Mailboxes, Org, Activity, Settings) are <button>s — must
   match the <a> nav-links exactly. Inherit only the font-FAMILY; a bare
   `font: inherit` shorthand would also reset font-size/weight to the inherited
   16px/400, making the expandable items render larger than the plain links. */
button.nav-link {
  width: 100%;
  border: 0; background: transparent;
  font-family: inherit; text-align: left;
  cursor: pointer;
}
button.nav-link:hover { background: #F4F1EA; }

/* ---- Nav sub-items (auto-expanded under the active parent) ----
   Indented past the parent icon with a hairline tree rail; the active
   sub-item gets a red tick on the rail. */
.nav-group-chevron { margin-left: auto; color: #9A968F; transition: transform .15s; }
.nav-group-chevron.is-open { transform: rotate(180deg); }
.nav-subwrap { position: relative; margin: 1px 0 3px; }
.nav-subwrap::before {
  content: '';
  position: absolute; left: 19px; top: 3px; bottom: 3px;
  width: 1px; background: #E7E2D8;
}
.nav-sublink {
  display: flex; align-items: center;
  position: relative;
  padding: 6px 10px 6px 34px;       /* indent past the parent icon */
  border-radius: 7px;
  font-size: 12.5px; font-weight: 500;
  color: #6B6862; text-decoration: none;
  transition: background .12s, color .12s;
}
.nav-sublink:hover { background: #F4F1EA; color: #1A1816; }
.nav-sublink.is-active { background: #F4F1EA; color: #1A1816; font-weight: 600; }
.nav-sublink.is-active::before {
  content: '';
  position: absolute; left: 19px; top: 6px; bottom: 6px;
  width: 2px; border-radius: 1px;
  background: #DC2626;
}

/* ---- Sidebar quick search (Ctrl+K) ---- */
.qs { position: relative; padding: 0 12px 6px; }
.qs-box {
  display: flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 7px 0 10px;
  border: 1px solid #E7E2D8; border-radius: 8px;
  background: #FBFAF7;
  cursor: text;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.qs-box:focus-within {
  background: #fff; border-color: #1A1816;
  box-shadow: 0 0 0 3px rgba(28,24,18,0.05);
}
.qs-box > svg { color: #ABA699; flex-shrink: 0; }
.qs-box input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font-size: 12.5px; color: #1A1816;
}
.qs-kbd {
  font-size: 10px; color: #9A968F;
  border: 1px solid #E7E2D8; border-radius: 4px;
  padding: 1px 5px; background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}
.qs-pop {
  position: absolute; left: 12px; right: 12px; top: calc(100% + 2px);
  z-index: 60;
  background: #fff;
  border: 1px solid #E7E2D8; border-radius: 10px;
  box-shadow: 0 16px 40px rgba(28,24,18,0.14), 0 2px 8px rgba(28,24,18,0.06);
  padding: 4px;
  max-height: 332px; overflow-y: auto;
}
.qs-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 7px;
  cursor: pointer;
}
.qs-item:hover, .qs-item.is-hot { background: #F4F1EA; }
.qs-av {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 600; color: #1A1816;
  flex-shrink: 0;
}
.qs-name { font-size: 12.5px; font-weight: 500; color: #1A1816; line-height: 1.2; }
.qs-sub { font-size: 11px; color: #9A968F; line-height: 1.2; margin-top: 1px; }
.qs-empty { padding: 10px 12px; font-size: 12px; color: #9A968F; }

/* ---- Filter pill button ---- */
.f-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 6px;
  background: #fff; border: 1px solid #E4DFD4;
  font-size: 12.5px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.f-pill:hover { background: #FBFAF7; }
.f-pill.is-active { background: #F4F1EA; border-color: #DDD8CE; }
.f-pill .f-label { color: #7A766F; font-weight: 500; }
.f-pill .f-value { color: #3A3833; font-weight: 500; }
.f-pill.is-active .f-value { color: #1A1816; font-weight: 600; }

/* ---- Popover menu ---- */
.menu {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #EDEAE3;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
  padding: 4px;
  min-width: 180px;
}
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 12.5px;
  color: #1A1816;
  cursor: pointer;
  text-decoration: none;
}
.menu-item:hover { background: #F4F1EA; }
.menu-item.danger { color: #A02323; }
.menu-divider { height: 1px; background: #EDEAE3; margin: 4px 2px; }

/* ---- Group bar (list grouping) ---- */
.group-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 8px;
  font-size: 12px; color: #1A1816;
  background: #FBFAF7;
  border-bottom: 1px solid #EDEAE3;
  cursor: pointer;
  user-select: none;
}
.group-bar .chev {
  transition: transform .15s;
  color: #7A766F;
  display: inline-flex;
}
.group-bar.is-open .chev { transform: rotate(90deg); }
.group-name { font-weight: 600; }
.group-count { font-size: 11px; color: #7A766F; font-weight: 500; }

/* ---- Sidebar section header ---- */
/* Small uppercase muted label above a group of nav items (e.g. "TOOLS").
   Mirrors the look of .settings-nav-section on the Settings page. */
.nav-section {
  font-size: 10.5px;
  font-weight: 600;
  color: #9A968F;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 12px 4px;
}

/* ============================================================
   Org chart (org.html + org-company.html + org-leadership.html).
   Moved out of org.html's inline <style> 2026-06-14 so the three
   Org sub-pages share one stylesheet. Engine: d3-org-chart.
   ============================================================ */

/* ---- Org canvas ----
   Styled as a `.page-card` directly on the chart container — d3-org-chart
   sizes its <svg> off this element's clientWidth/Height, so the container
   must keep its layout role (no wrapper div). */
.org-canvas {
  position: relative;
  width: 100%;
  height: calc(100vh - 196px);
  min-height: 420px;
  border: 1px solid #E8E3D9;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(28,24,18,0.04), 0 12px 32px -20px rgba(28,24,18,0.10);
  background-image: radial-gradient(#E6E2D9 1px, transparent 1px);
  background-size: 22px 22px;
  overflow: hidden;
}
.org-canvas > .svg-chart-container { width: 100% !important; height: 100% !important; }

/* ---- Node card (compact, Airwallex density) ---- */
.org-node {
  position: relative;
  display: flex;
  height: 100%;
  background: #fff;
  border: 1px solid #EDEAE3;
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.02);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .12s, border-color .12s, transform .12s;
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
}
.org-node:hover { border-color: #D6D2C8; box-shadow: 0 6px 18px rgba(0,0,0,0.08); transform: translateY(-1px); }
.org-node.is-hot { border-color: #DC2626; box-shadow: 0 0 0 1px #DC2626, 0 8px 22px rgba(220,38,38,0.16); }

.org-accent { width: 4px; flex-shrink: 0; }
.org-node-inner { flex: 1; min-width: 0; padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; gap: 7px; }

.org-node-top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.org-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  font-size: 11px; font-weight: 600; color: #1A1816;
}
.org-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.org-name { font-size: 13px; font-weight: 600; color: #1A1816; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-title { font-size: 11px; color: #7A766F; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.org-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Foreign-company badge — shown in the per-company view on a manager who
   belongs to a different company but connects this company's reporting line
   (e.g. a parent-company exec above a subsidiary's staff). */
.org-foreign {
  display: inline-flex; align-items: center; gap: 3px;
  margin-top: 3px; align-self: flex-start;
  padding: 1px 6px; border-radius: 5px;
  background: #FBF3E6; color: #8A5A00; border: 1px solid #F0E2C8;
  font-size: 10px; font-weight: 600; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

/* Profile link in the card's top-right */
.org-open {
  display: grid; place-items: center; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 6px;
  color: #9A968F; background: transparent; text-decoration: none;
  transition: background .1s, color .1s;
}
.org-open:hover { background: #F4F1EA; color: #DC2626; }

.org-reports { display: flex; align-items: center; gap: 6px; }
.org-chip {
  display: inline-flex; align-items: center;
  font-size: 10.5px; font-weight: 600; line-height: 1;
  padding: 3px 7px; border-radius: 5px;
  background: #F4F1EA; color: #3A3833;
  font-variant-numeric: tabular-nums;
}
.org-chip.ghost { background: transparent; color: #9A968F; padding-left: 0; font-weight: 500; }
.org-leaf { font-size: 10.5px; color: #B7B2A8; font-weight: 500; }

/* ---- Synthetic root node (company name, "Acme Group", "Leadership") ---- */
.org-node.org-company { background: #1A1816; border-color: #1A1816; cursor: default; }
.org-node.org-company:hover { transform: none; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.org-company .org-node-inner { flex-direction: row; align-items: center; gap: 11px; padding: 12px 16px; }
.org-company-logo { width: 34px; height: 34px; border-radius: 50%; background: #DC2626; color: #fff; font-weight: 700; font-size: 15px; display: grid; place-items: center; flex-shrink: 0; }
.org-company-name { font-size: 14px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.org-company-sub { font-size: 11px; color: #B7B2A8; margin-top: 1px; }

/* ---- Expand / collapse button (d3-org-chart buttonContent) ---- */
.org-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 11px;
  background: #fff; border: 1px solid #DDD8CE;
  font-size: 11px; font-weight: 600; color: #3A3833;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  font-variant-numeric: tabular-nums;
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
}
.org-btn svg { transition: transform .15s; }
.org-btn.is-open { background: #1A1816; border-color: #1A1816; color: #fff; }
.org-btn.is-open svg { transform: rotate(180deg); }

/* ---- Toolbar ---- */
.org-tool {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 11px; border-radius: 7px;
  border: 1px solid #EDEAE3; background: #fff; color: #3A3833;
  font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background .1s, border-color .1s;
}
.org-tool:hover { background: #F4F1EA; border-color: #DDD8CE; }
.org-search { height: 34px; }

/* Checkbox indicator inside the "Show disabled" toggle */
.org-toolcheck {
  width: 14px; height: 14px; flex-shrink: 0;
  border: 1.5px solid #C5C0B6; border-radius: 3.5px;
  display: inline-block; position: relative;
  transition: background .1s, border-color .1s;
}
.org-toolcheck.is-on { background: #DC2626; border-color: #DC2626; }
.org-toolcheck.is-on::after {
  content: ""; position: absolute; left: 4px; top: 1px;
  width: 3px; height: 6.5px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.org-legend-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #7A766F; }
.org-legend-dot { width: 9px; height: 9px; border-radius: 2.5px; flex-shrink: 0; }

/* ---- Company switcher tabs (per-company view only) ---- */
.org-tab {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid #EDEAE3; background: #fff; color: #3A3833;
  font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background .1s, border-color .1s, color .1s;
}
.org-tab:hover { background: #F4F1EA; border-color: #DDD8CE; }
.org-tab.is-active { background: #1A1816; border-color: #1A1816; color: #fff; }
.org-tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: #F4F1EA; color: #7A766F;
  font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.org-tab.is-active .org-tab-count { background: rgba(255,255,255,0.16); color: #fff; }

/* ---- Mobile list cards (People + Mailboxes lists, below md:) ----
   Shared so list pages render as cards on small screens instead of a clipped
   desktop table. Title is the hero; secondary fields are full-width labelled
   lines (.p-card-field + .p-card-k). */
.p-card {
  display: block;
  background: #fff;
  border: 1px solid #EDEAE3;
  border-radius: 8px;
  padding: 12px 14px;
  text-decoration: none;
  color: #3A3833;
  transition: background .08s, border-color .08s;
}
.p-card:hover { background: #FCFBF7; border-color: #DDD8CE; }
.p-card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.p-card-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #1A1816;
  flex-shrink: 0;
}
.p-card-name { font-size: 15px; font-weight: 600; color: #1A1816; line-height: 1.2; }
.p-card-email { font-size: 12px; color: #7A766F; margin-top: 2px; word-break: break-all; }
.p-card-meta { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.p-card-title-main { font-size: 14px; font-weight: 600; color: #1A1816; line-height: 1.25; }
.p-card-title-sub  { font-size: 12px; color: #7A766F; line-height: 1.3; margin-top: 1px; }
.p-card-field { font-size: 12.5px; color: #3A3833; line-height: 1.35; }
.p-card-k {
  color: #9A968F; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
  font-weight: 600; margin-right: 7px;
}
.p-card-offshore {
  display: inline-block; margin-left: 7px; padding: 0 6px; border-radius: 4px;
  background: #FBF3E6; color: #8A5A00; font-size: 10px; font-weight: 600;
}

/* ---- Faceted list: docked/resizable filter DRAWER (HR OS Mailboxes pages) ----
   The shared .fsec / .fs-* / .fhead / .fbtn / .ffoot facet primitives live in
   Section 1 (Mailbox Analytics reuses them); these add the sliding drawer shell,
   resize grip, chip tray and section entrance animation on top of them. */
.flist-main { transition: margin-right .32s cubic-bezier(.22,.61,.36,1); }
@media (min-width: 768px) {
  .flist-wrap.is-docked .flist-main { margin-right: var(--fw, 320px); }
}
.flist-wrap.is-resizing { user-select: none; cursor: col-resize; }
.flist-wrap.is-resizing .flist-main,
.flist-wrap.is-resizing .fpanel { transition: none !important; }

.fpanel {
  position: fixed; top: 52px; right: 0; bottom: 0;
  width: min(var(--fw, 320px), calc(100vw - 24px));
  z-index: 40; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #FCFBF8 0%, #F8F6F0 100%);
  border-left: 1px solid #E7E2D8; box-shadow: -12px 0 32px rgba(28,24,18,0.07);
  transform: translateX(0); visibility: visible;
  transition: transform .32s cubic-bezier(.22,.61,.36,1), box-shadow .32s ease, border-radius .32s ease, top .32s ease, bottom .32s ease, right .32s ease, visibility 0s 0s;
}
.fpanel.is-closed { transform: translateX(calc(100% + 32px)); visibility: hidden; transition: transform .26s cubic-bezier(.45,.03,.65,.12), visibility 0s .26s; }
@media (min-width: 768px) {
  .fpanel.is-pinned { box-shadow: none; }
  .fpanel:not(.is-pinned) { top: 62px; right: 10px; bottom: 10px; border: 1px solid #E7E2D8; border-radius: 14px; box-shadow: 0 28px 64px rgba(28,24,18,0.16), 0 6px 20px rgba(28,24,18,0.07); overflow: hidden; }
}
.fgrip { position: absolute; left: -3px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 2; display: none; touch-action: none; }
@media (min-width: 768px) { .fgrip { display: block; } }
.fgrip::after { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 2px; background: transparent; transition: background .15s; }
.fgrip:hover::after, .flist-wrap.is-resizing .fgrip::after { background: #DC2626; }

.fbtn.is-on { color: #DC2626; background: rgba(220,38,38,0.08); }
.fbody { flex: 1; overflow-y: auto; padding: 4px 10px 16px; overscroll-behavior: contain; }
.fbody::-webkit-scrollbar { width: 10px; }
.fbody::-webkit-scrollbar-thumb { background: #E0DBD0; border-radius: 5px; border: 3px solid #F8F6F0; }

.fchips { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 18px 12px; border-bottom: 1px solid #EDE9DF; flex-shrink: 0; max-height: 132px; overflow-y: auto; }
.fchip .fchip-k { color: #9A968F; font-weight: 500; }
.fchip b { font-weight: 600; color: #1A1816; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip button { width: 15px; height: 15px; border-radius: 4px; border: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: #B5B0A4; cursor: pointer; transition: background .1s, color .1s; }
.fchip button:hover { background: #FBEAEA; color: #DC2626; }

.fsearch { position: relative; margin: 2px 0 7px; }
.fsearch svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: #ABA699; pointer-events: none; }
.fsearch input { width: 100%; height: 30px; padding: 0 9px 0 29px; border: 1px solid #E2DDD2; border-radius: 7px; background: #fff; color: #1A1816; font-size: 12px; outline: none; transition: border-color .12s, box-shadow .12s; }
.fsearch input:focus { border-color: #1A1816; box-shadow: 0 0 0 3px rgba(28,24,18,0.05); }
.fsearch input::placeholder { color: #ABA699; }

/* Staggered section entrance when the drawer opens */
.fpanel:not(.is-closed) .fsec { animation: fsec-in .4s cubic-bezier(.22,.61,.36,1) both; animation-delay: calc(60ms + var(--i, 0) * 35ms); }
@keyframes fsec-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .fpanel, .flist-main { transition: none !important; } .fpanel:not(.is-closed) .fsec { animation: none; } }


/* ============================================================
   SECTION 3 — Leaderboard / Portfolio / Saved-Views
   Reusable analytics chrome shared by the portfolio.html and
   leaderboard.html template pages. Page-specific column widths
   (.lb-c-*) and the table min-width live inline on each page,
   since the two pages carry different column sets.
   ============================================================ */

/* ---- Hero band + section headers ---- */
.pf-hero { background: linear-gradient(135deg, #1A1816 0%, #2A2622 100%); color: #F5F1E9; border-radius: 14px; padding: 22px 24px; }
@media (max-width: 767px) { .pf-hero { padding: 16px; border-radius: 11px; } }
.pf-hero-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #C9A96A; }
.pf-hero h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin-top: 4px; }
.pf-hero-sub { font-size: 13px; color: #B8B2A6; margin-top: 6px; line-height: 1.5; }
.pf-hero-headline { font-size: 15px; color: #EDE7DA; margin-top: 12px; }
.pf-hero-headline b { color: #fff; font-weight: 600; }
.pf-asof { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #9A968F; }
.pf-asof-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: #F1EEE7; color: #7A766F; font-size: 11px; font-weight: 600; }
.pf-sec-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #B0663A; }
.pf-sec-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: #1A1816; }
.pf-sec-sub { font-size: 12px; color: #7A766F; margin-top: 2px; }

/* ---- Mini strips: sparkline / mini bars / split meters ---- */
.pf-spark { display: block; }
.pf-bars { display: block; }
.pf-scale { font-size: 9.5px; color: #A7A29A; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 2px; text-align: right; }
.pf-mini-split { display: flex; width: 100%; height: 12px; border-radius: 4px; overflow: hidden; background: #F1EEE7; }
.pf-mini-split > span { height: 100%; display: block; }
.pf-mini-lbl { font-size: 9.5px; color: #8A857D; line-height: 1; margin-top: 3px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- Load-share bar (one bar, per-mailbox segments) ---- */
.pf-loadbar { display: flex; width: 100%; height: 30px; border-radius: 8px; overflow: hidden; background: #F1EEE7; }
.pf-loadbar-seg { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #fff; overflow: hidden; white-space: nowrap; transition: flex-basis .4s ease; }
.pf-legend-dot { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }

/* ---- Queue triage flags ---- */
.pf-qflag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.pf-qflag.is-overdue { background: #FBE1E1; color: #A02323; }
.pf-qflag.is-risk    { background: #FFF3DA; color: #8A5A00; }
.pf-qflag.is-new     { background: #E7EEF6; color: #1D6FB8; }
.pf-enrich { background: #FBFAF7; border: 1px solid #EDEAE3; border-radius: 10px; padding: 12px 14px; margin-top: 8px; }

/* ---- Big split meter (patterns) ---- */
.pf-split { display: flex; align-items: baseline; gap: 8px; }
.pf-split-pct { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1; color: #1A1816; }
.pf-split-lbl { font-size: 12px; color: #7A766F; }

/* ---- Rank / status badge ---- */
.pf-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pf-badge.is-best      { background: #E7F3EC; color: #0F7A3C; }
.pf-badge.is-attention { background: #FBE1E1; color: #A02323; }

/* ---- Wide leaderboard table (horizontal-scroll wrapper) ----
   The header row lives INSIDE this same container as the body so both scroll
   in lockstep and stay aligned. Column widths (.lb-c-*) + the row min-width are
   set inline per page (the readable base widths differ by column set). */
.pf-lb-scroll { overflow-x: auto; }
/* Header row grows to fit a wrapped 2-3 line label rather than clipping it. */
.pf-lb-scroll .row-head { height: auto; min-height: 46px; align-items: flex-start; }
/* Header cells must match the body cell box model exactly or columns drift.
   min-width:0 lets an over-wide header shrink to its basis; overflow-y:visible
   lets wrapped lines show in full (no vertical clip). */
.pf-lb-scroll .row-head .cell { display: flex; align-items: flex-start; min-width: 0; overflow-x: hidden; overflow-y: visible; padding-top: 8px; padding-bottom: 7px; line-height: 1.22; }
/* Fixed chart height so widening the table changes width only, never height
   (mini SVGs are width:100% + preserveAspectRatio="none"). */
.pf-lb-scroll .pf-spark, .pf-lb-scroll .pf-bars { width: 100%; height: 26px; display: block; }
/* Clear column separation: padding + a hairline divider on every cell but the
   last, applied identically to header + body so columns stay in lockstep. */
.pf-lb-scroll .cell { padding-left: 12px; padding-right: 12px; border-right: 1px solid #EFEBE3; transition: box-shadow .1s ease; }
.pf-lb-scroll .cell:last-child { border-right: none; }
.lb-num { justify-content: flex-end; font-variant-numeric: tabular-nums; }

/* Contained progress-bar track for numeric/bar columns: value/max fill renders
   inside a subtle rounded rail; the value text sits on top, right-aligned. */
.pf-lb-scroll .lb-row .lb-bar {
  display: flex; align-items: center; justify-content: flex-end;
  width: 100%; height: 22px; padding: 0 7px;
  border: 1px solid rgba(28,24,22,0.09); border-radius: 5px;
  background-color: #F3F1EA; background-repeat: no-repeat;
  overflow: hidden; font-variant-numeric: tabular-nums;
}
.pf-lb-scroll .lb-row .lb-bar .lb-bar-v { position: relative; }

/* Hover crosshair: row + column washes that stack above the bar background. */
.pf-lb-scroll .lb-row:hover { background: #F4EFE6; }
.pf-lb-scroll .lb-hl { box-shadow: inset 0 0 0 999px rgba(176,102,58,0.07); }
.pf-lb-scroll .lb-row .lb-hl .lb-bar { box-shadow: inset 0 0 0 999px rgba(176,102,58,0.07); }

/* Sortable headers */
.pf-lb-scroll .lb-sortable { cursor: pointer; user-select: none; }
.pf-lb-scroll .lb-sortable:hover { color: #6E6A62; }
.pf-lb-scroll .row-head .lb-sorted { color: #B0663A; }
.lb-arrow { margin-left: 3px; font-size: 9px; line-height: 1; }
.pf-sortbtn { cursor: pointer; user-select: none; }
.pf-sortbtn.is-active { color: #B0663A; }

/* Sent:received doughnut cell */
.lb-donut-wrap { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.lb-donut-cap { font-size: 9.5px; color: #8A857D; font-variant-numeric: tabular-nums; line-height: 1; }

/* ---- Saved Views toolbar — View switcher / Columns / Filter / Save ----
   Self-contained popovers (no external deps); toggle them with Alpine. */
.lb-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.lb-tb-item { position: relative; }
.lb-tb-btn { display: inline-flex; align-items: center; gap: 6px; }
.lb-tb-btn .lb-caret { font-size: 9px; line-height: 1; color: #9A968F; }
.lb-dirty-dot { color: #B0663A; font-size: 18px; line-height: 0; margin-left: 1px; position: relative; top: 2px; }
.lb-pop { position: absolute; top: calc(100% + 5px); left: 0; z-index: 45; background: #fff; border: 1px solid #E4DFD4; border-radius: 11px; box-shadow: 0 10px 32px rgba(26,24,22,0.16); padding: 6px; min-width: 258px; max-height: 62vh; overflow-y: auto; }
.lb-pop.lb-pop-right { left: auto; right: 0; }
.lb-pop-hd { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9A968F; padding: 7px 9px 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lb-pop-row { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 8px; font-size: 13px; color: #3A3833; cursor: pointer; }
.lb-pop-row:hover { background: #F4EFE6; }
.lb-pop-row.is-active { background: #F2EAD9; }
.lb-pop-row.is-muted { color: #A7A29A; cursor: default; }
.lb-pop-row.is-muted:hover { background: transparent; }
.lb-pop-row.is-drop { box-shadow: inset 0 2px 0 0 #B0663A; }
.lb-pop-lbl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-pop-mark { font-size: 10px; font-weight: 700; color: #0F7A3C; letter-spacing: .03em; text-transform: uppercase; flex: 0 0 auto; }
.lb-drag { flex: 0 0 auto; cursor: grab; color: #C5C0B6; font-size: 13px; line-height: 1; user-select: none; }
.lb-drag:active { cursor: grabbing; }
.lb-pop-row input[type="checkbox"] { flex: 0 0 auto; accent-color: #B0663A; width: 14px; height: 14px; }
.lb-mini { flex: 0 0 auto; border: 0; background: transparent; color: #9A968F; cursor: pointer; padding: 2px 4px; border-radius: 5px; font-size: 11px; line-height: 1; }
.lb-mini:hover { background: #EDE7DB; color: #4A4740; }
.lb-pop-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.lb-pop-sep { height: 1px; background: #EFEBE3; margin: 5px 3px; }
.lb-pop-foot { display: flex; align-items: center; gap: 8px; padding: 5px 9px 3px; }
.lb-pop-link { background: transparent; border: 0; color: #B0663A; font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 2px 4px; border-radius: 5px; }
.lb-pop-link:hover { text-decoration: underline; }
.lb-pop-link:disabled { color: #C5C0B6; cursor: default; text-decoration: none; }
.lb-pop-search { width: 100%; box-sizing: border-box; border: 1px solid #E4DFD4; border-radius: 7px; padding: 6px 9px; font-size: 12.5px; color: #1A1816; margin: 3px 3px 5px; }
.lb-pop-search:focus { outline: none; border-color: #C9A96A; }
.lb-count-pill { font-size: 11px; font-weight: 600; color: #7A766F; background: #F1EEE7; border-radius: 999px; padding: 1px 8px; }

/* ---- Chart Spotlight render output ----
   The reusable modal shell lives in the shared app JS; these style the large
   chart bodies a page supplies to the spotlight renderer. */
.sl-chart { width: 100%; }
.sl-svg { display: block; }
.sl-meta { font-size: 12px; color: #7A766F; margin-top: 12px; font-variant-numeric: tabular-nums; }
.sl-meta span { font-variant-numeric: tabular-nums; }
.sl-bigbar { display: flex; width: 100%; height: 28px; border-radius: 8px; overflow: hidden; background: #F1EEE7; }
.sl-bigbar > span { height: 100%; display: block; }
.sl-brows { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.sl-brow { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.sl-bdot { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }
.sl-bname { color: #3A3833; }
.sl-bval { margin-left: auto; font-weight: 600; color: #1A1816; font-variant-numeric: tabular-nums; }
.sl-axisy { font-size: 10.5px; font-weight: 600; color: #8A857D; letter-spacing: .03em; text-transform: uppercase; margin-bottom: 4px; }
.sl-axisx { font-size: 10.5px; font-weight: 600; color: #8A857D; letter-spacing: .03em; text-transform: uppercase; margin-top: 4px; text-align: center; }
.sl-explain { margin-top: 14px; border-top: 1px solid #EFEBE3; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.sl-explain .sl-ex-row { font-size: 12.5px; color: #4A4740; line-height: 1.45; }
.sl-explain .sl-ex-lbl { font-weight: 700; color: #B0663A; text-transform: uppercase; letter-spacing: .05em; font-size: 10px; display: block; margin-bottom: 1px; }

/* ============================================================
   SECTION 4 — Paramount Voice additions
   Small extras on top of the kit; colours are the kit's own values.
   ============================================================ */

/* "Sample data" marker in page headers (kit's amber chip, with a dot). */
.sample-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 4px; background: #FFF3DA; color: #8A5A00; font-size: 11.5px; font-weight: 500; line-height: 1.4; white-space: nowrap; cursor: help; }
.sample-pill .dot { width: 6px; height: 6px; border-radius: 3px; background: #D89B14; }

/* Quiet explanatory note (same look as the kit's .tx-guidance). */
.note { display: flex; align-items: flex-start; gap: 8px; padding: 9px 11px; background: #FBFAF6; border: 1px solid #EFEBE1; border-radius: 8px; font-size: 12px; color: #6A665E; line-height: 1.5; }
.note svg { width: 15px; height: 15px; color: #B5B0A4; flex-shrink: 0; margin-top: 1px; }

/* Card header row inside a .page-card */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-sub { font-size: 11.5px; color: #9A968F; }

/* Key/value rows (settings, hose details) */
.kv { display: flex; align-items: baseline; gap: 12px; padding: 6px 0; border-top: 1px solid #F4F1EA; font-size: 12.5px; }
.kv:first-child { border-top: 0; }
.kv-k { flex: 0 0 150px; color: #7A766F; font-size: 12px; }
.kv-v { flex: 1; min-width: 0; color: #1A1816; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; }

/* Tables that may be wider than their card scroll inside it, never the page. */
.tbl-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-scroll::-webkit-scrollbar { height: 8px; }
.tbl-scroll::-webkit-scrollbar-thumb { background: #E0DBD0; border-radius: 4px; border: 2px solid #fff; }

/* Tiny inline meter used in table cells */
.meter { display: inline-flex; align-items: center; gap: 8px; width: 100%; }
.meter-track { flex: 1; min-width: 36px; height: 6px; border-radius: 999px; background: #F1EEE7; overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 999px; }
.meter-val { flex: 0 0 38px; text-align: right; font-size: 12px; color: #3A3833; font-variant-numeric: tabular-nums; }

/* Small square icon tile (hose logos, list icons) */
.icon-tile { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: #F4F1EA; color: #3A3833; }
.icon-tile.is-live { background: #FBE1E1; color: #B91C1C; }
.icon-tile svg { width: 17px; height: 17px; }

/* Checklist (what connecting a hose needs) */
.check-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.check-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: #3A3833; line-height: 1.45; }
.check-list li::before { content: ""; width: 12px; height: 12px; margin-top: 3px; border: 1.5px solid #C9C4B9; border-radius: 3.5px; flex-shrink: 0; }
