:root {
  color-scheme: dark;
  --bg: #060914;
  --bg-2: #0b1020;
  --panel: #0f172a;
  --panel-2: #111c31;
  --panel-3: #17223a;
  --ink: #f8fafc;
  --muted: #a8b3c7;
  --faint: #738097;
  --line: #273449;
  --line-strong: #3b4a63;
  --blue: #60a5fa;
  --blue-deep: #93c5fd;
  --green: #34d399;
  --teal: #2dd4bf;
  --purple: #c084fc;
  --amber: #fbbf24;
  --red: #fb7185;
  --gray: #778195;
  --inactive: #8b93a3;
  --dark-blue: rgba(96, 165, 250, 0.12);
  --dark-green: rgba(52, 211, 153, 0.12);
  --dark-purple: rgba(192, 132, 252, 0.12);
  --dark-teal: rgba(45, 212, 191, 0.12);
  --dark-amber: rgba(251, 191, 36, 0.12);
  --dark-red: rgba(251, 113, 133, 0.12);
  --city-road: rgba(148, 163, 184, 0.08);
  --glow-green: 0 0 0 1px rgba(52, 211, 153, 0.36), 0 0 30px rgba(52, 211, 153, 0.28), 0 16px 34px rgba(0, 0, 0, 0.34);
  --glow-teal: 0 0 0 1px rgba(45, 212, 191, 0.36), 0 0 30px rgba(45, 212, 191, 0.24), 0 16px 34px rgba(0, 0, 0, 0.34);
  --glow-blue: 0 0 0 1px rgba(96, 165, 250, 0.28), 0 0 26px rgba(96, 165, 250, 0.18), 0 16px 34px rgba(0, 0, 0, 0.34);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 10%, rgba(96, 165, 250, 0.1), transparent 34%),
    radial-gradient(circle at 82% 8%, rgba(45, 212, 191, 0.08), transparent 32%),
    linear-gradient(180deg, #070b16 0%, var(--bg) 48%, #050711 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button {
  font: inherit;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1740px;
  margin: 0 auto 14px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.05;
}

h2 {
  margin-bottom: 10px;
  font-size: 16px;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.timestamp {
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: #e2e8f0;
  font-weight: 800;
}

.layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 16px;
  max-width: 1740px;
  margin: 0 auto;
}

.sidebar,
.map-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(9, 14, 27, 0.98));
  box-shadow: var(--shadow);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

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

.score-item {
  min-height: 76px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 34, 58, 0.98), rgba(12, 18, 32, 0.98));
}

.source-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 34, 58, 0.95), rgba(12, 18, 32, 0.95));
  color: var(--muted);
  line-height: 1.35;
}

.source-card strong {
  display: block;
  margin-bottom: 5px;
  color: #f8fafc;
  font-size: 14px;
}

.source-card p {
  margin-bottom: 0;
  font-size: 12px;
}

.score-value {
  display: block;
  margin-bottom: 4px;
  font-size: 27px;
  font-weight: 950;
  line-height: 1;
}

.score-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button,
.tool-button,
.icon-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  color: #e5edf9;
  cursor: pointer;
}

.filter-button {
  padding: 7px 10px;
}

.tool-button {
  padding: 7px 11px;
  font-weight: 800;
}

.icon-button {
  width: 34px;
  padding: 0;
  font-size: 18px;
  font-weight: 950;
}

.filter-button.active,
.tool-button.active {
  border-color: var(--blue);
  background: rgba(96, 165, 250, 0.18);
  color: #eff6ff;
  font-weight: 900;
}

.detail-card {
  min-height: 360px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 34, 58, 0.95), rgba(12, 18, 32, 0.95));
}

.detail-card h3 {
  margin: 0 0 6px;
  font-size: 21px;
  line-height: 1.1;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.detail-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.detail-list li + li {
  margin-top: 6px;
}

.detail-section {
  margin-top: 12px;
}

.muted {
  color: var(--muted);
}

.map-panel {
  overflow: hidden;
}

.map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 25, 0.72);
}

.map-header p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
}

.legend {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.map-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 25, 0.82);
}

.zoom-readout {
  min-width: 52px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.map-viewport {
  position: relative;
  height: calc(100vh - 190px);
  min-height: 650px;
  overflow: hidden;
  cursor: grab;
  background:
    radial-gradient(circle at 50% 40%, rgba(96, 165, 250, 0.07), transparent 38%),
    linear-gradient(135deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(90deg, rgba(96, 165, 250, 0.08) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(0deg, rgba(45, 212, 191, 0.055) 1px, transparent 1px) 0 0 / 48px 48px,
    #08101f;
}

.map-viewport.dragging {
  cursor: grabbing;
}

.map-transform {
  position: absolute;
  left: 0;
  top: 0;
  width: 2860px;
  height: 1920px;
  transform-origin: 0 0;
}

.connector-layer {
  position: absolute;
  inset: 0;
  width: 2860px;
  height: 1920px;
  pointer-events: none;
  z-index: 2;
}

.connector {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.72;
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.1));
  transition:
    opacity 0.18s ease,
    stroke-width 0.18s ease,
    filter 0.18s ease;
}

.connector.dimmed {
  opacity: 0.16;
}

.connector.entry {
  stroke: var(--green);
  marker-end: url("#arrow-green");
}

.connector.usecase,
.connector.core {
  stroke: var(--blue);
  marker-end: url("#arrow-blue");
}

.connector.outbound {
  stroke: var(--purple);
  marker-end: url("#arrow-purple");
}

.connector.ops {
  stroke: var(--teal);
  marker-end: url("#arrow-teal");
}

.connector.flowing {
  stroke-dasharray: 12 12;
  animation: flow 1.1s linear infinite;
}

.connector.edge-lit {
  stroke-width: 4;
  opacity: 0.92;
  filter: drop-shadow(0 0 8px rgba(45, 212, 191, 0.42));
}

.connector.edge-warm {
  stroke: rgba(251, 191, 36, 0.72);
  opacity: 0.54;
  stroke-dasharray: 9 13;
  filter: none;
}

.connector.edge-muted {
  stroke: rgba(148, 163, 184, 0.38);
  opacity: 0.22;
  stroke-width: 2;
  filter: none;
}

.connector.edge-blocked {
  stroke: rgba(251, 113, 133, 0.82);
  opacity: 0.42;
  stroke-width: 3;
  stroke-dasharray: 5 10;
  filter: none;
}

@keyframes flow {
  to {
    stroke-dashoffset: -24;
  }
}

.city-sector {
  position: absolute;
  z-index: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(90deg, var(--city-road) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(0deg, var(--city-road) 1px, transparent 1px) 0 0 / 72px 72px,
    rgba(15, 23, 42, 0.42);
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.04), inset 0 0 70px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.city-sector span {
  position: absolute;
  left: 16px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.sector-entry {
  left: 38px;
  top: 318px;
  width: 390px;
  height: 1095px;
  background-color: rgba(52, 211, 153, 0.05);
}

.sector-usecases {
  left: 500px;
  top: 292px;
  width: 430px;
  height: 1070px;
  background-color: rgba(96, 165, 250, 0.045);
}

.sector-core {
  left: 1010px;
  top: 390px;
  width: 830px;
  height: 850px;
  border-color: rgba(147, 197, 253, 0.18);
  background-color: rgba(96, 165, 250, 0.035);
  clip-path: polygon(16% 0, 84% 0, 100% 50%, 84% 100%, 16% 100%, 0 50%);
}

.sector-core span {
  left: 50%;
  transform: translateX(-50%);
}

.sector-outbound {
  left: 2468px;
  top: 360px;
  width: 372px;
  height: 1035px;
  background-color: rgba(192, 132, 252, 0.045);
}

.sector-ops {
  left: 500px;
  top: 1430px;
  width: 2130px;
  height: 368px;
  background-color: rgba(45, 212, 191, 0.045);
}

.power-bus {
  position: absolute;
  left: 420px;
  top: 1516px;
  z-index: 1;
  width: 2180px;
  height: 36px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(45, 212, 191, 0), rgba(45, 212, 191, 0.5), rgba(96, 165, 250, 0.36), rgba(192, 132, 252, 0.26), rgba(45, 212, 191, 0));
  opacity: 0.32;
  filter: blur(0.2px);
  animation: busPulse 3.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes busPulse {
  0%,
  100% {
    opacity: 0.2;
  }

  50% {
    opacity: 0.42;
  }
}

.vps-banner {
  position: absolute;
  left: 930px;
  top: 20px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 1000px;
  min-height: 62px;
  padding: 12px 18px;
  border: 1px solid rgba(147, 197, 253, 0.58);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
  box-shadow: var(--glow-blue);
  color: #e0f2fe;
  font-size: 18px;
  font-weight: 950;
}

.application-boundary {
  position: absolute;
  left: 450px;
  top: 220px;
  z-index: 1;
  width: 1940px;
  height: 1220px;
  border: 3px dashed rgba(96, 165, 250, 0.42);
  border-radius: 52px;
  background: rgba(96, 165, 250, 0.035);
}

.boundary-label {
  position: absolute;
  z-index: 6;
  color: var(--blue);
  font-size: 24px;
  font-weight: 950;
}

.application-label {
  left: 1015px;
  top: 245px;
}

.core-boundary {
  position: absolute;
  left: 1045px;
  top: 420px;
  z-index: 4;
  width: 760px;
  height: 780px;
  clip-path: polygon(22% 0, 78% 0, 100% 50%, 78% 100%, 22% 100%, 0 50%);
  border: 3px solid rgba(147, 197, 253, 0.75);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(8, 13, 25, 0.82));
  box-shadow: inset 0 0 0 6px rgba(96, 165, 250, 0.06), 0 18px 44px rgba(0, 0, 0, 0.34);
}

.core-title {
  position: absolute;
  left: 50%;
  top: 34px;
  width: 72%;
  transform: translateX(-50%);
  color: #dbeafe;
  font-size: 26px;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
}

.adapter-rail,
.ops-rail {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.adapter-rail {
  top: 320px;
  width: 2px;
  height: 1080px;
  border-left: 3px dashed currentColor;
  opacity: 0.72;
}

.entry-rail {
  left: 430px;
  color: var(--green);
}

.outbound-rail {
  left: 2460px;
  color: var(--purple);
}

.ops-rail {
  left: 510px;
  top: 1538px;
  width: 2070px;
  height: 2px;
  border-top: 3px solid var(--teal);
  opacity: 0.55;
}

.lane-title {
  position: absolute;
  z-index: 7;
  font-size: 18px;
  font-weight: 950;
  text-align: center;
}

.entry-title {
  left: 58px;
  top: 270px;
  width: 340px;
  color: var(--green);
}

.usecase-title {
  left: 560px;
  top: 270px;
  width: 320px;
  color: var(--blue);
}

.outbound-title {
  left: 2495px;
  top: 270px;
  width: 330px;
  color: var(--purple);
}

.ops-title {
  left: 1130px;
  top: 1468px;
  width: 600px;
  color: var(--teal);
}

.ai-note,
.principles {
  position: absolute;
  z-index: 5;
  border: 1px dashed rgba(147, 197, 253, 0.52);
  border-radius: 8px;
  background: rgba(8, 13, 25, 0.9);
  color: #dbeafe;
  font-weight: 850;
}

.ai-note {
  left: 58px;
  top: 1540px;
  width: 340px;
  min-height: 92px;
  padding: 18px 20px;
  line-height: 1.35;
}

.principles {
  left: 650px;
  top: 1840px;
  width: 1560px;
  min-height: 44px;
  padding: 12px 20px;
  text-align: center;
}

.node-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
}

.node-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: var(--node-w);
  min-height: var(--node-h);
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.94);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition:
    opacity 0.16s ease,
    filter 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.node-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
}

.node-card::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  height: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.4);
}

.node-card:hover,
.node-card:focus-visible,
.node-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16), 0 20px 45px rgba(0, 0, 0, 0.38);
  outline: none;
  transform: translateY(-1px);
}

.node-card.lit-energy {
  opacity: 1;
  filter: saturate(1.06);
}

.node-card.lit-energy::before {
  opacity: 1;
  border: 1px solid rgba(45, 212, 191, 0.38);
  box-shadow: 0 0 28px rgba(45, 212, 191, 0.2);
  animation: nodePulse 2.6s ease-in-out infinite;
}

.node-card.status-verified.lit-energy::before {
  border-color: rgba(96, 165, 250, 0.46);
  box-shadow: 0 0 30px rgba(96, 165, 250, 0.24);
}

.node-card.status-partial.lit-energy::before {
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.24);
}

.node-card.code-energy {
  opacity: 0.96;
  filter: saturate(0.96);
}

.node-card.code-energy::before {
  opacity: 0.78;
  border: 1px solid rgba(96, 165, 250, 0.3);
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.12);
}

.node-card.medium-energy {
  opacity: 0.94;
  filter: saturate(0.98);
}

.node-card.medium-energy::before {
  opacity: 0.68;
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.12);
}

.node-card.low-energy {
  opacity: 0.46;
  filter: grayscale(1) saturate(0.18) contrast(0.9);
}

.node-card.low-energy:hover,
.node-card.low-energy:focus-visible,
.node-card.low-energy.selected {
  opacity: 0.95;
  filter: saturate(0.9);
}

@keyframes nodePulse {
  0%,
  100% {
    box-shadow: 0 0 12px rgba(15, 118, 110, 0.12);
  }

  50% {
    box-shadow: 0 0 34px rgba(15, 118, 110, 0.28);
  }
}

.node-card.hidden-by-filter {
  opacity: 0.18;
}

.node-card.entry {
  border-left-color: var(--green);
  background: linear-gradient(180deg, rgba(18, 29, 47, 0.96), rgba(6, 78, 59, 0.22));
}

.node-card.usecase,
.node-card.core {
  border-left-color: var(--blue);
  background: linear-gradient(180deg, rgba(18, 29, 47, 0.96), rgba(30, 64, 175, 0.18));
}

.node-card.outbound {
  border-left-color: var(--purple);
  background: linear-gradient(180deg, rgba(18, 29, 47, 0.96), rgba(88, 28, 135, 0.2));
}

.node-card.ops {
  border-left-color: var(--teal);
  background: linear-gradient(180deg, rgba(18, 29, 47, 0.96), rgba(15, 118, 110, 0.18));
}

.node-card.core {
  border-left-width: 1px;
  border-top: 5px solid var(--blue-deep);
  box-shadow: 0 6px 14px rgba(9, 42, 114, 0.12);
}

.node-card.status-online::after {
  background: var(--green);
  box-shadow: 0 0 10px rgba(4, 120, 87, 0.55);
}

.node-card.status-verified::after {
  background: var(--blue);
  box-shadow: 0 0 6px rgba(96, 165, 250, 0.22);
}

.node-card.status-partial::after {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.55);
}

.node-card.status-installed::after {
  background: var(--teal);
  box-shadow: 0 0 6px rgba(15, 118, 110, 0.22);
}

.node-card.status-waiting::after,
.node-card.status-building::after {
  background: var(--amber);
}

.node-card.status-planned::after {
  background: var(--gray);
  box-shadow: none;
}

.node-card.status-offline::after {
  background: var(--gray);
}

.node-card.status-blocked::after,
.node-card.status-error::after {
  background: var(--red);
}

.node-card.status-online {
  box-shadow: var(--glow-green);
}

.node-card.status-verified {
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.16), 0 10px 24px rgba(0, 0, 0, 0.28);
}

.node-card.status-partial {
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.28), 0 0 26px rgba(251, 191, 36, 0.18), 0 16px 34px rgba(0, 0, 0, 0.34);
}

.node-card.status-installed {
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.16), 0 10px 24px rgba(0, 0, 0, 0.28);
}

.node-card.status-waiting,
.node-card.status-building {
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.95), rgba(15, 23, 42, 0.95));
}

.node-card.status-planned {
  background: linear-gradient(180deg, rgba(24, 31, 42, 0.9), rgba(15, 23, 42, 0.95));
  border-color: rgba(100, 116, 139, 0.2);
}

.node-card.status-offline {
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.82), rgba(15, 23, 42, 0.95));
  border-color: rgba(148, 163, 184, 0.24);
}

.node-card.status-blocked,
.node-card.status-error {
  background: linear-gradient(180deg, rgba(48, 24, 33, 0.96), rgba(15, 23, 42, 0.95));
  border-color: rgba(185, 28, 28, 0.34);
}

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

.node-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.48);
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 950;
}

.node-title {
  font-size: 16px;
  font-weight: 950;
  line-height: 1.18;
  color: #f8fafc;
}

.node-summary {
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.32;
}

.node-meta {
  color: #93a3b8;
  font-size: 11px;
  font-weight: 800;
}

.low-energy .node-title {
  color: #e2e8f0;
}

.low-energy .node-summary {
  color: #a7b0c0;
}

.low-energy .node-meta {
  color: #858fa1;
}

.code-energy .node-title {
  color: #eff6ff;
}

.code-energy .node-summary {
  color: #b8c7db;
}

.code-energy .node-meta {
  color: #91a4bd;
}

.medium-energy .node-title {
  color: #f8fafc;
}

.medium-energy .node-summary {
  color: #c6d0df;
}

.medium-energy .node-meta {
  color: #9aa8bb;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background: var(--gray);
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.12);
}

.status-online {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.14);
}

.status-verified {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

.status-partial {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.14);
}

.status-installed {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.status-waiting,
.status-building {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.14);
}

.status-planned {
  background: var(--gray);
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.08);
}

.status-offline {
  background: var(--gray);
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.14);
}

.status-blocked,
.status-error {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.14);
}

.status-unknown {
  background: var(--gray);
}

.status-pill,
.detail-pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.96);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.status-pill.status-online,
.detail-pill.status-online {
  background: var(--green);
  color: #022c22;
}

.status-pill.status-verified,
.detail-pill.status-verified {
  background: var(--blue);
  color: #082f49;
}

.status-pill.status-partial,
.detail-pill.status-partial {
  background: var(--amber);
  color: #3b2503;
}

.status-pill.status-installed,
.detail-pill.status-installed {
  background: var(--teal);
  color: #042f2e;
}

.status-pill.status-waiting,
.detail-pill.status-waiting,
.status-pill.status-building,
.detail-pill.status-building {
  background: #fbbf24;
  color: #3b2503;
}

.status-pill.status-planned,
.detail-pill.status-planned {
  background: var(--gray);
  color: #0f172a;
}

.status-pill.status-offline,
.detail-pill.status-offline {
  background: var(--gray);
  color: #0f172a;
}

.status-pill.status-blocked,
.detail-pill.status-blocked,
.status-pill.status-error,
.detail-pill.status-error {
  background: var(--red);
  color: #450a0a;
}

.status-pill.status-online,
.detail-pill.status-online,
.status-pill.status-installed,
.detail-pill.status-installed {
  color: #022f2f;
}

.status-pill.status-partial,
.detail-pill.status-partial {
  color: #3b2503;
}

.status-pill.status-waiting,
.detail-pill.status-waiting,
.status-pill.status-building,
.detail-pill.status-building {
  color: #3b2503;
}

.status-pill.status-planned,
.detail-pill.status-planned {
  color: #0f172a;
}

.status-pill.status-offline,
.detail-pill.status-offline {
  color: #0f172a;
}

.status-pill.status-blocked,
.detail-pill.status-blocked {
  color: #450a0a;
}

.alert-stack {
  display: grid;
  gap: 8px;
}

.alert-item {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 34, 58, 0.95), rgba(12, 18, 32, 0.95));
}

.alert-stripe {
  width: 9px;
  border-radius: 999px;
  background: var(--gray);
}

.alert-item.status-online .alert-stripe,
.alert-item.status-installed .alert-stripe {
  background: var(--teal);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.38);
}

.alert-item.status-verified .alert-stripe {
  background: var(--blue);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.38);
}

.alert-item.status-partial .alert-stripe {
  background: var(--amber);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.38);
}

.alert-item.status-waiting .alert-stripe,
.alert-item.status-building .alert-stripe {
  background: var(--amber);
}

.alert-item.status-planned .alert-stripe {
  background: var(--gray);
}

.alert-item.status-offline .alert-stripe {
  background: var(--gray);
}

.alert-item.status-blocked .alert-stripe,
.alert-item.status-error .alert-stripe {
  background: var(--red);
  box-shadow: 0 0 12px rgba(251, 113, 133, 0.38);
}

.alert-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 950;
}

.alert-text {
  margin: 0;
  color: #a8b3c7;
  font-size: 12px;
  line-height: 1.34;
}

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

  .sidebar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-viewport {
    height: 720px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 12px;
  }

  .topbar,
  .map-header {
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    font-size: 26px;
  }

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

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

  .map-toolbar {
    flex-wrap: wrap;
  }

  .map-viewport {
    height: 640px;
  }
}
