:root {
  --bg: #07131f;
  --bg-soft: rgba(10, 24, 38, 0.86);
  --card: rgba(10, 24, 38, 0.72);
  --line: rgba(157, 200, 255, 0.14);
  --text: #e9f4ff;
  --muted: #95adc4;
  --accent: #58c7ff;
  --accent-2: #71ffcf;
  --warn: #ffcb6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at top, #0d2a42 0%, var(--bg) 55%, #040b12 100%); color: var(--text); }
body { padding: 32px; }

.shell { max-width: 1400px; margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); font-size: 0.78rem; margin: 0 0 10px; }
h1 { margin: 0; font-size: clamp(2.2rem, 4vw, 4rem); line-height: 0.95; }
.subhead { margin: 12px 0 0; color: var(--muted); max-width: 60ch; }
.status-card, .map-panel, .legend-panel, .stats-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.status-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.status-card p { margin: 4px 0 0; color: var(--muted); }
.status-dot { width: 14px; height: 14px; border-radius: 999px; background: var(--accent-2); box-shadow: 0 0 24px var(--accent-2); }
.dashboard { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr); gap: 24px; }
.map-panel, .legend-panel { padding: 22px; }
.panel-head h2 { margin: 0 0 8px; font-size: 1.35rem; }
.panel-head p { margin: 0 0 18px; color: var(--muted); }
.map-stage { position: relative; min-height: 720px; border-radius: 22px; overflow: hidden; }
#mapStage { height: 720px; }
.leaflet-container { background: #07131f; }
.map-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(88,199,255,0.18), transparent 58%);
  mix-blend-mode: screen;
}
.pin { position: absolute; width: 18px; height: 18px; border-radius: 999px; transform: translate(-50%, -50%); box-shadow: 0 0 0 8px rgba(88,199,255,0.08), 0 0 30px rgba(88,199,255,0.35); }
.pin::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: currentColor; }
.pin.big { width: 26px; height: 26px; }
.pin.medium { width: 20px; height: 20px; }
.pin.small { width: 14px; height: 14px; }
.pin .tooltip { position: absolute; left: 50%; top: -12px; transform: translate(-50%, -100%); background: rgba(4, 11, 18, 0.92); border: 1px solid var(--line); padding: 8px 10px; border-radius: 12px; white-space: nowrap; font-size: 0.82rem; opacity: 0; pointer-events: none; transition: 0.15s ease; }
.pin:hover .tooltip { opacity: 1; }
.legend-list { display: grid; gap: 12px; margin-bottom: 18px; }
.legend-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.legend-left { display: flex; align-items: center; gap: 12px; }
.swatch { width: 14px; height: 14px; border-radius: 999px; box-shadow: 0 0 16px currentColor; }
.legend-name { font-weight: 600; }
.legend-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.stats-card { padding: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.stat-value { display: block; font-size: 2rem; font-weight: 800; }
.stat-label { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 1000px) { .dashboard { grid-template-columns: 1fr; } .map-stage { min-height: 520px; } }
@media (max-width: 640px) { body { padding: 16px; } .topbar { flex-direction: column; align-items: start; } .map-panel, .legend-panel { padding: 16px; } }
