:root {
  color-scheme: light;
  --page: #f6f5f1;
  --surface: #ffffff;
  --surface-soft: #fbfaf7;
  --surface-muted: #eeefeb;
  --ink: #202723;
  --ink-soft: #4f5a53;
  --muted: #77817b;
  --faint: #a4aca6;
  --line: #e2e5df;
  --line-strong: #d4d9d2;
  --sidebar: #202a26;
  --sidebar-soft: #2c3933;
  --sidebar-text: #e9eee6;
  --amber: #c7832c;
  --amber-deep: #a76418;
  --amber-soft: #fbf0df;
  --green: #2d7957;
  --green-soft: #eaf4ee;
  --blue: #3e7180;
  --blue-soft: #eaf3f5;
  --danger: #b85a45;
  --danger-soft: #fbefeb;
  --shadow-sm: 0 4px 16px rgba(32, 39, 35, 0.045);
  --shadow-md: 0 12px 34px rgba(32, 39, 35, 0.08);
  --radius-sm: 9px;
  --radius-md: 13px;
  --radius-lg: 20px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

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

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

a,
button,
input { -webkit-tap-highlight-color: transparent; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
dialog:focus-visible {
  outline: 3px solid rgba(199, 131, 44, 0.35);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

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

.toast-region {
  position: fixed;
  z-index: 40;
  top: 18px;
  right: 20px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  line-height: 1.5;
  animation: toast-in 180ms ease-out both;
}

.toast.is-error {
  border-color: #e5b4a8;
  color: #88412f;
  background: #fff8f5;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  margin: 0;
  color: var(--amber-deep);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.19em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
p { margin-top: 0; }

h1,
h2 { letter-spacing: -0.035em; }

.brand-lockup,
.sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-spark {
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  color: var(--amber);
}

.brand-spark-dark { color: #e2a54f; }

.brand-wordmark {
  color: var(--ink);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.16em;
  line-height: 1;
  white-space: nowrap;
}

.brand-wordmark small {
  color: var(--amber);
  font-size: 0.7em;
  letter-spacing: 0.12em;
}

/* Login */

.auth-view {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.06fr) minmax(390px, 0.94fr);
  background: var(--page);
}

.auth-editorial {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  color: #f5f0e5;
  background: #202a26;
}

.auth-editorial::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 18%, rgba(208, 146, 63, 0.12), transparent 30%), linear-gradient(145deg, rgba(18, 28, 24, 0.15), rgba(18, 28, 24, 0.55));
  content: "";
  pointer-events: none;
}

.auth-editorial-inner {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 680px);
  min-height: 100%;
  flex-direction: column;
  padding: clamp(30px, 5vw, 68px);
}

.brand-lockup-light .brand-wordmark { color: #f5f0e5; }

.editorial-copy {
  max-width: 570px;
  margin: auto 0;
  padding: 74px 0 70px;
}

.editorial-copy .eyebrow { color: #dca45b; }

.editorial-copy h1 {
  margin: 20px 0 22px;
  color: #f5f0e5;
  font-size: clamp(43px, 6.2vw, 78px);
  font-weight: 580;
  line-height: 1.03;
}

.editorial-copy h1 em {
  color: #dba35a;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.editorial-copy > p:last-child {
  max-width: 380px;
  margin-bottom: 0;
  color: #b8c0b8;
  font-size: 14px;
  line-height: 1.85;
}

.editorial-footnote {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #8d9b91;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.editorial-rule {
  display: block;
  width: 31px;
  height: 1px;
  background: #c7832c;
}

.editorial-orbit {
  position: absolute;
  border: 1px solid rgba(226, 165, 79, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

.editorial-orbit-one { width: 580px; height: 580px; right: -285px; top: 12%; }
.editorial-orbit-two { width: 390px; height: 390px; right: -192px; top: calc(12% + 95px); }

.editorial-sun {
  position: absolute;
  right: -132px;
  bottom: -142px;
  width: 460px;
  height: 460px;
  color: rgba(226, 165, 79, 0.45);
  pointer-events: none;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  align-content: center;
  padding: 48px clamp(28px, 7vw, 110px);
  background: #faf9f5;
}

.auth-panel-inner { width: min(100%, 390px); margin: 0 auto; }

.auth-panel h2 {
  margin: 12px 0 10px;
  color: var(--ink);
  font-size: clamp(29px, 3.6vw, 39px);
  font-weight: 650;
  line-height: 1.1;
}

.auth-intro {
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.stack-form,
.field-group { display: grid; gap: 8px; }
.stack-form { gap: 18px; }

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.field-group label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.field-hint { color: var(--faint); font-size: 10px; white-space: nowrap; }

.field-group input,
.copy-link-input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 1px rgba(32, 39, 35, 0.02);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field-group input::placeholder { color: #afb6b0; }
.field-group input:hover,
.copy-link-input:hover { border-color: #bbc3bc; }
.field-group input:focus,
.copy-link-input:focus { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(199, 131, 44, 0.12); }

.form-message {
  min-height: 19px;
  margin: -2px 0 -2px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

.auth-footnote {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 27px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.auth-legal {
  width: min(100%, 390px);
  margin: 52px auto 0;
  color: #a2aaa4;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-align: center;
}

/* Shared controls and status */

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 12px;
  font-weight: 680;
  line-height: 1;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }

.button-primary {
  border-color: var(--amber);
  color: #fffdf8;
  background: var(--amber);
  box-shadow: 0 5px 14px rgba(199, 131, 44, 0.14);
}

.button-primary:hover:not(:disabled) { border-color: var(--amber-deep); background: var(--amber-deep); }
.button-primary:disabled,
.button-danger:disabled { opacity: 0.52; }

.button-quiet {
  border-color: var(--line);
  color: var(--ink-soft);
  background: var(--surface);
}

.button-quiet:hover:not(:disabled) { border-color: var(--line-strong); color: var(--ink); background: var(--surface-soft); }

.button-danger { border-color: var(--danger); color: #fffaf8; background: var(--danger); }
.button-danger:hover:not(:disabled) { border-color: #994936; background: #994936; }
.button-wide { width: 100%; min-height: 49px; }

.button-spinner {
  display: none;
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.is-busy .button-spinner { display: inline-block; }
.is-busy .button-label { opacity: 0.78; }

@keyframes spin { to { transform: rotate(360deg); } }

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(45, 121, 87, 0.12);
}

.status-dot-muted { color: #9aa49d; box-shadow: none; }

/* Dashboard shell */

.dashboard-view { min-height: 100vh; background: var(--page); }
.dashboard-shell { display: grid; min-height: 100vh; grid-template-columns: 216px minmax(0, 1fr); }

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 27px 15px 22px;
  color: var(--sidebar-text);
  background: var(--sidebar);
}

.sidebar-brand { padding: 0 10px; }
.sidebar-brand .brand-wordmark { color: #f2f3ec; font-size: 11px; }
.sidebar-brand .brand-wordmark small { color: #dda052; }
.sidebar-caption { margin: 59px 12px 11px; color: #819087; font-size: 9px; font-weight: 750; letter-spacing: 0.18em; }

.sidebar-nav { display: grid; gap: 4px; }

.nav-item {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #aebbb1;
  font-size: 12px;
  font-weight: 620;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.nav-item svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.nav-item:hover { color: #f3f2e9; background: rgba(255, 255, 255, 0.055); }
.nav-item.is-active { border-color: rgba(222, 160, 82, 0.18); color: #f4ecd9; background: rgba(222, 160, 82, 0.12); }
.nav-item.is-active svg { color: #e2a54f; }
.sidebar-spacer { flex: 1; }

.sidebar-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px 11px;
  border-top: 1px solid rgba(233, 238, 230, 0.1);
  color: #9ba99e;
  font-size: 10px;
  line-height: 1.6;
}

.sidebar-note small { color: #708077; font-size: 9px; }

.dashboard-main { min-width: 0; }

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 39px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 249, 245, 0.94);
  backdrop-filter: blur(12px);
}

.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 11px; }
.breadcrumb strong { color: var(--ink-soft); font-weight: 680; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 680;
}

.connection-status.is-loading { color: var(--muted); }
.connection-status.is-disconnected { color: var(--danger); }
.connection-status.is-disconnected .status-dot { box-shadow: 0 0 0 3px rgba(184, 90, 69, 0.11); }
.connection-status.is-warning { color: var(--amber-deep); }
.topbar-divider { width: 1px; height: 18px; background: var(--line-strong); }
.session-username { color: var(--ink-soft); font-size: 11px; }
.topbar .button-quiet { min-height: 33px; padding: 0 11px; font-size: 11px; }

.dashboard-content {
  width: min(100%, 1430px);
  margin: 0 auto;
  padding: 43px 39px 67px;
}

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 26px;
}

.dashboard-hero h1 { margin: 10px 0 9px; color: var(--ink); font-size: clamp(30px, 3.5vw, 43px); font-weight: 650; line-height: 1.06; }
.dashboard-intro { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.hero-meta { min-width: 180px; padding-bottom: 3px; text-align: right; }
.meta-label, .meta-subtext { display: block; color: var(--faint); font-size: 10px; line-height: 1.55; }
.hero-meta strong { display: block; margin: 3px 0 2px; color: var(--ink-soft); font-family: var(--mono); font-size: 11px; font-weight: 600; }

.dashboard-alerts { display: grid; gap: 8px; margin-bottom: 18px; }

.dashboard-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #e6c3b9;
  border-radius: var(--radius-sm);
  color: #8e4c3b;
  background: #fff8f5;
  font-size: 11px;
  line-height: 1.55;
}

.dashboard-alert.is-warning { border-color: #ead3a9; color: #896524; background: #fffaf0; }
.alert-icon { display: inline-grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 800; }

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

.metric-card,
.traffic-card,
.service-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card { min-width: 0; min-height: 206px; padding: 17px 18px 13px; }
.metric-card.is-stale, .traffic-card.is-stale { border-color: #e5c5bc; }
.metric-card-topline, .traffic-card-heading { display: flex; min-width: 0; align-items: center; gap: 8px; }
.metric-label, .traffic-label { min-width: 0; overflow: hidden; color: var(--ink-soft); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.freshness-badge { margin-left: auto; color: var(--green); font-size: 9px; font-weight: 760; letter-spacing: 0.02em; white-space: nowrap; }
.is-stale .freshness-badge { color: var(--danger); }

.metric-icon {
  display: inline-grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  color: var(--amber-deep);
  background: var(--amber-soft);
}

.metric-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; }
.metric-mainline { display: flex; align-items: baseline; gap: 5px; margin-top: 22px; color: var(--ink); }
.metric-mainline strong { overflow: hidden; color: var(--ink); font-family: var(--mono); font-size: clamp(27px, 2.7vw, 38px); font-weight: 570; letter-spacing: -0.08em; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.metric-mainline > span { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.metric-mainline-wide strong { font-size: clamp(22px, 2vw, 29px); letter-spacing: -0.06em; }
.metric-subline, .traffic-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--muted); font-size: 10px; }
.metric-subline span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter { height: 4px; margin-top: 15px; overflow: hidden; border-radius: 99px; background: #edf0eb; }
.meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--amber); transition: width 350ms ease; }
.sparkline-wrap { position: relative; height: 51px; margin-top: 8px; }
.sparkline { display: block; width: 100%; height: 45px; }
.sparkline-label, .traffic-trend-label { position: absolute; right: 0; bottom: 0; color: var(--faint); font-size: 9px; }
.metric-note { margin: 23px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.uptime-rule { display: flex; align-items: center; gap: 6px; margin-top: 21px; }
.uptime-rule span, .uptime-rule i { display: block; height: 3px; border-radius: 99px; background: #e8ece6; }
.uptime-rule span:first-child { width: 42%; background: rgba(199, 131, 44, 0.42); }
.uptime-rule i { width: 9px; height: 9px; border: 2px solid var(--amber); background: var(--surface); }
.uptime-rule span:last-child { flex: 1; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; }
.section-heading h2 { margin: 7px 0 0; color: var(--ink); font-size: 22px; font-weight: 680; line-height: 1.12; }
.section-heading-compact { margin-bottom: 15px; }
.section-note { margin-bottom: 1px; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: right; }

.traffic-section { margin-top: 49px; scroll-margin-top: 88px; }
.traffic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.traffic-card { position: relative; min-height: 218px; padding: 18px 20px 14px; overflow: hidden; }
.traffic-upload { background: linear-gradient(135deg, #fff, #fbfdf9); }
.traffic-download { background: linear-gradient(135deg, #fff, #f8fbfc); }
.traffic-card-heading > div { display: grid; gap: 3px; }
.traffic-direction { color: var(--muted); font-size: 9px; }
.traffic-arrow { display: inline-grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: var(--green); background: var(--green-soft); }
.traffic-download .traffic-arrow { color: var(--blue); background: var(--blue-soft); }
.traffic-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.traffic-rate { display: flex; align-items: baseline; gap: 6px; margin-top: 22px; color: var(--ink); }
.traffic-rate strong { overflow: hidden; font-family: var(--mono); font-size: clamp(23px, 2.5vw, 31px); font-weight: 570; letter-spacing: -0.07em; text-overflow: ellipsis; white-space: nowrap; }
.traffic-rate span { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.traffic-total { justify-content: flex-start; gap: 12px; margin-top: 7px; }
.traffic-total strong { color: var(--ink-soft); font-family: var(--mono); font-size: 10px; font-weight: 600; }
.traffic-sparkline { display: block; width: 100%; height: 57px; margin-top: 9px; }
.traffic-trend-label { bottom: 14px; }

.service-section { margin-top: 43px; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.service-card { display: flex; min-height: 66px; align-items: center; gap: 11px; padding: 12px 16px; box-shadow: none; }
.service-symbol { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; font-family: Georgia, serif; font-size: 18px; font-weight: 700; }
.service-symbol-xray { color: var(--amber-deep); background: var(--amber-soft); }
.service-symbol-caddy { color: var(--green); background: var(--green-soft); }
.service-copy { display: grid; gap: 3px; }
.service-copy strong { color: var(--ink); font-size: 12px; font-weight: 700; }
.service-copy span { color: var(--muted); font-size: 10px; }
.service-status { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: var(--green); font-size: 10px; font-weight: 700; }
.service-status.is-down { color: var(--danger); }
.service-status.is-unknown { color: var(--muted); }
.service-status.is-stale { opacity: 0.7; }
.service-status.is-unknown .status-dot { box-shadow: none; }

.nodes-section { margin-top: 56px; scroll-margin-top: 88px; }
.nodes-heading { align-items: flex-start; margin-bottom: 19px; }
.nodes-title-row { display: flex; align-items: center; gap: 10px; }
.nodes-title-row h2 { margin-bottom: 0; }
.count-badge { display: inline-grid; min-width: 24px; height: 21px; place-items: center; padding: 0 7px; border: 1px solid #e8cfaa; border-radius: 99px; color: var(--amber-deep); background: var(--amber-soft); font-family: var(--mono); font-size: 10px; }
.section-description { max-width: 670px; margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.plus-icon { font-size: 17px; font-weight: 400; line-height: 0; }
.node-table-head { display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(220px, 1.28fr) minmax(130px, 0.75fr) 190px; gap: 20px; padding: 0 17px 8px; color: var(--faint); font-size: 9px; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; }
.node-table-head span:nth-child(4) { text-align: right; }
.nodes-list { display: grid; gap: 7px; }
.nodes-empty, .nodes-loading { display: grid; min-height: 150px; place-items: center; padding: 25px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); color: var(--muted); text-align: center; background: rgba(255, 255, 255, 0.52); }
.nodes-empty strong, .nodes-loading strong { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.nodes-empty p, .nodes-loading p { max-width: 34em; margin: 0; font-size: 10px; line-height: 1.65; }

.node-card {
  display: grid;
  grid-template-columns: minmax(200px, 1.2fr) minmax(220px, 1.28fr) minmax(130px, 0.75fr) 190px;
  min-width: 0;
  align-items: center;
  gap: 20px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.node-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.node-identity, .node-traffic, .node-last-seen { min-width: 0; }
.node-identity { display: grid; gap: 4px; }
.node-name { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.node-id, .node-created, .node-last-seen, .node-stat-label { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.node-id { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-traffic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.node-stat { display: grid; gap: 3px; }
.node-stat-value { overflow: hidden; color: var(--ink-soft); font-family: var(--mono); font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.node-stat-rate { overflow: hidden; color: var(--muted); font-family: var(--mono); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.node-stat-label { font-family: var(--sans); font-size: 9px; font-weight: 650; }
.node-stat-label.upload { color: var(--green); }
.node-stat-label.download { color: var(--blue); }
.node-last-seen { display: grid; gap: 3px; }
.node-last-seen strong { color: var(--ink-soft); font-family: var(--mono); font-size: 10px; font-weight: 600; }
.node-activity { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 720; }
.node-activity::before { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.node-activity.is-active { color: var(--green); }
.node-activity.is-active::before { box-shadow: 0 0 0 3px rgba(45, 121, 87, 0.11); }
.node-activity.is-idle { color: var(--muted); }
.node-activity.is-unavailable { color: var(--danger); }
.node-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.node-actions .button { min-height: 32px; padding: 0 10px; font-size: 10px; white-space: nowrap; }
.node-actions .button-danger-quiet { border-color: #f0d6cf; color: var(--danger); background: var(--danger-soft); }
.node-actions .button-danger-quiet:hover:not(:disabled) { border-color: #e1b8ae; color: #994936; background: #fbe4de; }

.dashboard-footer { display: flex; width: min(100%, 1430px); align-items: center; justify-content: space-between; gap: 15px; margin: 0 auto; padding: 18px 39px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.dashboard-footer > span:first-child { display: inline-flex; align-items: center; gap: 7px; }

/* Dialogs */

.modal-dialog { width: min(calc(100% - 32px), 480px); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); color: var(--ink); background: var(--surface); box-shadow: 0 26px 80px rgba(32, 39, 35, 0.2); }
.modal-dialog::backdrop { background: rgba(32, 39, 35, 0.38); backdrop-filter: blur(4px); }
.modal-card { position: relative; display: grid; gap: 0; padding: 29px; }
.modal-close { position: absolute; top: 15px; right: 15px; display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: transparent; font-size: 23px; font-weight: 300; line-height: 1; }
.modal-close:hover { border-color: var(--line); color: var(--ink); background: var(--surface-muted); }
.modal-card h2 { margin: 9px 36px 10px 0; color: var(--ink); font-size: 24px; font-weight: 680; line-height: 1.16; }
.modal-card .modal-intro { margin-bottom: 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.modal-card .field-group { margin-top: 2px; }
.modal-note { display: flex; align-items: flex-start; gap: 8px; margin: 15px 0 0; padding: 10px 11px; border-left: 2px solid var(--amber); color: #8a6a31; background: #fff9ed; font-size: 11px; line-height: 1.55; }
.note-mark { display: inline-grid; width: 16px; height: 16px; flex: 0 0 auto; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-family: Georgia, serif; font-size: 10px; font-weight: 700; line-height: 1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }
.modal-warning { margin: -5px 0 10px; padding: 10px 11px; border-left: 2px solid var(--danger); color: #925241; background: var(--danger-soft); font-size: 11px; line-height: 1.55; }
.modal-warning strong { display: block; margin-bottom: 2px; color: #7f392b; font-weight: 700; }
.danger-symbol { display: grid; width: 33px; height: 33px; place-items: center; margin-bottom: 2px; border: 1px solid #e6b8ae; border-radius: 50%; color: var(--danger); font-size: 18px; font-weight: 800; }
.modal-dialog-danger .eyebrow { color: var(--danger); }
kbd { padding: 2px 5px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink-soft); background: var(--surface-muted); font-family: var(--mono); font-size: 9px; }
.copy-link-input { min-height: 55px; padding: 11px 12px; color: var(--amber-deep); font-family: var(--mono); font-size: 10px; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .node-table-head, .node-card { grid-template-columns: minmax(170px, 1.2fr) minmax(200px, 1.25fr) minmax(125px, 0.75fr) 165px; }
}

@media (max-width: 900px) {
  .auth-view { grid-template-columns: 1fr; }
  .auth-editorial { min-height: 340px; }
  .auth-editorial-inner { min-height: 340px; padding: 28px 30px; }
  .editorial-copy { margin: auto 0 0; padding: 44px 0 0; }
  .editorial-copy h1 { margin: 13px 0 12px; font-size: clamp(36px, 9vw, 58px); }
  .editorial-copy > p:last-child, .editorial-footnote { display: none; }
  .editorial-orbit-one { width: 390px; height: 390px; right: -190px; top: -132px; }
  .editorial-orbit-two { width: 260px; height: 260px; right: -125px; top: -67px; }
  .editorial-sun { right: -105px; bottom: -175px; width: 360px; height: 360px; }
  .auth-panel { min-height: 500px; padding: 50px 30px 42px; }
  .dashboard-shell { display: block; }
  .sidebar { position: relative; height: auto; min-height: 0; flex-direction: row; align-items: center; gap: 17px; padding: 14px 20px; }
  .sidebar-caption, .sidebar-spacer, .sidebar-note { display: none; }
  .sidebar-nav { display: flex; gap: 3px; margin-left: auto; }
  .nav-item { min-height: 34px; padding: 0 10px; }
  .nav-item svg { width: 15px; height: 15px; }
  .topbar { padding: 0 24px; }
  .dashboard-content { padding: 36px 24px 54px; }
  .dashboard-footer { padding: 17px 24px 21px; }
}

@media (max-width: 680px) {
  .auth-editorial { min-height: 300px; }
  .auth-editorial-inner { min-height: 300px; padding: 24px 22px; }
  .auth-panel { padding: 42px 22px 34px; }
  .topbar { min-height: 62px; padding: 0 18px; }
  .breadcrumb { font-size: 10px; }
  .connection-label, .topbar-divider, .session-username { display: none; }
  .topbar-actions { gap: 9px; }
  .dashboard-content { padding: 31px 18px 46px; }
  .dashboard-footer { display: grid; gap: 8px; padding: 16px 18px 20px; }
  .dashboard-hero { display: block; margin-bottom: 22px; }
  .dashboard-hero h1 { font-size: 31px; }
  .hero-meta { margin-top: 22px; padding-bottom: 0; text-align: left; }
  .metric-grid, .traffic-grid, .service-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 197px; }
  .traffic-section, .service-section { margin-top: 39px; }
  .nodes-section { margin-top: 47px; }
  .section-heading-compact { display: block; }
  .section-note { margin-top: 9px; text-align: left; }
  .nodes-heading { display: block; }
  .nodes-heading > .button { width: 100%; margin-top: 17px; }
  .node-table-head { display: none; }
  .node-card { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 15px; padding: 14px; }
  .node-identity { grid-column: 1 / -1; }
  .node-traffic { grid-column: 1; grid-row: 2; gap: 9px; }
  .node-last-seen { grid-column: 1; grid-row: 3; }
  .node-actions { grid-column: 2; grid-row: 2 / span 2; flex-direction: column; align-items: stretch; }
  .node-actions .button { min-width: 104px; }
}

@media (max-width: 420px) {
  .sidebar { gap: 10px; padding: 12px 14px; }
  .sidebar-brand .brand-wordmark { font-size: 10px; }
  .sidebar-brand .brand-spark { width: 24px; height: 24px; }
  .nav-item { padding: 0 8px; font-size: 10px; }
  .nav-item svg { display: none; }
  .dashboard-content { padding-left: 14px; padding-right: 14px; }
  .dashboard-footer { padding-left: 14px; padding-right: 14px; }
  .node-card { gap: 11px 10px; }
  .node-actions .button { min-width: 92px; padding: 0 8px; }
}

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