[hidden] { display: none !important; }
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url("/static/fonts/montserrat-400.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("/static/fonts/montserrat-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("/static/fonts/montserrat-700.woff2") format("woff2"); }
:root {
  --bg: #0d1330; --panel: #141c44; --panel2: #1b2557; --line: #2f3d80; --text: #eef1ff; --muted: #9aa6d6;
  --navy: #273787; --pink: #E14168; --pink-btn: #B72F55; --sky: #6A98FB; --ok: #3fcf8e; --bad: #ff6b79; --off: #8a93b8; --plan: #3a446f;
  --map-h: 58%; --insp-w: 340px;
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif; font-size: 13px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; }
button { font: inherit; background: var(--pink-btn); color: #fff; border: 0; border-radius: 7px; padding: 6px 12px; cursor: pointer; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
button.small { padding: 3px 8px; font-size: 12px; }
button:hover { filter: brightness(1.15); }
button:focus-visible, input:focus-visible, select:focus-visible, #map:focus-visible { outline: 2px solid var(--sky); outline-offset: 1px; }
button[disabled] { opacity: .6; cursor: progress; }
input, select { font: inherit; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.muted { color: var(--muted); }
.err { color: var(--bad); min-height: 1em; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: .3px; white-space: nowrap; }
.brand .by { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 4px; }
.logo-mark { color: var(--pink); }

/* login */
.login-body { display: grid; place-items: center; overflow: auto; background: radial-gradient(circle at 30% 20%, #1e2a6b, var(--bg)); }
.login-card { background: var(--panel); padding: 32px; border-radius: 14px; width: 320px; display: grid; gap: 12px; border: 1px solid var(--line); }
.login-card label { display: grid; gap: 4px; color: var(--muted); }

/* header */
.top { height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.status { display: flex; gap: 8px; flex: 1; justify-content: center; flex-wrap: wrap; }
.chip { background: var(--panel2); border: 1px solid var(--line); border-radius: 20px; padding: 3px 10px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.pink { color: #ff8fab; border-color: #5b2440; }
.chip.okc { color: var(--ok); } .chip.badc { color: var(--bad); }
.actions { display: flex; gap: 8px; align-items: center; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-btn { background: transparent; border-radius: 0; color: var(--muted); }
.seg-btn.active { background: var(--navy); color: #fff; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 38px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; display: grid; min-width: 210px; z-index: 30; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.menu-pop button { background: none; text-align: left; border-radius: 0; padding: 9px 12px; }
.menu-pop button:hover { background: var(--line); }

/* workspace */
.ws { display: grid; grid-template-columns: minmax(0, 1fr) var(--insp-w); height: calc(100vh - 56px); }
.ws.insp-closed { grid-template-columns: minmax(0, 1fr) 0; }
.center { display: grid; grid-template-rows: var(--map-h) 6px minmax(0, 1fr); min-height: 0; min-width: 0; }
.ws.analyse .center { grid-template-rows: 40px 0 minmax(0, 1fr); }
.map-wrap { position: relative; min-height: 0; overflow: hidden; }
#map { position: absolute; inset: 0; background: radial-gradient(circle at 45% 35%, #142050, #0b1029); }
.ws.analyse #map, .ws.analyse .map-tools { display: none; }
.ctx-strip { position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: var(--panel); border-bottom: 1px solid var(--line); color: var(--muted); }
.map-tools { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 5; }
.tool { background: rgba(20,28,68,.92); border: 1px solid var(--line); color: var(--text); padding: 4px 9px; border-radius: 6px; font-size: 12px; }
.tool.chk { display: flex; align-items: center; gap: 4px; color: var(--muted); }
#node-search { background: rgba(20,28,68,.92); font-size: 12px; padding: 4px 8px; }
.legend-pop { position: absolute; top: 46px; left: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; z-index: 6; }
.legend-pop ul { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 5px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.off { background: var(--off); } .dot.plan { background: var(--plan); border: 1px dashed var(--muted); }
.probe-mark { color: var(--pink); margin-right: 6px; } .cover-mark { color: var(--sky); margin-right: 6px; } .sim-mark { color: var(--off); margin-right: 6px; }
.splitter { background: var(--line); cursor: row-resize; }
.splitter:hover, .splitter.drag { background: var(--sky); }
.ws.analyse .splitter { visibility: hidden; pointer-events: none; }

/* inspector */
.inspector { background: var(--panel); border-left: 1px solid var(--line); overflow: auto; min-width: 0; }
.ws.insp-closed .inspector { display: none; }
.insp-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--panel); border-bottom: 1px solid var(--line); font-weight: 700; font-size: 15px; z-index: 2; }
#detail { padding: 12px 14px; }
#detail h4 { margin: 14px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
#detail table { width: 100%; border-collapse: collapse; margin: 6px 0; }
#detail td { padding: 4px 4px; border-bottom: 1px solid #22306b; vertical-align: top; word-break: break-word; }
#detail td:first-child { color: var(--muted); width: 36%; }
#detail .btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.insp-open { position: fixed; right: 6px; top: 64px; z-index: 20; }
details summary { cursor: pointer; color: var(--muted); margin: 10px 0 4px; }
pre.logs { background: #070b1f; border: 1px solid var(--line); border-radius: 6px; padding: 8px; max-height: 300px; overflow: auto; font-size: 11.5px; white-space: pre-wrap; word-break: break-all; }
.state { font-weight: 700; }
.state.running { color: var(--ok); } .state.exited, .state.dead { color: var(--bad); } .state.absent { color: var(--off); } .state.planned { color: var(--muted); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.kpi { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.kpi b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 12px; }
.list-plain { margin: 4px 0; padding-left: 18px; } .list-plain li { margin: 2px 0; }

/* trace */
.trace { display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.trace-actions, .trace-filters { display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.trace-actions { min-height: 40px; }
.trace-filters { min-height: 44px; padding-top: 4px; padding-bottom: 4px; }
.spacer { flex: 1; }
.tab { background: none; color: var(--muted); border-radius: 6px; }
.tab.active { background: var(--panel2); color: var(--text); }
.window-info { color: var(--muted); font-size: 12px; margin-left: 8px; }
.chk { color: var(--muted); display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { background: var(--navy); color: #fff; border-radius: 14px; padding: 2px 4px 2px 10px; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.fchip button { background: none; padding: 0 6px; font-size: 13px; }
.newbadge { background: var(--sky); color: #0d1330; border-radius: 12px; padding: 2px 9px; font-weight: 700; font-size: 12px; cursor: pointer; }
.trace-body { flex: 1; min-height: 0; display: flex; }
.pane { flex: 1; overflow: auto; min-height: 0; }
#msgs { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
#msgs th { position: sticky; top: 0; background: var(--panel2); text-align: left; padding: 6px 8px; color: var(--muted); font-weight: 600; z-index: 1; }
#msgs td { padding: 0 8px; height: 28px; border-bottom: 1px solid #1f2a63; white-space: nowrap; }
#msgs td.info { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; width: 46%; }
#msgs tr:hover { background: #1c2660; cursor: pointer; }
#msgs tr.sel { background: #2b3577; box-shadow: inset 3px 0 0 var(--sky); }
.empty { color: var(--muted); padding: 14px; }
.p-NGAP, .p-S1AP { color: #9ec0ff; } .p-PFCP { color: #ffd479; } .p-GTPv2 { color: #7ee2b8; } .p-DIAMETER { color: #ffacbf; } .p-HTTP2 { color: #d2b4ff; } .p-GTP { color: #a9b8d8; }
.ladder-pane { display: flex; }
.procs { width: 260px; flex: none; border-right: 1px solid var(--line); overflow: auto; }
.procs h4 { margin: 0; padding: 10px 12px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; position: sticky; top: 0; background: var(--panel); }
.proc { padding: 8px 12px; border-bottom: 1px solid #1f2a63; cursor: pointer; }
.proc:hover { background: #1c2660; } .proc.sel { background: #2b3577; box-shadow: inset 3px 0 0 var(--sky); }
.proc b { display: block; font-size: 13px; } .proc span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ladder-scroll { flex: 1; overflow: auto; }
#ladder svg text { font-family: "Montserrat", "Segoe UI", system-ui, sans-serif; }
.ladder-head { position: sticky; top: 0; background: var(--panel); z-index: 2; border-bottom: 1px solid var(--line); }
.lm:hover line { stroke-width: 3; }
.lm.sel text { font-weight: 700; }

/* toasts and dialogs */
.toasts { position: fixed; bottom: 16px; right: 16px; display: grid; gap: 8px; z-index: 50; }
.toast { background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid var(--sky); padding: 10px 14px; border-radius: 8px; max-width: 420px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.toast.err { border-left-color: var(--bad); color: var(--text); }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; min-width: 380px; }
dialog::backdrop { background: rgba(0,0,0,.5); }
dialog .row { display: grid; gap: 6px; margin: 8px 0; }
dialog table { width: 100%; border-collapse: collapse; } dialog td { padding: 5px; border-bottom: 1px solid var(--line); }
kbd { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-family: inherit; }

@media (max-width: 1200px) {
  .ws, .ws.insp-closed { grid-template-columns: minmax(0, 1fr) 0; }
  .inspector { position: fixed; right: 0; top: 56px; bottom: 0; width: min(380px, 92vw); z-index: 40; box-shadow: -8px 0 24px rgba(0,0,0,.4); }
  .status { display: none; }
}

/* probe-engine fields in the inspector */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.okc { color: var(--ok); }
