:root {
  --bg: #07101b;
  --panel: rgba(9, 20, 35, 0.78);
  --panel-strong: rgba(11, 24, 41, 0.92);
  --text: #eef6ff;
  --text-dim: rgba(227, 239, 255, 0.72);
  --text-faint: rgba(227, 239, 255, 0.54);
  --border: rgba(152, 192, 255, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --accent: #6ce5ff;
  --accent-strong: #21b8ff;
  --accent-rgb: 108, 229, 255;
  --success: #65f0b7;
  --danger: #ff8db5;
  --font-sans: "Avenir Next", "Segoe UI Variable Display", "Trebuchet MS", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", monospace;
  --card-bg: linear-gradient(180deg, rgba(11, 24, 41, 0.9), rgba(9, 18, 31, 0.82));
  --nebula-bg-image: none;
  --topbar-height: 72px;
}

:root[data-theme-mode="light"] {
  --bg: #eef4fb;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --text: #142235;
  --text-dim: rgba(20, 34, 53, 0.72);
  --text-faint: rgba(20, 34, 53, 0.56);
  --border: rgba(75, 104, 145, 0.16);
  --shadow: 0 18px 45px rgba(39, 61, 92, 0.12);
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.92));
}

:root[data-accent="sunset"] {
  --accent: #ffc177;
  --accent-strong: #ff8f40;
  --accent-rgb: 255, 193, 119;
}

:root[data-accent="ember"] {
  --accent: #ff97b9;
  --accent-strong: #ff5e92;
  --accent-rgb: 255, 151, 185;
}

:root[data-accent="violet"] {
  --accent: #b6a4ff;
  --accent-strong: #776dff;
  --accent-rgb: 182, 164, 255;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    var(--nebula-bg-image) center / cover fixed no-repeat,
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 201, 122, 0.12), transparent 22%),
    linear-gradient(180deg, #050d16 0%, #07101b 48%, #040a12 100%);
  color: var(--text);
  font-family: var(--font-sans);
}

:root[data-theme-mode="light"] html,
:root[data-theme-mode="light"] body {
  background:
    var(--nebula-bg-image) center / cover fixed no-repeat,
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 201, 122, 0.14), transparent 22%),
    radial-gradient(circle at bottom center, rgba(113, 162, 255, 0.12), transparent 34%),
    linear-gradient(180deg, #f7fbff 0%, #edf4fc 50%, #dfe9f6 100%);
}

body {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background-image:
    linear-gradient(rgba(155, 192, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 192, 255, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.78), transparent 88%);
}

body::after {
  background:
    radial-gradient(circle at 12% 20%, rgba(var(--accent-rgb), 0.2), transparent 24%),
    radial-gradient(circle at 82% 12%, rgba(255, 201, 122, 0.14), transparent 18%),
    radial-gradient(circle at 50% 88%, rgba(113, 162, 255, 0.12), transparent 18%);
  filter: blur(28px);
}

:root[data-nebula-route="nodes"] body,
:root[data-nebula-route="ipv6-nodes"] body {
  background:
    var(--nebula-bg-image) center / cover scroll no-repeat,
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(255, 201, 122, 0.1), transparent 18%),
    linear-gradient(180deg, #050d16 0%, #07101b 48%, #040a12 100%);
}

:root[data-theme-mode="light"][data-nebula-route="nodes"] body,
:root[data-theme-mode="light"][data-nebula-route="ipv6-nodes"] body {
  background:
    var(--nebula-bg-image) center / cover scroll no-repeat,
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(255, 201, 122, 0.1), transparent 18%),
    linear-gradient(180deg, #f7fbff 0%, #eef4fb 48%, #e7eef8 100%);
}

:root[data-nebula-route="nodes"] body::after,
:root[data-nebula-route="ipv6-nodes"] body::after {
  filter: blur(16px);
  opacity: 0.58;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

select {
  font: inherit;
}

button {
  cursor: pointer;
}

#app {
  position: relative;
  min-height: 100vh;
}

.glass-card,
.nebula-loading__card {
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

:root[data-nebula-route="nodes"] .glass-card,
:root[data-nebula-route="nodes"] .nebula-loading__card,
:root[data-nebula-route="ipv6-nodes"] .glass-card,
:root[data-nebula-route="ipv6-nodes"] .nebula-loading__card {
  background: linear-gradient(180deg, rgba(11, 24, 41, 0.96), rgba(9, 18, 31, 0.94));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
  backdrop-filter: none;
}

:root[data-theme-mode="light"][data-nebula-route="nodes"] .glass-card,
:root[data-theme-mode="light"][data-nebula-route="nodes"] .nebula-loading__card,
:root[data-theme-mode="light"][data-nebula-route="ipv6-nodes"] .glass-card,
:root[data-theme-mode="light"][data-nebula-route="ipv6-nodes"] .nebula-loading__card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
}

.nebula-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.nebula-loading__card {
  width: min(540px, 100%);
  padding: 28px;
  border-radius: var(--radius-xl);
}

.nebula-loading__card h1 {
  margin: 18px 0 10px;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1;
}

.nebula-loading__card p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.7;
}

.nebula-pill,
.tiny-pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  background: rgba(var(--accent-rgb), 0.08);
}

.nebula-pill {
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tiny-pill,
.status-chip {
  padding: 5px 11px;
  font-size: 12px;
  color: var(--text-dim);
}

.status-chip.online {
  color: var(--success);
  border-color: rgba(101, 240, 183, 0.24);
  background: rgba(101, 240, 183, 0.08);
}

.status-chip.offline {
  color: var(--danger);
  border-color: rgba(255, 141, 181, 0.24);
  background: rgba(255, 141, 181, 0.08);
}

.status-chip.pending {
  color: #f6b84f;
  border-color: rgba(246, 184, 79, 0.24);
  background: rgba(246, 184, 79, 0.1);
}

.status-chip.neutral {
  color: var(--text-dim);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

:root[data-theme-mode="light"] .status-chip.neutral {
  color: #516072;
  border-color: rgba(94, 116, 145, 0.28);
  background: rgba(245, 248, 252, 0.98);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}

:root[data-theme-mode="light"] .status-chip.online {
  color: #0b7a4b;
  border-color: rgba(101, 240, 183, 0.32);
  background: rgba(240, 255, 248, 0.98);
}

:root[data-theme-mode="light"] .status-chip.offline {
  color: #a31d44;
  border-color: rgba(255, 141, 181, 0.32);
  background: rgba(255, 242, 246, 0.98);
}

.status-chip.danger {
  color: var(--danger);
  border-color: rgba(255, 141, 181, 0.24);
  background: rgba(255, 141, 181, 0.08);
}

:root[data-theme-mode="light"] .status-chip.danger {
  color: #a31d44;
  border-color: rgba(255, 141, 181, 0.32);
  background: rgba(255, 242, 246, 0.98);
}

.subscription-alert {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 141, 181, 0.08);
  border: 1px solid rgba(255, 141, 181, 0.22);
  color: var(--danger);
  line-height: 1.7;
}

:root[data-theme-mode="light"] .subscription-alert {
  background: rgba(255, 242, 246, 0.98);
  border-color: rgba(255, 141, 181, 0.32);
  color: #a31d44;
}

.app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 0 20px;
  position: relative;
  z-index: 1;
}

.app-shell:not(.app-shell--landing):not(.app-shell--auth) .topbar {
  margin-bottom: 0;
}

.app-shell:not(.app-shell--landing):not(.app-shell--auth) .dashboard-shell {
  flex: 1 0 auto;
  gap: 24px;
  padding: 0 24px 0 0;
}

.record-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding: 28px 0 6px;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.6;
}

.record-divider {
  opacity: 0.48;
}

.topbar {
  --topbar-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-height);
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 60;
  margin: 0;
  border-radius: 0;
  background: rgba(11, 24, 41, 0.72);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  backdrop-filter: blur(18px);
  isolation: isolate;
}

:root[data-theme-mode="light"] .topbar {
  box-shadow: none;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: transparent;
}

.nebula-topbar {
  padding: 18px 22px;
  border-radius: 26px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand > div,
.brand h1 {
  background: transparent !important;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.24), transparent 40%),
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.35), rgba(255, 212, 121, 0.12));
  box-shadow: inset 0 0 24px rgba(var(--accent-rgb), 0.16);
}

.brand-mark--image {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  border: 0;
}

.brand-mark--image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

:root[data-theme-mode="light"] .brand-mark--image {
  border-color: transparent;
  box-shadow: none;
}

.brand h1,
.section-head h3,
.hero h2,
.auth-panel h2,
.nebula-modal-title {
  margin: 0;
}

.brand h1,
.section-head h3,
.hero h2,
.auth-panel h2,
.nebula-modal-title,
.sidebar-title {
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.section-head h3 {
  font-size: 1.18rem;
}

.brand p {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.brand h1 {
  font-size: 1.28rem;
}

.topbar-user {
  position: relative;
  z-index: 2;
}

.topbar-user__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.topbar-user__trigger,
.topbar-user__menu {
  position: relative;
  z-index: 2;
}

.topbar-user__menu {
  z-index: 10;
}

.topbar-user.is-open .topbar-user__trigger {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.topbar-user__text {
  display: grid;
  gap: 2px;
  text-align: right;
}

.topbar-user__text strong {
  font-size: 0.95rem;
  line-height: 1.1;
}

.topbar-user__text span {
  font-size: 11px;
  color: var(--text-faint);
}

.topbar-user__menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 152px;
  margin-top: 4px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel-strong) 94%, transparent);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.topbar-user__menu-meta {
  display: grid;
  gap: 2px;
  padding: 10px 12px 12px;
  margin-bottom: 0;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  color: var(--text);
}

.topbar-user__menu-meta span {
  font-size: 12px;
  color: var(--text-faint);
}

.topbar-user__menu-meta strong {
  font-size: 1rem;
}

.topbar-user.is-open .topbar-user__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.topbar-user__menu-item {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.topbar-user__menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100%;
  padding: 34px 34px 38px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.45));
}

.hero-copy-block {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(34px, 6vh, 56px);
  min-height: 0;
  padding: 26px 0 4px;
  position: relative;
  z-index: 1;
}

.hero-description {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
}

.hero-subcopy {
  display: block;
  margin-top: 14px;
}

.hero-metric-label {
  margin-top: 12px;
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-dim);
}

.hero-metric-stack {
  display: grid;
  gap: clamp(16px, 2.3vh, 26px);
  margin: auto 0;
  align-content: start;
  justify-items: start;
  width: 100%;
}

.hero-metric-line {
  font-size: clamp(3.4rem, 6.6vw, 5.9rem);
  font-weight: 760;
  line-height: 0.86;
  letter-spacing: -0.095em;
  font-style: italic;
  white-space: nowrap;
  text-wrap: nowrap;
  text-align: left;
}

.hero-metric-value {
  font-size: clamp(3.4rem, 6.4vw, 5.9rem);
  font-weight: 760;
  line-height: 0.86;
  letter-spacing: -0.095em;
  white-space: nowrap;
  text-wrap: nowrap;
  text-align: left;
}

.hero-metric-value em {
  font-style: italic;
}

.hero-custom-line {
  margin: 18px 0 0;
  font-size: clamp(2.4rem, 4.5vw, 4.15rem);
  font-weight: 760;
  line-height: 0.9;
  letter-spacing: -0.085em;
  font-style: italic;
  color: color-mix(in srgb, var(--text-main) 78%, transparent);
  width: 100%;
  white-space: normal;
  text-wrap: balance;
  text-align: left;
  opacity: 0.88;
}

.auth-panel-heading {
  display: grid;
  gap: 10px;
  margin: 16px 0 12px;
}

.auth-panel-eyebrow {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
}

@media (min-width: 1181px) {
  .auth-grid .hero {
    min-height: 560px;
  }
}

.brand p,
.hero p,
.auth-panel p,
.section-copy,
.footer-note {
  color: var(--text-dim);
}

.topbar-actions,
.form-actions,
.toolbar,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #06111b;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 30px rgba(var(--accent-rgb), 0.18);
  font-weight: 700;
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.btn-ghost {
  color: var(--text-dim);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

:root[data-theme-mode="light"] .btn-secondary,
:root[data-theme-mode="light"] .btn-ghost {
  background: rgba(20, 34, 53, 0.035);
  border-color: rgba(75, 104, 145, 0.16);
}

.auth-grid,
.dashboard-grid,
.dashboard-hero,
.dashboard-stat-grid,
.metric-strip,
.kpi-row,
.ip-list,
.session-list,
.node-list,
.notice-list,
.stack {
  display: grid;
  gap: 14px;
}

.auth-grid {
  grid-template-columns: 1.34fr 0.78fr;
  align-items: stretch;
}

.app-shell--landing,
.app-shell--auth {
  gap: 12px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.72fr);
  gap: 22px;
  align-items: stretch;
  padding: 28px;
  min-height: calc(100vh - 180px);
}

.landing-hero__copy,
.landing-hero__panel {
  display: grid;
  align-content: start;
}

.landing-hero__copy {
  gap: 18px;
  padding: 10px;
}

.landing-hero__copy h2,
.auth-shell__copy h2 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.landing-hero__copy p,
.auth-shell__copy p {
  margin: 0;
  max-width: 760px;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.8;
}

.landing-hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-hero__panel {
  gap: 14px;
}

.landing-metric-card,
.auth-shell__stat {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.landing-metric-card span,
.auth-shell__stat span {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.landing-metric-card strong,
.auth-shell__stat strong {
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.auth-shell__stat small {
  color: #64748b;
  line-height: 1.6;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 440px);
  gap: 24px;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 14px;
  border-radius: 40px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel-strong) 92%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.auth-shell__copy {
  display: grid;
  gap: 18px;
  padding: 32px;
  align-content: center;
  min-height: 520px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-panel {
  min-height: 520px;
}

.app-shell--auth .auth-panel {
  padding: 32px;
  border-radius: 28px;
  background: rgba(7, 16, 27, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none;
  backdrop-filter: none;
}

:root[data-theme-mode="light"] .auth-shell {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 45px rgba(39, 61, 92, 0.12);
}

:root[data-theme-mode="light"] .auth-shell__copy {
  background: rgba(247, 250, 255, 0.74);
  border-color: rgba(75, 104, 145, 0.12);
}

:root[data-theme-mode="light"] .app-shell--auth .auth-panel {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(75, 104, 145, 0.12);
}

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

.portal-home {
  display: grid;
  gap: 24px;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  border-radius: 24px;
  margin-bottom: 0;
}

.landing-nav .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.landing-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-content {
  display: grid;
  gap: 18px;
}

.hero-tag {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stats {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: nowrap;
}

.stat-item {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item h3 {
  margin: 0 0 4px;
  font-size: 1.9rem;
}

.stat-item p {
  margin: 0;
  color: var(--text-dim);
}

.live-dashboard {
  padding: 0;
}

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

.dash-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.dash-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.dash-value span:first-child {
  font-size: 1.8rem;
  font-weight: 700;
}

.dash-unit {
  color: var(--text-dim);
}

.dash-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.features {
  display: grid;
  gap: 18px;
  text-align: center;
}

.section-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.section-desc {
  margin: 0 auto;
  max-width: 720px;
  color: var(--text-dim);
}

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

.feature-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 0 2px;
}

.copyright {
  color: var(--text-dim);
}

.portal-home__hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  overflow: hidden;
}

.portal-home__hero-copy {
  display: grid;
  gap: 18px;
  max-width: 860px;
}

.portal-home__hero-copy h2 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.portal-home__hero-copy p {
  margin: 0;
  max-width: 760px;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.8;
}

.portal-home__hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-home__hero-badge {
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.14);
}

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

.portal-summary-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
}

.portal-summary-card.is-primary {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border-color: transparent;
  color: #fff;
}

.portal-summary-card p,
.portal-summary-card span {
  margin: 0;
  color: var(--text-faint);
}

.portal-summary-card.is-primary p,
.portal-summary-card.is-primary span {
  color: rgba(255, 255, 255, 0.82);
}

.portal-summary-card h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.portal-detail-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 20px;
}

.portal-detail-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.portal-detail-card__head {
  display: grid;
  gap: 6px;
}

.portal-detail-card__head span {
  color: var(--text-faint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.portal-detail-card__head h3 {
  margin: 0;
  font-size: 1.55rem;
}

.portal-detail-card__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-nav .btn,
.landing-nav a {
  white-space: nowrap;
}

.auth-admin-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 132px);
  padding: 44px 16px 16px;
}

.auth-admin-card {
  width: min(560px, 100%);
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 28px;
  overflow: visible;
  background: linear-gradient(180deg, rgba(12, 24, 40, 0.96), rgba(8, 16, 28, 0.94));
  border: 1px solid rgba(152, 192, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.auth-admin-card__intro {
  display: none;
}

.auth-admin-card__logo .brand-mark,
.auth-admin-card__logo .brand-mark--image {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 20px;
}

.auth-admin-card__status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(var(--accent-rgb), 0.14);
  color: color-mix(in srgb, var(--accent) 76%, white);
  font-weight: 700;
}

.auth-admin-card__form {
  display: grid;
  gap: 18px;
  padding: 34px 32px 26px;
  background: transparent;
  color: var(--text);
}

.auth-admin-card__form--single {
  padding-top: 34px;
}

.app-shell--auth .auth-panel {
  padding: 0;
  min-height: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.app-shell--auth .topbar {
  --topbar-height: 64px;
  min-height: var(--topbar-height);
  padding: 10px 8%;
  background: rgba(8, 16, 28, 0.72);
  border-bottom: 1px solid rgba(152, 192, 255, 0.12);
  backdrop-filter: blur(18px);
}

.app-shell--auth .topbar .brand-copy h1 {
  font-size: 1.12rem;
}

.app-shell--auth .topbar .brand-copy p {
  font-size: 0.8rem;
}

.app-shell--auth .topbar .brand-mark,
.app-shell--auth .topbar .brand-mark--image {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
}

.app-shell--auth .auth-panel-heading {
  position: absolute;
  top: 0;
  left: -1px;
  right: auto;
  transform: translateY(-100%);
  margin: 0;
  z-index: 2;
  display: inline-grid;
  gap: 2px;
  padding: 9px 14px 11px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, rgba(12, 24, 40, 0.98), rgba(9, 18, 31, 0.96));
  border: 1px solid rgba(152, 192, 255, 0.14);
  border-bottom: 0;
  box-shadow: none;
}

.app-shell--auth .auth-panel-heading::before {
  display: none;
}

.app-shell--auth .auth-panel-heading::after {
  display: none;
}

.hero,
.auth-panel,
.section-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 28px;
}

.auth-panel {
  width: min(100%, 460px);
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0;
  z-index: 1;
  padding-top: 20px;
}

.hero::before,
.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.08), transparent 38%, rgba(var(--accent-rgb), 0.1));
}

.auth-panel > * {
  position: relative;
  z-index: 1;
}

.hero h2,
.auth-panel h2 {
  margin: 14px 0 12px;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.auth-panel-heading h2 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.05;
}

.app-shell--auth .auth-panel-eyebrow {
  color: color-mix(in srgb, var(--accent) 78%, white);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.app-shell--auth .auth-panel-heading h2 {
  color: var(--text);
}

:root[data-theme-mode="light"] .auth-admin-card {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

:root[data-theme-mode="light"] .auth-admin-card__status {
  background: #ecfeff;
  color: #0f766e;
}

:root[data-theme-mode="light"] .auth-admin-card__form {
  background: #fff;
  color: #0f172a;
}

:root[data-theme-mode="light"] .app-shell--auth .topbar {
  background: rgba(255, 255, 255, 0.84);
  border-bottom-color: #e2e8f0;
  backdrop-filter: blur(10px);
}

:root[data-theme-mode="light"] .app-shell--auth .auth-panel-heading {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(148, 163, 184, 0.16);
}

:root[data-theme-mode="light"] .app-shell--auth .auth-panel-eyebrow {
  color: #2563eb;
}

:root[data-theme-mode="light"] .app-shell--auth .auth-panel-heading h2 {
  color: #0f172a;
}

.auth-panel form[data-form] {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  width: 100%;
}

.auth-panel .form-actions {
  margin-top: 18px;
  padding-top: 8px;
}

.auth-panel .form-actions .btn-primary {
  width: 100%;
  justify-content: center;
}

.auth-panel .form-tabs,
.auth-panel .field,
.auth-panel .form-actions {
  width: 100%;
}

.hero h2 {
  margin-bottom: 0;
}

.hero .hero-metric-label {
  margin-top: 0;
}

.metric-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.metric-box,
.dashboard-stat,
.kpi-box,
.token-field,
.ip-item,
.session-item,
.node-item,
.notice-item,
.message-banner,
.empty-state {
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.metric-box .value,
.dashboard-stat .value,
.kpi-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.kpi-box {
  min-width: 0;
}

.kpi-label {
  white-space: nowrap;
}

.kpi-value {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.section-card--overview .kpi-value {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.section-card--overview .kpi-box:nth-child(1) .kpi-value,
.section-card--overview .kpi-box:nth-child(4) .kpi-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}

.section-card--overview .kpi-box:nth-child(4) .kpi-value span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-box .label,
.dashboard-stat .label,
.kpi-label,
.meta-label {
  display: block;
  margin-top: 8px;
  color: var(--text-faint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.message-banner {
  margin-bottom: 16px;
  color: var(--text-dim);
}

.message-banner.error {
  color: var(--danger);
  border-color: rgba(255, 141, 181, 0.22);
  background: rgba(255, 141, 181, 0.08);
}

.message-banner.success {
  color: var(--success);
  border-color: rgba(101, 240, 183, 0.22);
  background: rgba(101, 240, 183, 0.08);
}

.form-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 2;
}

:root[data-theme-mode="light"] .form-tabs {
  background: rgba(20, 34, 53, 0.03);
  border-color: rgba(75, 104, 145, 0.14);
}

.form-tab {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.form-tab.active {
  color: #07111d;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-weight: 700;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 13px;
  color: var(--text-dim);
}

.field-help {
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.7;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 14px 16px;
  outline: none;
}

.field select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 14px 16px;
  outline: none;
}

:root[data-theme-mode="light"] .field input,
:root[data-theme-mode="light"] .field textarea,
:root[data-theme-mode="light"] .field select {
  background: rgba(20, 34, 53, 0.035);
  border-color: rgba(75, 104, 145, 0.16);
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
}

.node-search-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 8px 14px;
  font-size: 14px;
  width: 180px;
  outline: none;
  transition: all 0.2s ease;
}

.node-search-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(var(--accent-rgb), 0.5);
  width: 240px;
}

:root[data-theme-mode="light"] .node-search-input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

.node-action-btn {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  cursor: pointer;
}

:root[data-nebula-route="nodes"] .node-action-btn,
:root[data-nebula-route="ipv6-nodes"] .node-action-btn {
  backdrop-filter: none;
}

.node-action-btn:hover {
  background: var(--accent);
  color: #08101c;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.node-action-btn:active {
  transform: translateY(0);
}

:root[data-theme-mode="light"] .node-action-btn {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.15);
}

:root[data-theme-mode="light"] .node-action-btn:hover {
  color: #fff;
}

.node-info-pre {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--accent);
  overflow-x: auto;
  white-space: pre-wrap;
  border: 1px solid var(--border);
  margin: 10px 0;
  max-height: 300px;
}

.input-with-button {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-with-button:focus-within {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
}

.input-with-button input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 14px 16px;
  color: var(--text);
  outline: none;
  border-radius: 16px;
  font-size: inherit;
  font-family: inherit;
}

.input-with-button .send-code-btn {
  height: auto;
  align-self: stretch;
  min-width: 100px;
  padding-left: 14px;
  padding-right: 14px;
  margin: 4px;
  border-radius: 12px;
  flex-shrink: 0;
}

:root[data-theme-mode="light"] .input-with-button {
  background: rgba(20, 34, 53, 0.035);
  border-color: rgba(75, 104, 145, 0.16);
}

@media (max-width: 480px) {
  .input-with-button .send-code-btn {
    min-width: 80px;
    font-size: 11px;
    padding-left: 8px;
    padding-right: 8px;
    margin: 3px;
    border-radius: 10px;
  }
}

:root[data-theme-mode="light"] .node-info-pre {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text);
}

.dashboard-hero {
  grid-template-columns: 1.45fr 0.85fr;
  margin-bottom: 18px;
}

.dashboard-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.dashboard-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

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

.section-card--overview {
  max-width: 100%;
}

.dashboard-grid--overview .kpi-row {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

.overview-split-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.overview-split-panel--interactive {
  cursor: pointer;
}

.overview-split-panel--interactive:hover {
  border-color: rgba(var(--accent-rgb), 0.24);
  background: rgba(var(--accent-rgb), 0.08);
}

.overview-split-panel .kpi-row {
  margin-top: 0;
}

.overview-split-head {
  display: grid;
  gap: 8px;
}

.overview-split-head h4 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}

.overview-split-head p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.6;
}

.overview-split-toolbar {
  margin-top: auto;
}

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

.notification-item {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.notification-copy {
  display: grid;
  gap: 8px;
}

.notification-copy strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.notification-meta {
  color: var(--text-dim);
  line-height: 1.5;
  font-size: 13px;
}

.notification-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 0 24px 0 0;
}

.dashboard-main {
  display: grid;
  gap: 18px;
  align-content: start;
  grid-column: 2;
}

.dashboard-sidebar {
  grid-column: 1;
  position: fixed;
  top: calc(var(--topbar-height) - 1px);
  left: 0;
  width: 300px;
  height: calc(100dvh - var(--topbar-height) + 1px);
  display: grid;
  gap: 12px;
  padding: 14px 12px;
  border-radius: 0 0 22px 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: rgba(11, 24, 41, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-left: 0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
  scrollbar-gutter: stable;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 5;
}

.dashboard-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.app-shell--landing {
  --landing-topbar-height: 64px;
  gap: 0;
  padding: 0;
  min-height: 100dvh;
  background: transparent;
  color: var(--text);
}

.app-shell--landing .topbar {
  --topbar-height: 64px;
  min-height: var(--topbar-height);
  padding: 10px 8%;
  background: rgba(8, 16, 28, 0.72);
  border-bottom: 1px solid rgba(152, 192, 255, 0.12);
  backdrop-filter: blur(18px);
}

.app-shell--landing .topbar .brand-copy h1 {
  font-size: 1.12rem;
}

.app-shell--landing .topbar .brand-copy p {
  font-size: 0.8rem;
}

.app-shell--landing .topbar .brand-mark,
.app-shell--landing .topbar .brand-mark--image {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
}

.app-shell--landing .landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 8%;
  margin: 0;
  border-radius: 0;
  background: rgba(8, 16, 28, 0.72);
  border: 0;
  border-bottom: 1px solid rgba(152, 192, 255, 0.12);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.app-shell--landing .landing-nav .logo {
  color: var(--text);
  gap: 14px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-shell--landing .landing-nav .logo .brand-mark {
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
}

.app-shell--landing .landing-nav .nav-links a {
  color: var(--text-dim);
}

.app-shell--landing .landing-nav .nav-links a:hover,
.app-shell--landing .landing-nav .nav-links .btn:hover {
  color: #2563eb;
}

.app-shell--landing .landing-hero {
  display: flex;
  flex-direction: row;
  flex: 1 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 2.8rem;
  padding: 46px 8% 64px;
  min-height: calc(100dvh - var(--landing-topbar-height));
  background: transparent;
  box-shadow: none;
  border: 0;
  border-radius: 0;
}

.app-shell--landing .landing-hero__copy {
  flex: 0 1 44%;
  max-width: 44%;
  margin: 0;
  padding: 0;
  text-align: left;
}

.app-shell--landing .landing-hero__copy h1,
.app-shell--landing .section-title {
  font-family: "Outfit", "Avenir Next", "Segoe UI Variable Display", "Trebuchet MS", sans-serif;
}

.app-shell--landing .landing-hero__copy h1 {
  color: var(--text);
  font-size: clamp(3rem, 5.4vw, 4.05rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 0.72rem;
}

.app-shell--landing .landing-hero__copy p {
  color: var(--text-dim);
  font-size: 1.08rem;
  line-height: 1.9;
  max-width: 620px;
}

.app-shell--landing .hero-tag {
  background: rgba(var(--accent-rgb), 0.12);
  color: color-mix(in srgb, var(--accent) 78%, white);
  margin-bottom: 0.5rem;
}

.app-shell--landing .landing-hero__panel {
  flex: 0 1 48%;
  max-width: 48%;
  min-height: 56vh;
  margin-left: 0;
}

.app-shell--landing #network-map {
  position: relative;
  min-height: 460px;
  height: 56vh;
  overflow: visible;
  border-radius: 28px;
  border: 1px solid rgba(152, 192, 255, 0.14);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.14), transparent 28%),
    radial-gradient(circle at 18% 18%, rgba(101, 240, 183, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(10, 21, 35, 0.94) 0%, rgba(6, 13, 22, 0.96) 100%);
}

.app-shell--landing .landing-map-card {
  display: flex;
  flex-direction: column;
  padding: 1.2rem;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
}

.app-shell--landing .landing-map-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1.5rem;
  margin-bottom: 0.45rem;
}

.app-shell--landing .landing-map-card__head h3 {
  margin: 0.25rem 0 0;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.app-shell--landing .landing-map-card__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  color: color-mix(in srgb, var(--accent) 80%, white);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.app-shell--landing .landing-map-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.app-shell--landing .landing-map-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(152, 192, 255, 0.12);
  color: var(--text-dim);
  font-size: 0.86rem;
  font-weight: 600;
}

.app-shell--landing .landing-map-surface {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), 0.08), transparent 62%);
  background-size: 48px 48px, 48px 48px, auto;
}

.app-shell--landing .landing-map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.app-shell--landing .landing-map-grid {
  opacity: 1;
}

.app-shell--landing .landing-map-continent {
  fill: none;
  stroke: rgba(132, 168, 255, 0.18);
  stroke-width: 36;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell--landing .landing-map-continent--small {
  stroke-width: 18;
}

.app-shell--landing .landing-map-route {
  fill: none;
  stroke: rgba(108, 229, 255, 0.42);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 6 8;
}

.app-shell--landing .landing-map-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(152, 192, 255, 0.16);
  background: rgba(8, 16, 28, 0.9);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
}

.app-shell--landing .landing-map-node::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 0.45rem;
  background: #64748b;
}

.app-shell--landing .landing-map-node--source {
  color: color-mix(in srgb, var(--accent) 80%, white);
  border-color: rgba(var(--accent-rgb), 0.28);
}

.app-shell--landing .landing-map-node--source::before {
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0.16);
}

.app-shell--landing .landing-map-node--target::before {
  background: rgba(226, 232, 240, 0.84);
}

.app-shell--landing .stats {
  padding: 3rem 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.app-shell--landing .stat-item {
  flex: 1;
  min-width: 150px;
  padding: 18px 20px;
  border-radius: 22px;
  text-align: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.app-shell--landing .live-dashboard {
  padding: 4rem 8%;
  background: #f8fafc;
}

.app-shell--landing .dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-shell--landing .dash-card {
  padding: 1.5rem;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.app-shell--landing .features {
  padding: 8rem 8%;
  text-align: center;
  gap: 1rem;
}

.app-shell--landing .feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.app-shell--landing .feature-card {
  padding: 3rem 2rem;
  background: #f8fafc;
  border-radius: 24px;
  border: 1px solid transparent;
  text-align: left;
}

.app-shell--landing .feature-card:hover {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  transform: translateY(-10px);
}

.app-shell--landing .landing-footer {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 14px;
  display: grid;
  gap: 0.12rem;
  align-content: start;
  justify-items: start;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  z-index: 2;
}

.app-shell--landing .record-footer-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.app-shell--landing .landing-footer .copyright,
.app-shell--landing .record-footer {
  font-family: "Inter", "Avenir Next", "Segoe UI Variable Text", "Trebuchet MS", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.08;
  color: var(--text-faint);
}

.app-shell--landing .landing-footer .copyright {
  font-weight: 600;
  text-align: left;
}

.app-shell--landing .record-footer {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.1rem;
}

.app-shell--landing .record-footer .record-divider {
  display: inline;
}

:root[data-theme-mode="light"] .app-shell--landing {
  color: #1e293b;
}

:root[data-theme-mode="light"] .app-shell--landing .topbar,
:root[data-theme-mode="light"] .app-shell--landing .landing-nav {
  background: rgba(255, 255, 255, 0.84);
  border-bottom-color: #e2e8f0;
  backdrop-filter: blur(10px);
}

:root[data-theme-mode="light"] .app-shell--landing .landing-nav .logo {
  color: #2563eb;
}

:root[data-theme-mode="light"] .app-shell--landing .landing-nav .nav-links a {
  color: #1e293b;
}

:root[data-theme-mode="light"] .app-shell--landing .landing-hero__copy h1 {
  color: #1e293b;
}

:root[data-theme-mode="light"] .app-shell--landing .landing-hero__copy p,
:root[data-theme-mode="light"] .app-shell--landing .landing-footer .copyright,
:root[data-theme-mode="light"] .app-shell--landing .record-footer {
  color: #64748b;
}

:root[data-theme-mode="light"] .app-shell--landing .hero-tag {
  background: #eff6ff;
  color: #2563eb;
}

:root[data-theme-mode="light"] .app-shell--landing #network-map {
  border-color: #e2e8f0;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 28%),
    radial-gradient(circle at 18% 18%, rgba(34, 197, 94, 0.08), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

:root[data-theme-mode="light"] .app-shell--landing .landing-map-card {
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.08);
}

:root[data-theme-mode="light"] .app-shell--landing .landing-map-card__head h3 {
  color: #0f172a;
}

:root[data-theme-mode="light"] .app-shell--landing .landing-map-card__eyebrow {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

:root[data-theme-mode="light"] .app-shell--landing .landing-map-pill {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(148, 163, 184, 0.26);
  color: #334155;
}

:root[data-theme-mode="light"] .app-shell--landing .landing-map-surface {
  background:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.06), transparent 62%);
  background-size: 48px 48px, 48px 48px, auto;
}

:root[data-theme-mode="light"] .app-shell--landing .landing-map-continent {
  stroke: rgba(37, 99, 235, 0.12);
}

:root[data-theme-mode="light"] .app-shell--landing .landing-map-route {
  stroke: rgba(37, 99, 235, 0.4);
}

:root[data-theme-mode="light"] .app-shell--landing .landing-map-node {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

:root[data-theme-mode="light"] .app-shell--landing .landing-map-node::before {
  background: #94a3b8;
}

:root[data-theme-mode="light"] .app-shell--landing .landing-map-node--source {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.22);
}

:root[data-theme-mode="light"] .app-shell--landing .landing-map-node--source::before {
  background: #2563eb;
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.14);
}

:root[data-theme-mode="light"] .app-shell--landing .landing-map-node--target::before {
  background: #0f172a;
}

.sidebar-header {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.sidebar-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.sidebar-meta-card {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.sidebar-meta-card--plan {
  grid-column: 1 / -1;
}

.sidebar-meta-card span {
  color: var(--text-faint);
  font-size: 12px;
}

.sidebar-meta-card strong {
  font-size: 1.1rem;
  color: var(--text);
}

.sidebar-title {
  margin: 0;
  font-size: 1.02rem;
}

.sidebar-nav,
.sidebar-kpis {
  display: grid;
  gap: 8px;
}

.sidebar-link,
.sidebar-kpi {
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.sidebar-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.sidebar-link:hover {
  transform: translateX(2px);
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.is-active {
  border-color: rgba(37, 99, 235, 0.22);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(37, 99, 235, 0.1));
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
}

.sidebar-link__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
}

.sidebar-link.is-active .sidebar-link__dot {
  background: rgba(37, 99, 235, 0.95);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
}

.sidebar-link strong,
.sidebar-kpi strong {
  display: block;
  font-size: 0.96rem;
  line-height: 1.25;
}

.sidebar-progress {
  margin-top: 0;
}

.nebula-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(320px, 0.74fr);
  gap: 18px;
  align-items: start;
}

.nebula-app-stage {
  position: relative;
  min-height: 100%;
  padding: 18px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.nebula-app-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 20%),
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.12), transparent 24%);
}

.nebula-app-stage > #app {
  position: relative;
  z-index: 1;
}

.nebula-side-rail {
  display: grid;
  gap: 18px;
  align-content: start;
}

.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-12 { grid-column: span 12; }

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

.section-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.section-head .tiny-pill {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.18);
}

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

.progress {
  margin-top: 16px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

:root[data-theme-mode="light"] .progress {
  background: rgba(20, 34, 53, 0.08);
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.token-field {
  font-family: var(--font-mono);
  color: var(--text-dim);
  overflow: auto;
  white-space: nowrap;
}

.token-field--masked {
  display: grid;
  gap: 8px;
  font-family: var(--font-sans);
  white-space: normal;
}

.token-field--masked strong {
  color: var(--text);
  font-size: 1rem;
}

.session-item,
.notice-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.session-list--access-log {
  max-height: none;
  overflow: visible;
  padding: 4px 8px 4px 2px;
  gap: 10px;
}

.session-list--access-log .session-item {
  padding: 12px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.session-list--access-log .session-item:last-child {
  border-bottom: none;
}

.session-list--access-log::-webkit-scrollbar {
  width: 0;
}

.session-list--access-log::-webkit-scrollbar-thumb {
  border-radius: 0;
  background: transparent;
}

.session-list--access-log::-webkit-scrollbar-track {
  background: transparent;
}

.session-copy,
.node-copy,
.notice-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.session-copy strong {
  line-height: 1.45;
  word-break: break-word;
}

.session-meta {
  line-height: 1.6;
  word-break: break-word;
}

.node-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.section-card--nodes {
  overflow: visible;
}

.node-item {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  height: 100%;
  grid-template-rows: auto auto auto;
  isolation: isolate;
  background: linear-gradient(180deg, rgba(15, 28, 46, 0.92), rgba(10, 20, 34, 0.88));
  border: 1px solid rgba(152, 192, 255, 0.14);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

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

.node-copy {
  min-width: 0;
}

.node-copy strong {
  word-break: break-word;
}

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

.node-spec {
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(152, 192, 255, 0.12);
}

.dashboard-main .section-card,
.dashboard-main .section-card--overview,
.dashboard-main .section-card--nodes {
  background: linear-gradient(180deg, rgba(12, 24, 40, 0.88), rgba(8, 16, 28, 0.82));
  border: 1px solid rgba(152, 192, 255, 0.14);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}

.dashboard-main .section-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.dashboard-main .section-card {
  padding: 22px;
}

.node-search-input {
  width: min(320px, 100%);
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(152, 192, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  outline: none;
}

.node-search-input::placeholder {
  color: var(--text-faint);
}

:root[data-theme-mode="light"] .metric-box,
:root[data-theme-mode="light"] .dashboard-stat,
:root[data-theme-mode="light"] .kpi-box,
:root[data-theme-mode="light"] .token-field,
:root[data-theme-mode="light"] .ip-item,
:root[data-theme-mode="light"] .session-item,
:root[data-theme-mode="light"] .node-item,
:root[data-theme-mode="light"] .notice-item,
:root[data-theme-mode="light"] .message-banner,
:root[data-theme-mode="light"] .empty-state,
:root[data-theme-mode="light"] .sidebar-link,
:root[data-theme-mode="light"] .sidebar-kpi,
:root[data-theme-mode="light"] .backbone-history-inline {
  background: rgba(20, 34, 53, 0.035);
  border-color: rgba(75, 104, 145, 0.14);
}

:root[data-theme-mode="light"] .backbone-history-inline {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(75, 104, 145, 0.2);
}

:root[data-theme-mode="light"] .backbone-monitor-item__status .status-chip.neutral,
:root[data-theme-mode="light"] .backbone-monitor-task-row__right .status-chip.neutral {
  color: #516072;
  border-color: rgba(94, 116, 145, 0.28);
  background: rgba(245, 248, 252, 0.98);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}

:root[data-theme-mode="light"] .dashboard-sidebar,
:root[data-theme-mode="light"] .dashboard-main .section-card,
:root[data-theme-mode="light"] .node-item {
  background: rgba(255, 255, 255, 0.82);
}

:root[data-theme-mode="light"] .dashboard-sidebar {
  background: rgba(255, 255, 255, 0.46);
}

:root[data-theme-mode="light"] .sidebar-header {
  background: rgba(255, 255, 255, 0.42);
}

:root[data-theme-mode="light"] .sidebar-meta-card {
  background: rgba(255, 255, 255, 0.5);
}

:root[data-theme-mode="light"] .sidebar-link,
:root[data-theme-mode="light"] .sidebar-kpi {
  background: rgba(248, 250, 252, 0.52);
}

:root[data-theme-mode="light"] .node-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

:root[data-theme-mode="light"] .node-spec {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.14);
}

:root[data-theme-mode="light"] .dashboard-main .section-card,
:root[data-theme-mode="light"] .dashboard-main .section-card--overview,
:root[data-theme-mode="light"] .dashboard-main .section-card--nodes {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

:root[data-theme-mode="light"] .node-search-input {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.94);
}

:root[data-theme-mode="light"] .brand,
:root[data-theme-mode="light"] .brand > div,
:root[data-theme-mode="light"] .brand h1 {
  background: transparent !important;
  box-shadow: none;
}

:root[data-theme-mode="light"] .topbar {
  background: rgba(255, 255, 255, 0.46);
  box-shadow: none;
}

:root[data-theme-mode="light"] .topbar-user {
  background: rgba(255, 255, 255, 0.56);
}

:root[data-theme-mode="light"] .topbar-user__menu {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(39, 61, 92, 0.16);
}

:root[data-theme-mode="light"] .portal-summary-card,
:root[data-theme-mode="light"] .portal-detail-card {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(39, 61, 92, 0.1);
}

:root[data-theme-mode="light"] .auth-admin-card {
  background: rgba(255, 255, 255, 0.98);
}

:root[data-theme-mode="light"] .auth-admin-card__intro {
  background: linear-gradient(180deg, rgba(245, 248, 252, 0.98), rgba(241, 245, 249, 0.96));
}

:root[data-theme-mode="light"] .auth-admin-card__form {
  background: #fff;
}

@media (max-width: 1180px) {
  .app-shell {
    padding: 0 0 16px;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }

  .portal-detail-grid,
  .auth-admin-card,
  .portal-home__hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

  .dashboard-main,
  .dashboard-sidebar {
    grid-column: auto;
  }

  .dashboard-sidebar {
    position: relative;
    top: 0;
    left: auto;
    width: auto;
    height: auto;
    max-height: none;
    border-left: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
  }

  .node-list {
    grid-template-columns: 1fr;
  }
}

.node-spec strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
}

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

.real-name-identity {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.real-name-alert {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  color: var(--text-dim);
  line-height: 1.7;
}

.real-name-alert--rejected {
  border-color: rgba(255, 141, 181, 0.22);
  background: rgba(255, 141, 181, 0.08);
  color: var(--danger);
}

.node-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.node-list-wrap {
  display: grid;
  gap: 14px;
}

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

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.theme-switch__track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 58px;
  height: 30px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.theme-switch__icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--text-faint);
  transition: color 240ms ease;
  pointer-events: none;
}

.theme-switch.is-dark .theme-switch__icon--moon {
  color: #06111b;
}

.theme-switch.is-light .theme-switch__icon--sun {
  color: #06111b;
}

.theme-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
  transition: left 320ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 240ms ease, background 240ms ease;
}

.theme-switch.is-dark .theme-switch__thumb {
  left: 3px;
}

.theme-switch.is-light .theme-switch__thumb {
  left: 31px;
}

:root[data-theme-mode="light"] .theme-switch__track {
  background: rgba(20, 34, 53, 0.05);
  border-color: rgba(75, 104, 145, 0.16);
}

.session-copy strong,
.node-copy strong,
.notice-copy strong {
  font-size: 15px;
}

.session-meta,
.node-meta,
.notice-meta {
  color: var(--text-faint);
  font-size: 13px;
}

.ip-list {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.ip-item code {
  font-family: var(--font-mono);
  color: var(--text);
}

.empty-state {
  color: var(--text-faint);
  text-align: center;
}

:root[data-theme-mode="light"] .node-spec {
  background: rgba(20, 34, 53, 0.035);
  border-color: rgba(75, 104, 145, 0.14);
}

:root[data-theme-mode="light"] .glass-card,
:root[data-theme-mode="light"] .nebula-loading__card {
  border-color: rgba(75, 104, 145, 0.14);
}

.sidebar-overlay,
.menu-toggle {
  display: none;
}

.sidebar-overlay,
.menu-toggle {
  display: none;
}

@media (max-width: 1180px) {
  .auth-grid,
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .span-5,
  .span-6,
  .span-7 {
    grid-column: span 12;
  }

  .nebula-main-grid {
    grid-template-columns: 1fr;
  }

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

  /* Sidebar Drawer for Mobile */
  .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    z-index: 10000;
    transform: translateX(-110%) scale(0.96);
    filter: blur(8px);
    transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1), 
                filter 400ms ease,
                box-shadow 450ms ease,
                opacity 450ms ease;
    background: var(--panel-strong) !important;
    border-radius: 0 !important;
    border: none !important;
    border-right: 1px solid var(--border) !important;
    border-left: 0 !important;
    backdrop-filter: blur(28px);
    overflow-y: auto;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
  }

  [data-sidebar-open="true"] .dashboard-sidebar,
  .dashboard-sidebar.is-open {
    transform: translateX(0) scale(1);
    filter: blur(0);
    opacity: 1;
    pointer-events: auto;
    box-shadow: 40px 0 100px rgba(0, 0, 0, 0.45);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 9, 17, 0.55);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 400ms ease, visibility 400ms ease, backdrop-filter 400ms ease;
    backdrop-filter: blur(0px);
    display: block;
  }

  [data-sidebar-open="true"] .sidebar-overlay,
  .sidebar-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(8px);
  }

  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    color: var(--text);
    cursor: pointer;
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: 100%;
    padding-top: 10px;
    min-height: 100dvh;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px 12px;
    flex-wrap: nowrap;
  }

  .brand {
    min-width: 0;
  }

  .brand h1 {
    display: none;
  }

  .brand p,
  .topbar-user__text span {
    display: none;
  }

  .topbar-actions {
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    justify-content: flex-end;
  }

  .topbar-user {
    padding: 7px 10px;
  }

  .topbar-user__text {
    text-align: left;
  }

  .topbar-user__text strong {
    font-size: 12px;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .portal-home__hero,
  .auth-admin-card__intro,
  .auth-admin-card__form {
    padding: 18px;
  }

  .auth-admin-card__intro,
  .auth-admin-card__form,
  .auth-admin-card__heading,
  .auth-admin-card__footer,
  .auth-admin-card__status,
  .auth-shell__stats {
    text-align: center;
    justify-items: center;
    justify-content: center;
  }

  .auth-admin-card__status {
    margin-inline-start: auto;
    margin-inline-end: auto;
  }

  .auth-admin-card__footer {
    align-items: flex-end;
    flex-direction: column;
  }

  .auth-admin-shell {
    min-height: calc(100vh - 108px);
    padding: 12px;
  }

  .auth-admin-card {
    grid-template-columns: 1fr;
    width: min(100%, 760px);
    border-radius: 24px;
  }

  .auth-admin-card__intro {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  }

  .landing-nav {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-end;
  }

  .landing-nav .nav-links {
    width: 100%;
    justify-content: flex-end;
    gap: 10px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 20px;
  }

  .stats,
  .dashboard-grid,
  .feature-grid {
    grid-template-columns: 1fr;
    flex-wrap: wrap;
  }

  .hero-badge-row {
    align-items: flex-start;
  }

  .metric-strip,
  .dashboard-stat-grid,
  .kpi-row,
  .notification-grid,
  .node-specs,
  .real-name-grid {
    grid-template-columns: 1fr;
  }

  .node-list {
    grid-template-columns: 1fr;
  }

  .access-log-range-row {
    grid-template-columns: 1fr;
  }

  .hero,
  .auth-panel,
  .section-card {
    padding: 20px;
  }

  .auth-panel {
    margin-top: 0;
  }

  .auth-admin-shell {
    padding: 10px;
  }

  .auth-admin-card__logo .brand-mark,
  .auth-admin-card__logo .brand-mark--image {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
  }

  .auth-admin-card__heading h3 {
    font-size: 1.5rem;
  }

  .hero-metric-stack {
    gap: 12px;
    margin: auto auto auto 0;
    padding-left: 0;
    justify-items: start;
    max-width: 100%;
  }

  .hero-copy-block {
    gap: 20px;
    padding: 12px 0 0;
  }

  .hero-metric-line {
    font-size: clamp(2.4rem, 10vw, 4.2rem);
    white-space: normal;
    text-align: left;
  }

  .hero-metric-value {
    font-size: clamp(2.1rem, 8vw, 2.9rem);
    white-space: normal;
    text-align: left;
  }

  .hero-custom-line {
    font-size: clamp(1.65rem, 6.5vw, 2.4rem);
    max-width: 100%;
    white-space: normal;
    padding-left: 0;
    text-wrap: pretty;
  }

  .record-footer {
    padding-top: 22px;
  }

  .topbar-actions .btn {
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .nebula-topbar {
    padding: 12px 14px;
  }

  .nebula-app-stage {
    padding: 12px;
  }

  .dashboard-shell {
    gap: 14px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
  }

  .section-head > div,
  .topbar-actions,
  .toolbar,
  .inline-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .section-head > div {
    flex-wrap: wrap;
  }

  .section-head .tiny-pill {
    margin-inline-start: auto;
  }

  .session-item,
  .notice-item,
  .backbone-monitor-item__head,
  .backbone-monitor-task-row {
    align-items: flex-start;
  }

  .backbone-monitor-item__head,
  .backbone-monitor-task-row {
    flex-direction: column;
  }

  .backbone-monitor-item__status,
  .backbone-monitor-item__meta-row,
  .backbone-monitor-task-row__right {
    width: 100%;
    justify-items: flex-end;
    justify-content: flex-end;
  }

  .backbone-monitor-item__meta-row,
  .backbone-monitor-item__range {
    flex-direction: column;
  }

  .backbone-monitor-item__range-label {
    white-space: normal;
  }

  .backbone-monitor-item__direction {
    text-align: right;
  }

  .backbone-monitor-task-row__copy {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .backbone-monitor-task-row__right .status-chip,
  .backbone-monitor-item__status .status-chip {
    width: fit-content;
  }
}

.nebula-shell {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.nebula-glow,
.nebula-ring {
  position: absolute;
  pointer-events: none;
}

.nebula-glow {
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.36;
}

.nebula-glow-a {
  top: -10vw;
  right: -8vw;
  width: 42vw;
  height: 42vw;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.38), transparent 62%);
}

.nebula-glow-b {
  left: -12vw;
  bottom: -16vw;
  width: 38vw;
  height: 38vw;
  background: radial-gradient(circle, rgba(255, 208, 122, 0.26), transparent 58%);
}

.nebula-ring {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  transform: rotate(-18deg);
  opacity: 0.32;
}

.nebula-ring-a {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -120px;
}

.nebula-ring-b {
  width: 420px;
  height: 420px;
  left: -140px;
  bottom: -160px;
}

.nebula-loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, rgba(4, 10, 18, 0.84), rgba(4, 10, 18, 0.92));
  z-index: 20;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.nebula-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.n-layout,
.n-layout-content,
.n-drawer-container,
.n-modal-container,
.n-drawer,
.n-menu,
.n-layout-scroll-container {
  background: transparent !important;
}

.n-layout-sider,
.n-card,
.n-modal .n-card,
.n-data-table,
.n-tabs-nav,
.n-dropdown-menu,
.n-popover,
.n-drawer .n-drawer-content,
.n-base-selection,
.n-input {
  background: linear-gradient(180deg, rgba(11, 24, 41, 0.9), rgba(9, 18, 31, 0.82)) !important;
  border: 1px solid rgba(152, 192, 255, 0.14) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: blur(18px);
}

.n-card,
.n-modal .n-card,
.n-layout-sider,
.n-base-selection,
.n-input {
  border-radius: var(--radius-lg) !important;
}

.n-button {
  border-radius: 999px !important;
}

.n-button--primary-type,
.n-button--info-type,
.n-button--success-type {
  color: #06111b !important;
  border: none !important;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong)) !important;
}

.n-menu-item-content--selected,
.n-tabs-tab--active,
.n-tag--info-type {
  background: rgba(var(--accent-rgb), 0.12) !important;
  color: var(--accent) !important;
}

.nebula-monitor {
  position: sticky;
  top: 20px;
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  background: linear-gradient(180deg, rgba(11, 24, 41, 0.96), rgba(8, 18, 31, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

:root[data-nebula-route="nodes"] .nebula-monitor,
:root[data-nebula-route="ipv6-nodes"] .nebula-monitor {
  position: relative;
  top: 0;
  backdrop-filter: none;
}

.nebula-monitor__head,
.nebula-monitor__section {
  padding: 16px 18px;
}

.nebula-monitor__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nebula-monitor__body {
  display: grid;
}

.nebula-monitor__title {
  margin: 0;
  font-size: 1rem;
}

.nebula-monitor__copy {
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.5;
}

.nebula-monitor__actions {
  display: flex;
  gap: 8px;
}

.nebula-monitor__actions button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nebula-monitor.is-collapsed .nebula-monitor__body {
  display: none;
}

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

.nebula-monitor__metric {
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nebula-monitor__metric strong {
  display: block;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.nebula-monitor__metric span,
.nebula-monitor__meta,
.nebula-monitor__empty {
  color: var(--text-faint);
  font-size: 12px;
}

.nebula-monitor__chips,
.nebula-monitor__sessions {
  display: grid;
  gap: 10px;
}

.nebula-monitor__chip,
.nebula-monitor__session {
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nebula-monitor__chip code {
  font-family: var(--font-mono);
  color: var(--text);
}

.nebula-monitor__session strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.nebula-monitor__empty {
  padding: 4px 0;
}

@media (max-width: 860px) {
  .nebula-monitor {
    position: relative;
    top: 0;
  }

  .nebula-monitor__grid {
    grid-template-columns: 1fr;
  }
}

/* Modal Overlay & Dialogs */
.nebula-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(4, 9, 17, 0.6);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: nebula-fade-in 240ms ease-out forwards;
}

.nebula-modal {
  width: min(440px, 100%);
  max-height: min(78vh, 820px);
  border-radius: 18px;
  padding: 34px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
  transform-origin: center;
  animation: nebula-pop-in 340ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  display: flex;
  flex-direction: column;
}

.nebula-modal-title {
  margin: 0 0 14px;
  font-size: 1.7rem;
  font-weight: 760;
  letter-spacing: -0.04em;
  color: var(--text);
}

.nebula-modal-body {
  margin-bottom: 32px;
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 14px;
  padding-inline: 2px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.45) transparent;
}

.nebula-modal-body--scroll {
  max-height: min(58vh, 620px);
}

.nebula-modal-body::-webkit-scrollbar {
  width: 6px;
}

.nebula-modal-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.45);
}

.nebula-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.access-log-modal {
  gap: 18px;
}

.access-log-range-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.access-log-modal .field label {
  display: block;
  margin-bottom: 8px;
}

.access-log-modal .field input {
  width: 100%;
}

.nebula-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.backbone-monitor-modal {
  gap: 16px;
}

.backbone-monitor-summary {
  display: grid;
  gap: 6px;
  padding: 2px 2px 4px;
}

.backbone-monitor-summary strong {
  color: var(--text);
  font-size: 1rem;
}

.backbone-monitor-summary span {
  color: var(--text-dim);
}

:root[data-nebula-route="nodes"] .section-card--nodes,
:root[data-nebula-route="ipv6-nodes"] .section-card--nodes {
  contain: layout paint;
}

:root[data-nebula-route="nodes"] .node-list,
:root[data-nebula-route="ipv6-nodes"] .node-list {
  contain: layout;
}

:root[data-nebula-route="nodes"] .node-item,
:root[data-nebula-route="ipv6-nodes"] .node-item {
  content-visibility: auto;
  contain: layout paint style;
  contain-intrinsic-size: 186px;
}

.backbone-monitor-overview {
  display: grid;
  gap: 16px;
}

.backbone-monitor-list {
  display: grid;
  gap: 16px;
}

.backbone-monitor-scroll {
  display: grid;
  gap: 12px;
  max-height: min(50vh, 520px);
  overflow-y: auto;
  padding-right: 8px;
}

.backbone-monitor-item {
  display: grid;
  gap: 0;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.024)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.12),
    inset 3px 0 0 rgba(var(--accent-rgb), 0.65);
}

.backbone-monitor-item--group {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.backbone-monitor-item--group:hover {
  border-color: rgba(var(--accent-rgb), 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.035);
}

.backbone-monitor-item--group.is-expanded {
  border-color: rgba(var(--accent-rgb), 0.26);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.16),
    inset 3px 0 0 rgba(var(--accent-rgb), 0.85);
}

.backbone-monitor-item + .backbone-monitor-item {
  margin-top: 2px;
}

.backbone-monitor-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.backbone-monitor-item__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.backbone-monitor-item__title strong {
  color: var(--text);
  word-break: break-word;
}

.backbone-monitor-item__body {
  display: grid;
  gap: 4px;
}

.backbone-monitor-item__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}

.backbone-monitor-item__range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  align-self: center;
}

.backbone-monitor-item__range-label {
  flex: 0 0 auto;
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.backbone-monitor-item__direction {
  display: inline-flex;
  align-items: center;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  word-break: break-word;
  text-align: right;
  min-width: 0;
}

.backbone-monitor-item__status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 0;
  align-self: center;
}

.backbone-monitor-item__status .status-chip {
  flex: 0 0 auto;
}

.backbone-monitor-item__status .status-chip,
.backbone-monitor-task-row__right .status-chip {
  min-height: 26px;
  padding: 0.28rem 0.6rem;
  white-space: nowrap;
  font-size: 0.78rem;
  line-height: 1;
  align-items: center;
}

.backbone-monitor-item__badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  min-height: 30px;
}

.backbone-monitor-item__badges .status-chip {
  min-height: 30px;
}

.backbone-monitor-item__title span,
.backbone-monitor-item__meta span {
  color: var(--text-dim);
  font-size: 13px;
}

.backbone-monitor-task-list {
  display: flex;
  flex-direction: column;
  margin-top: 2px;
}

.backbone-monitor-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.backbone-monitor-task-row:first-child {
  border-top: 0;
}

.backbone-monitor-task-row:hover {
  background: rgba(var(--accent-rgb), 0.06);
}

.backbone-monitor-task-row:last-child {
  padding-bottom: 4px;
}

.backbone-monitor-task-row__copy {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.backbone-monitor-task-row__copy strong {
  color: var(--text);
  font-size: 14px;
  word-break: break-word;
}

.backbone-monitor-task-row__copy span {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.backbone-monitor-task-row__right {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 auto;
}

.backbone-monitor-sparkline {
  width: 140px;
  height: 30px;
  border-radius: 999px;
  padding: 3px 5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.backbone-monitor-sparkline svg {
  width: 100%;
  height: 100%;
  display: block;
}

.backbone-monitor-sparkline__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.backbone-monitor-sparkline__area {
  fill: rgba(var(--accent-rgb), 0.12);
}

.backbone-monitor-sparkline--empty {
  background: rgba(255, 255, 255, 0.02);
}

.backbone-history-inline {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  justify-items: stretch;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.backbone-history-chart {
  width: 100%;
  max-width: none;
  display: block;
  height: auto;
  overflow: visible;
}

.backbone-monitor-item__expanded {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    max-height 280ms ease,
    opacity 220ms ease,
    transform 280ms ease;
  will-change: max-height, opacity, transform;
}

.backbone-monitor-item__expanded.is-open {
  max-height: 1120px;
  overflow-y: auto;
  opacity: 1;
  transform: translateY(0);
}

.backbone-history-chart__grid line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.backbone-history-chart__gridline {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.backbone-history-chart__tick {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
}

.backbone-history-chart__area {
  fill: rgba(var(--accent-rgb), 0.08);
}

.backbone-history-chart__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.backbone-history-chart circle {
  fill: var(--accent);
}

.backbone-history-chart__label {
  fill: var(--text-dim);
  font-size: 11px;
}

:root[data-theme-mode="light"] .backbone-history-chart__grid line {
  stroke: rgba(75, 104, 145, 0.18);
}

:root[data-theme-mode="light"] .backbone-history-chart__gridline {
  stroke: rgba(75, 104, 145, 0.12);
}

:root[data-theme-mode="light"] .backbone-history-chart__tick {
  stroke: rgba(75, 104, 145, 0.28);
}

.backbone-history-loading {
  padding: 24px 0;
  text-align: center;
  color: var(--text-dim);
}

.backbone-mtr-panel {
  display: grid;
  gap: 12px;
}

.backbone-mtr-toolbar,
.backbone-mtr-range-row,
.backbone-mtr-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.backbone-mtr-range-row label {
  display: grid;
  gap: 6px;
  color: var(--text-dim);
  font-size: 12px;
}

.backbone-mtr-range-row input {
  min-height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 10px;
}

.backbone-mtr-summary {
  color: var(--text-dim);
  font-size: 12px;
}

.backbone-mtr-summary span {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 9px;
}

.backbone-mtr-table-wrap {
  overflow-x: auto;
}

.backbone-mtr-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  font-size: 12px;
}

.backbone-mtr-table th,
.backbone-mtr-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  white-space: nowrap;
  text-align: right;
}

.backbone-mtr-table th:nth-child(2),
.backbone-mtr-table td:nth-child(2),
.backbone-mtr-table th:nth-child(4),
.backbone-mtr-table td:nth-child(4) {
  text-align: left;
  color: var(--text);
}

.backbone-mtr-table th:nth-child(2),
.backbone-mtr-table td:nth-child(2),
.backbone-mtr-table th:nth-child(4),
.backbone-mtr-table td:nth-child(4) {
  white-space: normal;
  word-break: break-word;
}

.backbone-mtr-table th:nth-child(5),
.backbone-mtr-table td:nth-child(5),
.backbone-mtr-table th:nth-child(6),
.backbone-mtr-table td:nth-child(6),
.backbone-mtr-table th:nth-child(7),
.backbone-mtr-table td:nth-child(7) {
  min-width: 72px;
  white-space: nowrap;
}

.backbone-mtr-table th:nth-child(8),
.backbone-mtr-table td:nth-child(8) {
  min-width: 190px;
  white-space: nowrap;
}

.backbone-mtr-hop-host,
.backbone-mtr-route-meta,
.backbone-mtr-rtts {
  display: grid;
  gap: 3px;
}

.backbone-mtr-hop-host strong {
  color: var(--text);
  font-weight: 700;
}

.backbone-mtr-hop-host span,
.backbone-mtr-route-meta {
  color: var(--text-dim);
}

.backbone-mtr-rtts {
  color: var(--text);
  font-family: var(--font-mono);
}

:root[data-theme-mode="light"] .backbone-mtr-range-row input,
:root[data-theme-mode="light"] .backbone-mtr-summary span,
:root[data-theme-mode="light"] .backbone-mtr-table th,
:root[data-theme-mode="light"] .backbone-mtr-table td {
  border-color: rgba(75, 104, 145, 0.16);
}

@keyframes nebula-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes nebula-pop-in {
  from { transform: scale(0.92) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

:root[data-theme-mode="light"] .nebula-modal-overlay {
  background: rgba(238, 244, 251, 0.45);
}

:root[data-theme-mode="light"] .message-banner {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(20, 34, 53, 0.12);
  box-shadow: 0 16px 48px rgba(39, 61, 92, 0.12);
  backdrop-filter: blur(16px);
  color: var(--text);
}

:root[data-theme-mode="light"] .message-banner.success {
  background: #f0fff4;
  border-color: #65f0b7;
  color: #0b7a4b;
}

:root[data-theme-mode="light"] .message-banner.error {
  background: #fff5f7;
  border-color: #ff8db5;
  color: #a31d44;
}

/* Toast Notifications */
.nebula-toast-container {
  position: fixed;
  top: 32px;
  right: 32px;
  z-index: 11000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.message-banner {
  pointer-events: auto;
  border-radius: var(--radius-md);
  padding: 16px 24px;
  background: rgba(14, 25, 41, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
  min-width: 280px;
  max-width: 420px;
  animation: nebula-toast-slide-in 400ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
  display: flex;
  align-items: center;
  gap: 12px;
}

@keyframes nebula-toast-slide-in {
  from { transform: translateX(60px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 1024px) {
  .app-shell--landing .landing-nav {
    padding: 1.25rem 5%;
  }

  .app-shell--landing .landing-nav .logo {
    font-size: 1.2rem;
  }

  .app-shell--landing .landing-nav .logo .brand-mark {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  .app-shell--landing .landing-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 5% 20px;
    min-height: auto;
  }

  .app-shell--landing .landing-hero__copy {
    max-width: 100%;
    text-align: center;
  }

  .app-shell--landing .landing-hero__panel {
    margin-left: 0;
    width: 100%;
    min-height: auto;
    max-width: 100%;
  }

  .app-shell--landing #network-map {
    min-height: 540px;
    height: 540px;
  }

  .app-shell--landing .landing-map-card__head {
    flex-direction: column;
  }

  .app-shell--landing .landing-footer .copyright {
    text-align: left;
  }

  .app-shell--landing .landing-footer {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 0 5% 14px;
  }
}

@media (max-width: 640px) {
  .app-shell--landing .landing-nav .nav-links {
    gap: 12px;
  }

  .app-shell--landing .landing-nav .nav-links .btn {
    font-size: 0.9rem;
  }

  .app-shell--landing .landing-hero {
    padding-top: 22px;
  }

  .app-shell--landing .landing-hero__copy h1 {
    font-size: clamp(2.2rem, 12vw, 3rem);
  }

  .app-shell--landing .landing-hero__copy p {
    font-size: 1rem;
  }

  .app-shell--landing #network-map {
    min-height: 460px;
    height: 460px;
  }

  .app-shell--landing .landing-map-card {
    padding: 1rem;
  }

  .app-shell--landing .landing-map-card__head h3 {
    font-size: 1.2rem;
  }

  .app-shell--landing .landing-map-node {
    min-width: 58px;
    padding: 0.28rem 0.5rem;
    font-size: 0.65rem;
  }
}
