/* PulseRADIUS look: "pulse" identity, Poppins + JetBrains Mono, tree-style sidebar.
   Themes (Settings Ã¢â€ â€™ Themes) set the tokens below through [data-theme]. The "noc-*" themes are
   dark control-room themes: network topology background, glass panels, HUD corners, glow. */
:root {
  --bg: #f3f6f6; --panel: #ffffff; --panel-solid: #ffffff; --text: #14211f; --muted: #5d6f6c; --line: #dde6e4;
  --brand: #0d9488; --brand-2: #f97362; --brand-ink: #ffffff; --ok: #0f7a55; --ok-bg: #ddf4ea; --warn: #9a5b00; --warn-bg: #fdf0d5;
  --bad: #c23b3b; --bad-bg: #fbe4e4; --chip: #edf2f1; --shadow: 0 1px 2px rgba(10,40,36,.05), 0 2px 8px rgba(10,40,36,.05);
  --side-bg: #0c2326; --side-bg2: #08181a; --side-ink: #c9dcd9; --side-muted: #7f9a96; --side-hover: rgba(255,255,255,.06); --side-acc: #2dd4bf;
  --grid: rgba(13,148,136,.06); --link: rgba(13,148,136,.16); --node: rgba(13,148,136,.32); --glow: rgba(13,148,136,.28); --hud: transparent; --bg-fx: .7;
  --top-h: 58px; --radius: 14px; --fs: 1;
  /* Custom-colour hooks (Settings > Themes > Customise). They follow the theme unless overridden. */
  --tab-bg: var(--chip); --tab-ink: var(--text); --tab-on: var(--brand); --tab-on-ink: #ffffff; --top-bg: var(--panel-solid); --btn-bg: var(--brand); --btn-ink: var(--brand-ink);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
[data-theme="indigo"] { --brand: #5b5bd6; --brand-2: #f59e0b; --side-bg: #17163a; --side-bg2: #100f2a; --side-ink: #d4d3f2; --side-muted: #8b89b8; --side-acc: #a5a4ff; --grid: rgba(91,91,214,.06); --link: rgba(91,91,214,.16); --node: rgba(91,91,214,.32); --glow: rgba(91,91,214,.3); }
[data-theme="sunset"] { --brand: #e0533d; --brand-2: #0ea5a4; --side-bg: #2a1614; --side-bg2: #1d0f0d; --side-ink: #ecd6d1; --side-muted: #a88a84; --side-acc: #ffa48f; --grid: rgba(224,83,61,.05); --link: rgba(224,83,61,.15); --node: rgba(224,83,61,.3); --glow: rgba(224,83,61,.3); }
[data-theme="forest"] { --brand: #2f855a; --brand-2: #d69e2e; --side-bg: #13261b; --side-bg2: #0c1a12; --side-ink: #d0e3d6; --side-muted: #86a08f; --side-acc: #8ee0a8; --grid: rgba(47,133,90,.06); --link: rgba(47,133,90,.16); --node: rgba(47,133,90,.32); --glow: rgba(47,133,90,.3); }
[data-theme="slate"] { --brand: #2563eb; --brand-2: #ec4899; --side-bg: #ffffff; --side-bg2: #f3f5f8; --side-ink: #334155; --side-muted: #7b8798; --side-hover: rgba(15,23,42,.05); --side-acc: #2563eb; --grid: rgba(37,99,235,.05); --link: rgba(37,99,235,.14); --node: rgba(37,99,235,.28); --glow: rgba(37,99,235,.28); }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1413; --panel: #121d1c; --panel-solid: #121d1c; --text: #e4efed; --muted: #8ea5a1; --line: #22312f;
    --ok: #4cc597; --ok-bg: #11342a; --warn: #f0b54a; --warn-bg: #3a2c10; --bad: #ff8178; --bad-bg: #3d1c1a; --chip: #1b2827; --shadow: none;
  }
  [data-theme="slate"] { --side-bg: #121a26; --side-bg2: #0d131c; --side-ink: #cbd5e1; --side-hover: rgba(255,255,255,.06); }
}
/* NOC control-room themes: always dark, whatever the device setting. */
[data-theme^="noc"] {
  color-scheme: dark;
  --bg: #050b14; --panel: rgba(11,22,37,.82); --panel-solid: #0b1625; --text: #e2ebf6; --muted: #8296b0; --line: rgba(110,160,220,.15);
  --brand: #22d3ee; --brand-2: #ff7a59; --brand-ink: #03131a;
  --ok: #34e0a1; --ok-bg: rgba(52,224,161,.13); --warn: #ffbf47; --warn-bg: rgba(255,191,71,.13); --bad: #ff6b6b; --bad-bg: rgba(255,107,107,.14);
  --chip: rgba(120,170,230,.09); --shadow: 0 10px 30px -12px rgba(0,0,0,.6);
  --side-bg: #07111f; --side-bg2: #030810; --side-ink: #cfdcec; --side-muted: #6f86a3; --side-hover: rgba(120,180,255,.07); --side-acc: #22d3ee;
  --grid: rgba(34,211,238,.045); --link: rgba(34,211,238,.18); --node: rgba(34,211,238,.55); --glow: rgba(34,211,238,.35); --hud: rgba(34,211,238,.75); --bg-fx: 1;
  --radius: 8px; --tab-on-ink: var(--brand-ink);
}
[data-theme="noc-fiber"] { --bg: #08061a; --panel: rgba(20,14,42,.82); --panel-solid: #140e2a; --line: rgba(170,140,255,.16); --chip: rgba(170,140,255,.1);
  --brand: #c084fc; --brand-2: #22d3ee; --brand-ink: #160828; --side-bg: #0e0a22; --side-bg2: #060412; --side-acc: #d8b4fe; --side-hover: rgba(190,160,255,.08);
  --grid: rgba(192,132,252,.05); --link: rgba(192,132,252,.2); --node: rgba(232,121,249,.6); --glow: rgba(192,132,252,.38); --hud: rgba(216,180,254,.75); }
[data-theme="noc-amber"] { --bg: #0b0904; --panel: rgba(26,21,10,.84); --panel-solid: #1a150a; --text: #f3eadb; --muted: #a8977a; --line: rgba(245,165,36,.16); --chip: rgba(245,165,36,.09);
  --brand: #f5a524; --brand-2: #38bdf8; --brand-ink: #1a1002; --side-bg: #120e05; --side-bg2: #070502; --side-ink: #eadfca; --side-muted: #8f7e60; --side-acc: #fbbf24; --side-hover: rgba(245,165,36,.08);
  --grid: rgba(245,165,36,.045); --link: rgba(245,165,36,.18); --node: rgba(251,191,36,.6); --glow: rgba(245,165,36,.35); --hud: rgba(251,191,36,.75); }
[data-theme="noc-green"] { --bg: #030d09; --panel: rgba(8,26,19,.84); --panel-solid: #081a13; --text: #e0f2ea; --muted: #7fa594; --line: rgba(52,211,153,.15); --chip: rgba(52,211,153,.08);
  --brand: #34d399; --brand-2: #fbbf24; --brand-ink: #02140c; --side-bg: #05140e; --side-bg2: #020906; --side-ink: #cfe8dc; --side-muted: #6c9483; --side-acc: #6ee7b7; --side-hover: rgba(52,211,153,.08);
  --grid: rgba(52,211,153,.045); --link: rgba(52,211,153,.18); --node: rgba(110,231,183,.6); --glow: rgba(52,211,153,.35); --hud: rgba(110,231,183,.75); }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: calc(14px * var(--fs))/1.5 var(--font); }
a { color: var(--brand); }
h1 { font-size: calc(21px * var(--fs)); margin: 0 0 16px; font-weight: 800; letter-spacing: -.2px; }
h2 { font-size: calc(15px * var(--fs)); margin: 0 0 12px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: calc(12px * var(--fs)); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: calc(12.5px * var(--fs)); }
.right { text-align: right; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- layout: sidebar with tree-line submenus ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.app.collapsed { grid-template-columns: 0 1fr; }
.app.collapsed .side { display: none; }
.side { background: linear-gradient(180deg, var(--side-bg), var(--side-bg2)); color: var(--side-ink); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 0 10px 24px; scrollbar-width: thin; scrollbar-color: rgba(127,127,127,.3) transparent; }
.side .logo { height: var(--top-h); display: flex; align-items: center; gap: 9px; padding: 0 8px; font-weight: 800; font-size: calc(18px * var(--fs)); letter-spacing: -.3px; color: var(--side-ink); }
.side .logo .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; color: #fff; }
.side .logo .mark svg { width: 20px; height: 20px; }
.side .logo span { color: var(--side-acc); }
.side .who { margin: 6px 0 12px; padding: 10px; border-radius: 12px; border: 1px solid var(--side-hover); background: var(--side-hover); display: flex; gap: 10px; align-items: center; }
.side .who .av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-2); color: #fff; display: grid; place-items: center; font-weight: 800; }
.side .who b { color: var(--side-ink); display: block; font-size: calc(13px * var(--fs)); }
.side .who small { color: var(--side-muted); text-transform: capitalize; }
.side .search { margin: 0 0 8px; }
.side .search input { background: var(--side-hover); border-color: transparent; color: var(--side-ink); border-radius: 10px; }
.side .search input::placeholder { color: var(--side-muted); }
.side .sec { font-size: calc(10.5px * var(--fs)); font-weight: 700; letter-spacing: 1.2px; color: var(--side-muted); padding: 12px 10px 4px; text-transform: uppercase; }
.side .grp > button, .side a.top { display: flex; width: 100%; align-items: center; gap: 11px; padding: 8px 10px; margin: 1px 0; color: var(--side-ink); background: none; border: 0; border-radius: 10px; text-decoration: none; font-size: calc(13.5px * var(--fs)); font-weight: 600; text-align: left; cursor: pointer; }
.side .grp > button:hover, .side a.top:hover { background: var(--side-hover); }
.side .grp > button .chev { margin-left: auto; transition: transform .15s; opacity: .5; width: 14px; height: 14px; }
.side .grp.open > button { color: var(--side-acc); }
.side .grp.open > button .chev { transform: rotate(90deg); }
.side .grp .sub { display: none; margin: 2px 0 6px 19px; border-left: 1.5px solid var(--side-hover); }
.side .grp.open .sub { display: block; }
.side .sub a { display: block; padding: 5px 10px 5px 16px; color: var(--side-muted); text-decoration: none; font-size: calc(13px * var(--fs)); position: relative; border-radius: 0 8px 8px 0; }
.side .sub a::before { content: ''; position: absolute; left: -1.5px; top: 50%; width: 9px; height: 1.5px; background: var(--side-hover); }
.side .sub a:hover { color: var(--side-ink); }
.side a.top.on { background: var(--brand); color: #fff; }
.side .sub a.on { color: var(--side-acc); font-weight: 700; }
.side .sub a.on::before { background: var(--side-acc); width: 11px; }
.side svg { width: 19px; height: 19px; flex: none; }
/* colourful duotone menu icons: each menu has its own colour (--ic) on a tinted tile */
.side svg.duo { width: 28px; height: 28px; padding: 5px; border-radius: 8px; color: var(--ic); background: color-mix(in srgb, var(--ic) 17%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ic) 22%, transparent); stroke-width: 2.1; }
.side a.top.on svg.duo { color: #fff; background: color-mix(in srgb, var(--ic) 85%, #000); box-shadow: 0 4px 12px -4px var(--ic); }
.side .grp.open > button svg.duo { background: color-mix(in srgb, var(--ic) 28%, transparent); }
.side .soon { font-size: calc(10px * var(--fs)); margin-left: auto; color: var(--side-muted); border: 1px dashed var(--side-muted); border-radius: 6px; padding: 0 5px; }
.topbar { height: var(--top-h); background: var(--top-bg); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 18px; position: sticky; top: 0; z-index: 5; }
.topbar .burger { border: 0; background: none; font-size: calc(20px * var(--fs)); padding: 4px 8px; }
.topbar .title { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar button { white-space: nowrap; flex: none; }
.topbar input { min-width: 0; }
.topbar input { max-width: 280px; border-radius: 99px; padding-left: 14px; }
.content { min-width: 0; }
main { padding: 20px; min-width: 0; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 15; width: 264px; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; }
  .app.mobile-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .app.collapsed .side { display: block; }
  .topbar input { display: none; }
  main { padding: 12px; }
}

/* ---------- dashboard: tinted tiles with an icon badge and a progress strip ---------- */
.cards6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1250px) { .cards6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cards6 { grid-template-columns: repeat(2, 1fr); } }
.gcard { --c: var(--brand); position: relative; overflow: hidden; border-radius: var(--radius); padding: 14px; color: var(--text); text-decoration: none; display: grid; grid-template-columns: 42px 1fr; gap: 4px 12px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); min-height: 84px; }
.gcard::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c); }
.gcard svg { grid-row: span 2; width: 42px; height: 42px; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.gcard .v { font-size: calc(24px * var(--fs)); font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.gcard .l { font-size: calc(12px * var(--fs)); font-weight: 600; color: var(--muted); }
.gcard:hover { border-color: var(--c); }
.g-blue { --c: #0d9488; } .g-sky { --c: #0284c7; } .g-green { --c: #16a34a; } .g-amber { --c: #d97706; } .g-orange { --c: #9333ea; } .g-red { --c: #e11d48; }
.panels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1300px) { .panels { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .panels { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.panel h3 { margin: 0; padding: 12px 14px 6px; font-size: calc(13.5px * var(--fs)); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel h3 .dotc { width: 10px; height: 10px; border-radius: 3px; }
.panel .body { padding: 4px 14px 12px; }
.srow { display: flex; justify-content: space-between; padding: 5px 8px; margin: 0 -8px; border-radius: 8px; font-size: calc(13px * var(--fs)); text-decoration: none; color: var(--muted); }
.srow:hover { background: var(--chip); color: var(--text); }
.srow b { color: var(--text); font-weight: 700; }
.charts5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1300px) { .charts5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .charts5 { grid-template-columns: 1fr; } }
.charts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
@media (max-width: 900px) { .charts2 { grid-template-columns: 1fr; } }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 18px 2px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.chart .bar { width: 64%; max-width: 30px; border-radius: 6px 6px 2px 2px; min-height: 3px; }
.chart .val { font-size: calc(11px * var(--fs)); color: var(--muted); margin-bottom: 3px; white-space: nowrap; }
.chart-x { display: flex; gap: 6px; padding: 4px 2px 0; }
.chart-x span { flex: 1; text-align: center; font-size: calc(11px * var(--fs)); color: var(--muted); }
.filterbar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filterbar select, .filterbar input { width: auto; min-width: 180px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { padding: 6px 12px; border-radius: 10px; text-decoration: none; color: var(--tab-ink); background: var(--tab-bg); font-size: calc(13px * var(--fs)); font-weight: 600; }
.tabs a.on { background: var(--tab-on); color: var(--tab-on-ink); }
.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 14px; }
.timeline .it { margin-bottom: 12px; }
.timeline .it .muted { font-size: calc(12px * var(--fs)); }
.pipeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); border-top: 3px solid var(--brand); }
.stat .v { font-size: calc(22px * var(--fs)); font-weight: 800; margin-top: 2px; }
.stat .l { color: var(--muted); font-size: calc(12px * var(--fs)); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.meter { height: 8px; border-radius: 99px; background: var(--chip); overflow: hidden; margin-top: 6px; }
.meter > div { height: 100%; background: var(--brand); border-radius: 99px; }
.meter.hot > div { background: var(--bad); }
pre.out { background: #0b1514; color: #c7f0e8; padding: 12px; border-radius: 10px; overflow: auto; max-height: 60vh; font-size: calc(12.5px * var(--fs)); margin: 0; white-space: pre-wrap; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 130px; border: 2px solid var(--line); border-radius: 12px; padding: 8px; cursor: pointer; background: var(--panel); text-align: center; font-weight: 600; font-size: calc(13px * var(--fs)); }
.swatch.on { border-color: var(--brand); }
.swatch i { display: flex; height: 38px; border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
.swatch i b { flex: 1; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
th { font-size: calc(11.5px * var(--fs)); color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--chip); }

/* ---------- controls ---------- */
button, .btn { font: inherit; font-weight: 650; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel-solid) 88%, var(--brand) 4%); color: var(--text); border-radius: 9px; padding: 7px 14px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; line-height: 1.35; letter-spacing: .1px;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease, transform .12s ease; -webkit-tap-highlight-color: transparent; }
button svg, .btn svg { width: 16px; height: 16px; flex: none; }
@media (hover: hover) {
  button:hover, .btn:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); background: color-mix(in srgb, var(--panel-solid) 80%, var(--brand) 10%); }
  button.primary:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 60%, transparent), 0 6px 22px -6px var(--glow); filter: brightness(1.07); }
  button.danger:hover { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
}
button:active:not(:disabled), .btn:active { transform: scale(.97); }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
button.primary { background: linear-gradient(135deg, var(--btn-bg), color-mix(in srgb, var(--btn-bg) 72%, var(--brand-2))); border-color: transparent; color: var(--btn-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 4px 14px -6px var(--glow); }
button.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
button.ghost { background: transparent; border-color: transparent; }
button.sm, .btn.sm { padding: 4px 10px; font-size: calc(12px * var(--fs)); border-radius: 7px; gap: 5px; }
button.sm svg, .btn.sm svg { width: 14px; height: 14px; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; color: var(--text); background: color-mix(in srgb, var(--panel-solid) 92%, var(--bg)); border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; width: 100%; transition: border-color .15s ease, box-shadow .15s ease; }
@media (hover: hover) { input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); } }
textarea { min-height: 70px; font-family: ui-monospace, Consolas, monospace; font-size: calc(12.5px * var(--fs)); }
input[type=checkbox] { width: auto; accent-color: var(--brand); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent), 0 0 18px -6px var(--glow); border-color: var(--brand); }
label.f { display: block; margin-bottom: 10px; }
label.f > span { display: block; font-size: calc(12px * var(--fs)); font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.toolbar input, .toolbar select { width: auto; min-width: 160px; }

.chip { display: inline-block; padding: 1px 9px; border-radius: 6px; font-size: calc(12px * var(--fs)); font-weight: 600; background: var(--chip); color: var(--muted); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5,20,18,.5); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto; z-index: 20; }
.modal { background: var(--panel-solid); box-shadow: 0 30px 80px -20px rgba(0,0,0,.6), 0 0 0 1px var(--line); border-radius: calc(var(--radius) + 4px); width: 100%; max-width: 620px; padding: 22px; border: 1px solid var(--line); }
.modal h2 { font-size: calc(17px * var(--fs)); }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.err { color: var(--bad); background: var(--bad-bg); padding: 8px 10px; border-radius: 10px; margin-bottom: 10px; }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; z-index: 30; display: none; max-width: calc(100% - 32px); font-weight: 600; }

/* ---------- login ---------- */
.login { max-width: 380px; margin: 10vh auto; padding: 0 16px; }
.login .card { padding: 26px; border-top: 4px solid var(--brand); }
.bar { height: 120px; display: flex; align-items: flex-end; gap: 3px; }
.bar div { flex: 1; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; }
.kv div:nth-child(odd) { color: var(--muted); }

/* ---------- OSS / BSS modules ---------- */
.lchart { width: 100%; height: 160px; display: block; }
.lchart .grid { stroke: var(--line); stroke-width: 1; }
.lchart text { fill: var(--muted); font-size: calc(10px * var(--fs)); }
.state { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: calc(12.5px * var(--fs)); }
.state i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.state.up i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.state.down i { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); animation: pr-blink 1.2s infinite; }
.state.down { color: var(--bad); }
@keyframes pr-blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .state.down i { animation: none; } }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.thumbs a, .thumbs div.t { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--chip); text-decoration: none; color: var(--muted); font-size: calc(12px * var(--fs)); }
.thumbs img { width: 100%; height: 110px; object-fit: cover; display: block; }
.thumbs span { display: block; padding: 4px 8px; }
.inbox { display: grid; grid-template-columns: 320px 1fr; gap: 12px; height: calc(100vh - 140px); min-height: 420px; }
@media (max-width: 860px) { .inbox { grid-template-columns: 1fr; height: auto; } }
.inbox .list, .inbox .thread { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; min-height: 0; }
.inbox .thread { display: flex; flex-direction: column; }
.inbox .chat { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.inbox .chat.on, .inbox .chat:hover { background: var(--chip); }
.inbox .chat small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox .msgs { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 72%; padding: 8px 11px; border-radius: 14px; background: var(--chip); white-space: pre-wrap; word-break: break-word; }
.bubble.out { align-self: flex-end; background: color-mix(in srgb, var(--brand) 16%, var(--panel)); }
.bubble .t { font-size: calc(11px * var(--fs)); color: var(--muted); margin-top: 3px; }
.inbox .reply { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.inbox .reply textarea { min-height: 42px; font-family: inherit; font-size: calc(14px * var(--fs)); }
.reg td, .reg th { padding: 4px 3px; text-align: center; font-size: calc(11.5px * var(--fs)); }
.reg td:first-child, .reg th:first-child { text-align: left; padding-left: 8px; }
.att-present { color: var(--ok); font-weight: 700; } .att-absent { color: var(--bad); font-weight: 700; } .att-half, .att-leave, .att-unpaid_leave { color: var(--warn); font-weight: 700; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg label { padding: 4px 9px; font-size: calc(12px * var(--fs)); cursor: pointer; border-right: 1px solid var(--line); }
.seg label:last-child { border-right: 0; }
.seg input { display: none; }
.seg input:checked + span { color: var(--brand); font-weight: 800; }

/* ---------- NOC room layer: topology background, glass, HUD corners ---------- */
body { background:
  radial-gradient(1200px 700px at 85% -10%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 60%),
  radial-gradient(900px 600px at -10% 110%, color-mix(in srgb, var(--brand-2) 6%, transparent), transparent 60%),
  var(--bg); background-attachment: fixed; }
.noc-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; opacity: var(--bg-fx); }
.noc-bg::before { content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 85%); }
.noc-bg::after { content: ''; position: absolute; left: 0; right: 0; height: 30vh; top: -30vh;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--brand) 5%, transparent), transparent); animation: noc-scan 14s linear infinite; }
.noc-bg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.noc-bg .lk { stroke: var(--link); stroke-width: 1.2; fill: none; }
.noc-bg .lk.d { stroke-dasharray: 4 6; }
.noc-bg .nd { fill: var(--bg); stroke: var(--node); stroke-width: 1.5; }
.noc-bg .nd.core { fill: color-mix(in srgb, var(--brand) 25%, var(--bg)); }
.noc-bg .halo { fill: none; stroke: var(--node); opacity: .5; transform-box: fill-box; transform-origin: center; animation: noc-halo 4s ease-out infinite; }
.noc-bg .pk { fill: var(--brand); filter: drop-shadow(0 0 4px var(--brand)); }
.noc-bg .pk.b { fill: var(--brand-2); filter: drop-shadow(0 0 4px var(--brand-2)); }
.noc-bg .lbl { fill: var(--node); font: 600 calc(10px * var(--fs)) var(--mono); letter-spacing: 1px; opacity: .55; }
@keyframes noc-scan { to { transform: translateY(160vh); } }
@keyframes noc-halo { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .noc-bg::after, .noc-bg .halo { animation: none; } .noc-bg .pk { display: none; } }
#root, #toast { position: relative; z-index: 1; }
#toast { position: fixed; }
.app { position: relative; z-index: 1; }

/* sidebar + top bar */
.side { border-right: 1px solid var(--line); }
[data-theme^="noc"] .side { background: linear-gradient(180deg, color-mix(in srgb, var(--side-bg) 94%, transparent), color-mix(in srgb, var(--side-bg2) 97%, transparent)); }
.side .logo .mark, .login .mark { box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 50%, transparent), 0 0 18px -2px var(--glow); }
.side a.top.on { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 85%, transparent), color-mix(in srgb, var(--brand) 55%, transparent)); color: var(--brand-ink); box-shadow: 0 6px 18px -8px var(--glow); }
[data-theme^="noc"] .side a.top.on { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 22%, transparent), transparent); color: var(--side-acc); box-shadow: inset 3px 0 0 var(--brand); }
.side .sub a.on { text-shadow: 0 0 12px var(--glow); }
.topbar { background: color-mix(in srgb, var(--top-bg) 78%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--brand), transparent); opacity: .45; }
.nocbar { display: flex; gap: 8px; align-items: center; }
.npill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--chip);
  font: 600 calc(12px * var(--fs)) var(--mono); color: var(--muted); text-decoration: none; white-space: nowrap; }
.npill b { color: var(--text); font-weight: 700; }
.npill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg), 0 0 10px var(--ok); animation: pr-live 2s ease-in-out infinite; }
.npill.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad); }
.npill.bad i { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg), 0 0 10px var(--bad); animation-duration: .9s; }
@keyframes pr-live { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .npill i { animation: none; } }
@media (max-width: 1100px) { .npill.clock { display: none; } }
@media (max-width: 640px) { .nocbar { display: none; } }

/* panels: glass + HUD corner brackets on the NOC themes */
.card, .panel, .stat, .gcard, .filterbar, .inbox .list, .inbox .thread { position: relative; }
[data-theme^="noc"] :is(.card, .panel, .stat, .filterbar, .inbox .list, .inbox .thread) {
  background-image: linear-gradient(180deg, rgba(255,255,255,.025), transparent 40%); }
[data-theme^="noc"] :is(.card, .panel)::before { content: ''; position: absolute; inset: -1px; pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(var(--hud), var(--hud)) left top / 14px 2px no-repeat, linear-gradient(var(--hud), var(--hud)) left top / 2px 14px no-repeat,
    linear-gradient(var(--hud), var(--hud)) right bottom / 14px 2px no-repeat, linear-gradient(var(--hud), var(--hud)) right bottom / 2px 14px no-repeat; opacity: .55; }
[data-theme^="noc"] .gcard { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 12%, var(--panel-solid)), var(--panel)); }
[data-theme^="noc"] .gcard::after { box-shadow: 0 0 14px var(--c); }
[data-theme^="noc"] .gcard:hover { box-shadow: 0 0 0 1px var(--c), 0 10px 30px -14px var(--c); }
[data-theme^="noc"] .stat { border-top-color: transparent; background-image: linear-gradient(90deg, var(--brand), transparent) ; background-size: 100% 2px; background-repeat: no-repeat; }
.gcard .v, .stat .v, .kpi { font-family: var(--mono); letter-spacing: -.5px; }
[data-theme^="noc"] h1 { letter-spacing: .2px; }
[data-theme^="noc"] th { font-family: var(--mono); font-size: calc(10.5px * var(--fs)); letter-spacing: 1px; }
[data-theme^="noc"] .side .sec { font-family: var(--mono); letter-spacing: 2px; }
[data-theme^="noc"] tbody tr.click:hover { background: color-mix(in srgb, var(--brand) 7%, transparent); }
[data-theme^="noc"] .tabs a.on { box-shadow: 0 4px 14px -6px var(--glow); }
[data-theme^="noc"] .chip.ok, [data-theme^="noc"] .chip.bad, [data-theme^="noc"] .chip.warn { box-shadow: inset 0 0 0 1px currentColor; --tw: 0; }
[data-theme^="noc"] .chip { border-radius: 4px; }
[data-theme^="noc"] .modal-bg { background: rgba(2,6,12,.7); backdrop-filter: blur(3px); }
[data-theme^="noc"] pre.out { background: #02060c; border: 1px solid var(--line); }
.login .card { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* ---------- settings hub & pages ---------- */
.set-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.set-tile { display: grid; grid-template-columns: 44px 1fr; gap: 3px 13px; align-items: start; padding: 15px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel);
  text-decoration: none; color: var(--text); position: relative; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.set-tile .ic { grid-row: span 2; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; color: var(--brand);
  background: color-mix(in srgb, var(--brand) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent); }
.set-tile .ic svg { width: 22px; height: 22px; }
.set-tile b { font-size: calc(14px * var(--fs)); }
.set-tile small { color: var(--muted); font-size: calc(12px * var(--fs)); line-height: 1.45; }
.set-tile .st { position: absolute; top: 12px; right: 12px; }
@media (hover: hover) { .set-tile:hover { border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); box-shadow: 0 12px 30px -16px var(--glow); transform: translateY(-2px); } }
.set-layout { display: grid; grid-template-columns: 230px 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .set-layout { grid-template-columns: 1fr; } .set-nav { display: flex; overflow-x: auto; gap: 4px; position: static !important; } .set-nav a { white-space: nowrap; } }
.set-nav { position: sticky; top: calc(var(--top-h) + 16px); padding: 8px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: calc(13px * var(--fs)); transition: background-color .15s ease, color .15s ease; }
.set-nav a svg { width: 17px; height: 17px; }
@media (hover: hover) { .set-nav a:hover { background: var(--chip); color: var(--text); } }
.set-nav a.on { color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); box-shadow: inset 3px 0 0 var(--brand); }
.set-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.set-head .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: var(--brand-ink); flex: none;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, var(--brand-2))); box-shadow: 0 8px 24px -10px var(--glow); }
.set-head .ic svg { width: 24px; height: 24px; }
.set-head h1 { margin: 0; }
.set-head p { margin: 2px 0 0; color: var(--muted); font-size: calc(13px * var(--fs)); }
.set-sec h2 { display: flex; align-items: center; gap: 9px; font-size: calc(14px * var(--fs)); padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px dashed var(--line); }
.set-sec h2::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.help { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: calc(13px * var(--fs));
  background: color-mix(in srgb, var(--brand) 7%, var(--panel)); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); }
.help > svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 1px; }
.help p { margin: 0 0 6px; } .help p:last-child { margin: 0; }
.savebar { position: sticky; bottom: 12px; z-index: 4; display: flex; gap: 10px; align-items: center; padding: 10px 12px; margin-top: 4px; border-radius: 12px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--panel-solid) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 14px 40px -18px rgba(0,0,0,.5); }
.savebar .dirty { display: none; color: var(--warn); font-size: calc(12.5px * var(--fs)); font-weight: 600; }
.savebar.is-dirty .dirty { display: inline-flex; align-items: center; gap: 6px; }
.savebar.is-dirty .dirty::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
/* toggle switch (checkbox) */
label.tg { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; margin-bottom: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--chip); cursor: pointer; }
label.tg > span { font-weight: 600; font-size: calc(13px * var(--fs)); }
label.tg > span small { display: block; font-weight: 500; color: var(--muted); font-size: calc(12px * var(--fs)); }
label.tg input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 99px; flex: none; margin: 0; padding: 0; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--muted) 30%, transparent); position: relative; cursor: pointer; transition: background-color .18s ease, box-shadow .18s ease; }
label.tg input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .18s cubic-bezier(.3,.7,.4,1); }
label.tg input:checked { background: var(--brand); border-color: transparent; box-shadow: 0 0 14px -2px var(--glow); }
label.tg input:checked::after { transform: translateX(18px); }
/* theme picker */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tcard { border: 2px solid var(--line); border-radius: 14px; padding: 8px; cursor: pointer; background: var(--panel); text-align: left; display: block; width: 100%; color: var(--text); }
.tcard.on { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.tcard .pv { height: 120px; border-radius: 9px; overflow: hidden; display: grid; grid-template-columns: 26% 1fr; background: var(--bg); position: relative; border: 1px solid var(--line); }
.tcard .pv .s { background: linear-gradient(180deg, var(--side-bg), var(--side-bg2)); padding: 8px 6px; display: flex; flex-direction: column; gap: 5px; }
.tcard .pv .s i { height: 5px; border-radius: 3px; background: var(--side-muted); opacity: .5; }
.tcard .pv .s i:first-child { background: var(--brand); opacity: 1; height: 7px; width: 70%; }
.tcard .pv .m { padding: 8px; display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 26px 1fr; gap: 6px;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 12px 12px; }
.tcard .pv .m b { border-radius: 4px; background: var(--panel-solid); border: 1px solid var(--line); border-bottom: 2px solid var(--brand); }
.tcard .pv .m b:nth-child(2) { border-bottom-color: var(--brand-2); }
.tcard .pv .m u { grid-column: span 3; border-radius: 4px; background: var(--panel-solid); border: 1px solid var(--line); position: relative; overflow: hidden; }
.tcard .pv .m u::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: 30%; height: 40%; border-bottom: 2px solid var(--brand); border-radius: 0 0 50% 50% / 0 0 100% 100%; filter: drop-shadow(0 0 4px var(--brand)); }
.tcard .nm { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px 2px; font-weight: 700; font-size: calc(13.5px * var(--fs)); }
.tcard .nm small { font-weight: 600; font-size: calc(11px * var(--fs)); color: var(--muted); font-family: var(--mono); }

/* ---------- dashboard: command deck ---------- */
.deck-head { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.deck-head h1 { margin: 2px 0 0; font-size: calc(24px * var(--fs)); }
.eyebrow { font: 600 calc(11px * var(--fs)) var(--mono); letter-spacing: 2px; color: var(--brand); }
.dsel { width: auto; min-width: 170px; }
/* Dashboard styles (Customise): deck = 3 columns, compact = 2, wall = 4 with big numbers, simple = 1. Card size: w-wide = 2 columns, w-full = whole row. */
.deck { display: grid; grid-template-columns: 1.05fr 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.deck > .w-wide { grid-column: span 2; }
.deck > .w-full { grid-column: 1 / -1; }
.deck.ds-compact { grid-template-columns: 1fr 1fr; gap: 10px; }
.deck.ds-compact .dk { padding: 10px 12px; }
.deck.ds-compact .dk h3 { margin-bottom: 8px; }
.deck.ds-wall { grid-template-columns: repeat(4, 1fr); }
.deck.ds-wall .kp b { font-size: calc(34px * var(--fs)); }
.deck.ds-wall .ops b, .deck.ds-wall .q b { font-size: calc(17px * var(--fs)); white-space: nowrap; }
.deck.ds-simple { grid-template-columns: 1fr; max-width: 900px; }
.deck.ds-simple > .dk { grid-column: auto; }
@media (max-width: 1200px) { .deck, .deck.ds-wall { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .deck, .deck.ds-compact, .deck.ds-wall { grid-template-columns: 1fr; } .deck > .dk { grid-column: auto; } }
/* Key numbers strip */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.deck.ds-wall .kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.kp { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 10px; background: var(--chip); border-left: 3px solid var(--c); color: var(--text); text-decoration: none; min-width: 0; }
.kp span { font-size: calc(11px * var(--fs)); color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.kp b { font: 700 calc(22px * var(--fs)) var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp:hover { background: color-mix(in srgb, var(--c) 14%, var(--chip)); }
/* Customise dialog */
.dstyles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.dstyle { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px; text-align: left; border: 2px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); height: auto; }
.dstyle.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.dstyle small { color: var(--muted); font-size: calc(11px * var(--fs)); line-height: 1.3; }
.dthumb { width: 100%; height: 56px; background: var(--chip); border-radius: 8px; }
.dthumb rect { fill: var(--brand); opacity: .55; }
.dstyle.on .dthumb rect { opacity: .9; }
.dlist { display: flex; flex-direction: column; gap: 4px; max-height: 42vh; overflow: auto; }
.drow { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; }
.drow.off { opacity: .55; }
.drow .dname { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.drow select { width: auto; }
.dadmin { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.dk { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); position: relative; min-width: 0; }
[data-theme^="noc"] .dk { background-image: linear-gradient(180deg, rgba(255,255,255,.025), transparent 40%); }
[data-theme^="noc"] .dk::before { content: ''; position: absolute; inset: -1px; pointer-events: none; border-radius: inherit;
  background: linear-gradient(var(--hud), var(--hud)) left top / 14px 2px no-repeat, linear-gradient(var(--hud), var(--hud)) left top / 2px 14px no-repeat,
    linear-gradient(var(--hud), var(--hud)) right bottom / 14px 2px no-repeat, linear-gradient(var(--hud), var(--hud)) right bottom / 2px 14px no-repeat; opacity: .55; }
.dk h3 { margin: 0 0 12px; font: 700 calc(11px * var(--fs)) var(--mono); letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dk h3 .muted { text-transform: none; letter-spacing: 0; font-family: var(--font); }
.dk h3 .cnt { background: var(--brand); color: var(--brand-ink); border-radius: 99px; padding: 0 8px; letter-spacing: 0; }
.dk h3 .live { color: var(--ok); display: inline-flex; align-items: center; gap: 5px; }
.dk h3 .live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pr-live 2s ease-in-out infinite; }
/* subscriber ring */
.ringwrap { display: flex; gap: 14px; align-items: center; }
.ring { width: 140px; height: 140px; flex: none; }
.ring circle { transition: stroke-dasharray .6s ease; }
.ring-v { font: 800 calc(26px * var(--fs)) var(--mono); fill: var(--text); }
.ring-l { font: 600 calc(8.5px * var(--fs)) var(--mono); letter-spacing: 1.5px; fill: var(--muted); }
.legend { flex: 1; display: grid; gap: 2px; min-width: 0; }
.legend a { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: calc(13px * var(--fs)); }
.legend a i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.legend a b { margin-left: auto; color: var(--text); font-family: var(--mono); }
.legend a.tot { border-top: 1px dashed var(--line); border-radius: 0; margin-top: 3px; padding-top: 6px; font-weight: 700; color: var(--text); }
@media (hover: hover) { .legend a:hover { background: var(--chip); } }
.dk-ring .meter { margin-top: 12px; }
.dk-ring .meter > div { background: linear-gradient(90deg, var(--brand), var(--ok)); }
/* today tiles */
.todays { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.today { display: flex; flex-direction: column; gap: 2px; padding: 11px 12px; border-radius: 10px; text-decoration: none; color: var(--text); border: 1px solid var(--line);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 13%, transparent), transparent 70%); position: relative; overflow: hidden; }
.today::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); box-shadow: 0 0 10px var(--c); }
.today .tl { font-size: calc(12px * var(--fs)); font-weight: 600; color: var(--muted); }
.today .tv { font: 800 calc(21px * var(--fs)) var(--mono); letter-spacing: -.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today .ts { font-size: calc(11px * var(--fs)); }
.up { color: var(--ok); font-weight: 700; } .down { color: var(--bad); font-weight: 700; }
@media (hover: hover) { .today:hover, .ops:hover, .q:hover, .tr:hover, .nasrow:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); } }
/* ops list */
.opslist { display: grid; gap: 6px; }
.ops { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: calc(13px * var(--fs)); background: var(--chip); }
.ops svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.ops b { margin-left: auto; font-family: var(--mono); font-size: calc(12.5px * var(--fs)); }
.ops.ok b { color: var(--ok); } .ops.warn b { color: var(--warn); } .ops.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: var(--bad-bg); }
.ops.bad b, .ops.bad svg { color: var(--bad); }
/* revenue pulse */
.dk-rev .key { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: calc(12px * var(--fs)); }
.dk-rev .key i { width: 10px; height: 3px; border-radius: 2px; }
.dk-rev .key b { color: var(--text); font-family: var(--mono); }
.dk-rev { display: flex; flex-direction: column; }
.area { width: 100%; height: 100%; min-height: 200px; flex: 1; display: block; }
.area .g { stroke: var(--line); stroke-dasharray: 3 5; }
.area text { fill: var(--muted); font: 600 calc(10.5px * var(--fs)) var(--mono); }
/* action queue */
.q { display: grid; grid-template-columns: 1fr auto 16px; gap: 10px; align-items: center; padding: 8px 10px 8px 13px; margin-bottom: 5px; border-radius: 8px; text-decoration: none; color: var(--text);
  font-size: calc(13px * var(--fs)); border: 1px solid var(--line); position: relative; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 10%, transparent), transparent 60%); }
.q::before { content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.q b { font-family: var(--mono); color: var(--c); font-size: calc(14px * var(--fs)); }
.q svg { width: 14px; height: 14px; color: var(--muted); }
.q.zero { opacity: .45; background: none; }
/* trend strips */
.tr { display: grid; grid-template-columns: 120px 1fr 64px 64px; gap: 12px; align-items: center; padding: 7px 10px; border-radius: 8px; border: 1px solid transparent; text-decoration: none; color: var(--text); }
.tr + .tr { border-top-color: var(--line); border-radius: 0; }
.tr .tn { font-weight: 600; font-size: calc(13px * var(--fs)); }
.spark { width: 100%; height: 34px; display: block; }
.tt { text-align: right; line-height: 1.15; } .tt b { font-family: var(--mono); display: block; } .tt small { color: var(--muted); font-size: calc(10.5px * var(--fs)); }
@media (max-width: 560px) { .tr { grid-template-columns: 90px 1fr 52px; } .tr .tt:nth-child(3) { display: none; } }
/* metrics explorer */
.seg-tabs { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 10px; background: var(--chip); margin-bottom: 10px; }
.seg-tabs button { flex: 1 1 auto; border: 0; background: transparent; padding: 5px 7px; font-size: calc(12px * var(--fs)); border-radius: 7px; color: var(--muted); white-space: nowrap; }
.seg-tabs button.on { background: var(--panel-solid); color: var(--brand); box-shadow: 0 1px 4px rgba(0,0,0,.2), inset 0 0 0 1px var(--line); }
.mx { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mx a { display: flex; flex-direction: column; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: calc(12px * var(--fs)); }
.mx a b { color: var(--text); font: 700 calc(16px * var(--fs)) var(--mono); margin-top: 2px; }
@media (hover: hover) { .mx a:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); color: var(--text); } }
/* router load */
.nasrow { display: grid; grid-template-columns: minmax(0, 1fr) 1fr 44px; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; border: 1px solid transparent; text-decoration: none; color: var(--text); font-size: calc(13px * var(--fs)); }
.nasrow small { display: block; color: var(--muted); }
.nasrow .meter { margin: 0; }
.nasrow > b { text-align: right; }

/* ---------- step wizard (Add Customer / Add Partner) ---------- */
.wiz { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .wiz { grid-template-columns: 1fr; } .steps { flex-direction: row !important; overflow-x: auto; position: static !important; } .steps button small { display: none; } }
.steps { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); position: sticky; top: calc(var(--top-h) + 16px); }
.steps button { justify-content: flex-start; text-align: left; gap: 11px; border: 0; background: transparent; padding: 8px 9px; white-space: nowrap; }
.steps button span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.steps button small { color: var(--muted); font-weight: 500; font-size: calc(11.5px * var(--fs)); }
.steps .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 700 calc(12px * var(--fs)) var(--mono); border: 1.5px solid var(--line); color: var(--muted); }
.steps button.on { background: color-mix(in srgb, var(--brand) 12%, transparent); }
.steps button.on .n { border-color: var(--brand); color: var(--brand-ink); background: var(--brand); box-shadow: 0 0 14px -2px var(--glow); }
.steps button.done .n { border-color: var(--ok); color: var(--ok); }
.steps button.done .n::after { content: 'Ã¢Å“â€œ'; position: absolute; }
.steps button.done .n { position: relative; font-size: 0; }
.steps button.done .n::after { font-size: calc(13px * var(--fs)); }
.wstep h2 { font-size: calc(15px * var(--fs)); }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.plancard { flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px; text-align: left; border-radius: 11px; border: 1.5px solid var(--line); }
.plancard .sp { font: 800 calc(20px * var(--fs)) var(--mono); color: var(--brand); }
.plancard .sp small, .plancard .pr small { font: 500 calc(11px * var(--fs)) var(--font); color: var(--muted); }
.plancard .pr { font-weight: 700; }
.plancard.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent), 0 10px 26px -14px var(--glow); background: color-mix(in srgb, var(--brand) 9%, var(--panel-solid)); }
.chkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; max-height: 280px; overflow: auto; padding: 2px; }
label.chk { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: calc(13px * var(--fs)); }
label.chk input { width: auto; margin: 0; accent-color: var(--brand); }
label.chk:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.chrow { display: grid; grid-template-columns: 1.4fr 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 560px) { .chrow { grid-template-columns: 1fr 1fr; } }

/* Theme customiser (Settings > Themes) */
.tc-h { font-size: calc(12px * var(--fs)); text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 18px 0 8px; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.tc-row { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: calc(13px * var(--fs)); font-weight: 600; }
.tc-row.set { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.tc-row > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tc-row small { color: var(--muted); font-weight: 500; font-size: calc(11px * var(--fs)); }
.tc-row input[type=color] { width: 38px; height: 30px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: none; cursor: pointer; flex: none; }
.tc-x { padding: 2px 8px; line-height: 1; }
#tcust .savebar { flex-wrap: wrap; }
#tcust .savebar button { white-space: nowrap; }
.tc-sample { padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg); margin: 10px 0 4px; }
.tc-sample .tabs { margin-bottom: 10px; }
.tc-sample .row { gap: 8px; align-items: center; flex-wrap: wrap; }

/* Analytics */
.an-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.an-top select { width: auto; }
.eyebrow { font-size: calc(11px * var(--fs)); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.an-k { padding: 14px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--c) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); }
.an-k small { display: block; color: var(--muted); font-weight: 600; }
.an-k b { font-size: calc(22px * var(--fs)); color: var(--c); }
.an-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.an-card { min-width: 0; }
.an-card.wide { grid-column: span 2; }
.an-card.full { grid-column: 1 / -1; }
.an-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.an-h h3 { margin: 0; font-size: calc(15px * var(--fs)); }
svg.anc { width: 100%; height: auto; display: block; }
svg.anc .g { stroke: var(--line); stroke-width: 1; }
svg.anc .now { stroke: var(--muted); stroke-dasharray: 4 4; }
svg.anc .ax, svg.gauge .ax { fill: var(--muted); font-size: 11px; }
svg.gauge { width: 100%; max-width: 280px; display: block; margin: 8px auto 0; }
svg.gauge .gv { fill: var(--text); font-size: 20px; font-weight: 700; }
.an-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: calc(12px * var(--fs)); color: var(--muted); margin-top: 4px; }
.an-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.an-meths { display: grid; gap: 6px; }
.an-meth { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--chip); margin-bottom: 6px; }
.center { text-align: center; }
@media (max-width: 1400px) { .an-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .an-card.wide { grid-column: 1 / -1; } }
@media (max-width: 760px) { .an-grid { grid-template-columns: 1fr; } }

/* Fibre map */
.fm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fm-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.fm-tools button.on { background: var(--tab-on); color: var(--tab-on-ink); border-color: transparent; }
.fm-tools button.danger-soft { color: var(--bad); }
.fm-tools button.danger-soft.on { background: var(--bad); color: #fff; }
.fm-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; }
.fm-mapbox { position: relative; }
#fm-map { height: calc(100vh - 210px); min-height: 420px; border-radius: var(--radius); border: 1px solid var(--line); }
.tmap { position: relative; overflow: hidden; background: #e8ecef; cursor: grab; touch-action: none; user-select: none; }
.tmap.dragging { cursor: grabbing; }
.tmap[data-mode="route"], .tmap[data-mode="point"], .tmap[data-mode="fault"], .tmap[data-mode="move"] { cursor: crosshair; }
.tm-pane { position: absolute; inset: 0; }
.tm-tiles img { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; pointer-events: none; }
[data-theme^="noc"] .tm-tiles img, [data-theme="dark"] .tm-tiles img { filter: brightness(.72) contrast(1.1) saturate(.8); }
.tm-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tm-svg .fm-hit { fill: none; stroke: transparent; stroke-width: 16; cursor: pointer; }
.tm-svg .fm-p, .tm-svg .fm-c { cursor: pointer; }
.tm-svg .fm-lbl { font-size: 12px; font-weight: 600; fill: #0f172a; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.tm-svg .fm-pulse { animation: fmPulse 1.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.tm-svg .fm-cutline { animation: fmDash 1s linear infinite; }
@keyframes fmPulse { from { opacity: .7; transform: scale(.8); } to { opacity: 0; transform: scale(1.8); } }
@keyframes fmDash { to { stroke-dashoffset: -14; } }
@media (prefers-reduced-motion: reduce) { .tm-svg .fm-pulse, .tm-svg .fm-cutline { animation: none; } }
.tm-zoom { position: absolute; right: 10px; top: 10px; display: grid; gap: 4px; }
.tm-zoom button { width: 34px; height: 34px; padding: 0; font-size: 18px; background: var(--panel-solid); }
.tm-attr { position: absolute; right: 0; bottom: 0; font-size: 11px; padding: 2px 6px; background: rgba(255,255,255,.8); color: #333; border-top-left-radius: 6px; }
.tm-attr a { color: #1d4ed8; }
.fm-hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); background: var(--panel-solid); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; box-shadow: 0 8px 24px -8px rgba(0,0,0,.4); font-size: calc(13px * var(--fs)); max-width: calc(100% - 100px); z-index: 2; }
.fm-hbtn { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.fm-hbtn button { padding: 4px 10px; }
.fm-side { max-height: calc(100vh - 210px); min-height: 420px; overflow: auto; }
.fm-side h3 { margin: 16px 0 8px; font-size: calc(14px * var(--fs)); display: flex; gap: 8px; align-items: center; }
.fm-side h3:first-child { margin-top: 0; }
.fm-sel { padding: 12px; border-radius: 10px; background: var(--chip); margin-bottom: 4px; }
.fm-sel-h { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.fm-sel-h i { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.fm-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 10px; font-size: calc(13px * var(--fs)); }
.fm-kv dt { color: var(--muted); } .fm-kv dd { margin: 0; overflow-wrap: anywhere; }
.fm-incs { display: grid; gap: 6px; }
.fm-inc { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; padding: 8px 10px; }
.fm-inc small { display: block; color: var(--muted); font-weight: 500; }
.fm-inc .dot { margin-top: 5px; flex: none; background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.fm-inc .dot.device { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.fm-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fm-stats div { padding: 8px 10px; border-radius: 8px; background: var(--chip); }
.fm-stats small { display: block; color: var(--muted); } .fm-stats b { font-size: calc(16px * var(--fs)); }
.fm-layers { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.fm-layers label { display: flex; gap: 6px; align-items: center; } .fm-layers input { width: auto; }
.fm-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: calc(12px * var(--fs)); color: var(--muted); }
.fm-lg { display: flex; align-items: center; gap: 7px; }
.fm-lg i { flex: none; width: 18px; height: 4px; border-radius: 2px; background: var(--c); }
.fm-lg i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 8px); }
.fm-lg i.dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; box-sizing: content-box; }
@media (max-width: 1100px) { .fm-wrap { grid-template-columns: 1fr; } .fm-side { max-height: none; min-height: 0; } #fm-map { height: 65vh; } }

/* Inventory extras */
.inv-cable { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.inv-cable div { padding: 8px 10px; border-radius: 8px; background: var(--chip); }
.inv-cable small { display: block; color: var(--muted); } .inv-cable b { font-size: calc(18px * var(--fs)); }
.inv-bar { height: 8px; border-radius: 4px; background: var(--chip); margin: 10px 0; overflow: hidden; }
.inv-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), var(--warn)); border-radius: 4px; }

/* ---- navigation: favourites, page-family tabs, Ctrl+K palette ---- */
.side .favs { margin: 0 0 6px; padding: 4px 0 6px; border-bottom: 1px solid var(--side-hover); }
.side .favs a.fav { display: block; padding: 5px 10px; color: var(--side-ink); text-decoration: none; font-size: calc(12.5px * var(--fs)); border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .favs a.fav:hover { background: var(--side-hover); }
.side .favs a.fav.on { color: var(--side-acc); font-weight: 700; }
.side .favs-hint { font-size: calc(11px * var(--fs)); color: var(--side-muted); padding: 2px 10px 8px; line-height: 1.4; }
.subnav { margin: 0; padding: 12px 20px 0; align-items: center; }
.subnav .pin { margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; color: var(--muted); font-size: calc(15px * var(--fs)); line-height: 1; cursor: pointer; }
.subnav .pin.on { color: #f59e0b; border-color: #f59e0b; }
.topbar .kbtn { display: inline-flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: 6px 10px; min-width: 200px; cursor: pointer; font: inherit; font-size: calc(13px * var(--fs)); }
.topbar .kbtn kbd { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: calc(10.5px * var(--fs)); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.palette { background: var(--panel-solid); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); width: 100%; max-width: 620px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); overflow: hidden; margin-top: 6vh; }
.palette input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 16px; font-size: calc(16px * var(--fs)); background: transparent; width: 100%; box-sizing: border-box; }
.palette .pl { max-height: 55vh; overflow: auto; padding: 6px; }
.palette .pl a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: var(--text); }
.palette .pl a small { color: var(--muted); white-space: nowrap; }
.palette .pl a.on, .palette .pl a:hover { background: color-mix(in srgb, var(--brand) 16%, transparent); }
@media (max-width: 860px) { .topbar .kbtn { min-width: 0; } .topbar .kbtn kbd { display: none; } .subnav { padding: 8px 12px 0; overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; } .subnav a { white-space: nowrap; } }
/* section bar: underlined, so it never looks like a page's own filter tabs */
.subnav { gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 0; margin-bottom: 4px; }
.subnav a { background: none; border-radius: 0; padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--text); }
.subnav a.on { background: none; color: var(--text); border-bottom-color: var(--brand); }
.subnav .pin { margin-bottom: 6px; }
/* sub-item icons, live counts, dot on a closed group that has counts */
.side .sub a { display: flex; align-items: center; gap: 8px; }
.side .sub a svg { width: 15px; height: 15px; opacity: .7; flex: none; }
.side .sub a.on svg { opacity: 1; }
.side .sub a > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .cnt { margin-left: auto; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: calc(10.5px * var(--fs)); font-weight: 700; line-height: 18px; text-align: center; }
.side .grp.has-cnt:not(.open) > button::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-left: auto; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.side .grp.has-cnt:not(.open) > button .chev { margin-left: 8px; }
.side .grp > button .chev { order: 2; }
