:root {
  --page: #edf2f8;
  --page-deep: #e4ebf4;
  --surface: #ffffff;
  --surface-soft: #f5f8fc;
  --surface-raised: rgba(255, 255, 255, .82);
  --line: #dce4ef;
  --line-strong: #cbd6e5;
  --ink: #142033;
  --ink-soft: #40506a;
  --muted: #75849a;
  --faint: #a6b1c1;
  --accent: #2f6feb;
  --accent-bright: #4b8cff;
  --accent-soft: #e8f0ff;
  --success: #07966f;
  --success-soft: #e1f6ef;
  --warning: #d3851f;
  --warning-soft: #fff2dd;
  --danger: #d84d61;
  --danger-soft: #ffebee;
  --purple: #7c5ce0;
  --cyan: #118f9c;
  --shadow: 0 22px 60px rgba(31, 48, 78, .10);
  --shadow-soft: 0 10px 30px rgba(31, 48, 78, .07);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --display: "Avenir Next", "Segoe UI Variable Display", "Noto Sans SC", sans-serif;
  --body: "Avenir Next", "Segoe UI Variable Text", "Noto Sans SC", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
  --page: #08111f;
  --page-deep: #050b15;
  --surface: #0f1b2d;
  --surface-soft: #142237;
  --surface-raised: rgba(15, 27, 45, .84);
  --line: #203149;
  --line-strong: #2c405d;
  --ink: #edf3fb;
  --ink-soft: #b8c5d8;
  --muted: #8293ac;
  --faint: #5d708d;
  --accent: #69a1ff;
  --accent-bright: #8ab6ff;
  --accent-soft: rgba(73, 132, 232, .16);
  --success: #38d19b;
  --success-soft: rgba(56, 209, 155, .13);
  --warning: #ffb454;
  --warning-soft: rgba(255, 180, 84, .13);
  --danger: #ff7183;
  --danger-soft: rgba(255, 113, 131, .13);
  --purple: #ad91ff;
  --cyan: #56cbd6;
  --shadow: 0 28px 80px rgba(0, 0, 0, .28);
  --shadow-soft: 0 14px 36px rgba(0, 0, 0, .20);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--page); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), transparent 36%),
    var(--page);
  font-family: var(--body);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

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

.page-glow {
  position: fixed;
  z-index: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(12px);
  pointer-events: none;
  opacity: .42;
}
.page-glow-one {
  top: -260px;
  left: -170px;
  background: radial-gradient(circle, rgba(71, 129, 240, .30), transparent 68%);
}
.page-glow-two {
  top: 18%;
  right: -300px;
  background: radial-gradient(circle, rgba(42, 190, 156, .17), transparent 68%);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1680px, calc(100% - 56px));
  margin: 0 auto;
  padding: 34px 0 24px;
}

/* Header */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 16px;
  color: var(--accent);
  background: linear-gradient(145deg, var(--surface), var(--accent-soft));
  box-shadow: var(--shadow-soft);
}
.brand-mark svg { width: 31px; height: 31px; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand h1, .panel-head h2 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: -.035em;
}
.brand h1 { font-size: 25px; font-weight: 680; }
.eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .16em;
  text-transform: uppercase;
}

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

.feed-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
  font-family: var(--mono);
  font-size: 11px;
  backdrop-filter: blur(18px);
}
.feed-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
}
.feed-status.ok .feed-light {
  background: var(--success);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 13%, transparent);
}
.feed-status.stale { color: var(--warning); background: var(--warning-soft); }
.feed-status.stale .feed-light { background: var(--warning); }
.feed-status.error { color: var(--danger); background: var(--danger-soft); }
.feed-status.error .feed-light { background: var(--danger); }

.view-switch,
.language-switch {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}
.view-switch button,
.language-switch button {
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}
.view-switch button:hover,
.language-switch button:hover { color: var(--ink); background: var(--surface-soft); }
.view-switch button.active,
.language-switch button.active { color: var(--accent); background: var(--accent-soft); }
.language-switch button { min-width: 30px; padding-inline: 8px; }

.theme-switch {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}
.theme-switch button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.theme-switch button:hover { color: var(--ink); background: var(--surface-soft); }
.theme-switch button.active { color: var(--accent); background: var(--accent-soft); }
.theme-switch svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Overview cards */
.overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.overview > *,
.panel-tools > * {
  min-width: 0;
}

.metric-card {
  position: relative;
  min-height: 154px;
  padding: 21px 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}
.metric-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -72px;
  bottom: -78px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.metric-primary {
  color: #f7fbff;
  border-color: transparent;
  background:
    radial-gradient(circle at 92% 8%, rgba(255,255,255,.22), transparent 30%),
    linear-gradient(135deg, #1e5bc6, #347ef2 55%, #3394df);
}
.metric-primary::after { background: rgba(255,255,255,.11); }
.metric-primary .metric-label,
.metric-primary .metric-caption,
.metric-primary .metric-unit { color: rgba(255,255,255,.74); }

.metric-label {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.metric-line {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 13px 0 9px;
}
.metric-line strong {
  font-family: var(--display);
  font-size: 42px;
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.055em;
}
.metric-unit { color: var(--muted); font-size: 12px; }
.metric-caption {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 11px;
}

.fleet-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(4px, 1fr));
  gap: 4px;
  max-width: 220px;
  margin-top: 13px;
}
.fleet-grid span {
  height: 5px;
  border-radius: 99px;
  background: var(--line-strong);
}
.fleet-grid span.online { background: var(--success); }
.fleet-grid span.offline { background: var(--danger); opacity: .62; }

.signal-card { padding-right: 124px; }
.signal-orbit {
  position: absolute;
  top: 50%;
  right: 24px;
  width: 76px;
  height: 76px;
  transform: translateY(-50%);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 50%;
}
.signal-orbit::before,
.signal-orbit::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 50%;
}
.signal-orbit::after { inset: 25px; background: var(--accent); border: 0; box-shadow: 0 0 20px var(--accent); }
.signal-orbit span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px var(--success);
}
.signal-orbit span:nth-child(1) { top: 5px; left: 34px; }
.signal-orbit span:nth-child(2) { right: 7px; bottom: 16px; }
.signal-orbit span:nth-child(3) { left: 8px; bottom: 17px; }

/* Fleet panel */
.fleet-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 19px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin-top: 3px; font-size: 22px; font-weight: 680; }
.panel-tools { display: flex; align-items: center; gap: 10px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 230px;
  height: 39px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  transition: border-color .18s, box-shadow .18s;
}
.search-box:focus-within {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}
.search-box svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}
.search-box input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}
.search-box input::placeholder { color: var(--faint); }

.filter-group {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}
.filter-group button {
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}
.filter-group button:hover { color: var(--ink); }
.filter-group button.active { color: var(--accent); background: var(--surface); box-shadow: 0 2px 8px rgba(26,43,70,.08); }
.filter-group span { margin-left: 3px; color: var(--faint); font-family: var(--mono); font-size: 10px; }
.filter-group button.active span { color: inherit; }

.table-scroll { overflow-x: auto; }
table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
}
thead th {
  padding: 14px 15px;
  color: var(--muted);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}
thead th:first-child { padding-left: 24px; width: 20%; }
thead th:nth-child(2) { width: 10%; }
thead th:nth-child(3) { width: 9%; }
thead th:nth-child(4) { width: 23%; }
thead th:nth-child(5) { width: 13%; }
thead th:nth-child(6) { width: 11%; }
thead th:last-child { width: 14%; padding-right: 24px; }

tbody td {
  padding: 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr.row { cursor: pointer; }
tbody tr.row td { transition: background .16s; }
tbody tr.row:hover td { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
tbody tr.row td:first-child { position: relative; padding-left: 24px; }
tbody tr.row:not(.offline) td:first-child {
  box-shadow: inset 3px 0 var(--success);
}
tbody tr.offline { color: var(--muted); }
tbody tr.offline td { background: color-mix(in srgb, var(--surface-soft) 52%, transparent); }
tbody tr.row.open td { border-bottom-color: transparent; background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }

.node-cell { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.node-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--accent);
  background: var(--surface-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}
.node-icon::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--success);
}
.offline .node-icon { color: var(--muted); }
.offline .node-icon::after { background: var(--danger); }
.node-copy { min-width: 0; }
.node-name {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.node-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 10px; }
.meta-sep { color: var(--line-strong); }

.status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 10px;
  font-weight: 720;
}
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-badge.offline { color: var(--danger); background: var(--danger-soft); }
.protocol { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.uptime { font-family: var(--mono); color: var(--ink-soft); font-size: 12px; }
.uptime small { display: block; margin-top: 4px; color: var(--muted); font-family: var(--body); font-size: 10px; }

.resource-stack { display: grid; gap: 7px; min-width: 220px; }
.resource-line { display: grid; grid-template-columns: 29px 1fr 31px; align-items: center; gap: 8px; }
.resource-label { color: var(--muted); font-size: 9px; font-weight: 740; letter-spacing: .04em; }
.resource-track { height: 5px; overflow: hidden; border-radius: 99px; background: var(--line); }
.resource-fill { display: block; width: calc(var(--value) * 1%); height: 100%; border-radius: inherit; background: var(--accent); }
.resource-line.ram .resource-fill { background: var(--purple); }
.resource-line.disk .resource-fill { background: var(--cyan); }
.resource-line.warn .resource-fill { background: var(--warning); }
.resource-line.bad .resource-fill { background: var(--danger); }
.resource-value { color: var(--ink-soft); font-family: var(--mono); font-size: 10px; text-align: right; }

.network-cell, .traffic-cell { display: grid; gap: 5px; font-family: var(--mono); font-size: 11px; }
.flow-line { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.flow-arrow {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  font-family: var(--body);
  font-size: 10px;
  font-weight: 800;
}
.flow-line.down .flow-arrow { color: var(--success); background: var(--success-soft); }
.flow-value { color: var(--ink-soft); }
.traffic-main { color: var(--ink); font-size: 11px; }
.traffic-sub { color: var(--muted); font-size: 9px; font-family: var(--body); }

.latency-grid { display: grid; grid-template-columns: repeat(3, minmax(45px, 1fr)); gap: 5px; min-width: 174px; }
.latency-pill { padding: 6px 7px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.latency-label { display: block; color: var(--muted); font-size: 8px; font-weight: 760; letter-spacing: .05em; }
.latency-ms { display: block; margin-top: 2px; color: var(--ink-soft); font-family: var(--mono); font-size: 10px; }
.latency-loss { color: var(--faint); font-size: 8px; }
.latency-pill.mid { border-color: color-mix(in srgb, var(--warning) 35%, var(--line)); background: var(--warning-soft); }
.latency-pill.mid .latency-loss { color: var(--warning); }
.latency-pill.bad { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: var(--danger-soft); }
.latency-pill.bad .latency-loss { color: var(--danger); }

.dim { color: var(--faint); }
.mono { font-family: var(--mono); }

/* Expanded details */
tr.exrow[hidden] { display: none; }
tr.exrow > td { padding: 0 24px 18px; background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}
.detail-item { min-width: 0; padding: 3px 7px; }
.detail-item b { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; letter-spacing: .10em; text-transform: uppercase; }
.detail-item span { display: block; overflow: hidden; color: var(--ink-soft); font-family: var(--mono); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

tr.empty td { padding: 70px 20px; color: var(--muted); text-align: center; }
.loading-line { display: inline-block; width: 30px; height: 3px; margin: 0 10px 3px 0; border-radius: 99px; background: var(--accent); animation: breathe 1.4s ease-in-out infinite; }

.foot { display: flex; justify-content: center; gap: 14px; padding: 20px 0 0; color: var(--muted); font-size: 10px; }
.foot a { color: var(--ink-soft); text-decoration: none; }
.foot a:hover { color: var(--accent); }

/* Classic view — compact early-web operations table */
.view-classic { display: none; }
html[data-layout="classic"] .view-modern { display: none; }
html[data-layout="classic"] .view-classic { display: block; }

html[data-layout="classic"] {
  --classic-page: #f4f4f2;
  --classic-panel: #ffffff;
  --classic-row: #ffffff;
  --classic-row-alt: #fafafa;
  --classic-row-hover: #f4f7f4;
  --classic-line: #dddddd;
  --classic-line-strong: #cecece;
  --classic-text: #1f1f1f;
  --classic-muted: #555555;
  --classic-track: #f2f2f2;
  --classic-green: #51a351;
  --classic-green-dark: #3d963f;
  --classic-orange: #f89406;
  --classic-red: #bd362f;
}

html[data-theme="dark"][data-layout="classic"] {
  --classic-page: #171717;
  --classic-panel: #222222;
  --classic-row: #222222;
  --classic-row-alt: #272727;
  --classic-row-hover: #2b302b;
  --classic-line: #3a3a3a;
  --classic-line-strong: #4a4a4a;
  --classic-text: #f4f4f4;
  --classic-muted: #c2c2c2;
  --classic-track: #343434;
}

html[data-layout="classic"] body {
  background:
    repeating-linear-gradient(135deg, rgba(0,0,0,.025) 0 2px, transparent 2px 6px),
    var(--classic-page);
  color: var(--classic-text);
  font-family: "Helvetica Neue", Helvetica, Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
html[data-layout="classic"] .page-glow { display: none; }
html[data-layout="classic"] .app-shell {
  width: 100%;
  padding: 0 0 8px;
}
html[data-layout="classic"] .masthead {
  min-height: 44px;
  margin-bottom: 0;
  padding: 0 max(7%, calc((100vw - 2520px) / 2 + 48px));
  color: #ededed;
  background: linear-gradient(180deg, #333 0%, #222 100%);
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
html[data-layout="classic"] .masthead-actions { gap: 6px; }
html[data-layout="classic"] .brand { gap: 0; }
html[data-layout="classic"] .brand-mark,
html[data-layout="classic"] .brand .eyebrow { display: none; }
html[data-layout="classic"] .brand h1 {
  color: #f5f5f5;
  font-family: "Helvetica Neue", Helvetica, Arial, "Noto Sans SC", sans-serif;
  font-size: 0;
  font-weight: 400;
  letter-spacing: 0;
  text-shadow: 0 -1px 0 rgba(0,0,0,.8);
}
html[data-layout="classic"] .brand h1::after {
  content: attr(data-classic-title-en);
  font-size: 21px;
  line-height: 1;
}
html[data-layout="classic"][data-language="zh"] .brand h1::after { content: attr(data-classic-title-zh); }
html[data-layout="classic"] .feed-status { display: none; }
html[data-layout="classic"] .view-switch,
html[data-layout="classic"] .language-switch,
html[data-layout="classic"] .theme-switch {
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
html[data-layout="classic"] .view-switch button,
html[data-layout="classic"] .language-switch button,
html[data-layout="classic"] .theme-switch button {
  height: 44px;
  padding-inline: 11px;
  border-radius: 0;
  color: #c8c8c8;
  font-size: 11px;
  font-weight: 400;
  text-shadow: 0 -1px 0 rgba(0,0,0,.75);
}
html[data-layout="classic"] .theme-switch button { width: 30px; padding-inline: 7px; }
html[data-layout="classic"] .view-switch button:hover,
html[data-layout="classic"] .language-switch button:hover,
html[data-layout="classic"] .theme-switch button:hover { color: #fff; background: rgba(255,255,255,.06); }
html[data-layout="classic"] .view-switch button.active,
html[data-layout="classic"] .language-switch button.active,
html[data-layout="classic"] .theme-switch button.active {
  color: #fff;
  background: rgba(0,0,0,.28);
  box-shadow: inset 0 3px 8px rgba(0,0,0,.28);
}
html[data-layout="classic"] main {
  width: min(2520px, 90%);
  margin: 14px auto 0;
}

.classic-panel {
  overflow: hidden;
  border: 1px solid var(--classic-line-strong);
  border-radius: 6px;
  background: var(--classic-panel);
  box-shadow: 0 1px 5px rgba(0,0,0,.22);
}
.classic-head { display: none; }
.classic-scroll {
  margin: 12px 20px 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.classic-grid {
  width: 100%;
  min-width: 1250px;
  border-collapse: collapse;
  table-layout: fixed;
}
.classic-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 34px;
  padding: 0 6px;
  color: var(--classic-text);
  border-bottom: 2px solid var(--classic-line);
  background: var(--classic-panel);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.classic-grid thead th::before { margin-right: 3px; font-size: 11px; font-weight: 400; }
.classic-grid thead th:nth-child(1)::before { content: "🔗"; }
.classic-grid thead th:nth-child(2)::before { content: "📊"; }
.classic-grid thead th:nth-child(3)::before { content: "📌"; }
.classic-grid thead th:nth-child(4)::before { content: "🗂️"; }
.classic-grid thead th:nth-child(5)::before { content: "🌐"; }
.classic-grid thead th:nth-child(6)::before { content: "⏱"; }
.classic-grid thead th:nth-child(8)::before { content: "🚦"; }
.classic-grid thead th:nth-child(9)::before { content: "📋"; }
.classic-grid thead th:nth-child(10)::before { content: "🎯"; }
.classic-grid thead th:nth-child(11)::before { content: "⚡"; }
.classic-grid thead th:nth-child(12)::before { content: "💾"; }
.classic-grid thead th:nth-child(13)::before { content: "🌐"; }
.classic-grid thead th:nth-child(1) { width: 72px; }
.classic-grid thead th:nth-child(2) { width: 116px; }
.classic-grid thead th:nth-child(3) { width: 174px; }
.classic-grid thead th:nth-child(4) { width: 76px; }
.classic-grid thead th:nth-child(5) { width: 58px; }
.classic-grid thead th:nth-child(6) { width: 78px; }
.classic-grid thead th:nth-child(7) { width: 58px; }
.classic-grid thead th:nth-child(8) { width: 112px; }
.classic-grid thead th:nth-child(9) { width: 120px; }
.classic-grid thead th:nth-child(10),
.classic-grid thead th:nth-child(11),
.classic-grid thead th:nth-child(12) { width: 68px; }
.classic-grid thead th:nth-child(13) { width: 150px; }
.classic-grid tbody td {
  height: 33px;
  padding: 3px 6px;
  border-bottom: 1px solid var(--classic-line);
  color: var(--classic-text);
  background: var(--classic-row);
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.classic-grid tbody tr:nth-child(even) td { background: var(--classic-row-alt); }
.classic-grid tbody tr:hover td { background: var(--classic-row-hover); }
.classic-grid tbody tr.classic-offline td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(n+10)) { color: var(--classic-muted); }
.classic-name {
  display: block;
  overflow: hidden;
  color: var(--classic-text);
  font-size: 13px;
  font-weight: 400;
  text-overflow: ellipsis;
}
.classic-type, .classic-region, .classic-number { font-family: inherit; font-size: 12px; }
.classic-cell {
  display: grid;
  place-items: center;
  min-height: 24px;
  padding: 2px 5px;
  border: 1px solid #398439;
  border-radius: 4px;
  color: #111;
  background: linear-gradient(180deg, #5bb75b, var(--classic-green-dark));
  font-size: 12px;
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.classic-cell.monthly { border-color: #46a546; color: #111; background: linear-gradient(180deg, #62c462, var(--classic-green)); text-shadow: none; }
.classic-cell.offline { border-color: #a9302a; color: #111; background: linear-gradient(180deg, #ee5f5b, var(--classic-red)); }
.classic-cell.monthly.offline { border-color: #df8505; color: #111; background: linear-gradient(180deg, #fbb450, var(--classic-orange)); text-shadow: none; }
.classic-flow { color: var(--classic-text); font-family: inherit; font-size: 12px; }
.classic-flow small { color: var(--classic-muted); font-size: 10px; }
.classic-meter {
  position: relative;
  height: 24px;
  overflow: hidden;
  border: 1px solid var(--classic-line);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--classic-track), var(--classic-panel));
  box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
}
.classic-meter::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--value) * 1%);
  background: linear-gradient(180deg, #62c462, var(--classic-green));
}
.classic-meter.warn::before { background: linear-gradient(180deg, #fbb450, var(--classic-orange)); }
.classic-meter.bad::before { background: linear-gradient(180deg, #ee5f5b, var(--classic-red)); }
.classic-meter span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center start;
  height: 100%;
  padding-left: 5px;
  color: var(--classic-text);
  font-family: inherit;
  font-size: 12px;
  text-shadow: none;
}
.classic-meter.offline { border-color: #a9302a; background: linear-gradient(180deg, #ee5f5b, var(--classic-red)); }
.classic-meter.offline span { place-items: center; padding-left: 0; color: #111; text-shadow: none; }
.carrier-cell {
  min-height: 24px;
  padding: 4px 6px;
  border: 1px solid #46a546;
  border-radius: 4px;
  color: #111;
  background: linear-gradient(180deg, #62c462, var(--classic-green));
  font-family: inherit;
  font-size: 11px;
}
.carrier-cell.warn { border-color: #df8505; background: linear-gradient(180deg, #fbb450, var(--classic-orange)); }
.carrier-cell.bad { border-color: #a9302a; color: #111; background: linear-gradient(180deg, #ee5f5b, var(--classic-red)); }
.carrier-cell b { font-weight: 800; }
.classic-empty td { height: 180px !important; color: var(--muted) !important; text-align: center; }
.classic-foot {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0 20px;
  padding: 8px 0 9px;
  color: var(--classic-muted);
  border-top: 0;
  background: var(--classic-panel);
  font-family: inherit;
  font-size: 11px;
}
html[data-layout="classic"] .foot { padding-top: 7px; font-size: 9px; }

@keyframes breathe { 50% { opacity: .28; transform: scaleX(.6); } }

@media (max-width: 1160px) {
  .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .panel-tools { width: 100%; justify-content: space-between; }
  .search-box { flex: 1; }
}

@media (max-width: 760px) {
  .app-shell { width: min(100% - 24px, 680px); padding-top: 18px; }
  .masthead { align-items: flex-start; flex-wrap: wrap; }
  .masthead-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
  .brand-mark { width: 43px; height: 43px; border-radius: 13px; }
  .brand-mark svg { width: 27px; height: 27px; }
  .brand h1 { font-size: 21px; }
  .feed-status { display: none; }
  .overview { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 130px; padding: 17px; border-radius: 15px; }
  .metric-line strong { font-size: 34px; }
  .signal-card { padding-right: 17px; }
  .signal-orbit { display: none; }
  .fleet-grid { grid-template-columns: repeat(8, minmax(4px, 1fr)); }
  .fleet-panel { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .panel-head { padding: 18px 3px 14px; border: 0; }
  .panel-tools { align-items: stretch; flex-direction: column; }
  .search-box { min-width: 0; background: var(--surface); }
  .filter-group { align-self: stretch; justify-content: space-between; background: var(--surface); }
  .filter-group button { flex: 1; }
  .table-scroll { overflow: visible; }
  table, tbody { display: block; min-width: 0; }
  thead { display: none; }
  tbody tr.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
  }
  tbody tr.row td { display: block; padding: 12px 15px; border: 0; }
  tbody tr.row td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 760;
    letter-spacing: .10em;
    text-transform: uppercase;
  }
  tbody tr.row td:first-child { grid-column: 1 / -1; padding-top: 15px; border-bottom: 1px solid var(--line); }
  tbody tr.row td:first-child::before { display: none; }
  tbody tr.row td:nth-child(4), tbody tr.row td:nth-child(7) { grid-column: 1 / -1; }
  tbody tr.row td:nth-child(4) { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  tbody tr.row td:nth-child(7) { border-top: 1px solid var(--line); }
  .node-name { max-width: 260px; }
  .resource-stack { min-width: 0; }
  .latency-grid { min-width: 0; }
  tr.exrow { display: block; margin: -10px 0 10px; }
  tr.exrow[hidden] { display: none; }
  tr.exrow > td { display: block; padding: 0 8px 12px; border: 0; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .detail-item:last-child { grid-column: 1 / -1; }
  tr.empty { display: block; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
  tr.empty td { display: block; padding: 50px 16px; }
  html[data-layout="classic"] .app-shell { width: 100%; padding-top: 0; }
  html[data-layout="classic"] .masthead { min-height: 0; padding: 14px 16px; }
  html[data-layout="classic"] main { width: calc(100% - 20px); margin-top: 14px; }
  .classic-scroll { margin: 12px 10px 0; border-top: 0; }
  .classic-grid { display: table; min-width: 1250px; }
  .classic-grid thead { display: table-header-group; }
  .classic-grid tbody { display: table-row-group; }
  .classic-grid tr { display: table-row; }
  .classic-foot { align-items: flex-start; flex-direction: column; gap: 5px; margin: 0 10px; padding: 16px 0; }
}

@media (max-width: 480px) {
  .overview { grid-template-columns: 1fr; }
  .metric-card { min-height: 120px; }
  .metric-caption { font-size: 10px; }
  .view-switch button { padding: 0 9px; }
  .language-switch button { padding: 0 7px; }
  .theme-switch button { width: 28px; height: 28px; }
  .filter-group button { padding: 0 6px; }
  tbody tr.row { grid-template-columns: 1fr; }
  tbody tr.row td:nth-child(n) { grid-column: 1; border-top: 1px solid var(--line); }
  tbody tr.row td:first-child { border-top: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item:last-child { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
