
:root {
  --bg: #0b0d14;
  --panel: #141824;
  --panel2: #1a2030;
  --ink: #e8ecf8;
  --muted: #8b93b0;
  --faint: #5c647e;
  --line: #2a3145;
  --line2: #3a435c;
  --ok: #3dcf8e;
  --bad: #ff6b6b;
  --warn: #f0c14a;
  --info: #6ea8ff;
  --accent: #6c8cff;
  --rest: #4a5470;
  --bar: #5b7cfa;
  --neg: #e85d5d;
  --other: #c9a227;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; }
body { max-width: 980px; margin: 0 auto; padding: 24px 20px 80px; }
.top { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.brand h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.3px; }
.summary { margin: 0; color: var(--muted); max-width: 620px; font-size: 14px; }
.top-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.tabs { display: flex; background: var(--panel); border-radius: 999px; padding: 4px; gap: 2px; border: 1px solid var(--line); }
.tab { border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; }
.tab.active { background: var(--panel2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.refresh { border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 700; cursor: pointer; background: var(--ink); color: #0b0d14; }
.refresh:disabled { opacity: .55; cursor: default; }
.note { color: var(--faint); font-size: 13px; min-height: 1.2em; margin: 4px 0 18px; }
.section { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 16px; margin: 0 0 14px; }
.section h2 { margin: 0 0 10px; font-size: 17px; }
.section .caption { margin: -4px 0 12px; color: var(--muted); font-size: 13px; }
.section p { margin: 8px 0; color: var(--ink); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.metric { background: var(--panel2); border-radius: 12px; padding: 12px; border: 1px solid var(--line); }
.metric .v { font-size: 22px; font-weight: 750; letter-spacing: -0.3px; }
.metric .l { color: var(--muted); font-size: 12px; margin-top: 2px; }
.metric .d { color: var(--faint); font-size: 11px; margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: center; }
.sub { background: var(--panel2); border-radius: 12px; padding: 14px; border: 1px solid var(--line); }
.sub h3 { margin: 0 0 10px; font-size: 14px; color: var(--muted); font-weight: 650; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row .title { font-weight: 650; }
.row .detail { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pill { font-size: 12px; font-weight: 750; padding: 3px 8px; border-radius: 999px; align-self: center; white-space: nowrap; }
.pill.ok { background: rgba(61,207,142,.15); color: var(--ok); }
.pill.bad { background: rgba(255,107,107,.15); color: var(--bad); }
.pill.warn { background: rgba(240,193,74,.15); color: var(--warn); }
.pill.info { background: rgba(110,168,255,.15); color: var(--info); }
.progress { margin: 10px 0 4px; }
.progress .track { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress .fill { height: 100%; border-radius: 999px; background: var(--bar); }
.level-labels { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--faint); }
.level-labels .on { color: var(--ink); font-weight: 700; }
.chart-wrap { width: 100%; overflow-x: auto; }
svg.chart { width: 100%; height: auto; display: block; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
table.data th, table.data td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; }
table.data .ok { color: var(--ok); font-weight: 700; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.check { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--line2); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; margin-top: 1px; font-size: 12px; }
.check.on { background: var(--ok); border-color: var(--ok); color: #062016; font-weight: 800; }
.check-meta { color: var(--muted); font-size: 12px; }
.ol { margin: 0; padding-left: 20px; color: var(--ink); }
.ol li { margin: 6px 0; }
.callout { background: rgba(110,168,255,.08); border: 1px solid rgba(110,168,255,.25); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.callout .lead { font-weight: 700; color: var(--info); margin-bottom: 4px; }
.callout .body { color: var(--muted); font-size: 13px; }
.heat { display: grid; gap: 2px; }
.heat .cell { border-radius: 3px; min-height: 10px; }
.heat-legend { display: flex; gap: 4px; align-items: center; color: var(--faint); font-size: 11px; margin-top: 8px; }
.seg { display: inline-flex; background: var(--panel2); border-radius: 999px; padding: 3px; gap: 2px; border: 1px solid var(--line); margin: 0 0 12px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 999px; cursor: pointer; font-weight: 650; font-size: 13px; }
.seg button.on { background: var(--panel); color: var(--ink); }
.hbar { display: grid; grid-template-columns: 110px 1fr 90px; gap: 8px; align-items: center; margin: 6px 0; font-size: 13px; }
.hbar .bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.hbar .bar > i { display: block; height: 100%; background: var(--bar); border-radius: 999px; }
.hbar .bar.em > i { background: var(--accent); }
.hbar .meta { color: var(--faint); font-size: 11px; text-align: right; }
.navrow { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 8px; margin: 8px 0 12px; }
.navrow button, .navrow select {
  border: 1px solid var(--line2); background: var(--panel2); color: var(--ink);
  border-radius: 10px; padding: 10px; font-weight: 650; }
.navrow button:disabled { opacity: .4; }
.cols { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 8px; }
.col { background: var(--panel2); border-radius: 10px; padding: 10px 6px; text-align: center; border: 1px solid var(--line); }
.col .cv { font-weight: 750; font-size: 16px; }
.col .cl { color: var(--muted); font-size: 12px; margin-top: 2px; }
.col.em { outline: 1px solid var(--accent); }
.stack { width: 100%; height: 220px; }
.hourheat { overflow-x: auto; }
.hourheat table { border-collapse: collapse; font-size: 11px; min-width: 720px; }
.hourheat th, .hourheat td { padding: 2px; text-align: center; }
.hourheat th { color: var(--faint); font-weight: 500; }
.hourheat .lab { text-align: left; white-space: nowrap; padding-right: 8px; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.hourheat .hc { width: 22px; height: 16px; border-radius: 3px; }
@media (max-width: 720px) {
  .metrics, .grid2, .cols { grid-template-columns: 1fr 1fr; }
  .top-actions { align-items: stretch; width: 100%; }
  .tabs { width: 100%; }
  .tab { flex: 1; }
}

/* two-handle date navigator */
.rc-nav { margin: 6px 0 4px; }
.rc-track { position: relative; height: 28px; touch-action: none; }
.rc-track::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: var(--line2, #333); }
.rc-sel { position: absolute; top: 9px; height: 10px; border-radius: 5px; background: var(--accent, #6c8cff); opacity: .45; pointer-events: none; }
.rc-track input[type=range] { position: absolute; left: 0; top: 0; width: 100%; height: 28px; margin: 0; background: transparent; pointer-events: none; -webkit-appearance: none; appearance: none; z-index: 3; }
.rc-track input.rc-hi { z-index: 4; }
.rc-track input[type=range]::-webkit-slider-runnable-track { background: transparent; height: 28px; }
.rc-track input[type=range]::-moz-range-track { background: transparent; }
.rc-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 14px; height: 24px; margin-top: 2px; border-radius: 4px; background: var(--panel, #222); border: 2px solid var(--accent, #6c8cff); cursor: ew-resize; }
.rc-track input[type=range]::-moz-range-thumb { pointer-events: auto; width: 12px; height: 22px; border-radius: 4px; background: var(--panel, #222); border: 2px solid var(--accent, #6c8cff); cursor: ew-resize; }
.rc-track input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--ink, #fff); }
.rc-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.rc-meta .rc-count { flex: 1; text-align: center; color: var(--faint); }
.rc-reset { border: 1px solid var(--line); background: var(--panel2); color: var(--muted); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.rc-reset:disabled { opacity: .4; cursor: default; }

#refresh{display:none!important}
