: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%;
  max-width: 100%;
  overflow-x: hidden;
}
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.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.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.audio-active {
  padding-bottom: 116px;
}

.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-dashboard.map-dashboard {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  height: 100dvh;
  padding-bottom: 0;
  overflow: hidden;
}

.simple-dashboard.map-dashboard.audio-active {
  padding-bottom: 0;
}

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

.map-dashboard .simple-header {
  min-height: 58px;
  margin-bottom: 10px;
}

.brand-lockup {
  display: grid;
  grid-template-columns: 44px minmax(0, auto) minmax(0, 1fr);
  grid-template-areas:
    "menu logo title"
    "back logo title";
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
}

.brand-title {
  grid-area: title;
  min-width: 0;
}

.brand-title > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-title > span {
  display: none;
}

.brand-title h1 {
  min-width: 0;
}

.environment-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid color-mix(in srgb, #f59e0b 70%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, #f59e0b 18%, var(--surface));
  color: #92400e;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

:root[data-theme="dark"] .environment-badge {
  color: #fde68a;
  background: color-mix(in srgb, #f59e0b 22%, var(--surface));
}

.header-back-button {
  width: 44px;
  min-width: 44px;
  min-height: 38px;
  padding: 0;
  border-color: color-mix(in srgb, var(--line) 70%, var(--blue));
  background: color-mix(in srgb, var(--surface) 86%, var(--blue-soft));
}

.header-back-button:hover {
  border-color: var(--blue);
}

.mobile-header-back {
  grid-area: back;
  display: inline-flex;
}

.desktop-header-back {
  display: none;
}

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

.mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--green) 24%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, var(--green-soft));
  overflow: hidden;
}

.brand-mark {
  padding: 5px;
}

.brand-logo,
.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-banner {
  grid-area: logo;
  width: clamp(214px, 20vw, 330px);
  height: 76px;
  display: grid;
  align-items: center;
  padding: 0;
  overflow: hidden;
  flex: 0 1 auto;
}

.brand-banner img,
.login-logo-banner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.brand-logo-dark,
.brand-banner .brand-banner-dark,
.login-logo .brand-logo-dark,
.login-logo-banner .brand-logo-dark {
  display: none;
}

:root[data-theme="dark"] .brand-logo-light,
:root[data-theme="dark"] .brand-banner .brand-banner-light,
:root[data-theme="dark"] .login-logo .brand-logo-light,
:root[data-theme="dark"] .login-logo-banner .brand-logo-light,
:root[data-theme="dark"] .side-menu-brand .brand-logo-light {
  display: none;
}

:root[data-theme="dark"] .brand-logo-dark,
:root[data-theme="dark"] .brand-banner .brand-banner-dark,
:root[data-theme="dark"] .login-logo .brand-logo-dark,
:root[data-theme="dark"] .login-logo-banner .brand-logo-dark,
:root[data-theme="dark"] .side-menu-brand .brand-logo-dark {
  display: block;
}

.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;
}

.powered-by {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--green) 32%, var(--line));
  border-radius: 8px;
  padding: 0 10px;
  background: color-mix(in srgb, var(--green-soft) 55%, var(--surface));
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.powered-by strong {
  margin-left: 4px;
  color: inherit;
  font-weight: 950;
}

.powered-by:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.session-widget {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 6px;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 5px 4px 9px;
  background: var(--surface);
}

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

.session-widget b {
  min-width: 58px;
  color: var(--text);
  font-size: 12px;
}

.session-widget.warn {
  border-color: rgba(217, 151, 22, .55);
  background: #fff8e8;
}

.session-widget.live {
  border-color: rgba(18, 134, 107, .45);
  background: var(--green-soft);
}

.session-widget button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
}

.session-widget button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.install-app-button {
  border-color: color-mix(in srgb, var(--green) 42%, var(--line));
  background: var(--green-soft);
  color: var(--green);
}

.install-app-button:hover {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green-soft) 62%, #fff);
}

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

.side-menu.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

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

.side-menu-brand {
  width: min(210px, calc(100% - 52px));
  height: 46px;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.side-menu-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  display: block;
}

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

.side-menu-nav {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

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

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

.footer-app-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
}

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

.footer-app-version strong {
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
}

.footer-powered-by {
  width: 100%;
}

.side-menu-section {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.side-menu-section > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.side-menu-section > button {
  min-height: 38px;
  border-radius: 8px;
  background: var(--surface);
}

.side-session-section {
  display: none;
}

.side-session-section .session-widget {
  width: 100%;
}

.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;
}

.side-theme-switch {
  display: none;
}

.side-theme-switch .theme-switch {
  width: 100%;
}

.side-dashboard-list button {
  min-height: 46px;
  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;
}

.console-command-dock {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 8px;
  overflow-x: auto;
}

.simple-dashboard.menu-visible .console-command-dock {
  flex-wrap: wrap;
  overflow: visible;
}

.simple-dashboard.menu-visible .console-welcome {
  flex: 1 1 260px;
  max-width: 360px;
}

.simple-dashboard.menu-visible .console-quick-panel {
  flex: 999 1 640px;
  flex-wrap: wrap;
  min-width: min(100%, 520px);
  overflow: visible;
}

.simple-dashboard.menu-visible .console-quick-group {
  flex: 0 1 auto;
}

.simple-dashboard.menu-visible .console-quick-group > div {
  flex-wrap: wrap;
}

.simple-dashboard.menu-visible .console-quick-group button {
  width: 88px;
  flex: 0 0 88px;
}

.console-overview-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  align-items: stretch;
}

.console-technical-stack {
  display: grid;
  gap: 6px;
  padding: 6px;
}

.technical-overview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  overflow: visible;
}

.technical-overview .console-stat {
  min-height: 46px;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  padding: 6px 8px;
  box-shadow: none;
}

.technical-overview .console-stat b {
  font-size: 17px;
}

.technical-overview .console-stat small {
  font-size: 10px;
}

.console-overview-grid .summary-card {
  min-width: 116px;
  width: 116px;
  min-height: 86px;
  height: 100%;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 2px 7px;
  padding: 8px;
}

.console-welcome {
  flex: 0 0 240px;
  min-height: 86px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--line));
  border-radius: 10px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--green-soft) 78%, var(--surface)), var(--surface));
  box-shadow: 0 10px 24px rgba(16, 132, 96, .08);
}

.welcome-pulse {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--green);
  border: 1px solid color-mix(in srgb, var(--green) 36%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--green-soft) 76%, var(--surface));
}

.welcome-pulse svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.console-welcome span {
  color: var(--green);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.console-welcome h2 {
  margin: 1px 0 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.05;
}

.console-welcome p {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.console-stat {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 62px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.console-stat span,
.console-metric-strip span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.console-stat b {
  display: block;
  margin: 1px 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1;
}

.console-stat small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.console-quick-panel {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 0;
}

.console-quick-group {
  width: auto;
  max-width: 100%;
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, var(--blue-soft)), var(--surface));
  box-shadow: 0 10px 24px rgba(38, 67, 86, .08);
}

.console-quick-group > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.console-quick-group > div {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
}

.console-quick-group button {
  position: relative;
  min-width: 0;
  width: 88px;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: 3px;
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, white), color-mix(in srgb, var(--surface-soft) 82%, var(--blue-soft)));
  box-shadow: inset 4px 0 0 color-mix(in srgb, var(--blue) 58%, transparent);
  transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.console-quick-group button:hover,
.console-quick-group button:focus-visible {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue-soft) 72%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 38%, transparent), 0 10px 22px rgba(23, 111, 159, .12);
  transform: translateY(-1px);
}

.console-quick-group button.active {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: inset 4px 0 0 var(--green), 0 10px 22px rgba(16, 132, 96, .12);
}

.quick-action-icon {
  min-width: 0;
  width: 100%;
  min-height: 60px;
  display: inline-grid;
  grid-template-rows: 30px minmax(0, 1fr);
  place-items: center;
  gap: 2px;
  padding: 7px 3px 5px;
  border: 1px solid color-mix(in srgb, var(--green) 34%, var(--line));
  border-radius: 8px;
  color: var(--green);
  background: color-mix(in srgb, var(--green-soft) 72%, var(--surface));
}

.quick-action-icon span {
  display: grid;
  place-items: center;
}

.quick-action-icon svg {
  width: 31px;
  height: 31px;
  stroke: currentColor;
  stroke-width: 2.35;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-action-icon strong {
  max-width: 100%;
  color: var(--text);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  line-height: 1.05;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-action-icon.dashboard-icon {
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 34%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 72%, var(--surface));
}

.console-quick-group button > span {
  min-width: 0;
  display: block;
}

.console-quick-group b {
  min-width: 0;
  color: color-mix(in srgb, var(--blue) 54%, var(--text));
  font-size: 14px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console-quick-group small {
  display: none;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console-metric-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 6px;
  border-top: 1px solid var(--line);
  background: transparent;
}

.console-metric-strip article {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-content: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.console-metric-strip b {
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.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: 8px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 88%, var(--page));
  box-shadow: var(--shadow);
}

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

.ops-dashboard-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-items: end;
  gap: 10px;
  min-width: 280px;
}

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

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

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

.dashboard-map-actions {
  display: inline-grid;
  grid-template-columns: repeat(2, max-content);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.dashboard-map-actions button,
.dashboard-map-actions a {
  min-height: 29px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  display: inline-grid;
  align-items: center;
  text-decoration: none;
}

.dashboard-map-actions button.active,
.dashboard-map-actions a.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: 12px;
  text-align: right;
  max-width: 520px;
}

.dashboard-bulk-tile {
  display: grid;
  grid-template-columns: minmax(190px, .72fr) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.dashboard-bulk-tile > div:first-child {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  padding: 5px 8px;
}

.dashboard-bulk-tile span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.dashboard-bulk-tile b {
  color: var(--text);
  font-size: 14px;
  line-height: 1.1;
}

.dashboard-bulk-tile small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.dashboard-bulk-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 5px;
}

.dashboard-bulk-actions button {
  min-height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.05;
}

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

.ops-repeater-grid-v2 {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 8px;
}

.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 92px minmax(220px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 1180px;
  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-head > *,
.ops-list-row > * {
  justify-self: start;
  text-align: left;
}

.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,
.ops-list-audio {
  display: flex;
  justify-content: flex-start;
  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;
}

.audio-listen-button {
  min-height: 30px;
  padding: 0 10px;
  border-color: color-mix(in srgb, var(--green) 42%, var(--line));
  background: color-mix(in srgb, var(--green-soft) 62%, var(--surface));
  color: var(--green);
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.audio-listen-button svg {
  width: 14px;
  height: 14px;
}

.audio-listen-button.active {
  background: var(--green);
  color: #fff;
}

.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: 8px;
  min-height: 224px;
  padding: 10px;
  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.maintenance::before { background: #2f7edc; }
.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: 8px;
}

.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: 17px;
  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: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px;
  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: 2px;
  color: var(--green);
  font-size: 23px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.ops-card-hero .tg-mode-badge {
  margin-top: 5px;
}

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

.ops-status-grid,
.ops-command-grid {
  display: grid;
  gap: 4px;
}

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

.ops-command-grid {
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  align-content: start;
}

.ops-status {
  min-height: 46px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  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.maintenance {
  color: #2f7edc;
}

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

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

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

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

.ops-signal-text {
  display: grid;
  place-items: center;
  width: 30px;
  height: 22px;
  font-size: 14px;
  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: 36px;
  padding: 0 7px;
  border-color: color-mix(in srgb, var(--blue) 26%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 54%, var(--surface));
  font-size: 11px;
  line-height: 1.05;
  white-space: normal;
}

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

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

.ops-repeater-card-v2 {
  gap: 8px;
  min-height: 0;
  padding: 9px 9px 10px;
  border-radius: 10px;
}

.ops-repeater-card-v2::before {
  width: 4px;
}

.ops-v2-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.ops-v2-head button {
  min-width: 0;
}

.ops-v2-head b {
  font-size: 18px;
}

.ops-v2-head span,
.ops-v2-head small {
  font-size: 10px;
}

.ops-v2-head > div {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.ops-v2-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(108px, .34fr);
  gap: 8px;
  align-items: stretch;
}

.ops-v2-tg {
  min-height: 110px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--green) 42%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--green-soft) 70%, var(--surface));
}

.ops-v2-tg span,
.ops-v2-service span,
.ops-v2-meta span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.ops-v2-tg b {
  color: var(--green);
  font-size: 34px;
  line-height: .95;
  overflow-wrap: anywhere;
}

.ops-v2-tg > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ops-v2-radio {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.ops-v2-radio .ops-signal-icon {
  min-height: 0;
  height: 100%;
  padding: 5px;
  border-radius: 8px;
}

.ops-v2-radio .ops-signal-icon svg {
  width: 21px;
  height: 21px;
}

.ops-v2-radio .ops-signal-text {
  width: 28px;
  height: 21px;
  font-size: 13px;
}

.ops-v2-services {
  display: grid;
  grid-template-columns: 48px repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.ops-v2-services .ops-status {
  min-height: 50px;
  padding: 5px;
  border-radius: 8px;
}

.ops-v2-services .ops-power-icon {
  width: 25px;
  height: 25px;
}

.ops-v2-service {
  min-width: 0;
  min-height: 50px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

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

.ops-v2-service b {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.ops-v2-primary-actions,
.ops-v2-secondary-actions {
  display: grid;
  gap: 5px;
}

.ops-v2-primary-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ops-v2-primary-actions button,
.ops-v2-primary-actions .audio-listen-button {
  min-height: 44px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
}

.ops-v2-secondary-actions {
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
}

.ops-v2-secondary-actions button {
  min-height: 32px;
  padding: 0 6px;
  border-color: color-mix(in srgb, var(--blue) 18%, var(--line));
  background: var(--surface-soft);
  font-size: 10px;
  line-height: 1;
}

.ops-v2-meta {
  grid-template-columns: 1.15fr .72fr .88fr;
  gap: 5px;
  padding-top: 5px;
}

.ops-v2-meta div {
  min-height: 46px;
  padding: 6px 7px;
}

.ops-v2-meta b {
  font-size: 11px;
}

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

.ops-card-meta div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 6px;
  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;
}

.console-overview-grid .summary-card::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 18%, transparent);
  grid-column: 1;
  grid-row: 1 / span 2;
}

.console-overview-grid .summary-card span {
  grid-column: 2 / -1;
  grid-row: 1;
}

.console-overview-grid .summary-card b {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: 18px;
}

.console-overview-grid .summary-card small {
  grid-column: 2 / -1;
  grid-row: 3;
  margin: 0;
  font-size: 10px;
  line-height: 1.15;
}

: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 th {
  background: #0f1821;
  border-color: #314250;
}

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

:root[data-theme="dark"] .node-status-tile.online {
  background: color-mix(in srgb, var(--green-soft) 58%, #101820);
}

:root[data-theme="dark"] .node-status-tile.warn {
  background: color-mix(in srgb, #4a3516 64%, #101820);
}

:root[data-theme="dark"] .node-status-tile.offline {
  background: color-mix(in srgb, #4a1c25 62%, #101820);
}

:root[data-theme="dark"] .node-status-tile.maintenance {
  background: color-mix(in srgb, #17314f 66%, #101820);
}

:root[data-theme="dark"] .node-metric-cell i {
  background: #2b3a46;
}

: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"] .session-widget.warn {
  background: #372a18;
}

: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.static {
  background: linear-gradient(135deg, #392b11 0%, #15242b 100%);
  border-color: #9a6a13;
}

: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;
}

:root[data-theme="dark"] .form-stack input[type="text"],
:root[data-theme="dark"] .form-stack input[type="password"],
:root[data-theme="dark"] .form-stack input[type="email"],
:root[data-theme="dark"] .form-stack input:not([type]),
:root[data-theme="dark"] .form-stack select,
:root[data-theme="dark"] .access-form select,
:root[data-theme="dark"] .permission-target-row select,
:root[data-theme="dark"] .map-controls select {
  background: #101a23;
  border-color: #405466;
  color: #f2f7fb;
}

:root[data-theme="dark"] .form-stack input::placeholder {
  color: #9fb0bd;
}

:root[data-theme="dark"] .form-stack input:disabled,
:root[data-theme="dark"] .form-stack select:disabled,
:root[data-theme="dark"] .permission-target-row select:disabled {
  background: #22303b;
  border-color: #344756;
  color: #b8c7d2;
}

:root[data-theme="dark"] .checkbox-list,
:root[data-theme="dark"] .checkbox-list label,
:root[data-theme="dark"] .assignment-all,
:root[data-theme="dark"] .invite-status,
:root[data-theme="dark"] .roles-manager,
:root[data-theme="dark"] .role-card,
:root[data-theme="dark"] .role-permissions label,
:root[data-theme="dark"] .permission-guidance article,
:root[data-theme="dark"] .permission-target-row,
:root[data-theme="dark"] .effective-summary article,
:root[data-theme="dark"] .effective-grid article,
:root[data-theme="dark"] .access-policy-list article,
:root[data-theme="dark"] .layout-row {
  background: #1b2732;
  border-color: #344756;
}

:root[data-theme="dark"] .form-stack label,
:root[data-theme="dark"] .checkbox-list span,
:root[data-theme="dark"] .checkbox-list small,
:root[data-theme="dark"] .assignment-all span,
:root[data-theme="dark"] .assignment-all small,
:root[data-theme="dark"] .invite-status span,
:root[data-theme="dark"] .roles-manager-head span,
:root[data-theme="dark"] .role-card small,
:root[data-theme="dark"] .role-card span,
:root[data-theme="dark"] .role-permissions span,
:root[data-theme="dark"] .role-permissions small,
:root[data-theme="dark"] .permission-guidance span,
:root[data-theme="dark"] .permission-target-row small {
  color: #d9e6ef;
}

:root[data-theme="dark"] .roles-manager-head b,
:root[data-theme="dark"] .role-card b,
:root[data-theme="dark"] .permission-guidance b,
:root[data-theme="dark"] .permission-target-row b,
:root[data-theme="dark"] .effective-grid b,
:root[data-theme="dark"] .effective-grid span,
:root[data-theme="dark"] .layout-row b {
  color: #ffffff;
}

:root[data-theme="dark"] .roles-manager input,
:root[data-theme="dark"] .roles-manager select {
  background: #101a23;
  border-color: #405466;
  color: #f2f7fb;
}

:root[data-theme="dark"] .roles-manager input::placeholder {
  color: #9fb0bd;
}

.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-wrap {
  overflow-x: auto;
}

.node-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
}

.node-col-name { width: 15%; }
.node-col-state { width: 5.5%; }
.node-col-svx { width: 5.5%; }
.node-col-rl { width: 5.5%; }
.node-col-rl-version { width: 5%; }
.node-col-tg { width: 7%; }
.node-col-metric { width: 4.8%; }
.node-col-lan { width: 9%; }
.node-col-44 { width: 8%; }
.node-col-reflector { width: 8.5%; }
.node-col-last-live { width: 11%; }
.node-col-audio { width: 9%; }

.node-table th,
.node-table td {
  min-width: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: left;
}

.node-table th > *,
.node-table td > * {
  text-align: left;
  margin-left: 0;
  margin-right: auto;
}

.node-table th {
  height: 34px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-head-icon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.table-head-icon svg {
  width: 16px;
  height: 16px;
  color: var(--green);
  flex: 0 0 auto;
  stroke-width: 2.5;
}

.table-head-icon span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-row {
  height: 48px;
}

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

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

.node-open {
  width: 100%;
  min-height: auto;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  justify-items: start;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  box-shadow: none;
}

.node-open .node-cell-icon {
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--green-soft) 55%, transparent);
  color: var(--green);
}

.node-open .node-cell-icon svg {
  width: 17px;
  height: 17px;
}

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

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

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

.node-cell {
  display: grid;
  align-content: center;
  justify-content: start;
  justify-items: start;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  text-align: left;
}

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

.node-row b {
  color: var(--text);
  font-size: 13px;
  line-height: 1.12;
}

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

.node-row code {
  width: 100%;
  text-align: left;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.node-state-dot {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  width: 100%;
  text-align: left;
}

.node-state-dot > svg {
  width: 15px;
  height: 15px;
  color: var(--green);
  flex: 0 0 auto;
}

.node-state-dot .status-led {
  width: 18px;
  height: 20px;
}

.node-state-dot .status-led i {
  width: 10px;
  height: 10px;
}

.node-state-dot b {
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  text-transform: lowercase;
}

.node-status-tile {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: #9aa4b2;
}

.node-status-tile svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.45;
}

.node-status-tile.online {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 34%, var(--line));
  background: color-mix(in srgb, var(--green-soft) 64%, var(--surface));
}

.node-status-tile.warn {
  color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 38%, var(--line));
  background: color-mix(in srgb, #fff3d8 60%, var(--surface));
}

.node-status-tile.offline {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 34%, var(--line));
  background: color-mix(in srgb, #ffe5ea 58%, var(--surface));
}

.node-status-tile.maintenance {
  color: #2f7edc;
  border-color: color-mix(in srgb, #2f7edc 34%, var(--line));
  background: color-mix(in srgb, #e5f0ff 62%, var(--surface));
}

.node-status-tile.unknown {
  color: #7d8897;
  border-color: color-mix(in srgb, #8a97a6 30%, var(--line));
}

.node-plain-value {
  display: block;
  width: 100%;
  color: var(--text);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.2;
  text-align: left;
}

.node-metric-cell {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
}

.node-metric-cell b {
  color: var(--text);
  font-size: 12px;
  line-height: 1;
}

.node-metric-cell i {
  width: 100%;
  height: 6px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8ef;
  position: relative;
}

.node-metric-cell i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--value, 0) * 1%);
  border-radius: inherit;
  background: var(--green);
}

.node-metric-cell.warn i::before {
  background: var(--amber);
}

.node-metric-cell.offline i::before {
  background: var(--red);
}

.node-metric-cell.unknown i::before {
  background: #8a97a6;
}

.node-last-live {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 2px 7px;
  min-width: 0;
}

.node-last-live i {
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--green-soft) 56%, var(--surface));
  color: var(--green);
}

.node-last-live i svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.45;
}

.node-last-live b {
  color: var(--text);
  font-size: 12px;
  line-height: 1.15;
}

.node-last-live span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.node-last-live.live span {
  color: var(--green);
}

.node-last-live.memory span {
  color: var(--amber);
}

.node-icon-value {
  display: inline-grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
}

.node-icon-value i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--green-soft) 56%, var(--surface));
  color: var(--green);
}

.node-icon-value i svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.45;
}

.node-meta-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}

.node-meta-cell b {
  color: var(--text);
  font-size: 13px;
  line-height: 1.15;
}

.node-meta-cell span {
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
}

.node-meta-cell small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.node-row .node-ip-stack {
  display: grid;
  gap: 3px;
  color: var(--text);
  line-height: 1.25;
  min-width: 0;
  max-width: 100%;
}

.node-row .node-ip-stack span {
  display: grid;
  grid-template-columns: 28px max-content;
  justify-content: start;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
}

.node-row .node-ip-stack b {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .04em;
}

.node-row .node-ip-stack em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.node-status-cell {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-items: start;
  gap: 4px;
  min-width: 0;
}

.node-source-badge {
  grid-column: 1 / -1;
  width: fit-content;
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
}

.mini-status {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 24px;
  padding: 4px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
}

.mini-status i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #aab4bd;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, .16);
  flex: 0 0 auto;
}

.mini-status.online i {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.mini-status.warn i {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .18);
}

.mini-status.offline i {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .16);
}

.mini-status b {
  color: var(--text);
  font-size: 10px;
  line-height: 1;
}

.node-health-mini {
  display: grid;
  justify-items: start;
  gap: 2px;
  min-width: 0;
}

.node-health-mini span {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 4px;
  align-items: center;
  min-width: 0;
}

.node-health-mini b {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .04em;
}

.node-health-mini em {
  color: var(--text);
  font-size: 12px;
  font-style: normal;
}

.node-health-mini small {
  color: var(--muted);
  font-size: 11px;
}

.node-rl-cell b {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.node-rl-cell .status-led {
  flex: 0 0 auto;
}

.node-row strong {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 7px;
  background: #edf1f5;
  color: var(--muted);
  font-size: 10px;
  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.maintenance i {
  background: #2f7edc;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), 0 0 0 4px rgba(47, 126, 220, .17);
}

.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: 56px;
  display: grid;
  grid-template-columns: minmax(250px, .9fr) minmax(140px, .32fr) minmax(560px, 1.35fr);
  gap: 6px;
  align-items: stretch;
  margin-bottom: 6px;
}

.simple-dashboard.menu-visible .node-command-hero {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
}

.simple-dashboard.menu-visible .node-hero-operations {
  grid-column: 1 / -1;
}

.simple-dashboard.menu-visible .node-detail-layout {
  grid-template-columns: 1fr;
}

.simple-dashboard.menu-visible .node-detail-tech-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.node-identity,
.active-tg-hero,
.node-signal-band,
.node-hero-operations {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.active-tg-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  padding: 7px 10px;
  background: linear-gradient(135deg, #fffef8 0%, #f1fbf7 100%);
  border-color: #8bcfbb;
}

.active-tg-hero.static {
  border-color: color-mix(in srgb, var(--amber) 52%, var(--line));
  background: linear-gradient(135deg, #fff7e2 0%, #fffef8 100%);
}

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

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

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

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

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

.tg-mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.tg-mode-badge svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.7;
}

.tg-mode-badge.auto {
  border-color: color-mix(in srgb, var(--green) 34%, var(--line));
  background: color-mix(in srgb, var(--green-soft) 58%, var(--surface));
  color: var(--green);
}

.tg-mode-badge.static {
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
  background: color-mix(in srgb, #fff3d8 68%, var(--surface));
  color: #9a6100;
}

.tg-pending-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 5px;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--amber) 52%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, #fff3d8 72%, var(--surface));
  color: #9a6100;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.tg-pending-badge.small,
.tg-pending-badge.table {
  margin-top: 0;
  padding: 3px 6px;
  font-size: 9px;
}

.tg-pending-badge.map {
  margin-top: -2px;
}

.tg-mode-badge.hero {
  padding: 6px 8px;
}

.tg-mode-badge.small,
.tg-mode-badge.table {
  padding: 3px 6px;
  font-size: 9px;
}

.tg-inline-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
}

.node-tg-cell {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-width: 0;
}

.node-tg-cell b {
  color: var(--text);
  font-size: 13px;
}

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

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

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

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

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

.node-hero-status .status-chip {
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  padding: 5px 8px;
}

.node-hero-operations {
  display: grid;
  grid-template-columns: minmax(270px, .58fr) minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
  padding: 6px;
  min-width: 0;
}

.node-command-hero .node-console-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, max-content));
  gap: 5px;
  align-content: center;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  min-width: 0;
}

.node-command-hero .node-console-actions button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  padding: 0 9px;
  white-space: nowrap;
  font-size: 12px;
}

.node-command-hero .node-console-actions button svg {
  width: 17px;
  height: 17px;
  color: var(--green);
  stroke-width: 2.45;
  flex: 0 0 auto;
}

.node-detail-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.node-detail-tabs button {
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  box-shadow: none;
}

.node-detail-tabs button.active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--text);
}

.node-detail-tabs svg {
  width: 20px;
  height: 20px;
  color: var(--green);
  flex: 0 0 auto;
}

.node-detail-tabs span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.node-detail-tabs b {
  color: inherit;
  font-size: 13px;
  line-height: 1.1;
}

.node-detail-tabs small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.node-quick-commands {
  display: grid;
  grid-template-columns: minmax(128px, max-content) minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
  margin-bottom: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.node-quick-commands > div:first-child {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  padding: 4px 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: 14px;
  line-height: 1.05;
}

.node-telemetry-compact {
  display: grid;
  gap: 0;
  margin-bottom: 8px;
}

.node-telemetry-compact-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.node-telemetry-compact-head span,
.telemetry-mini-item span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.node-telemetry-compact-head h2 {
  color: var(--text);
  font-size: 17px;
  line-height: 1;
}

.node-telemetry-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.node-telemetry-filters button {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
}

.node-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
}

.telemetry-mini-item {
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
}

.telemetry-mini-item > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.telemetry-mini-item b {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.telemetry-mini-item small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.telemetry-mini-item.tg b {
  color: var(--green);
  font-size: 22px;
}

.telemetry-mini-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: #83909e;
}

.telemetry-mini-icon svg {
  width: 18px;
  height: 18px;
}

.telemetry-mini-item.online .telemetry-mini-icon {
  border-color: color-mix(in srgb, var(--green) 48%, var(--line));
  color: var(--green);
}

.telemetry-mini-item.warn .telemetry-mini-icon {
  border-color: color-mix(in srgb, var(--amber) 52%, var(--line));
  color: var(--amber);
}

.telemetry-mini-item.offline .telemetry-mini-icon {
  color: #83909e;
}

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

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

.node-signal-band article {
  min-height: 44px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 7px 10px;
  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: 13px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.node-signal-band small {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.tg-timeout-control {
  gap: 4px;
}

.tg-timeout-editor {
  display: grid;
  grid-template-columns: minmax(48px, 1fr) auto auto;
  gap: 4px;
  align-items: center;
}

.tg-timeout-editor input {
  width: 100%;
  min-width: 0;
  height: 26px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.tg-timeout-editor button {
  min-height: 26px;
  padding: 0 7px;
  font-size: 10px;
}

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

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

.node-cockpit-grid-secondary {
  grid-template-columns: minmax(260px, .9fr) minmax(300px, .9fr) minmax(340px, 1.05fr);
  align-items: start;
}

.node-cockpit-grid-secondary .simple-panel-head {
  min-height: 58px;
  padding: 10px 14px;
}

.node-cockpit-grid-secondary .simple-panel-head h2 {
  font-size: 17px;
}

.node-cockpit-grid-secondary .simple-panel-head p {
  font-size: 12px;
}

.node-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
}

.node-detail-layout-command-first {
  grid-template-columns: 1fr;
}

.node-data-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
}

.node-detail-main,
.node-detail-tech-column {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.node-detail-tech-column .simple-panel {
  min-width: 0;
}

.node-detail-tech-column .simple-panel-head {
  min-height: 48px;
  padding: 8px 10px;
}

.node-detail-tech-column .simple-panel-head h2 {
  font-size: 16px;
}

.node-detail-tech-column .simple-panel-head p {
  font-size: 12px;
}

.node-technical-strip {
  grid-template-columns: 1fr;
  gap: 5px;
  margin: 0;
  padding: 6px;
  border-top: 1px solid var(--line);
  background: transparent;
}

.node-technical-strip article {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.node-data-summary-panel .tg-timeout-control {
  margin: 0 6px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-soft);
}

.node-data-layout .node-visual-grid,
.node-data-layout .node-site-summary-grid {
  margin-bottom: 0;
}

.node-detail-tech-column .gauge-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 6px;
}

.node-detail-tech-column .radial-gauge {
  min-height: 86px;
  padding: 6px;
}

.node-detail-tech-column .radial-gauge::before {
  width: 58px;
}

.node-detail-tech-column .ping-levels {
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 6px;
  border-top: 1px solid var(--line);
  background: transparent;
}

.node-detail-tech-column .ping-level {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.node-health-primary .simple-panel-head {
  min-height: 54px;
}

.node-health-primary .gauge-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

.node-health-primary .radial-gauge {
  min-height: 118px;
  padding: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 80%, var(--green-soft)), var(--surface-soft));
}

.node-health-primary .radial-gauge::before {
  width: 76px;
}

.node-health-primary .radial-gauge b {
  font-size: 22px;
}

.node-site-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .86fr);
  gap: 10px;
  margin-bottom: 10px;
}

.site-field-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rf-grid-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 13, 18, .58);
  backdrop-filter: blur(8px);
}

.node-modal {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 42px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
  overflow: hidden;
}

.node-modal > header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

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

.node-modal > header h2 {
  color: var(--text);
}

.node-modal > header button {
  width: 40px;
  min-height: 40px;
  padding: 0;
  font-size: 24px;
}

.node-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.node-modal .simple-panel {
  box-shadow: none;
}

.node-modal .node-info-editor {
  margin: 0;
}

.raw-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 13, 18, .48);
  backdrop-filter: blur(8px);
}

.confirm-dialog {
  width: min(440px, calc(100vw - 32px));
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .30);
}

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

.confirm-dialog h2 {
  margin-top: 4px;
  color: var(--text);
}

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

.confirm-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: min(560px, calc(100vw - 32px));
  display: grid;
  gap: 8px;
}

.toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  padding: 12px;
  background: var(--surface);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .20);
}

.toast.warn {
  border-left-color: var(--amber);
}

.toast.error {
  border-left-color: var(--red);
}

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

.toast small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.toast button {
  width: 28px;
  min-height: 28px;
  padding: 0;
  font-size: 18px;
}

.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: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
}

.gauge-grid-compact {
  gap: 6px;
  padding: 10px;
}

.gauge-grid-compact .radial-gauge {
  min-height: 100px;
  padding: 8px;
}

.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: 72px;
  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: 19px;
  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;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.ping-level {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 9px 10px;
  border: 0;
  border-radius: 0;
  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: 7px;
  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: auto; }

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

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

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

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

.audio-session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 12px 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.audio-session-row.warn {
  color: #b45309;
  border-color: #f2b84b;
  background: #fff7e6;
}

.audio-session-row button {
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
}

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

.audio-service-grid > div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  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: 12px;
  overflow-wrap: anywhere;
}

.audio-diagnostic-box {
  display: grid;
  gap: 4px;
  margin: 0 12px 8px;
  padding: 9px 10px;
  border: 1px solid #f0b7bd;
  border-radius: 10px;
  background: #fff1f2;
  color: #7f1d1d;
}

.audio-diagnostic-box span {
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.audio-diagnostic-box b {
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

:root[data-theme="dark"] .audio-diagnostic-box {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.28);
  color: #fecaca;
}

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

.audio-service-actions button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 11px;
}

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

.node-audio-panel .mini {
  padding: 0 12px 10px;
  color: var(--muted);
  font-size: 11px;
}

.audio-dock {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: 0;
  z-index: 1600;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 360px) auto;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  background: color-mix(in srgb, var(--surface) 94%, var(--green-soft));
  box-shadow: 0 -12px 28px rgba(15, 23, 42, .10);
}

.audio-dock:not(.active) {
  display: none;
}

.audio-dock-info {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.audio-dock-info b,
.audio-dock-info span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-dock-info b {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.audio-dock-info span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.audio-dock audio {
  width: 100%;
  height: 34px;
}

.audio-dock .audio-session-row {
  margin: 0;
  min-width: 178px;
}

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

.command-stack.command-stack-compact {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px;
  align-items: start;
  padding: 0;
  min-width: 0;
  overflow: visible;
}

.command-stack-compact > div {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.command-stack-compact b {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-stack-compact b svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.command-stack-compact .command-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(68px, max-content));
  justify-content: start;
  gap: 4px;
}

.command-stack-compact .command-group-tg {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 6px;
  flex: 1 1 480px;
}

.command-stack-compact .command-group-tg b {
  grid-column: 1 / -1;
}

.command-stack-compact .command-group-tg .command-icon-grid {
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
}

.command-stack-compact .command-icon-grid-service {
  grid-template-columns: repeat(3, 56px);
}

.command-stack-compact .command-icon-grid-timeout {
  grid-template-columns: repeat(2, 56px);
}

.command-stack-compact .command-icon-grid-agent {
  grid-template-columns: repeat(4, 56px);
}

.command-stack-compact .command-icon-button {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  flex-direction: column;
  gap: 0;
  padding: 3px;
  border-radius: 8px;
  line-height: 1;
}

.command-stack-compact .command-icon-grid-service .command-icon-button,
.command-stack-compact .command-icon-grid-agent .command-icon-button {
  width: 56px;
}

.command-stack-compact .command-button-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--green);
}

.command-stack-compact .command-button-icon svg {
  width: 19px;
  height: 19px;
}

.command-stack-compact .danger-button .command-button-icon {
  color: var(--red);
}

.command-stack-compact .command-icon-button.danger-button:disabled {
  border-color: color-mix(in srgb, var(--red) 34%, var(--line));
  background: color-mix(in srgb, #ffe7ed 86%, var(--surface));
  color: #7f1d2d;
  opacity: .72;
}

.command-stack-compact .command-icon-button.danger-button:disabled .command-button-icon,
.command-stack-compact .command-icon-button.danger-button:disabled .command-button-label {
  color: #b4233f;
}

:root[data-theme="dark"] .command-stack-compact .command-icon-button.danger-button:disabled {
  border-color: rgba(248, 113, 113, .48);
  background: rgba(127, 29, 45, .32);
  color: #fecdd3;
  opacity: .86;
}

:root[data-theme="dark"] .command-stack-compact .command-icon-button.danger-button:disabled .command-button-icon,
:root[data-theme="dark"] .command-stack-compact .command-icon-button.danger-button:disabled .command-button-label {
  color: #fecdd3;
}

.command-stack-compact .command-button-label {
  display: block;
  max-width: 100%;
  color: var(--text);
  font-size: 9px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-stack-compact .command-buttons button .tg-button-code {
  margin-left: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
}

.command-stack-compact .manual-tg-control {
  display: grid;
  grid-template-columns: 78px 56px;
  gap: 4px;
  margin-top: 0;
  max-width: 138px;
}

.command-stack-compact .manual-tg-control input {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  font-size: 12px;
}

.command-stack-compact .manual-tg-control .manual-send {
  min-height: 34px;
  padding: 3px;
}

.command-stack-compact .manual-tg-control .manual-send .command-button-icon {
  width: 18px;
  height: 18px;
}

.command-stack-compact .manual-tg-control .manual-send svg {
  width: 18px;
  height: 18px;
}

.command-stack-compact .manual-tg-control .manual-send .command-button-label {
  font-size: 9px;
}

.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-info-grid.compact {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  padding-top: 0;
  border-top: 0;
}

.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-check {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.node-info-check input {
  width: 18px;
  height: 18px;
}

.node-info-json {
  margin-top: 12px;
}

.node-info-json textarea {
  min-height: 340px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.45;
  white-space: pre;
}

.node-info-error {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(190, 18, 60, .28);
  border-radius: 8px;
  background: rgba(254, 226, 226, .72);
  color: #9f1239;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.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;
}

.svx-preset-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.svx-preset-strip > div {
  min-width: 180px;
  margin-right: auto;
}

.svx-preset-strip span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.svx-preset-strip b {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.svx-preset-strip button {
  min-height: 36px;
  padding: 0 12px;
}

.svx-command-summary {
  margin-top: 6px;
}

.map-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 132px);
  min-height: 520px;
  margin-bottom: 12px;
  overflow: hidden;
}

.map-dashboard .map-panel {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-map-panel {
  height: min(52vh, 560px);
  min-height: 360px;
  margin-bottom: 10px;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.dashboard-map-panel .map-layout,
.dashboard-map-panel .map-shell,
.dashboard-map-panel .map-canvas {
  min-height: 0;
  height: 100%;
}

.map-dashboard-rail {
  position: absolute;
  left: 12px;
  top: 86px;
  z-index: 520;
  width: min(230px, calc(100vw - 48px));
  max-height: calc(100% - 110px);
  display: grid;
  gap: 7px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.map-dashboard .map-dashboard-rail {
  top: 74px;
  max-height: calc(100% - 98px);
}

.map-dashboard-rail button {
  min-height: 46px;
  display: grid;
  justify-items: start;
  gap: 2px;
  padding: 8px 10px;
  text-align: left;
}

.map-dashboard-rail button.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.map-dashboard-rail b {
  max-width: 100%;
  color: var(--text);
  font-size: 13px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-dashboard-rail small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.map-layout {
  display: grid;
  min-height: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

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

.map-panel:fullscreen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: var(--page);
}

.map-panel:fullscreen .map-layout,
.map-panel:fullscreen .map-shell,
.map-panel:fullscreen .map-canvas {
  min-height: 0;
  height: 100%;
}

.map-panel:fullscreen .map-dashboard-rail {
  top: 74px;
  max-height: calc(100dvh - 98px);
}

.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-panel:fullscreen .map-controls {
  top: 10px;
  right: 10px;
}

.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-legend {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 720;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: min(470px, calc(100% - 360px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 12px 28px rgba(20, 36, 55, .16);
  backdrop-filter: blur(8px);
}

.map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft) 88%, transparent);
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.map-legend-item i {
  width: 11px;
  height: 11px;
  display: block;
  border-radius: 999px;
  background: #25a95a;
  box-shadow: 0 0 0 3px rgba(37, 169, 90, .18);
}

.map-legend-item.rx i {
  background: #e2b21a;
  box-shadow: 0 0 0 3px rgba(226, 178, 26, .20);
}

.map-legend-item.tx i {
  background: #dc2f35;
  box-shadow: 0 0 0 3px rgba(220, 47, 53, .18);
}

.map-legend-item.offline i {
  background: #8a97a6;
  box-shadow: 0 0 0 3px rgba(138, 151, 166, .18);
}

.map-legend-item.maintenance i {
  background: #2f7edc;
  box-shadow: 0 0 0 3px rgba(47, 126, 220, .18);
}

.map-legend-item.static i {
  display: grid;
  place-items: center;
  background: #f2a900;
  box-shadow: 0 0 0 3px rgba(242, 169, 0, .18);
}

.map-legend-item.static i::before {
  content: "S";
  color: #111;
  font-size: 8px;
  font-style: normal;
  font-weight: 950;
}

.map-legend-item.line i {
  width: 24px;
  height: 0;
  border-radius: 0;
  background: transparent;
  border-top: 3px dashed #00b7ff;
  box-shadow: none;
}

.map-rx-live-banner {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 780;
  min-width: min(320px, calc(100% - 36px));
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 2px solid rgba(255, 216, 74, .94);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(32, 24, 4, .94), rgba(92, 67, 2, .92));
  color: #fff6cf;
  box-shadow: 0 18px 42px rgba(20, 36, 55, .36), 0 0 0 5px rgba(255, 216, 74, .18);
}

.map-rx-live-banner[hidden] {
  display: none;
}

.map-rx-live-banner span {
  color: #ffd84a;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.map-rx-live-banner b {
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.map-rx-live-banner small {
  color: #fff6cf;
  font-size: 14px;
  font-weight: 900;
}

.map-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #eef4f7;
}

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

.leaflet-pane > svg {
  width: auto;
  height: auto;
  stroke: initial;
  stroke-width: initial;
  stroke-linecap: initial;
  stroke-linejoin: initial;
  vector-effect: initial;
}

.leaflet-tgLinks-pane {
  z-index: 590 !important;
}

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

.tg-network-line {
  stroke-linecap: round;
  stroke-linejoin: round;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, .55))
    drop-shadow(0 0 4px rgba(0, 221, 202, .20));
}

.tg-network-line-halo {
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none;
}

.repeater-leaflet-icon span {
  --marker-color: #8a97a6;
  --marker-ring: rgba(138, 151, 166, .26);
  position: relative;
  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(255, 216, 74, .42);
  animation: marker-rx-pulse 900ms ease-in-out infinite;
}

.repeater-leaflet-icon .tx {
  --marker-color: #dc2f35;
  --marker-ring: rgba(220, 47, 53, .30);
  animation: marker-tx-pulse 1.15s ease-in-out infinite;
}

.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 .maintenance {
  --marker-color: #2f7edc;
  --marker-ring: rgba(47, 126, 220, .24);
}

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

.repeater-leaflet-icon .tg-static {
  border-style: double;
}

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

.traccar-leaflet-icon span {
  --tracker-color: #1477d4;
  --tracker-ring: rgba(20, 119, 212, .24);
  --course: 0deg;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--tracker-color);
  box-shadow: 0 8px 18px rgba(20, 36, 55, .24), 0 0 0 6px var(--tracker-ring);
}

.traccar-leaflet-icon .online {
  --tracker-color: #1477d4;
  --tracker-ring: rgba(20, 119, 212, .24);
}

.traccar-leaflet-icon .offline,
.traccar-leaflet-icon .stale,
.traccar-leaflet-icon .unknown {
  --tracker-color: #7b8794;
  --tracker-ring: rgba(123, 135, 148, .24);
}

.traccar-leaflet-icon .invalid {
  --tracker-color: #dc2f35;
  --tracker-ring: rgba(220, 47, 53, .24);
}

.traccar-leaflet-icon svg {
  width: 25px;
  height: 25px;
  display: block;
  transform: rotate(var(--course));
}

.traccar-leaflet-icon .tracker-body {
  fill: color-mix(in srgb, var(--tracker-color) 18%, #fff);
  stroke: var(--tracker-color);
  stroke-width: 2;
  stroke-linejoin: round;
}

.traccar-leaflet-icon .tracker-line {
  fill: none;
  stroke: var(--tracker-color);
  stroke-width: 2;
  stroke-linecap: round;
}

.map-tg-mode-badge {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #f2a900;
  color: #111;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(20, 36, 55, .24);
}

@keyframes marker-tx-pulse {
  0%, 100% {
    box-shadow: 0 8px 18px rgba(20, 36, 55, .24), 0 0 0 6px var(--marker-ring);
  }
  50% {
    box-shadow: 0 8px 18px rgba(20, 36, 55, .24), 0 0 0 11px var(--marker-ring);
  }
}

@keyframes marker-rx-pulse {
  0%, 100% {
    box-shadow: 0 8px 18px rgba(20, 36, 55, .24), 0 0 0 7px rgba(255, 216, 74, .42);
  }
  50% {
    box-shadow: 0 8px 18px rgba(20, 36, 55, .24), 0 0 0 14px rgba(255, 216, 74, .30);
  }
}

.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;
}

.repeater-rx-popup .leaflet-popup-content-wrapper {
  border: 1px solid color-mix(in srgb, #d99716 42%, var(--line));
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(20, 36, 55, .22);
}

.repeater-rx-popup .leaflet-popup-content {
  margin: 0;
}

.map-rx-popup-card {
  min-width: 300px;
  display: grid;
  gap: 8px;
  padding: 10px;
  color: #000;
}

.map-rx-popup-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.map-rx-popup-card span,
.map-rx-popup-card .ops-status b,
.map-rx-popup-card .ops-signal-text {
  color: #9b6200;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.map-rx-popup-card b {
  color: #000;
  font-size: 18px;
  line-height: 1;
}

.map-rx-popup-card strong {
  display: grid;
  place-items: center;
  min-width: 64px;
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--green-soft) 70%, #fff);
  color: var(--green);
  font-size: 18px;
  line-height: 1;
}

.map-rx-popup-card p {
  color: #000;
  font-size: 12px;
}

.map-popup-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.map-popup-status .ops-status,
.map-popup-status .ops-signal-icon {
  min-height: 38px;
  border-radius: 7px;
  background: #fff;
}

.map-popup-status .ops-status svg,
.map-popup-status .ops-signal-icon svg {
  width: 20px;
  height: 20px;
}

.map-popup-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
  gap: 4px;
}

.map-popup-actions button,
.map-popup-actions .audio-listen-button {
  min-height: 34px;
  justify-content: center;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.05;
  white-space: normal;
}

.map-popup-actions button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.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: 68px;
}

.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));
  gap: 1px;
}

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

.radio-tile {
  min-height: 68px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  background: var(--surface);
}

.radio-tile-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #8a98a6;
  background: var(--surface-soft);
}

.radio-tile-icon svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.radio-tile.status-online .radio-tile-icon,
.radio-tile.status-active .radio-tile-icon {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 42%, var(--line));
  background: color-mix(in srgb, var(--red) 10%, var(--surface));
}

.radio-tile.status-warn .radio-tile-icon {
  color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 48%, var(--line));
  background: color-mix(in srgb, var(--amber) 12%, var(--surface));
}

.radio-info-tile .radio-tile-icon {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 38%, var(--line));
  background: color-mix(in srgb, var(--green-soft) 74%, var(--surface));
}

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

.radio-tile b,
.radio-tile small {
  display: block;
  min-width: 0;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-tile b {
  font-size: 15px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.radio-tile small {
  margin-top: 3px;
  font-size: 11px;
  opacity: .86;
  white-space: nowrap;
}

.status-chip {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--surface);
}

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

.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: 11px;
  line-height: 1.1;
}

.status-chip small {
  margin-top: 2px;
  color: var(--text);
  font-size: 10px;
  opacity: .88;
}

.node-metric {
  min-height: 66px;
  padding: 8px 10px;
  gap: 3px;
}

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

.node-metric small {
  color: var(--text);
  font-size: 11px;
  opacity: .9;
}

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

.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: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.node-agent-panel .node-status-list .compact-row {
  min-height: 72px;
  border: 0;
  border-radius: 0;
}

.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;
}

.command-buttons button .tg-button-code {
  display: inline-block;
  margin-left: 6px;
  color: var(--muted);
  font-size: .86em;
  font-weight: 900;
}

.command-icon-button.active {
  border-color: color-mix(in srgb, var(--green) 54%, var(--line));
  background: color-mix(in srgb, var(--green-soft) 70%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 26%, transparent);
}

.command-icon-button.active.static {
  border-color: color-mix(in srgb, var(--amber) 54%, var(--line));
  background: color-mix(in srgb, #fff3d8 72%, var(--surface));
}

.manual-tg-control {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  max-width: 280px;
}

.manual-tg-control input {
  min-width: 0;
  width: 135px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.manual-tg-control input::placeholder {
  color: var(--muted);
  font-weight: 700;
}

.tg-plan-editor {
  box-shadow: none;
}

.tg-plan-help {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.tg-plan-grid {
  display: grid;
  grid-template-columns: 150px 110px minmax(180px, 1fr) minmax(140px, .8fr);
  border-top: 1px solid var(--line);
}

.tg-plan-grid > div {
  padding: 9px 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.tg-plan-grid label {
  min-width: 0;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
}

.tg-plan-grid input,
.tg-plan-grid select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.tg-plan-grid input {
  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;
}

.layout-admin-panel {
  margin-bottom: 12px;
}

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

.layout-admin-actions button {
  min-height: 42px;
  font-size: 13px;
}

.layout-modal {
  width: min(920px, calc(100vw - 28px));
}

.layout-modal .form-panel {
  box-shadow: none;
  border: 0;
  border-radius: 0;
}

.modal-checkbox-list {
  max-height: min(52vh, 460px);
  overflow: auto;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.users-grid {
  display: grid;
  grid-template-columns: minmax(420px, .95fr) minmax(520px, 1.05fr);
  gap: 10px;
  margin-bottom: 10px;
}

.users-admin-panel {
  margin-bottom: 10px;
}

.users-admin-head {
  align-items: center;
}

.users-admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, auto)) auto;
  gap: 8px;
  align-items: center;
}

.users-admin-summary article {
  min-width: 70px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.users-admin-summary b,
.users-admin-summary span {
  display: block;
}

.users-admin-summary b {
  color: var(--text);
  font-size: 15px;
}

.users-admin-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-table-head {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) 128px 96px 124px 110px 280px;
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.user-group-table-head {
  display: grid;
  grid-template-columns: minmax(240px, 1.15fr) 90px minmax(260px, 1fr) 76px;
  gap: 6px;
  padding: 7px 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.user-list {
  display: grid;
}

.mail-status {
  display: grid;
  grid-template-columns: minmax(120px, .5fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0 10px 8px;
  padding: 7px 10px;
  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: 12px;
}

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

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

.settings-panel .mail-status {
  min-width: min(520px, 100%);
  margin: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.settings-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.settings-card h3 {
  margin: 0;
  font-size: 15px;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.settings-form-grid label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.settings-form-grid input,
.settings-form-grid select,
.settings-card > label input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.settings-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-toggles label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.settings-note {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.settings-note b {
  color: var(--text);
  font-size: 12px;
}

.settings-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.module-policy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .7fr);
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.module-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.module-policy-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.module-policy-card span,
.module-policy-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.module-policy-card b {
  display: block;
  margin: 2px 0;
  color: var(--text);
  font-size: 15px;
}

.module-policy-rule-list {
  display: grid;
  gap: 5px;
}

.module-policy-rule-list label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 98px;
  gap: 6px;
  align-items: center;
  min-height: 34px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.module-policy-rule-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-policy-rule-list select {
  min-width: 0;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
}

.module-policy-form {
  grid-template-columns: 1fr;
}

.user-search-strip {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 0 12px 10px;
}

.user-search-strip label {
  display: grid;
  gap: 5px;
}

.user-search-strip span,
.user-search-strip small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.user-search-strip input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.user-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) 128px 96px 124px 110px 280px;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.user-group-row {
  grid-template-columns: minmax(240px, 1.15fr) 90px minmax(260px, 1fr) 76px;
}

.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: 15px;
  line-height: 1.15;
}

.user-row small,
.user-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.user-groups-cell {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status-cell i {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #9aa4b2;
  box-shadow: 0 0 0 4px rgba(154, 164, 178, .14);
  flex: 0 0 auto;
}

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

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

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

.user-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.user-row button,
.user-actions button {
  min-height: 34px;
  padding: 0 9px;
  font-size: 12px;
}

.users-help-panel {
  margin-bottom: 10px;
}

.roles-manager {
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
}

.roles-manager-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.roles-manager-head b,
.role-card b {
  display: block;
  color: var(--text);
}

.roles-manager-head span,
.role-card small,
.role-card span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.role-card {
  display: grid;
  gap: 7px;
  align-content: start;
  border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
  border-radius: 8px;
  padding: 9px;
  background: var(--surface-soft);
}

.role-card-actions,
.role-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-card-actions button,
.role-form-actions button {
  min-height: 30px;
  padding: 0 9px;
}

.role-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.role-permissions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
}

.role-permissions label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 2px 7px;
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
  border-radius: 8px;
  padding: 7px;
  background: var(--surface-soft);
}

.role-permissions small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
}

.user-editor-page {
  display: grid;
  gap: 10px;
}

.user-editor-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
}

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

.user-editor-hero h2 {
  margin: 2px 0;
  color: var(--text);
}

.user-editor-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.user-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.user-editor-toolbar button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.user-editor-body {
  display: grid;
  gap: 10px;
}

.user-editor-body.profile-mode {
  max-width: 880px;
}

.user-editor-body.access-mode {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.user-editor-body.access-mode .context-permissions-panel,
.user-editor-body.access-mode .effective-access-panel {
  grid-column: 1 / -1;
}

.user-editor-section {
  margin: 0;
}

.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 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.compact-form > .assignment-all,
.compact-form > .invite-status,
.compact-form > .checkbox-list,
.compact-form > .user-admin-actions,
.compact-form > .form-divider,
.compact-form > b,
.compact-form > button,
.compact-form > .empty {
  grid-column: 1 / -1;
}

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

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

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

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

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

.user-group-membership-list label {
  align-items: start;
}

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

.user-group-membership-list small {
  line-height: 1.35;
}

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

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

.context-permissions-panel {
  margin-bottom: 10px;
}

.permission-guidance {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

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

.permission-guidance b,
.permission-target-row b {
  color: var(--text);
}

.permission-guidance span,
.permission-target-row small {
  color: var(--muted);
  font-size: 11px;
}

.permission-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 10px;
}

.permission-target-section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.permission-target-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.permission-target-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px 58px;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.permission-target-row.featured {
  border-color: #78b7a7;
  background: linear-gradient(180deg, #f4fffb, var(--surface-soft));
}

:root[data-theme="dark"] .permission-target-row.featured {
  border-color: #3e8b72;
  background: linear-gradient(180deg, #143327, #1b2732);
}

.permission-target-row > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.permission-target-row select {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
  color: var(--text);
}

.permission-target-row button {
  min-height: 30px;
  padding: 0 7px;
  font-size: 11px;
}

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

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

.effective-summary article {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  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: 18px;
}

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

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

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

.effective-grid article {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  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, .7fr) minmax(0, 1fr) auto;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

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

.access-requests-panel > div:first-child {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(180px, 1fr) minmax(220px, 1.1fr);
  gap: 8px;
  align-items: center;
}

.access-requests-panel b {
  color: var(--text);
}

.access-requests-panel span,
.access-requests-panel small {
  color: var(--muted);
  font-weight: 800;
}

.access-requests-panel code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}

.access-request-list {
  display: grid;
  gap: 6px;
}

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

.access-request-list article > div:first-child {
  display: grid;
  gap: 2px;
}

.access-request-list article > div:last-child {
  display: flex;
  gap: 6px;
}

.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: 10px;
  padding: 14px 16px 16px;
}

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

.create-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
}

.create-mode-note[hidden],
.create-mode-grid[hidden],
.assignment-all[hidden] {
  display: none;
}

.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: 36px;
  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: 6px;
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: var(--surface-soft);
}

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

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

.checkbox-list small {
  color: var(--muted);
  font-size: 11px;
  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-restore-panel {
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.layout-restore-panel h3,
.layout-restore-panel p {
  margin: 0;
}

.layout-restore-panel p {
  margin-top: 4px;
  color: var(--muted);
}

.layout-restore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.layout-row.compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 0;
}

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

.layout-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.layout-fixed-badge {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  background: var(--surface);
}

.layout-row-head button,
.layout-row-actions 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 {
  min-width: 0;
  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;
  overflow-wrap: anywhere;
}

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

.release-meta {
  min-width: 0;
  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: 18px;
  background:
    linear-gradient(120deg, rgba(232, 241, 246, .88), rgba(247, 251, 252, .92)),
    #edf3f5;
}

.login-stage {
  width: min(1560px, 100%);
  min-height: min(760px, calc(100vh - 36px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 470px;
  overflow: hidden;
  border: 1px solid rgba(156, 177, 188, .46);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .30) 0%, rgba(255, 255, 255, .38) 44%, rgba(255, 255, 255, .86) 70%, #ffffff 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .00), rgba(237, 243, 245, .45)),
    url('/assets/repeater-node-photo.png') left center / cover no-repeat,
    #ffffff;
  box-shadow: 0 24px 70px rgba(38, 58, 74, .18);
}

:root[data-theme="dark"] .login-page {
  background:
    linear-gradient(120deg, rgba(10, 16, 22, .96), rgba(18, 28, 36, .94)),
    #0d141b;
}

:root[data-theme="dark"] .login-stage {
  border-color: rgba(82, 106, 123, .70);
  background:
    linear-gradient(90deg, rgba(11, 18, 24, .22) 0%, rgba(12, 20, 27, .38) 42%, rgba(17, 27, 35, .88) 70%, #111b24 100%),
    linear-gradient(180deg, rgba(13, 20, 27, .08), rgba(13, 20, 27, .66)),
    url('/assets/repeater-node-photo.png') left center / cover no-repeat,
    #111b24;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

.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, .050) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 82, 102, .050) 1px, transparent 1px);
  background-size: 42px 42px, 42px 42px, auto, auto;
}

:root[data-theme="dark"] .login-copy {
  background:
    linear-gradient(rgba(164, 191, 206, .065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164, 191, 206, .065) 1px, transparent 1px);
  background-size: 42px 42px, 42px 42px;
}

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

.login-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  padding: 4px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(31, 49, 66, .16);
}

.login-logo-banner {
  width: min(760px, 100%);
  aspect-ratio: 4.8 / 1;
  height: auto;
  min-height: 92px;
  display: grid;
  align-items: center;
}

.login-panel-logo {
  width: min(420px, 100%);
  min-height: 78px;
  margin: 0 0 20px;
}

.invite-logo-banner {
  width: min(560px, 100%);
  min-height: 82px;
}

:root[data-theme="dark"] .login-logo {
  background: rgba(13, 21, 29, .74);
  box-shadow: 0 12px 30px rgba(0, 221, 202, .12);
}

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

.login-brandline strong {
  color: var(--text);
  font-size: 19px;
  text-shadow: 0 1px 18px rgba(255, 255, 255, .65);
}

.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(44px, 5vw, 74px);
  line-height: .98;
  max-width: 720px;
  letter-spacing: 0;
  text-shadow: 0 1px 22px rgba(255, 255, 255, .70);
}

.login-title-block p {
  width: min(560px, 100%);
  margin-top: 18px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  text-shadow: 0 1px 18px rgba(255, 255, 255, .70);
}

:root[data-theme="dark"] .login-brandline strong,
:root[data-theme="dark"] .login-title-block h1,
:root[data-theme="dark"] .login-title-block p {
  text-shadow: 0 2px 22px rgba(0, 0, 0, .82);
}

.login-signal-card {
  width: fit-content;
  margin-top: 28px;
  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);
}

:root[data-theme="dark"] .login-signal-card {
  border-color: rgba(84, 214, 159, .32);
  background: rgba(17, 27, 36, .78);
  color: var(--text);
}

:root[data-theme="dark"] .login-signal-card span {
  color: var(--muted);
}

.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: 8px;
}

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

:root[data-theme="dark"] .login-live div {
  background: rgba(23, 33, 43, .86);
}

.login-live b {
  display: block;
  margin-top: 5px;
  color: var(--green);
  font-size: 22px;
  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: rgba(255, 255, 255, .96);
}

:root[data-theme="dark"] .login-panel {
  background: rgba(17, 27, 36, .96);
}

.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: 38px;
  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: var(--text);
  background: var(--surface);
}

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

.login-form input::placeholder {
  color: color-mix(in srgb, var(--text) 58%, transparent);
}

.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-panel > .powered-by {
  width: fit-content;
  margin-top: 12px;
}

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

.login-success {
  display: none;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
}

.login-has-error .login-error,
.login-has-success .login-success {
  display: block;
}

.login-theme-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: 154px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.login-theme-switch button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 9px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  gap: 5px;
  box-shadow: none;
}

.login-theme-switch button span {
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.login-theme-switch button.active {
  background: var(--green);
  color: #ffffff;
}

@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  .simple-dashboard {
    width: calc(100% - 24px);
    padding-top: 12px;
  }

  .simple-dashboard.audio-active {
    padding-bottom: 184px;
  }

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

  .simple-dashboard.map-dashboard {
    width: 100%;
    height: 100dvh;
    padding: 8px;
  }

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

  .simple-dashboard.menu-visible.map-dashboard .map-dashboard-rail,
  .simple-dashboard.menu-visible.map-dashboard .map-controls,
  .simple-dashboard.menu-visible.map-dashboard .map-legend,
  .simple-dashboard.menu-visible.map-dashboard .map-rx-live-banner {
    display: none;
  }

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

  .simple-header {
    gap: 10px;
    margin-bottom: 10px;
  }

  .map-dashboard .simple-header {
    min-height: auto;
  }

  .simple-actions {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 7px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .simple-actions > * {
    flex: 0 0 auto;
  }

  .simple-actions > .theme-switch {
    display: none;
  }

  .side-theme-switch {
    display: grid;
  }

  .side-session-section {
    display: grid;
  }

  .simple-actions > .session-widget {
    display: none;
  }

  .simple-actions > span {
    display: none;
  }

  .theme-switch {
    width: 136px;
  }

  .session-widget {
    min-width: 148px;
  }

  .brand-lockup {
    width: 100%;
    min-width: 0;
  }

  .brand-banner {
    width: clamp(172px, 44vw, 222px);
    height: 42px;
    flex: 0 1 auto;
  }

  .brand-title h1 {
    font-size: clamp(24px, 8vw, 34px);
  }

  .login-logo-banner {
    width: min(100%, 420px);
    min-height: 72px;
  }

  .login-panel-logo {
    width: min(100%, 340px);
    min-height: 62px;
  }

  .invite-logo-banner {
    min-height: 68px;
  }

  .summary-grid,
  .console-overview-grid,
  .console-quick-panel,
  .console-grid,
  .console-metric-strip,
  .effective-summary,
  .effective-grid,
  .access-requests-panel > div:first-child,
  .access-request-list article,
  .ops-dashboard-head,
  .ops-split,
  .dashboard-grid,
  .metric-grid,
  .groups-grid,
  .users-grid,
  .user-editor-body.access-mode,
  .node-command-hero,
  .node-detail-tabs,
  .node-detail-layout,
  .simple-dashboard.menu-visible .node-command-hero,
  .simple-dashboard.menu-visible .node-detail-layout,
  .simple-dashboard.menu-visible .node-detail-tech-column,
  .node-quick-commands,
  .command-stack-compact,
  .node-signal-band,
  .node-visual-grid,
  .gauge-grid,
  .node-cockpit-grid,
  .node-operations-grid,
  .node-telemetry-board,
  .node-site-summary-grid,
  .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;
  }

  .simple-dashboard,
  .page-content,
  .node-command-hero,
  .node-detail-tabs,
  .node-detail-layout,
  .node-quick-commands {
    max-width: 100%;
    overflow-x: clip;
  }

  .node-detail-tabs button {
    min-height: 58px;
    padding: 8px 10px;
  }

  .console-command-dock,
  .console-quick-panel {
    overflow: visible;
    overscroll-behavior-x: auto;
    scrollbar-width: auto;
  }

  .console-command-dock,
  .console-quick-panel {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .console-welcome {
    flex: 1 1 224px;
  }

  .console-quick-panel {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }

  .console-quick-group {
    flex: 0 1 auto;
    width: auto;
    min-width: 0;
  }

  .console-quick-group > div {
    display: flex;
    flex-wrap: wrap;
  }

  .console-quick-group button {
    flex: 0 0 84px;
    width: 84px;
    min-height: 72px;
  }

  .quick-action-icon {
    min-height: 62px;
    grid-template-rows: 30px minmax(0, 1fr);
  }

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

  .role-create-form {
    grid-template-columns: 1fr;
  }

  .user-editor-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .user-editor-toolbar {
    justify-content: flex-start;
  }

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

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

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

  .node-hero-operations,
  .node-hero-status {
    grid-template-columns: 1fr;
  }

  .node-hero-status {
    grid-template-columns: repeat(3, minmax(104px, 1fr));
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .node-hero-status .status-chip {
    min-width: 104px;
  }

  .node-command-hero .node-console-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    flex-wrap: wrap;
    place-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    padding-bottom: 2px;
    overflow: visible;
    overscroll-behavior-x: auto;
    scrollbar-width: auto;
  }

  .node-command-hero .node-console-actions button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

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

  .ping-levels,
  .node-agent-panel .node-status-list,
  .audio-service-grid {
    grid-template-columns: 1fr;
  }

  .audio-dock {
    grid-template-columns: 1fr;
    align-items: stretch;
    left: 8px;
    right: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  .audio-dock .audio-session-row {
    min-width: 0;
  }

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

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

  .command-stack.command-stack-compact {
    flex-wrap: wrap;
    overflow: visible;
    overscroll-behavior-x: auto;
    scrollbar-width: auto;
  }

  .command-stack-compact > div {
    flex: 1 1 220px;
    width: auto;
    min-width: min(100%, 220px);
  }

  .command-stack-compact .command-group-tg {
    flex-basis: 100%;
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 6px;
  }

  .command-stack-compact .command-group-tg .command-icon-grid,
  .command-stack-compact .command-icon-grid-service,
  .command-stack-compact .command-icon-grid-timeout,
  .command-stack-compact .command-icon-grid-agent {
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  }

  .command-stack-compact .command-group-tg .command-icon-grid {
    grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  }

  .command-stack-compact .command-icon-grid-agent {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-stack-compact .command-icon-button,
  .command-stack-compact .command-icon-grid-service .command-icon-button,
  .command-stack-compact .command-icon-grid-agent .command-icon-button {
    width: 100%;
    min-height: 62px;
  }

  .command-stack-compact .manual-tg-control {
    grid-template-columns: minmax(120px, 1fr) minmax(104px, auto);
    max-width: none;
    width: 100%;
  }

  .command-stack-compact .manual-tg-control input,
  .command-stack-compact .manual-tg-control .manual-send {
    min-height: 44px;
  }

  .node-quick-commands {
    gap: 4px;
    padding: 4px;
  }

  .command-stack.command-stack-compact {
    gap: 4px;
  }

  .command-stack-compact > div {
    flex: 1 1 150px;
    min-width: min(100%, 150px);
    padding: 4px;
  }

  .command-stack-compact .command-group-tg {
    flex-basis: 100%;
    row-gap: 4px;
  }

  .command-stack-compact .command-group-tg .command-icon-grid,
  .command-stack-compact .command-icon-grid-service,
  .command-stack-compact .command-icon-grid-timeout,
  .command-stack-compact .command-icon-grid-agent {
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 4px;
  }

  .command-stack-compact .command-icon-button,
  .command-stack-compact .command-icon-grid-service .command-icon-button,
  .command-stack-compact .command-icon-grid-agent .command-icon-button {
    min-height: 46px;
    padding: 3px;
  }

  .command-stack-compact .command-button-icon {
    width: 20px;
    height: 20px;
  }

  .command-stack-compact .command-button-icon svg {
    width: 18px;
    height: 18px;
  }

  .command-stack-compact .manual-tg-control {
    grid-template-columns: minmax(86px, 1fr) 58px;
  }

  .command-stack-compact .manual-tg-control input,
  .command-stack-compact .manual-tg-control .manual-send {
    min-height: 36px;
  }

  .node-table {
    min-width: 1120px;
  }

  .node-table th,
  .node-table td {
    padding: 8px 9px;
  }

  .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-bulk-tile {
    grid-template-columns: 1fr;
  }

  .dashboard-bulk-actions {
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  }

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

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

  .ops-v2-focus {
    grid-template-columns: 1fr;
  }

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

  .ops-v2-primary-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-v2-services,
  .ops-v2-meta {
    grid-template-columns: 1fr;
  }

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

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

  .compact-form,
  .permission-matrix,
  .permission-guidance,
  .module-policy-layout,
  .mail-status {
    grid-template-columns: 1fr;
  }

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

  .map-canvas {
    min-height: 0;
  }

  .map-dashboard .map-panel {
    height: auto;
    min-height: 0;
  }

  .dashboard-map-panel {
    height: 420px;
    min-height: 360px;
  }

  .map-dashboard-rail {
    top: 66px;
    left: 8px;
    right: 8px;
    width: auto;
    grid-auto-flow: column;
    grid-auto-columns: minmax(116px, 1fr);
    overflow-x: auto;
    overflow-y: hidden;
    max-height: 68px;
    padding: 6px;
  }

  .map-dashboard-rail button {
    min-height: 42px;
    padding: 6px 8px;
  }

  .map-controls {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    justify-content: space-between;
    gap: 6px;
  }

  .map-controls select {
    min-width: 0;
    flex: 1 1 auto;
  }

  .map-controls button {
    flex: 0 0 auto;
    padding: 0 10px;
  }

  .map-legend {
    left: 8px;
    right: 8px;
    bottom: 62px;
    max-width: none;
    gap: 4px;
    padding: 6px;
  }

  .map-legend-item {
    padding: 3px 6px;
    font-size: 9px;
  }

  .map-panel:fullscreen .map-controls {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
  }

  .map-rx-live-banner {
    left: 8px;
    right: 8px;
    bottom: 118px;
    min-width: 0;
    padding: 10px 12px;
  }

  .map-rx-live-banner b {
    font-size: 21px;
  }

  .repeater-leaflet-icon span {
    width: 32px;
    height: 32px;
  }

  .repeater-leaflet-icon svg {
    width: 23px;
    height: 23px;
  }

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

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

  .login-panel {
    order: 1;
    border-left: 0;
    border-top: 0;
  }

  .login-copy {
    order: 2;
    align-content: start;
    gap: 12px;
    border-top: 1px solid var(--line);
  }

  .login-title-block {
    display: none;
  }

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

  .login-live div {
    min-height: 52px;
    padding: 8px 10px;
  }

  .login-live b {
    font-size: 17px;
  }

  .login-stage {
    min-height: auto;
    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;
  }

  :root[data-theme="dark"] .login-stage {
    background:
      linear-gradient(180deg, rgba(17, 27, 36, .94), rgba(17, 27, 36, .96)),
      url('/assets/repeater-node-photo.png') center top / cover no-repeat,
      #111b24;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 25px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .login-live {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-page {
    align-items: flex-start;
  }

  .login-panel-logo {
    margin: 0 0 12px;
  }

  .login-panel-head {
    margin-bottom: 16px;
  }

  .login-panel h2 {
    font-size: 30px;
  }

  .login-panel p {
    font-size: 13px;
  }

  .brand-lockup {
    gap: 8px;
  }

  .brand-banner {
    width: clamp(144px, 48vw, 190px);
    height: 36px;
  }

  .mark,
  .menu-toggle {
    width: 40px;
    min-width: 40px;
    flex: 0 0 40px;
    height: 40px;
    min-height: 40px;
  }

  .theme-switch,
  .session-widget {
    max-width: 100%;
  }

  .theme-switch {
    height: 38px;
  }

  .theme-switch button {
    min-height: 32px;
    height: 32px;
  }

  .simple-header {
    position: relative;
    align-items: flex-start;
    flex-direction: row;
    gap: 8px;
  }

  .simple-actions {
    width: auto;
    flex: 0 0 auto;
    margin-left: -2px;
    margin-right: -2px;
    padding-bottom: 0;
    overflow: visible;
  }

  .brand-lockup {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas:
      "menu logo"
      "back logo"
      ". title";
    align-items: center;
    column-gap: 6px;
    row-gap: 3px;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .menu-toggle {
    grid-area: menu;
  }

  .mobile-header-back {
    grid-area: back;
    display: inline-flex;
    width: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .desktop-header-back {
    display: none;
  }

  .brand-banner {
    grid-area: logo;
    width: 100%;
    max-width: 270px;
    height: 58px;
    justify-self: center;
    overflow: visible;
  }

  .brand-title {
    grid-area: title;
    min-width: 0;
    justify-self: center;
  }

  .brand-title > span {
    display: none;
  }

  .brand-title > div {
    display: block;
  }

  .brand-title h1 {
    text-align: center;
    font-size: 24px;
    line-height: 1;
  }

  .simple-actions .install-app-button span,
  .simple-actions [data-action="refresh"] span {
    display: none;
  }

  .simple-actions .install-app-button,
  .simple-actions [data-action="refresh"] {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
  }

  .session-widget {
    grid-template-columns: auto auto auto;
    min-width: 134px;
    padding: 4px 5px;
  }

  .session-widget span {
    font-size: 9px;
  }

  .session-widget b {
    min-width: 44px;
    font-size: 11px;
  }

  .session-widget button {
    grid-column: auto;
    width: auto;
    min-height: 28px;
    padding: 0 7px;
  }

  .console-command-dock {
    margin-left: -4px;
    margin-right: -4px;
    padding: 0 4px 4px;
  }

  .console-welcome {
    flex-basis: 206px;
    min-height: 78px;
  }

  .console-overview-grid .summary-card {
    width: 102px;
    min-width: 102px;
    min-height: 74px;
    padding: 7px;
  }

  .console-stat b {
    font-size: 17px;
  }

  .console-quick-group {
    padding: 6px;
  }

  .console-quick-group > span {
    font-size: 10px;
  }

  .console-quick-group button {
    flex-basis: 78px;
    width: 78px;
    min-height: 78px;
  }

  .quick-action-icon {
    min-height: 68px;
    padding: 5px 2px;
  }

  .quick-action-icon svg {
    width: 27px;
    height: 27px;
  }

  .quick-action-icon strong {
    font-size: 10px;
  }

  .console-grid {
    gap: 8px;
  }

  .simple-panel {
    border-radius: 9px;
  }

  .simple-panel-head {
    gap: 8px;
    padding: 12px;
  }

  .users-admin-head {
    align-items: stretch;
  }

  .users-admin-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .users-admin-summary article,
  .users-admin-summary button {
    min-width: 0;
    width: 100%;
  }

  .user-group-table-head {
    display: none;
  }

  .node-command-hero {
    gap: 6px;
  }

  .node-identity {
    padding: 10px 12px;
  }

  .node-identity h2 {
    font-size: 18px;
  }

  .active-tg-hero {
    min-height: 76px;
    padding: 10px 12px;
  }

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

  .node-hero-operations {
    padding: 6px;
  }

  .node-command-hero .node-console-actions button {
    min-height: 40px;
    min-width: 0;
    padding: 0 10px;
  }

  .node-quick-commands {
    padding: 6px;
  }

  .command-stack.command-stack-compact {
    margin-left: -2px;
    margin-right: -2px;
    padding-bottom: 4px;
  }

  .command-stack-compact .command-icon-button {
    width: 100%;
    min-height: 64px;
  }

  .command-stack-compact .command-icon-grid-service .command-icon-button,
  .command-stack-compact .command-icon-grid-agent .command-icon-button {
    width: 100%;
  }

  .command-stack-compact .command-button-label {
    font-size: 10px;
  }

  .user-table-head {
    display: none;
  }

  .user-list {
    display: grid;
    gap: 8px;
    overflow: visible;
  }

  .user-row,
  .user-group-row {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
  }

  .user-row > span,
  .user-row .user-groups-cell {
    white-space: normal;
  }

  .user-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-row button,
  .user-actions button {
    min-height: 40px;
    font-size: 12px;
  }

  .release-card {
    padding: 13px;
  }

  .release-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .release-card-head strong {
    width: max-content;
  }

  .release-meta {
    grid-template-columns: 1fr;
  }

  .map-dashboard .map-panel {
    height: auto;
  }

  .map-dashboard-rail {
    top: 58px;
    grid-auto-columns: minmax(102px, 1fr);
  }

  .map-dashboard-rail b {
    font-size: 12px;
  }

  .map-dashboard-rail small {
    font-size: 10px;
  }

  .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;
  }

  .node-health-primary .gauge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
