:root {
  color-scheme: dark;
  --bg: #10151a;
  --surface: #1b2229;
  --surface-2: #202932;
  --surface-3: #252f39;
  --line: #34414c;
  --grid: rgba(130, 160, 184, 0.27);
  --muted: #9aa9b5;
  --text: #f1f6f8;
  --in: #29d878;
  --out: #199cff;
  --cpu: #b8dd39;
  --amber: #e4a83c;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
h1, h2, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.05; }
h2 { font-size: 16px; }
.report-shell { width: min(1780px, 100%); margin: 0 auto; padding: 22px; }
.report-topbar, .topbar-actions, .dashboard-nav, .sync-state, .section-title, .legend, .server-meta, .application-head, .daily-row, .month-summary { display: flex; align-items: center; }
.report-topbar { justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.topbar-actions { justify-content: flex-end; gap: 14px; }
.eyebrow { margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.dashboard-nav { gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.dashboard-nav a { padding: 8px 12px; border-radius: 5px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 750; }
.dashboard-nav a:hover, .dashboard-nav a.active { background: var(--surface-3); color: var(--text); }
.sync-state { gap: 10px; color: var(--muted); font-size: 12px; }
#modePill { padding: 6px 9px; border: 1px solid rgba(41,216,120,.36); border-radius: 999px; color: var(--in); background: rgba(41,216,120,.1); font-size: 10px; font-weight: 850; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-bottom: 8px; }
.summary-grid article, .server-column, .side-panel { border: 1px solid var(--line); background: var(--surface); }
.summary-grid article { min-width: 0; padding: 12px 14px; border-radius: 6px; }
.summary-grid span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.summary-grid strong { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 21px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(720px, 1.55fr) minmax(390px, .75fr); gap: 8px; align-items: start; }
.server-column { min-width: 0; border-radius: 6px; overflow: hidden; }
.report-column { min-width: 0; display: grid; gap: 8px; }
.section-title { min-height: 48px; justify-content: space-between; gap: 14px; padding: 9px 12px; background: var(--surface-3); }
.section-title.compact { min-height: 44px; }
.legend { gap: 8px; color: var(--muted); font-size: 10px; font-weight: 850; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; }
.legend .in::before { background: var(--in); }.legend .out::before { background: var(--out); }.legend .cpu::before { background: var(--cpu); }
.server-rows { display: grid; }
.server-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(240px, .92fr); border-top: 1px solid var(--line); }
.server-row:first-child { border-top: 0; }
.chart-cell { min-width: 0; padding: 0; background: var(--surface-2); }
.chart-cell + .chart-cell { border-left: 6px solid var(--bg); }
.chart-title { height: 25px; padding: 5px 9px; overflow: hidden; background: #26313b; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 820; text-transform: uppercase; }
.server-canvas { display: block; width: 100%; height: 124px; }
.server-meta { justify-content: space-between; gap: 9px; padding: 5px 9px 7px; color: #dbe5ea; font-size: 10px; font-weight: 700; }
.server-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-panel { border-radius: 6px; overflow: hidden; }
.application-list, .daily-list { max-height: 250px; overflow: auto; }
.host-group { border-top: 1px solid var(--line); }
.host-label { padding: 7px 10px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 10px; font-weight: 800; }
.host-label.unavailable { color: #75838e; }
.application-row { padding: 8px 10px; border-top: 1px solid rgba(255,255,255,.045); }
.application-head { justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 750; }
.application-head span:last-child { color: var(--out); white-space: nowrap; }
.app-bar { height: 4px; margin-top: 6px; overflow: hidden; background: rgba(255,255,255,.06); }
.app-bar i { display: block; height: 100%; width: var(--width); background: var(--out); }
.application-sub { margin-top: 4px; color: var(--muted); font-size: 9px; }
.daily-row { justify-content: space-between; gap: 12px; padding: 9px 11px; border-top: 1px solid rgba(255,255,255,.055); font-size: 11px; }
.daily-row time { color: var(--muted); }.daily-row strong { font-size: 12px; }.partial-tag { margin-left: 5px; color: var(--amber); font-size: 8px; font-weight: 800; text-transform: uppercase; }
select { max-width: 150px; padding: 7px 26px 7px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); font: inherit; font-size: 11px; }
.month-summary { justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.month-summary strong { color: var(--text); font-size: 16px; }
.table-wrap { max-height: 240px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 10px; }
th, td { padding: 8px 10px; border-top: 1px solid rgba(255,255,255,.06); text-align: left; }
th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font-size: 9px; text-transform: uppercase; }
th:last-child, td:last-child { text-align: right; white-space: nowrap; }
.empty { padding: 14px 11px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.coverage-note { padding: 2px 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.error-banner { margin-top: 8px; padding: 10px 12px; border: 1px solid rgba(255,107,107,.45); background: rgba(255,107,107,.1); color: #ffd1d1; font-size: 11px; }
@media (max-width: 1150px) { .dashboard-grid { grid-template-columns: 1fr; }.report-column { grid-template-columns: repeat(2,minmax(0,1fr)); }.monthly-panel, .coverage-note { grid-column: 1 / -1; } }
@media (max-width: 760px) { .report-shell { padding: 12px; }.report-topbar, .topbar-actions { align-items: flex-start; flex-direction: column; }.summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.server-row { grid-template-columns: 1fr; }.chart-cell + .chart-cell { border-left: 0; border-top: 6px solid var(--bg); }.report-column { grid-template-columns: 1fr; }.monthly-panel, .coverage-note { grid-column: auto; } }
