@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
  --bg: #0a0f16;
  --panel: #111827;
  --panel-2: #0f172a;
  --panel-3: #182132;
  --line: rgba(148, 163, 184, 0.16);
  --text: #e5eefb;
  --muted: #93a4bd;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --blue: #4ea8ff;
  --cyan: #32d4c8;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}



* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(78, 168, 255, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(50, 212, 200, 0.14), transparent 28%),
    linear-gradient(180deg, #071019 0%, var(--bg) 18%, var(--bg) 100%);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(7, 16, 25, 0.72);
  border-bottom: 1px solid var(--line);
}



.topbar-wrap,
.wrap {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.brand-as {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-name {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link,
.view-link,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-warning {
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: 160ms ease;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.nav-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Nav dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
}

.dd-arrow {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: transform 200ms ease;
}

.nav-dropdown-btn[aria-expanded="true"] .dd-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  min-width: 280px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}

.nav-dropdown.is-open .nav-dropdown-menu {
  display: grid;
  gap: 4px;
}

.dd-item {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: background 140ms ease;
}

.dd-item:hover {
  background: rgba(78, 168, 255, 0.08);
}

.dd-item strong {
  font-size: 0.92rem;
}

.dd-item span {
  font-size: 0.76rem;
  color: var(--muted);
}

.nav-link:hover,
.view-link:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover,
.btn-warning:hover {
  transform: translateY(-1px);
  border-color: rgba(78, 168, 255, 0.4);
}

.discord {
  color: #b7c9ff;
}

.wrap {
  padding: 28px 0 40px;
}

.hero,
.panel,
.summary-card {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}



.hero {
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}

.hero-text {}

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

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--cyan);
}

.hero h1,
.panel h2,
.announcement-card h3 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.98;
}

.hero-copy,
.panel-head p,
.empty-state,
.node-mini-stats,
.nc-type,
.announcement-head span,
.summary-label {
  color: var(--muted);
}

.hero-copy {
  margin: 12px 0 0;
  max-width: 760px;
  line-height: 1.55;
}

.hero-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--panel-3);
  border: 1px solid var(--line);
}

.hero-label,
.nc-type,
.summary-label,
.filters-form label span,
.form-grid label span {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.15rem;
}

.status-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  border: 1px solid transparent;
}

.ob-up {
  color: #aff5c2;
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.25);
}

.ob-degraded {
  color: #ffd491;
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.25);
}

.ob-down {
  color: #ffb1b1;
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.25);
}

.ob-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.ob-dot.animate {
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 1.8s infinite;
}

.nc-head,
.panel-head,
.announcement-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.status-chip,
.admin-badge,
.pin-tag,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-chip,
.admin-badge,
.pin-tag {
  padding: 8px 10px;
}

.sc-up {
  color: #aff5c2;
  background: rgba(34, 197, 94, 0.12);
}

.sc-degraded,
.sc-stale {
  color: #ffd491;
  background: rgba(245, 158, 11, 0.13);
}

.sc-down,
.sc-unknown {
  color: #ffb1b1;
  background: rgba(239, 68, 68, 0.13);
}

.fleet-panel {
  margin-bottom: 24px;
}

.fleet-head {
  align-items: center;
}

.fleet-filters {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(130px, 180px)) auto;
  gap: 12px;
  margin-bottom: 16px;
  align-items: end;
}

.fleet-filter-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.reset-link {
  padding: 11px 14px;
}

/* Fleet card grid */
.fleet-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.fc-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  text-decoration: none;
  color: var(--text);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.fc-card:hover {
  border-color: rgba(78, 168, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.fc-card.fc-critical {
  border-left: 3px solid var(--red);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), var(--panel-2) 60%);
}

.fc-card.fc-degraded,
.fc-card.fc-maintenance {
  border-left: 3px solid var(--yellow);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), var(--panel-2) 60%);
}

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

.fc-identity {
  min-width: 0;
  flex: 1;
}

.fc-name {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-host {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-loc-tag {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.2);
  vertical-align: middle;
}

.fc-status-area {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

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

.fc-stat {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--panel-3);
  border: 1px solid var(--line);
}

.fc-stat-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 2px;
}

.fc-stat-value {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-uptime {
  color: var(--green);
}

.fc-resources {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fc-bar-row {
  display: grid;
  grid-template-columns: 38px 1fr 36px;
  align-items: center;
  gap: 8px;
}

.fc-bar-name {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.fc-bar-track {
  height: 6px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
}

.fc-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}

.fc-bar-fill.usage-ok { background: #22c55e; }
.fc-bar-fill.usage-warn { background: #f59e0b; }
.fc-bar-fill.usage-critical { background: #ef4444; }
.fc-bar-fill.usage-na { background: rgba(148, 163, 184, 0.2); }

.fc-bar-val {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
  color: var(--text);
}

.fc-history {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.fc-hist-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.fc-card .fleet-strip {
  flex: 1;
  min-width: 0;
}

.uptime-strip {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 4px;
  margin: 16px 0;
}

.fleet-strip {
  margin: 0;
  grid-template-columns: repeat(7, 1fr);
}

.fine-strip {
  gap: 3px;
}

.fine-strip .uptime-block {
  height: 22px;
  border-radius: 4px;
  min-width: 0;
}

.uptime-block {
  display: block;
  height: 14px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.2);
}

.ub-up {
  background: #22c55e;
}

.ub-degraded {
  background: #f59e0b;
}

.ub-down {
  background: #ef4444;
}

.ub-unknown {
  background: #475569;
}

.view-link,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
}

.view-link {
  width: 100%;
  color: var(--text);
  background: rgba(78, 168, 255, 0.08);
}

.view-link.active {
  background: rgba(34, 197, 94, 0.12);
  color: #aff5c2;
}

.panel {
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 24px;
}

.detail-hero {
  grid-template-columns: 1.4fr auto;
}

/* === Node detail page === */
.nd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.nd-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nd-title-row h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.nd-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.nd-sep {
  opacity: 0.4;
}

.nd-date-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nd-date-picker input[type="date"] {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}

.nd-uptime-panel {
  padding: 20px 24px;
}

.nd-uptime-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.nd-uptime-head h2 {
  margin: 0;
}

.nd-uptime-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.nd-uptime-stats {
  display: flex;
  gap: 12px;
}

.nd-uptime-badge {
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  text-align: center;
  min-width: 90px;
}

.nd-uptime-badge strong {
  display: block;
  margin-top: 4px;
  font-size: 1.1rem;
}

.nd-uptime-strip {
  grid-template-columns: repeat(30, 1fr);
  gap: 4px;
  margin: 0;
}

.nd-uptime-strip .uptime-block {
  height: 36px;
  border-radius: 6px;
  cursor: default;
  transition: transform 0.15s;
}

.nd-uptime-strip .uptime-block:hover {
  transform: scaleY(1.15);
}

.nd-uptime-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.nd-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nd-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.nd-legend-dates {
  margin-left: auto;
  font-style: italic;
}

/* Node detail cards grid */
.nd-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.nd-card {
  padding: 20px;
}

.nd-card h3 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.nd-kv-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nd-kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.nd-kv:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.nd-kv span {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.nd-kv strong {
  font-size: 0.88rem;
  text-align: right;
  word-break: break-all;
}

/* Resource progress bars */
.nd-resource-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nd-bar-group {}

.nd-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.nd-bar-label span:first-child {
  color: var(--muted);
}

.nd-bar-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
}

.nd-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}

.nd-bar-fill.usage-ok { background: #22c55e; }
.nd-bar-fill.usage-warn { background: #f59e0b; }
.nd-bar-fill.usage-critical { background: #ef4444; }
.nd-bar-fill.usage-na { background: rgba(148, 163, 184, 0.3); }

/* Chart panel */
.nd-chart-panel {
  padding: 20px 24px;
}

.nd-chart-legend {
  display: flex;
  gap: 16px;
}

.nd-cl-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.nd-cl-dot {
  display: inline-block;
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

/* Days panel */
.nd-days-panel {
  padding: 16px 24px;
}

.nd-days-panel .days-list {
  margin-top: 12px;
}

.day-active {
  background: var(--cyan) !important;
  color: #0e1520 !important;
  border-color: var(--cyan) !important;
  font-weight: 700;
}

/* Samples table */
.nd-table-panel {
  padding: 16px 24px;
}

.nd-pagination-controls {
  flex-shrink: 0;
}

.nd-per-page-form select {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.nd-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.nd-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: 160ms ease;
}

.nd-page-link:hover {
  border-color: rgba(78, 168, 255, 0.4);
  background: rgba(78, 168, 255, 0.08);
}

.nd-page-active {
  background: rgba(78, 168, 255, 0.15);
  border-color: rgba(78, 168, 255, 0.4);
  color: var(--blue);
}

.nd-samples-table {
  font-size: 0.82rem;
}

.nd-samples-table th {
  font-size: 0.75rem;
}

.panel-head {
  margin-bottom: 18px;
}

.panel-head p {
  margin: 6px 0 0;
}

.compact-head {
  margin-bottom: 0;
}

.filters-form,
.form-grid {
  display: grid;
  gap: 12px;
}

.filters-form {
  grid-template-columns: repeat(3, auto);
  align-items: end;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  border-radius: 18px;
  padding: 16px;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.15rem;
}

.days-box {
  margin: 16px 0;
}

.days-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.days-list a {
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--panel-3);
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pill {
  padding: 6px 10px;
}

.pill-up {
  color: #aff5c2;
  background: rgba(34, 197, 94, 0.12);
}

.pill-degraded {
  color: #ffd491;
  background: rgba(245, 158, 11, 0.14);
}

.pill-down {
  color: #ffb1b1;
  background: rgba(239, 68, 68, 0.14);
}

.pill-unknown,
.pill-stale {
  color: #c4d0df;
  background: rgba(148, 163, 184, 0.16);
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
}

.single-col {
  grid-template-columns: 1fr;
}

.maintenance-panel {
  margin-bottom: 24px;
}

.maintenance-timeline {
  display: grid;
  gap: 10px;
}

.mt-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--panel-2);
}

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

.mt-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.mt-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mt-active {
  color: #ffd491;
  background: rgba(245, 158, 11, 0.16);
}

.mt-scheduled {
  color: #9ee9e3;
  background: rgba(50, 212, 200, 0.12);
}

.detail-placeholder {
  display: flex;
  align-items: center;
  min-height: 150px;
}

.placeholder-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(78, 168, 255, 0.1);
  border: 1px solid rgba(78, 168, 255, 0.2);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
}

.bordered-form {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.form-grid label {
  display: grid;
  gap: 6px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--panel-3);
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(78, 168, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(78, 168, 255, 0.1);
}

textarea {
  resize: vertical;
}

.btn-primary {
  cursor: pointer;
  background: linear-gradient(90deg, #4ea8ff, #32d4c8);
  border: 0;
  color: #071019;
  font-weight: 700;
}

.btn-secondary {
  cursor: pointer;
  background: transparent;
  color: var(--text);
}

.btn-secondary.is-active {
  background: rgba(78, 168, 255, 0.12);
  border-color: rgba(78, 168, 255, 0.35);
}

.btn-danger {
  cursor: pointer;
  background: rgba(239, 68, 68, 0.12);
  color: #ffb1b1;
  border-color: rgba(239, 68, 68, 0.2);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 16px;
  height: 16px;
}

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

.announcement-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.announcement-card.an-card-live {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.an-card-maintenance {
  border-left: 4px solid #f59e0b;
}

.an-card-degraded {
  border-left: 4px solid #f59e0b;
}

.an-card-critical {
  border-left: 4px solid #ef4444;
}

.an-card-resolved {
  border-left: 4px solid var(--green);
  opacity: 0.75;
}

.an-level.an-resolved {
  color: var(--green);
  background: rgba(34, 197, 94, 0.16);
}

.announcement-filter-group {
  display: inline-flex;
  gap: 8px;
}

.announcement-card p {
  margin: 14px 0 0;
  line-height: 1.55;
}

.announcement-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.an-level,
.an-target {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
}

.an-target {
  color: #c4d0df;
  background: rgba(148, 163, 184, 0.12);
}

.an-info {
  color: #9ee9e3;
  background: rgba(50, 212, 200, 0.12);
}

.an-maintenance {
  color: #ffd491;
  background: rgba(245, 158, 11, 0.13);
}

.an-degraded {
  color: #ffd491;
  background: rgba(245, 158, 11, 0.20);
}

.an-critical {
  color: #ffb1b1;
  background: rgba(239, 68, 68, 0.16);
}

.announcement-window {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ===== Announcement Updates Timeline ===== */
.ann-updates-timeline {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0;
}

.ann-update-entry {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}

.ann-update-entry:not(:last-child) {
  border-bottom: 1px dashed rgba(148, 163, 184, 0.10);
}

/* Left timeline line */
.ann-update-entry::before {
  content: '';
  position: absolute;
  left: 47px;
  top: 32px;
  bottom: -2px;
  width: 1px;
  background: var(--line);
}

.ann-update-entry:last-child::before {
  display: none;
}

.ann-update-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 95px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.ann-us-investigating {
  color: var(--red);
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.25);
}

.ann-us-identified {
  color: var(--yellow);
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.25);
}

.ann-us-monitoring {
  color: var(--blue);
  background: rgba(78, 168, 255, 0.10);
  border-color: rgba(78, 168, 255, 0.25);
}

.ann-us-update {
  color: var(--cyan);
  background: rgba(50, 212, 200, 0.10);
  border-color: rgba(50, 212, 200, 0.25);
}

.ann-us-resolved {
  color: var(--green);
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.25);
}

.ann-update-body {
  flex: 1;
  min-width: 0;
}

.ann-update-body p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.ann-update-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--muted);
}

/* Admin: inline update form */
.ann-actions-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ann-update-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.ann-update-form select {
  width: auto;
  min-width: 130px;
  padding: 7px 10px;
  font-size: 0.75rem;
}

.ann-update-form input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.pin-tag,
.admin-badge {
  color: #9ee9e3;
  background: rgba(50, 212, 200, 0.12);
}

.logout-form {
  margin-top: 16px;
}

.compact-table td:nth-child(3) {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-shell {
  display: grid;
  gap: 20px;
}

.admin-topbar-strip {
  display: grid;
  gap: 16px;
}

.admin-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid var(--line);
}

.admin-welcome-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.admin-welcome-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: 180ms ease;
}

.admin-tab svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.admin-tab:hover {
  color: var(--text);
  background: rgba(78, 168, 255, 0.04);
}

.admin-tab.is-active {
  background: rgba(78, 168, 255, 0.10);
  border-color: rgba(78, 168, 255, 0.25);
  color: var(--text);
}

.admin-panel-page {
  display: none;
}

.admin-panel-page.is-visible {
  display: block;
}

.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.admin-stack {
  display: grid;
  gap: 20px;
}

/* Node cards in admin */
.admin-node-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.admin-node-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  transition: border-color 180ms ease;
}

.admin-node-card:hover {
  border-color: rgba(78, 168, 255, 0.25);
}

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

.anc-identity {
  min-width: 0;
}

.anc-name {
  font-size: 0.88rem;
  display: block;
}

.anc-tags {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.anc-type-tag,
.anc-country-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
}

.anc-type-remote {
  color: var(--cyan);
  background: rgba(50, 212, 200, 0.08);
  border-color: rgba(50, 212, 200, 0.2);
}

.anc-type-local {
  color: var(--blue);
  background: rgba(78, 168, 255, 0.08);
  border-color: rgba(78, 168, 255, 0.2);
}

.anc-country-tag {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
}

.anc-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.anc-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.anc-detail span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.anc-detail strong {
  font-size: 0.82rem;
  font-weight: 600;
  word-break: break-all;
}

.anc-detail-wide {
  grid-column: 1 / -1;
}

.anc-endpoint {
  font-size: 0.78rem !important;
  color: var(--muted);
}

.btn-sm {
  padding: 7px 12px !important;
  font-size: 0.75rem;
}

/* Subscriber cards */
.admin-subscriber-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.admin-sub-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.asc-info {
  min-width: 0;
}

.asc-info strong {
  display: block;
  font-size: 0.88rem;
  word-break: break-all;
}

.asc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.asc-meta .status-chip {
  padding: 4px 8px;
  font-size: 0.65rem;
}

.asc-date {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Logout nav button */
.logout-nav-btn {
  cursor: pointer;
  background: rgba(239, 68, 68, 0.06);
  font-family: inherit;
}

.logout-nav-btn:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #ffb1b1 !important;
}

.admin-hero {
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: 20px;
  align-items: stretch;
}

.private-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  color: #ffb1b1;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.private-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.stack-card {
  display: grid;
  gap: 18px;
}

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

.field-grid .full {
  grid-column: 1 / -1;
}

.field-hint,
.panel-note,
.table-meta {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.login-shell {
  max-width: 420px;
  margin: 60px auto 0;
}

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.login-panel {
  padding: 36px 32px 28px;
}

.login-panel .panel-head {
  text-align: center;
  margin-bottom: 24px;
}

.login-panel .panel-head h2 {
  font-size: 1.35rem;
  margin-top: 12px;
}

.login-panel .panel-head p {
  margin-top: 8px;
  line-height: 1.5;
  font-size: 0.88rem;
}

.login-panel .form-grid {
  gap: 16px;
}

.login-panel .form-grid label span {
  font-size: 0.82rem;
  color: var(--muted);
}

.login-icon {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  fill: var(--cyan);
  opacity: 0.8;
}

.login-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 160ms ease;
}

.login-back-link:hover {
  color: var(--text);
}

.login-back-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.sub-page-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.sub-tab {
  flex: 1;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  border: none;
  transition: 160ms ease;
  font-family: inherit;
}

.sub-tab:hover {
  color: var(--text);
  background: rgba(78, 168, 255, 0.06);
}

.sub-tab.is-active {
  background: rgba(78, 168, 255, 0.12);
  color: var(--text);
}

.sub-panel-section {
  display: none;
}

.sub-panel-section.is-visible {
  display: block;
}

.sub-alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.sub-success {
  color: #aff5c2;
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.25);
}

.sub-error {
  color: #ffb1b1;
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.25);
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.masked-secret {
  font-family: monospace;
  letter-spacing: 0.15em;
}

.inventory-table td:nth-child(5) {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
}

.fc-card.row-focus {
  outline: 2px solid rgba(78, 168, 255, 0.65);
  outline-offset: -2px;
  animation: rowFlash 1.8s ease;
}

.incident-strip-panel {
  margin-bottom: 18px;
  padding: 14px 18px;
}

.incident-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.incident-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.incident-live {
  color: #ffb1b1;
  background: rgba(239, 68, 68, 0.15);
}

.incident-plan {
  color: #ffd491;
  background: rgba(245, 158, 11, 0.15);
}

.incident-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.asn-panel {
  margin-bottom: 24px;
}

.prefix-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.prefix-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(78, 168, 255, 0.2);
  background: linear-gradient(145deg, #081326, #0a1a31);
}

.prefix-card h3 {
  margin: 0;
  font-size: 1.9rem;
  letter-spacing: 0.02em;
}

.prefix-card p {
  margin: 8px 0 0;
  color: #7e96b6;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.prefix-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(50, 212, 200, 0.26);
  color: #7be8dd;
  background: rgba(50, 212, 200, 0.08);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.asn-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.asn-stat-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--panel-2);
}

.asn-stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.3rem;
}

.asn-stat-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.country-chips {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.country-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.an-target.an-node-link {
  text-decoration: none;
}

.an-target.an-node-link:hover {
  border-color: rgba(78, 168, 255, 0.45);
  color: #9fd0ff;
}

/* IPv4/IPv6 prefix toggle */
.prefix-toggle-group {
  display: inline-flex;
  gap: 6px;
}

.prefix-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: 160ms ease;
  font-family: inherit;
}

.prefix-toggle small {
  opacity: 0.7;
}

.prefix-toggle.is-active {
  background: rgba(78, 168, 255, 0.12);
  border-color: rgba(78, 168, 255, 0.35);
  color: var(--text);
}

.prefix-toggle:hover {
  border-color: rgba(78, 168, 255, 0.4);
  transform: translateY(-1px);
}

.prefix-grid[hidden] {
  display: none;
}

.prefix-type-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
  margin-bottom: 4px;
}

.prefix-card-v6 {
  border-color: rgba(50, 212, 200, 0.25);
}

.prefix-card-v6 h3 {
  font-size: 1.35rem;
  word-break: break-all;
}

/* Node incident/maintenance badges in fleet table */
.node-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  vertical-align: middle;
  animation: badgePulse 2.4s ease infinite;
}

.nb-critical {
  color: #ffb1b1;
  background: rgba(239, 68, 68, 0.18);
}

.nb-degraded {
  color: #ffd491;
  background: rgba(245, 158, 11, 0.18);
}

.nb-maintenance {
  color: #9ee9e3;
  background: rgba(50, 212, 200, 0.14);
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Fleet aggregate power panel */
.fleet-power-panel {
  margin-bottom: 24px;
}

.fleet-power-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.fp-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: var(--panel-2);
}

.fp-card .summary-label {
  margin-bottom: 4px;
}

.fp-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
}

.fp-ok {
  color: #aff5c2;
}

.fp-warn {
  color: #ffd491;
}

.fp-critical {
  color: #ffb1b1;
}

.fleet-locations {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.location-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  font-size: 0.82rem;
  font-weight: 500;
}

.loc-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(78, 168, 255, 0.08);
  border: 1px solid rgba(78, 168, 255, 0.18);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.06em;
}

/* ===== NOC Map ===== */
.noc-map-panel {
  overflow: hidden;
}

.noc-map-wrap {
  position: relative;
  overflow: visible;
}

.noc-map-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(78, 168, 255, 0.03), transparent),
    var(--panel-2);
  padding: 16px 8px;
}

.noc-map-grid line {
  shape-rendering: crispEdges;
}

.noc-map-land path {
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: fill 200ms ease, stroke 200ms ease;
}
.noc-map-land path.noc-country-active {
  fill: rgba(78, 168, 255, 0.18);
  stroke: rgba(78, 168, 255, 0.55);
  stroke-width: 1.2;
}

/* Map tooltip */
.noc-map-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text);
  backdrop-filter: blur(6px);
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transform: translate(-50%, -100%);
  margin-top: -12px;
  transition: opacity 150ms ease;
}
.noc-map-tooltip[hidden] {
  display: none;
}
.noc-map-tooltip-cc {
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.04em;
}
.noc-map-tooltip-label {
  color: var(--muted);
}

/* Pulse animation */
.noc-pulse-ring {
  animation: nocPulse 2.5s ease-out infinite;
  transform-origin: center;
}

@keyframes nocPulse {
  0% {
    opacity: 0.6;
    r: 12;
  }
  70% {
    opacity: 0;
    r: 28;
  }
  100% {
    opacity: 0;
    r: 28;
  }
}

.noc-map-point {
  cursor: pointer;
}

.noc-map-point:hover circle:nth-child(3) {
  r: 6;
  transition: r 180ms ease;
}

/* Legend cards below map */
.noc-map-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.noc-map-loc-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.noc-map-loc-card:hover {
  border-color: rgba(78, 168, 255, 0.25);
  background: var(--panel-3);
}
.noc-map-loc-card.noc-loc-active {
  border-color: rgba(78, 168, 255, 0.45);
  background: var(--panel-3);
  box-shadow: 0 0 8px rgba(78, 168, 255, 0.15);
}

.noc-loc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.noc-loc-up {
  background: var(--green);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.noc-loc-degraded {
  background: var(--yellow);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.noc-loc-down {
  background: var(--red);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.noc-loc-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.noc-loc-info strong {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.noc-loc-info span {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.noc-loc-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.noc-loc-count small {
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--muted);
  margin-left: 2px;
}

canvas {
  width: 100%;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--line);
  margin-bottom: 18px;
}

/* Site footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  margin-top: 12px;
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand {
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}

.footer-org {
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-sep {
  opacity: 0.4;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@keyframes rowFlash {
  0% {
    box-shadow: inset 0 0 0 0 rgba(78, 168, 255, 0.0);
  }
  40% {
    box-shadow: inset 0 0 0 9999px rgba(78, 168, 255, 0.10);
  }
  100% {
    box-shadow: inset 0 0 0 0 rgba(78, 168, 255, 0.0);
  }
}

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

  .hero-cards {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .admin-hero,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-two-col {
    grid-template-columns: 1fr;
  }

  .prefix-grid,
  .asn-stats-grid,
  .fleet-power-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nd-cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .prefix-toggle-group {
    margin-top: 8px;
  }

  .fleet-filters {
    grid-template-columns: 1fr 1fr;
  }

  .fleet-cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .topbar-wrap {
    align-items: flex-start;
    padding: 14px 0;
    flex-direction: column;
  }

  .topbar-nav {
    width: 100%;
  }

  .nav-link {
    flex: 1 1 calc(50% - 10px);
    justify-content: center;
  }

  .admin-tabs {
    flex-wrap: wrap;
  }

  .admin-tab {
    flex: 1 1 calc(50% - 6px);
  }

  .admin-welcome {
    flex-direction: column;
    text-align: center;
  }

  .fleet-filters {
    grid-template-columns: 1fr 1fr;
  }

  .filters-form {
    grid-template-columns: 1fr;
    width: 100%;
  }

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

@media (max-width: 640px) {
  .topbar-wrap,
  .wrap {
    width: min(1380px, calc(100% - 20px));
  }

  .hero,
  .panel {
    border-radius: 18px;
  }

  .hero {
    padding: 20px;
  }

  .fleet-filters {
    grid-template-columns: 1fr;
  }

  .fleet-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .prefix-grid,
  .asn-stats-grid,
  .fleet-power-grid {
    grid-template-columns: 1fr;
  }

  .nd-cards-grid {
    grid-template-columns: 1fr;
  }

  .nd-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nd-uptime-head {
    flex-direction: column;
  }

  .nd-uptime-stats {
    width: 100%;
  }

  .nd-uptime-badge {
    flex: 1;
  }

  .hero-cards {
    grid-template-columns: 1fr;
  }

  .node-mini-stats,
  .announcement-head,
  .panel-head,
  .nc-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-subscriber-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-tab {
    flex: 1 1 100%;
  }

  .anc-head {
    flex-direction: column;
  }

  .noc-map-legend {
    grid-template-columns: 1fr;
  }

  .ann-actions-row {
    flex-direction: column;
  }

  .ann-update-form {
    flex-wrap: wrap;
  }

  .ann-update-form select {
    width: 100%;
  }

  .ann-update-form input[type="text"] {
    width: 100%;
  }

  .ann-update-entry {
    flex-direction: column;
    gap: 6px;
  }

  .ann-update-entry::before {
    display: none;
  }

  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .fc-stats-row {
    flex-direction: column;
  }
}

/* Admin node card actions row */
.anc-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #ffcb6b;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  border-color: rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
}

/* Node edit form (collapsible) */
.anc-edit-form {
  display: none;
  margin-top: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
}
.anc-edit-form.is-visible {
  display: block;
}
.anc-edit-form .field-grid {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 600px) {
  .anc-edit-form .field-grid {
    grid-template-columns: 1fr;
  }
}

/* Node test result */
.anc-test-result {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.anc-test-ok {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.06);
}

.anc-test-fail {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
}

.anc-test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.anc-test-header strong {
  font-size: 0.88rem;
}

.anc-test-header span {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: monospace;
}

.anc-test-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.78rem;
  color: var(--muted);
}

.anc-test-details b {
  color: var(--text);
  font-weight: 600;
}

.anc-test-error {
  width: 100%;
  color: #ffb1b1;
  word-break: break-all;
}
