:root {
  color-scheme: light;
  --page: #eef4f8;
  --surface: #ffffff;
  --surface-soft: #f7fafc;
  --text: #000000;
  --muted: #000000;
  --line: #d9e3ea;
  --green: #12866b;
  --green-soft: #e4f5ef;
  --blue: #176f9f;
  --blue-soft: #e8f4fa;
  --amber: #b77712;
  --red: #cf3f4e;
  --shadow: 0 18px 46px rgba(31, 49, 66, .12);
  --drawer-width: 330px;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #101820;
  --surface: #17212b;
  --surface-soft: #1f2b36;
  --text: #f2f7fb;
  --muted: #d7e2ea;
  --line: #324250;
  --green: #54d69f;
  --green-soft: #17392f;
  --blue: #78c7f2;
  --blue-soft: #183244;
  --amber: #f4bd4f;
  --red: #ff6b7d;
  --shadow: 0 18px 46px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 12%, rgba(23, 111, 159, .10), transparent 32%),
    radial-gradient(circle at 84% 84%, rgba(18, 134, 107, .10), transparent 32%),
    linear-gradient(180deg, #fbfdff, var(--page));
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 16% 12%, rgba(120, 199, 242, .12), transparent 30%),
    radial-gradient(circle at 84% 84%, rgba(84, 214, 159, .10), transparent 30%),
    linear-gradient(180deg, #0d141b, var(--page));
}

h1, h2, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.08; }
h2 { font-size: 20px; line-height: 1.2; }

button,
.button,
input {
  font: inherit;
}

button,
.button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button:hover,
.button:hover {
  border-color: #9fc2d4;
  background: var(--blue-soft);
}

button.active {
  border-color: #7bc5ad;
  background: var(--green-soft);
  color: var(--green);
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell { min-height: 100vh; }

.simple-dashboard {
  width: calc(100% - 36px);
  max-width: none;
  margin: 0 auto;
  padding: 18px 0 34px;
  transition: width .18s ease, margin-left .18s ease;
}

.simple-dashboard.menu-visible {
  width: calc(100% - var(--drawer-width) - 54px);
  max-width: none;
  margin-left: calc(var(--drawer-width) + 18px);
  margin-right: 18px;
}

.simple-header {
  min-height: 66px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-toggle {
  width: 44px;
  min-height: 44px;
  padding: 0;
  background: var(--surface);
}

.mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #b7d8cd;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
}

.brand-lockup span,
.simple-panel-head span,
.summary-card span,
.node-table-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.simple-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.simple-actions > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.side-menu {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  width: var(--drawer-width);
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: 28px 0 70px rgba(31, 49, 66, .22);
  transform: translateX(-105%);
  transition: transform .18s ease;
}

.side-menu.open {
  transform: translateX(0);
}

.side-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.side-menu-head strong {
  font-size: 22px;
}

.side-menu-head button {
  width: 40px;
  min-height: 40px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.side-menu-nav {
  display: grid;
  gap: 8px;
}

.side-menu-nav button {
  justify-content: flex-start;
}

.theme-switch {
  flex: 0 0 auto;
  width: 148px;
  height: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .62);
}

.theme-switch button {
  min-width: 0;
  min-height: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  gap: 5px;
  justify-content: center;
  padding: 0 8px;
  line-height: 1;
}

.theme-switch button.active {
  background: var(--green);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 126, 111, .20);
}

.theme-switch button + button {
  border-left: 0;
}

.theme-dot {
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: transparent;
}

.theme-switch button[data-theme-choice="dark"] .theme-dot {
  background: currentColor;
}

.side-dashboard-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.side-dashboard-list > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.side-dashboard-list button {
  min-height: 52px;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 2px;
  display: grid;
  text-align: left;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.side-dashboard-list button b {
  font-size: 13px;
  line-height: 1.1;
}

.side-dashboard-list button small,
.side-dashboard-list p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.side-dashboard-list button.active {
  border-color: rgba(0, 126, 111, .45);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.side-logout {
  align-self: end;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.dashboard-shortcuts {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: -2px 0 12px;
}

.dashboard-shortcuts button {
  min-width: 150px;
}

.ops-dashboard {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 88%, var(--page));
  box-shadow: var(--shadow);
}

.ops-dashboard-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 4px 0;
}

.ops-dashboard-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 280px;
}

.dashboard-layout-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.dashboard-layout-switch button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-layout-switch button.active {
  background: var(--green);
  color: #fff;
}

.ops-dashboard-head span,
.ops-network-strip > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ops-dashboard-head p {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.ops-repeater-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 12px;
}

.ops-list {
  overflow-x: auto;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.ops-list-head,
.ops-list-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.15fr) 78px 92px minmax(230px, .9fr) 96px 132px minmax(270px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 1120px;
  padding: 8px 10px;
}

.ops-list-head {
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.ops-list-row {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.ops-list-row:last-child { border-bottom: 0; }

.ops-list-row::before,
.ops-split-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #9aa4b2;
}

.ops-list-row.idle::before,
.ops-split-item.idle::before { background: #16a36f; }
.ops-list-row.rx::before,
.ops-split-item.rx::before { background: #d99716; }
.ops-list-row.tx::before,
.ops-split-item.tx::before { background: #d63649; }
.ops-list-row.offline::before,
.ops-split-item.offline::before { background: #9aa4b2; }

.ops-list-node {
  min-height: auto;
  display: grid;
  justify-items: start;
  gap: 2px;
  padding: 2px 0 2px 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.ops-list-node b,
.ops-split-item b { font-size: 15px; }

.ops-list-node span,
.ops-split-item span,
.ops-split-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.ops-list-status,
.ops-list-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ops-list-actions { flex-wrap: wrap; }

.ops-list-actions button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 11px;
}

.ops-list-status .ops-status,
.ops-list-status .ops-signal-icon {
  width: 38px;
  min-height: 36px;
  padding: 4px;
  border-radius: 8px;
}

.ops-list-status .ops-status b { font-size: 10px; }
.ops-list-status .ops-power-icon { width: 20px; height: 20px; }
.ops-list-status .ops-signal-icon svg { width: 20px; height: 20px; }
.ops-list-status .ops-signal-text { width: 24px; height: 20px; font-size: 12px; }

.ops-split {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.ops-split-list {
  display: grid;
  gap: 6px;
}

.ops-split-item {
  position: relative;
  min-height: 64px;
  display: grid;
  justify-items: start;
  gap: 2px;
  padding: 9px 10px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.ops-split-item.active {
  border-color: color-mix(in srgb, var(--green) 55%, var(--line));
  background: color-mix(in srgb, var(--green-soft) 62%, var(--surface));
}

.ops-split-detail .ops-repeater-card {
  min-height: 100%;
}

.ops-repeater-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  min-height: 330px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, var(--green)) 0%, var(--surface) 70%),
    var(--surface);
  box-shadow: 0 16px 34px rgba(31, 49, 66, .10);
}

.ops-repeater-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #9aa4b2;
}

.ops-repeater-card.idle::before { background: #16a36f; }
.ops-repeater-card.rx::before { background: #d99716; }
.ops-repeater-card.tx::before { background: #d63649; }
.ops-repeater-card.beacon::before,
.ops-repeater-card.both::before { background: #16a36f; }
.ops-repeater-card.warn::before { background: #d99716; }
.ops-repeater-card.offline::before { background: #9aa4b2; }

:root[data-theme="dark"] .ops-repeater-card {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 86%, var(--green)) 0%, var(--surface) 72%),
    var(--surface);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .24);
}

.ops-repeater-card.expired {
  opacity: .78;
}

.ops-repeater-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.ops-repeater-card header button {
  min-height: auto;
  display: grid;
  justify-content: start;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.ops-repeater-card header b {
  font-size: 22px;
  line-height: 1.1;
}

.ops-repeater-card header span,
.ops-repeater-card header small,
.ops-repeater-card footer span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ops-card-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--green-soft) 55%, var(--surface));
}

.ops-card-hero span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ops-card-hero b {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 30px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.ops-card-hero > div:last-child {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 74px;
}

.ops-status-grid,
.ops-command-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.ops-status {
  min-height: 72px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  text-align: center;
  color: #758392;
}

.ops-status.online { border-color: color-mix(in srgb, var(--green) 42%, var(--line)); }
.ops-status.warn { border-color: color-mix(in srgb, var(--amber) 46%, var(--line)); }
.ops-status.offline { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }

.ops-status.online,
.ops-status.warn,
.ops-status.offline {
  border-color: var(--line);
}

.ops-status b {
  font-size: 13px;
  color: currentColor;
}

.ops-status.power svg,
.ops-power-icon {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ops-status.online.power {
  color: var(--green);
}

.ops-status.online {
  color: var(--green);
}

.ops-status.warn {
  color: var(--amber);
}

.ops-status.offline {
  color: #758392;
}

.ops-status.offline.power {
  color: #758392;
}

.ops-signal-icon {
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: #758392;
}

.ops-signal-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ops-signal-text {
  display: grid;
  place-items: center;
  width: 36px;
  height: 28px;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

.ops-signal-icon.active.tx,
.ops-signal-icon.active.beacon {
  border-color: color-mix(in srgb, var(--red) 48%, var(--line));
  background: color-mix(in srgb, var(--red) 10%, var(--surface));
  color: var(--red);
}

.ops-signal-icon.active.rx {
  border-color: color-mix(in srgb, var(--amber) 55%, var(--line));
  background: color-mix(in srgb, var(--amber) 13%, var(--surface));
  color: #c77b00;
}

:root[data-theme="dark"] .ops-signal-icon {
  color: #8ea0ad;
}

:root[data-theme="dark"] .ops-signal-icon.active.tx,
:root[data-theme="dark"] .ops-signal-icon.active.beacon {
  background: rgba(214, 54, 73, .16);
}

:root[data-theme="dark"] .ops-signal-icon.active.rx {
  background: rgba(217, 151, 22, .18);
  color: #f0a91e;
}

.ops-command-grid button {
  min-height: 48px;
  padding: 0 8px;
  border-color: color-mix(in srgb, var(--blue) 26%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 54%, var(--surface));
  font-size: 12px;
}

.ops-command-grid button:hover {
  border-color: var(--blue);
}

.ops-command-grid button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.ops-repeater-card footer,
.ops-card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-self: end;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.ops-card-meta div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.ops-repeater-card footer b,
.ops-card-meta b {
  min-width: 0;
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ops-network-strip {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.ops-network-strip > div {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.summary-card,
.simple-panel,
.login-stage {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-card {
  min-height: 108px;
  padding: 15px;
}

:root[data-theme="dark"] .node-command-hero,
:root[data-theme="dark"] .repeater-focus {
  background: linear-gradient(135deg, #142230 0%, #1b382f 100%);
}

:root[data-theme="dark"] .active-tg-card {
  background: #162734;
  border-color: #386a5d;
}

:root[data-theme="dark"] .radial-gauge {
  background: var(--surface-soft);
}

:root[data-theme="dark"] .radial-gauge b,
:root[data-theme="dark"] .radial-gauge small,
:root[data-theme="dark"] .leaflet-popup-content,
:root[data-theme="dark"] .map-summary strong,
:root[data-theme="dark"] .repeater-marker-label b,
:root[data-theme="dark"] .repeater-marker-label span {
  color: var(--text);
}

:root[data-theme="dark"] .simple-panel-head,
:root[data-theme="dark"] .node-table-head {
  background: #0f1821;
  border-color: #314250;
}

:root[data-theme="dark"] .node-table-head span {
  color: #f2f7fb;
}

:root[data-theme="dark"] .node-row-clickable:hover,
:root[data-theme="dark"] .user-row.selected {
  background: #1d303c;
}

:root[data-theme="dark"] .user-row.suspended {
  background: #372a18;
}

:root[data-theme="dark"] .user-row.suspended b {
  color: #ffd37a;
}

:root[data-theme="dark"] .active-tg-hero {
  background: linear-gradient(135deg, #143327 0%, #11242d 100%);
  border-color: #3e8b72;
}

:root[data-theme="dark"] .active-tg-hero span,
:root[data-theme="dark"] .active-tg-hero b,
:root[data-theme="dark"] .active-tg-hero small,
:root[data-theme="dark"] .ping-level b,
:root[data-theme="dark"] .ping-level span,
:root[data-theme="dark"] .ping-level small,
:root[data-theme="dark"] .rf-chain small,
:root[data-theme="dark"] .node-info-actions small,
:root[data-theme="dark"] .node-info-actions span {
  color: var(--text);
}

:root[data-theme="dark"] .active-tg-hero.unknown {
  background: #1b2732;
  border-color: var(--line);
}

:root[data-theme="dark"] .node-signal-band article,
:root[data-theme="dark"] .rf-chain article,
:root[data-theme="dark"] .repeater-leaflet-icon span {
  background: var(--surface);
}

:root[data-theme="dark"] .radial-gauge::before {
  background:
    radial-gradient(circle, #1f2b36 0 53%, transparent 54%),
    conic-gradient(var(--gauge-color) calc(var(--value) * 1%), #334553 0);
}

:root[data-theme="dark"] .ping-level i {
  background: #334553;
}

:root[data-theme="dark"] .node-info-editor .form-stack label {
  color: #071018;
}

:root[data-theme="dark"] .node-info-editor .form-stack input,
:root[data-theme="dark"] .node-info-editor .form-stack select {
  background: #eef3f7;
  border-color: #9eb1bf;
  color: #071018;
}

:root[data-theme="dark"] .node-info-editor .form-stack input:disabled,
:root[data-theme="dark"] .node-info-editor .form-stack select:disabled {
  background: #dde7ee;
  color: #24313b;
}

:root[data-theme="dark"] .node-info-editor .simple-panel-head span,
:root[data-theme="dark"] .node-info-editor .simple-panel-head h2,
:root[data-theme="dark"] .node-info-editor .simple-panel-head p,
:root[data-theme="dark"] .node-info-editor .node-info-actions small,
:root[data-theme="dark"] .node-info-editor .node-info-actions span {
  color: #071018;
}

:root[data-theme="dark"] .node-info-editor {
  background: #f3f7fa;
}

:root[data-theme="dark"] .node-info-editor .simple-panel-head {
  background: #e4edf3;
}

.summary-card b {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.summary-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.4;
}

.summary-state {
  min-height: 40px;
  display: flex;
  align-items: center;
  margin-top: 12px;
}

.summary-status-card .status-led {
  width: 44px;
  height: 28px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, .85fr);
  gap: 12px;
  margin-bottom: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.metric-tile {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 14px;
  background: var(--surface);
}

.metric-tile span,
.status-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.metric-tile b {
  color: var(--blue);
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric-tile small {
  color: var(--muted);
  line-height: 1.35;
}

.status-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.status-list.compact {
  gap: 0;
}

.status-row {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  padding: 14px 18px;
  background: var(--surface);
}

.status-row b {
  color: var(--text);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.status-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.simple-panel {
  overflow: hidden;
}

.simple-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
}

.simple-panel-head p {
  color: var(--muted);
  font-size: 13px;
}

.node-table {
  display: grid;
  overflow-x: auto;
}

.node-table-head,
.node-row {
  display: grid;
  grid-template-columns:
    minmax(190px, 1.4fr)
    76px
    minmax(168px, .85fr)
    78px
    42px
    76px
    42px
    86px
    132px;
  gap: 6px;
  align-items: center;
  min-width: 940px;
}

.node-table-head {
  min-height: 42px;
  padding: 0 12px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.node-table-head span {
  letter-spacing: .03em;
  white-space: nowrap;
}

.node-row {
  min-height: 64px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.node-row-clickable {
  transition: background .16s ease;
}

.node-row-clickable:hover {
  background: #f6fafc;
}

.node-open {
  min-height: auto;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  box-shadow: none;
}

.node-open:hover {
  background: transparent;
  border-color: transparent;
}

.node-row:last-child {
  border-bottom: 0;
}

.node-row b,
.node-row small,
.node-row span,
.node-row code,
.node-row strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.node-row b {
  color: var(--text);
  font-size: 15px;
}

.node-row small,
.node-row span,
.node-row code {
  color: var(--muted);
  font-size: 13px;
}

.node-row code {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.node-table-head span:nth-child(4),
.node-table-head span:nth-child(5),
.node-table-head span:nth-child(6),
.node-table-head span:nth-child(7),
.node-row > span:nth-child(4),
.node-row > span:nth-child(6) {
  text-align: center;
}

.node-row > .status-led:nth-child(5),
.node-row > .status-led:nth-child(7) {
  justify-self: center;
}

.node-row > span:nth-child(6),
.node-row > span:nth-child(8),
.node-row > span:nth-child(9) {
  white-space: normal;
  overflow-wrap: anywhere;
}

.node-row strong {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: #edf1f5;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.node-row strong.ok {
  background: var(--green-soft);
  color: var(--green);
}

.node-row strong.warn {
  background: #fff3d8;
  color: var(--amber);
}

.status-led {
  width: 22px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  position: relative;
  cursor: help;
}

.status-led i {
  width: 12px;
  height: 12px;
  display: block;
  border-radius: 999px;
  background: #7b8794;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16), 0 0 0 4px rgba(123, 135, 148, .14);
}

.status-led.online i {
  background: #16a36f;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), 0 0 0 4px rgba(22, 163, 111, .16);
}

.status-led.warn i {
  background: #d99716;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), 0 0 0 4px rgba(217, 151, 22, .16);
}

.status-led.offline i {
  background: #d63649;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), 0 0 0 4px rgba(214, 54, 73, .16);
}

.status-led.unknown i {
  background: #9aa4b2;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), 0 0 0 4px rgba(154, 164, 178, .12);
}

.node-command-hero {
  min-height: 108px;
  display: grid;
  grid-template-columns: minmax(240px, .9fr) minmax(190px, .48fr) minmax(320px, .95fr) auto;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 10px;
}

.node-identity,
.active-tg-hero,
.node-hero-status,
.node-signal-band,
.node-command-hero .node-console-actions {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.active-tg-hero {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fffef8 0%, #f1fbf7 100%);
  border-color: #8bcfbb;
}

.active-tg-hero span {
  color: #0f513f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.active-tg-hero b {
  color: #073b30;
  font-size: 34px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.active-tg-hero small {
  color: #111;
  font-size: 12px;
  font-weight: 800;
}

.active-tg-hero.unknown {
  background: #f5f6f8;
  border-color: var(--line);
}

.active-tg-hero.unknown b {
  color: #6b7280;
}

.node-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.node-identity button {
  min-height: 36px;
  padding: 0 12px;
}

.node-identity span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.node-identity h2 {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  margin: 4px 0;
}

.node-identity p {
  color: var(--text);
  font-size: 14px;
}

.node-hero-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.node-hero-status .status-chip {
  min-height: 100%;
}

.node-command-hero .node-console-actions {
  min-width: 150px;
  display: grid;
  place-items: center;
  padding: 14px;
}

.node-quick-commands {
  display: grid;
  grid-template-columns: minmax(130px, .18fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.node-quick-commands > div:first-child {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  padding: 6px 8px;
}

.node-quick-commands > div:first-child span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.node-quick-commands > div:first-child b {
  color: var(--text);
  font-size: 17px;
  line-height: 1.05;
}

.node-quick-commands.read-only p {
  display: grid;
  align-content: center;
  min-height: 42px;
  color: var(--muted);
  font-weight: 750;
}

.node-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.node-tabs button {
  min-height: 36px;
  flex: 0 0 auto;
  border-radius: 8px;
  font-size: 13px;
}

.node-tabs button.active {
  border-color: #12866b;
  background: #12866b;
  color: #fff;
}

.node-signal-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 10px;
  background: var(--line);
}

.node-signal-band article {
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
  background: #fff;
}

.node-signal-band span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.node-signal-band b {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.node-signal-band-compact article {
  min-height: 56px;
}

.node-cockpit-grid,
.node-operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .75fr);
  gap: 10px;
  margin-bottom: 10px;
}

.node-cockpit-grid-secondary {
  grid-template-columns: minmax(0, .95fr) minmax(360px, .9fr);
}

.node-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .7fr);
  gap: 10px;
  margin-bottom: 10px;
}

.gauge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
}

.gauge-grid-compact {
  gap: 8px;
  padding: 12px;
}

.gauge-grid-compact .radial-gauge {
  min-height: 126px;
  padding: 10px;
}

.radial-gauge {
  min-height: 154px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.radial-gauge::before {
  content: "";
  grid-area: 1 / 1;
  width: 96px;
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle, #fff 0 53%, transparent 54%),
    conic-gradient(var(--gauge-color) calc(var(--value) * 1%), #dce7ee 0);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
}

.radial-gauge div {
  grid-area: 1 / 1;
  z-index: 1;
  display: grid;
  place-items: center;
}

.radial-gauge b {
  color: #000;
  font-size: 23px;
  line-height: 1;
}

.radial-gauge small,
.radial-gauge span {
  color: #000;
  font-weight: 850;
}

.radial-gauge span {
  font-size: 12px;
  text-transform: uppercase;
}

.radial-gauge.online { --gauge-color: #16a36f; }
.radial-gauge.warn { --gauge-color: #d99716; }
.radial-gauge.offline { --gauge-color: #d63649; }
.radial-gauge.unknown { --gauge-color: #9aa4b2; }

.ping-levels {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
}

.ping-level {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.ping-level div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.ping-level b,
.ping-level span,
.ping-level small {
  color: #000;
}

.ping-level i {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce7ee;
}

.ping-level i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--value) * 1%);
  border-radius: inherit;
  background: var(--ping-color);
}

.ping-level small {
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.ping-level.online { --ping-color: #16a36f; }
.ping-level.warn { --ping-color: #d99716; }
.ping-level.offline { --ping-color: #d63649; }
.ping-level.unknown { --ping-color: #9aa4b2; }

.node-audio-panel {
  min-height: 100%;
}

.audio-live-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px 12px;
  border-top: 1px solid var(--line);
}

.audio-live-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.audio-live-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.audio-live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.node-audio-panel audio {
  width: calc(100% - 36px);
  margin: 0 18px 12px;
}

.audio-service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 18px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.audio-service-grid > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  background: var(--surface-soft);
}

.audio-service-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.audio-service-grid b {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.audio-service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
}

.audio-service-actions button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.audio-readonly {
  padding-bottom: 12px;
}

.node-audio-panel .mini {
  padding: 0 18px 16px;
  color: var(--muted);
}

.node-operations-grid {
  grid-template-columns: minmax(320px, .75fr) minmax(0, 1.25fr);
}

.command-stack-compact {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(160px, .75fr) minmax(180px, .85fr) minmax(240px, 1fr);
  gap: 8px;
  align-items: start;
}

.command-stack-compact > div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.command-stack-compact b {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-stack-compact .command-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.command-stack-compact .command-buttons button {
  min-height: 31px;
  padding: 0 9px;
  font-size: 12px;
}

.node-timeline-panel-compact {
  margin-bottom: 10px;
}

.event-list-compact {
  max-height: 260px;
  overflow: auto;
}

.node-site-panel {
  margin-bottom: 10px;
}

.site-info-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.site-field {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.site-field span,
.rf-chain > span,
.map-node-row > div span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.site-field b {
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.rf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 18px 18px;
}

.rf-chain {
  display: grid;
  gap: 8px;
}

.rf-chain article {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.rf-chain small {
  color: #000;
  line-height: 1.35;
}

.node-info-editor {
  margin-bottom: 10px;
}

.node-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
}

.node-info-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.node-info-actions small,
.node-info-actions span {
  color: #000;
  line-height: 1.4;
}

.map-panel {
  margin-bottom: 12px;
}

.map-layout {
  display: block;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
}

.map-shell {
  position: relative;
  min-width: 0;
}

.map-shell:fullscreen {
  display: grid;
  width: 100vw;
  height: 100vh;
  padding: 14px;
  background: var(--page);
}

.map-shell:fullscreen .map-canvas {
  min-height: 100%;
}

.map-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
}

.map-controls select {
  min-height: 38px;
  min-width: 138px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
}

.map-controls button {
  min-height: 38px;
}

.map-canvas {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid #b7cedb;
  border-radius: 10px;
  background: #eef4f7;
}

.leaflet-repeater-map {
  z-index: 0;
}

.repeater-leaflet-icon {
  background: transparent;
  border: 0;
}

.tg-network-line {
  filter: drop-shadow(0 3px 5px rgba(20, 36, 55, .32));
}

.tg-network-line-halo {
  filter: drop-shadow(0 2px 4px rgba(20, 36, 55, .16));
  stroke-linecap: round;
}

.repeater-leaflet-icon span {
  --marker-color: #8a97a6;
  --marker-ring: rgba(138, 151, 166, .26);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  border: 2px solid var(--marker-color);
  box-shadow: 0 8px 18px rgba(20, 36, 55, .24), 0 0 0 6px var(--marker-ring);
}

.repeater-leaflet-icon svg {
  width: 25px;
  height: 25px;
  display: block;
}

.repeater-leaflet-icon .marker-line,
.repeater-leaflet-icon .tower-line {
  fill: none;
  stroke: var(--marker-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.repeater-leaflet-icon .marker-fill,
.repeater-leaflet-icon .tower-node {
  fill: var(--marker-color);
}

.repeater-leaflet-icon .idle {
  --marker-color: #25a95a;
  --marker-ring: rgba(37, 169, 90, .22);
}

.repeater-leaflet-icon .rx {
  --marker-color: #e2b21a;
  --marker-ring: rgba(226, 178, 26, .28);
}

.repeater-leaflet-icon .tx {
  --marker-color: #dc2f35;
  --marker-ring: rgba(220, 47, 53, .26);
}

.repeater-leaflet-icon .beacon {
  --marker-color: #dc2f35;
  --marker-ring: rgba(220, 47, 53, .30);
}

.repeater-leaflet-icon .both {
  --marker-color: #b029c0;
  --marker-ring: rgba(176, 41, 192, .26);
}

.repeater-leaflet-icon .warn {
  --marker-color: #d99716;
  --marker-ring: rgba(217, 151, 22, .22);
}

.repeater-leaflet-icon .offline {
  --marker-color: #8a97a6;
  --marker-ring: rgba(138, 151, 166, .24);
}

.repeater-map-tooltip {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(20, 36, 55, .18);
}

.tg-map-tooltip {
  font-weight: 900;
}

.map-tooltip-card {
  display: grid;
  gap: 3px;
  min-width: 160px;
}

.map-tooltip-card b {
  color: #000;
  font-size: 13px;
}

.map-tooltip-card span,
.map-tooltip-card small {
  color: #000;
  font-size: 11px;
}

.map-summary {
  display: grid;
  align-content: start;
  gap: 7px;
}

.map-summary button {
  justify-content: start;
  min-height: 52px;
  display: grid;
  grid-template-columns: 24px 58px 1fr;
  text-align: left;
}

.map-summary span:last-child {
  font-size: 12px;
  font-weight: 700;
}

.map-node-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.map-node-row {
  display: grid;
  grid-template-columns: 150px minmax(140px, 1fr) 190px minmax(150px, .8fr) minmax(260px, 1.2fr);
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
}

.map-node-row > div {
  display: grid;
  gap: 4px;
}

.map-node-row button {
  justify-content: start;
  width: fit-content;
}

.service-strip-compact {
  border-top: 0;
}

.node-telemetry-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.node-telemetry-board .node-metric {
  min-height: 86px;
}

.node-console-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.node-console-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.node-console-head h2 {
  font-size: 24px;
  line-height: 1.1;
  margin: 2px 0;
}

.node-console-head p {
  color: var(--text);
  font-size: 14px;
}

.node-console-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.node-console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr);
  gap: 10px;
  margin-bottom: 10px;
}

.node-console-grid.lower {
  grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr);
}

.node-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.node-metrics.compact {
  gap: 1px;
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.service-strip-radio {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.node-telemetry-board-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-chip {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  background: var(--surface);
}

.status-chip .status-led {
  width: 22px;
  height: 22px;
}

.status-chip b,
.status-chip small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip b {
  color: var(--text);
  font-size: 12px;
  line-height: 1.1;
}

.status-chip small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.node-metric {
  min-height: 78px;
  padding: 10px 12px;
  gap: 5px;
}

.node-metric b {
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.node-metric small {
  font-size: 11px;
}

.node-status-list .compact-row {
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) 34px;
  padding: 9px 12px;
}

.node-status-list .compact-row b {
  display: none;
}

.node-status-list .compact-row .status-led {
  justify-self: end;
}

.node-status-list .compact-row small {
  font-size: 11px;
}

.command-stack {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.command-stack b {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 13px;
}

.command-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.command-buttons button {
  min-height: 34px;
  font-size: 13px;
  padding: 0 10px;
}

.event-list {
  display: grid;
}

.event-list article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 150px;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
}

.event-list article:last-child {
  border-bottom: 0;
}

.event-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.event-list b {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.event-list small {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.raw-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.raw-panel {
  min-width: 0;
  background: var(--surface);
}

.raw-panel summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style-position: inside;
}

.raw-panel summary span {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.raw-panel summary small {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.raw-panel pre {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #0f1720;
  color: #eaf2f8;
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.component-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  padding: 9px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.component-row:last-child {
  border-bottom: 0;
}

.component-row span {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.component-row .status-led {
  justify-self: end;
  width: 30px;
  height: 28px;
}

.component-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.empty {
  padding: 18px 22px;
  color: var(--muted);
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.users-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.user-list {
  display: grid;
}

.mail-status {
  display: grid;
  gap: 4px;
  margin: 0 14px 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #d59a20;
  border-radius: 8px;
  background: var(--surface-soft);
}

.mail-status.ready {
  border-left-color: #18a06b;
}

.mail-status b {
  color: var(--text);
  font-size: 13px;
}

.mail-status span,
.mail-status small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.user-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 140px 86px 100px 92px;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.user-row:last-child {
  border-bottom: 0;
}

.user-row.selected {
  background: #eef8f4;
}

.user-row.suspended {
  background: #fff8e8;
}

.user-row.suspended b {
  color: #7a4d00;
}

.user-row b,
.user-row small,
.user-row span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.user-row b {
  color: var(--text);
  font-size: 14px;
}

.user-row small,
.user-row span {
  color: var(--muted);
  font-size: 12px;
}

.user-row button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.user-admin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.danger-button {
  border-color: #f0b7bf;
  background: #fff1f3;
  color: #9f1f30;
}

.danger-button:hover {
  border-color: #df7d8a;
  background: #ffe4e8;
}

.compact-form {
  gap: 10px;
  padding: 14px;
}

.assignment-all {
  min-height: 52px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.assignment-all small {
  grid-column: 2;
}

.user-assignment-list {
  max-height: 430px;
}

.user-group-list {
  max-height: 170px;
}

.form-divider {
  height: 1px;
  background: var(--line);
  margin: 2px 0;
}

.permission-note {
  padding: 14px 18px;
  color: var(--text);
  line-height: 1.45;
}

.effective-access-panel {
  margin-bottom: 14px;
}

.effective-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.effective-summary article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.effective-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.effective-summary b {
  color: var(--text);
  font-size: 22px;
}

.effective-grid {
  display: grid;
  grid-template-columns: .9fr 1.2fr 1.1fr;
  gap: 14px;
  padding: 0 14px 14px;
}

.effective-grid > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.effective-grid h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.effective-grid article {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.effective-grid b,
.effective-grid span,
.effective-grid small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.effective-grid b {
  color: var(--text);
  font-size: 13px;
}

.effective-grid span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.effective-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.access-workbench {
  margin-bottom: 14px;
}

.access-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.access-form label,
.invite-status {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 850;
}

.access-form button {
  align-self: end;
}

.access-policy-list {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.access-policy-list article {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.access-policy-list b,
.access-policy-list strong,
.invite-status b {
  color: var(--text);
}

.access-policy-list span,
.invite-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.invite-status {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.button-link {
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.form-panel {
  overflow: visible;
}

.form-stack {
  display: grid;
  gap: 14px;
  padding: 18px 22px 22px;
}

.form-stack label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form-stack input[type="text"],
.form-stack input[type="password"],
.form-stack input[type="email"],
.form-stack input:not([type]),
.form-stack select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  outline: none;
  background: #fff;
}

.form-stack input:disabled,
.form-stack select:disabled {
  color: #59636e;
  background: #eef3f5;
}

.checkbox-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-soft);
}

.checkbox-list label {
  min-height: 42px;
  display: grid;
  grid-template-columns: 20px 92px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  background: var(--surface);
}

.checkbox-list span {
  color: var(--text);
  font-weight: 900;
}

.checkbox-list small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.layout-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.layout-lists > div {
  min-width: 0;
  padding: 18px 22px;
  background: var(--surface);
}

.layout-lists h3 {
  margin: 0 0 12px;
  color: var(--text);
}

.layout-row {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  background: var(--surface-soft);
}

.layout-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.layout-row-head button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.layout-row b {
  color: var(--text);
}

.layout-row span,
.layout-row code {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.layout-row code {
  font-family: inherit;
}

.release-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  margin-bottom: 14px;
}

.release-hero span,
.release-card-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.release-hero p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.release-hero code,
.release-meta code {
  color: var(--text);
  font-family: inherit;
  font-weight: 850;
}

.release-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr);
  gap: 14px;
}

.release-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.release-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
}

.release-card.current {
  box-shadow: inset 4px 0 0 var(--green);
}

.release-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.release-card h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 22px;
}

.release-card-head strong {
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  text-transform: uppercase;
}

.release-card p,
.release-card li,
.release-meta span,
.release-actions small,
.rules-list p {
  color: var(--muted);
  line-height: 1.45;
}

.release-card ul {
  margin: 0;
  padding-left: 18px;
}

.release-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 13px;
}

.release-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.rules-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.rules-list article {
  padding: 15px 18px;
  background: var(--surface);
}

.rules-list b {
  color: var(--text);
}

.rules-list p {
  margin-top: 6px;
  font-size: 13px;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .86), rgba(230, 241, 239, .84)),
    radial-gradient(circle at 12% 16%, rgba(0, 126, 111, .12), transparent 32%),
    #edf3f5;
}

.login-stage {
  width: min(1420px, 100%);
  min-height: min(720px, calc(100vh - 44px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  overflow: hidden;
  border: 1px solid rgba(156, 177, 188, .46);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .68) 0%, rgba(255, 255, 255, .54) 34%, rgba(255, 255, 255, .90) 66%, #ffffff 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .00), rgba(237, 243, 245, .60)),
    url('/assets/repeater-node-photo.png') left center / min(62vw, 900px) auto no-repeat,
    #ffffff;
  box-shadow: 0 24px 70px rgba(38, 58, 74, .18);
}

.login-copy {
  min-width: 0;
  display: grid;
  align-content: space-between;
  gap: 28px;
  padding: clamp(28px, 4vw, 54px);
  background:
    linear-gradient(rgba(60, 82, 102, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 82, 102, .055) 1px, transparent 1px),
    radial-gradient(circle at 12% 48%, rgba(18, 134, 107, .12), transparent 34%);
  background-size: 42px 42px, 42px 42px, auto, auto;
}

.login-brandline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brandline img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 10px 26px rgba(31, 49, 66, .16);
}

.login-brandline strong,
.login-brandline span {
  display: block;
}

.login-brandline strong {
  color: var(--text);
  font-size: 19px;
}

.login-brandline span,
.login-title-block p,
.login-panel p,
.login-form label {
  color: var(--muted);
}

.login-title-block {
  width: min(690px, 100%);
}

.login-title-block h1 {
  color: var(--text);
  font-size: clamp(46px, 5.7vw, 82px);
  line-height: .96;
  max-width: 650px;
}

.login-title-block p {
  width: min(560px, 100%);
  margin-top: 20px;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.45;
}

.login-signal-card {
  width: fit-content;
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(0, 126, 111, .24);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  color: #071014;
  box-shadow: 0 14px 34px rgba(35, 55, 68, .12);
  backdrop-filter: blur(8px);
}

.login-signal-card span {
  color: #263946;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-signal-card strong {
  font-size: 14px;
}

.login-live {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.login-live div {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, .80);
  box-shadow: 0 10px 24px rgba(38, 58, 74, .08);
}

.login-live b {
  display: block;
  margin-top: 7px;
  color: var(--green);
  font-size: 24px;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.login-panel {
  min-width: 0;
  display: grid;
  align-content: center;
  padding: clamp(28px, 3vw, 44px);
  border-left: 1px solid var(--line);
  background: #ffffff;
}

.login-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.access-chip {
  border: 1px solid #aad7c8;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
}

.login-panel h2 {
  color: var(--text);
  font-size: 40px;
  line-height: 1.05;
}

.login-panel p {
  margin-top: 9px;
  line-height: 1.45;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.login-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
}

.login-form input {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  outline: none;
  color: #071014;
  background: #ffffff;
}

.login-form input:focus {
  border-color: #8dbfd2;
  box-shadow: 0 0 0 3px rgba(23, 111, 159, .12);
}

.login-form input::placeholder {
  color: #000000;
}

.login-form button {
  min-height: 54px;
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(0, 126, 111, .22);
}

.login-help {
  margin-top: 18px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
}

.login-help strong {
  color: var(--green);
}

.login-error {
  display: none;
  color: var(--red);
}

@media (max-width: 900px) {
  .simple-dashboard {
    width: calc(100% - 24px);
    padding-top: 18px;
  }

  .simple-dashboard.menu-visible {
    width: calc(100% - 24px);
    margin: 0 auto;
  }

  .side-menu {
    width: min(300px, calc(100vw - 24px));
  }

  .simple-header,
  .simple-panel-head {
    align-items: start;
    flex-direction: column;
  }

  .summary-grid,
  .effective-summary,
  .effective-grid,
  .ops-dashboard-head,
  .ops-split,
  .dashboard-grid,
  .metric-grid,
  .groups-grid,
  .users-grid,
  .node-command-hero,
  .node-quick-commands,
  .command-stack-compact,
  .node-signal-band,
  .node-visual-grid,
  .gauge-grid,
  .node-cockpit-grid,
  .node-operations-grid,
  .node-telemetry-board,
  .site-info-grid,
  .rf-grid,
  .map-layout,
  .node-console-grid,
  .node-console-grid.lower,
  .service-strip,
  .raw-data-grid,
  .release-grid,
  .release-meta,
  .layout-lists,
  .login-stage {
    grid-template-columns: 1fr;
  }

  .release-hero {
    align-items: start;
    flex-direction: column;
  }

  .node-table {
    overflow-x: auto;
  }

  .node-console-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .node-console-actions {
    justify-content: flex-start;
  }

  .node-command-hero .node-console-actions {
    place-items: start;
  }

  .active-tg-hero b {
    font-size: 30px;
  }

  .event-list article {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .event-list small {
    grid-column: 2;
    text-align: left;
  }

  .node-table-head,
  .node-row {
    min-width: 820px;
  }

  .ops-dashboard-head {
    align-items: start;
    flex-direction: column;
  }

  .ops-dashboard-head p {
    text-align: left;
  }

  .ops-dashboard-tools {
    width: 100%;
    min-width: 0;
    justify-items: stretch;
  }

  .dashboard-layout-switch {
    grid-template-columns: repeat(3, 1fr);
  }

  .ops-repeater-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ops-network-strip > div {
    grid-template-columns: 1fr;
  }

  .user-row {
    grid-template-columns: minmax(170px, 1fr) 110px 80px 90px 84px;
    min-width: 650px;
  }

  .user-list {
    overflow-x: auto;
  }

  .map-canvas {
    min-height: 420px;
  }

  .map-node-list {
    overflow-x: auto;
  }

  .map-node-row {
    min-width: 980px;
  }

  .login-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .login-stage {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .96)),
      url('/assets/repeater-node-photo.png') center top / cover no-repeat,
      #ffffff;
  }
}

@media (max-width: 560px) {
  .summary-grid,
  .login-live {
    grid-template-columns: 1fr;
  }

  .login-page {
    padding: 12px;
  }

  .login-copy,
  .login-panel {
    padding: 22px;
  }

  .login-title-block h1 {
    font-size: 42px;
  }

  .login-signal-card {
    align-items: flex-start;
    flex-direction: column;
  }
}
