@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Barlow+Semi+Condensed:wght@400;500;600&display=swap");

:root {
  --bg: #0d1a2a;
  --panel: #13243a;
  --panel-2: #1a2f4a;
  --line: #24405f;
  --ink: #e3ecf5;
  --mute: #8da2b8;
  --faint: #5d7590;
  --up: #2fbf8c;
  --degraded: #f0b341;
  --down: #f2545b;
  --unknown: #6c7e92;
  --accent: #5ba4ff;
  --accent-ink: #06172b;
  --radius-s: 4px;
  --radius-m: 8px;
  --font: "Barlow", "Segoe UI", system-ui, sans-serif;
  --font-dense: "Barlow Semi Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
.rail {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 18px 10px;
  display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh;
}
.brand { padding: 0 10px 18px; }
.brand b { display: block; font-size: 21px; font-weight: 700; letter-spacing: .02em; }
.brand span { color: var(--mute); font-size: 13px; }
.rail a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-s);
  color: var(--mute); font-weight: 500;
}
.rail a:hover { background: var(--panel-2); color: var(--ink); text-decoration: none; }
.rail a.on { background: var(--panel-2); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.rail .count { margin-left: auto; font-family: var(--font-dense); font-size: 13px; background: var(--down); color: #fff; border-radius: 10px; padding: 0 7px; }
.rail .foot { margin-top: auto; padding: 10px; color: var(--faint); font-size: 12px; }
.rail .who { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.rail .who b { color: var(--ink); font-size: 14px; font-weight: 600; }
.rail .who span { color: var(--mute); font-size: 12.5px; }
.rail .who a { display: inline; padding: 0; color: var(--accent); }
.rail .who a:hover { background: none; text-decoration: underline; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 24px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; background: var(--bg);
}
.topbar h1 { margin: 0; font-size: 20px; font-weight: 600; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.clock { font-family: var(--font-dense); color: var(--mute); white-space: nowrap; }
.page { padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 20px; }

/* ---------- health bar (branch status proportions) ---------- */
.health { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 1 460px; }
.health .bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; flex: 1; background: var(--panel-2); min-width: 120px; }
.health .bar i { display: block; height: 100%; }
.health .legend { display: flex; gap: 12px; font-family: var(--font-dense); font-size: 14px; color: var(--mute); white-space: nowrap; }
.health .legend b { color: var(--ink); font-weight: 600; }

/* ---------- status primitives ---------- */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.s-up { --s: var(--up); }
.s-degraded { --s: var(--degraded); }
.s-down { --s: var(--down); }
.s-unknown { --s: var(--unknown); }
.dot { background: var(--s, var(--unknown)); }
.stxt { color: var(--s); font-weight: 600; text-transform: capitalize; }
.sev { font-family: var(--font-dense); font-weight: 600; font-size: 13px; padding: 1px 7px; border-radius: var(--radius-s); text-transform: capitalize; }
.sev-critical { background: var(--down); color: #fff; }
.sev-major { background: #e07a3f; color: #fff; }
.sev-minor { background: var(--degraded); color: #241a00; }
.sev-info { background: var(--panel-2); color: var(--mute); }

/* WAN path strip — the signature element */
.paths { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.path {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-dense); font-size: 13px; font-weight: 600;
  padding: 2px 8px; border-radius: var(--radius-s);
  border: 1.5px solid var(--s); color: var(--s); background: transparent;
  white-space: nowrap;
}
.path.active { background: var(--s); color: var(--accent-ink); }
.path.s-down { border-style: dashed; }
.path small { font-weight: 500; opacity: .85; }
.paths.big .path { font-size: 15px; padding: 6px 12px; }

/* ---------- panels & layout ---------- */
.grid-ov { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); min-width: 0; }
.panel.flex { display: flex; flex-direction: column; }
.panel > header { display: flex; align-items: baseline; gap: 12px; padding: 14px 16px 10px; }
.panel > header h2 { margin: 0; font-size: 16px; font-weight: 600; }
.panel > header .sub { color: var(--mute); font-size: 13px; }
.panel > header .act { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.panel .body { padding: 0 16px 16px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.figure { background: var(--panel); padding: 12px 16px; }
.figure .v { font-size: 26px; font-weight: 600; line-height: 1.1; }
.figure .l { color: var(--mute); font-size: 13px; }
.figure .d { font-family: var(--font-dense); font-size: 13px; color: var(--mute); margin-top: 2px; }
.figure .d b { font-weight: 600; }

/* attention list */
.attn { list-style: none; margin: 0; padding: 0; }
.attn li { display: grid; grid-template-columns: 9px 1fr auto; gap: 10px; align-items: start; padding: 10px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.attn li:hover { background: var(--panel-2); }
.attn .dot { margin-top: 6px; }
.attn .t { font-weight: 600; }
.attn .m { color: var(--mute); font-size: 13px; }
.attn .when { font-family: var(--font-dense); color: var(--mute); font-size: 13px; white-space: nowrap; }
.empty { padding: 20px 16px; color: var(--mute); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-family: var(--font-dense); font-size: 14.5px; }
.tbl th { text-align: left; color: var(--mute); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--panel); }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--ink); }
.tbl td { padding: 8px 10px; border-bottom: 1px solid rgba(36, 64, 95, .55); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--panel-2); }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl .nowrap { white-space: nowrap; }
.tbl .strong { font-weight: 600; font-family: var(--font); font-size: 15px; }
.tbl .mute { color: var(--mute); }
.tbl .paths { flex-wrap: nowrap; }
.warn { color: var(--degraded); font-weight: 600; }
.bad { color: var(--down); font-weight: 600; }
.good { color: var(--up); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  padding: 6px 12px; border-radius: var(--radius-s); cursor: pointer; font-weight: 500; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.danger { border-color: var(--down); color: var(--down); background: transparent; }
.btn.small { padding: 3px 9px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.toggle.on { border-color: var(--up); color: var(--up); }
input.in, select.in, textarea.in {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 6px 10px; min-width: 0;
}
input.in:focus, select.in:focus, textarea.in:focus { border-color: var(--accent); outline: none; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 5px 12px; color: var(--mute); cursor: pointer; font-family: var(--font-dense); font-size: 14px; }
.seg button.on { background: #2a4a72; color: var(--ink); }
.seg button + button { border-left: 1px solid var(--line); }

/* ---------- map ---------- */
.map { position: relative; height: 460px; flex: 1 0 auto; overflow: hidden; border-radius: 0 0 var(--radius-m) var(--radius-m); background: #0a1522; cursor: grab; touch-action: none; }
.map.tall { height: calc(100vh - 150px); min-height: 480px; border-radius: var(--radius-m); }
.map .tiles img { position: absolute; width: 256px; height: 256px; filter: invert(1) hue-rotate(185deg) brightness(.82) saturate(.45) contrast(.95); user-select: none; -webkit-user-drag: none; }
.map .pin { position: absolute; transform: translate(-50%, -50%); width: 14px; height: 14px; border-radius: 50%; background: var(--s); border: 2px solid #0a1522; cursor: pointer; z-index: 2; padding: 0; }
.map .pin.hq { width: 18px; height: 18px; border-radius: 4px; }
.map .pin.s-down::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--down); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.map .tip { position: absolute; z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 12px; min-width: 240px; transform: translate(-50%, calc(-100% - 14px)); pointer-events: auto; cursor: default; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.map .tip .t { font-weight: 600; }
.map .tip .m { color: var(--mute); font-size: 13px; margin-bottom: 6px; }
.map .zoom { position: absolute; right: 10px; top: 10px; z-index: 6; display: flex; flex-direction: column; gap: 4px; }
.map .zoom button { width: 30px; height: 30px; padding: 0; justify-content: center; }
.map .attr { position: absolute; right: 6px; bottom: 4px; z-index: 6; font-size: 11px; color: var(--faint); }

/* ---------- charts ---------- */
.chart { width: 100%; display: block; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--mute); font: 12px var(--font-dense); }
.chart .down-band { fill: rgba(242, 84, 91, .16); }
.legend-row { display: flex; gap: 14px; font-family: var(--font-dense); font-size: 13px; color: var(--mute); }
.legend-row i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }

/* ---------- topology ---------- */
.topo { width: 100%; display: block; }
.topo text { fill: var(--ink); font: 14px var(--font-dense); }
.topo .lbl-mute { fill: var(--mute); font-size: 12.5px; }
.topo .node rect, .topo .node circle { fill: var(--panel-2); stroke: var(--s); stroke-width: 2; }
.topo .edge { fill: none; stroke: var(--s); stroke-width: 2; }
.topo .edge.s-down { stroke-dasharray: 5 4; }
.topo .edge.standby { stroke-opacity: .45; }
.topo .clickable { cursor: pointer; }
.topo .clickable:hover rect { stroke-width: 3; }
.autotopo text { font-size: 13.5px; }
.autotopo .t-strong { font-family: var(--font); font-weight: 600; font-size: 14px; }
.autotopo .lbl-mute { font-size: 12.5px; }

/* ---------- branch detail ---------- */
.bhead { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-end; }
.bhead h2 { margin: 0; font-size: 26px; font-weight: 600; }
.bhead .meta { color: var(--mute); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--mute); }
.kv dd { margin: 0; }
.linkcard { border-top: 1px solid var(--line); padding: 12px 16px; display: grid; grid-template-columns: minmax(200px, 1.4fr) 140px 130px 70px 200px 150px; gap: 14px; align-items: center; font-family: var(--font-dense); }
.linkcard .nm { font-family: var(--font); font-weight: 600; }
.linkcard .nm small { display: block; color: var(--mute); font-weight: 400; font-family: var(--font-dense); }
.linkcard .k { color: var(--mute); font-size: 12px; display: block; }
pre.code { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; overflow: auto; max-height: 420px; font: 12.5px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; color: #bcd0e4; }

/* ---------- modal / toast / login ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5, 12, 20, .65); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.modal header { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal header h3 { margin: 0; font-size: 17px; }
.modal header button { margin-left: auto; }
.modal .content { padding: 16px 18px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--mute); }
.form label.full, .form div.full { grid-column: 1 / -1; }
.form .in { color: var(--ink); font-size: 15px; }
.toast { position: fixed; bottom: 18px; right: 18px; z-index: 60; background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: var(--radius-s); max-width: 380px; }
.toast.err { border-left-color: var(--down); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 28px; width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login h1 { margin: 0; font-size: 26px; }
.login p { margin: 0 0 6px; color: var(--mute); }
.login label { display: flex; flex-direction: column; gap: 4px; color: var(--mute); font-size: 13px; }
.login .err { color: var(--down); font-size: 14px; }
.banner { background: rgba(240, 179, 65, .12); border: 1px solid rgba(240, 179, 65, .4); color: var(--degraded); padding: 8px 14px; border-radius: var(--radius-s); font-size: 14px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 8px 14px; color: var(--mute); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid-ov, .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .health .legend { display: none; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail .brand, .rail .foot .poll { display: none; }
  .rail .foot .live { margin: 0; white-space: nowrap; }
  .rail .foot { margin: 0 0 0 8px; padding: 0 4px; flex: none; }
  .rail .who { margin: 0; padding: 0; border: 0; flex-direction: row; gap: 10px; align-items: center; white-space: nowrap; }
  .rail a { flex: none; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; position: static; }
  .health { flex-basis: 100%; order: 3; }
  .page { padding: 16px; }
  .linkcard { grid-template-columns: 1fr 1fr; }
  .form { grid-template-columns: 1fr; }
  .map { height: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  .map .pin.s-down::after { animation: none; transform: scale(1.1); opacity: .8; }
}

/* ---------- tickets ---------- */
.timeline { list-style: none; margin: 0; padding: 0 16px 8px; }
.timeline li { display: grid; grid-template-columns: 9px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline .dot { margin-top: 7px; }
.timeline .tl-head { font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.timeline .tl-text { white-space: pre-wrap; margin-top: 2px; }
.tag { font-family: var(--font-dense); font-size: 12px; border: 1px solid var(--accent); color: var(--accent); border-radius: var(--radius-s); padding: 0 6px; }
.comment-box { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.comment-box textarea { width: 100%; }
.tbl tr.row-bad td:first-child { box-shadow: inset 3px 0 0 var(--down); }
.form fieldset { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin: 0; }
.form fieldset legend { color: var(--ink); font-weight: 600; padding: 0 6px; }
.form .chips { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink); font-size: 14px; }
.form .chips label { flex-direction: row; align-items: center; gap: 6px; color: var(--ink); }

/* live-update indicator (sidebar foot) */
.rail .foot .live { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--mute); margin-bottom: 6px; }
.rail .foot .live i { width: 8px; height: 8px; border-radius: 50%; background: var(--degraded); flex: none; }
.rail .foot .live.live { color: var(--ink); }
.rail .foot .live.live i { background: var(--up); box-shadow: 0 0 0 3px rgba(47, 191, 140, .18); }
.rail .foot .live.off i { background: var(--unknown); }
@media (prefers-reduced-motion: no-preference) {
  .rail .foot .live.retrying i, .rail .foot .live.connecting i { animation: livepulse 1.2s ease-in-out infinite; }
}
@keyframes livepulse { 50% { opacity: .5; } }

/* ---------- system page ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.panel > .kv { padding: 0 16px 16px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; word-break: break-all; }
.sysdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 9px; vertical-align: 2px; background: var(--unknown); }
.sysdot.ok { background: var(--up); }
.sysdot.bad { background: var(--down); }

/* ---------- WAN health chip + maintenance badge ---------- */
.hchip { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 4px;
  font-family: var(--font-dense); font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; border: 1px solid transparent; }
.hchip.good { background: rgba(47, 191, 140, .14); color: var(--up); border-color: rgba(47, 191, 140, .35); }
.hchip.fair { background: rgba(240, 179, 65, .14); color: var(--degraded); border-color: rgba(240, 179, 65, .4); }
.hchip.poor { background: rgba(242, 84, 91, .15); color: var(--down); border-color: rgba(242, 84, 91, .45); }
.hchip.na { color: var(--mute); border-color: var(--line); }
.hchip.big { min-width: 44px; height: 30px; font-size: 18px; }
.mbadge { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap;
  color: #c9b6ff; background: rgba(150, 120, 255, .14); border: 1px solid rgba(150, 120, 255, .4); vertical-align: 1px; }
.banner.maint { border-color: rgba(150, 120, 255, .5); background: rgba(150, 120, 255, .1); color: var(--ink); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.linkcard .hnote { display: block; font-family: var(--font-dense); font-size: 12.5px; color: var(--mute); margin-top: 2px; }

/* ---------- network topology (NMS → access → region → branch) ---------- */
.topo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .topo-grid { grid-template-columns: 1fr; } }
.topo-scroll { overflow: auto; max-height: calc(100vh - 230px); min-height: 320px; border-top: 1px solid var(--line); }
.topo-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0 16px 10px; font-size: 12.5px; }
.topo-legend .lg { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--s, var(--mute)); margin-right: 6px; vertical-align: 3px; }
.topo-legend .lg.dash { border-top: 2px dashed var(--down); }
.topo-legend .lg.maint { border-top-color: #9a7bff; }
.ntopo { display: block; }
.ntopo text { fill: var(--ink); font: 13.5px var(--font-dense); }
.ntopo .tedge { fill: none; stroke: var(--s, var(--line)); stroke-width: 1.6; stroke-opacity: .8; }
.ntopo .tedge.s-down { stroke-dasharray: 5 4; }
.ntopo .tedge.s-unknown { stroke-opacity: .4; }
.ntopo .tedge.maint { stroke: #9a7bff; stroke-dasharray: 2 3; }
.ntopo .tnode { cursor: pointer; outline: none; }
.ntopo .tnode > rect { fill: var(--panel-2); stroke: var(--line); stroke-width: 1; }
.ntopo .tnode.s-down > rect { stroke: var(--down); }
.ntopo .tnode.s-degraded > rect { stroke: var(--degraded); }
.ntopo .tnode.inmaint > rect { stroke: #9a7bff; stroke-dasharray: 3 2; }
.ntopo .tnode:hover > rect, .ntopo .tnode:focus-visible > rect { stroke: var(--accent); stroke-width: 2; }
.ntopo .tnode.sel > rect { stroke: var(--accent); stroke-width: 2.5; fill: #20395a; }
.ntopo .tnode.hit > rect { stroke: #ffd36e; stroke-width: 2.5; }
.ntopo .tnode .dot { fill: var(--s); }
.ntopo .cnt { fill: var(--mute); font-size: 12.5px; }
.ntopo .cnt.bad { fill: var(--down); font-weight: 600; }
.ntopo .hc.good { fill: rgba(47, 191, 140, .18); stroke: rgba(47, 191, 140, .5); }
.ntopo .hc.fair { fill: rgba(240, 179, 65, .18); stroke: rgba(240, 179, 65, .55); }
.ntopo .hc.poor { fill: rgba(242, 84, 91, .2); stroke: rgba(242, 84, 91, .6); }
.ntopo .hct { font-size: 12px; font-weight: 600; }
.tcounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 14px; }
.tcounts > div { background: var(--panel); padding: 8px; text-align: center; }
.tcounts b { display: block; font-size: 20px; color: var(--s, var(--ink)); }
.tcounts span { font-size: 12px; color: var(--mute); }
.tsub { font-size: 14px; font-weight: 600; margin: 14px 0 8px; }
.tlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
label.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--mute); white-space: nowrap; }
@media (max-width: 760px) {
  .topo-grid .panel > header { flex-wrap: wrap; }
  .topo-grid .panel > header .act.filters { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .topo-grid .panel > header .act.filters .in { flex: 1 1 160px; min-width: 0; }
  .topo-hint { display: none; }
  .topo-scroll { max-height: 70vh; }
}

/* ---------- SD-WAN push checks ---------- */
.pfbox { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; font-size: 14px; }
.pfbox ul { margin: 6px 0 0 18px; padding: 0; display: grid; gap: 4px; }
.pfbox.bad { border-color: rgba(242, 84, 91, .5); background: rgba(242, 84, 91, .08); }
.pfbox.bad b { color: var(--down); }
.pfbox.warn { border-color: rgba(240, 179, 65, .5); background: rgba(240, 179, 65, .08); }
.pfbox.warn b { color: var(--degraded); }
.pfbox.ok { border-color: rgba(47, 191, 140, .45); color: var(--up); }
.banner.ok { border-color: rgba(47, 191, 140, .45); background: rgba(47, 191, 140, .1); color: var(--up); }

/* ---------- SD-WAN policies ---------- */
.prefer { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; font-family: var(--font-dense); }
.prefer b { font-weight: 600; padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel-2); font-size: 13px; }
.prefer i { color: var(--mute); font-style: normal; margin: 0 2px; }
.prefer-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pchip { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); padding: 2px 4px 2px 10px; }
.pchip b { margin-right: 6px; font-size: 14px; }
.pchip button { background: none; border: 0; color: var(--mute); cursor: pointer; font-size: 16px; padding: 2px 6px; border-radius: 4px; }
.pchip button:hover:not(:disabled) { color: var(--ink); background: var(--line); }
.pchip button:disabled { opacity: .3; cursor: default; }
.form .chkrow { flex-direction: row; align-items: center; gap: 8px; }

/* ---------- configuration backups ---------- */
.cfg-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.cfg-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 12px; }
@media (max-width: 900px) { .cfg-grid { grid-template-columns: 1fr; } .cfg-list { max-height: 220px; } }
.cfg-list { display: flex; flex-direction: column; gap: 4px; max-height: 560px; overflow: auto; }
.cfg-item { text-align: left; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; color: var(--ink); cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 1px; }
.cfg-item:hover { border-color: var(--accent); }
.cfg-item.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.cfg-item .t { font-weight: 600; font-size: 14px; }
.cfg-item .m { font-size: 12.5px; color: var(--mute); font-family: var(--font-dense); }
.basetag { margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--up); border: 1px solid rgba(47, 191, 140, .45); border-radius: 4px; padding: 0 5px; }
.cfg-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.cfg-view pre.code { max-height: 560px; overflow: auto; margin: 0; }
pre.diff .dl { display: block; min-height: 1.2em; }
pre.diff .add { color: #5fd9a8; background: rgba(47, 191, 140, .1); }
pre.diff .del { color: #ff8a8f; background: rgba(242, 84, 91, .1); }
pre.diff .dh { color: var(--mute); }

/* ---------- templates ---------- */
.tpl-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px; }
.tpl-tabs button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); padding: 8px 12px; text-align: left; cursor: pointer; font: inherit; display: flex; flex-direction: column; }
.tpl-tabs button span { font-size: 12.5px; color: var(--mute); }
.tpl-tabs button.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
textarea.mono, .in.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }

/* ================= Overview v2 (step 27): health ring, NOC brief, sparkline tiles ================= */
:root { --radius-m: 10px; --glow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 28px rgba(0,0,0,.22); }
.panel { background: linear-gradient(180deg, #152842 0%, var(--panel) 60%); box-shadow: var(--glow); }
.mute { color: var(--mute); }
.small { font-size: 13px; }
.ov2 { display: flex; flex-direction: column; gap: 18px; }

.hero { display: grid; grid-template-columns: auto minmax(0, 1fr) 230px; gap: 22px; align-items: stretch;
  padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line);
  background: radial-gradient(1200px 260px at 0% 0%, rgba(91,164,255,.13), transparent 60%),
              radial-gradient(600px 220px at 100% 100%, rgba(139,124,255,.10), transparent 60%), var(--panel);
  box-shadow: var(--glow); }
.hero-score { display: flex; gap: 14px; align-items: center; padding-right: 22px; border-right: 1px solid var(--line); }
.ring { position: relative; width: 128px; height: 128px; flex: none; }
.ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-in b { font-size: 38px; line-height: 1; font-weight: 700; letter-spacing: -1px; }
.ring-in span { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.hero-cap { display: flex; flex-direction: column; gap: 3px; min-width: 130px; }
.hero-cap .k { font-weight: 600; font-size: 16px; }
.hero-cap .why { font-family: var(--font-dense); font-size: 13px; color: var(--mute); }

.brief { min-width: 0; display: flex; flex-direction: column; }
.brief-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.brief-h h2 { margin: 0; font-size: 16px; font-weight: 600; }
.spark-ico { color: #a99bff; font-size: 15px; text-shadow: 0 0 12px rgba(169,155,255,.7); }
.brief ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.brief li { display: grid; grid-template-columns: 8px 1fr; gap: 10px; align-items: baseline; line-height: 1.4; animation: fadeUp .35s ease both; }
.brief li i { width: 8px; height: 8px; border-radius: 50%; transform: translateY(-1px); box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.brief li.click { cursor: pointer; }
.brief li.click:hover span { color: #fff; text-decoration: underline; text-decoration-color: var(--line); }
.brief-skel { display: flex; flex-direction: column; gap: 9px; }
.brief-skel i { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--panel-2), #24405f, var(--panel-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.brief-skel i:nth-child(2) { width: 80%; } .brief-skel i:nth-child(3) { width: 55%; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.stack { display: flex; flex-direction: column; gap: 4px; padding-left: 20px; border-left: 1px solid var(--line); }
.stack-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; margin-bottom: 6px; background: var(--panel-2); }
.stack-row { display: grid; grid-template-columns: 8px 1fr auto 38px; gap: 8px; align-items: center; color: var(--ink); padding: 2px 4px; border-radius: 6px; font-size: 14px; }
.stack-row:hover { background: var(--panel-2); text-decoration: none; }
.stack-row i { width: 8px; height: 8px; border-radius: 2px; }
.stack-row b { font-weight: 600; }
.stack-row small { color: var(--faint); text-align: right; font-family: var(--font-dense); }
.stack-row.zero { opacity: .5; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 8px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink);
  background: linear-gradient(180deg, #172d49, var(--panel)); box-shadow: var(--glow); transition: transform .15s ease, border-color .15s; min-width: 0; }
a.tile:hover { text-decoration: none; border-color: #3a6390; transform: translateY(-1px); }
.tile .tl { color: var(--mute); font-size: 13px; }
.tile .tv { font-size: 28px; font-weight: 650; line-height: 1.1; letter-spacing: -.5px; }
.tile .tv small { font-size: 15px; color: var(--faint); font-weight: 500; letter-spacing: 0; }
.tile .tn { font-family: var(--font-dense); font-size: 13px; color: var(--mute); min-height: 18px; }
.tile .tn.bad { color: var(--down); font-weight: 600; } .tile .tn.warn { color: var(--degraded); font-weight: 600; }
.spark { display: block; width: 100%; margin-top: 4px; }
.spark.empty { border-bottom: 1px dashed var(--line); opacity: .6; }

.ov2-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.ov2-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.mapcard .map { height: 300px; }
.mapcard { position: relative; overflow: hidden; }
.maphint { position: absolute; left: 12px; bottom: 10px; z-index: 6; background: rgba(13,26,42,.88); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 13px; color: var(--mute); backdrop-filter: blur(4px); }

.attn2 ul { list-style: none; margin: 0; padding: 0 0 6px; max-height: 620px; overflow: auto; }
.attn2 li { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 16px; border-top: 1px solid var(--line); position: relative; }
.attn2 li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.attn2 li.lv-critical::before { background: var(--down); box-shadow: 0 0 12px var(--down); }
.attn2 li.lv-major::before { background: var(--degraded); }
.attn2 li:hover { background: rgba(26,47,74,.55); }
.attn2 li.is-maint { opacity: .55; }
.attn2 .badge { font-family: var(--font-dense); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; border: 1px solid; border-radius: 999px; padding: 1px 8px; text-align: center; margin-top: 1px; }
.attn2 .t { font-weight: 600; }
.attn2 .m { color: var(--mute); font-size: 13.5px; line-height: 1.4; }
.attn2 .m .cust { color: var(--faint); }
.attn2 .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.attn2 .timer { font-family: var(--font-dense); font-weight: 600; font-size: 14px; color: var(--mute); white-space: nowrap; }
.attn2 .acts { display: flex; gap: 6px; }
.allgood { display: flex; gap: 14px; align-items: center; padding: 22px 18px; }
.allgood b { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(47,191,140,.15); color: var(--up); font-size: 20px; box-shadow: 0 0 24px rgba(47,191,140,.25); }
.allgood .t { font-weight: 600; }

.changes ol { list-style: none; margin: 0; padding: 4px 0 8px; max-height: 360px; overflow: auto; position: relative; }
.changes li { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; padding: 7px 16px; cursor: pointer; position: relative; }
.changes li::after { content: ""; position: absolute; left: 20px; top: 22px; bottom: -8px; width: 1px; background: var(--line); }
.changes li:last-child::after { display: none; }
.changes li i { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; z-index: 1; box-shadow: 0 0 0 3px var(--panel); }
.changes li:hover { background: rgba(26,47,74,.55); }
.changes .t { font-weight: 600; font-size: 14px; }
.changes .m { color: var(--mute); font-size: 13px; }
.changes .when { font-family: var(--font-dense); color: var(--faint); font-size: 13px; white-space: nowrap; }

@media (max-width: 1250px) { .hero { grid-template-columns: auto minmax(0, 1fr); } .stack { grid-column: 1 / -1; border-left: 0; padding-left: 0; display: grid; grid-template-columns: repeat(4, 1fr); } .stack-bar { grid-column: 1 / -1; } }
@media (max-width: 1100px) { .ov2-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: 14px; }
  .hero-score { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
  .stack { grid-template-columns: repeat(2, 1fr); }
  .attn2 li { grid-template-columns: 1fr; gap: 6px; }
  .attn2 .badge { justify-self: start; }
  .attn2 > header { flex-wrap: wrap; }
  .attn2 > header .act { margin-left: 0; width: 100%; }
  .attn2 .side { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .brief li, .brief-skel i { animation: none; } .tile { transition: none; } }

/* ---------- capacity ---------- */
.advb { display: inline-block; font-family: var(--font-dense); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border: 1px solid; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.usewrap { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.usewrap em { font-style: normal; font-family: var(--font-dense); font-size: 13px; min-width: 34px; }
.usebar { position: relative; display: inline-block; width: 90px; height: 16px; border-radius: 4px; background: var(--panel-2); overflow: visible; vertical-align: middle; }
.usebar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.usebar b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); opacity: .7; }
.tbl td .capwhy-cell { display: inline-block; max-width: 420px; white-space: normal; line-height: 1.35; }
.capdetail h4 { margin: 18px 0 6px; font-size: 15px; }
.capfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.capfacts div { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.capfacts span { color: var(--mute); font-size: 12px; } .capfacts b { font-size: 17px; }
.capwhy { margin-top: 12px; line-height: 1.5; }
.capchart { width: 100%; height: auto; }
.capchart text { fill: var(--mute); font-size: 11px; font-family: var(--font-dense); }
.hourbars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 110px; align-items: end; padding-bottom: 16px; }
.hourbars div { position: relative; height: 100%; display: flex; align-items: flex-end; }
.hourbars i { display: block; width: 100%; border-radius: 3px 3px 0 0; min-height: 1px; }
.hourbars span { position: absolute; bottom: -16px; left: 0; font-size: 11px; color: var(--faint); font-family: var(--font-dense); }
.row-gap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- onboarding ---------- */
.obcheck { margin-top: 12px; }
.obverdict { padding: 8px 12px; border-radius: 8px; font-weight: 600; margin-bottom: 8px; }
.obverdict.lv-ok { background: rgba(47,191,140,.12); color: var(--up); }
.obverdict.lv-warn { background: rgba(240,179,65,.12); color: var(--degraded); }
.obverdict.lv-bad { background: rgba(242,84,91,.12); color: var(--down); }
.obcheck ol { list-style: none; margin: 0; padding: 0; }
.obcheck li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.obst { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid; display: grid; place-items: center; font-size: 12px; }
.obcheck .t { font-weight: 600; } .obcheck .m { color: var(--mute); font-size: 13.5px; }
.obcheck .fix { font-size: 13.5px; color: var(--accent); margin-top: 2px; }
.obopts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 8px 0 12px; }
.obopts label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--mute); }
.obopts label.chk { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
.obpw { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; }
.obscript { margin-top: 12px; }
.obscript pre { margin-top: 6px; max-height: 300px; }
.lvt-ok { color: var(--up); } .lvt-warn { color: var(--degraded); } .lvt-bad { color: var(--down); }
@media (max-width: 760px) { .obopts { grid-template-columns: 1fr; } }
.impmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 10px; max-height: 260px; overflow: auto; }
.impmap label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--mute); }
.impmap label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-weight: 600; }
.impsum { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 14px; }

/* ---------- shift handover ---------- */
.shifthero { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shifthero > div { display: flex; flex-direction: column; gap: 2px; }
.shifthero b { font-size: 17px; }
.hostats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.hostats > div { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.hostats b { font-size: 22px; } .hostats span { color: var(--mute); font-size: 12px; }
.hostats .bad b { color: var(--down); } .hostats .warn b { color: var(--degraded); }
.hosum h4 { margin: 16px 0 4px; font-size: 14px; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.holist { list-style: none; margin: 0; padding: 0; }
.holist li { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); cursor: pointer; align-items: start; }
.holist li:hover { background: rgba(26,47,74,.4); }
.holist.hist li { grid-template-columns: 24px 1fr; padding: 9px 16px; }
.lvdot { width: 10px; height: 10px; border-radius: 50%; margin: 5px 0 0 4px; display: block; }
.lvdot.lv-critical { background: var(--down); } .lvdot.lv-major { background: var(--degraded); } .lvdot.lv-minor, .lvdot.lv-info { background: var(--accent); }
.prio { font-family: var(--font-dense); font-weight: 700; font-size: 12px; border-radius: 4px; padding: 1px 6px; text-align: center; border: 1px solid var(--line); }
.prio.p-P1 { background: var(--down); color: #fff; border-color: var(--down); } .prio.p-P2 { color: var(--degraded); border-color: var(--degraded); }
.honote { white-space: pre-wrap; background: var(--panel-2); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; }
.okc { color: var(--up); font-weight: 700; }
.roster { display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); overflow-x: auto; }
.roster > div { background: var(--panel); padding: 8px 10px; min-height: 52px; }
.roster .rh { font-weight: 600; font-size: 13px; min-height: 0; }
.roster .rs { display: flex; flex-direction: column; } .roster .rs span { color: var(--mute); font-size: 12px; }
.roster .rc { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; }
.roster .rc.click { cursor: pointer; } .roster .rc.click:hover { background: var(--panel-2); }
.roster .rc.live { box-shadow: inset 0 0 0 2px var(--accent); }
.chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-size: 13px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.checks .chk { display: flex; gap: 8px; align-items: center; }
@media (max-width: 760px) { .shifthero { grid-template-columns: 1fr; } }

/* ---------- security ---------- */
.scorechip { display: inline-block; min-width: 38px; text-align: center; font-weight: 700; border: 1.5px solid; border-radius: 999px; padding: 0 8px; font-family: var(--font-dense); }
.seclist { list-style: none; margin: 0; padding: 0; }
.seclist li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.seclist .t { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.seclist pre { margin: 6px 0 0; max-height: 160px; white-space: pre-wrap; }
.commonp { display: flex; flex-wrap: wrap; gap: 8px; }
.fwjob { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.fwsteps { display: flex; flex-wrap: wrap; gap: 6px; }
.fwstep { border: 1px solid; border-radius: 8px; padding: 3px 9px; font-size: 13px; }
.rfofacts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.rfofacts div { background: var(--panel-2); border-radius: 8px; padding: 6px 10px; display: flex; flex-direction: column; }
.rfofacts span { color: var(--mute); font-size: 12px; }
@media (max-width: 760px) { .rfofacts { grid-template-columns: 1fr 1fr; } }

/* ---------- mobile app ---------- */
.mobilebar { display: none; }
.phoneset { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.phoneset h4 { margin: 0 0 8px; }
.chk { display: inline-flex; gap: 6px; align-items: center; }
.photo-btn { cursor: pointer; }
@media (max-width: 760px) {
  .mobilebar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(13,26,42,.96); border-top: 1px solid var(--line);
    backdrop-filter: blur(8px); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .mobilebar a, .mobilebar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11px; color: var(--mute);
    background: none; border: 0; padding: 4px 0; position: relative; text-decoration: none; }
  .mobilebar .mi { font-size: 19px; line-height: 1.1; }
  .mobilebar .on { color: var(--accent); }
  .mobilebar .mb-count { position: absolute; top: 0; right: 24%; background: var(--down); color: #fff; border-radius: 999px; font-size: 10px; padding: 0 5px; }
  .page { padding-bottom: 76px !important; }
  .toast { bottom: 76px; }
  .topbar .btn.toggle, .topbar a[href="#/wallboard"] { display: none; }
}

/* ---------- NOC tools ---------- */
.toolsgrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.tooltabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--line); }
.tooltabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 10px; color: var(--mute); cursor: pointer; font: inherit; }
.tooltabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.runfrom { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-bottom: 10px; }
.runfrom label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--mute); }
.tstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.tstat { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.tstat span { color: var(--mute); font-size: 12px; } .tstat b { font-size: 17px; overflow-wrap: anywhere; }
.pingbars { display: flex; gap: 2px; height: 70px; align-items: flex-end; margin: 6px 0; }
.pingbars div { flex: 1; height: 100%; display: flex; align-items: flex-end; } .pingbars i { width: 100%; border-radius: 2px 2px 0 0; }
.tfound { margin: 0; padding-left: 18px; } .tfound li { margin: 4px 0; }
.thist { list-style: none; margin: 0; padding: 0 0 8px; } .thist li { padding: 8px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.thist li:hover { background: var(--panel-2); }
@media (max-width: 1000px) { .toolsgrid { grid-template-columns: 1fr; } .runfrom { grid-template-columns: 1fr; } }

/* ---------- side menu v2: groups, icons, compact ---------- */
.shell { grid-template-columns: 232px 1fr; transition: grid-template-columns .18s ease; }
body.nav-compact .shell { grid-template-columns: 64px 1fr; }
.rail { padding: 14px 10px 10px; gap: 0; background: linear-gradient(180deg, #11223a, #0f1e33); }
.rail .brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.rail .brand b { font-size: 18px; letter-spacing: .04em; line-height: 1.1; }
.rail .brand span { font-size: 11.5px; }
.rail .logo { width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #2fbf8c, #5ba4ff); box-shadow: 0 4px 14px rgba(91,164,255,.25); }
.railbtn { margin-left: auto; background: none; border: 1px solid transparent; color: var(--mute); border-radius: 6px; padding: 4px; cursor: pointer; display: grid; place-items: center; }
.railbtn:hover { border-color: var(--line); color: var(--ink); }
.navscroll { flex: 1; overflow-y: auto; overflow-x: hidden; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.navgroup { margin-bottom: 6px; }
.ghead { display: flex; align-items: center; width: 100%; gap: 6px; background: none; border: 0; cursor: pointer; padding: 8px 10px 4px;
  color: var(--faint); font: 600 11px/1 var(--font); text-transform: uppercase; letter-spacing: .09em; }
.ghead:hover { color: var(--mute); }
.gchev { margin-left: auto; display: grid; transition: transform .15s; } .gchev.open { transform: rotate(90deg); }
.gdot { width: 7px; height: 7px; border-radius: 50%; background: var(--degraded); }
.gsep { height: 1px; background: var(--line); margin: 6px 8px; }
.rail a { gap: 11px; padding: 7px 10px; font-size: 14.5px; position: relative; }
.rail a .ni { display: grid; place-items: center; width: 20px; flex: none; opacity: .85; }
.rail a.on .ni { color: var(--accent); opacity: 1; }
.rail a.on { background: rgba(91,164,255,.12); box-shadow: inset 3px 0 0 var(--accent); }
.rail a .nl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail .count { font-size: 12px; line-height: 18px; min-width: 20px; text-align: center; padding: 0 6px; }
.rail .count.c-bad { background: var(--down); color: #fff; }
.rail .count.c-warn { background: var(--degraded); color: #241a00; }
.rail .count.c-info { background: var(--accent); color: var(--accent-ink); }
.rail .count.c-mute { background: var(--panel-2); color: var(--mute); }
.rail .foot { padding: 8px 6px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.rail .foot .poll { display: block; color: var(--faint); font-size: 11.5px; margin-bottom: 4px; }
.rail .who { margin-top: 6px; padding-top: 8px; flex-direction: row; align-items: center; gap: 10px; }
.rail .avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; color: var(--accent-ink);
  background: linear-gradient(135deg, #5ba4ff, #8b7cff); }
.rail .whot { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rail .whot b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* compact: icons only */
.rail.compact { padding: 14px 8px 10px; }
.rail.compact .brand { flex-direction: column; padding: 2px 0 10px; }
.rail.compact .railbtn { margin: 0; }
.rail.compact a { justify-content: center; padding: 9px 0; }
.rail.compact a .count { position: absolute; top: 2px; right: 2px; font-size: 10px; line-height: 15px; min-width: 16px; padding: 0 4px; }
.rail.compact .foot { padding: 8px 0 0; display: flex; flex-direction: column; align-items: center; }
.rail.compact .who { flex-direction: column; border: 0; }
@media (max-width: 760px) {
  .shell, body.nav-compact .shell { grid-template-columns: 1fr; }
  .rail, .rail.compact { flex-direction: row; padding: 6px 8px; }
  .rail .brand, .rail .ghead, .rail .gsep, .rail .foot .poll { display: none; }
  .navscroll { display: flex; overflow-x: auto; overflow-y: hidden; }
  .navgroup { display: flex; margin: 0; }
  .rail a .nl { display: inline; }
  .rail.compact a { padding: 7px 10px; }
  .rail .foot { border: 0; margin: 0; padding: 0 0 0 8px; display: flex; align-items: center; }
  .rail .who { margin: 0; padding: 0; border: 0; }
  .rail .whot span:nth-child(2) { display: none; }
}
.rail .brand .bt { min-width: 0; } .rail .brand .bt span { white-space: nowrap; display: block; }
.rail .avatar { border: 0; cursor: pointer; color: #fff; font: 700 14px var(--font); padding: 0; }
@media (max-width: 760px) {
  .navscroll { flex: 1; min-width: 0; }
  .rail .foot { flex: none; }
  .rail .foot .live, .rail .whot, .rail.compact .who .railbtn { display: none; }
  .rail .who { margin: 0; }
}

/* ---------- knowledge base ---------- */
.kbgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; padding: 0 16px 16px; }
.kbcard { text-align: left; display: flex; flex-direction: column; gap: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  color: var(--ink); font: inherit; cursor: pointer; }
.kbcard:hover { border-color: #3a6390; }
.kbtext { white-space: pre-wrap; line-height: 1.5; }
.kbsteps { margin: 0; padding-left: 22px; } .kbsteps li { margin: 4px 0; }
.kbpanel h4 { margin: 4px 0 8px; font-size: 14px; }
.pbsteps { list-style: none; margin: 0; padding: 0; } .pbsteps li { padding: 4px 0; font-size: 14px; } .pbsteps li.done { color: var(--mute); text-decoration: line-through; }
.pbsteps .chk { align-items: flex-start; } .pbsteps input { margin-top: 3px; }
.kbsug { border-top: 1px solid var(--line); padding: 8px 0; display: flex; flex-direction: column; gap: 3px; }
.pbsteps .chk { display: flex; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
.kbpanel { min-width: 0; overflow: hidden; }

/* ---------- ping monitor + wall screen */
.pspark { display: block; }
.pspark .pdown { fill: var(--down); opacity: .55; }
.pst { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.pst i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.pst.bad i { box-shadow: 0 0 0 3px rgba(242, 84, 91, .25); animation: ppulse 1.4s infinite; }
@keyframes ppulse { 50% { box-shadow: 0 0 0 6px rgba(242, 84, 91, 0); } }
.pwall { min-height: 100vh; padding: 18px 22px; box-sizing: border-box; background: var(--bg); }
.pwhead { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; flex-wrap: wrap; }
.pwgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(250px * var(--pf, 1)), 1fr)); gap: 12px; }
.pwtile { border-radius: 12px; padding: 12px 14px; border: 2px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: calc(14px * var(--pf, 1)); }
.pwtile.s-up { border-color: rgba(47, 191, 140, .55); }
.pwtile.s-degraded { border-color: var(--degraded); background: rgba(240, 179, 65, .09); }
.pwtile.s-down { border-color: var(--down); background: rgba(242, 84, 91, .16); animation: pwblink 2s infinite; }
@keyframes pwblink { 50% { background: rgba(242, 84, 91, .28); } }
.pwtop { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pwname { font-size: 1.25em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pwtop .mono { font-size: .85em; white-space: nowrap; }
.pwbig { font-size: 2em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pwbig small { font-size: .5em; }
.pwfoot { display: flex; justify-content: space-between; gap: 8px; font-size: .85em; flex-wrap: wrap; }
.pwtile .pspark { width: 100%; }
.noise-kpi { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.noise-kpi div { flex: 1 1 160px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 12px; display: flex; flex-direction: column; }
.noise-kpi b { font-size: 26px; }
.noise-kpi span { color: var(--mute); font-size: 13px; }
.agrp { display: inline-block; margin-left: 8px; font-size: 12px; padding: 1px 7px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); color: var(--accent); cursor: pointer; white-space: nowrap; }
.tbl tr.child td { opacity: .75; }
.tbl tr.child td:nth-child(5) { padding-left: 22px; }

/* ---------- login security */
.qrbox { background: #fff; border-radius: 8px; padding: 6px; width: fit-content; margin: 6px auto; }
.qrbox svg { display: block; width: 200px; height: 200px; }
.setupsteps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink); }
.setupsteps code.sel { user-select: all; font-size: 13px; word-break: break-all; }
.in.otp { font-size: 24px; letter-spacing: 6px; text-align: center; font-variant-numeric: tabular-nums; font-family: var(--font-dense); }
.login .chk, .chk { display: flex; flex-direction: row !important; gap: 8px; align-items: center; color: var(--ink); font-size: 13.5px; cursor: pointer; }
.chk input { width: 16px; height: 16px; }
.bcodes { display: flex; flex-direction: column; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px; }
.bcodes p { margin: 0; }
.bcgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; font-size: 17px; letter-spacing: 1px; }
.mysec { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 8px; }
.mysec h4 { margin: 8px 0; }
.seckpi { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.seckpi div { flex: 1 1 180px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; display: flex; flex-direction: column; }
.seckpi b { font-size: 26px; }
.seckpi span { color: var(--mute); font-size: 13px; }
.secrules { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px 28px; }
.secrules > div { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.secrules .mute { font-size: 12.5px; }
.chips { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.secnums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.secnums label { display: flex; flex-direction: column; gap: 4px; color: var(--mute); font-size: 13px; }
@media print { body * { visibility: hidden; } .bcodes, .bcodes * { visibility: visible; } .bcodes { position: absolute; left: 0; top: 0; } }

/* ---------- delivery desk */
.dhead { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.board { display: grid; grid-template-columns: repeat(6, minmax(200px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.bcol { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.bch { display: flex; align-items: baseline; gap: 8px; padding: 2px 4px 6px; border-bottom: 1px solid var(--line); }
.bch span { background: var(--panel-2); border-radius: 10px; padding: 0 8px; font-size: 12.5px; }
.bch em { margin-left: auto; font-style: normal; color: var(--mute); font-size: 12px; }
.ocard { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border-radius: var(--radius-s); background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); color: var(--ink); text-decoration: none; font-size: 13.5px; }
.ocard:hover { border-color: var(--accent); }
.ocard.late { border-left-color: var(--down); }
.ocard.hold { opacity: .7; border-left-color: var(--degraded); }
.ocard b { font-size: 14.5px; }
.octop { display: flex; gap: 6px; align-items: center; font-size: 11.5px; }
.ocfoot { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; margin-top: 3px; color: var(--mute); }
.ohead .tag, .ocard .tag, .tbl .tag, .tag.bad, .tag.warn { margin-left: 6px; vertical-align: middle; }
.tag.bad { color: var(--down); border-color: var(--down); } .tag.warn { color: var(--degraded); border-color: var(--degraded); }
.ohead { display: flex; gap: 14px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.oacts { display: flex; gap: 8px; flex-wrap: wrap; }
.stepper { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 4px 0 12px; }
.stepper .step { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--radius-s); background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; color: var(--mute); }
.stepper .step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-weight: 700; color: var(--ink); }
.stepper .step b { color: var(--ink); font-size: 13.5px; }
.stepper .step.done i { background: var(--up); color: #062; }
.stepper .step.now { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.stepper .step.now i { background: var(--accent); color: var(--accent-ink); }
.stepper.cancelled { opacity: .6; }
.ogrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.ocol { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.acc { display: flex; flex-direction: column; gap: 6px; }
.accrow { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); }
.accrow.s-fail { border-color: rgba(242, 84, 91, .5); }
.accic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; border: 2px solid currentColor; flex: none; }
.acct { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 13.5px; }
.acct .mute { font-size: 12.5px; }
.acca { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.accbar { height: 5px; background: var(--panel); border-radius: 3px; overflow: hidden; margin-top: 3px; }
.accbar i { display: block; height: 100%; background: var(--up); }
.accbar i.bad { background: var(--down); }
.otl { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; font-size: 13.5px; }
.ote { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.ote.k-stage { color: var(--accent); }
.ote.k-test div, .ote.k-accept div { color: var(--ink); }
.fhead { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid var(--line); padding: 8px 0 4px; }
.sbar { display: grid; grid-template-columns: 110px 1fr 60px; gap: 10px; align-items: center; margin-bottom: 10px; font-size: 13.5px; }
.sbar > div { position: relative; height: 14px; background: var(--panel-2); border-radius: 3px; }
.sbar > div i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.sbar > div i.bad { background: var(--down); }
.sbar > div em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .6; }
@media (max-width: 900px) { .ogrid { grid-template-columns: 1fr; } .stepper { grid-template-columns: repeat(6, minmax(90px, 1fr)); overflow-x: auto; } }

/* ---------- side menu: denser, accordion, one-line footer */
.rail a { padding: 6px 10px; font-size: 14px; border-radius: 7px; }
.rail a .ni svg { width: 17px; height: 17px; }
.navgroup { margin-bottom: 2px; }
.ghead { padding: 9px 10px 3px; border-radius: 6px; }
.ghead.open { color: var(--mute); }
.ghead .gcount { font-style: normal; font-size: 11px; line-height: 16px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--degraded); color: #241a00; text-align: center; font-weight: 700; letter-spacing: 0; }
.ghead .gchev { margin-left: auto; }
.navscroll::-webkit-scrollbar { width: 5px; }
.navscroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.navscroll::-webkit-scrollbar-track { background: transparent; }
.navscroll { scrollbar-color: var(--line) transparent; }
.rail .foot .live { margin-bottom: 2px; }
.rail .foot .live .poll { font-style: normal; margin-left: auto; color: var(--faint); font-size: 11.5px; }
.rail .who { margin-top: 4px; padding-top: 6px; }
.rail .avatar { width: 30px; height: 30px; }
.feaspick { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.feaspick .chk { align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); }
.feaspick .chk.on { border-color: var(--accent); }

/* ---------- ISP payments */
.pv3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pvb { background: var(--panel-2); border: 1px solid var(--line); border-top: 3px solid var(--up); border-radius: var(--radius-m); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.pvb.warn { border-top-color: var(--degraded); } .pvb.bad { border-top-color: var(--down); }
.pvb span { color: var(--mute); font-size: 12.5px; } .pvb b { font-size: 20px; } .pvb em { font-style: normal; color: var(--mute); font-size: 12.5px; }
.bsec { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-m); display: flex; flex-direction: column; gap: 10px; }
.bulkbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.tabs button.bad { color: var(--down); }
.pst.info { color: var(--accent); }
@media (max-width: 760px) { .pv3 { grid-template-columns: 1fr; } }
.tile .tn.good { color: var(--up); }

/* plain status (step 42) */
.plain { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; white-space: nowrap; }
.plain i { font-style: normal; font-size: 11px; }
.plain em { font-style: normal; font-weight: 400; color: var(--mute); white-space: normal; }
.plain.pl-down { color: var(--down); } .plain.pl-backup, .plain.pl-slow { color: var(--degraded); }
.plain.pl-working { color: var(--up); } .plain.pl-nodata, .plain.pl-planned { color: var(--mute); }
.pl-ico { font-style: normal; font-size: 11px; margin-right: 6px; }
.tag.ok { color: var(--up); border-color: var(--up); } .tag.mute { color: var(--mute); border-color: var(--line, #444); }
.btn.small.warnb { border-color: var(--degraded); color: var(--degraded); }
.attn2 .acts { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.wbg { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line, #24344a); text-decoration: none; color: inherit; font-size: 14px; min-width: 0; }
.wbg i { font-style: normal; font-size: 10px; }
.wbg b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; font-weight: 600; }
.wbg span { color: var(--mute); font-size: 12px; white-space: nowrap; }
.wbg-down { border-color: var(--down); background: rgba(229,72,77,.12); } .wbg-down span { color: var(--down); }
.wbg-backup, .wbg-slow { border-color: var(--degraded); } .wbg-backup span, .wbg-slow span { color: var(--degraded); }
.wbg-nodata { opacity: .7; border-style: dashed; }
.sbar { height: 6px; border-radius: 3px; background: var(--panel-2, #1c2a3d); margin: 6px 0 4px; overflow: hidden; }
.sbar i { display: block; height: 100%; background: var(--up); border-radius: 3px; transition: width .6s; }
.sbar i.warn { background: var(--degraded); } .sbar i.bad { background: var(--down); }
.figures.srv .v.good { color: var(--up); } .figures.srv .v.warn { color: var(--degraded); } .figures.srv .v.bad { color: var(--down); }
.qf-more td { background: rgba(255,255,255,.02); padding: 10px 12px 12px !important; }
.qf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 12px; margin-bottom: 6px; }
.qf-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--mute); }

/* team chat (Gmail-style dock) */
.chatdock { position: fixed; right: 16px; bottom: 0; z-index: 900; display: flex; align-items: flex-end; gap: 10px; pointer-events: none; }
.chatdock > * { pointer-events: auto; }
.chatcol { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-bottom: 14px; }
.chatbtn { background: var(--accent, #4c8dff); color: #fff; border: 0; border-radius: 22px; padding: 10px 16px; font-weight: 600; font-size: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.chatbtn i { font-style: normal; background: var(--down, #e5484d); border-radius: 10px; padding: 0 7px; font-size: 12px; line-height: 18px; }
.chatbtn.has { animation: chatpulse 2s ease-in-out 3; }
@keyframes chatpulse { 50% { transform: scale(1.06); } }
.chatlist, .chatwin { background: var(--panel, #13243a); border: 1px solid var(--line, #24405f); border-radius: 12px 12px 0 0; box-shadow: 0 8px 28px rgba(0,0,0,.45);
  display: flex; flex-direction: column; overflow: hidden; }
.chatlist { width: 290px; height: min(460px, 70vh); border-radius: 12px; }
.chatwin { width: 300px; height: 420px; }
.chatwin.min { height: auto; }
.chathead { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: var(--panel-2, #1a2f4a); cursor: pointer; font-size: 14px; }
.chathead b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatdock .x { background: none; border: 0; color: var(--mute); cursor: pointer; font-size: 13px; padding: 2px 6px; border-radius: 4px; }
.chatdock .x:hover { background: rgba(255,255,255,.08); color: inherit; }
.chatdock .x.tiny { font-size: 10px; padding: 0 3px; margin-left: 4px; }
.chatsearch { margin: 8px; width: calc(100% - 16px); }
.chatscroll { overflow: auto; flex: 1; padding-bottom: 6px; }
.chatsec { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); padding: 8px 12px 4px; }
.chatrow { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; color: inherit; text-align: left; padding: 7px 12px; cursor: pointer; }
.chatrow:hover { background: rgba(255,255,255,.05); }
.chatrow .nm { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chatrow .nm b { font-weight: 500; font-size: 14px; }
.chatrow .nm small { color: var(--mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatrow.unread .nm b { font-weight: 700; }
.chatrow.unread .nm small { color: inherit; }
.chatdock .dot { width: 9px; height: 9px; border-radius: 50%; background: #6b7a8c; flex: none; }
.chatdock .dot.on { background: var(--up, #2fbf71); box-shadow: 0 0 0 2px rgba(47,191,113,.25); }
.chatdock .dot.grp { width: 18px; height: 18px; border-radius: 5px; background: var(--panel-2, #1a2f4a); color: var(--mute); font-size: 12px; display: grid; place-items: center; }
.chatdock .cnt { font-style: normal; background: var(--accent, #4c8dff); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; line-height: 18px; }
.chatmsgs { flex: 1; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.chatday { align-self: center; font-size: 11px; color: var(--mute); padding: 2px 8px; }
.bub { max-width: 82%; align-self: flex-start; background: var(--panel-2, #1a2f4a); border-radius: 10px 10px 10px 2px; padding: 6px 9px; font-size: 13.5px; }
.bub.me { align-self: flex-end; background: rgba(76,141,255,.22); border-radius: 10px 10px 2px 10px; }
.bub.del .tx { font-style: italic; color: var(--mute); }
.bub .who { font-size: 11px; color: var(--accent, #4c8dff); font-weight: 600; margin-bottom: 2px; }
.bub .tx { white-space: pre-wrap; word-break: break-word; }
.bub .meta { font-size: 10.5px; color: var(--mute); text-align: right; margin-top: 2px; }
.bub .meta .seen { color: #5fb4ff; }
.chatin { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line, #24405f); align-items: flex-end; }
.chatin textarea { flex: 1; resize: none; max-height: 90px; min-height: 34px; font-size: 13.5px; }
@media (max-width: 760px) {
  .chatdock { right: 8px; bottom: 58px; }
  .chatwin:not(:last-of-type) { display: none; }
  .chatwin, .chatlist { width: calc(100vw - 24px); max-width: 340px; }
}
@media print { .chatdock { display: none; } }
.autoref { display: inline-flex; align-items: center; gap: 4px; }
.autoref .btn { min-width: 74px; font-variant-numeric: tabular-nums; }
.autoref select.in.small { padding: 3px 4px; font-size: 12px; height: auto; width: auto; }
.autoref .btn.spin { color: var(--accent); }
@media (max-width: 760px) { .autoref select { display: none; } }
.topbar .topsearch { min-width: 120px; text-align: left; opacity: .9; flex: none; }
.topbar .topsearch .kbd { margin-left: 10px; }
.topbar { min-width: 0; }
.topbar > * { flex-shrink: 0; }
.topbar .health, .topbar h1 { flex-shrink: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 1700px) { .topbar .topsearch .kbd { display: none; } }
@media (max-width: 1400px) { .topbar .autoref select { display: none; } }
/* router polling Full / Light */
.pm-explain { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 10px 12px; border: 1px solid var(--line, #333); border-radius: var(--radius-s); }
.pm-explain > div:last-child { grid-column: 1 / -1; }
@media (max-width: 640px) { .pm-explain { grid-template-columns: 1fr; } }
/* traffic analyzer + path changes */
.tf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .tf-grid { grid-template-columns: 1fr; } }
.tf-bar { width: 90px; height: 6px; border-radius: 3px; background: var(--line, #2a3446); overflow: hidden; display: inline-block; vertical-align: middle; }
.tf-bar i { display: block; height: 100%; background: var(--accent); }
.tf-steps { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
tr.sel td { background: rgba(91,156,246,.10); }
/* branch import */
.bi-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line, #333); border-radius: var(--radius-s); }
.bi-pick > div > b { display: block; margin-bottom: 4px; }
.bi-pick label { display: flex; margin: 3px 0; }
@media (max-width: 640px) { .bi-pick { grid-template-columns: 1fr; } }
/* asset register */
.as-tiles { display: grid; grid-template-columns: repeat(9, minmax(90px, 1fr)); gap: 8px; margin-bottom: 12px; }
.as-tile { text-align: left; padding: 10px 12px; border: 1px solid var(--line, #333); border-radius: var(--radius-s); background: var(--panel, transparent); color: inherit; cursor: pointer; }
.as-tile b { display: block; font-size: 22px; }
.as-tile span { font-size: 12px; color: var(--mute); }
.as-tile.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.as-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tbl.kv td { padding: 4px 8px; }
@media (max-width: 1100px) { .as-tiles { grid-template-columns: repeat(3, 1fr); } }
/* work queue */
.wq-group { border: 1px solid var(--line, #333); border-radius: var(--radius-s); margin-bottom: 10px; overflow: hidden; }
.wq-head { padding: 8px 12px; background: var(--panel2, rgba(127,127,127,.08)); }
.wq-task { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-top: 1px solid var(--line, #333); flex-wrap: wrap; }
.wq-task.late { box-shadow: inset 3px 0 0 var(--bad, #e5484d); }
.wq-ic { font-size: 18px; width: 24px; text-align: center; }
.wq-bar { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: rgba(127,127,127,.25); overflow: hidden; vertical-align: middle; }
.wq-bar i { display: block; height: 100%; background: var(--good, #30a46c); }
.wq-pre { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--line, #444); border-radius: var(--radius-s); }
.wq-pre ul { margin: 4px 0 8px 18px; padding: 0; }
@media (max-width: 640px) { .wq-task .row-gap { width: 100%; justify-content: flex-end; } }
.wq-need { border-color: var(--bad, #e5484d) !important; }
.wq-link { border-top: 1px solid var(--line, #333); padding-top: 10px; margin-top: 10px; }
.wq-late td:first-child { box-shadow: inset 3px 0 0 var(--bad, #e5484d); }
.wq-admin { border: 1px solid var(--line, #333); border-radius: var(--radius-s); padding: 10px 12px; margin-bottom: 12px; }
.as-tile .wq-bar { display: block; }
/* ticket: next step */
.nextstep { border: 1px solid var(--line, #333); border-left: 4px solid var(--warn, #f5a524); border-radius: var(--radius-s); padding: 10px 14px; margin: 10px 0; background: var(--panel, transparent); }
.nextstep.ns-bad { border-left-color: var(--bad, #e5484d); }
.nextstep.ns-good { border-left-color: var(--good, #30a46c); }
.ns-path { display: flex; gap: 6px; list-style: none; margin: 0 0 8px; padding: 0; flex-wrap: wrap; }
.ns-path li { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mute, #8b95a7); padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line, #333); }
.ns-path li span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(127,127,127,.2); font-size: 11px; }
.ns-path li.done { color: var(--good, #30a46c); } .ns-path li.done span { background: var(--good, #30a46c); color: #fff; }
.ns-path li.now { color: inherit; border-color: currentColor; font-weight: 600; }
.ns-main { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.ns-k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute, #8b95a7); }
.ns-t { font-size: 17px; }
.pconn { border: 1px solid var(--line, #333); border-radius: var(--radius-s); padding: 10px 12px; margin-bottom: 10px; }
.pconn-g { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pconn-g > div { display: flex; flex-direction: column; min-width: 0; }
.pconn-g span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute, #8b95a7); }
.pconn-g b { font-size: 15px; overflow-wrap: anywhere; }
.pconn-g em { font-style: normal; font-size: 12px; color: var(--mute, #8b95a7); overflow-wrap: anywhere; }
@media (max-width: 900px) { .pconn-g { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* device page: meters + interface table */
.meter { height: 5px; border-radius: 3px; background: rgba(127,127,127,.22); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--up); border-radius: 3px; transition: width .4s; }
.meter.m-warn i { background: var(--degraded); } .meter.m-bad i { background: var(--down); }
.iftbl td, .iftbl th { white-space: nowrap; } .iftbl tr.sel td { background: rgba(91,164,255,.08); }

/* ================= appearance: accent colours, compact size, light theme ================= */
:root[data-accent="green"] { --accent: #2fbf8c; } :root[data-accent="purple"] { --accent: #9a7bff; }
:root[data-accent="orange"] { --accent: #f08a3c; } :root[data-accent="teal"] { --accent: #22b8c8; } :root[data-accent="red"] { --accent: #e5484d; }
.appear { display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px; align-items: center; }
.appear-boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--bg) inset; }
@media (max-width: 640px) { .appear { grid-template-columns: 1fr; } .appear-boxes { grid-template-columns: 1fr; } }

:root[data-density="compact"] body { font-size: 13.5px; }
:root[data-density="compact"] .tbl td, :root[data-density="compact"] .tbl th { padding-top: 4px; padding-bottom: 4px; }
:root[data-density="compact"] .panel > header { padding-top: 8px; padding-bottom: 8px; }
:root[data-density="compact"] .figure .v, :root[data-density="compact"] .tile .tv { font-size: 22px; }
:root[data-density="compact"] .ov2 { gap: 12px; }

:root[data-theme="light"] {
  --bg: #f4f6f9; --panel: #ffffff; --panel-2: #eef2f7; --line: #dde3ea; --ink: #1b2533; --mute: #5f6c7b; --faint: #8b97a6;
  --up: #1f9d6e; --degraded: #c98a12; --down: #d63b42; --unknown: #8693a2; --accent-ink: #ffffff;
  --glow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
  color-scheme: light;
}
:root[data-theme="light"][data-accent="blue"], :root[data-theme="light"]:not([data-accent]) { --accent: #2f6fd6; }
:root[data-theme="light"][data-accent="green"] { --accent: #16875d; } :root[data-theme="light"][data-accent="purple"] { --accent: #6d4fd8; }
:root[data-theme="light"][data-accent="orange"] { --accent: #c4621b; } :root[data-theme="light"][data-accent="teal"] { --accent: #0f8a99; }
:root[data-theme="light"][data-accent="red"] { --accent: #c9343b; }
:root[data-theme="light"] .panel, :root[data-theme="light"] .tile { background: var(--panel); }
:root[data-theme="light"] .hero { background: radial-gradient(1200px 260px at 0% 0%, rgba(47,111,214,.07), transparent 60%), var(--panel); }
:root[data-theme="light"] .seg button.on { background: color-mix(in srgb, var(--accent) 16%, #fff); color: var(--ink); }
:root[data-theme="light"] a.tile:hover, :root[data-theme="light"] .kbcard:hover { border-color: color-mix(in srgb, var(--accent) 45%, #fff); }
:root[data-theme="light"] .brief li.click:hover span { color: var(--ink); }
:root[data-theme="light"] .brief-skel i { background: linear-gradient(90deg, var(--panel-2), #e3e8ef, var(--panel-2)); background-size: 200% 100%; }
:root[data-theme="light"] .ntopo .tnode.sel > rect { fill: color-mix(in srgb, var(--accent) 14%, #fff); }
:root[data-theme="light"] .qf-more td { background: rgba(16,24,40,.02); }
:root[data-theme="light"] .chatdock .x:hover, :root[data-theme="light"] .chatrow:hover { background: rgba(16,24,40,.05); }
:root[data-theme="light"] .chatlist, :root[data-theme="light"] .chatwin { box-shadow: 0 8px 28px rgba(16,24,40,.18); }
:root[data-theme="light"] .map { background: #e9eef4; }
:root[data-theme="light"] .map .pin { border-color: #ffffff; }
:root[data-theme="light"] .iftbl tr.sel td { background: color-mix(in srgb, var(--accent) 8%, #fff); }
:root[data-theme="light"] .banner { color: var(--ink); }
:root[data-theme="light"] .rail { background: var(--panel); }
:root[data-theme="light"] .rail a.on, :root[data-theme="light"] .rail a:hover { background: color-mix(in srgb, var(--accent) 10%, #fff); }
:root[data-theme="light"] .mobilebar { background: rgba(255,255,255,.97); }
/* map page filters */
.mapbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.maplegend { position: absolute; left: 12px; top: 12px; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: 6px 10px; font-size: 12.5px; display: grid; gap: 2px; z-index: 3; }
.maplegend div { display: flex; align-items: center; gap: 6px; } .maplegend b { margin-left: auto; padding-left: 12px; }
.maplegend i { width: 9px; height: 9px; border-radius: 50%; background: var(--s); }
.maplegend i.s-up { --s: var(--up); } .maplegend i.s-degraded { --s: var(--degraded); } .maplegend i.s-down { --s: var(--down); } .maplegend i.s-unknown { --s: var(--unknown); }
.map .pin.odd { outline: 2px dashed var(--degraded); outline-offset: 2px; }
.linkbtn { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 0 0 4px; }

/* branches: one line = branch + router + links (inventory.jsx) · duplicate merge (branchmerge.jsx) */
.fchips { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 12px 8px; align-items: center; }
.fchip { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 2px 11px; font-size: 13px; cursor: pointer; }
.fchip b { margin-left: 3px; }
.fchip:disabled { opacity: .45; cursor: default; }
.fchip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.fchip.hot:not(.on) { border-color: var(--degraded); color: var(--degraded); background: rgba(240, 179, 65, .1); }
.btn.ghost { background: transparent; border-color: transparent; padding: 0 6px; }
.btn .badge { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 6px; font-size: 11px; margin-left: 4px; }
.btn.warnb .badge { background: var(--degraded); }
.lk { white-space: nowrap; } .lk small { color: var(--mute); }
.ldot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--unknown); vertical-align: 1px; }
.ldot.up { background: var(--up); } .ldot.down { background: var(--down); } .ldot.degraded { background: var(--degraded); }
tr.expand-row > td { background: var(--panel-2); padding: 10px 12px 12px 40px; }
.bparts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.bpart { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; background: var(--panel); }
.bpart h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--mute); display: flex; justify-content: space-between; align-items: center; letter-spacing: .3px; }
.bpart .kv { display: grid; grid-template-columns: 96px 1fr; row-gap: 2px; font-size: 13px; }
.bpart .kv > span:nth-child(odd) { color: var(--mute); }
.tabs.inline { border-bottom: 0; }
.mcard { margin: 12px; border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.mhd { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel-2); }
.mhd b { font-size: 15px; } .mhd .sp, .dups .sp { flex: 1; }
.mgrid { display: grid; }
.mgrid > * { padding: 7px 14px; border-top: 1px solid var(--line); }
.mgrid .lab { color: var(--mute); }
.mgrid .colh { font-weight: 600; background: var(--panel-2); border-top: 0; }
.mgrid .pick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mgrid label.pick.on { color: var(--ink); } .mgrid label.pick:not(.on) { color: var(--mute); }
.lpairs { padding: 10px 14px; border-top: 1px solid var(--line); }
.lpair { margin-top: 8px; }
.mft { display: flex; gap: 10px; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--panel-2); }
.lk { display: inline-block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.ell { display: inline-block; max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }

/* AI Network Analyst (ai.jsx) */
.panel.ai { display: flex; flex-direction: column; min-height: calc(100vh - 170px); }
.ai-body { flex: 1; padding: 8px 16px; overflow: auto; }
.ai-start { max-width: 760px; margin: 18px auto; text-align: center; }
.ai-logo { font-size: 30px; width: 56px; height: 56px; line-height: 56px; margin: 0 auto 6px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.ai-start h3 { margin: 4px 0; font-size: 20px; }
.ai-start p { margin: 4px auto 18px; max-width: 560px; }
.ai-group { text-align: left; margin: 12px auto; max-width: 600px; }
.ai-gl { font-size: 11.5px; font-weight: 700; letter-spacing: .6px; color: var(--mute); margin-bottom: 6px; }
.ai-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-chip { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 500; }
.ai-chip:hover:not(:disabled) { border-color: var(--accent); }
.ai-chip:disabled { opacity: .5; cursor: default; }
.ai-chat { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.ai-msg.user { align-self: flex-end; max-width: 75%; }
.ai-q { background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 14px 14px 2px 14px; white-space: pre-wrap; }
.ai-msg.ai { background: var(--panel-2); border: 1px solid var(--line); border-radius: 2px 14px 14px 14px; padding: 10px 16px; }
.ai-msg.err { border-color: var(--down); }
.ai-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 4px; }
.md h3, .md h4, .md h5, .md h6 { margin: 10px 0 4px; font-size: 15px; }
.md p { margin: 6px 0; line-height: 1.5; } .md ul, .md ol { margin: 4px 0 6px 20px; padding: 0; } .md li { margin: 2px 0; line-height: 1.45; }
.md code { background: var(--panel); padding: 0 4px; border-radius: 3px; font-size: 12.5px; }
.ai-tbl { margin: 6px 0; font-size: 13px; }
.ai-input { border-top: 1px solid var(--line); padding: 10px 16px; display: flex; flex-direction: column; gap: 6px; }
.ai-depth { display: flex; align-items: center; gap: 4px; }
.ai-depth button { border: 1px solid var(--line); background: transparent; color: var(--mute); padding: 3px 12px; cursor: pointer; border-radius: var(--radius-s); }
.ai-depth button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ai-depth .small { margin-left: 8px; }
.ai-set { margin: 12px 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--panel-2); }
.ai-set-grid { display: grid; grid-template-columns: 200px 1fr; gap: 8px 12px; align-items: center; margin: 10px 0; max-width: 820px; }

/* My day + step timers (myday.jsx) */
.clock { font-family: var(--font-dense); font-size: 13px; white-space: nowrap; font-weight: 600; }
.clock.small { font-size: 12px; }
.clock.bad { color: var(--down); } .clock.warn { color: var(--degraded); } .clock.good { color: var(--up); }
.clock.strong { background: rgba(242, 84, 91, .14); border-radius: 4px; padding: 0 5px; }
.md-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 12px 16px 16px; }
.md-tile { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 14px; background: var(--panel-2); display: flex; flex-direction: column; }
.md-tile b { font-size: 26px; line-height: 1.1; } .md-tile span { color: var(--mute); font-size: 13px; }
.md-tile.bad b { color: var(--down); } .md-tile.warn b { color: var(--degraded); } .md-tile.good b { color: var(--up); }
.md-list { display: flex; flex-direction: column; }
.md-item { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.md-item:hover { background: var(--panel-2); }
.md-item.late { border-left: 3px solid var(--down); }
.md-n { font-weight: 600; font-size: 15px; margin: 2px 0; }
.md-r { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.wf-grid { display: grid; grid-template-columns: 240px 100px; gap: 6px 12px; align-items: center; }
.wf-causes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.wf-causes > div { display: flex; flex-direction: column; gap: 2px; }
.close-check { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; background: var(--panel-2); display: flex; flex-direction: column; gap: 3px; }
.bb-fill { border: 1px dashed var(--accent); border-radius: var(--radius-s); padding: 8px 10px; background: var(--panel-2); }
.bb-hits { display: flex; flex-direction: column; max-height: 220px; overflow: auto; margin-top: 4px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.bb-hit { text-align: left; background: var(--panel); border: 0; border-bottom: 1px solid var(--line); color: var(--ink); padding: 6px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.bb-hit:hover { background: var(--panel-2); }

/* ================= sign-in page (step 93) ================= */
.logo2 { flex: none; display: grid; place-items: center; background: linear-gradient(135deg, #22c39a 0%, #3b8cff 60%, #6a5cff 100%);
  box-shadow: 0 6px 18px rgba(59,140,255,.30), inset 0 1px 0 rgba(255,255,255,.25); }
.login2 { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr); background: var(--bg); }
.lart { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 20% 10%, #16345a 0%, #0b1726 60%, #08111d 100%);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; padding: 36px 44px; color: #e3ecf5; }
.netart { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.netart .ne { stroke: #3b6fa8; stroke-opacity: .35; stroke-width: 1.2; }
.netart .nn { fill: #5ba4ff; opacity: .55; animation: nnpulse 3s ease-in-out infinite; }
.netart .nn.core { fill: #2fbf8c; opacity: .9; }
.netart .ring { fill: none; stroke: #2fbf8c; stroke-opacity: .5; animation: nnring 2.6s ease-out infinite; transform-origin: 240px 180px; }
.netart .np { fill: #9fd0ff; filter: drop-shadow(0 0 4px #5ba4ff); }
@keyframes nnpulse { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
@keyframes nnring { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .netart .nn, .netart .ring { animation: none; } .netart .np { display: none; } }
.lbrand, .ltag, .lfoot { position: relative; z-index: 1; }
.lbrand { display: flex; gap: 12px; align-items: center; }
.lbrand b { display: block; font-size: 19px; letter-spacing: .05em; }
.lbrand span { font-size: 12.5px; color: #9fb4cc; }
.ltag h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.01em; }
.ltag p { color: #a9bdd3; max-width: 460px; margin: 0 0 16px; line-height: 1.5; }
.lchips { display: flex; flex-wrap: wrap; gap: 8px; }
.lchips span { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(159,208,255,.25); background: rgba(13,30,50,.55); color: #cfe2f7; }
.lfoot { font-size: 12px; color: #7f95ad; }
.lcard { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px 20px; gap: 18px; }
.lcard form { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 30px 28px; width: min(400px, 100%);
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.28); }
.lcard h1 { margin: 0; font-size: 24px; }
.lcard p { margin: 2px 0 0; color: var(--mute); font-size: 13.5px; }
.lcard label { display: flex; flex-direction: column; gap: 5px; color: var(--mute); font-size: 13px; }
.lcard .in { padding: 10px 12px; font-size: 15px; }
.lcard .err { color: var(--down); font-size: 13.5px; background: rgba(229,72,77,.08); border: 1px solid rgba(229,72,77,.35); border-radius: 8px; padding: 8px 10px; }
.lhead { display: flex; gap: 14px; align-items: center; margin-bottom: 4px; }
.pwbox { position: relative; display: block; }
.pwbox .in { width: 100%; padding-right: 42px; box-sizing: border-box; }
.pweye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 16px; padding: 4px 6px; opacity: .75; }
.pweye:hover { opacity: 1; }
.capswarn { font-size: 12.5px; color: var(--degraded); margin-top: -6px; }
.lgo { justify-content: center; padding: 11px 12px; font-size: 15px; gap: 8px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lhelp { font-size: 12px; color: var(--mute); line-height: 1.55; border-top: 1px solid var(--line); padding-top: 12px; }
.lstat { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 12px; color: var(--mute); }
.lstat .ldot { display: inline-block; margin-right: 4px; vertical-align: middle; }
.lmobile { display: none; align-items: center; gap: 10px; font-size: 18px; letter-spacing: .04em; }
.lcard .otp { font-size: 22px; letter-spacing: .35em; text-align: center; font-family: var(--mono, monospace); }
@media (max-width: 900px) {
  .login2 { grid-template-columns: 1fr; }
  .lart { display: none; }
  .lmobile { display: flex; }
  .lcard { justify-content: flex-start; padding-top: 48px; background: radial-gradient(100% 50% at 50% 0%, rgba(59,140,255,.12), transparent); }
}
/* sign-in, minimal (step 93b): only the sign-in over a quiet network picture — no information before sign-in */
.login3 { position: relative; min-height: 100vh; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 30% 20%, #16345a 0%, #0b1726 60%, #08111d 100%); }
.login3 .netart { opacity: .55; }
.login3 .lcard { position: relative; z-index: 1; padding: 24px 16px; }
.login3 .lcard form { background: rgba(19,36,58,.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lbrand2 { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 4px; }
.lbrand2 b { font-size: 22px; letter-spacing: .06em; color: #e3ecf5; }
.login3 .lhead h1 { font-size: 20px; }
:root[data-theme="light"] .login3 .lcard form { background: rgba(255,255,255,.92); }
.login3 .netart .core, .login3 .netart .ring { display: none; }
/* company logo (step 93c) */
.logo3 { flex: none; display: block; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.25); object-fit: contain; }
.logofull { background: #fff; border-radius: 14px; padding: 14px 22px; box-shadow: 0 10px 30px rgba(0,0,0,.30); line-height: 0; margin-bottom: 4px; }
/* sign-in: logo and form in ONE card (step 93e) */
.lbox { width: min(400px, 100%); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 22px 60px rgba(0,0,0,.40); }
.lbox-top { background: #fff; display: grid; place-items: center; padding: 22px 26px 18px; border-bottom: 3px solid #d71f28; }
.lbox-top img { width: 100%; max-width: 280px; display: block; }
.login3 .lbox form { border: 0; border-radius: 0; box-shadow: none; width: 100%; box-sizing: border-box; background: rgba(19,36,58,.96); }
/* sign-in heading as the brand's front door (step 93f) */
.lkick { display: inline-block; font-size: 10.5px; letter-spacing: .18em; font-weight: 700; color: #ff5a62; margin-bottom: 6px; }
.login3 .lhead h1 { font-size: 24px; letter-spacing: -.01em; }
.login3 .lgo { background: linear-gradient(180deg, #4f97ff, #2f6fd6); border-color: #2f6fd6; color: #fff; font-weight: 600; letter-spacing: .02em; }
.login3 .lgo:disabled { opacity: .55; }
.lcopy { font-size: 11.5px; color: rgba(200,215,232,.55); letter-spacing: .03em; text-align: center; }
/* menu v3: work-based groups, a line on each page, live counts */
.ghead { text-transform: none; letter-spacing: .01em; font: 600 13px/1.2 var(--font); color: var(--mute); padding: 9px 10px 5px; border-radius: 7px; text-align: left; }
.ghead:hover { color: var(--ink); background: var(--panel-2); }
.ghead .gi { display: grid; place-items: center; width: 20px; flex: none; color: var(--faint); }
.ghead.open .gi, .ghead.cur .gi { color: var(--accent); }
.ghead.open { color: var(--ink); }
.ghead .gl { display: flex; flex-direction: column; min-width: 0; }
.ghead .gl em { font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.gcount { font-style: normal; margin-left: auto; font: 600 11.5px/17px var(--font-dense, var(--font)); min-width: 19px; text-align: center; padding: 0 6px; border-radius: 9px; background: var(--degraded); color: #241a00; }
.gcount.bad { background: var(--down); color: #fff; }
.gcount + .gchev { margin-left: 4px; }
.navgroup.open { padding-bottom: 4px; }
.navgroup.open > a { margin-left: 4px; }
.rail.compact .navgroup.open > a { margin-left: 0; }
.nsub { margin: 8px 10px 3px 38px; font: 600 10.5px/1 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.navtip { position: fixed; z-index: 60; max-width: 260px; pointer-events: none; display: flex; flex-direction: column; gap: 3px;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; box-shadow: 0 8px 24px rgba(0,0,0,.28); font-size: 13px; animation: navtip .12s ease-out; }
.navtip b { font-size: 13.5px; }
.navtip span { color: var(--mute); line-height: 1.35; }
.navtip .nt-b { align-self: flex-start; margin-top: 3px; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 8px; }
.navtip .nt-b.c-bad { background: var(--down); color: #fff; }
.navtip .nt-b.c-warn { background: var(--degraded); color: #241a00; }
.navtip .nt-b.c-info { background: var(--accent); color: var(--accent-ink); }
.navtip .nt-b.c-mute { background: var(--panel-2); color: var(--mute); }
@keyframes navtip { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .navtip, .nsub { display: none; } .navgroup.open > a { margin-left: 0; } }
/* team chat v2: ticket chats, war rooms, @calls, tasks */
.chatwin.warwin { width: 340px; height: 470px; border-color: rgba(229,72,77,.55); }
.chatwin.warwin > .chathead { background: linear-gradient(90deg, rgba(229,72,77,.28), var(--panel-2, #1a2f4a)); }
.chatdock .dot.grp.war { background: var(--down, #e5484d); animation: warblink 1.4s ease-in-out infinite; }
@keyframes warblink { 50% { opacity: .45; } }
.chatsec.war { color: var(--down, #e5484d); font-weight: 700; }
.chatbtn.war { background: var(--down, #e5484d); }
.chatbtn i.at { background: #f5a524; color: #241a00; margin-left: 2px; }
.chatdock .cnt.at { background: #f5a524; color: #241a00; margin-right: 3px; }
.warbar { padding: 7px 10px; font-size: 12.5px; border-bottom: 1px solid var(--line, #24405f); background: rgba(229,72,77,.08); }
.warbar.done { background: rgba(47,191,113,.08); }
.warbar .wl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.warbar .wn { color: var(--down, #e5484d); font-size: 15px; }
.warbar .wl .x.tiny { margin-left: auto; font-size: 11.5px; border: 1px solid var(--line, #24405f); padding: 1px 7px; }
.warbar .wl .x.tiny + .x.tiny { margin-left: 4px; }
.warbar .wd { max-height: 110px; overflow: auto; margin-top: 5px; display: grid; gap: 2px; }
.warbar .wp { margin-top: 3px; font-size: 11.5px; }
.ttbar { padding: 5px 10px; font-size: 11.5px; border-bottom: 1px solid var(--line, #24405f); }
.sysmsg { align-self: center; max-width: 94%; text-align: center; font-size: 12.5px; color: var(--mute); background: rgba(255,255,255,.04);
  border: 1px dashed var(--line, #24405f); border-radius: 8px; padding: 5px 9px; white-space: pre-wrap; word-break: break-word; }
.sysmsg span { display: block; font-size: 10.5px; opacity: .8; margin-top: 2px; }
.bub .ment { color: var(--accent, #4c8dff); font-weight: 600; }
.bub .ment.me, .sysmsg .ment.me { background: rgba(245,165,36,.25); color: inherit; border-radius: 4px; padding: 0 2px; }
.bub.callme { box-shadow: inset 3px 0 0 #f5a524; }
.bub .tx a { color: var(--accent, #4c8dff); }
.bub .meta .x.tiny { opacity: 0; transition: opacity .1s; }
.bub:hover .meta .x.tiny { opacity: 1; }
.chatin { position: relative; }
.atlist { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 2px); background: var(--panel, #13243a); border: 1px solid var(--line, #24405f);
  border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.3); display: flex; flex-direction: column; overflow: hidden; z-index: 2; }
.atlist button { background: none; border: 0; color: inherit; text-align: left; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.atlist button.on, .atlist button:hover { background: rgba(76,141,255,.18); }
.taskbox { border-top: 1px solid var(--line, #24405f); padding: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; background: var(--panel-2, #1a2f4a); }
.taskbox .row-gap { justify-content: flex-end; }
@media (hover: none) { .bub .meta .x.tiny { opacity: 1; } }
/* sign-in v4 (step 96): left = brand network, right = white sign-in, red button */
.login4 { position: relative; min-height: 100vh; display: grid; grid-template-columns: 57% 43%; background: #fff; overflow: hidden; }
.login4 .lside { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 700px at 30% 35%, #123a7a 0%, #0b2250 45%, #071433 100%); }
.netmap { position: absolute; inset: 0; width: 100%; height: 100%; }
.netmap .nl { fill: none; stroke: #3e64a8; stroke-width: 1; opacity: .35; }
.netmap .nl.hub { stroke: #5b8fe8; stroke-width: 1.6; opacity: .55; }
.netmap .nflow { fill: none; stroke: #9cc3ff; stroke-width: 2; stroke-dasharray: 4 36; opacity: .9; animation: nmdash 2s linear infinite; }
.netmap .nflow.red { stroke: #ff4b55; }
.netmap .nhub { fill: #ff3b45; stroke: #fff; stroke-width: 2; }
.netmap .ndot { fill: #cfe0ff; animation: nmpulse 3s ease-in-out infinite; }
.netmap .npk { fill: #fff; } .netmap .npk.red { fill: #ff6b72; }
@keyframes nmdash { to { stroke-dashoffset: -40; } }
@keyframes nmpulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .netmap .nflow, .netmap .ndot { animation: none; } .netmap .npk { display: none; } }
.lhero { position: absolute; left: 8%; top: 11%; max-width: 64%; }
.lhero .lhk { white-space: nowrap; font: 700 13px/1 var(--font); letter-spacing: .3em; color: #ff4b55; }
.lhero h2 { font: 800 clamp(34px, 3.6vw, 56px)/1.04 var(--font); margin: 14px 0; color: #fff; letter-spacing: -.005em; }
.lhero h2 span { color: #ff3b45; }
.lhero p { color: #b9c8e6; font-size: 18px; line-height: 1.45; max-width: 440px; margin: 0; }
.lstats { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.lstats div { border-left: 2px solid #ff3b45; padding-left: 12px; }
.lstats b { display: block; font-size: 24px; } .lstats span { font-size: 13px; color: #9fb2d8; }
.lfeat { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 48px 16% 32px 4%;
  background: linear-gradient(transparent, rgba(4,12,32,.85) 38%); }
.lfeat div { text-align: center; font-size: 15.5px; line-height: 1.3; border-right: 1px solid rgba(255,255,255,.18); }
.lfeat div:last-child { border: 0; }
.lfeat svg { width: 36px; height: 36px; display: block; margin: 0 auto 10px; }
.lcurve { position: absolute; top: 0; bottom: 0; left: calc(57% - 150px); width: 230px; height: 100%; pointer-events: none; z-index: 2; }
.login4 .lmain { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 64px 64px;
  background: radial-gradient(600px 380px at 100% 0%, rgba(232,34,44,.06), transparent 70%), radial-gradient(700px 420px at 100% 100%, rgba(15,31,92,.06), transparent 70%), #fff;
  --ink: #1c2740; --mute: #5b6b85; --faint: #8a98b0; --line: #d5ddea; --panel: #fff; --panel-2: #f3f6fb; --bg: #fff; --accent: #1a3a8f; --accent-ink: #fff; color: var(--ink); }
.lform { width: min(460px, 100%); }
.lform .llogo { display: block; width: min(320px, 80%); margin: 0 auto 30px; mix-blend-mode: multiply; }
.lform form { display: flex; flex-direction: column; gap: 14px; width: 100% !important; }
.lhead4 { margin-bottom: 6px; }
.lkick4 { display: inline-flex; align-items: center; gap: 10px; font: 700 12px/1 var(--font); letter-spacing: .22em; color: #e8222c; }
.lkick4 i { width: 26px; height: 2px; background: #e8222c; display: inline-block; border-radius: 2px; }
.lhead4 h1 { margin: 12px 0 0; font: 800 clamp(30px, 2.6vw, 40px)/1.1 var(--font); color: #0f1f5c; letter-spacing: -.01em; }
.lhead4 h1 span { color: #e8222c; }
.lhead4 p { margin: 8px 0 0; color: #5b6b85; font-size: 17px; }
.ldash { display: flex; gap: 5px; margin-top: 16px; } .ldash i { height: 3px; width: 18px; background: #0f1f5c; border-radius: 2px; }
.ldash i:nth-child(2) { width: 30px; background: #e8222c; } .ldash i:nth-child(3) { background: #c3cde0; }
.lform label { display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 600; color: #33415c; }
.ibox { position: relative; display: block; }
.ibox > .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #3a4763; pointer-events: none; transition: color .15s; }
.lform .in { width: 100%; box-sizing: border-box; height: 54px; border-radius: 10px; border: 1.5px solid #d5ddea; background: #fff; color: #1c2740;
  font-size: 16px; padding: 0 16px; font-weight: 500; transition: border-color .15s, box-shadow .15s; }
.ibox .in { padding-left: 48px; }
.ibox.pwbox .in { padding-right: 50px; }
.lform .in::placeholder { color: #9aa6ba; font-weight: 400; }
.lform .in:focus { outline: none; border-color: #e8222c; box-shadow: 0 0 0 4px rgba(232,34,44,.10); }
.ibox:focus-within > .ico { color: #e8222c; }
.lform .pweye { right: 8px; color: #4b5873; opacity: 1; display: grid; place-items: center; padding: 6px; border-radius: 8px; }
.lform .pweye:hover { background: #f1f4f9; }
.lform .otp { height: 60px; font-size: 26px; letter-spacing: .35em; text-align: center; font-family: var(--mono, monospace); }
.lform .err { color: #c4161f; font-size: 14px; background: #fdecee; border: 1px solid #f5c2c6; border-radius: 9px; padding: 10px 12px; }
.lform .capswarn { color: #a66a00; margin-top: -4px; font-size: 13px; }
.login4 .lgo { height: 56px; margin-top: 4px; border: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(90deg, #ec2a34, #d4141e); color: #fff; font: 600 18px var(--font); letter-spacing: .02em;
  box-shadow: 0 10px 24px rgba(220,20,30,.26); transition: transform .1s, box-shadow .15s, filter .15s; cursor: pointer; }
.login4 .lgo:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 12px 28px rgba(220,20,30,.34); }
.login4 .lgo:active:not(:disabled) { transform: translateY(1px); }
.login4 .lgo:disabled { opacity: .6; cursor: default; box-shadow: none; }
.login4 .lgo:focus-visible { outline: 3px solid rgba(232,34,44,.35); outline-offset: 2px; }
.lhelp4 { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 12px 14px; border-radius: 10px; background: #f3f6fb; border: 1px solid #e3e9f3; color: #4b5873; font-size: 14.5px; }
.lhelp4 .ico { color: #1a3a8f; flex: none; }
.ltrust { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: #7a879e; }
.ltrust span { display: inline-flex; align-items: center; gap: 6px; }
.ltrust b { width: 6px; height: 6px; border-radius: 50%; background: #2fbf71; display: inline-block; }
.login4 .lform a { color: #1a3a8f; }
.login4 .lform .mute { color: #5b6b85; }
.login4 .chk { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.login4 .lstat.warn { margin-top: 14px; font-size: 13px; color: #a66a00; text-align: center; }
.login4 .lcopy { position: absolute; bottom: 20px; left: 64px; right: 24px; color: #8a98b0; font-size: 12.5px; }
@media (max-width: 1100px) { .lhero { max-width: 78%; } .lfeat { padding-right: 18%; } .lfeat div { font-size: 13.5px; } }
@media (max-width: 900px) {
  .login4 { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login4 .lside { height: 170px; }
  .lhero { top: 26px; left: 22px; max-width: 90%; } .lhero h2 { font-size: 30px; margin: 8px 0 0; } .lhero p, .lstats, .lfeat { display: none; }
  .lcurve { display: none; }
  .login4 .lside::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #e8222c; }
  .login4 .lmain { justify-content: flex-start; padding: 26px 20px 70px; }
  .lform .llogo { width: 230px; margin-bottom: 20px; }
  .login4 .lcopy { left: 16px; right: 16px; text-align: center; }
}
/* wallboard v2 (step 97): popups, feed, ticket state, TV mode */
.wb { min-height: 100vh; padding: 18px 22px; box-sizing: border-box; background: var(--bg, #0b1520); }
.wb-top { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; flex-wrap: wrap; }
.wb-unlock { margin-bottom: 12px; padding: 10px 14px; border-radius: 10px; background: rgba(240,179,65,.15); border: 1px solid var(--degraded); color: var(--degraded); font-weight: 600; cursor: pointer; text-align: center; }
.wb-war { display: block; margin-bottom: 12px; padding: 12px 16px; border-radius: 10px; background: var(--down); color: #fff; font-size: 19px; font-weight: 700; text-decoration: none; animation: wbblink 1.6s ease-in-out infinite; }
@keyframes wbblink { 50% { filter: brightness(1.25); } }
.wb-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.wb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.wb-tile { position: relative; text-decoration: none; color: inherit; border-radius: 12px; padding: 14px 16px; border: 2px solid var(--down, #e5484d); background: rgba(229,72,77,.14); }
.wb-tile.warn { border-color: var(--degraded, #f0b341); background: rgba(240,179,65,.10); }
.wb-tile:hover { text-decoration: none; filter: brightness(1.1); }
.wb-tile.fresh { animation: wbfresh 1.2s ease-in-out infinite; }
@keyframes wbfresh { 50% { box-shadow: 0 0 0 4px rgba(229,72,77,.55), 0 0 30px rgba(229,72,77,.45); } }
.wb-new { position: absolute; top: -10px; left: 14px; background: var(--down); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .12em; padding: 1px 8px; border-radius: 6px; }
.wb-nobody { margin-top: 10px; padding: 6px 10px; border-radius: 7px; background: var(--down); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .02em; animation: wbblink 1.6s ease-in-out infinite; }
.wb-tile.nobody { border-width: 3px; }
.wb-tt { margin-top: 8px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.wb-step { color: var(--accent); font-weight: 600; }
.wb-tt2 { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.wb-feed { position: sticky; top: 12px; max-height: calc(100vh - 110px); overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.wb-fh { position: sticky; top: 0; background: var(--panel); padding: 10px 12px; font-weight: 700; font-size: 16px; border-bottom: 1px solid var(--line); z-index: 1; }
.wb-fh .mute { font-weight: 400; font-size: 12.5px; margin-left: 6px; }
.wb-fi { display: grid; grid-template-columns: 44px 22px 1fr; gap: 6px; padding: 7px 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; font-size: 13.5px; line-height: 1.35; }
.wb-fi:hover { background: var(--panel-2); text-decoration: none; }
.wb-fi .t { color: var(--mute); font-variant-numeric: tabular-nums; }
.wb-fi .x em { color: var(--mute); font-style: normal; }
.wb-fi .x { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wb-fi.recent { background: rgba(91,164,255,.08); }
.wb-fi.k-down.recent { background: rgba(229,72,77,.14); } .wb-fi.k-up.recent { background: rgba(47,191,140,.12); }
.wb-fi.k-down .x { color: #ff9aa0; font-weight: 600; } .wb-fi.k-up .x { color: #7fe0b8; }
.wb-pops { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 10px; width: min(760px, 92vw); }
.wb-pop { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 14px; color: #fff; background: #c4232b; box-shadow: 0 18px 50px rgba(0,0,0,.5); cursor: pointer; animation: wbpop .35s ease-out; }
.wb-pop.k-up { background: #17865f; } .wb-pop.k-escalated { background: #a86b00; } .wb-pop.k-war { background: #8e0f16; }
.wb-pop .i { font-size: 34px; } .wb-pop b { display: block; font-size: 14px; letter-spacing: .14em; opacity: .9; } .wb-pop div span { font-size: 22px; font-weight: 700; }
.wb-pop div { flex: 1; min-width: 0; } .wb-pop .t { font-size: 15px; opacity: .85; }
@keyframes wbpop { from { opacity: 0; transform: translateY(-14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 1200px) { .wb-body { grid-template-columns: 1fr; } .wb-feed { position: static; max-height: 320px; } }
@media (prefers-reduced-motion: reduce) { .wb-tile.fresh, .wb-nobody, .wb-war { animation: none; } }
/* static IP line history (step 98) */
.lh-tot { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 8px; }
.lh-on { color: var(--up); } .lh-off { color: var(--down); } .lh-rd { color: var(--mute); }
.lh-bar { position: relative; height: 22px; border-radius: 6px; background: var(--panel-2); overflow: hidden; border: 1px solid var(--line); }
.lh-bar i { position: absolute; top: 0; bottom: 0; }
.lh-bar i.lh-on { background: var(--up); } .lh-bar i.lh-off { background: var(--down); } .lh-bar i.lh-rd { background: repeating-linear-gradient(45deg, #5d6b7c, #5d6b7c 4px, #46515f 4px, #46515f 8px); }
.lh-ax { display: flex; justify-content: space-between; margin: 3px 0 8px; }
