/* FleetLens design system. Dark-first; light is its own selected palette, not an inversion.
   Series + status colors follow the validated reference palette (CVD-checked, see docs). */
:root {
  color-scheme: dark;
  --page: #0b0c0e; --surface: #131518; --surface-2: #181b1f; --surface-3: #1f2328; --raised: #22262c;
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.12); --grid: #24272c; --axis: #3a3e45;
  --ink: #eceef1; --ink-2: #b4b9c2; --muted: #7c838f; --faint: #555b66;
  --accent: #3987e5; --accent-2: #5b9ef0; --accent-soft: rgba(57,135,229,.14); --accent-line: rgba(57,135,229,.45);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --good: #0ca30c; --warn: #fab219; --serious: #ec835a; --crit: #d03b3b;
  --good-soft: rgba(12,163,12,.14); --warn-soft: rgba(250,178,25,.13); --serious-soft: rgba(236,131,90,.14); --crit-soft: rgba(208,59,59,.16);
  --good-ink: #3fd03f; --warn-ink: #fbc24e; --serious-ink: #f29d7b; --crit-ink: #f07070;
  --seq-0: #0d366b; --seq-1: #184f95; --seq-2: #256abf; --seq-3: #3987e5; --seq-4: #6da7ec; --seq-5: #b7d3f6;
  --shadow: 0 8px 30px rgba(0,0,0,.45); --radius: 10px; --radius-sm: 6px;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rail: 224px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --page: #f4f5f7; --surface: #ffffff; --surface-2: #fafafa; --surface-3: #f1f2f4; --raised: #ffffff;
  --line: rgba(11,11,11,.08); --line-2: rgba(11,11,11,.14); --grid: #ecebe6; --axis: #c3c2b7;
  --ink: #0b0b0b; --ink-2: #3f4148; --muted: #6b6f78; --faint: #9a9ea6;
  --accent: #2a78d6; --accent-2: #256abf; --accent-soft: rgba(42,120,214,.10); --accent-line: rgba(42,120,214,.4);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --good-ink: #006300; --warn-ink: #8a5a00; --serious-ink: #b4461b; --crit-ink: #b42323;
  --seq-0: #cde2fb; --seq-1: #9ec5f4; --seq-2: #6da7ec; --seq-3: #3987e5; --seq-4: #1c5cab; --seq-5: #0d366b;
  --shadow: 0 8px 30px rgba(16,24,40,.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--page); color: var(--ink); font: 13.5px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; border: 2px solid var(--page); }
.mono { font-family: var(--mono); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .ink2 { color: var(--ink-2); }
.small { font-size: 12px; } .tiny { font-size: 11px; }
.nowrap { white-space: nowrap; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.sp { flex: 1; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; grid-template-rows: 52px 1fr; height: 100vh; }
.shell.collapsed { --rail: 60px; }
.rail { grid-row: 1 / 3; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column;
  overflow: hidden; }
.brand { height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 16px; font-weight: 700; letter-spacing: .2px;
  font-size: 15px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.brand-mark { width: 24px; height: 24px; flex-shrink: 0; }
.nav { padding: 10px 8px; overflow-y: auto; flex: 1; }
.nav-sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--faint); padding: 14px 10px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 7px; color: var(--ink-2); font-weight: 500;
  white-space: nowrap; position: relative; }
.nav a svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.nav a:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--ink); }
.nav a.active::before { content: ""; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav .pill { margin-left: auto; font-size: 10.5px; font-weight: 700; background: var(--crit); color: #fff; border-radius: 9px; padding: 0 6px; min-width: 18px; text-align: center; }
.nav .pill:empty { display: none; }
.shell.collapsed .nav a span, .shell.collapsed .nav-sec, .shell.collapsed .brand span, .shell.collapsed .nav .pill { display: none; }
.rail-foot { border-top: 1px solid var(--line); padding: 8px; display: flex; gap: 4px; }

.topbar { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--surface);
  min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 6px; font-weight: 600; min-width: 0; font-size: 14px; }
.crumbs .sep { color: var(--faint); font-weight: 400; }
.crumbs a { color: var(--ink-2); }
.search-btn { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted);
  border-radius: 8px; padding: 5px 10px; min-width: 240px; cursor: pointer; }
.search-btn:hover { border-color: var(--accent-line); }
.search-btn kbd { margin-left: auto; }
kbd { font: 11px var(--mono); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--muted); }
.main { overflow: auto; position: relative; }
.page { padding: 20px 24px 60px; margin: 0 auto; }   /* full width: wide screens get more columns, not margins */
.page.full { padding: 0; max-width: none; height: 100%; }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink);
  border-radius: 7px; padding: 5px 11px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { border-color: var(--accent-line); background: var(--surface-3); text-decoration: none; }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.icon { padding: 5px 7px; }
.btn.sm { padding: 3px 8px; font-size: 12px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 3px 10px; border-radius: 6px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.seg button:hover { color: var(--ink); }
.seg button svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.kpi .l svg { width: 13px; height: 13px; }
.search-btn svg { width: 15px; height: 15px; }
.seg button.on { background: var(--raised); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.25), inset 0 0 0 1px var(--line-2); }
.input, select.input { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 7px; padding: 5px 10px; outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.live { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 12px; color: var(--ink-2); cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 7px; padding: 4px 10px; background: var(--surface-2); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.live.on i { background: var(--good); box-shadow: 0 0 0 0 rgba(12,163,12,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(12,163,12,.55); } 70% { box-shadow: 0 0 0 7px rgba(12,163,12,0); } 100% { box-shadow: 0 0 0 0 rgba(12,163,12,0); } }
.tp { position: relative; }
.tp-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--raised); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px; z-index: 40; min-width: 190px; }
.tp-menu button { display: flex; width: 100%; border: 0; background: transparent; padding: 6px 10px; border-radius: 6px; cursor: pointer; text-align: left; gap: 8px; }
.tp-menu button:hover { background: var(--surface-3); }
.tp-menu button.on { font-weight: 700; }
.tp-menu button.on::after { content: "\2713"; margin-left: auto; color: var(--accent-2); }

/* ---------------------------------------------------------------- layout blocks */
.head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.head h1 { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: -.2px; }
.head .sub { color: var(--muted); margin-top: 3px; }
.grid { display: grid; gap: 14px; }
.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; }
.mb { margin-bottom: 14px; } .mt { margin-top: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; position: relative; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); min-height: 44px; }
.card-h h3 { margin: 0; font-size: 13px; font-weight: 600; }
.card-h .sub { color: var(--muted); font-size: 12px; }
.card-b { padding: 12px 14px; }
.card.flush .card-b { padding: 0; }
.empty { color: var(--muted); padding: 28px 16px; text-align: center; }

/* KPI tiles with sparkline */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.kpi .l { color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; display: flex; gap: 6px; align-items: center; }
.kpi .v { font-size: 26px; font-weight: 650; letter-spacing: -.5px; line-height: 1.2; }
.kpi .v small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 2px; }
.kpi .d { font-size: 12px; color: var(--ink-2); min-height: 18px; }
.kpi canvas { width: 100%; height: 30px; display: block; margin-top: 4px; }
.kpi.crit { box-shadow: inset 3px 0 0 var(--crit); } .kpi.warn { box-shadow: inset 3px 0 0 var(--warn); }

/* status chips (always icon + label, never color alone) */
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 1px 8px 1px 6px; border-radius: 10px;
  white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.good, .st.healthy, .st.running, .st.online { background: var(--good-soft); color: var(--good-ink); }
.st.warning, .st.warn { background: var(--warn-soft); color: var(--warn-ink); }
.st.error, .st.serious, .st.degraded { background: var(--serious-soft); color: var(--serious-ink); }
.st.critical, .st.failed, .st.offline-crit { background: var(--crit-soft); color: var(--crit-ink); }
.st.info { background: var(--accent-soft); color: var(--accent-2); }
.st.offline, .st.stopped, .st.none { background: var(--surface-3); color: var(--muted); }
.st.plain::before { display: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--faint); }
.dot.healthy, .dot.good, .dot.online, .dot.running { background: var(--good); }
.dot.warning { background: var(--warn); } .dot.degraded, .dot.error { background: var(--serious); }
.dot.critical, .dot.failed { background: var(--crit); box-shadow: 0 0 0 3px var(--crit-soft); }
.tag { display: inline-flex; font-size: 11.5px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0 7px; color: var(--ink-2); white-space: nowrap; }
.tag b { color: var(--ink); font-weight: 600; margin-left: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }

/* meter */
.meter { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.meter .bar { flex: 1; height: 6px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: 4px; background: var(--s1); }
.meter .bar i.warn { background: var(--warn); } .meter .bar i.crit { background: var(--crit); }
.meter span { width: 40px; text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink-2); }

/* tables */
.tbl-wrap { overflow: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; padding: 8px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--surface); z-index: 1; user-select: none; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--ink); }
.tbl th .arrow { opacity: .6; margin-left: 3px; }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-2); }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td .sub { color: var(--muted); font-size: 11.5px; }
.tbl canvas.spark { width: 110px; height: 26px; display: block; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs a .n { font-size: 11px; color: var(--muted); margin-left: 5px; }

/* insight cards */
.ins { display: grid; grid-template-columns: 4px 1fr auto; gap: 0 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ins:last-child { border-bottom: 0; }
.ins .sev { border-radius: 2px; background: var(--faint); }
.ins.critical .sev { background: var(--crit); } .ins.error .sev { background: var(--serious); }
.ins.warning .sev { background: var(--warn); } .ins.info .sev { background: var(--accent); }
.ins .t { font-weight: 600; line-height: 1.4; }
.ins .meta { color: var(--muted); font-size: 12px; margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.ins .det { margin-top: 7px; color: var(--ink-2); }
.ins .fix { margin-top: 8px; padding: 8px 11px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; }
.ins .fix b { color: var(--good-ink); margin-right: 4px; }
.ins .path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 8px; font-size: 12px; }
.ins .path .hop { padding: 1px 8px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line); }
.ins .path .hop.origin { background: var(--crit-soft); color: var(--crit-ink); border-color: transparent; font-weight: 600; }
.ins .path .arr { color: var(--faint); }
.ins .acts { display: flex; gap: 6px; align-items: flex-start; }

/* health score: number + band word; the bar in tables uses the same status colours */
.hs { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 1px 8px 1px 2px; border-radius: 10px;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.hs b { font-size: 11.5px; min-width: 24px; text-align: center; border-radius: 8px; padding: 0 5px; color: #fff; background: var(--faint); font-variant-numeric: tabular-nums; }
.hs.healthy { background: var(--good-soft); color: var(--good-ink); } .hs.healthy b { background: var(--good); }
.hs.warning { background: var(--warn-soft); color: var(--warn-ink); } .hs.warning b { background: var(--warn); color: #241a00; }
.hs.degraded { background: var(--serious-soft); color: var(--serious-ink); } .hs.degraded b { background: var(--serious); color: #2a1206; }
.hs.critical { background: var(--crit-soft); color: var(--crit-ink); } .hs.critical b { background: var(--crit); }
.meter.hm .bar i { background: var(--good); }
.meter.hm.warning .bar i { background: var(--warn); } .meter.hm.degraded .bar i { background: var(--serious); } .meter.hm.critical .bar i { background: var(--crit); }
.why { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.why .drv { display: inline-flex; gap: 5px; align-items: baseline; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.why .drv b { font-variant-numeric: tabular-nums; color: var(--muted); }
.why .drv.critical b { color: var(--crit-ink); } .why .drv.error b { color: var(--serious-ink); } .why .drv.warning b { color: var(--warn-ink); }

/* incidents */
.inc .cause { margin-top: 7px; display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.inc .cause .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; color: var(--muted);
  white-space: nowrap; min-width: 52px; }
.inc .cause .grow { color: var(--ink-2); }
.st.pc { background: var(--crit-soft); color: var(--crit-ink); }
.inc .members { margin-top: 6px; border-left: 2px solid var(--line-2); padding-left: 10px; display: grid; gap: 3px; }
.inc .members .row { gap: 8px; }

/* kubernetes cluster cards */
.clu .nodes { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.clu .nd { width: 12px; height: 12px; border-radius: 3px; background: var(--good); display: inline-block; }
.clu .nd.warning { background: var(--warn); } .clu .nd.critical { background: var(--crit); }
.cap { margin-top: 6px; }
.capbar { position: relative; height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.capbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.capbar i.req { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.capbar i.use { background: var(--s1); }
.clu-inc { border-top: 1px solid var(--line); padding: 8px 14px; display: grid; gap: 4px; }
.clu-inc a { color: var(--ink-2); } .clu-inc a:hover { color: var(--ink); text-decoration: none; }
.card-f { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 9px 14px; }

/* jargon tooltips: dotted underline = hover for a plain explanation */
.jg { text-decoration: underline dotted var(--faint); text-underline-offset: 3px; cursor: help; }
.tipbox { position: fixed; z-index: 200; display: none; max-width: 320px; background: var(--raised); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 8px 11px; font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow); pointer-events: none;
  text-transform: none; letter-spacing: 0; font-weight: 400; }
.note { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 8px; padding: 9px 13px; color: var(--ink-2); }

/* plain-English summary */
.plainsum { box-shadow: inset 4px 0 0 var(--good); }
.plainsum.warn { box-shadow: inset 4px 0 0 var(--warn); } .plainsum.bad { box-shadow: inset 4px 0 0 var(--crit); }
.plainsum .headline { font-size: 19px; font-weight: 650; margin: 4px 0 8px; letter-spacing: -.2px; }
.plainsum ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.plainsum li { display: flex; gap: 9px; align-items: baseline; color: var(--ink-2); }
.plainsum li .dot { position: relative; top: -1px; }
.jtiles { width: 340px; max-width: 100%; }
.jt { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 5px; color: var(--ink); }
.jt:hover { background: var(--surface-2); text-decoration: none; }
.jt .grow { display: flex; flex-direction: column; line-height: 1.25; }
.jt .num { font-weight: 650; font-size: 15px; }
.jt.breached { border-color: var(--crit-soft); background: var(--crit-soft); }

/* customer journeys */
.jr.breached { box-shadow: inset 3px 0 0 var(--crit); } .jr.at-risk { box-shadow: inset 3px 0 0 var(--warn); }
.jr .big { font-size: 28px; font-weight: 650; letter-spacing: -.5px; line-height: 1.2; }
.goalbar { position: relative; height: 8px; background: var(--surface-3); border-radius: 4px; margin: 6px 0 4px; }
.goalbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--good); }
.goalbar i.bad { background: var(--crit); }
.goalbar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 1px; }
.jspark { width: 100%; height: 34px; display: block; margin-top: 10px; }
.jcause { margin-top: 10px; display: grid; gap: 5px; }
.jcause a { color: var(--ink-2); padding: 6px 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); }
.jcause a:hover { text-decoration: none; color: var(--ink); }

/* kubernetes traffic map: lanes = nodes, chips = pods/workloads, svg overlay = connections */
.kmap-card { overflow: visible; }
.kmap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 230px; }
.klanes { padding: 6px 0; min-width: 0; }
.kzone { font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; font-weight: 700; color: var(--muted); padding: 10px 14px 4px;
  border-top: 1px solid var(--line); }
.kzone:first-child { border-top: 0; }
.klane { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 10px; padding: 8px 14px; align-items: center; min-height: 54px; }
.klane + .klane { border-top: 1px dashed var(--line); }
.klane.cp { background: var(--accent-soft); }
.kl-h { min-width: 0; display: grid; gap: 2px; justify-items: start; font-size: 12.5px; }
.kl-b { display: flex; flex-wrap: wrap; gap: 8px 10px; position: relative; z-index: 2; }
.kc { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 4px 9px; border-radius: 7px; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--line-2); position: relative; z-index: 2; cursor: default; transition: opacity .15s; }
.kc b { color: var(--muted); font-weight: 600; font-size: 11px; }
.kc.critical { border-color: var(--crit); } .kc.warning { border-color: var(--warn); }
.kc.cp { background: var(--raised); font-weight: 600; } .kc.host { border-style: dashed; color: var(--muted); }
.kext { border-left: 1px solid var(--line); padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.kext-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; font-weight: 700; color: var(--muted); }
.kc.ext { max-width: 100%; justify-content: space-between; border-color: color-mix(in srgb, var(--s7) 55%, transparent); }
.kedges { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: visible; }
.kedges path { fill: none; stroke-linecap: round; opacity: .55; pointer-events: stroke; transition: opacity .15s; }
.kedges .local { stroke: var(--faint); } .kedges .xn { stroke: var(--s1); } .kedges .xz { stroke: var(--s2); opacity: .8; }
.kedges .ext { stroke: var(--s7); } .kedges .sys { stroke: var(--muted); stroke-dasharray: 3 4; opacity: .4; }
.kmap.focus .kedges path { opacity: .06; } .kmap.focus .kedges path.on { opacity: .95; }
.kmap.focus .kc { opacity: .35; } .kmap.focus .kc.on { opacity: 1; box-shadow: 0 0 0 2px var(--accent-line); }
.klegend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.klegend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-left: 8px; }
.klegend i.local { background: var(--faint); } .klegend i.xn { background: var(--s1); } .klegend i.xz { background: var(--s2); }
.klegend i.ext { background: var(--s7); } .klegend i.sys { background: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 7px); }
@media (max-width: 820px) { .kmap { grid-template-columns: 1fr; } .kext { border-left: 0; border-top: 1px solid var(--line); } .klane { grid-template-columns: 1fr; } }

/* sign-in / open mode */
.openbanner { background: var(--warn-soft); color: var(--warn-ink); border-bottom: 1px solid var(--line); padding: 7px 24px; font-size: 12.5px; }
.openbanner a { color: inherit; text-decoration: underline; font-weight: 600; }
#b-me { width: 28px; height: 28px; border-radius: 50%; padding: 0; justify-content: center; background: var(--accent-soft); color: var(--ink); font-weight: 700; }

/* logs */
.lt { padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.lt:last-child { border-bottom: 0; } .lt:hover { background: var(--surface-2); }
.lt-t { font-size: 12.5px; overflow-wrap: anywhere; }
.lt-fix { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); padding: 6px 10px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); }
.lt-fix b { color: var(--crit-ink); margin-right: 6px; text-transform: uppercase; font-size: 10.5px; letter-spacing: .5px; }
.lt-spark { width: 120px; height: 30px; flex-shrink: 0; }
.hyp { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 10px; background: var(--surface-2); }
.hyp ul { margin: 6px 0 0 18px; padding: 0; color: var(--ink-2); font-size: 12.5px; }
.hyp .fix { margin-top: 8px; padding: 7px 10px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; }
.hyp .fix b { color: var(--good-ink); margin-right: 6px; }

/* timeline */
.tl { position: relative; }
.tl .ev { display: grid; grid-template-columns: 74px 16px 1fr; gap: 8px; padding: 7px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tl .ev:hover { background: var(--surface-2); }
.tl .ev:last-child { border-bottom: 0; }
.tl .when { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.tl .ico { width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.tl .ico::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.tl .ev.critical .ico::after { background: var(--crit); } .tl .ev.error .ico::after { background: var(--serious); }
.tl .ev.warning .ico::after { background: var(--warn); } .tl .ev.info .ico::after { background: var(--accent); }
.tl .day { padding: 8px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600;
  background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }

/* charts */
.chart { position: relative; width: 100%; }
.chart canvas { display: block; width: 100%; }
.chart-tip { position: absolute; pointer-events: none; z-index: 20; background: var(--raised); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 7px 10px; font-size: 12px; box-shadow: var(--shadow); min-width: 140px; display: none; white-space: nowrap; }
.chart-tip .tt { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.chart-tip .tr { display: flex; align-items: center; gap: 8px; }
.chart-tip .tr i { width: 10px; height: 3px; border-radius: 2px; }
.chart-tip .tr b { margin-left: auto; font-variant-numeric: tabular-nums; padding-left: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); padding: 6px 2px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.legend span.off { opacity: .4; }
.legend i { width: 12px; height: 3px; border-radius: 2px; }
.scale { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.scale .ramp { width: 120px; height: 8px; border-radius: 4px; }

/* service map */
.mapwrap { position: absolute; inset: 0; }
.map-ui { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; gap: 10px; align-items: flex-start; pointer-events: none; z-index: 5; }
.map-ui > * { pointer-events: auto; }
.glass { background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line-2);
  border-radius: 10px; box-shadow: var(--shadow); }
.map-legend { position: absolute; left: 16px; bottom: 16px; padding: 10px 12px; font-size: 11.5px; color: var(--ink-2); z-index: 5; display: grid; gap: 5px; }
.map-legend b { color: var(--ink); }
.map-side { position: absolute; top: 14px; right: 16px; bottom: 16px; width: 380px; z-index: 6; overflow: auto; }
.map-side .card-h { position: sticky; top: 0; background: inherit; z-index: 2; }
.map-stats { position: absolute; left: 50%; transform: translateX(-50%); top: 14px; display: flex; gap: 0; z-index: 5; }
.map-stats div { padding: 7px 16px; border-right: 1px solid var(--line); text-align: center; }
.map-stats div:last-child { border-right: 0; }
.map-stats b { display: block; font-size: 17px; font-weight: 650; }
.map-stats span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* waterfall */
.wf { font-size: 12px; }
.wf-row { display: grid; grid-template-columns: minmax(260px, 34%) 1fr; border-bottom: 1px solid var(--line); cursor: pointer; }
.wf-row:hover { background: var(--surface-2); }
.wf-row.sel { background: var(--accent-soft); }
.wf-name { padding: 5px 10px; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; border-right: 1px solid var(--line); }
.wf-name .svc { width: 3px; align-self: stretch; border-radius: 2px; flex-shrink: 0; }
.wf-name .lbl { overflow: hidden; text-overflow: ellipsis; }
.wf-bar { position: relative; height: 28px; }
.wf-bar i { position: absolute; top: 8px; height: 12px; border-radius: 3px; min-width: 2px; }
.wf-bar i.crit::after { content: ""; position: absolute; inset: -3px; border: 1px solid var(--warn); border-radius: 5px; }
.wf-bar span { position: absolute; top: 6px; font-size: 11px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wf-axis { display: grid; grid-template-columns: minmax(260px, 34%) 1fr; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 2; }
.wf-axis .ticks { position: relative; height: 26px; }
.wf-axis .ticks span { position: absolute; top: 6px; font-size: 11px; color: var(--muted); transform: translateX(-50%); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 5px 16px; font-size: 12.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }

/* command palette & modal */
.overlay { position: fixed; inset: 0; background: rgba(5,6,8,.6); backdrop-filter: blur(2px); z-index: 100; display: flex; justify-content: center;
  align-items: flex-start; padding-top: 12vh; }
.overlay.center { align-items: center; padding-top: 0; }
.palette { width: min(640px, 94vw); background: var(--raised); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 15px 18px; font-size: 15px; outline: none; }
.palette .res { max-height: 52vh; overflow: auto; padding: 6px; }
.palette .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--faint); padding: 8px 12px 4px; font-weight: 600; }
.palette .it { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 7px; cursor: pointer; }
.palette .it.on, .palette .it:hover { background: var(--accent-soft); }
.palette .it svg { width: 16px; height: 16px; color: var(--muted); }
.palette .it .r { margin-left: auto; color: var(--muted); font-size: 12px; }
.modal { width: min(880px, 94vw); max-height: 86vh; overflow: auto; background: var(--raised); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow); }
.modal .card-h { position: sticky; top: 0; background: var(--raised); z-index: 2; }
pre.logs { background: #07080a; color: #cfd6e4; padding: 10px 12px; border-radius: 8px; overflow: auto; max-height: 340px; font: 12px/1.5 var(--mono);
  margin: 0; white-space: pre-wrap; word-break: break-all; border: 1px solid var(--line); }
pre.json { background: var(--surface-2); padding: 10px; border-radius: 8px; overflow: auto; max-height: 320px; font: 12px var(--mono); margin: 0; border: 1px solid var(--line); }
.toast { position: fixed; bottom: 18px; right: 18px; z-index: 120; background: var(--raised); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 14px; box-shadow: var(--shadow); }
.skeleton { opacity: .55; transition: opacity .2s; pointer-events: none; }
.loading-bar { position: absolute; top: 0; left: 0; height: 2px; background: var(--accent); z-index: 50; transition: width .3s; }

details.cat { border-bottom: 1px solid var(--line); }
details.cat > summary { cursor: pointer; padding: 10px 14px; display: flex; gap: 10px; align-items: center; list-style: none; font-weight: 600; }
details.cat > summary::-webkit-details-marker { display: none; }
details.cat > summary::before { content: "\25B8"; color: var(--muted); transition: transform .15s; }
details.cat[open] > summary::before { transform: rotate(90deg); }
details.cat > summary .n { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12px; }

@media (min-width: 2200px) { .grid.c2:has(> .clu) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .c4, .c6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .c3 { grid-template-columns: 1fr 1fr; } .span3 { grid-column: span 2; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 52px 1fr; }
  .rail { grid-row: auto; flex-direction: row; overflow-x: auto; } .brand { border: 0; } .nav { display: flex; padding: 6px; } .nav-sec, .rail-foot { display: none; }
  .c2, .c3, .c4, .c6 { grid-template-columns: 1fr; } .span2, .span3 { grid-column: auto; }
  .search-btn { min-width: 0; } .search-btn span { display: none; }
  .page { padding: 16px; } .map-side { width: auto; left: 16px; top: auto; height: 50%; }
}

/* product catalogue + account switcher (M3.2) */
.grid.products { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card.product.on { border-color: var(--accent-line); box-shadow: inset 3px 0 0 var(--accent); }
.product-name { font-size: 15px; }
.acct { max-width: 220px; margin-right: 8px; }
.nav a.off { display: none; }
