.hourly-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 16px;
}
.hourly-header, .hourly-filters, .hourly-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.hourly-header { justify-content: space-between; align-items: end; }
.hourly-header h2 { margin: 0; font-size: 20px; }
.hourly-header p, .hourly-status { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.hourly-filters label { min-width: 0; max-width: 100%; }
.hourly-filters select { width: min(240px, 100%); }
.hourly-legend { margin-top: 16px; font-size: 13px; font-weight: 700; }
.hourly-legend span::before {
  content: "";
  display: inline-block;
  width: 16px;
  border-top: 3px solid #2458c9;
  margin-inline-end: 6px;
  vertical-align: middle;
}
.hourly-legend span + span::before { border-color: #087963; border-top-style: dashed; }
.hourly-legend #hourlyCompareLegend::before { border-top-style: dotted; border-color: var(--muted); }
.hourly-legend .occupancy-legend::before { border-top-style: solid; border-color: var(--chart-occupancy); }
.hourly-filters [hidden], .hourly-legend [hidden] { display: none; }
.snapshot-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.crew-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--chart-occupancy);
  border-radius: 8px;
  background: var(--panel);
}
.crew-status[data-state="live"] { border-inline-start-color: var(--chart-out); }
.crew-status span { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.crew-status strong { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.crew-status[data-state="attention"] [role="status"] { color: var(--chart-occupancy); }
.crew-heading { margin: 20px 0 12px; font-size: 20px; }
.summary .metric:has(#totalOccupancy) { border-top: 3px solid var(--blue); }
#totalOccupancy { color: var(--blue); }
:root { --chart-in: #2458c9; --chart-out: #087963; --chart-occupancy: #92500d; }
.hourly-legend span:first-child::before { border-color: var(--chart-in); }
.hourly-legend span:nth-child(2)::before { border-color: var(--chart-out); }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #151923;
  --ink: #f8faff;
  --muted: #c3cddd;
  --line: #536078;
  --blue: #9dbbff;
  --green: #63e6ac;
  --red: #ff9da6;
  --chart-in: #9dbbff;
  --chart-out: #63e6ac;
  --chart-occupancy: #ffc37c;
}
[data-theme="dark"] :is(input, select, button.secondary, th, .token-result, .token-result code, .device-row code, dialog) {
  background: var(--panel);
  color: var(--ink);
}
[data-theme="dark"] button:not(.secondary) { color: #101625; }
[data-theme="dark"] .report-nav a:is(:first-child, :hover, :focus-visible) { background: #243653; color: #dce8ff; }
[data-theme="dark"] .live-notice.warning { color: #ffbd80; }
[data-theme="dark"] .presentation-ticker-track strong { color: var(--green); }
[data-theme="dark"] .hourly-plot line { stroke: var(--line); }
[data-theme="dark"] :focus-visible { outline-color: var(--green); }
.hourly-plot { position: relative; width: 100%; min-height: 230px; }
.chart-guide { stroke: var(--muted); stroke-dasharray: 3 3; visibility: hidden; pointer-events: none; }
.chart-tip {
  position: absolute;
  top: 8px;
  z-index: 2;
  box-sizing: border-box;
  width: min(224px, 100%);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 4px 14px #10162524;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.chart-tip-time { display: block; margin-bottom: 5px; font-size: 14px; }
.chart-tip-date { color: var(--muted); font-size: 12px; }
.chart-tip-period + .chart-tip-period { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.chart-tip-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 7px 0 0; }
.chart-tip-metrics dt { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.chart-tip-metrics dd { margin: 2px 0 0; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.chart-tip-in dd { color: var(--chart-in); }
.chart-tip-out dd { color: var(--chart-out); }
.chart-tip-occupancy dd { color: var(--chart-occupancy); }
.hourly-plot svg { display: block; width: 100%; height: 230px; overflow: visible; }
.hourly-plot text { fill: var(--muted); font: 12px Arial, sans-serif; }
.hourly-panel table { min-width: 0; }
@media (max-width: 480px) {
  .hourly-filters { width: 100%; }
  .hourly-filters label { flex: 1 1 120px; }
  .hourly-filters select { width: 100%; }
}
:root {
  --bg: #f5f6f8;
  --panel: #fff;
  --ink: #172337;
  --muted: #526177;
  --line: #e1e6ee;
  --blue: #2458c9;
}
#dashboardView { position: relative; width: min(1380px, calc(100% - 32px)); padding-inline-start: 178px; }
.report-title { margin: 0 0 16px; font-size: 24px; }
.report-nav {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  display: grid;
  width: 156px;
  padding: 8px;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.report-nav a {
  color: var(--ink);
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
}
.report-nav a:first-child, .report-nav a:hover, .report-nav a:focus-visible {
  background: #e9f0ff;
  color: #1946aa;
}
@media (max-width: 820px), (aspect-ratio < 16/9) {
  #dashboardView { width: calc(100% - 32px); padding-inline-start: 0; }
  .report-nav {
    position: static;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 14px;
  }
}
.presentation {
  background: var(--bg);
  color: var(--ink);
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  gap: 16px;
}
.presentation-top { flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.presentation-title { min-width: 0; }
.presentation-title strong { font-size: 32px; line-height: 1.15; overflow-wrap: anywhere; }
.presentation-title span, .presentation-label, .presentation-updated, .presentation-zone span { color: var(--muted); }
.presentation-actions { flex-wrap: wrap; }
.presentation-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; overflow: auto; }
.presentation-total, .presentation-zone {
  background: var(--panel);
  border-color: var(--line);
}
.presentation-total { border-top: 4px solid var(--blue); min-width: 0; }
.presentation-number {
  color: var(--blue);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.presentation-label { font-size: 22px; letter-spacing: 0; }
.presentation-zones {
  background: transparent;
  border: 0;
  padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}
.presentation-zone { min-width: 0; overflow-wrap: anywhere; }
.presentation-zone h2 { font-size: 20px; }
.presentation-zone strong { color: var(--ink); font-size: 48px; font-variant-numeric: tabular-nums; }
.presentation-ticker { background: var(--panel); border-color: var(--line); }
.presentation-ticker-track { font-size: 20px; letter-spacing: 0; }
.presentation-ticker-track strong { color: #087963; }
@media (max-width: 820px) {
  .presentation-main { grid-template-columns: minmax(0, 1fr); }
  .presentation-title strong { font-size: 24px; }
  .presentation-total { padding: 14px; }
  .presentation-number.digits-4, .presentation-number.digits-5, .presentation-number.digits-6 { font-size: 60px; }
  .presentation-zone strong { font-size: 36px; }
}
@media (max-width: 420px) {
  .presentation-number.digits-5, .presentation-number.digits-6 { font-size: 42px; }
}
@media (max-width: 640px) {
  .presentation:not([hidden]) { padding: 12px; gap: 10px; grid-template-rows: auto minmax(0, 1fr); }
  .presentation .presentation-top { gap: 8px; padding-bottom: 8px; }
  .presentation .presentation-title { gap: 3px; }
  .presentation .presentation-title strong { font-size: 20px; }
  .presentation .presentation-updated { font-size: 13px; }
  .presentation .presentation-actions { gap: 6px; }
  .presentation .presentation-main { gap: 8px; align-content: start; }
  .presentation .presentation-total { gap: 5px; padding: 10px; }
  .presentation .presentation-number[class*="digits-"] { font-size: 62px; }
  .presentation .presentation-number:is(.digits-4,.digits-5,.digits-6) { font-size: 44px; }
  .presentation .presentation-label { font-size: 14px; }
  .presentation .presentation-zones { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 0; overflow: visible; }
  .presentation .presentation-zone { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 3px; align-items: center; padding: 10px 12px; }
  .presentation .presentation-zone h2 { font-size: 16px; }
  .presentation .presentation-zone strong { grid-column: 2; grid-row: 1 / span 2; font-size: 30px; text-align: right; }
  .presentation .presentation-zone span { grid-column: 1; font-size: 13px; }
  .presentation .presentation-ticker { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .presentation-ticker-track { animation: none; }
}
