
/* Opticom Manager's own tokens: light, then dark (the computer's choice or the switch) */
:root {
  --primary: #2f66ea; --primary-hover: #2657d1; --primary-soft: rgba(47, 102, 234, .10); --primary-line: rgba(47, 102, 234, .34);
  --bg: #e9edf3; --panel: #ffffff; --panel-muted: #f3f5f9; --panel-elevated: #ffffff;
  --text: #14171d; --text-2: #3c4453; --muted: #5b6373; --muted-2: #7c8496; --line: #d7dde6; --line-strong: #b9c1d1;
  --green: #148a52; --green-bg: rgba(20, 138, 82, .10); --red: #d1332f; --red-bg: rgba(209, 51, 47, .09);
  --amber: #b3690a; --amber-bg: rgba(179, 105, 10, .1); --violet: #6d3fd6; --violet-bg: rgba(109, 63, 214, .1);
  --teal: #0e8a7c; --teal-bg: rgba(14, 138, 124, .1);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 0 rgba(16, 24, 40, .03);
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, .16), 0 4px 12px rgba(16, 24, 40, .08);
  --tile: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #5b8cff; --primary-hover: #4a7cf2; --primary-soft: rgba(91, 140, 255, .16); --primary-line: rgba(91, 140, 255, .38);
    --bg: #12151d; --panel: #1a2032; --panel-muted: #161b29; --panel-elevated: #202739;
    --text: #e3e7f0; --text-2: #b0bacf; --muted: #8791a9; --muted-2: #6c7690; --line: #29314a; --line-strong: #3a4460;
    --green: #34d399; --green-bg: rgba(52, 211, 153, .15); --red: #f87171; --red-bg: rgba(248, 113, 113, .15);
    --amber: #fbbf24; --amber-bg: rgba(251, 191, 36, .15); --violet: #a78bfa; --violet-bg: rgba(167, 139, 250, .16);
    --teal: #2dd4bf; --teal-bg: rgba(45, 212, 191, .15);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55), 0 8px 24px rgba(0, 0, 0, .4);
    --tile: #f4f6fa;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --primary: #5b8cff; --primary-hover: #4a7cf2; --primary-soft: rgba(91, 140, 255, .16); --primary-line: rgba(91, 140, 255, .38);
  --bg: #12151d; --panel: #1a2032; --panel-muted: #161b29; --panel-elevated: #202739;
  --text: #e3e7f0; --text-2: #b0bacf; --muted: #8791a9; --muted-2: #6c7690; --line: #29314a; --line-strong: #3a4460;
  --green: #34d399; --green-bg: rgba(52, 211, 153, .15); --red: #f87171; --red-bg: rgba(248, 113, 113, .15);
  --amber: #fbbf24; --amber-bg: rgba(251, 191, 36, .15); --violet: #a78bfa; --violet-bg: rgba(167, 139, 250, .16);
  --teal: #2dd4bf; --teal-bg: rgba(45, 212, 191, .15);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55), 0 8px 24px rgba(0, 0, 0, .4);
  --tile: #f4f6fa;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* which transmitter a company's antenna looks at: the station, then its transmitters; the one offered */
.nb-tx2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px; }   /* side by side where there is room */
.nb-rec { margin-top: 6px; font-size: 12.5px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nb-rec:empty { display: none; }
/* opened from the network page to add equipment: only its windows (and what they say) over that page */
html.adding, html.adding body { background: transparent !important; }
html.adding body > :not(dialog):not(.toast):not(.menu) { visibility: hidden !important; }
html.adding .maplibregl-ctrl-attrib { visibility: hidden !important; }   /* the map is not shown here, nor what it is made of */
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Noto Sans Georgian", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---- frame ---------------------------------------------------------------------------------- */
.app { position: fixed; inset: 0; display: grid; grid-template-rows: 64px minmax(0, 1fr); }
.top { display: flex; align-items: center; gap: 14px; padding: 0 20px; background: var(--panel); border-bottom: 1px solid var(--line); min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(155deg, #7fabff, #2f66ea 70%); color: #fff; font-weight: 800; font-size: 15px; }
.demo-chip { padding: 2px 9px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-size: 12px; font-weight: 700; }
.tabs { display: inline-flex; padding: 4px; gap: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-muted); margin-left: 8px; }
.tabs button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.tabs button[aria-pressed="true"] { background: var(--panel); color: var(--primary); box-shadow: var(--shadow-sm); }
.tabs .cnt { min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.sp { flex: 1; }
.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--panel); color: var(--text-2); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--primary-line); color: var(--text); }
.btn.primary { border-color: transparent; background: linear-gradient(155deg, #6f9dff, var(--primary) 70%); color: #fff; box-shadow: 0 6px 16px rgba(47, 102, 234, .22); }
.btn.primary:hover { color: #fff; filter: brightness(1.06); }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); background: var(--red-bg); }
/* done: the window's action went through -- green for a moment before it closes */
.btn.done, .btn.done:disabled { border-color: transparent; background: var(--green); color: #fff; opacity: 1; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .45; pointer-events: none; }

.main { display: grid; grid-template-columns: 320px minmax(0, 1fr) 380px; min-height: 0; }
.side, .insp { min-height: 0; overflow: auto; background: var(--panel); }
.side { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.insp { border-left: 1px solid var(--line); }
.stage { position: relative; min-width: 0; min-height: 0; }
#map { position: absolute; inset: 0; background: #dfe5ec; }

/* ---- left: what is on the map --------------------------------------------------------------- */
.side-head { padding: 16px 16px 10px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.search { position: relative; }
.search .ico { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.search input { width: 100%; height: 42px; padding: 0 12px 0 40px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--panel-muted); }
.search input:focus { outline: none; border-color: var(--primary); background: var(--panel); }
.tree { flex: 1; overflow: auto; padding: 8px 10px 20px; }
.grp { margin-top: 12px; }
.grp-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.row { width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid transparent; border-radius: 12px; background: none; text-align: left; }
.row:hover { background: var(--panel-muted); }
.row.on { background: var(--primary-soft); border-color: var(--primary-line); }
.row b { display: block; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .pic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--tile); border: 1px solid var(--line); overflow: hidden; }
.row .pic svg { width: 34px; height: 30px; }
.row .pic.site { background: var(--panel-muted); color: var(--text-2); }
.row .pic.dc { background: linear-gradient(155deg, #6f9dff, #2f66ea 70%); color: #fff; border-color: transparent; }
.row .pic.sub { border-radius: 50%; }
.sub-rows { margin: 2px 0 8px 22px; padding-left: 12px; border-left: 2px solid var(--line); }
.sub-rows .row { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 6px 8px; }
.sub-rows .row .pic { width: 34px; height: 34px; }
.sub-rows .row b { font-size: 13.5px; }
.empty { padding: 18px 14px; color: var(--muted); font-size: 13.5px; }
.side-foot { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }

/* ---- the map's own controls ----------------------------------------------------------------- */
.map-tools { position: absolute; z-index: 500; top: 14px; left: 14px; right: 14px; display: flex; gap: 10px; align-items: flex-start; pointer-events: none; }
.map-tools > * { pointer-events: auto; }
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-lg); }
.seg button { min-height: 34px; padding: 0 13px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); }
.hint-bar { position: absolute; z-index: 6; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-lg); font-size: 14px; max-width: calc(100% - 40px); }
.hint-bar kbd { padding: 1px 7px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; font: 600 12.5px/1.6 inherit; background: var(--panel-muted); }
#map.aiming .maplibregl-canvas, #map.aiming .mkw { cursor: crosshair !important; }
.knob { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 5px solid #ffb020; box-shadow: 0 2px 10px rgba(0, 0, 0, .5); cursor: grab; }
.mk.sub.inbeam { border-color: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .38), 0 4px 14px rgba(0, 0, 0, .35); }
.mk.sub.served { border-color: #ffb020; box-shadow: 0 0 0 4px rgba(255, 176, 32, .4), 0 4px 14px rgba(0, 0, 0, .35); }
.mk.sub.faded { opacity: .4; }
.zoom-mid .sub-mk .mk-label { display: none; }
.zoom-mid .sub-mk.lit .mk-label, .zoom-mid .mkw.on .sub-mk .mk-label { display: block; }
.mk-warn { position: absolute; top: -6px; left: -8px; width: 22px; height: 22px; border-radius: 50%; background: #ef4444; color: #fff; font: 800 13px/22px "Noto Sans Georgian", sans-serif; text-align: center; border: 2px solid #fff; }
details.more { border-top: 1px solid var(--line); padding-top: 10px; }
details.more > summary { cursor: pointer; list-style: none; color: var(--muted); font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
details.more > summary::before { content: "▸"; font-size: 11px; transition: transform .15s; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more[open] > summary { margin-bottom: 10px; }
.beam-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
.beam-row.is-mine { border-color: rgba(255, 176, 32, .55); }
.beam-row small { white-space: normal; }
.cnt.bad { background: var(--red-bg); color: var(--red); }
.freq-card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.fc-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fc-h > div { flex: 1; min-width: 0; }
.fc-h b { font-size: 16px; } .fc-h small { display: block; color: var(--muted); font-size: 12.5px; }
.spec { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-muted); }
.fq-tbl { min-width: 760px; }
.fq-tbl td { vertical-align: middle; }
.fq-in { width: 110px; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); }
.fq-tbl tbody tr { cursor: default; }
.sw { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 2px; border-radius: 3px; vertical-align: -1px; }
/* topology: the network as a diagram -- masts in columns, radio links between their antennas */
.tp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.tp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tp-legend i { width: 22px; height: 0; border-top: 3px solid; border-radius: 2px; }
.tp-legend i.ok { border-color: var(--green); } .tp-legend i.warn { border-color: var(--amber); } .tp-legend i.bad { border-color: var(--red); } .tp-legend i.unk { border-top-style: dashed; border-color: var(--muted-2); }
.tp-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 16px; background-color: var(--panel-muted); background-image: radial-gradient(circle, var(--line) 1px, transparent 1.3px); background-size: 18px 18px; }
.tp-board { position: relative; display: flex; align-items: flex-start; gap: 180px; padding: 22px 28px 28px; width: max-content; min-width: 100%; }
.tp-svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.tp-e { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.tp-e.ok { stroke: var(--green); } .tp-e.warn { stroke: var(--amber); } .tp-e.bad { stroke: var(--red); } .tp-e.unk { stroke: var(--muted-2); stroke-dasharray: 6 5; }
.tp-col { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; width: 310px; }
.tp-col-h { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .03em; }
.tp-site { border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-sm); }
.tp-site.dc { border-color: var(--primary-line); }
.tp-sh, .tp-a { position: relative; width: 100%; display: grid; align-items: center; gap: 10px; border: 0; background: none; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.tp-sh { grid-template-columns: 32px minmax(0, 1fr) auto; padding: 10px 12px; border-radius: 14px 14px 0 0; }
.tp-sh .pic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--panel-muted); color: var(--text-2); }
.tp-site.dc .tp-sh .pic { background: var(--primary-soft); color: var(--primary); }
.tp-sh:hover, .tp-a:hover { background: var(--panel-muted); }
.tp-n { min-width: 0; }
.tp-n b { display: block; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-a .tp-n b { font-size: 13px; font-weight: 600; }
.tp-n small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-n em { font-style: normal; color: var(--red); font-weight: 700; }
.tp-ups { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 12px 8px; }
.tp-ups .chip { min-height: 22px; font-size: 11.5px; padding: 0 8px; }
.tp-ant { border-top: 1px solid var(--line); }
.tp-a { grid-template-columns: 30px minmax(0, 1fr) 86px; padding: 7px 12px; }
.tp-ant:last-child .tp-a { border-radius: 0 0 14px 14px; }
.tp-a .pic { width: 30px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--tile); }
.tp-a .pic svg { width: 28px; height: 22px; }
.tp-dot { position: absolute; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; border: 2px solid var(--panel); }
.tp-dot.in { left: -6.5px; background: #14b8a6; } .tp-dot.out { right: -6.5px; background: #3b82f6; }
.d-relay .tp-dot { background: #a78bfa; }
.tp-chan { display: grid; gap: 3px; justify-items: end; }
.tp-chan b { font-size: 12.5px; font-weight: 700; color: var(--text); } .tp-chan b small { color: var(--muted); font-weight: 600; }
.tp-chan.none { font-size: 11.5px; color: var(--amber); font-weight: 600; text-align: right; }
.tp-bar { position: relative; width: 86px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.tp-bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--primary); }
.tp-chan.bad b { color: var(--red); } .tp-chan.bad .tp-bar i { background: var(--red); }
.tp-chan.mis b { color: var(--amber); } .tp-chan.mis .tp-bar i { background: var(--amber); }
.tp-none { padding: 10px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.tp-cl { margin: 0 12px 8px 52px; font-size: 12px; }
.tp-cl > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; cursor: pointer; color: var(--text-2); font-weight: 600; list-style: none; }
.tp-cl > summary::before { content: "▸"; font-size: 10px; color: var(--muted); transition: transform .15s; }
.tp-cl[open] > summary::before { transform: rotate(90deg); }
.tp-cl .chip { min-height: 20px; font-size: 11px; padding: 0 7px; }
.tp-sub { width: 100%; display: flex; justify-content: space-between; gap: 8px; padding: 4px 6px; border: 0; border-radius: 7px; background: none; color: var(--text-2); font: inherit; text-align: left; cursor: pointer; }
.tp-sub:first-of-type { margin-top: 5px; }
.tp-sub:hover { background: var(--panel-muted); }
.tp-sub span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-sub.weak .num { color: var(--amber); font-weight: 700; }
.tp-lbl { position: absolute; z-index: 2; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1.5px solid var(--muted-2); border-radius: 999px; background: var(--panel); color: var(--text-2); font: 600 11.5px/1.35 inherit; white-space: nowrap; box-shadow: var(--shadow-sm); cursor: pointer; }
.tp-lbl b { color: var(--text); font-weight: 700; }
.tp-lbl.ok { border-color: var(--green); } .tp-lbl.warn { border-color: var(--amber); } .tp-lbl.bad { border-color: var(--red); } .tp-lbl.unk { border-style: dashed; }
.tp-lbl:hover { z-index: 3; border-width: 2px; }
.pl-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pl-head > div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-muted); }
.pl-head > div.wide { grid-column: 1 / -1; }
.pl-head span { display: block; color: var(--muted); font-size: 12px; }
.pl-head b { font-size: 18px; }
.pl-head .wide b { font-size: 13.5px; }
.steps-calc { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13.5px; }
.steps-calc li b { display: block; font-size: 13px; }
.steps-calc code { display: block; margin-top: 2px; padding: 5px 9px; border-radius: 8px; background: var(--panel-muted); font: 600 12.5px ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: normal; overflow-wrap: anywhere; }
.steps-calc small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.fresnel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.fresnel > div { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-muted); }
.fresnel span { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.fresnel b { font-size: 16px; }
.fresnel p { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--text-2); }
.rc-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
.rc-row .pic { background: var(--green-bg); color: var(--green); border: 0; font-size: 15px; }
.rc-row.short .pic { background: var(--panel-muted); color: var(--muted); }
.rc-row.on { border-color: var(--primary); background: var(--primary-soft); }
.rc-row small { white-space: normal; }
@media (max-width: 760px) { .fresnel { grid-template-columns: minmax(0, 1fr); } }
.pl-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.pl-grid .form fieldset { grid-template-columns: 1fr 1fr; }
.pl-out { display: grid; gap: 8px; min-width: 0; }
.pl-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pl-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pl-tbl td small { display: block; color: var(--muted); font-size: 12px; }
.pl-tbl tr.ok td:first-child { color: var(--green); font-weight: 700; }
.pl-tbl tr.here td { background: var(--primary-soft); font-weight: 700; }
@media (max-width: 760px) { .pl-grid { grid-template-columns: minmax(0, 1fr); } }
.relink { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #ff8a00; color: #fff; border: 3px solid #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .55); cursor: grab; }
.relink .ico { width: 18px; height: 18px; stroke-width: 2.4; }
.relink:active { cursor: grabbing; }
.relink.join { background: var(--primary); }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sec-h h3 { margin: 0; }
.rm-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.rm-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; }
.rm-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.rm-opt.danger:has(input:checked) { border-color: var(--red); background: var(--red-bg); }
.rm-opt b { display: block; font-size: 14px; color: var(--text); } .rm-opt small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.rm-opt input { margin-top: 3px; accent-color: var(--primary); }
.role-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
/* an antenna carried by the mouse: to another group (its role changes) or onto a company (the company is tied to it) */
.role-row.can-drag { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.role-grip { padding: 6px 2px; color: var(--muted); font-size: 16px; line-height: 1; cursor: grab; user-select: none; }
.role-row.can-drag:active .role-grip { cursor: grabbing; }
.role-row.dragging { opacity: .45; }
.role-hint { margin: 0 0 10px; }
.ant-dragging [data-role-drop], .ant-dragging .nl-site-subs .li, .ant-dragging [data-roles] details .li { outline: 2px dashed var(--line-strong); outline-offset: 3px; border-radius: 12px; }
.ant-dragging .drop-on, .ant-dragging .nl-site-subs .li.drop-on { outline: 2px solid var(--primary); background: var(--primary-soft); }
@media (hover: none) { .role-grip, .role-hint { display: none; } .role-row.can-drag { grid-template-columns: minmax(0, 1fr) auto auto; } }   /* a finger scrolls; the buttons do the same there */
.cut-sel { width: 230px; max-width: 46vw; height: 36px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); color: var(--text); }
#map.joining .mkw { cursor: crosshair; }
.knob:active { cursor: grabbing; }
.hint-bar { flex-wrap: wrap; }
.hint-bar small { color: var(--muted); font-size: 13px; }
.aim-read { padding: 5px 11px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-weight: 700; white-space: nowrap; }
.check { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-muted); font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }

/* markers */
.mk { display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); transition: transform .12s; }
.mk:hover { transform: scale(1.06); }
.mk.mast { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #1d2433; border: 3px solid #fff; }
.mk.mast .ico { width: 24px; height: 24px; stroke-width: 1.7; }
.mk.dc { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(155deg, #6f9dff, #2f66ea 70%); color: #fff; border: 3px solid #fff; }
.mk.dc .ico { width: 24px; height: 24px; }
.mk.dev { width: 42px; height: 42px; border-radius: 12px; background: #f4f6fa; border: 2px solid #fff; }
.mk.dev svg { width: 34px; height: 32px; }
.mk.sub { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 3px solid #8b5cf6; }
.mk.sub svg { width: 18px; height: 18px; }
.mkw.on .mk { outline: 3px solid #ffb020; outline-offset: 2px; }
.mk-n { position: absolute; top: -6px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #14171d; color: #fff; font: 700 12px/22px "Noto Sans Georgian", sans-serif; text-align: center; border: 2px solid #fff; }
.mk-label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 5px; padding: 2px 9px; border-radius: 999px; background: rgba(12, 16, 26, .82); color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; pointer-events: none; }

/* ---- right: the chosen thing ---------------------------------------------------------------- */
.insp-in { padding: 20px; display: grid; gap: 18px; }
.ih { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; }
.ih .pic { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: var(--tile); border: 1px solid var(--line); }
.ih .pic svg { width: 54px; height: 48px; }
.ih .pic.site { background: var(--panel-muted); color: var(--text-2); }
.ih .pic.site svg, .ih .pic.dc svg { width: 34px; height: 34px; }
.ih .pic.dc { background: linear-gradient(155deg, #6f9dff, #2f66ea 70%); color: #fff; border: 0; }
.ih h2 { margin: 0; font-size: 19px; line-height: 1.3; text-wrap: balance; }
.ih p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 10px; border-radius: 999px; background: var(--panel-muted); border: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip.st-stock { background: var(--teal-bg); color: var(--teal); border-color: transparent; }
.chip.st-installed { background: var(--green-bg); color: var(--green); border-color: transparent; }
.chip.st-repair { background: var(--amber-bg); color: var(--amber); border-color: transparent; }
.chip.st-broken { background: var(--red-bg); color: var(--red); border-color: transparent; }
.chip.st-retired { background: var(--panel-muted); color: var(--muted); }
.chip.warn { background: var(--amber-bg); color: var(--amber); border-color: transparent; }
.chip.bad { background: var(--red-bg); color: var(--red); border-color: transparent; }
.chip.dc { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.chip.old { background: var(--violet-bg); color: var(--violet); border-color: transparent; }
.chip.dir-tx { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.chip.dir-rx { background: var(--teal-bg); color: var(--teal); border-color: transparent; }
.chip.dir-relay { background: var(--violet-bg); color: var(--violet); border-color: transparent; }
.lnk { border: 0; padding: 0; background: none; color: var(--primary); font-weight: 600; text-align: left; }
.lnk:hover { text-decoration: underline; }
.note-row { margin-top: 8px; padding: 9px 12px; border-radius: 11px; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.note-row.ok { background: var(--green-bg); color: var(--green); }
.note-row.warn { background: var(--amber-bg); color: var(--amber); }
.note-row.bad { background: var(--red-bg); color: var(--red); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.sec h3 { margin: 0 0 8px; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 7px 12px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv a { color: var(--primary); font-weight: 600; text-decoration: none; } .kv a:hover { text-decoration: underline; }
.list { display: grid; gap: 6px; }
.li { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: left; width: 100%; }
.li:hover { border-color: var(--primary-line); }
.li .pic { width: 38px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--tile); }
.li .pic svg { width: 34px; height: 28px; }
.li b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; color: var(--text-2); }
.steps li::before { counter-increment: s; content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13.5px; }
.steps li.done::before { content: "✓"; background: var(--green-bg); color: var(--green); }
.steps b { color: var(--text); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-muted); }
.tile b { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; }
.tile span { color: var(--muted); font-size: 13px; }

/* ---- menus ----------------------------------------------------------------------------------- */
.menu { position: fixed; z-index: 3000; min-width: 260px; max-width: 320px; max-height: calc(100vh - 24px); overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-elevated); box-shadow: var(--shadow-lg); }
.menu-h { padding: 8px 12px 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; cursor: move; user-select: none; touch-action: none; }   /* the menu is carried aside by its title */
/* the one point told to move: a ring around it, and a hand to take it by */
.mkw.moving { cursor: grab; }
.mkw.moving::after { content: ''; position: absolute; inset: -9px; border: 2px dashed var(--primary); border-radius: 50%; pointer-events: none; animation: mk-move 1.2s ease-in-out infinite; }
@keyframes mk-move { 50% { inset: -14px; opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .mkw.moving::after { animation: none; } }
.menu-h.title { color: var(--text); font-size: 14px; }
.menu button { width: 100%; min-height: 42px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 14.5px; }
.menu button:hover, .menu button:focus-visible { background: var(--primary-soft); outline: none; }
.menu button .mi { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--tile); color: #1d2433; }
.menu button .mi svg { width: 26px; height: 24px; }
.menu button .mi.plain { background: var(--panel-muted); color: var(--text-2); }
.menu button .mi.plain svg { width: 18px; height: 18px; }
.menu button small { color: var(--muted); font-size: 12px; }
.menu button.danger { color: var(--red); }
.menu button.danger .mi { background: var(--red-bg); color: var(--red); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 6px; }

/* ---- dialogs ------------------------------------------------------------------------------- */
dialog { padding: 0; border: 0; border-radius: 18px; background: var(--panel); color: var(--text); box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); }
dialog.wide { width: min(1040px, calc(100vw - 32px)); height: min(760px, calc(100vh - 40px)); }
dialog::backdrop { background: rgba(10, 14, 24, .55); }
dialog.over { box-shadow: var(--shadow-lg), 0 0 0 1px var(--line-strong); }
dialog.over::backdrop { background: rgba(10, 14, 24, .22); backdrop-filter: none; }   /* a form over a list: the list under it stays in sight, not blurred */
.dlg { display: flex; flex-direction: column; max-height: calc(100vh - 40px); height: 100%; }
.dlg-h { display: flex; align-items: center; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); cursor: move; user-select: none; touch-action: none; }
.dlg-h button, .dlg-h a { cursor: pointer; }
dialog.moved::backdrop { background: transparent; backdrop-filter: none; }   /* moved aside: the map shows through */
.dlg-h h2 { margin: 0; font-size: 19px; flex: 1; }
.dlg-b { padding: 18px 22px; overflow: auto; flex: 1; }
.dlg-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); }
.form { display: grid; gap: 14px; }
.form fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.form legend { grid-column: 1 / -1; padding: 0; margin-bottom: 2px; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.form fieldset + fieldset { padding-top: 14px; border-top: 1px solid var(--line); }
.f { display: grid; gap: 6px; min-width: 0; }
.f.full { grid-column: 1 / -1; }
.f label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.f input, .f select, .f textarea { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--panel); }
.f textarea { min-height: 70px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.f .note { color: var(--muted); font-size: 12.5px; }
.model-box { grid-column: 1 / -1; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-muted); }
.model-box .pic { width: 64px; height: 56px; border-radius: 12px; display: grid; place-items: center; background: var(--tile); }
.model-box .pic svg { width: 54px; height: 46px; }
.model-box b { font-size: 15.5px; }
.model-box small { display: block; color: var(--muted); font-size: 13px; }

/* catalogue */
.cat { display: grid; grid-template-columns: 230px minmax(0, 1fr); height: 100%; min-height: 0; }
.cat-side { padding: 16px; border-right: 1px solid var(--line); overflow: auto; display: grid; gap: 16px; align-content: start; }
.cat-side h4 { margin: 0 0 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.opts { display: grid; gap: 4px; }
.opts button { min-height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; color: var(--text-2); }
.opts button:hover { background: var(--panel-muted); }
.opts button[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.opts button small { color: var(--muted); }
.cat-main { display: flex; flex-direction: column; min-height: 0; }
.cat-top { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.cat-top .search { flex: 1; }
.cat-grid { padding: 16px 18px 24px; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; align-content: start; }
.card { display: grid; grid-template-rows: 92px auto; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); text-align: left; transition: border-color .15s, box-shadow .15s, transform .12s; }
.card:hover { border-color: var(--primary); box-shadow: 0 8px 22px rgba(47, 102, 234, .14); transform: translateY(-1px); }
.card .pic { display: grid; place-items: center; border-radius: 10px; background: var(--tile); }
.card .pic svg { width: 86px; height: 74px; }
.card b { display: block; font-size: 14.5px; line-height: 1.35; }
.card small { display: block; color: var(--muted); font-size: 12.5px; margin: 2px 0 6px; }
.card .chips { gap: 4px; }
.card .chip { min-height: 22px; padding: 0 8px; font-size: 12px; }
.card.custom { border-style: dashed; }
.card.custom .pic { background: var(--panel-muted); color: var(--muted); font-size: 34px; font-weight: 300; }
.grp-title { grid-column: 1 / -1; margin: 8px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.grp-title:first-child { margin-top: 0; }

/* ---- equipment (the company's property) ------------------------------------------------------ */
.inv { display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: auto; padding: 22px 26px 40px; gap: 18px; }
.inv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.inv-head h1 { margin: 0; font-size: 23px; }
.inv-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.stat span { color: var(--muted); font-size: 13px; }
.stat b { display: block; font-size: 24px; font-weight: 700; line-height: 1.25; margin-top: 2px; }
.stat small { color: var(--muted); font-size: 12.5px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .search { width: min(360px, 100%); }
.filters select { height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--panel); }
.tbl-wrap { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 1100px; }
.tbl th { position: sticky; top: 0; background: var(--panel-muted); color: var(--muted); font-size: 12.5px; font-weight: 700; text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
.tbl th { box-shadow: inset 0 -1px 0 var(--line); }   /* a stuck title keeps its line: collapsed borders stay with the table */
.tbl th.r, .tbl td.r { text-align: right; }
/* Long lists keep their head (freeze.js): the page's tabs and filters, and each table's column titles under them.
   A table too wide for the page scrolls inside a wrapper of its own height, and its titles stick there. */
.tbl-wrap.head-page { overflow: clip; }
.tbl-wrap.head-page .tbl th { top: var(--freeze-top, 0px); z-index: 3; }
.tbl-wrap.head-own { max-height: var(--freeze-room, none); }
.freeze-bar { position: sticky; top: var(--freeze-top, 0px); z-index: 4; }
/* a frozen bar is as wide as the page and has a little air of its own: the rows pass under it, not beside it */
.inv .st-tabs { --freeze-pad: 10px; }
.inv .freeze-bar { box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(-10px -100vmax); }
.inv .filters.freeze-bar { background: var(--bg); clip-path: inset(0 -100vmax); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--panel-muted); }
.tbl .dev { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; }
.tbl .dev .pic { width: 44px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--tile); border: 1px solid var(--line); }
.tbl .dev .pic svg { width: 38px; height: 32px; }
.tbl .dev b { display: block; font-weight: 600; }
.tbl small { color: var(--muted); font-size: 12.5px; display: block; }
.tbl .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }

.toast { position: fixed; z-index: 4000; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); opacity: 0; padding: 12px 18px; border-radius: 12px; background: #14171d; color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast[popover] { top: auto; right: auto; margin: 0; border: 0; overflow: visible; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }

/* the map's own controls -- MapLibre's, sized and coloured like the rest of the site */
.maplibregl-ctrl-group { border-radius: 12px !important; box-shadow: var(--shadow-lg) !important; overflow: hidden; }
.maplibregl-ctrl-group button { width: 40px !important; height: 40px !important; }
.maplibregl-ctrl-scale { border-color: rgba(255, 255, 255, .9) !important; background: rgba(12, 16, 26, .7) !important; color: #fff !important; font: 600 12px "Noto Sans Georgian", sans-serif !important; }
.maplibregl-ctrl-bottom-left .maplibregl-ctrl { margin: 0 0 14px 14px !important; }
.maplibregl-ctrl-bottom-right .maplibregl-ctrl { margin: 0 14px 14px 0 !important; }
.tip-pop .maplibregl-popup-content { padding: 7px 11px; border-radius: 10px; background: rgba(12, 16, 26, .9); color: #fff; font: 600 13px "Noto Sans Georgian", sans-serif; box-shadow: var(--shadow-lg); }
.tip-pop .maplibregl-popup-tip { display: none; }
.map-search { position: absolute; z-index: 6; top: 14px; left: 14px; width: min(400px, calc(100% - 92px)); }
.map-search > .ico { position: absolute; left: 14px; top: 13px; color: var(--muted); pointer-events: none; }
.map-search input { width: 100%; height: 46px; padding: 0 14px 0 44px; border: 0; border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: var(--shadow-lg); font-size: 15px; }
.map-search input:focus { outline: 2px solid var(--primary); outline-offset: 0; }
.map-sres { margin-top: 6px; padding: 6px; border-radius: 12px; background: var(--panel-elevated); box-shadow: var(--shadow-lg); max-height: min(60vh, 460px); overflow: auto; }
.map-sres .sh { padding: 8px 10px 4px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.map-sres button { width: 100%; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; }
.map-sres button[aria-selected="true"], .map-sres button:hover { background: var(--primary-soft); }
.map-sres .si { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--panel-muted); color: var(--text-2); }
.map-sres b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-sres small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-layers { position: absolute; z-index: 6; top: 14px; right: 14px; }
.mbtn { width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--panel); color: var(--text-2); box-shadow: var(--shadow-lg); }
.mbtn:hover, .mbtn[aria-expanded="true"] { color: var(--primary); }
.layers-pop { position: absolute; right: 0; top: 54px; width: 280px; padding: 14px; border-radius: 14px; background: var(--panel-elevated); box-shadow: var(--shadow-lg); display: grid; gap: 6px; max-height: min(72vh, 680px); overflow-y: auto; }
.lp-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 48px; align-items: center; gap: 8px; min-height: 32px; font-size: 13px; color: var(--text-2); }
.lp-row input[type=range] { width: 100%; accent-color: var(--primary); }
.lp-row input[type=color] { width: 44px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: none; cursor: pointer; }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.ms-sec { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.ms-sec h3 { margin: 6px 0 2px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.ms-sec h3:first-child { margin-top: 0; }
.ms-sec .lp-row { grid-template-columns: 112px minmax(0, 1fr) 54px; }
/* each kind of line: its name in full, the line as it will be drawn, its colours (up to three) and its own width */
#msKinds { display: grid; gap: 8px; }
.lk { display: grid; gap: 7px; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-muted); }
.lk-h { display: grid; gap: 6px; min-width: 0; } .lk-h b { color: var(--text); font-size: 12.5px; font-weight: 650; overflow-wrap: anywhere; }
.lk-prev { display: block; min-height: 2px; border-radius: 4px; }
.lk-c { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lk-col { position: relative; display: inline-flex; }
.lk-col input[type=color] { width: 44px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: none; cursor: pointer; }
.lk-x { position: absolute; top: -8px; right: -8px; width: 19px; height: 19px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--panel); color: var(--text-2); font-size: 13px; line-height: 1; cursor: pointer; }
.lk-x:hover, .lk-x:focus-visible { color: var(--red); border-color: var(--red); }
.ms-sec .lk .lp-row { grid-template-columns: 50px minmax(0, 1fr) minmax(54px, auto); }
.ms-sel { grid-column: 2 / -1; width: 100%; height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel); color: var(--text); text-overflow: ellipsis; }   /* the names are long: the whole row is its own */
#btnMapSettingsPop { margin-top: 6px; justify-content: flex-start; white-space: normal; text-align: left; line-height: 1.3; padding: 6px 10px; }
#map .mk.mast { background: var(--mast-color, #657bb5); }
#map .mk.dc { background: var(--dc-color, #087e70); }
#map .mk.sub { background: var(--sub-bg, #fff); }
#map .mk.sub:not(.free):not(.off):not(.served):not(.inbeam) { border-color: var(--sub-ring, #c5a26d); }
/* the icons' buttons show each kind's sign as it is now */
.icon-kinds button { display: grid; justify-items: center; gap: 4px; padding: 6px 4px; min-height: 64px; }
.ik-prev { width: 30px; height: 30px; display: grid; place-items: center; }
.ik-prev img { width: 30px; height: 30px; object-fit: contain; }
.ik-prev .mk { width: 26px !important; height: 26px !important; border-width: 2px !important; box-shadow: none; }
.ik-prev .mk .ico, .ik-prev .mk svg { width: 15px !important; height: 15px !important; }
.ik-prev .mk.mast { background: var(--mast-color, #657bb5); color: #fff; border-color: #fff; }
.ik-prev .mk.dc { background: var(--dc-color, #087e70); color: #fff; border-color: #fff; border-radius: 8px; }
.ik-prev .mk.sub, .ic-stage .mk.sub, .ih .pic .mk.sub { background: var(--sub-bg, #fff); border-color: var(--sub-ring, #c5a26d); }
.ic-stage .mk.mast { background: var(--mast-color, #657bb5); }
.ic-stage .mk.dc { background: var(--dc-color, #087e70); }
/* a card's sign: the uploaded picture as it is */
.ih .pic.own { background: var(--panel-muted); padding: 4px; }
.ih .pic.own img { width: 100%; height: 100%; object-fit: contain; }
.lp-row output { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.layers-pop h4 { margin: 2px 0 4px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.base-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.icon-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.icon-kinds button { min-height: 34px; padding: 0 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-muted); color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.icon-kinds button:hover { border-color: var(--primary-line); color: var(--text); }
.base-opts button { display: grid; gap: 6px; padding: 6px; border: 2px solid transparent; border-radius: 12px; background: var(--panel-muted); color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.base-opts button[aria-pressed="true"] { border-color: var(--primary); color: var(--primary); }
.thumb { height: 56px; border-radius: 8px; }
.thumb.sat { background: radial-gradient(circle at 30% 35%, #6b7d4f 0 18%, transparent 19%), radial-gradient(circle at 70% 60%, #8a7a5a 0 22%, transparent 23%), linear-gradient(135deg, #3d5a3a, #5e5a42 55%, #2f4a5c); }
.thumb.streets { background: linear-gradient(90deg, transparent 46%, #fff 46% 54%, transparent 54%), linear-gradient(0deg, transparent 40%, #ffd98a 40% 50%, transparent 50%), linear-gradient(135deg, #eef0e6, #dfeadb 55%, #cfe0f0); }
.tg { display: flex; align-items: center; gap: 10px; min-height: 38px; font-size: 14px; cursor: pointer; }
.tg input { width: 18px; height: 18px; accent-color: var(--primary); }
.coords { position: absolute; z-index: 6; left: 14px; bottom: 50px; padding: 3px 9px; border-radius: 8px; background: rgba(12, 16, 26, .72); color: #fff; font-size: 12px; cursor: copy; }
.coords:empty { display: none; }
.no-labels .mk-label { display: none; }
/* names: one size everywhere, whatever the sign's size or the zoom -- they don't grow with the sign */
#map .mk-label { --lbl-k: calc(1 / (max(.82, var(--mk-scale, 1)) * var(--own, 1))); top: 100%; bottom: auto; left: 50%; right: auto; margin: 4px 0 0; transform: translateX(-50%) scale(var(--lbl-k)); transform-origin: 50% 0;
  font-size: calc(11px * var(--label-scale, 1)); font-weight: 600; line-height: 1.3; text-align: center; padding: calc(2px * var(--label-scale, 1)) calc(7px * var(--label-scale, 1)); }
#map .mki:not(.sub-mk) > .mk-label { font-weight: 700; }
#map .mk-label small { display: block; font-size: .85em; font-weight: 600; opacity: .78; }
/* when below is taken: above, right or left of the sign */
#map .mk-label.pos-top { top: auto; bottom: 100%; margin: 0 0 4px; transform-origin: 50% 100%; }
#map .mk-label.pos-right { top: 50%; left: 100%; margin: 0 0 0 5px; transform: translateY(-50%) scale(var(--lbl-k)); transform-origin: 0 50%; }
#map .mk-label.pos-left { top: 50%; left: auto; right: 100%; margin: 0 5px 0 0; transform: translateY(-50%) scale(var(--lbl-k)); transform-origin: 100% 50%; }
#map .mk-label.lbl-hide { visibility: hidden; }
.geo-pin { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #ef4444; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); cursor: pointer; }
.mkw { cursor: pointer; }
.mki { position: relative; transform: scale(calc(var(--mk-scale, 1) * var(--own, 1))); transform-origin: 50% 50%; transition: transform .15s ease-out; }
.zoom-far .mk-label, .zoom-far .mk-n { display: none; }
.mk.own { width: 44px; height: 44px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.mk.own.sm { width: 34px; height: 34px; }
.mk-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .45)); }
/* up close a mast keeps its sign (or the owner's picture), its antennas around it, each on the side it faces */
.ant-ring { display: none; position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.ant-pic { position: absolute; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; display: grid; place-items: center; border-radius: 8px; background: rgba(244, 246, 250, .92); box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
  transform: rotate(var(--a)) translateY(calc(-1 * var(--r, 30px))) rotate(calc(-1 * var(--a))); }
.ant-pic svg { width: 26px; height: 24px; }
.zoom-close .ant-ring { display: block; }
/* a chosen mast: its antennas out around it, each with its name -- one click opens it */
.ant-ring.open { display: block; pointer-events: auto; z-index: 3; }
.ant-ring.open .ant-pic { width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 12px; border: 2px solid #fff; background: rgba(255, 255, 255, .97); cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.ant-ring.open .ant-pic svg { width: 36px; height: 32px; }
.ant-ring.open .ant-pic.d-tx { border-color: #3b82f6; } .ant-ring.open .ant-pic.d-rx { border-color: #14b8a6; } .ant-ring.open .ant-pic.d-relay { border-color: #a78bfa; }
.ant-ring.open .ant-pic b { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px; max-width: 120px; padding: 1px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 6px; background: rgba(15, 23, 42, .85); color: #fff; font: 700 10.5px/1.5 "Noto Sans Georgian", sans-serif; pointer-events: none; }
.ant-ring.open .ant-pic:hover, .ant-ring.open .ant-pic:focus-visible, .ant-ring.open .ant-pic.on { outline: 3px solid #ffb020; outline-offset: 1px; }
@keyframes ant-out { from { transform: rotate(var(--a)) translateY(0) rotate(calc(-1 * var(--a))) scale(.3); opacity: 0; } }
.ant-ring.open.pop .ant-pic { animation: ant-out .3s ease-out both; }
@media (prefers-reduced-motion: reduce) { .ant-ring.open.pop .ant-pic { animation: none; } }
.mki:has(.ant-ring.open) .mk-n, .mki:has(.ant-ring.open) .mk-label { display: none; }   /* its name is on the card; the antennas take the room */
.maplibregl-marker:has(.ant-ring.open) { z-index: 4; }
/* a mast with a data centre in the same yard: a green buffer zone around it -- pressed, everything comes out */
.mki.with-dc::before { content: ""; position: absolute; left: 50%; top: 50%; width: var(--zone-size, 92px); height: var(--zone-size, 92px); transform: translate(-50%, -50%); border-radius: var(--zone-radius, 50%); background: radial-gradient(circle, rgb(var(--zone-rgb, 16 185 129) / .34), rgb(var(--zone-rgb, 16 185 129) / .2) 70%); border: 2px solid rgb(var(--zone-rgb, 16 185 129) / .85); box-shadow: 0 0 0 4px rgb(var(--zone-rgb, 16 185 129) / .16); z-index: -1; pointer-events: none; }
#map.zone-off .mki.with-dc::before { display: none; }
/* a mast with a rack (or a box) of its own: a zone too -- square by itself, so it is told from a data centre's at a glance */
.mki.with-rack::before { content: ""; position: absolute; left: 50%; top: 50%; width: var(--rackzone-size, 74px); height: var(--rackzone-size, 74px); transform: translate(-50%, -50%); border-radius: var(--rackzone-radius, 16%); background: rgb(var(--rackzone-rgb, 16 185 129) / .26); border: 2px solid rgb(var(--rackzone-rgb, 16 185 129) / .85); box-shadow: 0 0 0 4px rgb(var(--rackzone-rgb, 16 185 129) / .16); z-index: -1; pointer-events: none; }
#map.rackzone-off .mki.with-rack::before { display: none; }
.ant-ring.open .ant-pic.dc-pic { background: var(--dc-color, #087e70); color: #fff; border-color: #fff; }
.ant-ring.open .ant-pic.dc-pic .ico { width: 24px; height: 24px; }
/* the card: the other half of the yard, a square button between the sign and the name */
.ih:has(.ih-twin) { grid-template-columns: auto auto minmax(0, 1fr); }
.ih-twin { width: 43px; height: 43px; display: grid; place-items: center; border: 2px solid transparent; border-radius: 12px; cursor: pointer; box-shadow: var(--shadow-sm); }
.ih-twin .ico { width: 22px; height: 22px; }
.ih-twin.dc { background: #087e70; color: #fff; }
.ih-twin.mast { background: var(--primary-soft); color: var(--primary); }
.ih-twin:hover, .ih-twin:focus-visible { border-color: #ffb020; }   /* above the companies around it */
.ic-prev { display: grid; gap: 8px; justify-items: center; }
.ic-stage { width: 100%; height: 170px; display: grid; place-items: center; border-radius: 14px; background: radial-gradient(circle at 30% 35%, #6b7d4f 0 14%, transparent 15%), radial-gradient(circle at 72% 62%, #8a7a5a 0 18%, transparent 19%), linear-gradient(135deg, #3d5a3a, #5e5a42 55%, #2f4a5c); }
.ic-stage .mki { transition: none; }
@media (max-width: 980px) { body.aiming .insp { display: none; } }   /* aiming needs the whole map on a small screen */

@media (max-width: 1200px) { .main { grid-template-columns: 290px minmax(0, 1fr) 340px; } }
@media (max-width: 980px) {
  .main { grid-template-columns: minmax(0, 1fr); }
  .side { position: absolute; z-index: 900; top: 64px; bottom: 0; left: 0; width: min(320px, 88vw); box-shadow: var(--shadow-lg); transform: translateX(-102%); transition: transform .2s; }
  .side.open { transform: none; }
  .insp { position: absolute; z-index: 900; left: 0; right: 0; bottom: 0; max-height: 55vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: var(--shadow-lg); }
  .insp.idle { display: none; }
  #sideToggle { display: inline-flex !important; }
  .brand .name { display: none; }
}
@media (max-width: 640px) {
  .top { padding: 0 12px; gap: 8px; }
  .tabs button { padding: 0 10px; }
  .top .wide-only { display: none; }
  .form fieldset { grid-template-columns: minmax(0, 1fr); }
  .cat { grid-template-columns: minmax(0, 1fr); }
  .cat-side { display: none; }
  .inv { padding: 16px 14px 30px; }
}
/* ---- the equipment page's warehouse: sections, stock, purchases, installations, history ---------------- */
.st-tabs { display: flex; flex-wrap: wrap; gap: 4px; width: max-content; max-width: 100%; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.st-tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.st-tabs button:hover { color: var(--text); }
.st-tabs button[aria-selected="true"] { background: var(--primary-soft); color: var(--primary); }
.st-tabs button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.st-badge { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--red-bg); color: var(--red); font-size: 11px; font-weight: 700; text-align: center; }
.st-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-head > .btn, .inv-head > #invAdd { margin-left: auto; }
.inv-head #stBuyTop { margin-left: auto; }
.inv-head #stBuyTop + #invAdd { margin-left: 0; }
.st-body { display: grid; gap: 18px; align-content: start; }
.st-sec { display: grid; gap: 10px; }
.st-sec h2 { margin: 0; font-size: 16px; font-weight: 700; }
.stat.st-warn { border-color: var(--amber); }
.stat.st-warn b { color: var(--amber); }
table.tbl.st-tbl { min-width: 720px; }
.st-tbl td small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.st-tbl tr.st-static { cursor: default; }
/* a purchase's lines */
.st-lines-box legend { margin-bottom: 4px; }
.st-lines-wrap { grid-column: 1 / -1; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.st-lines { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13.5px; }
.st-lines th { padding: 8px 10px; background: var(--panel-muted); color: var(--muted); font-size: 12px; font-weight: 700; text-align: left; }
.st-lines th.r, .st-lines td.r { text-align: right; }
.st-lines td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.st-lines td small { color: var(--muted); }
.st-lines input, .st-lines select { width: 100%; min-height: 38px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; }
.st-lines td:nth-child(3), .st-lines td:nth-child(4) { width: 110px; }
.st-lines:not(.ro) td:first-child { width: 150px; }
.st-lines td:last-child { width: 44px; }
.st-lines td[data-amount] { padding-top: 17px; white-space: nowrap; font-weight: 600; }
.st-lines .st-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.st-lines .st-sub select { width: auto; min-width: 120px; }
.st-lines .st-sub input { flex: 1 1 200px; width: auto; }
.st-lines .st-sum td { background: var(--panel-muted); font-weight: 700; }
.st-lines-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
/* an installation: devices from the warehouse, materials used */
.st-devs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; padding: 2px; }
.st-dev { display: grid; grid-template-columns: auto 34px minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); cursor: pointer; }
.st-dev:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.st-dev.off { opacity: .5; cursor: not-allowed; }
.st-dev .pic { width: 34px; height: 34px; display: grid; place-items: center; }
.st-dev .pic svg { width: 30px; height: 30px; }
.st-dev b { display: block; font-size: 13px; }
.st-dev small { color: var(--muted); font-size: 11.5px; }
#stUsed { display: grid; gap: 8px; }
.st-used { display: grid; grid-template-columns: minmax(0, 1fr) 120px 48px auto; gap: 8px; align-items: center; }
.st-used select, .st-used input { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; }
/* a record shown, not edited */
.st-view { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.st-view .full { grid-column: 1 / -1; }
.st-view span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.st-view b { font-size: 14.5px; font-weight: 600; }
/* the materials' groups in the stock */
.st-tbl tr.st-grp td { background: var(--panel-muted); cursor: default; }
.st-tbl tr.st-grp b { font-size: 13.5px; }
.st-tbl tr.st-grp small { display: inline; margin-left: 8px; }
.st-lines .st-sub .st-cat { min-width: 170px; }
/* where a device off its place last stood */
.tbl td small.last-place { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.st-units { display: grid; gap: 2px; }
.st-units small { color: var(--text-2); font-size: 12px; }
/* a company off the map: each antenna there gets a fate */
.sub-rm-h { margin: 4px 0 8px; font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.sub-rm { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(170px, 220px); align-items: center; gap: 6px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.sub-rm + .sub-rm { margin-top: 6px; }
.sub-rm .pic { width: 40px; height: 40px; display: grid; place-items: center; }
.sub-rm .pic svg { width: 34px; height: 34px; }
.sub-rm b { display: block; font-size: 13.5px; }
.sub-rm small { color: var(--muted); font-size: 12px; }
.sub-rm select { min-height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; }
.sub-rm-dest { grid-column: 2 / -1; display: grid; gap: 4px; }
.sub-rm-dest[hidden] { display: none; }
.sub-rm-dest span { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
@media (max-width: 640px) { .sub-rm { grid-template-columns: 40px minmax(0, 1fr); } .sub-rm > select, .sub-rm-dest { grid-column: 1 / -1; } }
/* a device's history in its own window */
.st-timeline { margin: 0; padding: 0 0 0 16px; display: grid; gap: 8px; border-left: 2px solid var(--line); list-style: none; }
.st-timeline li { position: relative; font-size: 13.5px; }
.st-timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--panel); }
.st-timeline .num { margin-right: 8px; color: var(--muted); }
.st-timeline small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) {
  .st-tabs { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .st-tabs button { flex: none; }
  .st-view { grid-template-columns: minmax(0, 1fr); }
  .st-used { grid-template-columns: minmax(0, 1fr) 90px auto; }
  .st-used .note { display: none; }
  .inv-head #stBuyTop, .inv-head #invAdd { flex: 1 1 auto; justify-content: center; margin-left: 0; }
  /* the tables as cards: one record each, every value under its column's name */
  table.tbl.st-tbl { min-width: 0; }
  .st-tbl thead { display: none; }
  .st-tbl, .st-tbl tbody { display: block; }
  .st-tbl tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .st-tbl td { display: block; min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
  .st-tbl td:first-child { grid-column: 1 / -1; }
  .st-tbl tr:last-child { border-bottom: 0; }
  .st-tbl td, .st-tbl td.r { padding: 3px 0; border: 0; text-align: left; }
  .st-tbl td[data-l]:not(:first-child)::before { content: attr(data-l); display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; }
  .st-tbl td:empty { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- live: saving, inside the site's own page ------------------------------------------------- */
.save-state { padding: 3px 10px; border-radius: 999px; background: var(--green-bg); color: var(--green); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.save-state.busy { background: var(--primary-soft); color: var(--primary); }
.save-state.bad { background: var(--red-bg); color: var(--red); }
.embedded #btnTheme, .embedded #btnFull { display: none; }
.solo .tabs, .solo #btnUndo, .solo #btnRedo, .solo #sideToggle { display: none !important; }
.mk.sub.off { border-color: #94a3b8; filter: grayscale(1); opacity: .8; }
.mk.sub.free { border-color: #f59e0b; }
.chip.off { background: var(--panel-muted); color: var(--muted); }
.chip.down { background: var(--red-bg); color: var(--red); border-color: transparent; }
.pick-list { display: grid; gap: 6px; margin-top: 12px; max-height: 50vh; overflow: auto; }
.hint-bar { z-index: 12; }

/* ---- a site opened as a building: the roof, the cables down, the rack room, the ground ---------- */
.bv { position: absolute; inset: 0; z-index: 8; overflow: auto; background: var(--bg); padding: 18px 22px 40px; display: grid; gap: 16px; align-content: start; }
.bv-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bv-head h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.bv-head small { display: block; color: var(--muted); font-size: 13px; }
.bv-head .acts { margin-left: auto; }
.bv-bld { position: relative; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); overflow: hidden; box-shadow: var(--shadow-sm); }
.bv-wires { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2; overflow: visible; }
.bv-zone { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); min-height: 120px; }
.bv-rail { display: grid; place-content: center; justify-items: center; gap: 2px; padding: 10px 6px; border-right: 1px dashed var(--line-strong); color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }
.bv-rail b { font-size: 18px; color: var(--text-2); }
.bv-zone.roof { background: linear-gradient(180deg, rgba(91, 140, 255, .12), transparent 85%); border-bottom: 4px solid var(--line-strong); }
.bv-row { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px 16px 22px; align-items: flex-end; }
.bv-ant { position: relative; width: 156px; display: grid; justify-items: center; gap: 3px; padding: 10px 8px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--panel); text-align: center; cursor: pointer; }
.bv-ant.tx { border-color: rgba(59, 130, 246, .6); } .bv-ant.rx { border-color: rgba(20, 184, 166, .6); } .bv-ant.relay { border-color: rgba(167, 139, 250, .7); }
.bv-ant.on, .bv-unit.on, .pill.on { outline: 3px solid #ffb020; outline-offset: 2px; }
.bv-ant .pic { width: 54px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: var(--tile); }
.bv-ant .pic svg { width: 46px; height: 42px; }
.bv-ant b { font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.bv-ant small { color: var(--muted); font-size: 11.5px; line-height: 1.35; overflow-wrap: anywhere; }
.bv-ant .anchor { position: absolute; bottom: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; border: 3px solid var(--panel); background: var(--muted-2); cursor: crosshair; z-index: 3; padding: 0; }
.bv-ant .anchor.wired { background: var(--green); }
.bv-ant .anchor:hover { background: #ffb020; }
.bv-ant.down b, .bv-unit.down b { color: var(--red); }
.bv-shaft { display: flex; justify-content: center; padding: 6px; background: repeating-linear-gradient(90deg, var(--panel-muted) 0 10px, transparent 10px 20px); color: var(--muted); font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--line); }
.bv-zone.room { background: var(--panel-muted); }
.bv-racks { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px; align-items: flex-start; }
.bv-rack { width: min(100%, 480px); border: 2px solid #3b4357; border-radius: 12px; background: #1f2533; color: #e3e7f0; overflow: hidden; }
.bv-rack-h { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #2a3142; font-size: 13px; font-weight: 700; cursor: pointer; }
.bv-rack-h .ico { width: 16px; height: 16px; }
.bv-rack-h .u-use { color: #9aa4ba; font-weight: 600; }
.bv-rack-h button { margin-left: auto; border: 0; border-radius: 8px; padding: 4px 10px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 12px; font-weight: 600; }
.bv-unit { display: grid; gap: 6px; margin: 6px; padding: 8px 10px; border-radius: 9px; background: #2b3243; border: 1px solid #3b4357; cursor: pointer; min-width: 0; }
.bv-unit-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.bv-unit-h .u { flex: none; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .14); font-size: 11px; font-weight: 700; }
.bv-unit-h .ic { flex: none; width: 46px; height: 24px; display: grid; place-items: center; }
.bv-unit-h .ic svg { width: 46px; height: 24px; }
.bv-unit-h b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv-unit-h small { color: #9aa4ba; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot-st { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #34d399; }
.dot-st.down { background: #f87171; }
.ports { display: flex; flex-wrap: wrap; gap: 4px; }
.jack { width: 24px; height: 19px; padding: 0; border: 1px solid #556078; border-radius: 4px; background: #11151e; color: #9aa4ba; font: 700 9.5px/17px ui-monospace, "Cascadia Mono", Consolas, monospace; cursor: pointer; }
.jack.sfp { width: 28px; border-color: #8a7a3c; }
.jack.used { background: #148a52; border-color: #34d399; color: #fff; }
.jack.up { background: #b45309; border-color: #f59e0b; color: #fff; }
.jack:hover { border-color: #ffb020; }
.jack.armed, .bv-ant.armed { box-shadow: 0 0 0 3px #ffb020; }
.bv-empty { margin: 8px 10px 10px; color: #9aa4ba; font-size: 12px; }
.zone-empty { align-self: center; margin: 0; padding: 14px 18px; border: 2px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: 13px; }
.bv-shelf { min-width: 260px; flex: 1; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 8px; background: var(--panel); }
.bv-shelf h4 { margin: 2px 6px 6px; color: var(--muted); font-size: 12px; }
.bv-shelf .bv-unit { background: var(--panel-muted); border-color: var(--line); color: var(--text); }
.bv-shelf .bv-unit-h small { color: var(--muted); }
.bv-shelf .jack { background: var(--panel); border-color: var(--line-strong); color: var(--muted); }
.bv-shelf .jack.used { background: #148a52; border-color: #34d399; color: #fff; }
.bv-shelf .jack.up { background: #b45309; border-color: #f59e0b; color: #fff; }
.bv-zone.ground { background: repeating-linear-gradient(135deg, rgba(138, 122, 90, .12) 0 8px, transparent 8px 16px); border-top: 4px solid #8a7a5a; min-height: 96px; }
.bv-ground { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px 16px 14px; }
.bv-ground h4 { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.pill { position: relative; display: inline-flex; align-items: center; gap: 7px; margin: 0 8px 8px 0; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left; }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); flex: none; }
.pill.fiber .dot { background: #f59e0b; } .pill.eth .dot { background: #3b82f6; } .pill.radio .dot { background: #a78bfa; } .pill.cable .dot { background: #fb923c; } .pill.other .dot { background: #94a3b8; }
.pill .anchor { position: absolute; top: -6px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--muted-2); border: 2px solid var(--panel); }
.pill.add { border-style: dashed; color: var(--muted); }
.wire { fill: none; stroke-width: 3; stroke-linecap: round; opacity: .9; }
.wire.eth { stroke: #3b82f6; } .wire.fiber { stroke: #f59e0b; } .wire.cable { stroke: #fb923c; stroke-dasharray: 6 5; } .wire.hot { stroke: #ffb020; stroke-width: 5; opacity: 1; }
.wire.loose { stroke-dasharray: 3 6; }
.bv-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.bv-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); display: grid; gap: 8px; align-content: start; }
.bv-card h3 { margin: 0; font-size: 14px; }
.bv-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
/* a window's own search (netmap-find.js): over its lists, flush with the window's top, there while they scroll */
/* (it sticks where the body's padding ends: the strip above it, where rows would show while scrolling, is covered by its shadow) */
.lf-bar { position: sticky; top: 0; z-index: 4; grid-column: 1 / -1; column-span: all; display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 10px; background: var(--panel); box-shadow: 0 -40px 0 var(--panel); border-bottom: 1px solid var(--line); }
.lf-bar .search { flex: 1 1 220px; min-width: 0; }
.lf-n { color: var(--muted); font-size: 12px; white-space: nowrap; }
.lf-none { display: none; flex: 1 0 100%; color: var(--amber); font-size: 12.5px; font-weight: 600; }
.lf-bar.lf-nothing .lf-none { display: block; }
.lf-warn { display: none; flex: 1 0 100%; padding: 7px 10px; border-radius: 9px; background: var(--amber-bg); color: var(--amber); font-size: 12.5px; font-weight: 600; }
.lf-bar.lf-check .lf-warn { display: block; }
.lf-off { display: none !important; }
/* what comes into a place: each line as it was written down, under the form's own headings */
.up-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 10px; align-items: start; }
.up-card { display: grid; gap: 10px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.up-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.up-h i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--muted-2); }
.up-card.fiber .up-h i { background: #f59e0b; } .up-card.eth .up-h i { background: #3b82f6; } .up-card.radio .up-h i { background: #a78bfa; }
.up-h b { flex: 1 1 150px; min-width: 0; font-size: 14.5px; font-weight: 650; overflow-wrap: anywhere; }
.up-card .kv { font-size: 13.5px; grid-template-columns: minmax(96px, 150px) minmax(0, 1fr); }
.up-card .kv small { color: var(--muted); font-size: 12px; }
.up-none { color: var(--amber); font-weight: 600; }
.up-card .note-row { margin-top: 0; font-size: 12.5px; }
.flow-row { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: left; width: 100%; }
.flow-row:hover { border-color: var(--primary-line); }
.flow-row i { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--muted-2); }
.flow-row.fiber i { background: #f59e0b; } .flow-row.eth i { background: #3b82f6; } .flow-row.radio i { background: #a78bfa; } .flow-row.cable i { background: #fb923c; }
.flow-row b { display: block; font-size: 13.5px; font-weight: 600; }
.flow-row small { display: block; color: var(--muted); font-size: 12.5px; }
/* a rack, unit by unit */
.bv-rack.big { width: min(100%, 680px); }
.rk { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 0 6px; padding: 10px; }
.rk-u { color: #7c8496; font: 600 11px ui-monospace, Consolas, monospace; display: grid; place-items: center; }
.slot { margin: 2px 0; border: 1px dashed #3b4357; border-radius: 6px; color: #6c7690; font-size: 11.5px; display: flex; align-items: center; padding: 0 10px; cursor: pointer; }
.slot:hover, .slot.drop { border-color: #ffb020; color: #ffb020; }
.rk .bv-unit { margin: 2px 0; align-content: center; }
@media (max-width: 760px) { .bv { padding: 12px; } .bv-zone { grid-template-columns: 54px minmax(0, 1fr); } .bv-ground { grid-template-columns: minmax(0, 1fr); } .bv-ant { width: 132px; } }

/* ---- the map against the real network (netmap-live.js) ---------------------------------------- */
/* a company's line now: a light on the sign's top corner -- the sign itself stays as it is -- blinking the faster
   the more the company uses */
#map .sub-mk .mk-led { position: absolute; top: -6px; right: -6px; z-index: 2; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 0 9px var(--live); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .mk-led[data-level="1"], .nl-led[data-level="1"] { animation: nl-blink 3.2s steps(1, end) infinite; }
  .mk-led[data-level="2"], .nl-led[data-level="2"] { animation: nl-blink 1.6s steps(1, end) infinite; }
  .mk-led[data-level="3"], .nl-led[data-level="3"] { animation: nl-blink .7s steps(1, end) infinite; }
}
/* as a port's light on a MikroTik: lit, with short dark flickers at uneven gaps -- more often the more traffic */
@keyframes nl-blink { 0%, 13%, 30%, 41%, 61%, 82%, 94%, 100% { opacity: 1; } 9%, 27%, 36%, 58%, 77%, 91% { opacity: .15; } }
/* an antenna whose MikroTik port is down */
.ant-pic.down, .ant-ring.open .ant-pic.down { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .55), 0 3px 10px rgba(0, 0, 0, .45); }
.legend-live { display: flex; align-items: center; gap: 4px; cursor: help; }
.map-legend .legend-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.map-legend .legend-live i:last-of-type { margin-right: 3px; }

/* what the MikroTiks find on their lines: the list an antenna is taken from. Its bar (tabs, search, buttons)
   stays; only the rows scroll under it */
.nb-win .dlg-b { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 16px; overflow: hidden; }
.nb-win.no-side .dlg-b { grid-template-columns: minmax(0, 1fr); }
.nb-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
dialog.wide.xwide { width: min(1320px, calc(100vw - 32px)); height: min(820px, calc(100vh - 40px)); }
/* beside the list: the kinds of equipment -- what the line found of each, and what is added by hand */
.nb-side { display: grid; align-content: start; gap: 3px; min-height: 0; overflow: auto; padding-right: 12px; border-right: 1px solid var(--line); }
.nb-side-h { margin: 10px 4px 4px; color: var(--muted); font-size: 11.5px; font-weight: 700; } .nb-side-h:first-child { margin-top: 0; }
.nb-kind { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 42px; padding: 4px 9px 4px 5px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.nb-kind:hover { background: var(--panel-muted); }
.nb-kind[aria-pressed="true"] { border-color: var(--primary-line); background: var(--primary-soft); color: var(--primary); }
.nb-kind .mi { width: 34px; height: 30px; display: grid; place-items: center; } .nb-kind .mi svg { width: 30px; height: 26px; } .nb-kind .mi.plain .ico { width: 17px; height: 17px; }
.nb-kind small { min-width: 22px; padding: 1px 6px; border-radius: 999px; background: var(--panel-muted); color: var(--muted); font-size: 11.5px; text-align: center; }
.nb-kind[aria-pressed="true"] small { background: var(--panel); color: var(--primary); }
.nb-new { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.nb-new small { color: var(--muted); font-size: 12px; } .nb-new .btn .ico { width: 15px; height: 15px; }
/* a narrow screen: the kinds are a row that is swiped, above the list */
@media (max-width: 860px) {
  .nb-win .dlg-b { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
  .nb-win.no-side .dlg-b { grid-template-rows: minmax(0, 1fr); }
  .nb-side { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 8px; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .nb-side-h { display: none; } .nb-kind { flex: none; grid-template-columns: auto auto auto; min-height: 36px; border-color: var(--line); } .nb-kind .mi { width: 24px; height: 22px; } .nb-kind .mi svg { width: 22px; height: 20px; }
}
.nb-bar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.nb-win .nb-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; align-content: start; margin-right: -10px; padding: 12px 10px 4px 0; }
.nb-sep { margin-top: 6px; padding: 2px 2px 0; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.nb-sep:first-child { margin-top: 0; }
.nb-sep small { margin-left: 4px; font-weight: 600; opacity: .8; }
.nb-bar .search { flex: 1; min-width: 200px; }
.nb-seg { box-shadow: none; border: 1px solid var(--line); }
.nb-seg small { margin-left: 4px; font-weight: 600; opacity: .8; }
.nb-list { display: grid; gap: 8px; }
.nb-row { grid-template-columns: 44px minmax(0, 1fr) auto; align-items: start; padding: 10px 12px; }
.nb-row .pic { width: 44px; height: 40px; display: grid; place-items: center; }
.nb-row .pic svg { width: 40px; height: 34px; }
.nb-what b { white-space: normal; overflow-wrap: anywhere; }
.nb-what b i { color: var(--text-2); font-style: normal; font-weight: 500; }
.nb-what small { white-space: normal; overflow-wrap: anywhere; }
.nb-what .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.nb-what .chip { min-height: 22px; max-width: 100%; padding: 2px 8px; border-radius: 11px; font-size: 11.5px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
.nb-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.nb-pick { max-height: 220px; margin-top: 8px; }
.nb-pick .li { text-align: left; cursor: pointer; }
.nb-pick .li.is-on { border-color: var(--primary); background: var(--primary-soft); }
@media (max-width: 640px) { .nb-row { grid-template-columns: 36px minmax(0, 1fr); } .nb-acts { grid-column: 1 / -1; justify-content: flex-start; } }
/* a window of one's own size: pulled by its right edge, its bottom edge or its corner; the whole screen by a button */
dialog.sized { max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
dialog.sized .dlg { max-height: calc(100vh - 16px); }   /* a form of its own height still scrolls inside, under its title */
dialog.sized.maxed { width: calc(100vw - 16px); height: calc(100vh - 16px); translate: none !important; }
dialog.pulling { user-select: none; }
.nl-grip { position: absolute; z-index: 6; touch-action: none; }
.nl-grip-e { top: 72px; right: 0; bottom: 22px; width: 5px; cursor: ew-resize; }
.nl-grip-s { left: 22px; right: 22px; bottom: 0; height: 6px; cursor: ns-resize; }
.nl-grip-se { right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; }
.nl-grip-se::after { content: ""; position: absolute; right: 6px; bottom: 6px; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); border-radius: 0 0 4px 0; opacity: .75; }
.nl-grip-se:hover::after { border-color: var(--primary); opacity: 1; }
dialog.maxed .nl-grip { display: none; }
.dlg-h .nl-max { flex: none; }
@media (max-width: 860px) { .nl-grip, .dlg-h .nl-max { display: none; } }
/* a company in one window: its line now, as the routers see it, and how the map has it -- each section with its own button */
.nl-card-h { margin: 0; flex-wrap: wrap; }
.nl-card-h h3 { flex: 1; min-width: 0; }
.nl-card-btns { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.nl-card-btns .btn .ico { width: 15px; height: 15px; }
.nl-conn-more { margin-top: 2px; }
.nl-win .dlg-h { gap: 14px; }
.dlg-h .nl-back { flex: none; font-size: 18px; line-height: 1; }
/* a mast's / a device's window: its side panel, laid out wide -- sections in two columns, nothing folded */
.nl-obj .nl-obj-pic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.nl-obj .nl-obj-pic svg { width: 34px; height: 34px; }
.nl-obj .nl-obj-pic img { width: 36px; height: 36px; object-fit: contain; }
#dlg .nl-obj-b .insp { position: static; inset: auto; width: auto; height: auto; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; display: block; z-index: auto; }
#dlg .nl-obj-b .insp-in { display: block; padding: 0; columns: 2; column-gap: 32px; }
#dlg .nl-obj-b .insp-in > * { break-inside: avoid; }
#dlg .nl-obj-b .insp-in > .ih, #dlg .nl-obj-b .insp-in > .acts { display: none; }
#dlg .nl-obj-b .insp-in > .chips, #dlg .nl-obj-b .insp-in > .tiles, #dlg .nl-obj-b .insp-in > .note-row, #dlg .nl-obj-b .nl-acts-h, #dlg .nl-obj-b .nl-acts { column-span: all; }
#dlg .nl-obj-b .insp-in > .chips, #dlg .nl-obj-b .insp-in > .tiles { margin-bottom: 12px; }
#dlg .nl-obj-b .insp-in > .note-row { margin: 0 0 12px; }
#dlg .nl-obj-b .insp .sec { padding: 14px 0; }
#dlg .nl-obj-b .insp .sec h3 { font-size: 14px; }
#dlg .nl-obj-b .insp .kv { font-size: 13px; }
#dlg .nl-obj-b .insp .note-row, #dlg .nl-obj-b .insp .empty, #dlg .nl-obj-b .insp .bv-note { font-size: 12.5px; }
#dlg .nl-obj-b .insp .chip { font-size: 11.5px; }
#dlg .nl-obj-b .insp .li b { font-size: 13px; }
#dlg .nl-obj-b .insp .li small { font-size: 11.5px; }
#dlg .nl-obj-b .insp .acts .btn { font-size: 12px; }
#dlg .nl-obj-b .nl-site-subs .pic { display: grid; place-items: center; }
/* a station the way it is put together: the steps one under another, a line between them */
#dlg .nl-obj-b .insp-in > .st-chain, #dlg .nl-obj-b .insp-in > .ant-freq { column-span: all; }
.stc { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.stc-step { position: relative; padding-left: 0; }
.stc-step + .stc-step::before, .stc-link::before { content: ''; position: absolute; left: 21px; top: -10px; height: 10px; width: 2px; background: var(--line-strong); }
.stc-step + .stc-step { margin-top: 10px; }
.stc-card { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.stc-card:hover { border-color: var(--primary-line); }
.stc-no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 800; }
.stc-body > b { display: block; font-size: 13.5px; font-weight: 700; } .stc-body small b { font-weight: 650; color: var(--text); } .stc-body small { display: block; margin-top: 2px; color: var(--text-2); font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.stc-body i { color: var(--muted); font-style: normal; }
.stc-link { position: relative; margin-top: 10px; padding: 0 0 0 44px; color: var(--muted); font-size: 12px; }
.stc-link + .stc-step::before { top: -10px; }
.stc-warn { color: var(--amber); font-weight: 600; }
/* everyone a place gives to: across the window, just above what can be done; five rows show, the rest scroll */
#dlg .nl-obj-b .insp-in > .nl-site-subs { column-span: all; }
.nl-takers { max-height: 296px; overflow-y: auto; padding-right: 2px; }
.nl-takers .li { cursor: pointer; }
@media (max-width: 860px) { #dlg .nl-obj-b .insp-in { columns: 1; } }
.nl-head { flex: 1; min-width: 0; }
.nl-win .nl-head h2 { margin: 2px 0 0; overflow-wrap: anywhere; }
.nl-head p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nl-head-led { display: grid; place-items: center; width: 34px; flex: none; }
.nl-led { --led: #94a3b8; display: inline-block; width: 14px; height: 14px; flex: none; border-radius: 50%; background: var(--led); box-shadow: 0 0 0 3px color-mix(in srgb, var(--led) 22%, transparent), 0 0 10px color-mix(in srgb, var(--led) 65%, transparent); }
.nl-led.big { width: 22px; height: 22px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--led) 20%, transparent), 0 0 18px color-mix(in srgb, var(--led) 65%, transparent); }
.nl-led.is-green { --led: #22c55e; } .nl-led.is-blue { --led: #3b82f6; } .nl-led.is-yellow { --led: #f59e0b; } .nl-led.is-red { --led: #ef4444; }
.nl-led.is-none { box-shadow: none; opacity: .7; }
.nl-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.nl-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-bottom: 16px; }
.nl-top > .nl-card { align-content: start; }
.nl-way { margin-bottom: 4px; }
.nl-way .nl-link { padding-top: 14px; border-top: 1px solid var(--line); }
.nl-real { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.nl-real .nl-sub-h { margin: 0; }
.nl-real-ways { display: grid; gap: 6px; }
#nlPath:empty { display: none; }
.nl-card .kv .chip { min-height: 20px; padding: 0 8px; font-size: 11px; vertical-align: 1px; }
.nl-col { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (max-width: 860px) { .nl-grid, .nl-top { grid-template-columns: minmax(0, 1fr); } }
/* how the internet reaches the company: the places in frames, the antennas that really stand there, arrows between */
.nl-chain { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 4px; }
.nc-place { flex: 0 1 220px; display: grid; gap: 5px; align-content: start; min-width: 132px; padding: 8px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--panel-muted); }
.nc-place.is-src { border-style: solid; border-color: var(--primary-line); }
.nc-place.is-mine { border-style: solid; border-color: var(--green); background: var(--green-bg); }
.nc-name { color: var(--muted); font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.nc-name[data-ref] { cursor: pointer; } .nc-name[data-ref]:hover { color: var(--primary); text-decoration: underline; }
.nc-row { display: grid; gap: 2px; justify-items: stretch; }   /* in one place the antennas stand one under another: in, then out */
.nc-node { display: grid; justify-items: center; gap: 3px; min-width: 0; padding: 6px 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; text-align: center; }   /* the picture, and under it the name */
.nc-node > span:last-child { min-width: 0; max-width: 100%; }
button.nc-node { cursor: pointer; } button.nc-node:hover { border-color: var(--primary); }
.nc-node .pic { width: 44px; height: 36px; display: grid; place-items: center; }
.nc-node .pic svg, .nc-node .pic img { width: 42px; height: 34px; }
.nc-node > .ico { width: 22px; height: 22px; margin: 4px 0; color: var(--primary); }
.nc-node b { display: block; font-size: 12px; font-weight: 600; line-height: 1.25; overflow-wrap: break-word; }
.nc-node small { display: block; color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-node small.nc-role { color: var(--text-2); font-weight: 600; white-space: normal; }
.nc-node.down { border-color: var(--red); background: var(--red-bg); } .nc-node.down small { color: var(--red); }
.nc-wire { border-style: dashed; }
.nc-arrow { justify-self: center; color: var(--muted-2); font-style: normal; font-weight: 700; line-height: 1; rotate: 90deg; }
.nc-link { flex: 1 1 56px; max-width: 260px; display: grid; justify-items: stretch; align-content: center; gap: 4px; min-width: 56px; padding: 0 4px; color: var(--muted); }
.nc-link i { position: relative; display: block; height: 2px; margin-right: 4px; border-radius: 1px; background: var(--primary-line); font-size: 0; }
.nc-link i::after { content: ""; position: absolute; right: -5px; top: 50%; translate: 0 -50%; border: 5px solid transparent; border-right-width: 0; border-left-color: var(--primary); }
.nc-link small { order: -1; font-size: 10.5px; line-height: 1.25; text-align: center; font-variant-numeric: tabular-nums; }
.nc-warn { color: var(--amber); font-size: 11px; font-weight: 600; }
/* the air around the company's antenna: its channel on the band, as a channel plan shows it */
.na-plan { display: grid; gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.na-plan-h { display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 700; } .na-plan-h small { color: var(--muted); font-weight: 500; }
.na-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 6px; }
.na-bw { color: var(--muted); font-size: 11px; }
.na-cells { display: grid; gap: 3px; }
.na-cell { display: grid; place-items: center; min-width: 0; height: 22px; border-radius: 5px; font-size: 10px; font-weight: 700; font-style: normal; font-variant-numeric: tabular-nums; overflow: hidden; cursor: default; }
.na-cell.is-free { background: rgba(34, 197, 94, .22); color: var(--green); }
.na-cell.is-side { background: rgba(245, 158, 11, .32); color: var(--amber); }
.na-cell.is-busy { background: rgba(239, 68, 68, .30); color: var(--red); }
.na-cell.is-mine { box-shadow: inset 0 0 0 2px var(--primary); }
.na-cell.is-now { background: var(--primary); color: #fff; box-shadow: none; }
/* the air over the plan: the band slice by slice, the way a spectrum is read -- green clear, red taken */
.na-rf { align-items: start; } .na-rf .na-bw { padding-top: 9px; }
.na-fine { display: grid; column-gap: 0; row-gap: 3px; min-width: 0; }
.na-s { grid-row: 2; min-width: 0; height: 18px; margin-inline: .5px; border-radius: 1.5px; font-style: normal; }
.na-fine .na-s:nth-of-type(even) { opacity: .84; }   /* the stripes of a spectrum */
.na-s.l0, .na-dot.l0 { background: #22c55e; } .na-s.l1, .na-dot.l1 { background: #a3e635; } .na-s.l2, .na-dot.l2 { background: #facc15; }
.na-s.l3, .na-dot.l3 { background: #fb923c; } .na-s.l4, .na-dot.l4 { background: #ef4444; }
.na-mark { grid-row: 1; height: 5px; border-radius: 3px; background: var(--primary); }
.na-at { display: inline-flex; align-items: baseline; gap: 5px; min-width: 0; color: var(--muted); font-size: 11px; }
.na-at b { color: var(--text); font-size: 12px; font-weight: 700; } .na-at small { font-size: 11px; }
.na-at.one { grid-row: 3; display: grid; gap: 0; justify-self: start; white-space: nowrap; } .na-at.one.end { justify-self: end; text-align: right; }
.na-at.one b { font-size: 13px; }
.na-ats { grid-row: 3; display: flex; flex-wrap: wrap; gap: 3px 14px; min-width: 0; }
.na-dot { flex: none; align-self: center; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.na-st.l0 { color: var(--green); } .na-st.l1, .na-st.l2 { color: var(--amber); } .na-st.l3, .na-st.l4 { color: var(--red); }
.na-scale { display: inline-flex; gap: 1px; } .na-scale .na-s { width: 5px; height: 12px; margin: 0; }
.na-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; color: var(--muted); font-size: 11px; }
.na-legend span { display: inline-flex; align-items: center; gap: 5px; } .na-legend .na-cell { width: 16px; height: 12px; border-radius: 3px; }
/* a mast's plan: across the whole window; in the narrow side panel it is swiped sideways */
#dlg .nl-obj-b .insp-in > .na-site { column-span: all; }
.na-site .na-plan { overflow-x: auto; margin-top: 8px; }
.na-site .na-plan > * { min-width: 520px; }
/* a phone: the plan keeps its width and is swiped sideways -- 25 channels do not fit a narrow screen */
@media (max-width: 700px) { .na-plan { overflow-x: auto; } .na-plan > * { min-width: 600px; } }
.nl-card { display: grid; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.nl-card h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0; font-size: 14px; }
.nl-card h3 small { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.nl-card .kv { font-size: 13px; grid-template-columns: 110px minmax(0, 1fr); }
.nl-card .note-row { margin-top: 0; font-size: 12.5px; }
.nl-card .note-row .btn { flex: none; }
#nlLive { display: grid; gap: 12px; }
#nlMatch:empty { display: none; }
.nl-now { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--panel-muted); }
.nl-now b { display: block; font-size: 15px; }
.nl-now span { display: block; color: var(--text-2); font-size: 12.5px; }
.nl-now small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.nl-now.is-green { background: var(--green-bg); } .nl-now.is-red { background: var(--red-bg); } .nl-now.is-yellow { background: var(--amber-bg); }
.nl-now.is-blue { background: color-mix(in srgb, #3b82f6 12%, transparent); }
.nl-rates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nl-rate { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; }
.nl-rate span { color: var(--muted); font-size: 11.5px; }
.nl-rate b { font-size: 18px; }
.nl-rate small { color: var(--muted); font-size: 11px; }
.nl-bar { display: block; height: 6px; margin-top: 5px; overflow: hidden; border-radius: 99px; background: var(--panel-muted); }
.nl-bar em { display: block; height: 100%; border-radius: inherit; background: #22c55e; }
.nl-bar.is-high em { background: #f59e0b; } .nl-bar.is-full em { background: #3b82f6; }
.nl-sub-h { margin-top: 2px; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.nl-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nl-path > i { color: var(--muted-2); font-style: normal; }
.nl-hop { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-muted); font-size: 12.5px; font-weight: 600; }
.nl-hop .ico { width: 15px; height: 15px; flex: none; color: var(--primary); }
.nl-hop small { display: block; color: var(--muted); font-size: 10.5px; font-weight: 500; }
.nl-hop em { color: var(--muted); font-style: normal; font-weight: 500; }
.nl-hop.down { border-color: transparent; background: var(--red-bg); color: var(--red); }
.nl-hop.down .ico { color: var(--red); }
.nl-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
.nl-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.nl-table th { padding: 8px 10px; background: var(--panel-muted); color: var(--muted); font-size: 11px; font-weight: 600; text-align: left; white-space: nowrap; }
.nl-table td { padding: 8px 10px; border-top: 1px solid var(--line); white-space: nowrap; }
.nl-table .mono { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; }
.nl-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #ef4444; vertical-align: middle; }
.nl-dot.on { background: #22c55e; } .nl-dot.idle { background: #94a3b8; }
.nl-note { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.nl-acts-h { margin: 20px 0 10px; font-size: 14px; }
.nl-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.nl-act { display: flex; align-items: flex-start; gap: 11px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.nl-act:hover { border-color: var(--primary-line); background: var(--primary-soft); }
.nl-act:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.nl-act .ico { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--primary); }
.nl-act b { display: block; font-size: 13px; }
.nl-act > span { min-width: 0; }
.nl-act small { display: block; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 11.5px; line-height: 1.45; white-space: nowrap; text-overflow: ellipsis; }
.nl-act.primary { border-color: var(--primary-line); background: var(--primary-soft); }
.nl-act.danger .ico, .nl-act.danger b { color: var(--red); }
.nl-act.danger:hover { border-color: var(--red); background: var(--red-bg); }
@media (max-width: 560px) { .nl-rates { grid-template-columns: minmax(0, 1fr); } .nl-acts { grid-template-columns: minmax(0, 1fr); } .nl-card { padding: 13px; } }
/* the frequencies page: each station's picture of the air folded until its header is clicked */
.freq-card .fc-h[data-fc-toggle] { cursor: pointer; border-radius: 10px; }
.freq-card .fc-h[data-fc-toggle]:hover { background: var(--panel-muted); }
.freq-card .fc-h[data-fc-toggle]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.fc-chev { flex: none; display: inline-block; margin-right: 6px; color: var(--muted); transition: transform .15s; }
.freq-card.open .fc-chev { transform: rotate(90deg); }
.fc-spec { margin: 8px 0 10px; }
.fc-spec .spec { max-width: 1100px; }

/* a mast's antenna group with nothing in it: its title only -- still a place to drop an antenna on */
.sec.role-empty .list { display: none; }
.sec.role-empty .sec-h h3 { color: var(--muted); }
/* the channel plan in a mast's window: folded until looked at */
details.na-fold > summary { cursor: pointer; color: var(--muted); font-size: 12.5px; font-weight: 700; }
details.na-fold[open] > summary { margin-bottom: 4px; }

/* a window's figures (how many devices, what they are worth): a line of small tiles, not two big blocks */
#dlg .nl-obj-b .insp-in > .tiles { display: flex; flex-wrap: wrap; gap: 8px; }
#dlg .nl-obj-b .insp-in > .tiles .tile { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 12px; border-radius: 10px; }
#dlg .nl-obj-b .insp-in > .tiles .tile b { font-size: 16px; }
#dlg .nl-obj-b .insp-in > .tiles .tile span { font-size: 12.5px; }
/* how a station is put together: on a wide window its four steps side by side, in order */
#dlg .nl-obj-b .st-chain { container-type: inline-size; }
@container (min-width: 760px) {
  .stc { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .stc-step + .stc-step { margin-top: 0; }
  .stc-step + .stc-step::before, .stc-link::before { display: none; }
  .stc-card { height: 100%; }
  .stc-link { grid-column: 1 / -1; grid-row: 2; margin-top: 0; padding: 0; }
}

/* a long list's rest, folded: "all -- N more" */
details.rows-more > summary { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin: 2px 0; padding: 5px 10px; border-radius: 8px; color: var(--primary); font-size: 12.5px; font-weight: 600; cursor: pointer; list-style: none; }
details.rows-more > summary::-webkit-details-marker { display: none; }
details.rows-more > summary::after { content: "▾"; font-size: 11px; transition: rotate .15s; }
details.rows-more[open] > summary::after { rotate: 180deg; }
details.rows-more > summary:hover { background: var(--primary-soft); }
details.rows-more > .list { display: grid; gap: inherit; }
@media (prefers-reduced-motion: reduce) { details.rows-more > summary::after { transition: none; } }

/* a mast's antenna row: what it said by SNMP (a light and a word), what its channel clashes with */
.li small.ant-snmp { display: flex; align-items: center; gap: 6px; margin-top: 2px; white-space: normal; }
.ant-snmp i { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.ant-snmp.ok { color: var(--green); } .ant-snmp.ok i { background: var(--green); }
.ant-snmp.warn { color: var(--amber); } .ant-snmp.warn i { background: var(--amber); }
.li small.ant-clash { margin-top: 2px; color: var(--red); font-weight: 600; white-space: normal; }
.li small.ant-clash.warn { color: var(--amber); font-weight: 500; }
.bv-note.snmp-how { color: var(--amber); }
/* the band's plan, folded: its free channels in its title */
.na-free { margin-left: 8px; font-weight: 500; color: var(--muted); }
.na-free b { color: var(--text-2); font-weight: 650; }
