:root {
  --bg: #ece5d7;
  --panel: rgba(255, 251, 244, 0.86);
  --panel-border: rgba(33, 39, 31, 0.12);
  --ink: #172018;
  --muted: #5b6758;
  --service: #2ea3a7;
  --workload: #e19a43;
  --pod: #4b88d3;
  --alert: #da5c49;
  --healthy: #2b6a43;
  --degraded: #a46a19;
  --critical: #b24030;
  --shadow: 0 28px 70px rgba(73, 57, 25, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(62, 125, 108, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(214, 142, 49, 0.18), transparent 25%),
    linear-gradient(180deg, #f8f3ea 0%, #ece2d0 100%);
  font-family: "IBM Plex Sans", "Pretendard", "Segoe UI", sans-serif;
}

body {
  padding: 26px;
}

button {
  font: inherit;
}

.app-shell {
  max-width: 1700px;
  margin: 0 auto;
}

.hero,
.panel {
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 22px;
  padding: 28px 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #225b4b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.panel-heading h2 {
  margin: 0;
  font-family: "Aptos Display", "DIN Alternate", "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.96;
}

.hero-text {
  max-width: 70ch;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero-meta {
  display: grid;
  gap: 14px;
}

.meta-card {
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(33, 39, 31, 0.08);
}

.meta-label,
.summary-label,
.selection-label,
.node-card-meta {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 22px;
  margin-top: 22px;
}

.summary-panel {
  grid-column: 1 / -1;
  padding: 22px 24px 24px;
}

.panel {
  padding: 22px;
}

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

.summary-card {
  min-height: 132px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(241, 231, 211, 0.92)),
    linear-gradient(180deg, rgba(43, 106, 67, 0.05), rgba(255, 255, 255, 0));
  border: 1px solid rgba(33, 39, 31, 0.08);
}

.summary-value {
  display: block;
  margin-top: 20px;
  font-size: 2rem;
}

.summary-caption,
.panel-heading p,
.node-card p,
.selection-section p,
.selection-list {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.sidebar {
  display: grid;
  gap: 22px;
  align-content: start;
}

.stage-panel {
  min-width: 0;
}

.stage-heading,
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.stage-controls,
.filter-cloud,
.stage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stage-controls {
  justify-content: flex-end;
}

.ghost-button,
.filter-pill {
  border: 1px solid rgba(23, 32, 24, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.ghost-button {
  padding: 0.75rem 1rem;
}

.filter-cloud {
  margin-top: 18px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 0.95rem;
}

.ghost-button:hover,
.filter-pill:hover {
  transform: translateY(-1px);
}

.filter-pill.active {
  background: var(--ink);
  color: #f7f2e9;
}

.filter-pill[data-health="healthy"] {
  box-shadow: inset 0 0 0 1px rgba(43, 106, 67, 0.24);
}

.filter-pill[data-health="degraded"] {
  box-shadow: inset 0 0 0 1px rgba(164, 106, 25, 0.24);
}

.filter-pill[data-health="critical"] {
  box-shadow: inset 0 0 0 1px rgba(178, 64, 48, 0.24);
}

.legend-item,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legend-item.services { background: rgba(46, 163, 167, 0.14); color: var(--service); }
.legend-item.workloads { background: rgba(225, 154, 67, 0.16); color: var(--workload); }
.legend-item.pods { background: rgba(75, 136, 211, 0.15); color: var(--pod); }
.legend-item.nodes { background: rgba(95, 111, 126, 0.14); color: #4c5b68; }
.legend-item.alerts { background: rgba(218, 92, 73, 0.16); color: var(--alert); }
.legend-item.healthy { background: rgba(43, 106, 67, 0.14); color: var(--healthy); }
.legend-item.degraded { background: rgba(164, 106, 25, 0.16); color: var(--degraded); }
.legend-item.critical { background: rgba(178, 64, 48, 0.15); color: var(--critical); }

.pill.healthy { background: rgba(43, 106, 67, 0.14); color: var(--healthy); }
.pill.degraded { background: rgba(164, 106, 25, 0.16); color: var(--degraded); }
.pill.critical { background: rgba(178, 64, 48, 0.16); color: var(--critical); }
.pill.warning { background: rgba(164, 106, 25, 0.16); color: var(--degraded); }
.pill.info { background: rgba(46, 163, 167, 0.15); color: var(--service); }

.scene-wrap {
  position: relative;
  margin-top: 18px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 24, 0.08);
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.75), transparent 30%),
    linear-gradient(180deg, #f7f3eb 0%, #e8dcc7 100%);
}

.scene-hud {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(23, 32, 24, 0.08);
  color: var(--muted);
  font-size: 0.86rem;
  background: rgba(255, 255, 255, 0.5);
}

.cluster-scene {
  display: block;
  width: 100%;
  min-height: 740px;
  cursor: grab;
  touch-action: none;
}

.cluster-scene:active {
  cursor: grabbing;
}

.ground-line {
  stroke: rgba(23, 32, 24, 0.08);
  stroke-width: 1;
}

.sphere-guide {
  fill: none;
  stroke: rgba(23, 32, 24, 0.12);
  stroke-width: 1;
}

.face {
  transition: filter 140ms ease, opacity 140ms ease;
}

.face:hover,
.label-group:hover .label-pill,
.network-node:hover .node-core,
.namespace-label:hover .namespace-pill {
  filter: brightness(1.03);
}

.network-edge {
  fill: none;
  stroke-linecap: round;
  opacity: 0.62;
  pointer-events: none;
}

.network-edge.namespace-active {
  opacity: 0.82;
}

.network-edge.selected {
  opacity: 0.98;
}

.network-node {
  cursor: pointer;
}

.namespace-label {
  cursor: pointer;
}

.node-glow {
  opacity: 0.58;
}

.node-core,
.node-ring {
  transition: transform 140ms ease, stroke-width 140ms ease, opacity 140ms ease;
}

.network-node.selected .node-glow,
.network-node.namespace-active .node-glow {
  opacity: 0.92;
}

.node-text {
  fill: rgba(23, 32, 24, 0.9);
  font-size: 11px;
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(248, 244, 234, 0.94);
  stroke-width: 3px;
}

.node-text.selected {
  font-size: 12px;
}

.namespace-pill {
  fill: rgba(255, 252, 246, 0.88);
  stroke: rgba(23, 32, 24, 0.12);
  stroke-width: 1;
}

.namespace-label.selected .namespace-pill {
  stroke: rgba(23, 32, 24, 0.65);
  stroke-width: 1.4;
}

.namespace-title {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.namespace-subtitle {
  fill: #5d6758;
  font-size: 10px;
}

.face.selected {
  stroke: rgba(16, 26, 19, 0.9);
  stroke-width: 1.6;
}

.label-pill {
  fill: rgba(255, 252, 246, 0.92);
  stroke: rgba(23, 32, 24, 0.14);
  stroke-width: 1;
}

.label-pill.selected {
  stroke: rgba(23, 32, 24, 0.78);
  stroke-width: 1.5;
}

.label-title {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.label-subtitle {
  fill: #5d6758;
  font-size: 10px;
}

.selection-panel,
.node-matrix,
.alert-stack {
  margin-top: 18px;
}

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

.selection-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.selection-metrics div {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(23, 32, 24, 0.08);
}

.selection-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.selection-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
}

.selection-section {
  margin-top: 16px;
}

.selection-list {
  padding-left: 18px;
}

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

.alert-card {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(23, 32, 24, 0.08);
  background: rgba(255, 255, 255, 0.56);
}

.alert-card.critical {
  background: rgba(255, 235, 232, 0.92);
  border-color: rgba(178, 64, 48, 0.18);
}

.alert-card.warning {
  background: rgba(255, 243, 224, 0.92);
  border-color: rgba(164, 106, 25, 0.18);
}

.alert-card.info {
  background: rgba(230, 245, 245, 0.92);
  border-color: rgba(46, 163, 167, 0.18);
}

.alert-top,
.node-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.node-matrix {
  display: grid;
  gap: 12px;
}

.node-card {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(23, 32, 24, 0.08);
  background: rgba(255, 255, 255, 0.56);
}

.node-card.healthy {
  background: rgba(233, 247, 237, 0.92);
}

.node-card.critical {
  background: rgba(255, 235, 232, 0.92);
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(23, 32, 24, 0.12);
  background: rgba(255, 255, 255, 0.44);
  color: var(--muted);
}

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

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

@media (max-width: 980px) {
  body {
    padding: 16px;
  }

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

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

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

  .stage-heading,
  .scene-hud {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .summary-grid,
  .selection-metrics {
    grid-template-columns: 1fr;
  }

  .cluster-scene {
    min-height: 620px;
  }
}
