@font-face {
  font-family: Montserrat;
  src: url("/fonts/Montserrat.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Fira Mono";
  src: url("/fonts/FiraMono.ttf") format("truetype");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0b0e11;
  --surface: #13171b;
  --border: #282e33;
  --text: #edf1f3;
  --muted: #98a4ad;
  --green: #43d18d;
  --yellow: #efc66d;
  --red: #ff6681;
  --blue: #70b8ef;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px Montserrat,
    system-ui,
    sans-serif;
}
button,
input {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
}
button {
  cursor: pointer;
}
button:hover {
  border-color: var(--blue);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
h1,
h2 {
  font-size: 19px;
  font-weight: 600;
}
h2 {
  margin-top: 24px;
}
p {
  color: var(--muted);
}
header {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
header h1,
header h2 {
  flex: 1;
}
#panel {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  height: 100dvh;
}
#panel[hidden] {
  display: none;
}
aside {
  border-right: 1px solid var(--border);
  overflow: auto;
  padding: 16px;
}
main {
  overflow: auto;
  padding: 20px;
}
#filter {
  width: 100%;
  margin-bottom: 12px;
}
.node,
.infra {
  border-bottom: 1px solid var(--border);
  padding: 5px 0;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.node .name {
  flex: 1;
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  border: 0;
  padding: 0;
}
.number {
  font:
    14px "Fira Mono",
    monospace;
  font-variant-numeric: tabular-nums;
  min-width: 40px;
  text-align: right;
}
.status {
  font-size: 12px;
  color: var(--muted);
}
.healthy {
  color: var(--green);
}
.warning {
  color: var(--yellow);
}
.blocked,
.offline {
  color: var(--red);
}
.badge {
  color: var(--blue);
}
.full .node {
  padding: 12px 0;
  flex-wrap: wrap;
}
.full .node .extra {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
}
.history {
  display: flex;
  gap: 2px;
}
.segment {
  height: 12px;
  flex: 1;
  background: var(--border);
}
.segment.good {
  background: var(--green);
}
.segment.bad {
  background: var(--red);
}
.event {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: transform 0.15s;
}
.event:hover {
  transform: scale(1.008);
  background: var(--surface);
}
dialog {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: min(720px, 95vw);
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #0009;
}
#login {
  max-width: 360px;
  margin: 12vh auto;
  padding: 20px;
}
#login label {
  display: block;
  margin: 14px 0;
}
#login input:not([type="checkbox"]) {
  width: 100%;
  margin-top: 6px;
}
#map {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
#map button {
  min-width: 90px;
}
progress {
  height: 5px;
  width: 70px;
  accent-color: var(--green);
}
.highlight {
  background: #70b8ef15;
}
.pulse {
  animation: pulse 2s;
}
@keyframes pulse {
  from {
    background: #70b8ef35;
  }
  to {
    background: transparent;
  }
}
@media (max-width: 760px) {
  #panel {
    display: block;
    height: auto;
  }
  aside,
  main {
    overflow: visible;
  }
  aside {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  header {
    gap: 6px;
  }
  .node {
    gap: 5px;
  }
  .status {
    max-width: 110px;
  }
  main {
    padding: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
#map {
  display: block;
  padding: 12px;
}
#map svg {
  width: 100%;
  height: auto;
  max-height: 550px;
}
.map-grid path {
  stroke: #282e33;
  stroke-width: 0.5;
}
.route {
  fill: none;
  stroke: #70b8ef55;
  stroke-width: 1;
  stroke-dasharray: 4 9;
}
.location-dot {
  fill: var(--blue);
}
.map-label {
  fill: #13171b;
  stroke: #282e33;
}
#map text {
  fill: var(--text);
  font-size: 11px;
}
.route.highlight {
  stroke: var(--blue);
  stroke-width: 2;
}
#map g.highlight .map-label {
  stroke: var(--blue);
}
.map-animate .route {
  animation: route-flow 6s linear infinite;
}
@keyframes route-flow {
  to {
    stroke-dashoffset: -52;
  }
}
.map-legend {
  font-size: 12px;
}
#map[hidden] {
  display: none;
}
.resource-high {
  accent-color: var(--yellow);
}
dialog label {
  display: block;
  margin: 10px 0;
}
dialog label input {
  display: block;
  width: 100%;
  margin-top: 4px;
}
.infra {
  flex-wrap: wrap;
}
.country-labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.country-labels button {
  text-align: left;
  white-space: normal;
  font-size: 12px;
}
.country-labels button.highlight {
  border-color: var(--blue);
}
.event-day {
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0 8px;
}
.number {
  display: inline-block;
  width: 7ch;
  flex-shrink: 0;
}
#online {
  display: inline-block;
  min-width: 7ch;
  font-family: "Fira Mono", monospace;
  font-variant-numeric: tabular-nums;
}
