
:root { --bg: #0f1420; --panel: #171d2c; --panel-2: #222a3c; --line: #2b3448; --text: #f2f4f8; --text-dim: #9aa3b5;
  --ok: #2e9e5b; --attention: #e0b000; --warning: #e07b28; --critical: #d8434f; --stale: #7b5cd6; --unknown: #6b7280;
  --accent: #3d7bd9; --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; }
.screen-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; gap: 10px; color: var(--text); font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }
.screen-wrap > .screen-main { flex: 1; min-height: 0; height: auto; display: grid; gap: 14px; grid-template-rows: auto auto 1fr auto; align-content: start; }
.screen-line { display: flex; gap: 24px; align-items: baseline; flex-wrap: wrap; color: var(--text-dim); font-size: clamp(14px, 1.2vw, 24px); }
.screen-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-height: 0; }
.screen-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; min-height: 0; }
.screen-row-bottom { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 14px; min-height: 0; }
.screen-weekly > .screen-main, .screen-monthly, .screen-sessions, .screen-customers, .screen-health { min-height: 0; }
.screen-customers { grid-template-rows: auto 1fr; }
.screen-health { grid-template-rows: auto 1fr; }
.stat-grid { display: grid; gap: 18px; height: 100%; }
.stat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.big-stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.big-stat .label { font-size: clamp(14px, 1.1vw, 22px); color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.big-stat .value { font-size: clamp(40px, 4.5vw, 96px); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.big-stat .sub { font-size: clamp(13px, 1vw, 18px); color: var(--text-dim); }
.big-stat.tone-ok { border-left: 8px solid var(--ok); }
.big-stat.tone-attention { border-left: 8px solid var(--attention); }
.big-stat.tone-warning { border-left: 8px solid var(--warning); }
.big-stat.tone-critical { border-left: 8px solid var(--critical); }
.big-stat.tone-neutral { border-left: 8px solid var(--unknown); }
.big-stat.panel { justify-content: flex-start; padding: 14px 18px; gap: 6px; }
.big-stat.panel .label { font-size: clamp(12px, 0.95vw, 18px); }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: clamp(12px, 0.9vw, 16px); text-transform: uppercase; letter-spacing: 0.5px; color: #fff; background: var(--unknown); }
.badge.ok { background: var(--ok); }
.badge.attention { background: var(--attention); color: #211a00; }
.badge.warning { background: var(--warning); color: #241000; }
.badge.critical { background: var(--critical); }
.badge.stale { background: var(--stale); }
.badge.unknown { background: var(--unknown); }
.data-age { display: flex; flex-wrap: wrap; gap: 4px 22px; color: var(--text-dim); font-size: clamp(12px, 0.95vw, 17px); font-variant-numeric: tabular-nums; }
.data-age .stale-note { color: #fff; background: var(--stale); padding: 0 8px; border-radius: 4px; font-weight: 700; }
.display-table { width: 100%; border-collapse: collapse; }
.display-table th { text-align: left; font-size: clamp(13px, 1vw, 20px); color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; padding: 8px 14px; border-bottom: 2px solid var(--line); }
.display-table td { font-size: clamp(16px, 1.4vw, 28px); padding: 10px 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.display-table td .sub { font-size: clamp(11px, 0.85vw, 15px); color: var(--text-dim); }
.display-table td.err-cell { font-size: clamp(11px, 0.9vw, 16px); color: var(--text-dim); max-width: 24em; overflow-wrap: anywhere; }
.display-table .num, .display-table th.num { text-align: right; }
.display-table tr.critical td { background: rgba(216, 67, 79, 0.16); }
.display-table tr.warning td { background: rgba(224, 123, 40, 0.12); }
.display-table.compact-table th { font-size: clamp(11px, 0.85vw, 16px); padding: 6px 10px; white-space: nowrap; }
.display-table.compact-table td { font-size: clamp(13px, 1.05vw, 20px); padding: 7px 10px; white-space: nowrap; }
.chart-wrap { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; }
.chart-wrap svg { width: 100%; height: auto; max-height: 100%; min-height: 0; }
.chart-legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--text-dim); font-size: clamp(12px, 0.95vw, 17px); }
.chart-legend .key { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend .swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.stacked-bar { display: flex; gap: 2px; height: clamp(22px, 2vw, 34px); }
.stacked-bar .seg { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: clamp(11px, 0.85vw, 16px); color: #fff; min-width: 0; overflow: hidden; }
.stacked-bar .seg:first-child { border-radius: 6px 0 0 6px; }
.stacked-bar .seg:last-child { border-radius: 0 6px 6px 0; }
.stacked-bar-row { display: flex; align-items: center; gap: 12px; }
.stacked-bar-row .sb-label { color: var(--text-dim); font-size: clamp(12px, 0.95vw, 17px); min-width: 9em; }
.stacked-bar-row .sb-track { flex: 1; min-width: 0; }
.stacked-bar-row .sb-total { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 3em; text-align: right; font-size: clamp(13px, 1vw, 20px); }
@media (max-width: 1100px) {
  .screen-row-bottom { grid-template-columns: 1fr 1fr; }
  .stat-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .screen-row-2, .screen-row-3 { grid-template-columns: 1fr; }
}
