*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #1a1d24;
  --surface:   #23272f;
  --surface2:  #2c3039;
  --border:    #363b46;
  --border-hi: #4a5060;
  --text:      #e8eaef;
  --muted:     #9ba3b5;
  --faint:     #636c82;
  --accent:    #ec6d23;
  --blue:      #ec6d23;
  --green:     #34d399;
  --red:       #f87171;
  --yellow:    #fbbf24;
  --q1: #2a2018; --q1b: #f0a06a;
  --q2: #0e2d1c; --q2b: #52e898;
  --q3: #2d1f08; --q3b: #fcd34d;
  --q4: #1e1142; --q4b: #c4b5fd;
  --un: #23272f; --unb: #9ba3b5;
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.32);
  --shadow:    0 4px 20px rgba(0,0,0,0.45);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.6);
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ── App Layout ── */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.tab-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease;
  z-index: 20;
}
.sidebar.collapsed { width: 52px; }
.sidebar.collapsed .sb-label,
.sidebar.collapsed .sb-title { display: none; }
.sidebar.collapsed .sb-brand { justify-content: center; padding: 0.75rem 0.4rem; }
.sidebar.collapsed .sb-logo { height: 22px; }
.sidebar.collapsed .tab-btn { justify-content: center; padding: 0.55rem 0; }
.sidebar.collapsed .sb-icon { margin-right: 0; font-size: 1rem; }
.sidebar.collapsed .sb-collapse-icon { transform: rotate(180deg); }
.sidebar.collapsed .sb-divider { margin: 0.2rem 0.5rem; }

.sb-brand {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.3rem; padding: 0.85rem 0.85rem 0.65rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; text-align: center;
}
.sb-logo { height: 26px; width: auto; flex-shrink: 0; }
.sb-title {
  font-size: 0.62rem; font-weight: 700; color: var(--faint);
  line-height: 1.3; letter-spacing: 0.03em; text-transform: uppercase;
}

.sb-nav {
  flex: 1; overflow-y: auto;
  padding: 0.4rem 0;
  display: flex; flex-direction: column;
}
.sb-nav .tab-btn {
  display: flex; align-items: center;
  padding: 0.5rem 0.85rem; gap: 0;
  background: none; border: none;
  color: var(--muted); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  border-left: 3px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.sb-nav .tab-btn:hover {
  background: rgba(255,255,255,0.04); color: var(--text);
}
.sb-nav .tab-btn.active {
  color: var(--blue); font-weight: 700;
  background: rgba(236,109,35,0.08);
  border-left-color: var(--blue);
}
.sb-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.25em; margin-right: 0.55rem; font-size: 0.9rem;
  flex-shrink: 0; text-align: center;
}
.sb-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sb-divider {
  height: 1px; background: var(--border);
  margin: 0.35rem 0.85rem; flex-shrink: 0;
}

.sb-collapse-btn {
  flex-shrink: 0; padding: 0.55rem 0.85rem;
  background: none; border: none; border-top: 1px solid var(--border);
  color: var(--faint); font-size: 0.75rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s;
}
.sb-collapse-btn:hover { color: var(--text); }
.sb-collapse-icon { transition: transform 0.2s; display: inline-block; }

/* Sidebar expand button (visible when collapsed or on mobile) */
.sb-expand-btn {
  display: none;
  background: none; border: none; color: var(--muted);
  font-size: 1.1rem; cursor: pointer; padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm); transition: color 0.15s;
  flex-shrink: 0;
}
.sb-expand-btn:hover { color: var(--text); }
.sidebar.collapsed ~ .main-area .sb-expand-btn { display: block; }

/* ── Header ── */
header {
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}
.header-right { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; margin-left: auto; }
.header-label { font-size: 0.72rem; color: var(--muted); }
.header-right select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.32rem 0.65rem;
  font-size: 0.8rem;
  min-width: 200px;
  transition: border-color 0.15s;
}
.header-right select:hover { border-color: var(--border-hi); }
.header-right select:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
#sync-status { font-size: 0.7rem; color: var(--faint); white-space: nowrap; }

/* ── Mobile: sidebar overlay ── */
@media (max-width: 768px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
    z-index: 200;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar.collapsed { transform: translateX(-100%); }
  .sb-expand-btn { display: block !important; }
  .sb-collapse-btn { display: none; }
  .mobile-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 199; display: none;
  }
  .mobile-backdrop.visible { display: block; }
}

/* ── Peer-benchmark strip (below client summary) ── */
.benchmark-strip {
  flex-shrink: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 1.5rem;
  display: flex; align-items: center; gap: 0.85rem;
  font-size: 0.74rem; color: var(--muted);
  overflow-x: auto;
  white-space: nowrap;
}
.bm-title  { font-weight: 700; color: var(--faint); letter-spacing: 0.03em; }
.bm-sep    { color: var(--border); }
.bm-cell   { display: flex; flex-direction: column; gap: 0.05rem; }
.bm-cell-label { font-size: 0.66rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; }
.bm-cell-nums  { display: flex; align-items: baseline; gap: 0.35rem; }
.bm-you    { font-weight: 700; color: var(--text); font-size: 0.85rem; }
.bm-peer   { color: var(--muted); font-size: 0.72rem; }
.bm-good    { color: #22c55e; font-weight: 700; font-size: 0.78rem; }
.bm-bad     { color: #ef4444; font-weight: 700; font-size: 0.78rem; }
.bm-neutral { color: var(--muted); font-size: 0.78rem; }
.bm-rank   {
  font-size: 0.65rem; color: var(--muted); font-weight: 600;
  padding: 1px 6px; border: 1px solid var(--border); border-radius: 10px;
  margin-left: 0.2rem;
}
.bm-rank-none { color: var(--faint); font-style: italic; }

/* ── Client Summary Bar ── */
#client-summary {
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow-x: auto;
}
.cs-score-wrap {
  position: relative;
  width: 48px; height: 48px;
}
.cs-ring { width: 48px; height: 48px; transform: rotate(-90deg); }
.cs-ring-bg   { fill: none; stroke: var(--border); stroke-width: 4; }
.cs-ring-fill {
  fill: none; stroke: var(--green); stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 113; stroke-dashoffset: 113;
  transition: stroke-dashoffset 0.6s ease, stroke 0.4s ease;
}
.cs-score-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.cs-score-num { font-size: 0.85rem; font-weight: 800; line-height: 1; }
.cs-score-lbl { font-size: 0.45rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.cs-stats {
  display: flex; align-items: stretch; flex: 1; flex-wrap: nowrap;
}
.cs-stat {
  flex: 1; padding: 0.2rem 0.6rem;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; min-width: 0;
}
.cs-stat-link {
  cursor: pointer; border-radius: var(--radius-sm);
  transition: background 0.12s;
}
.cs-stat-link:hover { background: rgba(255,255,255,0.05); }
.cs-stat-val { font-size: 1.15rem; font-weight: 800; line-height: 1; }
.cs-stat-lbl { font-size: 0.68rem; color: var(--muted); line-height: 1.4; margin-top: 0.15rem; }
.cs-stat-divider { width: 1px; align-self: stretch; margin: 0.3rem 0; background: var(--border); flex-shrink: 0; }
.cs-hw-pill {
  display: inline-block; border-radius: 4px; padding: 0 5px;
  font-size: 0.65rem; font-weight: 600; margin-right: 3px;
}
.cs-hw-current  { background: rgba(52,211,153,0.14); color: #52e898; }
.cs-hw-aging    { background: rgba(252,211,77,0.14);  color: #fcd34d; }
.cs-hw-critical { background: rgba(248,113,113,0.14); color: #f87171; }
.cs-report-btn {
  flex-shrink: 0; align-self: center; margin-left: auto;
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); padding: 0.2rem 0.7rem;
  border-radius: var(--radius-sm); font-size: 0.78rem; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.cs-report-btn:hover { border-color: var(--blue); color: var(--blue); background: rgba(236,109,35,0.06); }
.cs-share-btn {
  flex-shrink: 0; align-self: center;
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); padding: 0.2rem 0.7rem;
  border-radius: var(--radius-sm); font-size: 0.78rem; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.cs-share-btn:hover { border-color: var(--green); color: var(--green); background: rgba(52,211,153,0.06); }

/* ── Share modal ── */
.share-modal { max-width: 560px; }
.sm-subtitle { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.25rem; line-height: 1.6; }
.sm-generate-row {
  display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.sm-generate-row .field { margin-bottom: 0; }
.sm-copy-row { display: flex; gap: 0.5rem; margin-bottom: 0.4rem; }
.sm-copy-row input {
  flex: 1; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm); padding: 0.4rem 0.65rem;
  font-size: 0.76rem; font-family: monospace;
}
.sm-copy-hint { font-size: 0.72rem; color: var(--muted); margin-bottom: 1rem; }
.sm-existing-section { margin-top: 1rem; }
.sm-existing-title {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem; margin-bottom: 0.6rem;
}
.sm-token-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.55rem 0.7rem; border-radius: var(--radius);
  border: 1px solid var(--border); margin-bottom: 0.4rem;
  transition: border-color 0.15s;
}
.sm-token-row:hover { border-color: var(--border-hi); }
.sm-token-expired { opacity: 0.5; }
.sm-token-info { flex: 1; min-width: 0; }
.sm-token-label { font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-token-meta  { font-size: 0.72rem; color: var(--muted); margin-top: 0.1rem; }
.sm-token-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }

/* ── Tab Sections ── */
.tab-section {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tab-section[hidden] { display: none; }

/* ── Status Icons (accessibility) ── */
.si {
  display: inline-block; vertical-align: -0.15em;
  width: 1em; height: 1em; flex-shrink: 0;
  fill: none; stroke: currentColor;
}
/* slightly bigger in badges */
.badge .si, .stage-badge .si { width: 0.9em; height: 0.9em; vertical-align: -0.1em; margin-right: 0.15em; }
/* in summary dots, replace the dot */
.si-dot { width: 0.7em; height: 0.7em; vertical-align: -0.05em; }

/* ── Shared Layout Patterns ── */

/* Toolbar — sticky top bar with actions */
.tab-toolbar {
  flex-shrink: 0; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.55rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--border);
}
.tab-toolbar-title { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.toolbar-select {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 0.25rem 0.5rem; font-size: 0.78rem;
  transition: border-color 0.15s;
}
.toolbar-select:hover { border-color: var(--border-hi); }
.toolbar-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Scrollable body area */
.tab-body { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; }

/* KPI summary card row — used by Budget, Licensing */
.kpi-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.65rem; margin-bottom: 1.25rem;
}
.kpi-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
}
.kpi-card-accent { border-color: var(--accent); }
.kpi-card-warn   { border-color: var(--border-hi); }
.kpi-val {
  font-size: 1.35rem; font-weight: 800; color: var(--accent); line-height: 1.1;
}
.kpi-label {
  font-size: 0.65rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.04em; font-weight: 700; margin-top: 0.25rem;
}
.kpi-sub { font-size: 0.65rem; color: var(--faint); margin-top: 0.15rem; }

/* Section block — titled group within a tab body */
.section-block { margin-bottom: 1.25rem; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.6rem;
}
.section-title {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted);
}

/* Filter pill bar */
.filter-bar { display: flex; gap: 0.4rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.filter-pill {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--muted); padding: 0.28rem 0.75rem; font-size: 0.78rem; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.filter-pill:hover  { border-color: var(--accent); color: var(--text); }
.filter-pill.active { border-color: var(--accent); color: var(--accent); background: rgba(236,109,35,0.08); }
.filter-count { opacity: .7; margin-left: 0.25rem; }

/* ── Dashboard ── */
.dash-wrap {
  flex: 1; overflow-y: auto; padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}
.dash-loading {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  height: 100%; color: var(--muted); font-size: 0.9rem;
}

/* Gate (no client) */
.dash-gate {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 0.75rem; text-align: center;
}
.dash-gate-icon { opacity: 0.6; }
.dash-gate-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }
.dash-gate-sub { font-size: 0.85rem; color: var(--muted); max-width: 340px; line-height: 1.5; }

/* Hero row */
.dash-hero-row {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 1.5rem; align-items: center;
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 1.5rem 2rem;
}

/* Health hero (large ring) */
.dash-health-hero {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem;
}
.dash-hero-ring-wrap { position: relative; width: 200px; height: 200px; }
.dash-hero-ring { width: 200px; height: 200px; transform: rotate(-90deg); filter: drop-shadow(0 0 18px var(--ring-glow, rgba(255,255,255,0.06))); }
.dash-hero-ring-bg { fill: none; stroke: var(--border); stroke-width: 5; }
.dash-hero-ring-fill {
  fill: none; stroke-width: 7; stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease, stroke 0.4s ease;
}
.dash-hero-score {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.dash-hero-num { font-size: 3.4rem; font-weight: 800; line-height: 1; }
.dash-hero-label { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.15rem; }
.dash-hero-client {
  font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em;
  max-width: 220px; text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.dash-hero-sub { font-size: 0.66rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; }

/* Gauges */
.dash-gauges {
  display: flex; flex-direction: column; gap: 0.65rem;
  min-width: 0;
}
.dash-gauge {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.45rem 0.65rem; border-radius: var(--radius-sm);
  transition: background 0.12s;
}
.dash-gauge:hover { background: rgba(255,255,255,0.03); }
.dash-gauge-icon { font-size: 1.1rem; flex-shrink: 0; width: 1.6rem; text-align: center; }
.dash-gauge-bar-wrap { flex: 1; min-width: 0; }
.dash-gauge-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); margin-bottom: 0.2rem; }
.dash-gauge-bar {
  height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden;
}
.dash-gauge-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.6s ease;
}
.dash-gauge-score { font-size: 0.85rem; font-weight: 800; white-space: nowrap; min-width: 3.2rem; text-align: right; }
.dash-gauge-max { font-size: 0.65rem; font-weight: 500; color: var(--faint); }

/* KPI strip */
.dash-kpi-strip {
  display: flex; flex-direction: column; gap: 0.5rem;
}
.dash-kpi {
  padding: 0.55rem 0.85rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface2);
  text-align: center; min-width: 100px;
  transition: border-color 0.15s, background 0.15s;
}
.dash-kpi:hover { border-color: var(--border-hi); background: var(--border); }
.dash-kpi-val { font-size: 1.35rem; font-weight: 800; line-height: 1; }
.dash-kpi-lbl { font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.15rem; }
.dash-kpi-detail { display: flex; gap: 0.35rem; justify-content: center; margin-top: 0.3rem; }
.dash-kpi-good, .dash-kpi-warn, .dash-kpi-bad {
  font-size: 0.6rem; font-weight: 700; padding: 0 5px; border-radius: 3px;
}
.dash-kpi-good { background: rgba(52,211,153,0.14); color: #52e898; }
.dash-kpi-warn { background: rgba(252,211,77,0.14); color: #fcd34d; }
.dash-kpi-bad  { background: rgba(248,113,113,0.14); color: #f87171; }
.dash-kpi-flag { font-size: 0.62rem; color: var(--yellow); font-weight: 600; margin-top: 0.2rem; }
.dash-kpi-sub  { font-size: 0.6rem; color: var(--faint); margin-top: 0.1rem; }

/* Health trend chart */
.dash-trend {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.75rem 1rem;
  margin-bottom: 1rem; position: relative;
}
.dash-trend-svg { width: 100%; height: auto; display: block; }
.dash-trend-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.3rem; padding: 1.5rem; text-align: center;
}
.dash-trend-empty-title { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.dash-trend-empty-hint  { font-size: 0.75rem; color: var(--muted); }
.dash-trend-tooltip {
  position: absolute;
  background: var(--surface2); border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm); padding: 0.3rem 0.55rem;
  font-size: 0.72rem; font-weight: 600; color: var(--text);
  white-space: nowrap; pointer-events: none;
  box-shadow: var(--shadow-sm);
}
.dash-trend-hit { cursor: pointer; }
.dash-trend-hit:hover { opacity: 0.7; }

/* ── Proposals (in Budget tab) ── */
.prop-section { margin-top: 0.5rem; }
.prop-table th, .prop-table td { padding: 0.45rem 0.6rem; }
.prop-title { font-weight: 600; font-size: 0.85rem; color: var(--text); }
.prop-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 700;
  padding: 2px 8px; border-radius: 10px; border: 1px solid;
  letter-spacing: 0.03em;
}
.prop-badge-draft    { color: #64748b; border-color: #475569; background: #1e293b; }
.prop-badge-sent     { color: #60a5fa; border-color: #3b82f6; background: #1a2744; }
.prop-badge-approved { color: #22c55e; border-color: #16a34a; background: #0a2a1f; }
.prop-badge-declined { color: #ef4444; border-color: #dc2626; background: #2a0a0a; }
.prop-badge-expired  { color: #f59e0b; border-color: #d97706; background: #2a1f0a; }
.pipe-actions { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.5rem; }

/* ── Budget scenario comparison ── */
.sc-section { margin-top: 0.5rem; }
.sc-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.sc-tile {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 1rem; text-align: center;
}
.sc-tile-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.sc-tile-total { font-size: 1.8rem; font-weight: 800; color: var(--text); margin: 0.25rem 0; }
.sc-tile-breakdown { font-size: 0.7rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.1rem; }
.sc-tile-count { font-size: 0.68rem; color: var(--faint); margin-top: 0.2rem; }

.sc-table { border-collapse: collapse; }
.sc-table th, .sc-table td { padding: 0.4rem 0.65rem; }
.sc-desc-header { text-align: left; width: 40%; }
.sc-col-header { text-align: right; width: 20%; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.sc-desc { font-size: 0.8rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.sc-val { text-align: right; font-weight: 600; font-size: 0.82rem; color: var(--text); }
.sc-val-empty { color: var(--faint); font-weight: normal; }
.sc-total { text-align: right; font-weight: 800; font-size: 0.95rem; color: var(--text); border-top: 2px solid var(--border); }

/* ═══════════════════════════════════════════════════════════════════
   PRESENTATION MODE  (?mode=present)
   Full-screen, sidebar-hidden, enlarged-font, keyboard-navigable.
   ═══════════════════════════════════════════════════════════════════ */

/* Hide sidebar + expand main area */
.present-mode .sidebar,
.present-mode .sb-expand-btn,
.present-mode .mobile-backdrop { display: none !important; }
.present-mode .main-area { flex: 1; min-width: 0; }

/* Hide the client-summary action buttons (Report/Share/Executive) — not relevant during presentation */
.present-mode .cs-report-btn,
.present-mode .cs-share-btn,
.present-mode #cs-exec-btn { display: none !important; }

/* Hide the benchmark strip in present mode (reduces chrome) */
.present-mode .benchmark-strip { display: none !important; }

/* Enlarge base fonts across all tab sections */
.present-mode .tab-section {
  font-size: 1.05rem;
}
.present-mode .tab-section h1,
.present-mode .tab-section h2,
.present-mode .tab-section .section-title,
.present-mode .tab-section .assets-heading,
.present-mode .tab-section .mp-title,
.present-mode .tab-section .mp-section-title {
  font-size: 1.25rem;
}
.present-mode .tab-section .data-table th,
.present-mode .tab-section .data-table td {
  font-size: 0.92rem;
  padding: 0.55rem 0.75rem;
}
.present-mode .tab-section .stat-card .stat-val,
.present-mode .tab-section .mp-tile-val {
  font-size: 2rem;
}
.present-mode .tab-section .hw-summary-bar,
.present-mode .tab-section .hw-filter-bar {
  font-size: 0.88rem;
}

/* Dashboard hero score — bigger in present mode */
.present-mode .dash-hero-score { font-size: 5.5rem; }
.present-mode .dash-hero-label { font-size: 1.1rem; }
.present-mode .dash-gauges { gap: 1.5rem; }
.present-mode .dash-gauge-label { font-size: 0.92rem; }
.present-mode .dash-kpi-val { font-size: 2rem; }
.present-mode .dash-kpi-lbl { font-size: 0.82rem; }

/* Topology — bigger device cards */
.present-mode .topo-device { width: 150px; min-height: 115px; }
.present-mode .topo-device-name { font-size: 0.82rem; }
.present-mode .topo-firewall-card { min-width: 280px; max-width: 440px; }
.present-mode .topo-fw-name { font-size: 0.95rem; }

/* Compliance radar — larger */
.present-mode .cmp-cell { width: 72px; min-height: 52px; }
.present-mode .cmp-function-code { font-size: 1.1rem; }
.present-mode .cmp-function-label { font-size: 1rem; }

/* Reduce padding on tab-body / content areas to use more screen */
.present-mode .tab-body,
.present-mode .mp-body,
.present-mode .cmp-body,
.present-mode #hw-assets-content,
.present-mode #net-assets-content,
.present-mode #sw-assets-content,
.present-mode .topo-body {
  padding: 1.5rem 2rem;
}

/* ── Slide indicator bar (fixed bottom) ── */
.present-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 44px;
  background: #0f172a;
  border-top: 1px solid #334155;
  display: flex; align-items: center;
  padding: 0 1rem;
  gap: 0.5rem;
  z-index: 9999;
}
.present-mode .main-area { padding-bottom: 44px; }

.present-nav {
  background: none; border: 1px solid #475569;
  color: #e2e8f0; font-size: 1.25rem; line-height: 1;
  width: 32px; height: 32px; border-radius: 6px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
}
.present-nav:hover { background: #1e293b; }

.present-indicator {
  display: flex; gap: 0.25rem; align-items: center;
}
.present-dot {
  width: 28px; height: 28px;
  border: 1px solid #475569; border-radius: 5px;
  background: none; color: #64748b;
  font-size: 0.72rem; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.present-dot:hover { border-color: #94a3b8; color: #e2e8f0; }
.present-dot.active {
  background: #ea6d24; border-color: #ea6d24; color: white;
}

.present-info {
  flex: 1; text-align: center;
}
.present-keys {
  font-size: 0.7rem; color: #475569; letter-spacing: 0.03em;
}

.present-exit {
  background: none; border: 1px solid #475569;
  color: #94a3b8; font-size: 0.78rem; padding: 0.3rem 0.8rem;
  border-radius: 5px; cursor: pointer;
  transition: all 0.12s;
}
.present-exit:hover { background: #ef4444; border-color: #ef4444; color: white; }

/* Panels grid */
.dash-panels {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.dash-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); display: flex; flex-direction: column;
  overflow: hidden;
}
.dash-panel-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
}
.dash-panel-title { font-size: 0.8rem; font-weight: 700; }
.dash-panel-badge { font-size: 0.68rem; color: var(--muted); }
.dash-panel-body {
  flex: 1; padding: 0.5rem 0.75rem; max-height: 240px; overflow-y: auto;
}
.dash-panel-more {
  padding: 0.45rem 1rem; font-size: 0.72rem; color: var(--accent);
  font-weight: 600; border-top: 1px solid var(--border);
  text-align: center; transition: background 0.12s;
}
.dash-panel-more:hover { background: rgba(236,109,35,0.06); }
.dash-empty-sm { font-size: 0.78rem; color: var(--faint); padding: 1rem 0; text-align: center; }

/* Renewal list */
.dash-renewal-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.35rem; border-radius: var(--radius-sm);
  font-size: 0.78rem; border-left: 3px solid transparent;
}
.dash-renewal-row:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.03); }
.dash-renewal-row.dash-urgent { border-left-color: var(--red); }
.dash-renewal-row.dash-warn   { border-left-color: var(--yellow); }
.dash-renewal-row.dash-ok     { border-left-color: var(--green); }
.dash-renewal-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.dash-renewal-cat  { font-size: 0.68rem; color: var(--faint); white-space: nowrap; }
.dash-renewal-days { font-size: 0.72rem; font-weight: 700; white-space: nowrap; min-width: 3.5rem; text-align: right; }
.dash-urgent .dash-renewal-days { color: var(--red); }
.dash-warn .dash-renewal-days   { color: var(--yellow); }
.dash-ok .dash-renewal-days     { color: var(--green); }
.dash-overdue-badge {
  display: inline-block; background: rgba(248,113,113,0.15); color: var(--red);
  font-size: 0.65rem; font-weight: 700; padding: 1px 6px; border-radius: 3px;
  margin-right: 0.3rem;
}

/* Action items */
.dash-action-row {
  display: flex; align-items: flex-start; gap: 0.5rem;
  padding: 0.4rem 0.35rem; font-size: 0.78rem;
}
.dash-action-row:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.03); }
.dash-action-dot {
  width: 14px; height: 14px;
  flex-shrink: 0; margin-top: 0.2rem;
  color: var(--muted); line-height: 0;
}
.dash-action-dot .si { width: 14px; height: 14px; }
.dash-action-dot.dash-pri-high { color: var(--red); }
.dash-action-dot.dash-pri-med  { color: var(--yellow); }
.dash-action-dot.dash-pri-low  { color: var(--green); }
.dash-action-info { min-width: 0; }
.dash-action-title { display: block; font-weight: 500; }
.dash-action-goal  { display: block; font-size: 0.68rem; color: var(--faint); margin-top: 0.1rem; }

/* Compliance badges */
.dash-fw-list { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 0; }
.dash-fw-badge {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.75rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-size: 0.78rem;
}
.dash-fw-good { border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.06); }
.dash-fw-warn { border-color: rgba(252,211,77,0.3);  background: rgba(252,211,77,0.06); }
.dash-fw-bad  { border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.06); }
.dash-fw-icon { font-size: 1rem; }
.dash-fw-name { font-weight: 600; }
.dash-fw-score { font-weight: 800; margin-left: auto; }
.dash-fw-good .dash-fw-score { color: var(--green); }
.dash-fw-warn .dash-fw-score { color: var(--yellow); }
.dash-fw-bad .dash-fw-score  { color: var(--red); }

/* Pipeline stages */
.dash-pipe-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem; padding: 0.5rem 0;
}
.dash-pipe-stage { text-align: center; }
.dash-pipe-num { font-size: 1.3rem; font-weight: 800; line-height: 1; }
.dash-pipe-lbl { font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.2rem; }
.dash-pipe-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin: 0.3rem auto 0; opacity: 0.8;
}

/* Responsive: stack on narrow screens */
@media (max-width: 900px) {
  .dash-hero-row { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .dash-hero-ring-wrap { width: 160px; height: 160px; }
  .dash-hero-ring { width: 160px; height: 160px; }
  .dash-hero-num { font-size: 2.8rem; }
  .dash-gauges { width: 100%; }
  .dash-kpi-strip { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .dash-panels { grid-template-columns: 1fr; }
}

/* ── Roadmap Filter Toolbar ── */
.toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.toolbar label { font-size: 0.72rem; color: var(--muted); margin-right: 0.2rem; }
.toolbar select, .toolbar input[type=text], .toolbar input[type=search] {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  transition: border-color 0.15s;
}
.toolbar select:hover, .toolbar input:hover { border-color: var(--border-hi); }
.toolbar select:focus, .toolbar input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.toolbar input[type=checkbox] { accent-color: var(--blue); width: 14px; height: 14px; cursor: pointer; }
.count-badge { margin-left: auto; font-size: 0.72rem; color: var(--muted); white-space: nowrap; }

/* ── Buttons ── */
.btn {
  padding: 0.42rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  letter-spacing: 0.01em;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(236,109,35,0.25); }
.btn-primary:hover { background: #d95f1a; box-shadow: 0 4px 14px rgba(236,109,35,0.35); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); border-color: var(--border-hi); }
.btn-danger { background: transparent; color: #f87171; border: 1px solid rgba(248,113,113,0.35); }
.btn-danger:hover { background: rgba(248,113,113,0.1); border-color: #f87171; }
.btn-sm { padding: 0.26rem 0.65rem; font-size: 0.75rem; }
.btn-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: transparent; color: var(--muted);
  cursor: pointer; font-size: 0.85rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.btn-icon:hover { color: var(--text); border-color: var(--border-hi); background: rgba(255,255,255,0.04); }
.btn-icon.danger:hover { color: #f87171; border-color: rgba(248,113,113,0.45); }

/* ── Modal ── */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  width: 460px;
  max-width: 95vw;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1.35rem; letter-spacing: -0.01em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.35rem; }
.modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

/* Detail modal */
.detail-modal { width: 720px; }
.detail-modal-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.35rem; flex-wrap: wrap; }
.detail-modal-header h2 { margin: 0; flex: 1; min-width: 0; }
.detail-grid {
  display: grid; grid-template-columns: 140px 1fr;
  gap: 0.5rem 0.75rem; font-size: 0.85rem;
}
.detail-label { color: var(--muted); font-size: 0.75rem; font-weight: 500; padding-top: 0.1rem; }
.detail-value { word-break: break-word; }

/* ── Form Fields ── */
.field { margin-bottom: 0.95rem; }
.field label { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.35rem; font-weight: 500; letter-spacing: 0.01em; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.48rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-hi); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent; }
.field textarea { resize: vertical; min-height: 70px; line-height: 1.5; }

/* ── Badges ── */
.badge {
  display: inline-block;
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  padding: 0.13rem 0.5rem; border-radius: 9999px;
  letter-spacing: 0.03em;
}
.badge-high     { background: rgba(248,113,113,0.18); color: #f87171; }
.badge-medium   { background: rgba(252,211,77,0.18);  color: #fcd34d; }
.badge-low      { background: rgba(236,109,35,0.18); color: #f0a06a; }
.badge-open     { background: rgba(236,109,35,0.16); color: #f0a06a; }
.badge-done     { background: rgba(52,211,153,0.16);  color: #6ee7b7; }
.badge-manual   { background: rgba(52,211,153,0.16);  color: #6ee7b7; }
.badge-assessment { background: rgba(168,85,247,0.18); color: #c4b5fd; }
.badge-agreement  { background: rgba(30,58,138,0.75);  color: #f0a06a; }
.badge-hardware   { background: rgba(22,78,99,0.75);   color: #67e8f9; }
.badge-sku        { background: rgba(88,28,135,0.55);  color: #d8b4fe; }

/* M365 product sub-rows */
.ct-product-row td { background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.04); }
.ct-product-indent { color: var(--muted); margin-right: 0.3rem; }
.ct-product-name   { padding-left: 1.5rem !important; font-size: 0.8rem; color: var(--fg); opacity: 0.75; }
.ct-qty            { color: var(--muted); font-size: 0.75rem; margin-left: 0.25rem; }
.ct-product-count  { color: var(--muted); font-size: 0.7rem; font-weight: 400; margin-left: 0.4rem; }
.ct-name           { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-client         { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-sortable       { cursor: pointer; user-select: none; transition: color 0.15s; }
.ct-sortable:hover { color: var(--accent); }
.ct-sort-active    { color: var(--accent); font-weight: 600; }

/* ── Loading / Empty ── */
#loading {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); z-index: 300;
  font-size: 0.9rem; color: var(--muted);
  gap: 0.5rem;
}
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid var(--border); border-top-color: var(--blue);
  border-radius: 50%; animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-sm { width: 14px; height: 14px; border-width: 1.5px; }

/* ── Summary bar loading state ── */
.cs-stats-loading {
  display: flex; align-items: center; gap: 0.5rem;
  flex: 1; justify-content: center;
  font-size: 0.78rem; color: var(--faint);
}

/* ── Toast Notifications ── */
#toast-container {
  position: fixed; bottom: 1.25rem; right: 1.25rem;
  z-index: 400; display: flex; flex-direction: column-reverse;
  gap: 0.5rem; pointer-events: none;
}
.toast {
  padding: 0.55rem 1.1rem; border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 600;
  color: #fff; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto; white-space: nowrap;
}
.toast-visible { opacity: 1; transform: translateY(0) scale(1); }
.toast-success { background: #166534; border: 1px solid rgba(52,211,153,0.3); }
.toast-error   { background: #7f1d1d; border: 1px solid rgba(248,113,113,0.3); }
.toast-info    { background: var(--surface2); border: 1px solid var(--border); color: var(--text); }

/* ── Goal Suggestions (post-assessment) ── */
.suggest-panel {
  max-width: 680px; margin: 1.5rem auto; padding: 1.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.suggest-header { margin-bottom: 1rem; }
.suggest-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.suggest-subtitle { font-size: 0.78rem; color: var(--muted); line-height: 1.5; }
.suggest-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.suggest-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.75rem; border-radius: var(--radius-sm);
  background: rgba(248,113,113,0.06); border: 1px solid rgba(248,113,113,0.15);
}
.suggest-info { flex: 1; min-width: 0; }
.suggest-question { font-size: 0.82rem; font-weight: 500; color: var(--text); }
.suggest-answer { font-size: 0.7rem; color: var(--muted); margin-top: 0.15rem; }
.suggest-create-btn { white-space: nowrap; flex-shrink: 0; }
.suggest-created { background: #166534 !important; cursor: default; pointer-events: none; }
.suggest-actions {
  display: flex; justify-content: flex-end; gap: 0.5rem;
  padding-top: 0.75rem; border-top: 1px solid var(--border);
}

/* ── Goal Complete Prompt ── */
.goal-complete-prompt {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem; margin-bottom: 0.75rem;
  background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.25);
  border-radius: var(--radius); opacity: 0; transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.goal-complete-prompt.gcp-visible { opacity: 1; transform: translateY(0); }
.gcp-icon { font-size: 1.5rem; flex-shrink: 0; }
.gcp-body { flex: 1; min-width: 0; }
.gcp-title { font-size: 0.85rem; font-weight: 700; color: #4ade80; }
.gcp-text { font-size: 0.75rem; color: var(--muted); margin-top: 0.1rem; }
.gcp-buttons { display: flex; gap: 0.4rem; flex-shrink: 0; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3.5rem 1rem; color: var(--faint); font-size: 0.85rem; gap: 0.5rem; text-align: center;
}
.empty-icon { font-size: 2.8rem; opacity: 0.25; margin-bottom: 0.25rem; }
.empty-title { font-size: 1rem; font-weight: 600; color: var(--muted); }
.empty-hint {
  font-size: 0.78rem; color: var(--faint); max-width: 380px;
  line-height: 1.55; margin-bottom: 0.35rem;
}
.empty-state .btn { margin-top: 0.25rem; }
.client-gate {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; gap: 0.5rem; color: var(--faint); font-size: 0.85rem; text-align: center;
}
.client-gate .gate-icon { font-size: 2.8rem; opacity: 0.2; margin-bottom: 0.25rem; }
.client-gate .gate-title { font-size: 1.05rem; font-weight: 700; color: var(--muted); }
.client-gate .gate-sub { font-size: 0.78rem; color: var(--faint); max-width: 320px; line-height: 1.5; }

/* ── Tables ── */
.data-table-wrap { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.data-table th {
  text-align: left; padding: 0.48rem 0.75rem;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted);
  border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0;
  background: var(--bg);
}
.data-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid rgba(42,48,82,0.5); vertical-align: middle; }
.data-table tbody tr:hover td { background: rgba(255,255,255,0.022); }
.data-table .actions-cell { white-space: nowrap; text-align: right; }
.row-red    td:first-child { border-left: 3px solid #f87171; }
.row-yellow td:first-child { border-left: 3px solid #fbbf24; }
.row-green  td:first-child { border-left: 3px solid #34d399; }
.row-red    td { background: rgba(248,113,113,0.04); }
.row-yellow td { background: rgba(252,211,77,0.03); }
.days-red    { color: #f87171; font-weight: 700; }
.days-yellow { color: #fbbf24; font-weight: 700; }
.days-green  { color: #34d399; font-weight: 600; }
.days-ok     { color: var(--muted); }
.days-evergreen { color: var(--faint); font-style: italic; }

/* ── Roadmap Board ── */
#board-wrap {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  padding: 1rem 1.5rem;
  gap: 0.85rem;
}
.quarter-col {
  flex-shrink: 0; width: 285px;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.col-header {
  padding: 0.6rem 0.85rem 0.6rem 0.95rem;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; gap: 0.4rem;
}
.col-header-left { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; }
.col-badge {
  font-size: 0.65rem; padding: 0.15rem 0.55rem;
  border-radius: 9999px; font-weight: 700; flex-shrink: 0;
}
.col-add-btn {
  flex-shrink: 0; width: 24px; height: 24px;
  border-radius: var(--radius-sm); border: 1px solid currentColor;
  background: transparent; color: inherit; font-size: 1rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0.65; transition: opacity 0.12s, background 0.12s;
}
.col-add-btn:hover { opacity: 1; background: rgba(255,255,255,0.1); }
[data-q="Q1"] .col-header { background: var(--q1); color: var(--q1b); }
[data-q="Q1"] .col-badge  { background: var(--q1); color: var(--q1b); border: 1px solid var(--q1b); }
[data-q="Q2"] .col-header { background: var(--q2); color: var(--q2b); }
[data-q="Q2"] .col-badge  { background: var(--q2); color: var(--q2b); border: 1px solid var(--q2b); }
[data-q="Q3"] .col-header { background: var(--q3); color: var(--q3b); }
[data-q="Q3"] .col-badge  { background: var(--q3); color: var(--q3b); border: 1px solid var(--q3b); }
[data-q="Q4"] .col-header { background: var(--q4); color: var(--q4b); }
[data-q="Q4"] .col-badge  { background: var(--q4); color: var(--q4b); border: 1px solid var(--q4b); }
[data-q="UN"] .col-header { background: #191d2e; color: var(--unb); }
[data-q="UN"] .col-badge  { background: #191d2e; color: var(--unb); border: 1px solid var(--border); }
.col-cards {
  flex: 1; overflow-y: auto; padding: 0.6rem;
  display: flex; flex-direction: column; gap: 0.45rem; min-height: 80px;
}
.col-cards.drag-over {
  background: rgba(236,109,35,0.07); border-radius: var(--radius);
  outline: 2px dashed var(--blue); outline-offset: -2px;
}

/* ── Renewal Cards ── */
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.6rem 0.75rem; cursor: grab; user-select: none;
  transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s; position: relative;
}
.card:hover { border-color: var(--border-hi); box-shadow: var(--shadow-sm); cursor: pointer; }
.card.dragging   { opacity: 0.4; cursor: grabbing; }
.card.overridden { border-left: 3px solid var(--blue); }
.card.is-manual  { border-left: 3px solid var(--green); }
.card-row1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.4rem; margin-bottom: 0.2rem; }
.card-name { font-size: 0.8rem; font-weight: 600; color: var(--text); line-height: 1.35; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-pill { font-size: 0.6rem; padding: 0.1rem 0.45rem; border-radius: 4px; font-weight: 700; text-transform: uppercase; flex-shrink: 0; }
.src-agreement { background: #3d2410; color: #f0a06a; }
.src-hardware  { background: #164e63; color: #67e8f9; }
.src-manual    { background: #14532d; color: #86efac; }
.card-client { font-size: 0.72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 0.25rem; }
.card-expiry { font-size: 0.72rem; font-weight: 600; }
.card-cat    { font-size: 0.65rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-notes  { font-size: 0.67rem; color: var(--muted); margin-top: 0.25rem; font-style: italic; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.exp-overdue { color: #f87171; }
.exp-soon    { color: #fb923c; }
.exp-warn    { color: #fbbf24; }
.exp-ok      { color: #34d399; }
.exp-later   { color: var(--accent); }
.exp-none    { color: #a78bfa; }
.card-delete {
  position: absolute; top: 4px; right: 6px; width: 18px; height: 18px;
  background: transparent; border: none; color: #f87171; font-size: 0.75rem; line-height: 1;
  cursor: pointer; border-radius: 4px; display: none; align-items: center; justify-content: center; opacity: 0.6;
}
.card.is-manual:hover .card-delete { display: flex; }
.card-delete:hover { opacity: 1; background: rgba(248,113,113,0.14); }
.card.overridden:not(.is-manual)::after { content: '●'; position: absolute; top: 4px; right: 6px; font-size: 0.45rem; color: var(--blue); }
.empty-col { text-align: center; padding: 1.75rem 0.5rem; font-size: 0.75rem; color: var(--faint); }

/* ── Assessments ── */
.assessments-wrap { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; }
.assessment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.assessment-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.35rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}
.assessment-card:hover { border-color: var(--border-hi); box-shadow: var(--shadow); }
.assessment-card.completed { border-left: 3px solid var(--blue); }
.assessment-title { font-size: 0.9rem; font-weight: 700; }
.assessment-meta  { font-size: 0.72rem; color: var(--muted); }
.score-display    { display: flex; align-items: center; gap: 0.75rem; }
.score-circle {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; font-weight: 800; flex-shrink: 0; border: 3px solid;
}
.score-none { border-color: var(--border); color: var(--faint); background: transparent; }
.score-low  { border-color: #f87171; color: #f87171; }
.score-mid  { border-color: #fbbf24; color: #fbbf24; }
.score-high { border-color: #34d399; color: #34d399; }
.score-label { font-size: 0.72rem; color: var(--muted); line-height: 1.55; }

/* Compliance Panel */
.compliance-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem 1.35rem;
  margin-bottom: 1.25rem; box-shadow: var(--shadow-sm);
}
.compliance-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.35rem;
}
.compliance-panel-title {
  font-size: 0.9rem; font-weight: 700;
}
.compliance-panel-hint {
  font-size: 0.72rem; color: var(--muted); margin-bottom: 0.75rem;
}
.fw-overall-score {
  font-size: 0.82rem; font-weight: 700;
}
.fw-panel-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
}
.fw-panel-card {
  display: grid; grid-template-columns: auto auto 1fr auto;
  grid-template-rows: auto auto; column-gap: 0.5rem;
  align-items: center; padding: 0.65rem 0.85rem;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.fw-panel-card:hover { border-color: var(--border-hi); }
.fw-panel-active { border-color: var(--accent); background: rgba(236,109,35,0.06); }
.fw-panel-cb { grid-row: 1; width: 14px; height: 14px; accent-color: var(--accent); }
.fw-panel-icon { grid-row: 1; font-size: 1.1rem; }
.fw-panel-label { grid-row: 1; font-size: 0.82rem; font-weight: 700; }
.fw-panel-score { grid-row: 1; font-size: 0.82rem; font-weight: 800; text-align: right; }
.fw-panel-sub {
  grid-column: 2 / -1; grid-row: 2;
  font-size: 0.68rem; color: var(--muted); line-height: 1.4;
}

/* Framework tags on assessment cards */
.assess-fw-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.assess-fw-tag {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  font-size: 0.65rem; font-weight: 600;
  background: rgba(139,149,184,0.1); color: var(--muted);
  border: 1px solid transparent;
}
.fw-tag-active {
  background: rgba(236,109,35,0.1); color: var(--accent);
  border-color: rgba(236,109,35,0.25);
}

/* Assessment Editor */
.assessment-editor { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; max-width: 860px; }
.assessment-editor-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.live-score-bar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.1rem 1.35rem; margin-bottom: 1.35rem;
  display: flex; align-items: center; gap: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.live-score-num { font-size: 2.4rem; font-weight: 800; min-width: 4.5rem; }
.score-bar-wrap { flex: 1; }
.score-bar-track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.score-bar-fill  { height: 100%; border-radius: 4px; transition: width 0.3s, background 0.3s; }
.score-bar-label { font-size: 0.72rem; color: var(--muted); margin-top: 0.35rem; }
.question-list   { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.5rem; }
.question-row {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.85rem 1.05rem; display: flex; align-items: flex-start; gap: 1rem;
  transition: border-color 0.15s;
}
.question-row:hover { border-color: var(--border-hi); }
.question-text   { flex: 1; font-size: 0.83rem; line-height: 1.55; padding-top: 0.2rem; }
.question-weight { font-size: 0.65rem; color: var(--faint); flex-shrink: 0; padding-top: 0.45rem; white-space: nowrap; }
.answer-group    { display: flex; gap: 0.3rem; flex-shrink: 0; }
.answer-btn {
  padding: 0.3rem 0.65rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: transparent; color: var(--muted); font-size: 0.72rem; font-weight: 600;
  cursor: pointer; transition: all 0.12s; white-space: nowrap;
}
.answer-btn:hover { border-color: var(--border-hi); color: var(--text); }
.answer-btn.sel-yes     { background: rgba(52,211,153,0.18);  border-color: #34d399; color: #34d399; }
.answer-btn.sel-partial { background: rgba(252,211,77,0.18); border-color: #fbbf24; color: #fbbf24; }
.answer-btn.sel-no      { background: rgba(248,113,113,0.18); border-color: #f87171; color: #f87171; }
.editor-actions { display: flex; gap: 0.75rem; align-items: center; }

/* ── Goals ── */
.goal-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 0.6rem; overflow: hidden;
  box-shadow: var(--shadow-sm); transition: border-color 0.15s, box-shadow 0.15s;
}
.goal-card:hover { border-color: var(--border-hi); }
.goal-header {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.85rem 1.05rem; cursor: pointer;
  transition: background 0.12s;
}
.goal-header:hover { background: rgba(255,255,255,0.025); }
.goal-expand { font-size: 0.7rem; color: var(--faint); transition: transform 0.15s; flex-shrink: 0; }
.goal-card.expanded .goal-expand { transform: rotate(90deg); }
.goal-title   { flex: 1; font-size: 0.88rem; font-weight: 600; min-width: 0; }
.goal-desc    { font-size: 0.72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-badges  { display: flex; gap: 0.35rem; flex-shrink: 0; }
.goal-actions-wrap {
  display: none; border-top: 1px solid var(--border);
  padding: 0.8rem 1.05rem; flex-direction: column; gap: 0.4rem;
}
.goal-card.expanded .goal-actions-wrap { display: flex; }
.action-row {
  display: flex; align-items: center; gap: 0.6rem; position: relative;
  padding: 0.48rem 0.65rem; background: var(--bg); border-radius: var(--radius-sm);
  font-size: 0.8rem; border: 1px solid var(--border);
}
.action-row.done .action-title { text-decoration: line-through; color: var(--faint); }
.action-check  { accent-color: var(--blue); cursor: pointer; width: 14px; height: 14px; flex-shrink: 0; }
.action-title  { flex: 1; line-height: 1.4; }
.action-pushed { font-size: 0.65rem; color: var(--blue); white-space: nowrap; flex-shrink: 0; }
.add-action-row { display: flex; gap: 0.5rem; margin-top: 0.25rem; }
.add-action-row input {
  flex: 1; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm); padding: 0.38rem 0.65rem; font-size: 0.8rem;
  transition: border-color 0.15s;
}
.add-action-row input:hover { border-color: var(--border-hi); }
.add-action-row input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

/* ── Refresh Pipeline (inside Budget) ── */
.pipe-section { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.8rem 1rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.pipe-section .section-header { margin-bottom: 0.5rem; }
.pipe-summary { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.pipe-pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.75rem; font-weight: 600;
}
.pipe-pill-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pipe-pill-total { color: var(--blue); font-weight: 700; margin-left: 0.3rem; }
.pipe-table { margin-top: 0.2rem; }
.pipe-row { transition: background 0.12s; }
.pipe-row:hover { background: rgba(255,255,255,0.02); }
.pipe-name { font-size: 0.85rem; font-weight: 500; }
.pipe-sub  { font-size: 0.72rem; color: var(--faint); }
.pipe-stage-pill {
  display: inline-block; border-radius: 4px; padding: 2px 8px;
  font-size: 0.72rem; font-weight: 600; text-transform: capitalize;
}
.pipe-status-sel {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.25rem 0.5rem;
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  min-width: 110px;
}
.pipe-status-sel:focus { outline: none; border-color: var(--blue); }
.pipe-hint {
  font-size: 0.72rem; color: var(--faint); margin-top: 0.45rem; padding: 0 0.25rem;
}

/* ── Revenue Impact Chart (Budget) ── */
.rc-section {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem; background: var(--surface); box-shadow: var(--shadow-sm);
}
.rc-chart { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.75rem; }
.rc-bar-row {
  display: flex; align-items: center; gap: 0.75rem;
}
.rc-bar-label {
  width: 72px; flex-shrink: 0; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; color: var(--muted); letter-spacing: 0.03em;
}
.rc-bar-track {
  flex: 1; height: 28px; background: var(--bg); border-radius: 4px;
  overflow: hidden; display: flex; border: 1px solid var(--border);
}
.rc-seg {
  height: 100%; transition: width 0.4s ease;
  position: relative;
}
.rc-seg:not(:last-child) { border-right: 1px solid rgba(0,0,0,0.25); }
.rc-bar {
  height: 100%; transition: width 0.4s ease;
}
.rc-bar-current { background: var(--blue); opacity: 0.35; }
.rc-bar-delta   { background: #34d399; }
.rc-bar-value {
  flex-shrink: 0; font-size: 0.95rem; font-weight: 800; color: var(--text);
  min-width: 90px; text-align: right;
}
.rc-bar-per { font-size: 0.65rem; font-weight: 500; color: var(--faint); margin-left: 0.15rem; }

.rc-delta-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding-left: calc(72px + 0.75rem); /* align with bar */
}
.rc-delta-badge {
  font-size: 0.75rem; font-weight: 700; color: #34d399;
  background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.2);
  border-radius: var(--radius-sm); padding: 0.15rem 0.5rem;
}
.rc-delta-sub { font-size: 0.7rem; color: var(--faint); }

.rc-legend {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem;
  padding-left: calc(72px + 0.75rem);
}
.rc-legend-item {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.72rem; color: var(--muted);
}
.rc-legend-dot {
  width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0;
}

.rc-annual-row {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding-top: 0.75rem; border-top: 1px solid var(--border);
}
.rc-annual-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.65rem 1rem; min-width: 140px;
}
.rc-annual-projected { border-color: rgba(52,211,153,0.3); }
.rc-annual-invest { border-color: rgba(251,191,36,0.3); }
.rc-annual-label {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  color: var(--faint); letter-spacing: 0.04em; margin-bottom: 0.2rem;
}
.rc-annual-value { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.rc-annual-projected .rc-annual-value { color: #34d399; }
.rc-annual-invest .rc-annual-value { color: #fbbf24; }
.rc-annual-sub { font-size: 0.65rem; color: var(--faint); margin-top: 0.1rem; }
.rc-annual-arrow { font-size: 1.2rem; color: var(--faint); flex-shrink: 0; }

/* ── Assets ── */
#hw-assets-content,
#net-assets-content,
#sw-assets-content { flex: 1; overflow-y: auto; min-height: 0; }

/* ── Meeting Prep tab ── */
.mp-body { flex: 1; overflow-y: auto; min-height: 0; padding: 1.25rem 1.5rem; }
.mp-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap;
}
.mp-title { font-size: 1.35rem; font-weight: 700; margin: 0 0 0.2rem; color: var(--text); }
.mp-sub   { font-size: 0.78rem; color: var(--muted); }
.mp-actions { display: flex; gap: 0.5rem; }
.mp-loading { padding: 2.5rem; text-align: center; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 0.5rem; }

.mp-tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem; margin-bottom: 1.35rem;
}
.mp-tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem 1rem;
  cursor: pointer; text-align: left; transition: border-color 0.15s, transform 0.1s;
}
.mp-tile:hover { border-color: var(--blue); transform: translateY(-1px); }
.mp-tile-val { font-size: 1.6rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.mp-tile-lbl { font-size: 0.72rem; color: var(--muted); margin-top: 0.2rem; text-transform: uppercase; letter-spacing: 0.04em; }

.mp-section { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.mp-section-title { font-size: 0.92rem; font-weight: 700; color: var(--text);
  margin: 0 0 0.7rem; }

.mp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1rem; }
.mp-cols .mp-section { margin-bottom: 0; }

.mp-recs { display: flex; flex-direction: column; gap: 0.55rem; }
.mp-rec {
  display: grid; grid-template-columns: auto 1fr auto; align-items: start;
  gap: 0.75rem; padding: 0.55rem 0.65rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.mp-rec-title  { font-weight: 600; font-size: 0.85rem; color: var(--text); }
.mp-rec-detail { font-size: 0.76rem; color: var(--muted); margin-top: 0.1rem; }

.mp-pill {
  display: inline-block; font-size: 0.64rem; font-weight: 700;
  padding: 2px 8px; border-radius: 10px; border: 1px solid;
  text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;
  align-self: flex-start; margin-top: 0.2rem;
}
.mp-pill-high { color: #f87171; border-color: #ef4444; background: #2a0a0a; }
.mp-pill-med  { color: #fbbf24; border-color: #f59e0b; background: #2a1f0a; }
.mp-pill-low  { color: #60a5fa; border-color: #3b82f6; background: #0a1a2a; }
.mp-pill-agr  { color: #60a5fa; border-color: #3b82f6; background: #1a2744; }
.mp-pill-hw   { color: #a78bfa; border-color: #8b5cf6; background: #1f1a2a; }

.mp-compact { font-size: 0.82rem; }
.mp-compact th, .mp-compact td { padding: 0.35rem 0.5rem; }
.mp-empty { color: var(--muted); font-style: italic; font-size: 0.8rem; padding: 0.5rem 0; }
.mp-more  { font-size: 0.72rem; color: var(--faint); margin-top: 0.4rem; }

.mp-assess-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
}
.mp-assess {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.7rem; text-align: center;
}
.mp-assess-score { font-size: 1.5rem; font-weight: 700; }
.mp-assess-name  { font-size: 0.75rem; color: var(--text); margin-top: 0.15rem; }
.mp-assess-date  { font-size: 0.65rem; color: var(--muted); margin-top: 0.1rem; }

/* ── Changes tab ── */
.ch-section { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-bottom: 0.9rem; }
.ch-section .mp-section-title { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.ch-section-counts { display: inline-flex; gap: 0.3rem; }
.ch-ct { font-size: 0.7rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; border: 1px solid; }
.ch-ct-added    { color: #22c55e; border-color: #16a34a; background: #0a2a1f; }
.ch-ct-removed  { color: #ef4444; border-color: #dc2626; background: #2a0a0a; }
.ch-ct-modified { color: #f59e0b; border-color: #d97706; background: #2a1f0a; }

.ch-item {
  padding: 0.5rem 0.7rem;
  margin-bottom: 0.4rem;
  background: var(--bg); border: 1px solid var(--border);
  border-left: 3px solid var(--border-hi);
  border-radius: var(--radius-sm);
}
.ch-item-added    { border-left-color: #22c55e; }
.ch-item-removed  { border-left-color: #ef4444; }
.ch-item-modified { border-left-color: #f59e0b; }
.ch-item-head { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.ch-item-key  { font-weight: 600; color: var(--text); }

.ch-pill {
  display: inline-block; font-size: 0.62rem; font-weight: 700;
  padding: 1px 7px; border-radius: 10px; border: 1px solid;
  text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;
}
.ch-pill-added    { color: #22c55e; border-color: #16a34a; background: #0a2a1f; }
.ch-pill-removed  { color: #ef4444; border-color: #dc2626; background: #2a0a0a; }
.ch-pill-modified { color: #f59e0b; border-color: #d97706; background: #2a1f0a; }

.ch-detail-list {
  margin: 0.4rem 0 0 1.75rem; padding: 0;
  font-family: monospace; font-size: 0.74rem; color: var(--muted);
  list-style: none;
}
.ch-detail-list li { padding: 0.1rem 0; white-space: pre-wrap; }

.ch-empty { color: var(--muted); font-size: 0.82rem; padding: 0.5rem 0; font-style: italic; }
.ch-more  { font-size: 0.72rem; color: var(--faint); margin-top: 0.4rem; text-align: center; }

/* ── Compliance tab (NIST-CSF / CIS / HIPAA heat map) ── */
.cmp-body { flex: 1; overflow-y: auto; min-height: 0; padding: 1.25rem 1.5rem; }

.cmp-toolbar {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.cmp-toolbar label { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }

.cmp-summary {
  display: grid; grid-template-columns: auto auto 1fr; gap: 1rem;
  align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  margin-bottom: 0.8rem;
}
.cmp-ring { position: relative; width: 64px; height: 64px; }
.cmp-ring svg { width: 100%; height: 100%; }
.cmp-ring-val {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700; color: var(--ring-color, var(--text));
}
.cmp-summary-meta { min-width: 180px; }
.cmp-summary-title { font-size: 0.92rem; font-weight: 700; color: var(--text); }
.cmp-summary-sub   { font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }

.cmp-func-bars { display: flex; flex-direction: column; gap: 0.25rem; }
.cmp-func-bar {
  display: grid; grid-template-columns: 180px 1fr 40px;
  align-items: center; gap: 0.6rem; font-size: 0.76rem;
}
.cmp-func-label { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-func-track { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.cmp-func-fill  { height: 100%; transition: width 0.25s; }
.cmp-func-num   { text-align: right; font-weight: 700; color: var(--text); }

.cmp-legend {
  display: flex; flex-wrap: wrap; gap: 0.9rem;
  padding: 0.55rem 0.8rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 1rem;
  font-size: 0.74rem; color: var(--muted);
}
.cmp-legend-item { display: flex; align-items: center; gap: 0.35rem; }
.cmp-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,0.2); }

/* Heat map */
.cmp-heatmap { display: flex; flex-direction: column; gap: 0.85rem; }
.cmp-function {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem 1rem;
}
.cmp-function-head {
  display: flex; align-items: baseline; gap: 0.5rem;
  margin-bottom: 0.55rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.cmp-function-code  { font-size: 0.95rem; font-weight: 800; color: #ea6d24; }
.cmp-function-label { font-size: 0.88rem; font-weight: 600; color: var(--text); }

.cmp-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 0.75rem;
  align-items: start; padding: 0.35rem 0;
  border-bottom: 1px dashed var(--border);
}
.cmp-row:last-child { border-bottom: none; }
.cmp-row-label   { padding-top: 0.1rem; }
.cmp-row-code    { font-size: 0.78rem; font-weight: 700; color: var(--text); letter-spacing: 0.02em; }
.cmp-row-name    { font-size: 0.72rem; color: var(--muted); margin-top: 0.1rem; line-height: 1.3; }

.cmp-cells { display: flex; flex-wrap: wrap; gap: 4px; }
.cmp-cell {
  width: 62px; min-height: 46px;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 4px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 3px 2px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
  color: white;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}
.cmp-cell:hover { transform: scale(1.08); box-shadow: var(--shadow-md); z-index: 5; position: relative; }
.cmp-cell-id    { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em; }
.cmp-cell-score { font-size: 0.62rem; font-weight: 600; opacity: 0.95; margin-top: 1px; }

/* Popover */
.cmp-popover {
  position: fixed; z-index: 200;
  width: 340px; max-height: 440px;
  background: var(--surface); border: 1px solid var(--border-hi);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 0.85rem 0.95rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  animation: topo-pop-in 0.12s ease-out;
}
.cmp-pop-head { display: flex; align-items: center; gap: 0.5rem; }
.cmp-pop-id   { font-size: 0.82rem; font-weight: 700; color: var(--text); flex: 1; }
.cmp-pop-close {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 1.25rem; line-height: 1; padding: 0 0.25rem;
}
.cmp-pop-close:hover { color: var(--text); }
.cmp-pop-title { font-size: 0.82rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.cmp-pop-desc  { font-size: 0.74rem; color: var(--muted); line-height: 1.4; margin-bottom: 0.25rem; }
.cmp-pop-section {
  font-size: 0.66rem; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-top: 0.35rem;
}
.cmp-pop-levels { display: flex; flex-direction: column; gap: 0.25rem; }
.cmp-pop-level {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.4rem 0.55rem;
  cursor: pointer; font-size: 0.8rem; color: var(--text);
  text-align: left;
}
.cmp-pop-level:hover   { border-color: var(--lvl-color, var(--border-hi)); }
.cmp-pop-level.active  { border-color: var(--lvl-color); box-shadow: 0 0 0 2px var(--lvl-color) inset; }
.cmp-pop-notes {
  width: 100%; min-height: 68px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 0.78rem; padding: 0.4rem 0.55rem;
  border-radius: var(--radius-sm); resize: vertical;
  font-family: inherit;
}
.cmp-pop-actions { display: flex; justify-content: flex-end; gap: 0.4rem; margin-top: 0.25rem; }
.cmp-pop-meta { font-size: 0.68rem; color: var(--faint); text-align: right; }

/* Network Assets — vendor pills */
.net-vendor-pill {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
  border: 1px solid; white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.net-vendor-unifi      { color: #60a5fa; border-color: #3b82f6; background: #1a2744; }
.net-vendor-fortinet   { color: #f87171; border-color: #ef4444; background: #2a1a1a; }
.net-vendor-watchguard { color: #fbbf24; border-color: #f59e0b; background: #2a1f0a; }
.net-vendor-meraki     { color: #34d399; border-color: #10b981; background: #0a2a1f; }
.net-vendor-cisco      { color: #a78bfa; border-color: #8b5cf6; background: #1f1a2a; }
.net-vendor-aruba      { color: #fb923c; border-color: #f97316; background: #2a1a0a; }
.net-vendor-unknown    { color: var(--muted); border-color: var(--border); background: var(--surface); }

/* Network Assets — subtype and stage filter buttons share .hw-filter-btn styling */
.net-sub-btn, .net-stage-btn {
  font: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); padding: 0.28rem 0.75rem;
  border-radius: var(--radius-sm); font-size: 0.78rem;
  transition: all 0.15s;
}
.net-sub-btn:hover, .net-stage-btn:hover {
  border-color: var(--border-hi); color: var(--text);
}
.net-sub-btn.active, .net-stage-btn.active {
  background: var(--blue); border-color: var(--blue); color: white; font-weight: 600;
}
.assets-block { padding: 1.25rem 1.5rem 0.5rem; }
.assets-heading {
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.75rem;
}
.assets-count {
  display: inline-block; background: var(--surface2); color: var(--muted);
  border-radius: 10px; padding: 0 0.45rem; font-size: 0.75rem; margin-left: 0.4rem;
}
.expiry-red    { color: #f87171; font-weight: 600; }
.expiry-yellow { color: #fbbf24; font-weight: 600; }
.expiry-overdue { color: #6b7280; text-decoration: line-through; }

/* ── Lifecycle Stage Badges ── */
.stage-badge {
  display: inline-block; border-radius: 6px; padding: 2px 9px;
  font-size: 0.7rem; font-weight: 700; text-transform: capitalize;
}
.stage-current  { background: rgba(52,211,153,0.14); color: #34d399; }
.stage-aging    { background: rgba(252,211,77,0.14);  color: #fcd34d; }
.stage-critical { background: rgba(248,113,113,0.14); color: #f87171; }
.stage-unknown  { background: rgba(139,149,184,0.14); color: #8b95b8; }

/* Device category badges */
.cat-badge {
  display: inline-block; border-radius: 6px; padding: 2px 9px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}
.cat-endpoint { background: rgba(96,165,250,0.14); color: #60a5fa; }
.cat-server   { background: rgba(168,85,247,0.14); color: #a855f7; }
.cat-network  { background: rgba(236,109,35,0.14); color: #ec6d23; }

/* Firmware cells */
.fw-cell { white-space: nowrap; }
.fw-ver { font-size: 0.78rem; color: var(--fg); }
.fw-eol-pill {
  display: inline-block; border-radius: 4px; padding: 1px 6px;
  font-size: 0.68rem; font-weight: 600; margin-left: 4px;
}
.fw-ok      { background: rgba(52,211,153,0.14); color: #34d399; }
.fw-warning { background: rgba(252,211,77,0.14);  color: #fcd34d; }
.fw-eol     { background: rgba(248,113,113,0.14); color: #f87171; }

/* Category filter buttons */
.hw-cat-btn {
  padding: 3px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: transparent; color: var(--muted); font-size: 0.72rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.hw-cat-btn:hover { border-color: var(--border-hi); color: var(--fg); }
.hw-cat-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.hw-filter-sep { color: var(--border); font-size: 0.9rem; align-self: center; }
.hw-sum-sep { color: var(--border); margin: 0 0.25rem; }

/* Hardware summary banner */
.hw-summary-bar {
  display: flex; gap: 1.25rem; margin-bottom: 0.75rem;
  padding: 0.45rem 0.7rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 600; width: fit-content;
}
.hw-sum-dot { display: inline-flex; align-items: center; margin-right: 2px; line-height: 0; }
.hw-sum-dot .si { width: 12px; height: 12px; }
.dot-current  { color: #34d399; }
.dot-aging    { color: #fbbf24; }
.dot-critical { color: #f87171; }
.hw-sum-item  { display: flex; align-items: center; }
.hw-sum-item.muted { color: var(--muted); }

/* Software Assets — source breakdown bar + inline pills */
.sw-source-bar {
  display: flex; gap: 0.5rem; margin-bottom: 0.75rem;
}
.sw-src-pill {
  display: inline-block;
  font-size: 0.7rem; font-weight: 600;
  padding: 0.15rem 0.55rem; border-radius: 10px;
  border: 1px solid; line-height: 1.4; white-space: nowrap;
}
.sw-src-agreement { color: #60a5fa; border-color: #3b82f6; background: #1a2a44; }
.sw-src-license   { color: #c084fc; border-color: #a855f7; background: #2a1a44; }

/* ── EOL Tracking ── */
.eol-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem;
  background: rgba(248,113,113,0.07); border: 1px solid rgba(248,113,113,0.22);
  border-radius: var(--radius); padding: 0.65rem 1.05rem; margin-bottom: 1rem; font-size: 0.8rem;
}
.eol-banner-item { font-weight: 600; }
.eol-banner-eol     { color: #f87171; }
.eol-banner-warning { color: #fbbf24; }
.eol-banner-hint    { color: var(--muted); margin-left: auto; font-size: 0.72rem; }
.eol-tag-cell { min-width: 180px; }
.eol-tag-select {
  background: var(--bg); border: 1px solid var(--border); color: var(--muted);
  border-radius: var(--radius-sm); padding: 0.2rem 0.45rem; font-size: 0.72rem; cursor: pointer;
  max-width: 180px; width: 100%;
}
.eol-tag-select:focus { outline: 1px solid var(--blue); color: var(--text); }
.eol-pill {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  padding: 2px 8px; border-radius: 5px; white-space: nowrap;
  max-width: 170px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.eol-pill-eol     { background: rgba(248,113,113,0.18); color: #f87171; }
.eol-pill-warning { background: rgba(252,211,77,0.18);  color: #fbbf24; }
.eol-pill-ok      { background: rgba(52,211,153,0.18);  color: #34d399; }

/* ── Meetings ── */
.meetings-list { display: flex; flex-direction: column; gap: 0.5rem; }
.mtg-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: border-color 0.15s;
}
.mtg-card:hover { border-color: var(--border-hi); }
.mtg-card.expanded .mtg-body { display: block; }
.mtg-card.expanded .mtg-expand { transform: rotate(90deg); }
.mtg-header {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 0.9rem; cursor: pointer;
  transition: background 0.12s;
}
.mtg-header:hover { background: rgba(255,255,255,0.025); }
.mtg-expand { font-size: 0.6rem; color: var(--muted); flex-shrink: 0; transition: transform 0.15s; }
.mtg-title { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.2rem; }
.mtg-meta  { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.72rem; }
.mtg-date  { color: var(--muted); }
.mtg-attendees { color: var(--faint); font-style: italic; }
.mtg-actions-badge {
  background: rgba(252,211,77,0.14); color: #fcd34d;
  border-radius: 10px; padding: 1px 7px; font-size: 0.68rem; font-weight: 700;
}
.mtg-actions-badge.done { background: rgba(52,211,153,0.12); color: #34d399; }
.badge-meeting-type { background: rgba(236,109,35,0.18); color: #f0a06a; }
.mtg-body { display: none; border-top: 1px solid var(--border); padding: 0.8rem 0.9rem; }
.mtg-notes { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.75rem; line-height: 1.6; }
.mtg-actions-section { margin-top: 0.25rem; }
.mtg-actions-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--faint); margin-bottom: 0.4rem; }
.action-assignee { font-size: 0.72rem; color: var(--blue); margin-left: 0.3rem; }
.action-due      { font-size: 0.72rem; color: var(--muted); margin-left: 0.3rem; }
.action-assignee-input { width: 130px; font-size: 0.78rem; }
.mtg-edit-btn    { color: var(--muted); font-size: 0.85rem; }
.mtg-edit-btn:hover { color: var(--blue); }
.muted-sm { font-size: 0.75rem; color: var(--faint); padding: 0.2rem 0; }

/* Action item → CW ticket */
.action-create-ticket {
  font-size: 0.78rem; color: var(--muted); cursor: pointer;
  background: none; border: none; padding: 0 0.15rem;
  opacity: 0.5; transition: opacity 0.12s;
}
.action-create-ticket:hover { opacity: 1; }
.action-ticket-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 600;
  color: #22c55e; background: #0a2a1f; border: 1px solid #16a34a;
  padding: 1px 6px; border-radius: 10px; margin-left: 0.3rem;
  cursor: default;
}

/* Meeting → Goal link */
.mtg-link-goal-btn {
  font-size: 0.72rem; opacity: 0.4; transition: opacity 0.15s;
}
.mtg-link-goal-btn:hover { opacity: 1; }
.mtg-goal-badge {
  display: inline-flex; align-items: center; gap: 0.2rem;
  font-size: 0.68rem; font-weight: 600; padding: 0.15rem 0.45rem;
  background: rgba(99,102,241,0.12); color: #818cf8; border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis;
  transition: background 0.15s;
}
.mtg-goal-badge:hover { background: rgba(99,102,241,0.22); }
.mtg-goal-linker {
  position: absolute; right: 0; top: 100%; z-index: 50;
  background: var(--surface2); border: 1px solid var(--border-hi);
  border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 240px; max-width: 340px; max-height: 260px; overflow-y: auto;
  padding: 0.25rem 0;
}
.mtg-goal-linker-header {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  color: var(--faint); padding: 0.4rem 0.75rem 0.25rem; letter-spacing: 0.04em;
}
.mtg-goal-option {
  display: block; width: 100%; text-align: left;
  padding: 0.4rem 0.75rem; font-size: 0.78rem; color: var(--text);
  background: none; border: none; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background 0.1s;
}
.mtg-goal-option:hover { background: rgba(255,255,255,0.06); }
.mtg-goal-unlink { color: #f87171 !important; }
.mtg-goal-unlink:hover { background: rgba(248,113,113,0.1) !important; }

/* ── Licensing ── */
.lic-table .lic-row { cursor: pointer; transition: background 0.12s; }
.lic-table .lic-row:hover { background: rgba(255,255,255,0.025); }
.lic-name-cell { display: flex; flex-direction: column; gap: 0.1rem; }
.lic-name   { font-size: 0.85rem; font-weight: 600; }
.lic-vendor { font-size: 0.72rem; color: var(--faint); }
.lic-per    { font-size: 0.65rem; color: var(--faint); margin-left: 2px; }
.lic-type-pill {
  display: inline-block; background: rgba(236,109,35,0.12); color: var(--accent);
  border-radius: 4px; padding: 1px 7px; font-size: 0.68rem; font-weight: 600;
}
.lic-status-pill {
  display: inline-block; border: 1px solid; border-radius: 4px;
  padding: 1px 7px; font-size: 0.68rem; font-weight: 600;
}
.lic-review-flag {
  color: var(--red); font-size: 0.85rem; margin-left: 0.3rem; vertical-align: middle;
}
.lic-review-label {
  display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; cursor: pointer;
}
.lic-review-label input[type="checkbox"] { accent-color: var(--red); width: 16px; height: 16px; }
.lic-review-hint { font-size: 0.72rem; color: var(--faint); }
.lic-name-meta { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.lic-src-badge {
  display: inline-block; font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px; letter-spacing: 0.03em;
}
.lic-src-forticloud { background: rgba(187,44,40,0.15); color: #bb2c28; }
.lic-src-watchguard { background: rgba(200,55,55,0.15); color: #c83737; }
.lic-serial {
  font-size: 0.65rem; color: var(--faint); font-family: monospace;
  background: rgba(255,255,255,0.04); padding: 0 4px; border-radius: 3px;
}
.lic-synced { border-left: 3px solid rgba(187,44,40,0.35); }

/* ── Reports ── */
.reports-toolbar {
  flex-shrink: 0; padding: 0.7rem 1.5rem;
  border-bottom: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; gap: 0.75rem;
}
.reports-toolbar-title { font-size: 0.95rem; font-weight: 700; }
.reports-list { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 1.2rem; }

.rpt-section-title {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--faint); margin-bottom: 0.65rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.rpt-count {
  background: rgba(236,109,35,0.15); color: var(--blue);
  border-radius: 10px; padding: 1px 8px; font-size: 0.7rem; font-weight: 700;
}

/* Generate report type cards */
.rpt-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.6rem; }
.rpt-type-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.8rem 1rem; display: flex; align-items: center; gap: 0.8rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rpt-type-card:hover { border-color: var(--border-hi); box-shadow: var(--shadow-sm); }
.rpt-type-icon { font-size: 1.6rem; flex-shrink: 0; }
.rpt-type-info { flex: 1; min-width: 0; }
.rpt-type-label { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.15rem; }
.rpt-type-desc  { font-size: 0.75rem; color: var(--muted); line-height: 1.4; }

/* Saved reports list */
.rpt-saved-list { display: flex; flex-direction: column; gap: 0.45rem; }
.rpt-empty {
  text-align: center; padding: 1.5rem; color: var(--faint); font-size: 0.85rem;
}
.rpt-saved-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.7rem 1rem; display: flex; align-items: center; gap: 0.75rem;
  cursor: pointer; transition: border-color 0.15s, background 0.12s;
}
.rpt-saved-card:hover { border-color: var(--border-hi); background: rgba(255,255,255,0.015); }
.rpt-saved-icon { font-size: 1.3rem; flex-shrink: 0; }
.rpt-saved-info { flex: 1; min-width: 0; }
.rpt-saved-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rpt-saved-meta {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  font-size: 0.72rem; color: var(--muted);
}
.rpt-saved-type {
  background: rgba(236,109,35,0.15); color: var(--blue);
  border-radius: 4px; padding: 1px 6px; font-size: 0.68rem; font-weight: 600;
}
.rpt-saved-date { color: var(--muted); }
.rpt-saved-by   { color: var(--faint); font-style: italic; }
.rpt-saved-notes { font-size: 0.75rem; color: var(--faint); margin-top: 0.2rem; }
.rpt-saved-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }

/* ── Hardware lifecycle depth ── */

/* Fleet refresh budget bar */
.hw-budget-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 1.05rem;
  margin-bottom: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: var(--shadow-sm);
}
.hw-budget-title {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--faint);
}
.hw-budget-items { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.hw-budget-item {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.3rem 0.7rem; border-radius: var(--radius-sm); font-size: 0.8rem;
}
.hw-budget-count { font-weight: 600; }
.hw-budget-critical { background: rgba(248,113,113,0.12); color: #f87171; }
.hw-budget-aging    { background: rgba(252,211,77,0.12);  color: #fbbf24; }
.hw-budget-total    { background: rgba(236,109,35,0.12); color: #f0a06a; font-weight: 700; }
.hw-budget-hint  { font-size: 0.72rem; color: var(--faint); }

/* Stage filter bar */
.hw-filter-bar { display: flex; gap: 0.4rem; margin-bottom: 0.65rem; flex-wrap: wrap; }
.hw-filter-btn {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--muted); padding: 0.28rem 0.75rem; font-size: 0.78rem; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.hw-filter-btn:hover  { border-color: var(--blue); color: var(--text); }
.hw-filter-btn.active { border-color: var(--blue); color: var(--blue); background: rgba(236,109,35,0.1); }
.hw-filter-count { opacity: .7; margin-left: 0.25rem; }

/* Hardware table sortable headers */
.hw-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.hw-table th.sortable:hover { color: var(--blue); }
.hw-table th.sort-active   { color: var(--blue); }
.hw-table .hw-row { cursor: pointer; transition: background 0.12s; }
.hw-table .hw-row:hover { background: rgba(255,255,255,0.025); }
.hw-name-cell { display: flex; flex-direction: column; gap: 0.1rem; }
.hw-row-name  { font-size: 0.85rem; font-weight: 500; }
.hw-row-sub   { font-size: 0.72rem; color: var(--faint); }
.hw-cost-val  { font-size: 0.82rem; }
.hw-table-hint { font-size: 0.72rem; color: var(--faint); margin-top: 0.4rem; padding: 0 0.25rem; }

/* Hardware detail modal */
.hw-detail-modal { width: 680px; max-height: 88vh; overflow-y: auto; }
.hw-detail-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 0.8rem;
}
.hw-detail-header-left h2 { margin: 0; }
.hw-detail-sub { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.hw-detail-reason {
  font-size: 0.8rem; color: var(--muted); margin-bottom: 0.8rem;
  padding: 0.45rem 0.7rem;
  background: rgba(255,255,255,0.04); border-radius: var(--radius-sm);
  border: 1px solid var(--border); min-height: 1.6rem;
}
.hw-detail-sec-title {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--faint); margin-bottom: 0.55rem;
}
.hw-detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.hw-dg { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.75rem; align-items: start; }
.hw-dg-lbl { font-size: 0.75rem; color: var(--muted); white-space: nowrap; padding-top: 0.05rem; }
.hw-dg-val { font-size: 0.82rem; }
.hw-planning-section {
  border-top: 1px solid var(--border); padding-top: 0.9rem; margin-top: 0.25rem;
}
.hw-planning-row { display: flex; gap: 0.75rem; margin-bottom: 0.5rem; }
.hw-planning-row .field { flex: 1; }
.hw-cost-row { display: flex; align-items: center; gap: 0.35rem; }
.hw-cost-row input { width: 130px; }

/* Lifecycle progress bar */
.lc-bar-wrap { margin-bottom: 0.7rem; }
.lc-bar {
  height: 9px; background: var(--border); border-radius: 5px;
  position: relative; overflow: visible;
}
.lc-bar-fill { height: 100%; border-radius: 5px; transition: width 0.4s ease; }
.lc-bar-marker {
  position: absolute; top: -3px; bottom: -3px;
  width: 2px; background: var(--border-hi); border-radius: 2px;
}
.lc-bar-labels {
  display: flex; justify-content: space-between;
  font-size: 0.68rem; color: var(--faint); margin-top: 0.25rem;
  position: relative;
}
.lc-bar-mid { position: absolute; transform: translateX(-50%); }

/* ── Roadmap detail modal — device specs section ── */
.dm-hw-section {
  margin-top: 1.35rem;
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
}
.dm-hw-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--faint); margin-bottom: 0.8rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.dm-hw-src-pill {
  font-size: 0.62rem; font-weight: 700; padding: 1px 7px;
  border-radius: 3px; border: 1px solid;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.dm-hw-src-ninja { color: #60a5fa; border-color: #3b82f6; background: #1a2744; }
.dm-hw-src-cw    { color: #c084fc; border-color: #a855f7; background: #2a1a44; }
.dm-hw-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.82rem;
}
.dm-hw-mono { font-family: monospace; font-size: 0.82rem; }
.dm-hw-dim  { color: var(--muted); font-weight: normal; }
.dm-hw-disk-row {
  margin-bottom: 0.35rem; padding-bottom: 0.35rem;
  border-bottom: 1px dashed var(--border);
}
.dm-hw-disk-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.dm-disk-bar {
  margin-top: 3px; height: 5px; background: var(--bg);
  border-radius: 3px; overflow: hidden; border: 1px solid var(--border);
}
.dm-disk-fill { height: 100%; transition: width 0.3s; }
.dm-hw-loading, .dm-hw-empty {
  font-size: 0.78rem; color: var(--faint); padding: 0.5rem 0;
}

/* ── Recommendation cards ── */
.dm-recs-section {
  margin-top: 1.35rem;
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
}
.dm-recs-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--faint); margin-bottom: 0.8rem;
}
.dm-recs-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.rec-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rec-card:hover { border-color: var(--border-hi); box-shadow: var(--shadow-sm); }
.rec-card-good   { border-top: 3px solid #34d399; }
.rec-card-better { border-top: 3px solid var(--blue); }
.rec-card-best   { border-top: 3px solid #a78bfa; }
.rec-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.15rem; }
.rec-tier-badge {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 2px 9px; border-radius: 5px;
}
.rec-tier-good   { background: rgba(52,211,153,0.14); color: #34d399; }
.rec-tier-better { background: rgba(236,109,35,0.14); color: var(--blue); }
.rec-tier-best   { background: rgba(167,139,250,0.14); color: #a78bfa; }
.rec-title-input {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 0.38rem 0.55rem; font-size: 0.82rem; width: 100%;
  font-weight: 600; transition: border-color 0.15s;
}
.rec-title-input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent; }
.rec-desc-input {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 0.38rem 0.55rem; font-size: 0.78rem; width: 100%;
  resize: vertical; min-height: 3.5rem; font-family: inherit; line-height: 1.5;
  transition: border-color 0.15s;
}
.rec-desc-input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent; }
.rec-price-row { display: flex; align-items: center; gap: 0.3rem; }
.rec-price-symbol { color: var(--muted); font-size: 0.82rem; }
.rec-price-input {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 0.32rem 0.45rem; font-size: 0.82rem; width: 80px;
  transition: border-color 0.15s;
}
.rec-price-input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent; }
.rec-ptype-select {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--muted); padding: 0.32rem 0.45rem; font-size: 0.75rem;
  transition: border-color 0.15s;
}
.rec-save-btn { margin-top: auto; width: 100%; }

/* ── IT Health Score Button ── */
.cs-health-btn {
  background: transparent; border: none; padding: 0.2rem 0.5rem;
  cursor: pointer; border-radius: var(--radius-sm);
  transition: filter 0.2s, transform 0.15s, background 0.15s;
  display: flex; flex-direction: row; align-items: center; gap: 0.3rem;
  align-self: center; flex-shrink: 0;
}
.cs-health-btn:hover { filter: brightness(1.15); transform: scale(1.04); background: rgba(255,255,255,0.04); }
.cs-health-label {
  font-size: 0.58rem; color: var(--faint); white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.06em; line-height: 1;
}
.cs-health-btn:hover .cs-health-label { color: var(--blue); }

/* ── IT Health Modal ── */
.health-modal {
  width: 520px;
  max-height: 88vh;
  overflow-y: auto;
}
.hm-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem;
}
.hm-header-left { display: flex; align-items: center; gap: 1rem; }
.hm-score-ring {
  position: relative; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hm-score-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.88rem; font-weight: 800; line-height: 1;
}
.hm-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.hm-label { font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }

/* Component rows */
.hm-components { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 1.35rem; }
.hm-component {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.hm-comp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.55rem; }
.hm-comp-name { font-size: 0.85rem; font-weight: 600; }
.hm-comp-score { font-size: 0.82rem; font-weight: 700; }
.hm-bar-track {
  height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 0.5rem;
}
.hm-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.hm-comp-note { font-size: 0.78rem; color: var(--muted); line-height: 1.5; }
.hm-comp-ok   { color: var(--green); }
.hm-comp-warn { color: var(--yellow); }
.hm-comp-crit { color: var(--red); }

/* Recommendations section */
.hm-recs-title {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--faint); margin-bottom: 0.65rem;
  padding-top: 0.85rem; border-top: 1px solid var(--border);
}
.hm-recs-list { display: flex; flex-direction: column; gap: 0.45rem; }
.hm-rec-item {
  display: flex; align-items: flex-start; gap: 0.65rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem; font-size: 0.82rem; line-height: 1.5;
}
.hm-rec-icon { flex-shrink: 0; font-size: 1rem; margin-top: 0.05rem; }
.hm-rec-text { flex: 1; }
.hm-rec-pts  { flex-shrink: 0; font-size: 0.75rem; font-weight: 700; color: var(--green); white-space: nowrap; }
.hm-perfect {
  text-align: center; padding: 1rem 0.5rem; color: var(--green);
  font-size: 0.88rem; font-weight: 600;
}

/* ── Warranty Lookup ── */

.assets-heading-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}

/* Table badge */
.wl-cell { text-align: center; white-space: nowrap; }
.wl-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 600;
  padding: 1px 6px; border-radius: 3px;
}
.wl-none     { color: var(--faint); }
.wl-error    { color: #f87171; background: #450a0a44; }
.wl-notfound { color: var(--muted); }
.wl-expired  { color: #f87171; background: #450a0a44; }
.wl-expiring { color: #fbbf24; background: #451a0344; }
.wl-active   { color: #22c55e; background: #14532d44; }

/* Modal warranty section */
.wl-result { margin-bottom: 0.5rem; }
.wl-no-serial, .wl-not-checked, .wl-not-found, .wl-error-msg {
  font-size: 0.8rem; color: var(--muted); padding: 0.5rem 0;
}
.wl-error-msg { color: #f87171; }

.wl-result-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.75rem;
  border-left: 3px solid var(--green);
}
.wl-result-card.wl-result-expired  { border-left-color: #f87171; }
.wl-result-card.wl-result-expiring { border-left-color: #fbbf24; }

.wl-result-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.5rem;
}
.wl-result-end { font-size: 1rem; font-weight: 700; }
.wl-result-header .wl-expired  { color: #f87171; font-size: 0.78rem; font-weight: 600; }
.wl-result-header .wl-expiring { color: #fbbf24; font-size: 0.78rem; font-weight: 600; }
.wl-result-header .wl-active   { color: #22c55e; font-size: 0.78rem; font-weight: 600; }

.wl-result-grid {
  display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.75rem;
  font-size: 0.78rem;
}
.wl-rg-lbl { color: var(--muted); font-weight: 600; font-size: 0.72rem; }

.wl-ent-list { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.wl-ent-row {
  display: flex; justify-content: space-between; font-size: 0.72rem;
  padding: 0.15rem 0; color: var(--text);
}
.wl-ent-type  { font-weight: 600; }
.wl-ent-dates { color: var(--muted); }

.wl-inline-status { font-size: 0.7rem; color: var(--faint); margin-left: auto; }

/* ── Network Topology ── */

/* ── Topology ── */

.topo-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border);
}
.topo-toolbar-title { font-size: 1rem; font-weight: 700; }
.topo-toolbar-hint  { font-size: 0.75rem; color: var(--muted); }

.topo-body { flex: 1; overflow-y: auto; padding: 1.25rem; position: relative; }

/* Site selector dropdown */
.topo-site-selector {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1.5rem; justify-content: center;
  flex-wrap: wrap;
}
.topo-site-label {
  font-size: 0.78rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.topo-site-dropdown {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-hi); border-radius: var(--radius-sm);
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer; min-width: 200px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%2394a3b8' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}
.topo-site-dropdown:focus { border-color: var(--accent); outline: none; }
.topo-site-count {
  font-size: 0.68rem; color: var(--faint);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.2rem 0.5rem;
}
.topo-site-single {
  font-size: 0.95rem; font-weight: 700; color: var(--text);
}

/* Site stats bar */
.topo-site-stats {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: 1.5rem; justify-content: center;
}
.topo-stat-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.35rem 0.75rem;
  font-size: 0.78rem; font-weight: 600; color: var(--text);
}
.topo-stat-clients { color: var(--muted); }
.topo-pill-icon { width: 20px; height: 20px; display: inline-flex; }
.topo-pill-icon svg { width: 100%; height: 100%; }

/* Diagram layout */
.topo-diagram {
  display: flex; flex-direction: column; align-items: center;
}

/* Internet cloud */
.topo-cloud { margin-bottom: 0; }
.topo-cloud-icon { width: 120px; height: 72px; margin: 0 auto; }
.topo-cloud-icon svg { width: 100%; height: 100%; }

/* ISP cards below cloud */
.topo-isp-row {
  display: flex; justify-content: center; gap: 0.75rem;
  flex-wrap: wrap; margin-bottom: 0.25rem;
}
.topo-isp-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.4rem 0.75rem;
  text-align: center; min-width: 140px;
}
.topo-isp-name {
  font-size: 0.8rem; font-weight: 700; color: var(--text);
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topo-isp-meta {
  font-size: 0.7rem; color: var(--faint); margin-top: 0.15rem;
  font-family: monospace;
}

/* Vertical trunk line between tiers */
.topo-trunk-line {
  width: 2px; height: 2rem;
  background: var(--border-hi);
}

/* Each tier row */
.topo-tier {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 1000px;
}

.topo-tier-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 700; color: var(--muted); margin-bottom: 0.5rem;
}

/* Horizontal spine line */
.topo-spine {
  width: 80%; height: 2px;
  background: var(--border-hi); border-radius: 1px;
  position: relative;
}
.topo-spine::before,
.topo-spine::after {
  content: ''; position: absolute; top: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-hi);
}
.topo-spine::before { left: -4px; }
.topo-spine::after  { right: -4px; }

/* Device row */
.topo-devices {
  display: flex; justify-content: center; gap: 1.5rem;
  flex-wrap: wrap; padding: 0.75rem 0 1.25rem;
}
.topo-devices-fw { gap: 0; }
.topo-no-data {
  font-size: 0.75rem; color: var(--faint); font-style: italic;
  padding: 0.5rem 0;
}

/* Individual device card (switch / AP) */
.topo-device {
  display: flex; flex-direction: column; align-items: center;
  width: 130px; cursor: pointer; position: relative;
  padding: 0.5rem 0.25rem; border-radius: var(--radius);
  transition: background 0.15s, box-shadow 0.15s;
}
.topo-device:hover {
  background: var(--surface2);
  box-shadow: var(--shadow-sm);
}

/* Connector line from spine to device */
.topo-device-connector {
  width: 2px; height: 14px;
  background: var(--border-hi);
  margin-bottom: 0.25rem;
}

/* Device icon */
.topo-icon {
  width: 64px; height: 64px;
  margin-bottom: 0.35rem;
}
.topo-icon svg { width: 100%; height: 100%; }

/* Status dot */
.topo-status-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  vertical-align: middle; margin-right: 2px; flex-shrink: 0;
}

/* Device text labels */
.topo-device-name {
  font-size: 0.78rem; font-weight: 700; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 2px;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--text);
}
.topo-device-type {
  font-size: 0.68rem; color: var(--muted); text-align: center;
  max-width: 130px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; margin-top: 0.1rem;
}
.topo-device-ip {
  font-size: 0.62rem; color: var(--faint); text-align: center;
  font-family: monospace; margin-top: 0.1rem;
}

/* Firmware badge */
.topo-fw-badge {
  font-size: 0.62rem; font-weight: 600; margin-top: 0.2rem;
  padding: 1px 6px; border-radius: 3px;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.topo-fw-ok   { background: #14532d44; color: #22c55e; }
.topo-fw-warn { background: #451a0344; color: #fbbf24; }
.topo-fw-eol  { background: #450a0a44; color: #ef4444; }

/* ── Topology risk level coloring ── */
.topo-risk-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  z-index: 2; border: 1px solid rgba(0,0,0,0.3);
}
.topo-risk-ok   { /* default — no extra styling */ }
.topo-risk-low  { border-left: 3px solid #3b82f6 !important; }
.topo-risk-med  { border-left: 3px solid #f59e0b !important; box-shadow: 0 0 6px rgba(245,158,11,0.2); }
.topo-risk-high { border-left: 3px solid #ef4444 !important; box-shadow: 0 0 8px rgba(239,68,68,0.25); }
.topo-risk-label {
  font-size: 0.62rem; font-weight: 600; margin-top: 0.15rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px;
}
.topo-site-risk { font-size: 0.72rem; font-weight: 700; margin-left: 0.5rem; }
.topo-pop-risk-reason {
  font-size: 0.72rem; color: var(--muted); padding: 0.15rem 0 0.15rem 0.75rem;
  border-bottom: 1px dashed var(--border);
}
.topo-pop-risk-reason:last-child { border-bottom: none; }

/* Firewall card (special branded card) */
.topo-firewall-card {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1.25rem; border-radius: var(--radius);
  border: 1.5px solid var(--border); min-width: 240px;
  max-width: 380px; position: relative;
  cursor: pointer; transition: transform 0.12s, box-shadow 0.12s;
}
.topo-firewall-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.topo-firewall-card .topo-icon { width: 56px; height: 56px; flex-shrink: 0; }
.topo-fw-info { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.topo-fw-name {
  font-size: 0.85rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topo-fw-model { font-size: 0.72rem; color: var(--muted); }
.topo-vendor-badge {
  display: inline-block; font-size: 0.62rem; font-weight: 700;
  padding: 1px 8px; border-radius: 3px; border: 1px solid;
  text-transform: uppercase; letter-spacing: 0.04em;
  width: fit-content; margin-top: 0.1rem;
}
.topo-fw-firmware { font-size: 0.65rem; color: var(--faint); margin-top: 0.1rem; }
.topo-fw-ip { font-size: 0.62rem; color: var(--faint); font-family: monospace; }
.topo-fw-serial { font-size: 0.6rem; color: var(--faint); font-family: monospace; }

/* Detail popover */
.topo-popover {
  position: absolute; z-index: 100;
  width: 320px;
  background: var(--surface); border: 1px solid var(--border-hi);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 0; overflow: hidden;
  animation: topo-pop-in 0.15s ease-out;
}
@keyframes topo-pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.topo-pop-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem; border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.topo-pop-icon { width: 44px; height: 44px; flex-shrink: 0; }
.topo-pop-icon svg { width: 100%; height: 100%; }
.topo-pop-name { font-weight: 700; font-size: 0.88rem; }
.topo-pop-type { font-size: 0.72rem; color: var(--muted); }
.topo-pop-close {
  margin-left: auto; background: none; border: none;
  color: var(--muted); font-size: 1rem; cursor: pointer;
  padding: 0.25rem;
}
.topo-pop-close:hover { color: var(--text); }
.topo-pop-body { padding: 0.5rem 0.75rem; }
.topo-pop-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.3rem 0; font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
}
.topo-pop-row:last-child { border-bottom: none; }
.topo-pop-label { color: var(--muted); font-weight: 600; font-size: 0.72rem; }
.topo-pop-mono  { font-family: monospace; font-size: 0.75rem; }

/* Expiration / CW details section */
.topo-pop-expirations { border-top: 1px solid var(--border); }
.topo-pop-section-title {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--faint);
  padding: 0.55rem 0.75rem 0.25rem;
}
.topo-pop-config {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.77rem;
}
.topo-pop-config:last-child { border-bottom: none; }
.topo-pop-config-name    { font-weight: 600; color: var(--text); }
.topo-pop-config-meta    { font-size: 0.7rem; color: var(--muted); margin-top: 0.1rem; }
.topo-pop-config-warranty { font-size: 0.72rem; margin-top: 0.15rem; }
.topo-warranty-ok      { color: #22c55e; font-weight: 600; }
.topo-warranty-soon    { color: #fbbf24; font-weight: 600; }
.topo-warranty-expired { color: #ef4444; font-weight: 600; }
.topo-pop-dim          { color: var(--faint); }
.topo-pop-loading, .topo-pop-empty {
  padding: 0.75rem; text-align: center; font-size: 0.75rem; color: var(--faint);
}
/* Popover needs its own scrolling in case of many configs */
.topo-popover { max-height: 480px; display: flex; flex-direction: column; }
.topo-popover .topo-pop-expirations { overflow-y: auto; flex: 1; }

/* Empty state */
.topo-empty {
  text-align: center; padding: 4rem 2rem; color: var(--muted);
}
.topo-empty-icon  { font-size: 3rem; margin-bottom: 0.75rem; }
.topo-empty-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.topo-empty-hint  { font-size: 0.82rem; max-width: 400px; margin: 0 auto; }

/* ── Protection (Huntress EDR) ── */
.prot-wrap { padding: 1.25rem 1.5rem; }
.prot-loading { text-align: center; padding: 3rem; color: var(--muted); }
.prot-error, .prot-unconfigured, .prot-no-org {
  text-align: center; padding: 4rem 2rem; color: var(--muted);
}
.prot-error-icon, .prot-unconf-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.prot-error-msg { font-size: 0.85rem; max-width: 500px; margin: 0 auto; }
.prot-unconf-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.prot-unconf-sub { font-size: 0.82rem; max-width: 500px; margin: 0 auto; line-height: 1.5; }
.prot-unconf-sub code { background: var(--surface2); padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.85em; }

.prot-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.prot-header-left { display: flex; align-items: center; gap: 0.75rem; }
.prot-title { font-size: 1.1rem; font-weight: 700; }
.prot-org-badge {
  font-size: 0.72rem; padding: 0.25rem 0.6rem;
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--muted);
}

/* KPI strip */
.prot-kpi-strip {
  display: flex; gap: 1rem; margin-bottom: 1.25rem;
}
.prot-kpi {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; text-align: center;
}
.prot-kpi-val { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.15rem; }
.prot-kpi-lbl { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.prot-kpi-sub { font-size: 0.7rem; color: var(--faint); margin-top: 0.25rem; }

/* Status dots */
.prot-status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle;
}
.prot-online  { background: var(--green); box-shadow: 0 0 6px rgba(52,211,153,0.4); }
.prot-offline { background: var(--faint); }

/* Panels */
.prot-panels {
  display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; margin-bottom: 1rem;
}
.prot-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; flex-direction: column;
}
.prot-panel-wide { }
.prot-panel-full { margin-bottom: 1rem; }
.prot-panel-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 1rem; border-bottom: 1px solid var(--border);
}
.prot-panel-title { font-size: 0.8rem; font-weight: 700; }
.prot-panel-badge { font-size: 0.68rem; color: var(--muted); }
.prot-panel-body { flex: 1; padding: 0.5rem 0.75rem; max-height: 400px; overflow-y: auto; }
.prot-panel-footer { padding: 0.5rem 1rem; border-top: 1px solid var(--border); }
.prot-gap-summary { font-size: 0.7rem; color: var(--faint); font-style: italic; }

/* Empty state */
.prot-empty { text-align: center; padding: 2rem 1rem; color: var(--faint); }
.prot-empty-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.prot-empty-text { font-size: 0.82rem; }

/* Tables */
.prot-table-wrap { overflow-x: auto; }
.prot-table {
  width: 100%; border-collapse: collapse; font-size: 0.78rem;
}
.prot-table th {
  text-align: left; padding: 0.45rem 0.65rem; font-weight: 600; font-size: 0.7rem;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.prot-table td {
  padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.prot-table tbody tr:hover { background: var(--surface2); }
.prot-inc-title { font-weight: 600; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prot-inc-host { color: var(--muted); font-family: monospace; font-size: 0.75rem; }
.prot-inc-date { color: var(--faint); font-size: 0.72rem; white-space: nowrap; }
.prot-agent-host { font-weight: 600; font-family: monospace; font-size: 0.75rem; }
.prot-agent-ip { font-family: monospace; font-size: 0.75rem; color: var(--muted); }
.prot-agent-date { color: var(--faint); font-size: 0.72rem; white-space: nowrap; }

/* Severity badges */
.prot-sev-badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 10px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}
.prot-sev-critical { background: rgba(248,113,113,0.15); color: #f87171; }
.prot-sev-high     { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.prot-sev-low      { background: rgba(52,211,153,0.12);  color: #34d399; }

/* Status badges */
.prot-status-badge {
  display: inline-block; padding: 0.15rem 0.45rem; border-radius: 10px;
  font-size: 0.68rem; font-weight: 600;
}
.prot-st-open     { background: rgba(251,191,36,0.12); color: #fbbf24; }
.prot-st-resolved { background: rgba(52,211,153,0.1);  color: #34d399; }

/* Coverage gaps list */
.prot-gaps-list { display: flex; flex-direction: column; gap: 0.35rem; }
.prot-gap-item {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm); transition: background 0.15s;
}
.prot-gap-item:hover { background: var(--surface2); }
.prot-gap-icon { font-size: 1rem; flex-shrink: 0; }
.prot-gap-name { font-size: 0.8rem; font-weight: 600; }
.prot-gap-type { font-size: 0.7rem; color: var(--faint); }

/* Responsive */
@media (max-width: 900px) {
  .prot-panels { grid-template-columns: 1fr; }
  .prot-kpi-strip { flex-wrap: wrap; }
  .prot-kpi { min-width: 120px; }
}

/* ── Scrollbars ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hi); }
