:root {
  --bg: #0b0d12;
  --panel: #12151d;
  --panel-2: #161a24;
  --line: #232936;
  --line-2: #2c3444;
  --text: #e6e9ef;
  --dim: #8b94a7;
  --dimmer: #5c6577;
  --accent: #5b9dff;
  --accent-dim: #24406b;
  --bar: #1e3357;
  --warn: #e0b341;
  --bad: #ff6b6b;
  --good: #4ec98a;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.92em; }

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap; row-gap: 8px;
}
.brand { font-weight: 650; letter-spacing: 0.2px; font-size: 15px; display: flex; align-items: center; }
.brand .logo { color: var(--accent); margin-right: 7px; display: inline-flex; }
.brand .logo svg { width: 21px; height: 21px; }
.brand .dim { color: var(--dimmer); font-weight: 400; }
.status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 11px; font-size: 12px; color: var(--dim);
}
.pill b { color: var(--text); font-weight: 600; }
.pill-accent { border-color: var(--accent-dim); color: #bcd4ff; }
.pill.dim { color: var(--dimmer); }
/* tz selector styled as a pill */
.tz-pick { padding: 0; display: inline-flex; cursor: pointer; }
.tz-pick select {
  appearance: none; -webkit-appearance: none; background: transparent; border: none;
  color: var(--dim); font-size: 12px; font-family: var(--sans); padding: 3px 22px 3px 11px;
  cursor: pointer; border-radius: 999px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='6' viewBox='0 0 8 6'><path d='M0 0l4 6 4-6z' fill='%238b94a7'/></svg>");
  background-repeat: no-repeat; background-position: right 9px center;
}
.tz-pick:hover { border-color: var(--line-2); }
.tz-pick select:focus { outline: none; color: var(--text); }
.tz-pick select option { background: var(--panel-2); color: var(--text); }
/* reliability incident timeline */
.timeline { margin: 10px 0 6px; }
.incident {
  display: flex; gap: 14px; padding: 11px 14px; margin-bottom: 9px;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--dimmer); border-radius: 10px;
}
.incident.inc-spot { border-left-color: #7fb2ff; }
.incident.inc-maintenance { border-left-color: var(--warn); }
.incident.spiked { border-left-color: var(--bad); background: rgba(208, 59, 59, 0.06); }
.inc-when { flex: none; width: 118px; text-align: right; }
.inc-ago { font-size: 12.5px; color: var(--text); font-weight: 600; }
.inc-abs { font-size: 10.5px; color: var(--dimmer); margin-top: 2px; }
.inc-body { flex: 1; min-width: 0; }
.inc-head { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; }
.inc-label { font-weight: 600; color: var(--text); }
.inc-node { font-size: 11px; color: var(--dimmer); }
.inc-line { font-size: 12.5px; margin-top: 5px; color: var(--dim); line-height: 1.5; }
.inc-line b { color: var(--text); }
.podchip {
  display: inline-block; font-size: 11px; font-family: var(--mono);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; margin: 2px 4px 2px 0; color: var(--dim); white-space: nowrap;
}
@media (max-width: 720px) { .incident { flex-direction: column; gap: 4px; } .inc-when { width: auto; text-align: left; } }

/* clickable chart bars (hbar with href) */
.barlink { cursor: pointer; }
.barlink text { pointer-events: none; }
.barlink:hover rect { opacity: 0.82; }

/* cluster selector — the top-level dimension */
.cluster-select {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-dim); border: 1px solid var(--accent-dim);
  border-radius: 999px; padding: 2px 6px 2px 11px;
}
.cluster-select .cs-label { font-size: 11px; color: #bcd4ff; text-transform: uppercase; letter-spacing: 0.04em; }
.cluster-select select {
  background: transparent; color: #eaf1ff; border: 0; font-weight: 650;
  font-size: 13px; font-family: var(--sans); cursor: pointer; padding: 2px 4px;
}
.cluster-select select option { background: var(--panel-2); color: var(--text); }

/* ---- tabs ---- */
.tabs {
  display: flex; align-items: center; gap: 4px;
  padding: 0 16px; background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.tab {
  padding: 9px 14px; color: var(--dim); font-weight: 550; font-size: 13px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.spacer { flex: 1; }
.ranges {
  display: flex; gap: 2px; align-items: center;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px;
}
.range {
  padding: 3px 9px; font-size: 12px; color: var(--dim); border-radius: 999px;
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.range:hover { background: var(--panel); text-decoration: none; color: var(--text); }
.range.on { background: var(--accent-dim); color: #cfe0ff; }

/* custom start/end range — a dropdown off the "custom" chip */
.customrange { position: relative; }
.customrange > summary { list-style: none; }
.customrange > summary::-webkit-details-marker { display: none; }
.customrange .cr-form {
  position: absolute; right: 0; top: 150%; z-index: 40;
  display: flex; flex-direction: column; gap: 9px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); min-width: 232px;
}
.cr-form label {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.04em;
}
.cr-form input[type="datetime-local"] {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 5px 8px; font-size: 12.5px; font-family: var(--sans); color-scheme: dark;
}
.cr-form button {
  margin-top: 2px; background: var(--accent-dim); color: #dbe7ff; border: 1px solid var(--accent-dim);
  border-radius: 6px; padding: 6px 10px; font-size: 12.5px; cursor: pointer; font-family: var(--sans);
}
.cr-form button:hover { filter: brightness(1.15); }

/* ---- page ---- */
main { padding: 22px 20px 60px; max-width: 1220px; margin: 0 auto; }
.page-head { margin-bottom: 16px; }
.page-head h1 { font-size: 19px; font-weight: 650; margin: 0 0 2px; }
.page-head .count {
  font-size: 12px; font-weight: 500; color: var(--dim);
  background: var(--panel-2); border: 1px solid var(--line);
  padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle;
}
.page-head .sub { color: var(--dim); margin: 0; font-size: 13px; }
.page-head .back { font-size: 12px; color: var(--dim); }
.filters, .chip { font-size: 12px; }
.chip {
  display: inline-block; margin-left: 4px; padding: 2px 9px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--dim);
}
.chip.on { background: var(--accent-dim); color: #cfe0ff; }
.svc-select {
  margin-left: 8px; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
  font-size: 12px; font-family: var(--sans); cursor: pointer;
}
.svc-select:hover { border-color: var(--line-2); }

/* ---- table ---- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
table.grid { border-collapse: collapse; width: 100%; }
table.grid thead th {
  position: sticky; top: 0; background: var(--panel-2);
  text-align: right; font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--dim);
  padding: 9px 14px; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
table.grid thead th.txt { text-align: left; }
table.grid thead th a { color: inherit; display: inline-block; }
table.grid thead th a:hover { color: var(--text); text-decoration: none; }
table.grid thead th.sorted { color: var(--text); }
table.grid thead th .arrow { color: var(--accent); }
table.grid tbody td {
  padding: 8px 14px; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
table.grid tbody tr:last-child td { border-bottom: none; }
table.grid tbody tr:hover { background: #141926; }
td.num { text-align: right; font-family: var(--mono); font-size: 13px; }
td.txt { text-align: left; }
td.dim, .dim { color: var(--dim); }
.dimmer { color: var(--dimmer); }
td.warn { color: var(--warn); }
td.bad { color: var(--bad); font-weight: 600; }
.svc { font-weight: 600; }
.ep { font-family: var(--mono); font-size: 12.5px; color: #c3ccdb; }
tr.bg td.ep, tr.bg td { color: var(--dimmer); font-style: italic; }

/* micro bar behind counts */
td.barcell { position: relative; }
td.barcell .barfill {
  position: absolute; left: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  opacity: 0.85; border-radius: 0 2px 2px 0;
}
td.barcell .v { position: relative; }
.sub-pct { color: var(--dimmer); font-size: 11px; }
.ep-title { font-family: var(--mono); font-size: 15px; color: #d6def0; }
/* drill-down query table: fixed layout so the long query column is bounded and
   scrolls horizontally on its own, keeping the timing columns aligned */
table.qtable { table-layout: fixed; width: 100%; }
table.qtable col.c-n { width: 104px; }
td.qshape { overflow: hidden; vertical-align: middle; }
.qscroll { overflow-x: auto; white-space: nowrap; padding-bottom: 3px; }
.qscroll code { color: #b7c2d6; font-size: 12px; white-space: nowrap; }
.qscroll::-webkit-scrollbar { height: 7px; }
.qscroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.qscroll::-webkit-scrollbar-track { background: transparent; }
.rw-w { font-size: 10px; color: var(--warn); border: 1px solid #4a3d1e; border-radius: 4px; padding: 0 4px; margin-left: 6px; vertical-align: middle; }
td.ep a { color: #c3ccdb; }
td.ep a:hover { color: var(--accent); }

.legend { color: var(--dimmer); font-size: 12px; margin: 12px 2px 0; max-width: 900px; }
.legend b { color: var(--dim); }
.empty {
  padding: 28px; text-align: center; color: var(--dim);
  border: 1px dashed var(--line-2); border-radius: 10px; background: var(--panel);
}
.empty b { color: var(--text); }

/* slow */
.src { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; }
.src-neo4j { background: #10233a; color: #7fb4ff; }
.src-api { background: #0f2a1f; color: #6fd6a0; }
.src-read { background: #10233a; color: #7fb4ff; }
.src-write { background: rgba(224,179,65,0.15); color: #e0b341; }
.nowrap { white-space: nowrap; }
td.detail { white-space: normal; max-width: 640px; }
td.detail code { color: #aeb8c9; }

/* endpoint sub-nav */
.subnav { display: flex; gap: 4px; margin-top: 10px; }
.subtab {
  padding: 4px 12px; font-size: 12px; font-weight: 550; color: var(--dim);
  border: 1px solid var(--line); border-radius: 999px;
}
.subtab:hover { color: var(--text); text-decoration: none; border-color: var(--line-2); }
.subtab.active { background: var(--accent-dim); color: #cfe0ff; border-color: var(--accent-dim); }

h2.sec { font-size: 13px; font-weight: 600; color: var(--dim); margin: 20px 2px 8px; text-transform: uppercase; letter-spacing: 0.04em; }

/* traces */
tr.click { cursor: pointer; }
tr.click:hover { background: #16202f; }
.tlabel { font-weight: 600; color: var(--text); }
.go { color: var(--accent); font-size: 11px; margin-left: 6px; }
td.dur { font-weight: 600; }
.mono { font-family: var(--mono); }
.outcome { font-size: 11px; padding: 1px 8px; border-radius: 999px; text-transform: lowercase; }
.o-success { background: #0f2a1f; color: #6fd6a0; }
.o-error { background: #3a1618; color: #ff8f8f; }
.o-unset { background: #23262f; color: #9aa3b4; }
.mark { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.mark-fastest { background: #0f2a1f; color: #6fd6a0; }
.mark-slowest { background: #3a1618; color: #ff8f8f; }
.drift { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.drift.warn { background: rgba(250,178,25,0.12); color: var(--warn); }
.drift.bad  { background: rgba(208,59,59,0.16); color: #ff8f8f; }
.drift.good { background: #0f2a1f; color: #6fd6a0; }
.shape-svc { display: block; font-size: 10.5px; margin-top: 3px; }
.trace-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.trace-meta .mm { font-size: 13px; color: var(--text); }
.trace-meta code { color: #c3ccdb; }
.tid { font-size: 11px; color: var(--dimmer); margin-top: 6px; }

/* logs explorer */
.logfilter {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 14px;
}
.logfilter label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--dim); }
.logfilter select, .logfilter input {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 5px 9px; font-size: 12px; font-family: var(--sans);
}
.logfilter .tracebox { flex: 1; min-width: 220px; }
.logfilter .tracebox input { width: 100%; font-family: var(--mono); }
.logfilter button {
  background: var(--accent-dim); color: #cfe0ff; border: 1px solid var(--accent-dim);
  border-radius: 6px; padding: 6px 14px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.logfilter .clear { font-size: 12px; color: var(--dim); align-self: center; }

.loglist { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.logrow { border-bottom: 1px solid var(--line); border-left: 2px solid transparent; }
.logrow:last-child { border-bottom: none; }
.logrow > summary {
  display: flex; align-items: baseline; gap: 10px; padding: 6px 12px; cursor: pointer;
  font-family: var(--mono); font-size: 12px; list-style: none;
}
.logrow > summary::-webkit-details-marker { display: none; }
.logrow > summary:hover { background: #141926; }
.logrow[open] > summary { background: #141926; }
.logrow .ts { color: var(--dimmer); white-space: nowrap; min-width: 62px; }
/* relative ⇄ absolute timestamp toggle */
.loglist .ts-abs { display: none; }
.loglist.abs-time .ts-rel { display: none; }
.loglist.abs-time .ts-abs { display: inline; }
.loglist.abs-time .logrow .ts { min-width: 150px; }
.ts-toggle { margin-left: 8px; }
.ts-toggle .tt-label { font-size: 11px; margin-right: 3px; }
.ts-toggle .chip { cursor: pointer; }
.logrow .svc { color: var(--accent); }
.logrow .lmsg { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sev { font-size: 10px; padding: 0 6px; border-radius: 4px; white-space: nowrap; }
.sev-INFO, .sev-DEFAULT { background: #1c2230; color: #9aa3b4; }
.sev-WARNING { background: #33290c; color: #e6c04d; }
.sev-ERROR, .sev-CRITICAL { background: #3a1618; color: #ff8f8f; }
.logrow.sev-b-ERROR, .logrow.sev-b-CRITICAL { border-left-color: var(--bad); }
.logrow.sev-b-WARNING { border-left-color: var(--warn); }
.logrow.is-neo4j { border-left-color: var(--accent); }
.kind { font-size: 10px; padding: 1px 7px; border-radius: 999px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.kind-neo4j { background: rgba(57,135,229,0.16); color: #7fb0ee; }
.kind-ok { background: rgba(12,163,12,0.16); color: #6fd6a0; }
.kind-fail { background: rgba(208,59,59,0.16); color: #ff8f8f; }
.logdetail { padding: 8px 14px 12px 24px; background: #0f1219; }
.filterable { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; align-items: center; }
.fl-label { font-size: 10px; color: var(--dimmer); text-transform: uppercase; }
.filterable a {
  font-family: var(--mono); font-size: 11px; color: var(--dim); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px;
}
.filterable a:hover { border-color: var(--accent-dim); color: #cfe0ff; text-decoration: none; }
.filterable a b { color: var(--dimmer); font-weight: 500; }
/* expanded-row field grid: label/value pairs for every field */
.lf-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 4px 18px; margin-bottom: 10px;
}
.lf { display: flex; gap: 8px; font-size: 12px; align-items: baseline; min-width: 0; }
.lf-k {
  color: var(--dimmer); text-transform: uppercase; font-size: 10px; letter-spacing: 0.04em;
  min-width: 58px; flex: none; text-align: right;
}
.lf-v { color: var(--text); overflow-wrap: anywhere; }
.lf-v.mono { font-family: var(--mono); font-size: 11.5px; color: #b7c2d6; }

.lb-label {
  font-size: 10px; color: var(--dimmer); text-transform: uppercase; letter-spacing: 0.04em;
  margin: 8px 0 3px;
}
/* code blocks — msg & cypher PRESERVE newlines and wrap (no clipping); json scrolls */
pre.codeblock {
  margin: 0; padding: 10px 12px; background: #0b0d12; border: 1px solid var(--line);
  border-radius: 6px; font-family: var(--mono); font-size: 11.5px; color: #b7c2d6;
  tab-size: 2;
}
pre.msg, pre.cypher { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; }
pre.cypher { color: #cfe0ff; }
pre.json { white-space: pre; overflow-x: auto; max-height: 360px; }
.rawjson { margin-top: 8px; }
.rawjson > summary {
  cursor: pointer; font-size: 10.5px; color: var(--dimmer); text-transform: uppercase;
  letter-spacing: 0.04em; list-style: none; padding: 2px 0;
}
.rawjson > summary::-webkit-details-marker { display: none; }
.rawjson > summary:hover { color: var(--dim); }
.rawjson > summary::before { content: "▸ "; }
.rawjson[open] > summary::before { content: "▾ "; }
.rawjson[open] > summary { margin-bottom: 6px; }

/* dashboard stat tiles */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.stat-tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px 0; min-height: 116px;
}
.stat-tile:hover { border-color: var(--line-2); }
.linktile { text-decoration: none; color: inherit; cursor: pointer; transition: border-color .1s, background .1s; }
.linktile:hover { border-color: var(--accent-dim); background: var(--panel-2); }
.linktile .stat-sub { color: var(--accent); opacity: .85; }
/* Logs (severity) tile: header links to all logs; legend items + bar segments link per-severity */
.sevtile:hover { border-color: var(--line-2); }
.tile-head { text-decoration: none; color: inherit; display: block; cursor: pointer; }
.tile-head .stat-sub { color: var(--accent); opacity: .85; }
.sevleg a.sl { text-decoration: none; color: inherit; cursor: pointer; border-radius: 4px; }
.sevleg a.sl:hover { color: var(--text); }
.sevbar-wrap .barlink:hover rect { opacity: 0.7; stroke: var(--text); stroke-width: 0.5; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); }
.stat-big {
  font-size: 32px; font-weight: 680; line-height: 1.12; color: var(--text);
  margin-top: 6px; font-variant-numeric: tabular-nums;
}
.stat-sub { font-size: 11.5px; color: var(--dimmer); margin-top: 3px; }
.stat-spark { margin: 10px -16px 0; margin-top: auto; height: 40px; }
.stat-spark .spark { width: 100%; height: 40px; display: block; }
/* severity split (Logs tile) */
.sevleg { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: auto; padding-top: 10px; font-size: 10.5px; color: var(--dim); }
.sevleg .sl { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sevleg .sl i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: none; }
.sevbar-wrap { margin: 7px -16px 0; height: 9px; }
.sevbar { width: 100%; height: 9px; display: block; }

/* charts */
.charts-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
@media (max-width: 900px) { .charts-grid { grid-template-columns: 1fr; } }

/* gauges / donuts / status grid */
.chart-body.center { display: flex; justify-content: center; align-items: center; }
.gauge { max-width: 210px; width: 100%; height: auto; }
.donut { display: block; margin: 4px auto; }
.statusgrid { display: flex; flex-wrap: wrap; gap: 3px; padding-top: 8px; }
.statusgrid .sq { width: 12px; height: 12px; border-radius: 2px; }

/* trace heatmap */
.hm-stats { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--dim); margin-bottom: 12px; }
.hm-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.hm-stats .bad { color: #ff8f8f; }
.hm-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); padding: 10px 10px 4px;
}
.heatmap { width: 100%; min-width: 760px; height: auto; display: block; }
.heatmap a { cursor: pointer; }
.heatmap a:hover rect { stroke: #eaf1ff; stroke-width: 1.3; }

/* async fragments + spinner */
.frag { margin-bottom: 18px; }
.frag-loading {
  display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 13px;
  padding: 28px 16px; border: 1px dashed var(--line-2); border-radius: 10px; background: var(--panel);
}
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--accent);
  display: inline-block; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.2s; } }
.frag-note {
  font-size: 12px; color: var(--warn); background: rgba(250,178,25,0.08);
  border: 1px solid rgba(250,178,25,0.25); border-radius: 8px; padding: 7px 11px; margin-bottom: 12px;
}
.frag-foot { font-size: 11px; color: var(--dimmer); text-align: right; margin-top: 8px; }

/* logs pager */
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 16px 0 4px; }
.pg {
  font-size: 13px; padding: 6px 13px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
}
a.pg:hover { border-color: var(--accent-dim); color: #cfe0ff; text-decoration: none; }
.pg.cur { background: var(--accent-dim); color: #dbe7ff; border-color: var(--accent-dim); font-weight: 600; }
.pg.off { color: var(--dimmer); opacity: 0.45; }
.chart-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px 10px;
}
.chart-title { font-size: 13px; font-weight: 600; color: var(--text); }
.chart-sub { font-size: 11.5px; color: var(--dimmer); margin-bottom: 6px; }
.chart-body { width: 100%; }
svg.chart { width: 100%; height: auto; display: block; }
.legend-row { display: flex; gap: 14px; margin-top: 6px; padding-left: 4px; }
.lg { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--dim); }
.lg .sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.foot {
  color: var(--dimmer); font-size: 11.5px; text-align: center;
  padding: 16px; border-top: 1px solid var(--line); margin-top: 30px;
}
.foot code { color: var(--dim); }

/* auth0 tab additions */
td.good { color: var(--good); font-weight: 600; }
.stat-big.good { color: var(--good); }
.stat-big.bad { color: var(--bad); }
.stat-big.sm { font-size: 17px; font-weight: 600; line-height: 1.3; }
.auth0-filters, .api-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.q-input {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 5px 9px; font-size: 12px; font-family: var(--sans);
  min-width: 190px;
}
.q-input:focus { outline: none; border-color: var(--accent-dim); }
.legend.meta { margin: 4px 0 14px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.two-col .sec { margin-top: 0; }
.empty.sm { padding: 14px 16px; min-height: 0; font-size: 12.5px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* reliability "why" chips */
.why-chip {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px;
  margin: 1px 3px 1px 0; border: 1px solid var(--line-2); color: var(--dim);
  white-space: nowrap;
}
.why-chip.bad  { background: rgba(208,59,59,0.16); color: #ff8f8f; border-color: transparent; }
.why-chip.warn { background: rgba(224,179,65,0.15); color: #e0b341; border-color: transparent; }
.why-chip.info { background: rgba(57,135,229,0.16); color: #7fb2ff; border-color: transparent; }
.why-chip.dim  { color: var(--dimmer); }

/* ---- placement: spot/on-demand chips, node inventory grid ---- */
.chip.spot { background: rgba(224,179,65,0.16); color: #e0b341; border-color: transparent; }
.chip.std  { background: rgba(57,135,229,0.16); color: #7fb2ff; border-color: transparent; }
.chip.unk  { background: var(--panel-2); color: var(--dimmer); border-color: var(--line); }
.node-key { margin-left: 12px; color: var(--dim); font-size: 12px; }
.node-key .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.node-key .sw.spot { background: var(--warn); }
.node-key .sw.std  { background: var(--accent); }

.node-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
  gap: 10px; margin: 4px 0 6px;
}
.node-card {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--dimmer); border-radius: 9px; padding: 9px 11px;
}
.node-card.spot { border-left-color: var(--warn); }
.node-card.std  { border-left-color: var(--accent); }
.node-card.unk  { border-left-color: var(--dimmer); }
.nc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.nc-pool { font-family: var(--mono); font-size: 12px; color: var(--text); font-weight: 600; }
.nc-head .chip { margin-left: 0; }
.nc-metric { display: flex; align-items: center; gap: 7px; margin: 3px 0; }
.nc-k { font-size: 10.5px; color: var(--dim); width: 24px; text-transform: uppercase; letter-spacing: 0.03em; }
.nc-metric .bar {
  flex: 1; height: 6px; background: var(--panel-2); border-radius: 3px;
  overflow: hidden; border: 1px solid var(--line);
}
.nc-metric .bar .fill { display: block; height: 100%; border-radius: 3px; }
.nc-metric .bar .fill.ok   { background: var(--good); }
.nc-metric .bar .fill.warn { background: var(--warn); }
.nc-metric .bar .fill.crit { background: var(--bad); }
.nc-v { font-family: var(--mono); font-size: 11px; color: var(--dim); width: 34px; text-align: right; }
.nc-node { font-size: 10px; margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- pods: resource buckets ---- */
.node-key .sw.ok   { background: var(--good); }
.node-key .sw.over { background: var(--warn); }
.node-key .sw.hot  { background: var(--bad); }

.pod-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px; margin: 6px 0;
}
.pod-box {
  display: block; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 13px; color: var(--text);
}
a.pod-box:hover { border-color: var(--line-2); background: var(--panel-2); }
.pod-box.static { cursor: default; }
.pb-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }
.pb-name { font-weight: 650; font-size: 13px; }
.pb-pods { font-size: 11px; color: var(--dim); }
.pb-hint { font-size: 11px; color: var(--dim); margin-top: 6px; }

.bkt { display: flex; align-items: center; gap: 9px; margin: 5px 0; }
.bkt-k { width: 30px; font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.03em; }
.bkt-track {
  position: relative; flex: 1; height: 12px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 3px; overflow: hidden;
}
.bkt-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 3px 0 0 3px; }
.bkt.ok    .bkt-fill { background: var(--good); }
.bkt.over  .bkt-fill { background: var(--warn); }
.bkt.burst .bkt-fill { background: #e08c41; }
.bkt.hot   .bkt-fill { background: var(--bad); }
/* request marker — a tick line the fill is read against */
.bkt-req { position: absolute; top: -1px; width: 2px; height: 14px; background: var(--text); opacity: 0.72; }
.bkt-req::after {
  content: ""; position: absolute; top: -3px; left: -2px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--text); opacity: 0.9;
}
.bkt-v { width: 150px; text-align: right; font-family: var(--mono); font-size: 11px; color: var(--text); }
.bkt-v .dim { color: var(--dimmer); }

.pod-detail-buckets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 14px; }
.pod-detail-buckets .pod-box { padding: 13px 15px; }
@media (max-width: 720px) { .pod-detail-buckets { grid-template-columns: 1fr; } }

/* restart & why banner */
.restart-banner {
  display: flex; align-items: center; gap: 18px; margin: 4px 0 10px;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--dimmer); border-radius: 10px; padding: 12px 16px;
}
.restart-banner.has-fail { border-left-color: var(--bad); }
.rb-num { text-align: center; min-width: 74px; }
.rb-count { font-size: 34px; font-weight: 700; line-height: 1; }
.rb-count.bad { color: var(--bad); }
.rb-label { font-size: 11px; color: var(--dim); margin-top: 4px; }
.rb-why { flex: 1; }
.rb-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.rb-note { font-size: 12px; color: var(--dim); }
.restart-events { margin: 0 0 14px; }
.restart-events > summary { cursor: pointer; font-size: 12px; color: var(--dim); padding: 4px 0; }
.restart-events > summary:hover { color: var(--text); }

/* pods head tiles — used/requested with a utilization bar + colored percent */
.res-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0 8px; }
@media (max-width: 760px) { .res-head { grid-template-columns: 1fr; } }
.res-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; }
.res-tile.accent { border-left: 3px solid var(--accent); }
.res-big { font-size: 33px; font-weight: 700; line-height: 1.1; margin-top: 5px; }
.res-val { font-size: 21px; font-weight: 650; margin-top: 5px; white-space: nowrap; }
.res-val .res-slash, .res-val .res-req { color: var(--dimmer); font-weight: 500; }
.res-bar { height: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; margin: 9px 0 7px; }
.res-fill { display: block; height: 100%; border-radius: 3px; background: var(--good); min-width: 2px; }
.res-fill.warn { background: var(--warn); }
.res-fill.bad { background: var(--bad); }
.res-fill.good { background: var(--good); }
.res-pct { font-size: 12px; color: var(--dim); }
.res-pct.warn { color: var(--warn); }
.res-pct.bad { color: var(--bad); }
.res-pct.good { color: var(--good); }

/* pod box node-type accent + meta row */
.pod-box.node-spot { border-left: 3px solid var(--warn); }
.pod-box.node-std  { border-left: 3px solid var(--accent); }
.pb-meta { display: inline-flex; align-items: center; gap: 6px; }
.pb-meta .chip { margin-left: 0; }
