:root {
  --bg: #10161d;
  --bg-soft: #151b22;
  --panel: rgba(27, 34, 42, 0.92);
  --panel-2: #202832;
  --line: rgba(145, 156, 173, 0.12);
  --text: #d6dbe3;
  --muted: #7f8898;
  --faint: #59616e;
  --green: #16d77a;
  --red: #ff393d;
  --yellow: #ffc928;
  --orange: #ff781f;
  --cyan: #18c7ff;
}

body[data-theme="light"] {
  --bg: #eef4fa;
  --bg-soft: #f6f9fc;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-2: #ffffff;
  --line: rgba(73, 88, 110, 0.12);
  --text: #1c2733;
  --muted: #697587;
  --faint: #94a0b2;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(102, 121, 141, 0.12), transparent 24rem),
    linear-gradient(180deg, #111922 0%, #12171d 52%, #101418 100%);
  color: var(--text);
  font-family: "JetBrains Mono", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  text-rendering: geometricPrecision;
}

body[data-theme="light"] {
  background:
    radial-gradient(circle at 72% 28%, rgba(90, 119, 153, 0.12), transparent 24rem),
    linear-gradient(180deg, #f7fbff 0%, #eef4fa 52%, #e8eff7 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 100% 34px, 42px 100%;
  content: "";
}

body[data-theme="light"]::before {
  background:
    linear-gradient(rgba(16, 24, 40, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 40, 0.025) 1px, transparent 1px);
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 28px;
}

main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr) auto;
  height: 43px;
  border-bottom: 1px solid #26313d;
  background: #0c131b;
}

body[data-theme="light"] .topbar {
  border-bottom-color: #d6e0eb;
  background: #f4f8fc;
}

.brand {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  background: #0a1119;
}

body[data-theme="light"] .brand {
  background: #ffffff;
  color: #17202c;
}

.brand {
  gap: 12px;
  color: #f5f7fb;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(from 30deg, #ff3b3b, #ffd029, #ff6e1f, #8e39ff, #ff3b3b);
  box-shadow: inset 0 0 0 4px #0a1119;
}

body[data-theme="light"] .brand-mark {
  box-shadow: inset 0 0 0 4px #ffffff;
}

.brand-mark svg {
  width: 13px;
  height: 13px;
  color: #fff;
  stroke-width: 2.4;
}

.region-tabs {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  background: #0f1720;
}

body[data-theme="light"] .region-tabs {
  background: #eef4fa;
}

.region-tabs button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-width: 64px;
  width: max-content;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 14px;
  background: transparent;
  color: #8791a1;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.16em;
  cursor: pointer;
}

.region-tabs button span,
.region-tabs button small {
  flex: 0 0 auto;
  white-space: nowrap;
}

.region-tabs button small {
  font-size: 0.86em;
  letter-spacing: 0.08em;
  opacity: 0.82;
}

body[data-theme="light"] .region-tabs button {
  border-right-color: rgba(15, 23, 42, 0.06);
  color: #5e6b7d;
}

.region-tabs button.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

body[data-theme="light"] .region-tabs button.active {
  background: rgba(37, 99, 235, 0.12);
  color: #1f2937;
}

.version-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 100%;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(24, 199, 255, 0.20);
  padding: 0 12px;
  background: linear-gradient(180deg, #142236, #0d1826);
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-theme="light"] .version-tag {
  border-left-color: rgba(15, 23, 42, 0.08);
  border-right-color: rgba(37, 99, 235, 0.16);
  background: linear-gradient(180deg, #ffffff, #e8f1ff);
  color: #2563eb;
}

.admin-version-tag {
  height: 24px;
  min-width: auto;
  border: 1px solid rgba(37, 99, 235, 0.18);
  padding: 0 9px;
  background: linear-gradient(180deg, #ffffff, #e8f1ff);
  color: #2563eb;
  font-size: 11px;
  letter-spacing: 0.10em;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 14px;
  background: #0f1720;
  color: #cfd6df;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  cursor: pointer;
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

body[data-theme="light"] .theme-toggle {
  border-left-color: rgba(15, 23, 42, 0.08);
  background: #eef4fa;
  color: #475467;
}

.region-tabs .flag {
  display: block;
  width: 24px;
  height: 18px;
  border-radius: 2px;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.ticker {
  display: block;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  background: rgba(34, 44, 53, 0.94);
}

body[data-theme="light"] .ticker {
  background: rgba(255, 255, 255, 0.94);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  overflow-x: auto;
}

.metric {
  min-width: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.14);
  padding: 8px 12px;
}

.metric span,
.panel-title,
.watchlist th,
.statusbar {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.24em;
}

.metric strong {
  display: block;
  margin-top: 4px;
  color: #e7edf4;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

body[data-theme="light"] .metric strong {
  color: #17202c;
}

.metric.good strong,
.up {
  color: var(--green);
}

.metric.bad strong,
.down {
  color: var(--red);
}

.metric.warn strong,
.warn {
  color: var(--yellow);
}

.metric.info strong,
.info {
  color: var(--cyan);
}

.dashboard {
  display: block;
  flex: 1;
  min-height: 0;
}

.panel {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.watchlist {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  background: rgba(10, 13, 17, 0.35);
}

body[data-theme="light"] .panel-title {
  background: rgba(248, 251, 255, 0.96);
}

.panel-title b {
  display: inline-block;
  margin-right: 8px;
  padding: 3px 8px;
  background: var(--red);
  color: #fff;
  letter-spacing: 0.16em;
}

.panel-title em {
  color: var(--muted);
  font-style: normal;
}

.table-wrap {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

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

.watch-col-node {
  width: auto;
}

.watch-col-compact {
  width: 96px;
}

.watch-col-rate {
  width: 156px;
}

.watch-col-total {
  width: 190px;
}

.watchlist th,
.watchlist td {
  height: 38px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  padding: 0 10px;
  text-align: center;
  white-space: nowrap;
}

body[data-theme="light"] .watchlist th,
body[data-theme="light"] .watchlist td {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

.watchlist th:first-child,
.watchlist td:first-child {
  padding-left: 22px;
  padding-right: 16px;
  text-align: left;
}

.watchlist tbody tr {
  background: linear-gradient(90deg, rgba(26, 36, 45, 0.82), rgba(20, 26, 32, 0.9));
  cursor: default;
}

body[data-theme="light"] .watchlist tbody tr {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.96));
}

.watchlist tbody tr.offline {
  opacity: 0.58;
}

.watchlist tbody tr:focus-visible {
  outline: 1px solid rgba(24, 199, 255, 0.65);
  outline-offset: -1px;
}

.watchlist tbody tr:hover {
  background: linear-gradient(90deg, rgba(49, 63, 76, 0.98), rgba(27, 36, 45, 0.96));
}

body[data-theme="light"] .watchlist tbody tr:hover {
  background: linear-gradient(90deg, rgba(235, 244, 255, 0.98), rgba(243, 248, 255, 0.98));
}

.watchlist tbody tr:hover .symbol {
  color: #fff;
}

body[data-theme="light"] .watchlist tbody tr:hover .symbol {
  color: #17202c;
}

.empty-watch-row {
  cursor: default;
}

.empty-watch-row td {
  height: 120px;
  color: var(--muted);
  text-align: center;
}

.empty-watch-row:hover {
  background: linear-gradient(90deg, rgba(26, 36, 45, 0.82), rgba(20, 26, 32, 0.9));
}

.symbol {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, auto);
  align-items: center;
  column-gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: #dce3ec;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  vertical-align: middle;
}

body[data-theme="light"] .symbol {
  color: #22303d;
}

.symbol-main {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.symbol-name-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.symbol-name-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.symbol-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-tags {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
  justify-self: end;
  width: auto;
  max-width: 260px;
  margin-left: auto;
  overflow: hidden;
}

.server-tag,
.server-tag-more {
  display: inline-flex;
  align-items: center;
  max-width: 96px;
  min-height: 21px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 999px;
  padding: 0 9px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.18), rgba(14, 116, 144, 0.12));
  color: #c6ddff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-tag-more {
  max-width: none;
  border-color: rgba(148, 163, 184, 0.26);
  background: rgba(148, 163, 184, 0.16);
  color: #d8e1ec;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.server-tag-more:hover,
.server-tag-more.active {
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(37, 99, 235, 0.22);
  color: #eff6ff;
}

body[data-theme="light"] .server-tag {
  border-color: rgba(37, 99, 235, 0.16);
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
}

body[data-theme="light"] .server-tag-more {
  background: #eef2f7;
  color: #475467;
}

body[data-theme="light"] .server-tag-more:hover,
body[data-theme="light"] .server-tag-more.active {
  border-color: rgba(37, 99, 235, 0.22);
  background: #dbeafe;
  color: #1d4ed8;
}

.tag-popover {
  position: fixed;
  z-index: 80;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 14px;
  padding: 10px;
  background: rgba(18, 25, 34, 0.98);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

body[data-theme="light"] .tag-popover {
  border-color: rgba(37, 99, 235, 0.14);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.offline .status-dot {
  background: var(--red);
}

.row-flag {
  display: inline-block;
  width: 28px;
  height: 18px;
  border-radius: 2px;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.total-transfer {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(72px, max-content));
  gap: 10px;
  justify-content: center;
  align-items: center;
  min-width: 158px;
  white-space: nowrap;
}

.total-transfer span {
  display: block;
  text-align: right;
}

.watch-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  font-variant-numeric: tabular-nums;
}

.watch-value-rate {
  min-width: 118px;
}

.statusbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 28px;
  border-top: 1px solid #252b33;
  padding: 0 14px;
  background: rgba(15, 18, 23, 0.96);
}

body[data-theme="light"] .statusbar {
  border-top-color: #d6e0eb;
  background: rgba(250, 252, 255, 0.96);
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.statusbar strong,
.statusbar b {
  color: var(--green);
}

.powered {
  margin-left: auto;
}

.detail-shell main {
  gap: 12px;
  padding: 12px;
}

.detail-topline {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 14px;
  background: #0f1720;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

body[data-theme="light"] .detail-topline {
  border-left-color: rgba(15, 23, 42, 0.08);
  background: #eef4fa;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #c9d1dc;
  text-decoration: none;
}

body[data-theme="light"] .back-link {
  color: #475467;
}

.back-link svg {
  width: 15px;
  height: 15px;
}

.node-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  min-height: 122px;
  padding: 16px 24px;
}

body[data-theme="light"] .node-hero {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 253, 0.98));
}

.node-hero p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.24em;
}

.node-hero h1 {
  margin: 0;
  color: #eef3f9;
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.12;
}

body[data-theme="light"] .node-hero h1 {
  color: #17202c;
}

.node-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
}

.node-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
  letter-spacing: 0.08em;
}

body[data-theme="light"] .node-meta span {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.node-pill {
  color: var(--green);
}

.node-pill.offline {
  color: var(--red);
}

.node-health {
  display: grid;
  min-width: 160px;
  place-content: center;
  padding-left: 24px;
  text-align: right;
}

.node-health span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.24em;
}

.node-health strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

body[data-theme="light"] .node-health span {
  color: #697587;
}

.node-meta b {
  color: #dce3ec;
  font-weight: 600;
  letter-spacing: 0.04em;
}

body[data-theme="light"] .node-meta b {
  color: #22303d;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(320px, 0.95fr);
  align-items: stretch;
  gap: 12px;
}

.detail-stack {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-width: 0;
}

.detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(29, 38, 47, 0.98), rgba(20, 27, 34, 0.98));
}

body[data-theme="light"] .detail-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 249, 255, 0.99));
}

.detail-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.detail-panel-title span {
  display: inline-flex;
  align-items: center;
}

.detail-panel-title span::before {
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px currentColor;
  color: var(--cyan);
  content: "";
}

.detail-panel-title em {
  color: var(--faint);
  font-style: normal;
}

body[data-theme="light"] .detail-panel-title span,
body[data-theme="light"] .detail-panel-title em {
  color: #7b8798;
}

.resource-stack {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.meter-card {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

body[data-theme="light"] .meter-card {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

.meter-card:last-child {
  border-bottom: 0;
}

.meter-head {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
}

.meter-head svg {
  width: 17px;
  height: 17px;
  color: var(--cyan);
}

.meter-head span,
.spec-row span,
.traffic-item span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.2em;
}

.meter-head strong {
  color: #edf3f9;
  font-size: 18px;
  font-weight: 700;
}

body[data-theme="light"] .meter-head strong {
  color: #17202c;
}

.meter-track {
  height: 6px;
  margin: 12px 0 8px 38px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

body[data-theme="light"] .meter-track {
  background: rgba(15, 23, 42, 0.08);
}

.meter-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.meter-card p {
  margin: 0 0 0 38px;
  color: #cfd6df;
  font-size: 13px;
}

body[data-theme="light"] .meter-card p {
  color: #4f5f72;
}

.spec-list {
  display: grid;
}

.spec-row {
  display: grid;
  grid-template-columns: 24px 94px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  padding: 0 16px;
}

body[data-theme="light"] .spec-row {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

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

.spec-row svg {
  width: 16px;
  height: 16px;
  color: var(--cyan);
}

.spec-row strong {
  color: #edf3f9;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body[data-theme="light"] .spec-row strong {
  color: #17202c;
}

.traffic-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: calc(100% - 38px);
}

.traffic-item {
  min-height: 76px;
  border-right: 1px solid rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  padding: 18px;
}

body[data-theme="light"] .traffic-item {
  border-right-color: rgba(15, 23, 42, 0.06);
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

.traffic-item:nth-child(2n) {
  border-right: 0;
}

.traffic-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.traffic-item strong {
  display: block;
  margin-top: 12px;
  font-size: 24px;
  font-weight: 700;
  white-space: nowrap;
}

.realtime-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.realtime-section {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(20, 27, 34, 0.92);
}

body[data-theme="light"] .realtime-section {
  background: rgba(255, 255, 255, 0.94);
}

.range-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  justify-self: center;
  border: 1px solid var(--line);
  background: rgba(15, 23, 32, 0.82);
}

body[data-theme="light"] .range-tabs {
  background: rgba(247, 250, 255, 0.96);
}

.range-tabs button {
  min-width: 72px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 9px 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

body[data-theme="light"] .range-tabs button {
  border-right-color: rgba(15, 23, 42, 0.08);
  color: #697587;
}

.range-tabs button:last-child {
  border-right: 0;
}

.range-tabs button.active,
.range-tabs button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #eef3f9;
}

body[data-theme="light"] .range-tabs button.active,
body[data-theme="light"] .range-tabs button:hover {
  background: rgba(37, 99, 235, 0.12);
  color: #1f2937;
}

.realtime-card {
  min-height: 220px;
}

.realtime-card-body {
  padding: 18px;
}

.realtime-card-head {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.realtime-card-head svg {
  width: 18px;
  height: 18px;
  color: var(--cyan);
}

.realtime-card strong {
  color: #edf3f9;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}

body[data-theme="light"] .realtime-card strong {
  color: #17202c;
}

.echart {
  width: 100%;
  height: 150px;
  margin-top: 10px;
}

.latency-panel {
  grid-column: 1 / -1;
}

body[data-theme="light"] .latency-chart {
  background: rgba(255, 255, 255, 0.92);
}

.latency-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
}

.latency-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.025);
  color: #cfd6df;
}

body[data-theme="light"] .latency-control {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: #344054;
}

.latency-control span {
  color: var(--muted);
  font-size: 12px;
}

.latency-control button {
  border: 0;
  padding: 5px 8px;
  background: transparent;
  color: #cfd6df;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

body[data-theme="light"] .latency-control button {
  color: #344054;
}

.latency-control button.active,
.latency-control button.soft {
  background: rgba(24, 199, 255, 0.1);
  color: var(--cyan);
}

.latency-control label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  cursor: pointer;
}

.latency-control input {
  width: 15px;
  height: 15px;
  accent-color: var(--cyan);
}

.latency-date-filter {
  gap: 10px;
}

.latency-date-filter label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.latency-date-filter input {
  width: 142px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.025);
  color: #dce3ec;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color-scheme: dark;
  appearance: auto;
  -webkit-appearance: auto;
}

body[data-theme="light"] .latency-date-filter input {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
  color: #17202c;
  color-scheme: light;
}

.latency-date-filter input::-webkit-calendar-picker-indicator {
  opacity: 0.75;
  cursor: pointer;
}

.latency-chart {
  width: 100%;
  height: 430px;
}

.admin-login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #f4f7fb;
}

.admin-login-card {
  width: min(420px, 100%);
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(31, 45, 61, 0.08);
}

.admin-login-brand {
  width: fit-content;
  height: auto;
  padding: 0;
  background: transparent;
  color: #17202c;
}

.admin-login-brand .brand-mark {
  box-shadow: inset 0 0 0 4px #fff;
}

.admin-login-card h1 {
  margin: 28px 0 8px;
  color: #17202c;
  font-size: 28px;
}

.admin-login-card p {
  display: none;
  margin: 0;
  color: var(--muted);
}

.admin-login-card label,
.admin-modal-card label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: #667085;
  font-size: 12px;
  letter-spacing: 0.16em;
}

.admin-login-card input,
.admin-modal-card input,
.admin-modal-card textarea,
.setting-field input,
.setting-field select {
  width: 100%;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: #17202c;
  font: inherit;
  letter-spacing: 0;
}

.admin-modal-card textarea {
  min-height: 108px;
  resize: vertical;
  line-height: 1.5;
}

.admin-login-card button,
.admin-modal-actions button,
.admin-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-primary-btn.compact,
.admin-secondary-btn.compact,
.admin-danger-btn.compact,
.admin-ghost-btn.compact {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

.admin-login-card button {
  width: 100%;
  margin-top: 22px;
}

.admin-error {
  border: 1px solid rgba(255, 57, 61, 0.3);
  padding: 10px 12px;
  background: rgba(255, 57, 61, 0.08);
  color: #ff787b;
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: 43px minmax(0, 1fr);
  min-height: 100vh;
  background: #f4f7fb;
  color: #17202c;
}

.admin-navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  height: 43px;
  border-bottom: 1px solid #dfe6ef;
  background: #fff;
}

.admin-navbar .brand {
  background: linear-gradient(180deg, #f9fbff, #eff5fb);
  color: #17202c;
  border-right: 1px solid #dfe6ef;
}

.admin-navbar .brand-mark {
  box-shadow: inset 0 0 0 4px #f8fbff;
}

.admin-navbar-title,
.admin-navbar-user {
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.admin-navbar-title {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.admin-navbar-user {
  gap: 14px;
  color: #344054;
  font-size: 12px;
}

.admin-navbar-user a {
  color: #2563eb;
  text-decoration: none;
}

.admin-sidebar {
  position: sticky;
  top: 43px;
  z-index: 10;
  align-self: start;
  height: calc(100vh - 43px);
  overflow-y: auto;
  border-right: 1px solid #dfe6ef;
  background: #fff;
  padding: 12px;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 12px;
  color: #667085;
  text-decoration: none;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
  background: #eef4ff;
  color: #2563eb;
}

.admin-menu-group {
  margin-top: 8px;
}

.admin-menu-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  color: #667085;
  font-weight: 600;
}

.admin-submenu {
  display: grid;
  gap: 4px;
  margin-left: 27px;
}

.admin-submenu a {
  min-height: 34px;
  font-size: 13px;
}

.admin-sidebar svg,
.admin-primary-btn svg {
  width: 17px;
  height: 17px;
}

.admin-menu-label svg {
  width: 17px;
  height: 17px;
}

.admin-main {
  min-width: 0;
  padding: 18px;
}

.admin-content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.admin-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-content-head p {
  display: none;
}

.admin-content-head h1 {
  margin: 0;
  color: #17202c;
  font-size: 24px;
}

.admin-table-panel {
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  background: #fff;
  overflow: visible;
}

.admin-table-panel .panel-title {
  border-bottom-color: #eef2f7;
  background: #fff;
  color: #667085;
}

.admin-table-panel .panel-title b {
  background: #2563eb;
  color: #fff;
}

.admin-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  min-height: auto;
  padding: 12px 14px;
}

.admin-table-toolbar-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-table-toolbar-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  width: min(100%, 700px);
}

.admin-search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-search-form input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d8e0eb;
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
  color: #17202c;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.admin-search-form input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.admin-search-form .admin-secondary-btn.compact,
.admin-search-form .admin-ghost-btn.compact {
  min-height: 36px;
  white-space: nowrap;
}

.setting-token-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.admin-table-panel .table-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

.admin-table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #eef2f7;
  padding: 12px 14px;
  color: #667085;
  font-size: 13px;
}

.admin-table-page-info {
  margin-right: auto;
  font-weight: 700;
  color: #344054;
}

.admin-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.admin-page-size select {
  min-height: 34px;
  border: 1px solid #d8e0eb;
  border-radius: 9px;
  padding: 0 30px 0 10px;
  background: #fff;
  color: #17202c;
  font: inherit;
  font-weight: 700;
}

.admin-pager-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.admin-pager-actions .admin-ghost-btn.compact {
  min-height: 34px;
  padding: 0 11px;
}

.admin-pager-actions .admin-ghost-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.admin-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  table-layout: auto;
}

.admin-table th,
.admin-table td {
  width: auto;
  min-height: 48px;
  border-bottom: 1px solid #eef2f7;
  padding: 11px 14px;
  vertical-align: middle;
  text-align: left;
  color: #17202c;
}

.admin-table th:first-child,
.admin-table td:first-child {
  width: auto;
  padding-left: 16px;
  padding-right: 10px;
}

.admin-table th:nth-child(n + 2),
.admin-table td:nth-child(n + 2) {
  min-width: 0;
  padding-left: 14px;
  padding-right: 14px;
}

.admin-table tbody tr {
  cursor: default;
  background: #fff;
}

.admin-table tbody tr:hover {
  background: #f8fafc;
}

.admin-server-table tbody tr.dragging {
  opacity: 0.72;
  background: #eef4ff;
}

.admin-server-table tbody tr.selected {
  background: #f5f9ff;
}

.table-check-col {
  width: 44px;
}

.table-check-col input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.table-drag-col {
  width: 52px;
  text-align: center;
}

.drag-handle {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  color: #667085;
  cursor: grab;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-handle svg {
  width: 15px;
  height: 15px;
}

.server-name-cell {
  display: grid;
  gap: 4px;
  user-select: text;
}

.server-name-cell strong {
  font-size: 13px;
  line-height: 1.3;
  user-select: text;
}

.server-name-cell small {
  color: #667085;
  font-size: 11px;
  line-height: 1.3;
  word-break: break-all;
  user-select: text;
}

.server-status-pill,
.server-group-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.server-status-pill.enabled {
  border: 1px solid rgba(22, 163, 74, 0.16);
  background: #f0fdf4;
  color: #15803d;
}

.server-status-pill.disabled {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #f8fafc;
  color: #64748b;
}

.server-group-chip {
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: #eef4ff;
  color: #2563eb;
}

.server-group-chip.empty {
  border-color: rgba(148, 163, 184, 0.16);
  background: #f8fafc;
  color: #667085;
}

.agent-version-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.agent-version-pill.current {
  border: 1px solid rgba(22, 163, 74, 0.16);
  background: #ecfdf3;
  color: #15803d;
}

.agent-version-pill.outdated {
  border: 1px solid rgba(245, 158, 11, 0.18);
  background: #fff7e6;
  color: #b45309;
}

.agent-version-pill.upgrade-action {
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.agent-version-pill.upgrade-action:hover {
  border-color: rgba(245, 158, 11, 0.32);
  box-shadow: 0 8px 18px rgba(180, 83, 9, 0.12);
  transform: translateY(-1px);
}

.agent-version-pill.upgrade-action.loading {
  opacity: 0.65;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.agent-version-pill.unknown {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #f8fafc;
  color: #64748b;
}

.server-sync-pill,
.server-connection-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: default;
}

.server-sync-pill::after,
.server-connection-pill::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 30;
  width: min(280px, 38vw);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  color: #344054;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.server-sync-pill::before,
.server-connection-pill::before {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  z-index: 29;
  width: 10px;
  height: 10px;
  border-right: 1px solid rgba(15, 23, 42, 0.12);
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.98);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) rotate(45deg) translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.server-sync-pill:hover::after,
.server-sync-pill:hover::before,
.server-sync-pill:focus-visible::after,
.server-sync-pill:focus-visible::before,
.server-connection-pill:hover::after,
.server-connection-pill:hover::before,
.server-connection-pill:focus-visible::after,
.server-connection-pill:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.server-sync-pill:hover::before,
.server-sync-pill:focus-visible::before,
.server-connection-pill:hover::before,
.server-connection-pill:focus-visible::before {
  transform: translateX(-50%) rotate(45deg) translateY(0);
}

.server-sync-pill.synced {
  border: 1px solid rgba(22, 163, 74, 0.16);
  background: #ecfdf3;
  color: #15803d;
}

.server-sync-pill.pending {
  border: 1px solid rgba(245, 158, 11, 0.16);
  background: #fffbeb;
  color: #b45309;
}

.server-sync-pill.offline {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #f8fafc;
  color: #64748b;
}

.server-connection-pill.websocket {
  border: 1px solid rgba(37, 99, 235, 0.16);
  background: #eff6ff;
  color: #1d4ed8;
}

.server-connection-pill.http {
  border: 1px solid rgba(22, 163, 74, 0.16);
  background: #ecfdf3;
  color: #15803d;
}

.server-connection-pill.fallback {
  border: 1px solid rgba(245, 158, 11, 0.18);
  background: #fff7e6;
  color: #b45309;
}

.server-connection-pill.starting,
.server-connection-pill.unknown {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #f8fafc;
  color: #64748b;
}

button.server-status-pill {
  cursor: pointer;
}

button.server-status-pill:disabled {
  opacity: 0.6;
  cursor: wait;
}

.server-inline-group-select {
  width: 100%;
  min-height: 32px;
  border: 1px solid #d8e0eb;
  border-radius: 9px;
  padding: 0 32px 0 10px;
  background-image:
    linear-gradient(45deg, transparent 50%, #667085 50%),
    linear-gradient(135deg, #667085 50%, transparent 50%),
    linear-gradient(180deg, #ffffff, #f8fbff);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 10px) calc(50% - 2px),
    0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
  color: #17202c;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
}

.server-inline-group-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.latency-group-multi {
  position: relative;
  width: 100%;
}

.latency-group-multi.inline {
  min-width: 150px;
}

.admin-server-table tr.menu-open {
  position: relative;
  z-index: 20;
}

.latency-group-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  border: 1px solid #d8e0eb;
  border-radius: 9px;
  padding: 0 10px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #17202c;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.latency-group-trigger:hover,
.latency-group-trigger[aria-expanded="true"] {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.latency-group-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.latency-group-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latency-group-trigger svg {
  width: 15px;
  height: 15px;
  color: #667085;
}

.latency-group-menu {
  position: absolute;
  z-index: 300;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  max-height: 220px;
  min-width: 180px;
  overflow: auto;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.latency-group-menu[hidden] {
  display: none;
}

.latency-group-option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 34px;
  border-radius: 8px;
  padding: 0 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.latency-group-option:hover {
  background: #f1f5ff;
}

.latency-group-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.latency-group-option span::before {
  content: "";
  display: inline-flex;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  vertical-align: -2px;
  background: #fff;
}

.latency-group-option input:checked + span {
  color: #1d4ed8;
}

.latency-group-option input:checked + span::before {
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: inset 0 0 0 3px #fff;
}

.search-hit-cell {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.12));
  border-radius: 6px;
  padding-inline: 4px;
}

.search-hit-control {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.admin-empty-row td {
  color: #667085;
  text-align: center;
}

.admin-filter-empty-row td {
  background: #fbfcfe;
}

.admin-placeholder-panel {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  background: #fff;
  color: #667085;
  text-align: center;
}

.admin-placeholder-panel svg {
  width: 34px;
  height: 34px;
  color: #2563eb;
}

.admin-placeholder-panel strong {
  display: block;
  color: #17202c;
  font-size: 20px;
}

.admin-flash {
  border-radius: 9px;
  margin-bottom: 14px;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 700;
}

.admin-flash.success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.admin-flash.error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
}

.admin-settings-panel {
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  background: #fff;
  padding: 18px;
}

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

.settings-grid .wide {
  grid-column: 1 / -1;
}

.setting-field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.setting-field span {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.setting-field small {
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.setting-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #667085 50%),
    linear-gradient(135deg, #667085 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.setting-section-title {
  border-top: 1px solid #eef2f7;
  margin-top: 4px;
  padding-top: 16px;
}

.setting-section-title span {
  display: block;
  color: #17202c;
  font-size: 16px;
  font-weight: 800;
}

.setting-section-title small {
  display: block;
  margin-top: 5px;
  color: #667085;
  font-size: 12px;
}

.setting-check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  cursor: pointer;
}

.setting-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setting-switch-track,
.mini-switch-track,
.bulk-action-switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.setting-switch-track::after,
.mini-switch-track::after,
.bulk-action-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease;
}

.setting-check input:checked + .setting-switch-track,
.mini-switch input:checked + .mini-switch-track,
.bulk-action-switch input:checked + .bulk-action-switch-track {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.setting-check input:checked + .setting-switch-track::after,
.mini-switch input:checked + .mini-switch-track::after,
.bulk-action-switch input:checked + .bulk-action-switch-track::after {
  transform: translateX(18px);
}

.setting-check input:focus-visible + .setting-switch-track,
.mini-switch input:focus-visible + .mini-switch-track,
.bulk-action-switch input:focus-visible + .bulk-action-switch-track {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
}

.setting-check b {
  display: block;
  color: #344054;
  font-size: 13px;
}

.setting-check small {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
}

.geoip-update-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
}

.geoip-update-row em {
  color: #667085;
  font-style: normal;
}

.geoip-test-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.geoip-test-result {
  display: none;
  min-height: 92px;
  margin: 0;
  border: 1px solid rgba(37, 99, 235, 0.45);
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(135deg, #0f172a, #111827);
  color: #d1fae5;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.geoip-test-result.show {
  display: block;
}

.latency-targets-editor {
  display: grid;
  gap: 12px;
}

.latency-targets-toolbar {
  display: flex;
  justify-content: flex-end;
}

.latency-targets-wrap {
  max-height: none;
}

.latency-targets-table {
  min-width: 980px;
}

.latency-targets-table input,
.latency-targets-table select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: #17202c;
  font: inherit;
}

.latency-target-enable {
  text-align: center;
}

.mini-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mini-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mini-switch-track {
  width: 36px;
  height: 20px;
}

.mini-switch-track::after {
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
}

.mini-switch input:checked + .mini-switch-track::after {
  transform: translateX(16px);
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
}

.admin-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: #2563eb;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-secondary-btn svg {
  width: 16px;
  height: 16px;
}

.admin-danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff5f5;
  color: #dc2626;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-danger-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.admin-danger-btn svg {
  width: 16px;
  height: 16px;
}

.admin-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: #667085;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 1080px) {
  .admin-table-toolbar-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .admin-search-form {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

@media (max-width: 760px) {
  .admin-search-form {
    grid-template-columns: 1fr;
  }

  .admin-search-form .admin-secondary-btn.compact,
  .admin-search-form .admin-ghost-btn.compact {
    width: 100%;
  }

  .admin-table-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-table-page-info {
    margin-right: 0;
  }

  .admin-page-size,
  .admin-pager-actions {
    justify-content: space-between;
    width: 100%;
  }

  .admin-pager-actions .admin-ghost-btn.compact {
    flex: 1;
  }
}

.ip-stack {
  display: grid;
  gap: 3px;
  color: #475467;
  font-size: 12px;
  line-height: 1.3;
  user-select: text;
}

.ip-stack span {
  display: block;
  white-space: nowrap;
  user-select: text;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.row-actions button {
  border: 1px solid #dfe6ef;
  border-radius: 7px;
  min-height: 30px;
  padding: 5px 8px;
  background: #fff;
  color: #2563eb;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.row-actions button.danger {
  color: #dc2626;
}

.row-actions button.attention {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(180deg, #fff8e8, #fff2c7);
  color: #b45309;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.06);
}

.row-actions button.attention:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, #fff5db, #ffefb3);
}

.server-latency-group-field {
  display: grid;
  gap: 8px;
}

.server-latency-group-field[hidden] {
  display: none;
}

.server-latency-group-select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #667085 50%),
    linear-gradient(135deg, #667085 50%, transparent 50%),
    linear-gradient(180deg, #ffffff, #f8fbff);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px),
    0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
  border: 1px solid #d8e0eb;
  border-radius: 10px;
  padding: 0 40px 0 12px;
  min-height: 40px;
  color: #17202c;
  font: inherit;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.server-latency-group-select:hover {
  border-color: #bfd0ea;
}

.server-latency-group-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.bulk-action-choices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.bulk-action-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.bulk-action-choice:hover {
  border-color: #bfd0ea;
}

.bulk-action-choice input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.bulk-action-choice span {
  color: #17202c;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.bulk-action-choice:has(input:checked) {
  border-color: #2563eb;
  background: linear-gradient(180deg, #eff6ff, #e8f0ff);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.bulk-action-inline {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.bulk-action-inline > span {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.bulk-group-field {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.bulk-group-field[hidden],
.bulk-tag-field[hidden],
.bulk-multi-select-menu[hidden] {
  display: none;
}

.bulk-tag-field {
  display: grid;
  gap: 8px;
  border: 1px dashed #d8e0ec;
  border-radius: 12px;
  padding: 12px;
  background: rgba(248, 250, 252, 0.86);
}

.bulk-tag-field .tag-editor-field {
  margin-top: 0;
}

.bulk-tag-field textarea {
  min-height: 92px;
}

.bulk-group-field > span {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.bulk-multi-select {
  position: relative;
}

.bulk-multi-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 1px solid #d8e0eb;
  border-radius: 10px;
  padding: 0 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #17202c;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.bulk-multi-select-trigger:hover,
.bulk-multi-select-trigger[aria-expanded="true"] {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.bulk-multi-select-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-multi-select-trigger svg {
  width: 16px;
  height: 16px;
  color: #667085;
}

.bulk-multi-select-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.bulk-multi-select-option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 34px;
  border-radius: 8px;
  padding: 0 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bulk-multi-select-option:hover {
  background: #f1f5ff;
}

.bulk-multi-select-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bulk-multi-select-option span::before {
  content: "";
  display: inline-flex;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  vertical-align: -2px;
  background: #fff;
}

.bulk-multi-select-option input:checked + span {
  color: #1d4ed8;
}

.bulk-multi-select-option input:checked + span::before {
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: inset 0 0 0 3px #fff;
}

.bulk-multi-select-empty {
  padding: 8px 10px;
  color: #667085;
  font-size: 13px;
}

.bulk-action-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  cursor: pointer;
}

.bulk-action-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bulk-action-switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.bulk-action-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease;
}

.bulk-action-switch input:checked + .bulk-action-switch-track {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.bulk-action-switch input:checked + .bulk-action-switch-track::after {
  transform: translateX(18px);
}

.bulk-action-switch-text {
  display: grid;
  gap: 3px;
  color: #17202c;
}

.bulk-action-switch-text b {
  font-size: 13px;
  line-height: 1.2;
}

.bulk-action-switch-text small {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}

.bulk-action-toggle-group {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: fit-content;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
}

.bulk-action-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 38px;
  cursor: pointer;
}

.bulk-action-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.bulk-action-toggle span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.bulk-action-toggle input:checked + span {
  background: #2563eb;
  color: #fff;
}

@media (max-width: 720px) {
  .bulk-action-choices {
    grid-template-columns: 1fr;
  }
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
}

.admin-modal.show {
  display: grid;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.36);
}

.admin-modal-card {
  position: relative;
  z-index: 1;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(31, 45, 61, 0.18);
}

.admin-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #17202c;
}

.admin-modal-head button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #667085;
  cursor: pointer;
}

.admin-modal-head svg {
  width: 18px;
  height: 18px;
}

.admin-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.admin-modal-actions button:first-child {
  background: #eef2f7;
  color: #344054;
}

.tag-modal-card {
  width: min(520px, calc(100vw - 32px));
  border-color: rgba(37, 99, 235, 0.12);
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 34%),
    #fff;
}

.tag-editor-field {
  letter-spacing: 0;
}

.tag-editor-field > span,
.tag-editor-title {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.tag-editor-field input,
.tag-editor-field textarea {
  border-radius: 12px;
  border-color: #d7e0ee;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

.tag-editor-field input:disabled {
  background: #f3f6fb;
  color: #667085;
  cursor: not-allowed;
}

.tag-editor-field textarea {
  min-height: 128px;
  font-size: 14px;
}

.tag-editor-field input:focus,
.tag-editor-field textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.tag-editor-field small {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.manual-network-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
  border: 1px dashed #d8e0ec;
  border-radius: 12px;
  padding: 12px;
  background: rgba(248, 250, 252, 0.86);
}

.manual-network-grid label {
  margin-top: 0;
  letter-spacing: 0;
}

.manual-network-grid span {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.tag-editor-title {
  margin-top: 16px;
}

.tag-editor-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 48px;
  margin-top: 8px;
  border: 1px dashed #c8d8ef;
  border-radius: 14px;
  padding: 12px;
  background: rgba(248, 250, 252, 0.86);
}

.tag-editor-preview.compact {
  min-height: 38px;
  margin-top: 0;
  padding: 8px;
}

.tag-editor-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  padding: 0 11px;
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.tag-editor-empty {
  display: inline-flex;
  align-items: center;
  color: #98a2b3;
  font-size: 12px;
}

.deploy-modal-card {
  width: min(680px, calc(100vw - 32px));
}

.deploy-options {
  margin-top: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 18px;
  color: #667085;
  background: #f8fafc;
}

.command-modal-note {
  margin-top: 12px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  line-height: 1.5;
}

.deploy-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.deploy-code-head button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  color: #2563eb;
  font: inherit;
  cursor: pointer;
}

.deploy-code-head svg {
  width: 15px;
  height: 15px;
}

.deploy-code {
  margin: 10px 0 0;
  overflow-x: auto;
  border-radius: 10px;
  padding: 14px;
  background: #111827;
  color: #d1fae5;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.deploy-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.deploy-copy-btn.copied {
  border-color: rgba(22, 163, 74, 0.18);
  background: #f0fdf4;
  color: #15803d;
}

.copy-feedback {
  position: fixed;
  right: 20px;
  bottom: 18px;
  z-index: 140;
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 10px;
  padding: 10px 14px;
  background: rgba(240, 253, 244, 0.98);
  color: #15803d;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.copy-feedback.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

.deploy-copy-btn svg {
  width: 16px;
  height: 16px;
}

.delete-confirm-text {
  margin: 18px 0 0;
  color: #475467;
  line-height: 1.7;
}

.delete-confirm-text strong {
  color: #17202c;
}

.admin-modal-actions .danger-submit {
  background: #dc2626;
  color: #fff;
}

@media (max-width: 1180px) {
  .table-wrap {
    max-height: none;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 13px;
  }

  .watch-table {
    min-width: 920px;
  }

  .watchlist th,
  .watchlist td {
    padding-right: 10px;
    padding-left: 10px;
  }

  .watchlist th:first-child,
  .watchlist td:first-child {
    padding-left: 14px;
    padding-right: 10px;
  }

  .watch-col-node {
    width: 280px;
  }

  .watch-col-compact {
    width: 76px;
  }

  .watch-col-rate {
    width: 132px;
  }

  .watch-col-total {
    width: 172px;
  }

  .watch-value {
    min-width: 54px;
  }

  .watch-value-rate {
    min-width: 102px;
  }

  .total-transfer {
    grid-template-columns: repeat(2, minmax(62px, max-content));
    gap: 8px;
    min-width: 132px;
  }

  .symbol {
    grid-template-columns: minmax(120px, 1fr) max-content;
    column-gap: 8px;
  }

  .server-tags {
    max-width: 112px;
  }

  .server-tag {
    max-width: 64px;
    padding: 0 7px;
  }

  .server-tag-more {
    padding: 0 7px;
  }

  .topbar {
    grid-template-areas:
      "brand action"
      "tabs tabs";
    grid-template-columns: minmax(0, 1fr) auto;
    height: auto;
    min-height: 96px;
  }

  .brand {
    grid-area: brand;
    gap: 8px;
    min-height: 52px;
    padding: 0 14px;
    font-size: 15px;
    letter-spacing: 0.18em;
  }

  .brand-mark {
    width: 22px;
    height: 22px;
  }

  .region-tabs,
  .detail-topline {
    grid-area: tabs;
    min-height: 44px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 0;
  }

  body[data-theme="light"] .region-tabs,
  body[data-theme="light"] .detail-topline {
    border-top-color: rgba(15, 23, 42, 0.08);
  }

  .region-tabs button {
    min-width: 78px;
    min-height: 44px;
    padding: 0 14px;
    letter-spacing: 0.1em;
  }

  .region-tabs button small {
    letter-spacing: 0.05em;
  }

  .theme-toggle {
    min-width: 78px;
    min-height: 52px;
    justify-content: center;
    padding: 0 12px;
    font-size: 13px;
    letter-spacing: 0.12em;
  }

  .metrics {
    grid-template-columns: repeat(5, minmax(142px, 1fr));
  }

  .metric {
    min-height: 52px;
  }

  .statusbar {
    gap: 10px;
    overflow-x: auto;
  }

  .powered {
    display: none;
  }

  .detail-shell main {
    padding: 8px;
  }

  .node-hero {
    display: block;
    padding: 18px;
  }

  .node-health {
    justify-content: start;
    min-width: 0;
    margin-top: 18px;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 18px;
    padding-left: 0;
    text-align: left;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .traffic-strip {
    grid-template-columns: 1fr;
    height: auto;
  }

  .traffic-item {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  }

  .traffic-item:last-child {
    border-bottom: 0;
  }

  .realtime-grid {
    grid-template-columns: 1fr;
  }

  .latency-chart {
    height: 360px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .admin-navbar {
    grid-template-areas:
      "brand user"
      "title title";
    grid-template-columns: minmax(0, 1fr) auto;
    height: auto;
    min-height: 96px;
  }

  .admin-navbar .brand {
    grid-area: brand;
    min-height: 52px;
    border-right: 0;
  }

  .admin-navbar-title {
    grid-area: title;
    min-height: 44px;
    border-top: 1px solid #dfe6ef;
    padding: 0 14px;
    overflow: hidden;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-navbar-user {
    grid-area: user;
    min-height: 52px;
    gap: 10px;
    padding: 0 14px;
    font-size: 13px;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    overflow-y: visible;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-main {
    padding: 12px;
  }

  .admin-content-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .admin-content-head h1 {
    font-size: 22px;
  }

  .admin-head-actions {
    width: 100%;
  }

  .admin-head-actions .compact {
    flex: 1 1 140px;
    min-height: 38px;
  }
}
