/* ============================================================================
   services-report.css — Services Workspace Reporting Studio
   ----------------------------------------------------------------------------
   Additive overlay loaded AFTER services-premium.css. Adds:
     1. The "right-expanded" workspace state (center hidden, dashboard takes over)
     2. A tabbed Reporting Studio: Smart Dashboard + Service Report
   Everything is scoped under .svc-rpt-* / #svcReportRoot or the
   `.svc-main.right-expanded` state selector so no existing rule is overridden.
   Palette mirrors the premium overlay: #0b1120 base · #06b6d4/#22d3ee cyan ·
   #8b5cf6 violet · #10b981 mint · #f59e0b amber · #ef4444 red · #3b82f6 blue.
   ============================================================================ */

/* ── 1. EXPANDED WORKSPACE STATE ─────────────────────────────────────────────
   Right sidebar reaches across to the left sidebar; the center grid is fully
   closed so the dashboard gets the whole stage. Higher specificity than the
   premium `.svc-main` rule, and loaded later, so it always wins.            */
.svc-main.right-expanded            { grid-template-columns: 296px 0 1fr !important; }
.svc-main.right-expanded.left-collapsed { grid-template-columns: 0 0 1fr !important; }
/* Hide the center grid, but PIN the left + right panels to explicit grid
   columns. Without this pin, `display:none` on the center removes it from grid
   flow and the right panel auto-reflows into the empty 0-width 2nd track —
   collapsing the whole dashboard to nothing. */
.svc-main.right-expanded .svc-center { display: none !important; }
.svc-main.right-expanded .svc-left   { grid-column: 1 !important; }
.svc-main.right-expanded .svc-right  { grid-column: 3 !important; width: auto !important; min-width: 0 !important; max-width: none !important; }

/* The right panel becomes a full-height, scrollable reporting stage. */
.svc-right.expanded {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden !important;
  background:
    radial-gradient(1200px 480px at 88% -8%, rgba(139,92,246,.10), transparent 60%),
    radial-gradient(1000px 520px at 6% 108%, rgba(6,182,212,.10), transparent 60%),
    rgba(11,17,32,.92);
}

/* Hide the narrow widgets while expanded (they keep updating in the background). */
.svc-main.right-expanded #svcWidgetStats,
.svc-main.right-expanded #svcWidgetActivity,
.svc-main.right-expanded #svcWidgetCollab { display: none !important; }

/* The reporting root only exists in expanded mode. */
#svcReportRoot { display: none; }
.svc-main.right-expanded #svcReportRoot {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* ── 2. RIGHT HEADER CONTROL CLUSTER ─────────────────────────────────────── */
.svc-right-header { position: relative; }
.svc-rpt-headctl {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: flex;
  gap: 6px;
  align-items: center;
}
.svc-rpt-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(30,41,59,.55);
  color: #94a3b8;
  cursor: pointer;
  font-size: 11px;
  transition: all .15s ease;
}
.svc-rpt-iconbtn:hover { color: #22d3ee; border-color: rgba(34,211,238,.5); background: rgba(6,182,212,.12); }
.svc-main.right-expanded .svc-right-header {
  display: flex; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(30,41,59,.7);
  background: rgba(11,17,32,.55);
  flex: 0 0 auto;
}
.svc-rpt-restore { display: none; }
.svc-main.right-expanded .svc-rpt-restore { display: inline-flex; }
.svc-main.right-expanded .svc-rpt-expand  { display: none; }

/* ── 3. TAB BAR ──────────────────────────────────────────────────────────── */
.svc-rpt-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 18px 0 18px;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(30,41,59,.6);
}
.svc-rpt-tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: #94a3b8;
  font: 600 12.5px/1 'Inter', sans-serif;
  letter-spacing: .02em;
  padding: 11px 16px;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .15s ease;
  position: relative;
  top: 1px;
}
.svc-rpt-tab i { font-size: 12px; opacity: .8; }
.svc-rpt-tab:hover { color: #cbd5e1; background: rgba(30,41,59,.4); }
.svc-rpt-tab.active {
  color: #67e8f9;
  background: rgba(6,182,212,.10);
  border-color: rgba(6,182,212,.32);
  box-shadow: 0 -2px 14px rgba(6,182,212,.10) inset;
}
.svc-rpt-tab.active i { opacity: 1; color: #22d3ee; }

/* ── 4. PANELS ───────────────────────────────────────────────────────────── */
.svc-rpt-panels { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.svc-rpt-panel { display: none; height: 100%; overflow-y: auto; padding: 14px 18px 22px 18px; }
.svc-rpt-panel.active { display: block; }
.svc-rpt-panel::-webkit-scrollbar { width: 10px; }
.svc-rpt-panel::-webkit-scrollbar-thumb { background: rgba(71,85,105,.5); border-radius: 8px; }

/* ── 5. TOOLBAR / CONFIG BAR (shared) ────────────────────────────────────── */
.svc-rpt-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 11px;
}
.svc-rpt-toolbar .svc-rpt-title {
  font: 800 15px/1.1 'Inter', sans-serif;
  color: #e2e8f0;
  margin-right: auto;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 9px;
}
.svc-rpt-title small { font: 500 11px/1.2 'Inter'; color: #64748b; letter-spacing: .01em; }
.svc-rpt-title small::before { content: '·'; margin-right: 9px; color: #475569; }
.svc-rpt-btn {
  appearance: none;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(30,41,59,.55);
  color: #cbd5e1;
  font: 600 12px/1 'Inter';
  padding: 9px 13px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all .15s ease;
  white-space: nowrap;
}
.svc-rpt-btn i { font-size: 11px; }
.svc-rpt-btn:hover { border-color: rgba(34,211,238,.5); color: #e2e8f0; background: rgba(6,182,212,.10); }
.svc-rpt-btn.accent {
  border-color: transparent;
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: #f0fdff;
  box-shadow: 0 4px 16px rgba(6,182,212,.25);
}
.svc-rpt-btn.accent:hover { filter: brightness(1.08); }
.svc-rpt-btn.violet { background: linear-gradient(135deg, #7c3aed, #8b5cf6); color: #f5f3ff; border-color: transparent; box-shadow: 0 4px 16px rgba(139,92,246,.22); }
.svc-rpt-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12px/1 'Inter'; color: #94a3b8; cursor: pointer; user-select: none;
}
.svc-rpt-toggle input { display: none; }
.svc-rpt-toggle .sw {
  width: 34px; height: 19px; border-radius: 999px; background: rgba(71,85,105,.55);
  position: relative; transition: background .15s ease;
}
.svc-rpt-toggle .sw::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%;
  background: #cbd5e1; transition: transform .15s ease;
}
.svc-rpt-toggle input:checked + .sw { background: #10b981; }
.svc-rpt-toggle input:checked + .sw::after { transform: translateX(15px); background: #ecfdf5; }

/* ── 6. KPI CARDS ────────────────────────────────────────────────────────── */
.svc-rpt-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.svc-rpt-kpi {
  position: relative;
  border-radius: 12px;
  padding: 13px 14px 12px;
  background: linear-gradient(160deg, rgba(30,41,59,.85), rgba(17,24,39,.85));
  border: 1px solid rgba(51,65,85,.55);
  overflow: hidden;
}
.svc-rpt-kpi::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; border-radius: 3px; background: var(--kpi, #22d3ee); }
.svc-rpt-kpi-cyan   { --kpi: #22d3ee; }
.svc-rpt-kpi-violet { --kpi: #a78bfa; }
.svc-rpt-kpi-mint   { --kpi: #34d399; }
.svc-rpt-kpi-amber  { --kpi: #fbbf24; }
.svc-rpt-kpi-blue   { --kpi: #60a5fa; }
.svc-rpt-kpi-label { font: 600 10px/1 'Inter'; letter-spacing: .12em; text-transform: uppercase; color: #64748b; margin-bottom: 7px; }
.svc-rpt-kpi-value { font: 800 22px/1 'Inter'; color: #f1f5f9; letter-spacing: -.02em; }
.svc-rpt-kpi-value.sm { font-size: 15px; }
.svc-rpt-kpi-sub { font: 500 10.5px/1.3 'Inter'; color: #64748b; margin-top: 5px; }

/* ── 7. ANALYTIC CARDS / CHARTS ──────────────────────────────────────────── */
.svc-rpt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}
.svc-rpt-card {
  border-radius: 14px;
  background: rgba(17,24,39,.7);
  border: 1px solid rgba(51,65,85,.5);
  padding: 16px 16px 18px;
}
.svc-rpt-card-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.svc-rpt-card-title { font: 700 13px/1.1 'Inter'; color: #e2e8f0; display: flex; flex-direction: column; gap: 3px; }
.svc-rpt-card-title small { font: 500 10.5px/1 'Inter'; color: #64748b; letter-spacing: .04em; text-transform: uppercase; }
.svc-rpt-card-tag {
  margin-left: auto; font: 600 10px/1 'Inter'; letter-spacing: .05em; text-transform: uppercase;
  color: #94a3b8; padding: 4px 8px; border-radius: 6px; background: rgba(51,65,85,.5);
}

/* Horizontal bar list */
.svc-rpt-bars { display: flex; flex-direction: column; gap: 9px; }
.svc-rpt-bar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.svc-rpt-bar-label { font: 500 12px/1.2 'Inter'; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-rpt-bar-count { font: 700 12px/1 'Inter'; color: #94a3b8; justify-self: end; }
.svc-rpt-bar-track { grid-column: 1 / -1; height: 8px; border-radius: 6px; background: rgba(51,65,85,.45); overflow: hidden; }
.svc-rpt-bar-fill {
  height: 100%; border-radius: 6px;
  background: var(--bar, #22d3ee);
  background-image: linear-gradient(90deg, rgba(255,255,255,.16), rgba(255,255,255,0));
  min-width: 3px; transition: width .5s cubic-bezier(.22,1,.36,1);
}

/* Donut + legend */
.svc-rpt-donut-wrap { display: flex; align-items: center; gap: 16px; }
.svc-rpt-donut { flex: 0 0 auto; position: relative; }
.svc-rpt-donut .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.svc-rpt-donut .center b { font: 800 19px/1 'Inter'; color: #f1f5f9; }
.svc-rpt-donut .center span { font: 600 9.5px/1 'Inter'; letter-spacing: .08em; text-transform: uppercase; color: #64748b; margin-top: 3px; }
.svc-rpt-legend { display: flex; flex-direction: column; gap: 7px; flex: 1 1 auto; min-width: 0; }
.svc-rpt-legend-row { display: flex; align-items: center; gap: 8px; font: 500 11.5px/1.2 'Inter'; color: #cbd5e1; }
.svc-rpt-legend-row .dot { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.svc-rpt-legend-row .lg-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-rpt-legend-row .lg-val { margin-left: auto; color: #94a3b8; font-weight: 700; }

/* Numeric stat strip */
.svc-rpt-numgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.svc-rpt-num { background: rgba(30,41,59,.5); border: 1px solid rgba(51,65,85,.45); border-radius: 10px; padding: 11px 12px; }
.svc-rpt-num label { display: block; font: 600 9.5px/1 'Inter'; letter-spacing: .1em; text-transform: uppercase; color: #64748b; margin-bottom: 6px; }
.svc-rpt-num b { font: 800 16px/1 'Inter'; color: #e2e8f0; }
.svc-rpt-spark { display: flex; align-items: flex-end; gap: 3px; height: 40px; margin-top: 12px; }
.svc-rpt-spark span { flex: 1 1 auto; background: linear-gradient(180deg, #22d3ee, rgba(34,211,238,.25)); border-radius: 3px 3px 0 0; min-height: 2px; }

/* ── 8. SERVICE REPORT TABLE ─────────────────────────────────────────────── */
.svc-rpt-summary {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.svc-rpt-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(30,41,59,.6); border: 1px solid rgba(51,65,85,.5);
  border-radius: 9px; padding: 6px 11px; font: 600 11px/1 'Inter'; color: #cbd5e1;
}
.svc-rpt-chip b { color: #f1f5f9; font-weight: 800; font-size: 13px; }
.svc-rpt-chip i { color: #22d3ee; }

.svc-rpt-chip.active { background: rgba(6,182,212,.12); border-color: rgba(34,211,238,.42); color: #67e8f9; }
.svc-rpt-chip.active b { color: #a5f3fc; }
.svc-rpt-chip-x { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 12px; margin-left: 5px; padding: 0 2px; line-height: 1; }
.svc-rpt-chip-x:hover { color: #ef4444; }
.svc-rpt-muted { color: #64748b; font: 500 12px/1 'Inter'; }

.svc-rpt-table-wrap { border-radius: 14px; border: 1px solid rgba(51,65,85,.5); overflow: hidden; background: rgba(17,24,39,.6); }
table.svc-rpt-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: auto; }
table.svc-rpt-table thead th {
  position: sticky; top: 0; z-index: 3;
  text-align: left; font: 700 10.5px/1 'Inter'; letter-spacing: .1em; text-transform: uppercase;
  color: #64748b; padding: 10px 14px; background: rgba(8,12,24,.97);
  border-bottom: 1px solid rgba(51,65,85,.6);
}
/* User column shrinks to fit its content (full name, never truncated). The 1%
   width + nowrap content is the classic auto-layout "size to content" idiom. */
.svc-rpt-th-user { width: 1%; white-space: nowrap; }
.svc-rpt-th-type { width: 300px; }
.svc-rpt-th-due  { width: 180px; white-space: nowrap; }
.svc-rpt-th-type .th-row { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
table.svc-rpt-table tbody td { padding: 11px 14px; border-bottom: 1px solid rgba(30,41,59,.55); vertical-align: top; }
table.svc-rpt-table tbody tr:last-child td { border-bottom: none; }
.svc-rpt-td-user { white-space: nowrap; }
.svc-rpt-td-due { white-space: normal; }

/* Row hover + persistent selection — an OUTER border RING (no inner fill) drawn
   by a row-level ::after overlay. Transparent center so the row content shows
   through; pointer-events:none so case clicks still work. border-collapse:
   separate + position:relative on the row make the rounded ring render cleanly. */
table.svc-rpt-table tbody tr { position: relative; cursor: default; }
table.svc-rpt-table tbody tr:hover::after,
table.svc-rpt-table tbody tr.svc-rpt-row-selected::after {
  content: ''; position: absolute; inset: 4px 7px; border-radius: 12px;
  pointer-events: none; z-index: 2;
}
table.svc-rpt-table tbody tr:hover::after {
  border: 1px solid rgba(34,211,238,.30);
  box-shadow: 0 0 16px rgba(34,211,238,.10);
}
table.svc-rpt-table tbody tr.svc-rpt-row-selected::after {
  border: 1.5px solid #22d3ee;
  box-shadow: 0 0 0 1px rgba(34,211,238,.30), 0 0 26px rgba(34,211,238,.30),
              0 8px 26px rgba(34,211,238,.12), inset 0 0 20px rgba(34,211,238,.06);
  animation: svcRptRingIn .2s cubic-bezier(.22,1,.36,1);
}
@keyframes svcRptRingIn { from { opacity: 0; transform: scale(.992); } to { opacity: 1; transform: none; } }

/* ① User */
.svc-rpt-user { display: flex; align-items: center; gap: 11px; }
.svc-rpt-ava {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font: 800 13px/1 'Inter'; color: #06121f;
  background: linear-gradient(135deg, #22d3ee, #8b5cf6);
  box-shadow: 0 4px 14px rgba(34,211,238,.18);
}
.svc-rpt-user-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.svc-rpt-user-name { font: 700 13.5px/1.15 'Inter'; color: #e2e8f0; white-space: nowrap; }
.svc-rpt-user-sub { font: 500 11px/1.1 'Inter'; color: #64748b; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.svc-rpt-qbname { color: #7dd3fc; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.svc-rpt-qbname.missing { color: #f59e0b; }

/* ② Type breakdown + header filter */
.svc-rpt-typefilter {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: 700 10px/1 'Inter'; text-transform: none; letter-spacing: .01em;
  color: #cbd5e1; background: rgba(6,182,212,.10); border: 1px solid rgba(34,211,238,.32);
  padding: 5px 9px; border-radius: 7px; transition: all .12s ease;
}
.svc-rpt-typefilter:hover { background: rgba(6,182,212,.2); border-color: rgba(34,211,238,.55); }
.svc-rpt-typefilter > i:first-child { font-size: 9px; color: #22d3ee; }
.svc-rpt-typefilter .tf-label { color: #67e8f9; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-rpt-typefilter .tf-caret { font-size: 8px; color: #64748b; }
.svc-rpt-typebreak { display: flex; flex-direction: column; gap: 7px; }
.svc-rpt-typerow { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; transition: opacity .15s ease; }
.svc-rpt-typerow .tlabel { font: 500 11.5px/1.1 'Inter'; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-rpt-typerow .tcount { font: 700 11px/1 'Inter'; color: #94a3b8; }
.svc-rpt-typerow .ttrack { grid-column: 1 / -1; height: 5px; border-radius: 4px; background: rgba(51,65,85,.45); overflow: hidden; }
.svc-rpt-typerow .tfill { height: 100%; border-radius: 4px; background: linear-gradient(90deg,#a78bfa,#22d3ee); }
.svc-rpt-typerow.active .tlabel { color: #67e8f9; font-weight: 700; }
.svc-rpt-typerow.active .tfill { background: linear-gradient(90deg,#22d3ee,#67e8f9); }
.svc-rpt-typerow.dim { opacity: .38; }

/* ③ + ④ shared list meta */
.svc-rpt-cases { display: flex; flex-direction: column; }
.svc-rpt-listmeta { height: 26px; display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.svc-rpt-casecount {
  font: 800 12px/1 'Inter'; color: #f1f5f9;
  background: rgba(16,185,129,.16); border: 1px solid rgba(16,185,129,.4);
  border-radius: 7px; padding: 5px 9px;
}
.svc-rpt-casecount.zero { color: #94a3b8; background: rgba(71,85,105,.3); border-color: rgba(71,85,105,.4); }
.svc-rpt-case-toggle { font: 600 11px/1 'Inter'; color: #22d3ee; cursor: pointer; background: none; border: none; padding: 0; }
.svc-rpt-case-toggle:hover { text-decoration: underline; }
.svc-rpt-overduecount { font: 800 11px/1 'Inter'; color: #fca5a5; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.38); border-radius: 7px; padding: 5px 9px; display: inline-flex; align-items: center; gap: 6px; }
.svc-rpt-overduecount i { font-size: 10px; }
.svc-rpt-ontrack { font: 700 10px/1 'Inter'; letter-spacing: .05em; text-transform: uppercase; color: #34d399; }
.svc-rpt-listmeta-muted { color: #475569; font: 500 11px/1 'Inter'; }
.svc-rpt-emptyrow { font: 500 11.5px/1 'Inter'; color: #64748b; height: 40px; display: flex; align-items: center; }

/* ③ Open Cases — vertical single column. Fixed 40px rows so ③ and ④ align. */
.svc-rpt-case-list { display: flex; flex-direction: column; gap: 6px; }
.svc-rpt-caserow {
  display: flex; align-items: center; gap: 9px; height: 40px; box-sizing: border-box;
  background: rgba(30,41,59,.5); border: 1px solid rgba(51,65,85,.5);
  border-radius: 9px; padding: 0 12px; cursor: pointer; transition: all .12s ease;
}
.svc-rpt-caserow:hover { border-color: rgba(34,211,238,.5); background: rgba(6,182,212,.10); transform: translateX(2px); }
.svc-rpt-caserow .cnum { font: 700 12px/1 'JetBrains Mono', monospace; color: #e2e8f0; flex: 0 0 auto; }
.svc-rpt-caserow .cdesc { font: 500 11.5px/1.2 'Inter'; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.svc-rpt-caserow .ctype { font: 600 9.5px/1 'Inter'; color: #a5b4fc; background: rgba(99,102,241,.14); padding: 3px 7px; border-radius: 5px; flex: 0 0 auto; white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.svc-rpt-caserow .cgo { font-size: 10px; color: #475569; flex: 0 0 auto; opacity: 0; transition: opacity .12s ease; }
.svc-rpt-caserow:hover .cgo { opacity: 1; color: #22d3ee; }

/* ④ Due Date for QA — pill matches the Deadline records counter format */
.svc-rpt-due-list { display: flex; flex-direction: column; gap: 6px; }
.svc-rpt-duerow { height: 40px; box-sizing: border-box; display: flex; align-items: center; }
.svc-rpt-duepill {
  display: inline-flex; flex-direction: column; gap: 2px; align-items: flex-start; justify-content: center;
  padding: 5px 11px; border-radius: 9px; border: 1px solid rgba(71,85,105,.5); background: rgba(30,41,59,.5);
  min-width: 116px;
}
.svc-rpt-duepill .dd { font: 700 11.5px/1 'Inter'; color: #cbd5e1; }
.svc-rpt-duepill .badge { font: 800 9px/1 'Inter'; letter-spacing: .05em; padding: 3px 6px; border-radius: 5px; background: rgba(71,85,105,.45); color: #94a3b8; }
.svc-rpt-duepill.overdue { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.10); }
.svc-rpt-duepill.overdue .dd { color: #fca5a5; }
.svc-rpt-duepill.overdue .badge { background: rgba(239,68,68,.22); color: #fecaca; }
.svc-rpt-duepill.today { border-color: rgba(245,158,11,.5); background: rgba(245,158,11,.10); }
.svc-rpt-duepill.today .dd { color: #fcd34d; }
.svc-rpt-duepill.today .badge { background: rgba(245,158,11,.22); color: #fde68a; }
.svc-rpt-duepill.soon { border-color: rgba(34,211,238,.4); }
.svc-rpt-duepill.soon .badge { background: rgba(34,211,238,.18); color: #a5f3fc; }
.svc-rpt-duepill.ok .badge { background: rgba(16,185,129,.16); color: #6ee7b7; }
.svc-rpt-duenone { font: 500 11px/1 'Inter'; color: #475569; padding-left: 2px; }

/* Synced collapse: hide the 7th+ row in BOTH the cases and due lists so the
   two columns always stay aligned. Toggling .cases-expanded on the <tr> reveals. */
.svc-rpt-table tr:not(.cases-expanded) .svc-rpt-case-list > .svc-rpt-caserow:nth-child(n+7),
.svc-rpt-table tr:not(.cases-expanded) .svc-rpt-due-list  > .svc-rpt-duerow:nth-child(n+7) { display: none; }

.svc-rpt-statusdot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: #64748b; }
.svc-rpt-statusdot.investigating { background: #22d3ee; }
.svc-rpt-statusdot.waiting       { background: #f59e0b; }
.svc-rpt-statusdot.soft          { background: #a78bfa; }
.svc-rpt-statusdot.initial       { background: #3b82f6; }
.svc-rpt-statusdot.closed        { background: #64748b; }

/* Type-filter dropdown (anchored under the column header) */
.svc-rpt-typemenu { width: 264px; }
.svc-rpt-typemenu-list { overflow-y: auto; padding: 6px; max-height: 52vh; }
.svc-rpt-typemenu-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px; cursor: pointer; }
.svc-rpt-typemenu-item:hover { background: rgba(30,41,59,.6); }
.svc-rpt-typemenu-item.on { background: rgba(6,182,212,.14); }
.svc-rpt-typemenu-item .nm { font: 600 12px/1.2 'Inter'; color: #cbd5e1; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-rpt-typemenu-item.on .nm { color: #67e8f9; }
.svc-rpt-typemenu-item b { font: 800 11px/1 'Inter'; color: #94a3b8; background: rgba(51,65,85,.5); padding: 3px 7px; border-radius: 5px; flex: 0 0 auto; }

/* ── 9. POPOVER (column focus + user picker) ─────────────────────────────── */
.svc-rpt-pop {
  position: fixed; z-index: 100050;
  width: 320px; max-height: 60vh; display: flex; flex-direction: column;
  background: rgba(15,23,42,.98); border: 1px solid rgba(51,65,85,.7);
  border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.55); backdrop-filter: blur(14px);
  overflow: hidden;
}
.svc-rpt-pop-head { padding: 13px 15px; border-bottom: 1px solid rgba(30,41,59,.7); display: flex; align-items: center; gap: 8px; }
.svc-rpt-pop-head .t { font: 700 12.5px/1 'Inter'; color: #e2e8f0; }
.svc-rpt-pop-head .x { margin-left: auto; background: none; border: none; color: #64748b; cursor: pointer; font-size: 14px; }
.svc-rpt-pop-head .x:hover { color: #ef4444; }
.svc-rpt-pop-search { margin: 11px 13px 4px; padding: 8px 11px; border-radius: 9px; border: 1px solid rgba(51,65,85,.6); background: rgba(11,17,32,.7); color: #e2e8f0; font: 500 12px/1 'Inter'; outline: none; }
.svc-rpt-pop-search:focus { border-color: rgba(34,211,238,.55); }
.svc-rpt-pop-list { flex: 1 1 auto; overflow-y: auto; padding: 6px 8px 8px; }
.svc-rpt-pop-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.svc-rpt-pop-item:hover { background: rgba(30,41,59,.6); }
.svc-rpt-pop-item .cb {
  width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid rgba(100,116,139,.7);
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: transparent; font-size: 10px;
}
.svc-rpt-pop-item.on .cb { background: #06b6d4; border-color: #06b6d4; color: #06223a; }
.svc-rpt-pop-item .nm { font: 600 12.5px/1.2 'Inter'; color: #cbd5e1; }
.svc-rpt-pop-item .nm small { display: block; font: 500 10.5px/1.1 'Inter'; color: #64748b; margin-top: 2px; }
.svc-rpt-pop-foot { padding: 10px 13px; border-top: 1px solid rgba(30,41,59,.7); display: flex; gap: 8px; }
.svc-rpt-pop-foot .svc-rpt-btn { flex: 1 1 auto; justify-content: center; }

/* ── 10. STATE BLOCKS ────────────────────────────────────────────────────── */
.svc-rpt-empty {
  text-align: center; padding: 48px 20px; color: #64748b;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.svc-rpt-empty .ic {
  width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #22d3ee;
  background: linear-gradient(135deg, rgba(6,182,212,.18), rgba(139,92,246,.18));
  border: 1px solid rgba(51,65,85,.5);
}
.svc-rpt-empty h3 { font: 700 15px/1.2 'Inter'; color: #cbd5e1; margin: 0; }
.svc-rpt-empty p { font: 500 12.5px/1.5 'Inter'; color: #64748b; margin: 0; max-width: 360px; }
.svc-rpt-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px; color: #94a3b8; font: 600 13px/1 'Inter'; }
.svc-rpt-spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(148,163,184,.25); border-top-color: #22d3ee; animation: svcRptSpin .8s linear infinite; }
@keyframes svcRptSpin { to { transform: rotate(360deg); } }
.svc-rpt-warn {
  margin-bottom: 14px; padding: 11px 14px; border-radius: 11px;
  background: rgba(245,158,11,.10); border: 1px solid rgba(245,158,11,.35);
  color: #fcd34d; font: 600 12px/1.4 'Inter'; display: flex; gap: 9px; align-items: flex-start;
}
.svc-rpt-warn i { margin-top: 1px; }

.svc-rpt-section-title { font: 700 12px/1 'Inter'; letter-spacing: .08em; text-transform: uppercase; color: #64748b; margin: 6px 0 12px; }

/* ── 11. TEAM TREEVIEW USER PICKER ───────────────────────────────────────────
   Teams sit at the top, each expandable to reveal members. Tri-state team
   checkbox (all / some / none) selects the whole shift in one click. */
.svc-rpt-tvpop { width: 388px; max-height: 74vh; }
.svc-rpt-tv-tools { padding: 11px 13px 6px; display: flex; flex-direction: column; gap: 8px; }
.svc-rpt-tv-tools .svc-rpt-tv-search { margin: 0; }
.svc-rpt-tv-quick { display: flex; gap: 6px; }
.svc-rpt-tv-quick button {
  appearance: none; cursor: pointer; flex: 1 1 auto;
  font: 600 10.5px/1 'Inter'; color: #94a3b8;
  background: rgba(30,41,59,.5); border: 1px solid rgba(51,65,85,.55);
  border-radius: 7px; padding: 7px 6px; transition: all .12s ease;
}
.svc-rpt-tv-quick button:hover { color: #67e8f9; border-color: rgba(34,211,238,.45); background: rgba(6,182,212,.10); }

.svc-rpt-tv-list { flex: 1 1 auto; overflow-y: auto; padding: 4px 8px 8px; min-height: 120px; }
.svc-rpt-tv-list::-webkit-scrollbar { width: 9px; }
.svc-rpt-tv-list::-webkit-scrollbar-thumb { background: rgba(71,85,105,.5); border-radius: 8px; }
.svc-rpt-tv-empty { padding: 26px 14px; text-align: center; color: #64748b; font: 500 12px/1.4 'Inter'; }

.svc-rpt-tv-team { border-radius: 10px; margin-bottom: 4px; border: 1px solid transparent; }
.svc-rpt-tv-team.open { background: rgba(15,23,42,.55); border-color: rgba(51,65,85,.5); }
.svc-rpt-tv-teamhead {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px;
  border-radius: 10px; cursor: pointer; transition: background .12s ease;
}
.svc-rpt-tv-teamhead:hover { background: rgba(30,41,59,.55); }
.svc-rpt-tv-caret { display: inline-flex; width: 13px; justify-content: center; color: #64748b; transition: transform .15s ease; flex: 0 0 auto; }
.svc-rpt-tv-caret i { font-size: 10px; }
.svc-rpt-tv-team.open > .svc-rpt-tv-teamhead .svc-rpt-tv-caret { transform: rotate(90deg); color: #a78bfa; }
.svc-rpt-tv-teamname { flex: 1 1 auto; min-width: 0; font: 700 12.5px/1.2 'Inter'; color: #e2e8f0; display: flex; flex-direction: column; gap: 2px; }
.svc-rpt-tv-teamname small { font: 500 10px/1 'Inter'; color: #64748b; letter-spacing: .02em; }
.svc-rpt-tv-teamcount { font: 800 10.5px/1 'Inter'; color: #cbd5e1; background: rgba(51,65,85,.5); border-radius: 6px; padding: 4px 7px; flex: 0 0 auto; }

.svc-rpt-tv-members { display: none; flex-direction: column; gap: 2px; padding: 2px 6px 8px 30px; }
.svc-rpt-tv-team.open > .svc-rpt-tv-members { display: flex; }
.svc-rpt-tv-member { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 9px; cursor: pointer; transition: background .12s ease; }
.svc-rpt-tv-member:hover { background: rgba(30,41,59,.6); }
.svc-rpt-tv-member.on { background: rgba(6,182,212,.08); }
.svc-rpt-tv-ava {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font: 800 10px/1 'Inter'; color: #06121f;
  background: linear-gradient(135deg, #22d3ee, #8b5cf6);
}
.svc-rpt-tv-mmeta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.svc-rpt-tv-mmeta b { font: 600 12px/1.2 'Inter'; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-rpt-tv-mmeta small { font: 500 10px/1.1 'Inter'; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-rpt-tv-member.on .svc-rpt-tv-mmeta b { color: #e2e8f0; }

/* Tri-state checkbox (shared by member + team rows) */
.svc-rpt-tv-cb {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid rgba(100,116,139,.7);
  display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 10px; transition: all .12s ease;
}
.svc-rpt-tv-member.on > .svc-rpt-tv-cb { background: #06b6d4; border-color: #06b6d4; color: #06223a; }
.svc-rpt-tv-cb.team { border-radius: 6px; }
.svc-rpt-tv-cb.team.all  { background: #8b5cf6; border-color: #8b5cf6; color: #f5f3ff; }
.svc-rpt-tv-cb.team.some { background: rgba(139,92,246,.28); border-color: #8b5cf6; color: #c4b5fd; }
.svc-rpt-tv-cb.team:hover { border-color: #a78bfa; }

.svc-rpt-tvpop .svc-rpt-pop-foot { align-items: center; }
.svc-rpt-tvpop .svc-rpt-pop-foot .svc-rpt-btn { flex: 0 0 auto; }
.svc-rpt-tv-count { font: 700 11px/1 'Inter'; color: #94a3b8; margin-right: auto; }

/* ── 12. DASHBOARD ACCESS-DENIED NOTICE (owner-only gate) ───────────────────── */
.svc-rpt-denied {
  max-width: 520px; margin: 40px auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 32px 28px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(30,41,59,.55), rgba(17,24,39,.7));
  border: 1px solid rgba(51,65,85,.55);
}
.svc-rpt-denied-ic {
  width: 66px; height: 66px; border-radius: 20px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fbbf24;
  background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(139,92,246,.16));
  border: 1px solid rgba(245,158,11,.3);
}
.svc-rpt-denied h3 { font: 800 17px/1.2 'Inter'; color: #e2e8f0; margin: 0; }
.svc-rpt-denied-lead { font: 500 12.5px/1.6 'Inter'; color: #94a3b8; margin: 0; max-width: 420px; }
.svc-rpt-denied-lead b { color: #cbd5e1; }
.svc-rpt-denied-notice {
  display: flex; align-items: flex-start; gap: 10px; text-align: left;
  padding: 12px 14px; border-radius: 12px; max-width: 440px;
  background: rgba(245,158,11,.10); border: 1px solid rgba(245,158,11,.35);
  color: #fcd34d; font: 600 12px/1.5 'Inter';
}
.svc-rpt-denied-notice i { margin-top: 2px; color: #fbbf24; }
.svc-rpt-denied-notice b { color: #fde68a; }
.svc-rpt-denied .svc-rpt-btn { margin-top: 4px; }
.svc-rpt-denied-hint { font: 500 11.5px/1.5 'Inter'; color: #64748b; max-width: 360px; }
.svc-rpt-denied-hint b { color: #94a3b8; }
