/* Fonts: self-hosted via vendor/fonts.css (loaded in <head>). No googleapis needed. */

/* ─── Variables ─────────────────────────────────────────────────────────── */
/* ─── Токены оформления ─────────────────────────────────────────────────────

   Направление «аналитическая станция»: рабочий инструмент, а не витрина.
   Спокойный синий вместо неонового бирюзового, приглушённые границы вместо
   светящихся рамок, плотнее сетка, меньше радиусы.

   Имена переменных сохранены от прежней темы намеренно: на них завязаны
   разметка обеих страниц, восемь модулей и набор проверок. Меняются значения,
   а не имена — иначе правка растянулась бы на весь проект и сломала бы то,
   что сейчас работает.

   Из-за этого осталось историческое имя --electric: теперь это обычный синий
   акцент, никакого свечения за ним нет.
   ───────────────────────────────────────────────────────────────────────── */
:root {
  /* Поверхности: от фона страницы к самой приподнятой карточке */
  --bg:            #0b1220;
  --surface:       #131c2e;
  --surface2:      #1a2437;
  --surface3:      #212d43;

  /* Границы. Полупрозрачные, чтобы одинаково ложиться на любую поверхность */
  --border:        rgba(255, 255, 255, 0.08);
  --border2:       rgba(255, 255, 255, 0.14);

  /* Акцент */
  --blue:          #2563eb;
  --blue-light:    #4b83f0;
  --electric:      #4b83f0;
  --electric-glow: rgba(37, 99, 235, 0.16);
  --electric-glow2:rgba(37, 99, 235, 0.08);

  /* Текст: основной, второстепенный, подписи */
  --text:          #eef2f8;
  --text2:         #93a3bb;
  --text3:         #61738f;

  /* Состояния */
  --green:         #22c55e;
  --green-glow:    rgba(34, 197, 94, 0.14);
  --amber:         #f59e0b;
  --amber-glow:    rgba(245, 158, 11, 0.14);
  --red:           #ef4444;
  --red-glow:      rgba(239, 68, 68, 0.14);

  /* Скругления: сдержаннее прежних, ближе к приборной панели */
  --radius-sm:  5px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;

  /* Тени обычные. Прежняя --shadow-electric светилась бирюзовым по всему
     интерфейсу; оставлена как мягкая подсветка акцентом, чтобы не искать
     каждое её упоминание в разметке. */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.35);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.45);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.55);
  --shadow-electric: 0 0 0 1px rgba(75,131,240,0.35), 0 4px 14px rgba(37,99,235,0.18);

  --transition-fast:   140ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   360ms cubic-bezier(0.4, 0, 0.2, 1);

  --header-height: 56px;
  --statusbar-height: 32px;
  --sidebar-width: 340px;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
canvas { display: block; }

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ─── Glassmorphism ─────────────────────────────────────────────────────── */
.glass {
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border);
}

.glass-strong {
  background: rgba(17, 24, 39, 0.88);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid var(--border2);
}

.glass-light {
  background: rgba(26, 34, 53, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(30, 45, 69, 0.6);
}

/* ─── Header ────────────────────────────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: rgba(10, 13, 20, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(75, 131, 240, 0.05);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Плашка знака. Ровный синий вместо градиента со свечением: знак должен
   читаться, а не светиться — он стоит рядом с названием, а не отдельно. */
.header-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--blue);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Монограмма нарисована обводкой, а не заливкой: так она не залипает
   в пятно на мелком размере и остаётся читаемой во вкладке браузера. */
.header-logo-icon svg {
  width: 20px;
  height: 20px;
  color: #fff;
  fill: none;
}

.header-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header-logo-text .title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.header-logo-text .subtitle {
  font-size: 10px;
  font-weight: 500;
  color: var(--electric);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

/* Какой набор открыт — вместо прежней ленты фильтров, уехавшей в панель слева. */
.header-source {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text2);
  overflow: hidden;
  white-space: nowrap;
}

.header-source .key { color: var(--text3); }
.header-source b { font-weight: 600; color: var(--text); }

@media (max-width: 1400px) { .header-source #srcMeta { display: none; } }
@media (max-width: 1100px) { .header-source { display: none; } }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--transition-normal);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  outline: none;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
  pointer-events: none;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border2);
  color: var(--text2);
}

.btn-ghost:hover {
  background: var(--surface2);
  border-color: var(--electric);
  color: var(--electric);
  box-shadow: 0 0 12px var(--electric-glow);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, #1e40af 100%);
  border-color: rgba(59, 130, 246, 0.4);
  color: white;
  box-shadow: var(--shadow-sm), 0 0 20px rgba(29, 78, 216, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, var(--blue) 100%);
  box-shadow: var(--shadow-md), 0 0 30px rgba(29, 78, 216, 0.5);
  transform: translateY(-1px);
}

.btn-electric {
  background: linear-gradient(135deg, rgba(75, 131, 240,0.15) 0%, rgba(75, 131, 240,0.05) 100%);
  border-color: rgba(75, 131, 240, 0.35);
  color: var(--electric);
}

.btn-electric:hover {
  background: linear-gradient(135deg, rgba(75, 131, 240,0.25) 0%, rgba(75, 131, 240,0.1) 100%);
  border-color: var(--electric);
  box-shadow: var(--shadow-electric);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
  justify-content: center;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ─── Filter Chips ──────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
  user-select: none;
}

.chip:hover {
  border-color: var(--electric);
  color: var(--electric);
  background: var(--electric-glow2);
}

.chip.active {
  background: var(--electric-glow);
  border-color: var(--electric);
  color: var(--electric);
  box-shadow: 0 0 12px var(--electric-glow);
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ─── Рабочая область ───────────────────────────────────────────────────────

   Три полосы по вертикали: шапка, рабочая область, плашка состояния.
   Внутри рабочей области — панель фильтров и сцена с показателями и картой.

   Раньше карта висела на весь экран как fixed, а фильтры теснились в шапке.
   Теперь у каждого куска своё место в сетке, и карта не залезает под панели.
   ───────────────────────────────────────────────────────────────────────── */
.workspace {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: var(--statusbar-height);
  display: grid;
  grid-template-columns: 208px 1fr;
  min-height: 0;
}

/* ── Панель фильтров ── */
.filters-panel {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 14px 0 16px;
  display: flex;
  flex-direction: column;
}

.filters-group {
  padding: 0 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filters-group h3 {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text3);
  margin-bottom: 6px;
}

/* Чип внутри панели — строка во всю ширину, а не «таблетка»:
   в столбце они читаются как список, а не как разбросанные ярлыки. */
.filters-panel .chip {
  width: 100%;
  justify-content: flex-start;
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 12.5px;
  border-color: transparent;
  background: transparent;
}

.filters-panel .chip:hover {
  background: var(--surface2);
  border-color: transparent;
  color: var(--text);
}

.filters-panel .chip.active {
  background: var(--electric-glow);
  border-color: transparent;
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--electric);
}

.filters-note {
  margin-top: auto;
  padding: 12px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text3);
  border-top: 1px solid var(--border);
}

/* ── Сцена: показатели и карта ── */
.stage {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  min-width: 0;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.kpi-strip > div {
  padding: 7px 18px 9px;
  border-right: 1px solid var(--border);
}

.kpi-strip > div:last-child { border-right: 0; }

.kpi-strip dt {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
}

.kpi-strip dd {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 1px;
  letter-spacing: -0.02em;
}

.kpi-strip dd small {
  font-size: 12px;
  font-weight: 500;
  color: var(--text3);
  margin-left: 5px;
  letter-spacing: 0;
}

.map-container {
  position: relative;
  min-height: 0;
}

#map {
  width: 100%;
  height: 100%;
  background: var(--bg);
}

/* Leaflet overrides */
.leaflet-container {
  background: var(--bg) !important;
  font-family: 'Manrope', sans-serif;
}

/* Подложка — светлые тайлы OpenStreetMap, а палитра интерфейса тёмная.
   Инверсия с поворотом тона делает из них тёмную карту, на которой вода
   остаётся синеватой, а не оранжевой. Прежний набор фильтров рассчитывался
   на уже тёмные тайлы Stadia и здесь дал бы засвеченный фон. */
.leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.8) contrast(0.95) saturate(0.2);
}

.leaflet-control-zoom {
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-md) !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text2) !important;
  border-bottom: 1px solid var(--border) !important;
  font-size: 16px !important;
  line-height: 28px !important;
  width: 30px !important;
  height: 30px !important;
  transition: all var(--transition-fast) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--surface2) !important;
  color: var(--electric) !important;
}

.leaflet-control-attribution {
  background: rgba(10, 13, 20, 0.7) !important;
  color: var(--text3) !important;
  font-size: 10px !important;
  backdrop-filter: blur(8px);
}

.leaflet-control-attribution a { color: var(--text3) !important; }

/* ─── Tooltip ───────────────────────────────────────────────────────────── */
.map-tooltip {
  position: fixed;
  z-index: 2000;
  pointer-events: none;
  opacity: 0;
  transform: translate(12px, -50%) scale(0.95);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.map-tooltip.visible {
  opacity: 1;
  transform: translate(12px, -50%) scale(1);
}

.map-tooltip-inner {
  min-width: 200px;
  max-width: 280px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border2);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(75, 131, 240,0.08);
}

.tooltip-city {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.tooltip-region {
  font-size: 11px;
  color: var(--text2);
  margin-bottom: 10px;
}

.tooltip-stats {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

.tooltip-stat-label {
  font-size: 11px;
  color: var(--text3);
}

.tooltip-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--electric);
}

/* ─── Map Legend ─────────────────────────────────────────────────────────── */
/* ─── Плашка состояния ──────────────────────────────────────────────────────

   Обозначения, текущий масштаб и состояние данных. Раньше обозначения висели
   плашкой поверх карты по центру внизу и закрывали Дальний Восток; теперь
   у них своя полоса, а карта не упирается в край окна.
   ───────────────────────────────────────────────────────────────────────── */
.statusbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--statusbar-height);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--surface);
  border-top: 1px solid var(--border2);
  font-size: 11.5px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
}

.statusbar-group {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.statusbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  color: var(--text3);
}

.statusbar .key { color: var(--text3); }

.statusbar-storage { display: inline-flex; align-items: center; gap: 6px; }

.statusbar-storage::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text3);
}

.statusbar-storage.on::before { background: var(--green); }

/* Кнопка про нераспознанные строки. Показывается, только когда такие строки
   есть: молчаливая потеря части файла — худшее, что может сделать программа. */
.statusbar-warn {
  font: inherit;
  color: var(--amber);
  background: var(--amber-glow);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.statusbar-warn:hover { background: rgba(245, 158, 11, 0.2); }

/* На узком экране первой уходит подсказка про масштаб: обозначения и
   состояние данных важнее — без них непонятно, что показано на экране. */
@media (max-width: 1500px) { .statusbar-hint { display: none; } }

.map-legend {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ─── Панель «Как загрузить данные» ─────────────────────────────────────────
   Открывается поверх правого края и не уводит со страницы: вопрос про формат
   возникает ровно в тот момент, когда человек собирается нажать «Загрузить».
   ───────────────────────────────────────────────────────────────────────── */
.help-panel {
  position: fixed;
  top: var(--header-height);
  right: 0;
  bottom: var(--statusbar-height);
  width: 384px;
  max-width: 92vw;
  z-index: 1100;
  background: var(--surface);
  border-left: 1px solid var(--border2);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.help-panel-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.help-panel-head h2 { font-size: 14px; font-weight: 700; }

.help-panel-head button {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--text3);
  font-size: 20px;
  line-height: 1;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.help-panel-head button:hover { color: var(--text); background: var(--surface2); }

.help-panel-body { padding: 16px; display: grid; gap: 16px; }

.help-step { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; }

.help-step .n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--electric-glow);
  color: var(--electric);
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid rgba(75, 131, 240, 0.4);
}

.help-step h3 { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.help-step p  { font-size: 12.5px; color: var(--text2); line-height: 1.5; }

.help-panel code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text);
}

/* Образец таблицы. Шире панели, поэтому прокручивается внутри себя,
   а не растягивает страницу. */
.help-sample {
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.help-sample table { width: 100%; border-collapse: collapse; font-size: 11px; }

.help-sample th {
  background: var(--surface2);
  color: var(--text2);
  font-weight: 600;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border2);
  white-space: nowrap;
}

.help-sample th.req { color: var(--electric); }

.help-sample td {
  padding: 5px 8px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.help-sample tr:last-child td { border-bottom: 0; }

.help-facts { display: grid; gap: 8px; }

.help-facts li {
  position: relative;
  padding-left: 23px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text2);
}

/* Кружок отдельным слоем, а не колонкой сетки. В режиме grid каждый
   вложенный элемент строки становится своей ячейкой, поэтому выделенные
   слова внутри предложения выпадали из текста в соседние колонки. */
.help-facts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.help-facts li.ok::before   { background: var(--green); }
.help-facts li.warn::before { background: var(--amber); }

/* Кнопка-иконка в шапке: та же высота, что у остальных, но без подписи. */
.btn-icon { padding: 7px; }
.btn-icon svg { width: 16px; height: 16px; }

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
}

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

.legend-scale {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-scale-dot {
  border-radius: 50%;
  background: var(--electric);
  flex-shrink: 0;
  opacity: 0.8;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: var(--header-height);
  right: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  z-index: 900;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  border-left: 1px solid var(--border);
  background: rgba(11, 15, 22, 0.95);
  backdrop-filter: blur(24px);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.sidebar-subtitle {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}

.sidebar-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  transition: all var(--transition-fast);
}

.sidebar-close:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border2);
}

.sidebar-close svg { width: 14px; height: 14px; }

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sidebar-stat-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface2);
  border: 1px solid var(--border);
}

.sidebar-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.sidebar-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--electric);
  line-height: 1;
}

.sidebar-stat-value.green { color: var(--green); }
.sidebar-stat-value.amber { color: var(--amber); }

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

/* ─── Loader ─────────────────────────────────────────────────────────────── */
.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--bg);
  opacity: 1;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 2px solid var(--border2);
  border-top-color: var(--electric);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.loader-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  letter-spacing: 0.04em;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Upload Modal ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border2);
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.98);
  transition: transform var(--transition-normal);
  overflow: hidden;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.modal-body { padding: 20px 24px 24px; }

.dropzone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--electric);
  background: var(--electric-glow2);
}

.dropzone-icon {
  font-size: 36px;
  margin-bottom: 12px;
  line-height: 1;
}

.dropzone-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.dropzone-sub {
  font-size: 12px;
  color: var(--text2);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.modal-status {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  display: none;
}

.modal-status.success {
  display: block;
  background: var(--green-glow);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--green);
}

.modal-status.error {
  display: block;
  background: var(--red-glow);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
}

.col-map {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.col-map-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.col-map-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}

.col-map-select {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.col-map-select:focus { border-color: var(--electric); }

/* ─── Notification ──────────────────────────────────────────────────────── */
/* Стили тоста живут в js/animations.js (_injectNotificationStyles): элемент
   создаётся кодом и им же оформляется. Здесь был второй набор правил для того
   же класса — живой тост получал left:50% отсюда и right:28px оттуда и вставал
   криво. Классы .show/.success/.error/.info не навешивал никто. */

/* ─── Cluster Markers ────────────────────────────────────────────────────── */
.marker-cluster-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-circle {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(75, 131, 240,0.6), rgba(75, 131, 240,0.2));
  border: 1.5px solid rgba(75, 131, 240, 0.6);
  box-shadow: 0 0 12px rgba(75, 131, 240, 0.4), inset 0 0 8px rgba(75, 131, 240,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: white;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  animation: pulse-ring 3s ease-in-out infinite;
}

.marker-circle:hover {
  transform: scale(1.15);
  box-shadow: 0 0 24px rgba(75, 131, 240, 0.6), inset 0 0 12px rgba(75, 131, 240,0.15);
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 12px rgba(75, 131, 240, 0.4), inset 0 0 8px rgba(75, 131, 240,0.1); }
  50%       { box-shadow: 0 0 22px rgba(75, 131, 240, 0.6), 0 0 40px rgba(75, 131, 240,0.15), inset 0 0 8px rgba(75, 131, 240,0.1); }
}

/* ─── Dashboard Layout ───────────────────────────────────────────────────── */
.dashboard-body {
  padding-top: var(--header-height);
  min-height: 100vh;
  background: var(--bg);
}

.dashboard-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.dashboard-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.dashboard-subtitle {
  font-size: 13px;
  color: var(--text2);
  margin-top: 3px;
}

/* Toggle Switch */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
}

.toggle-btn {
  padding: 7px 18px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text2);
  transition: all var(--transition-normal);
}

.toggle-btn.active {
  background: var(--surface);
  color: var(--electric);
  box-shadow: var(--shadow-sm);
}

/* ─── Dashboard Cards ────────────────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.dashboard-grid-full {
  grid-template-columns: 1fr;
}

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

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

.dash-card {
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: visible;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.dash-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow-md);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.dash-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-card-title-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* Значок рисуется линиями, а не шрифтом: смайлик на каждой системе свой —
   плоский на одной, объёмный на другой, — и подстроить его под тёмную тему
   нельзя. Обводка берёт цвет из color, поэтому карточка задаёт оба тона. */
.dash-card-title-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.dash-card-title-icon.blue   { background: rgba(29,78,216,0.2);  color: var(--blue-light); }
.dash-card-title-icon.green  { background: rgba(16,185,129,0.2); color: var(--green); }
.dash-card-title-icon.amber  { background: rgba(245,158,11,0.2); color: var(--amber); }
.dash-card-title-icon.red    { background: rgba(239,68,68,0.2);  color: var(--red); }

.dash-card-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--electric-glow);
  border: 1px solid rgba(75, 131, 240,0.25);
  color: var(--electric);
  font-family: 'JetBrains Mono', monospace;
}

.dash-card-chart {
  padding: 12px 24px 8px;
  position: relative;
  height: 160px;
}

.dash-card-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.dash-card-table-wrap {
  overflow: visible;
  padding: 0 0 8px;
}

/* ─── Tables ─────────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  padding: 8px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--surface);
}

.data-table th:last-child,
.data-table td:last-child { text-align: right; }

.data-table td {
  padding: 9px 16px;
  color: var(--text2);
  border-bottom: 1px solid rgba(30, 45, 69, 0.5);
  transition: background var(--transition-fast);
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover td { background: var(--surface2); }

.data-table .rank {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
}

/* Первое место: цифра в кружке вместо медали-смайлика. Смайлик здесь был
   единственным цветным пятном в таблице и ломал ряд по высоте. */
.data-table .rank-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(245,158,11,0.16);
  color: var(--amber);
  font-weight: 700;
}

/* «Все регионы охвачены» — галочка линиями вместо праздничного смайлика. */
.all-covered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  color: var(--green);
  padding: 16px 0;
  text-align: center;
}

.all-covered .ok-mark {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.data-table .name-cell {
  font-weight: 600;
  color: var(--text);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table .count-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--electric);
}

.data-table .bar-cell {
  width: 100px;
}

.mini-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}

.mini-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--electric));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Uncovered Regions Card ─────────────────────────────────────────────── */
.uncovered-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  padding: 16px 24px;
}

.uncovered-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
}

.uncovered-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border2);
  flex-shrink: 0;
}

/* ─── Summary Stats Strip ────────────────────────────────────────────────── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

.stats-strip-card {
  padding: 20px 24px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}

.stats-strip-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.stats-strip-card.electric::before { background: linear-gradient(90deg, transparent, var(--electric), transparent); }
.stats-strip-card.green::before    { background: linear-gradient(90deg, transparent, var(--green), transparent); }
.stats-strip-card.amber::before    { background: linear-gradient(90deg, transparent, var(--amber), transparent); }
.stats-strip-card.red::before      { background: linear-gradient(90deg, transparent, var(--red), transparent); }

.stats-strip-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.stats-strip-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.stats-strip-value.electric { color: var(--electric); }
.stats-strip-value.green    { color: var(--green); }
.stats-strip-value.amber    { color: var(--amber); }
.stats-strip-value.red      { color: var(--red); }

.stats-strip-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

/* ─── Neon Glow Utility ──────────────────────────────────────────────────── */
.glow-electric { box-shadow: var(--shadow-electric); }
.glow-green    { box-shadow: 0 0 20px rgba(16,185,129,0.3); }
.glow-amber    { box-shadow: 0 0 20px rgba(245,158,11,0.3); }

/* ─── Misc ───────────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-mono {
  font-family: 'JetBrains Mono', monospace;
}

.text-electric { color: var(--electric); }
.text-green    { color: var(--green); }
.text-amber    { color: var(--amber); }
.text-red      { color: var(--red); }
.text-muted    { color: var(--text2); }
.text-dimmed   { color: var(--text3); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-auto { margin-top: auto; }

/* ─── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.animate-fade-in    { animation: fadeIn 0.4s var(--transition-slow) both; }
.animate-scale-in   { animation: scaleIn 0.3s ease both; }
.animate-slide-in-r { animation: slideInRight 0.35s ease both; }

/* Stagger children */
.stagger-children > *:nth-child(1)  { animation-delay: 0ms; }
.stagger-children > *:nth-child(2)  { animation-delay: 60ms; }
.stagger-children > *:nth-child(3)  { animation-delay: 120ms; }
.stagger-children > *:nth-child(4)  { animation-delay: 180ms; }
.stagger-children > *:nth-child(5)  { animation-delay: 240ms; }
.stagger-children > *:nth-child(6)  { animation-delay: 300ms; }
.stagger-children > *:nth-child(7)  { animation-delay: 360ms; }
.stagger-children > *:nth-child(8)  { animation-delay: 420ms; }
.stagger-children > *:nth-child(9)  { animation-delay: 480ms; }
.stagger-children > *:nth-child(10) { animation-delay: 540ms; }

/* ══════════════════════════════════════════════════════════════════
   DESIGN ENHANCEMENT LAYER  |  frontend-design pass
   Satellite Intelligence Terminal aesthetic
   ══════════════════════════════════════════════════════════════════ */

/* ─── 1. Atmospheric background gradients ─────────────────────── */
body {
  background-image:
    radial-gradient(ellipse 60% 50% at 8% 50%,  rgba(75, 131, 240, 0.035) 0%, transparent 100%),
    radial-gradient(ellipse 50% 70% at 92% 10%, rgba(29, 78, 216, 0.045) 0%, transparent 100%);
}

/* Dot-grid overlay — dashboard only (map fills screen anyway) */
.dashboard-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(75, 131, 240, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 130% 130% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 130% 130% at 50% 0%, black 30%, transparent 75%);
}

/* ─── 2. Header — sweeping signal line ────────────────────────── */
@keyframes header-signal {
  0%   { left: -60%; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -60%;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(75, 131, 240, 0.75) 50%, transparent);
  animation: header-signal 8s ease-in-out infinite;
  animation-delay: 3s;
  pointer-events: none;
}

/* ─── 3. Loader — Radar sweep ─────────────────────────────────── */
@keyframes radar-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.loader-spinner {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(75, 131, 240, 0.12);
  border-top-color: transparent;
  border-right-color: transparent;
  background: conic-gradient(
    from 0deg,
    transparent         0deg,
    rgba(75, 131, 240,0.03) 100deg,
    rgba(75, 131, 240,0.18) 260deg,
    rgba(75, 131, 240,0.70) 346deg,
    transparent         360deg
  );
  animation: radar-spin 1.5s linear infinite;
  box-shadow: 0 0 28px rgba(75, 131, 240, 0.08), inset 0 0 14px rgba(75, 131, 240, 0.04);
}

.loader-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--electric);
  opacity: 0.55;
}

/* ─── 4. Dashboard title — gradient text ──────────────────────── */
.dashboard-title {
  font-size: 30px;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #e8f0ff 0%, #b4d0ff 55%, var(--electric) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── 5. Stats strip — spring lift + number scale ─────────────── */
.stats-strip-card {
  transition: transform 240ms cubic-bezier(0.34, 1.5, 0.64, 1), box-shadow 240ms ease;
  cursor: default;
}

.stats-strip-card:hover                 { transform: translateY(-3px); }
.stats-strip-card.electric:hover        { box-shadow: 0 12px 40px rgba(75, 131, 240, 0.13), var(--shadow-md); }
.stats-strip-card.amber:hover           { box-shadow: 0 12px 40px rgba(245, 158, 11, 0.13), var(--shadow-md); }
.stats-strip-card.green:hover           { box-shadow: 0 12px 40px rgba(16, 185, 129, 0.13), var(--shadow-md); }
.stats-strip-card.red:hover             { box-shadow: 0 12px 40px rgba(239, 68, 68, 0.13), var(--shadow-md); }

.stats-strip-card::before {
  transition: opacity 250ms ease;
  opacity: 0.55;
}
.stats-strip-card:hover::before { opacity: 1; }

.stats-strip-value {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

/* ─── 6. Dashboard cards — hover lift ─────────────────────────── */
.dash-card {
  transition: border-color 250ms ease, box-shadow 250ms ease, transform 220ms ease;
}

.dash-card:hover {
  transform: translateY(-2px);
  border-color: rgba(75, 131, 240, 0.18);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(75, 131, 240, 0.06);
}

/* ─── 7. Logo icon — breathing glow ───────────────────────────── */
@keyframes logo-breathe {
  0%, 100% { box-shadow: 0 0 14px rgba(75, 131, 240, 0.35); }
  50%       { box-shadow: 0 0 32px rgba(75, 131, 240, 0.65), 0 0 60px rgba(75, 131, 240, 0.12); }
}

.header-logo-icon {
  animation: logo-breathe 5s ease-in-out infinite;
}

/* ─── 8. Chip active — inner shimmer ──────────────────────────── */
.chip.active {
  background: rgba(75, 131, 240, 0.10);
  box-shadow: 0 0 16px rgba(75, 131, 240, 0.18), inset 0 1px 0 rgba(75, 131, 240, 0.14);
}

/* ─── 9. Tooltip — top accent line ────────────────────────────── */
.map-tooltip-inner {
  overflow: hidden;
}

.map-tooltip-inner::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(75, 131, 240, 0.5), transparent);
  pointer-events: none;
}

/* ─── 10. Scrollbar — electric tint ───────────────────────────── */
::-webkit-scrollbar              { width: 3px; height: 3px; }
::-webkit-scrollbar-track        { background: transparent; }
::-webkit-scrollbar-thumb        { background: rgba(75, 131, 240, 0.22); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover  { background: rgba(75, 131, 240, 0.48); }

/* ─── 11. (свободно: свечение тостов ушло вместе с классами .success/.error/.info) */

/* ─── 12. Button micro-press ───────────────────────────────────── */
.btn:active { transform: scale(0.95); transition-duration: 70ms; }

/* ─── 13. Uncovered items — slide on hover ────────────────────── */
.uncovered-item {
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.uncovered-item:hover {
  background: var(--surface3);
  border-color: var(--border2);
  transform: translateX(2px);
}

/* ─── 14. Map legend — darker glass ───────────────────────────── */
.map-legend {
  background: rgba(7, 10, 17, 0.92);
  border: 1px solid rgba(75, 131, 240, 0.10);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(75, 131, 240, 0.03);
}

/* ─── 15. Sidebar stat card hover ─────────────────────────────── */
.sidebar-stat-card {
  transition: border-color 200ms ease, background 200ms ease;
  cursor: default;
}
.sidebar-stat-card:hover {
  border-color: var(--border2);
  background: var(--surface3);
}

/* ─── 16. Marker pulse — wider bloom ──────────────────────────── */
@keyframes pulse-ring {
  0%, 100% {
    box-shadow: 0 0 10px rgba(75, 131, 240, 0.38),
                inset 0 0 6px rgba(75, 131, 240, 0.10);
  }
  50% {
    box-shadow: 0 0 30px rgba(75, 131, 240, 0.68),
                0 0 56px rgba(75, 131, 240, 0.18),
                inset 0 0 12px rgba(75, 131, 240, 0.14);
  }
}

/* ─── 17. Modal — spring entrance ─────────────────────────────── */
.modal-overlay.open .modal {
  animation: modal-spring 290ms cubic-bezier(0.34, 1.25, 0.64, 1) both;
}

@keyframes modal-spring {
  from { opacity: 0; transform: translateY(22px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ─── 18. Dropzone — inner glow on drag ───────────────────────── */
.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--electric);
  background: rgba(75, 131, 240, 0.03);
  box-shadow: inset 0 0 40px rgba(75, 131, 240, 0.04);
}
