/* ============================================================================
   РАДАР·РФ — Approved Tactical Airspace Clean Design System (v11.0)
   Desktop C2 Rail + Frosted Glass Bottom Dock + Mobile Sheets + MapLibre GL
   ============================================================================ */

:root {
  --bg-canvas: #0b1220;
  --bg-panel: rgba(11, 17, 28, 0.96);
  --bg-panel-solid: #0b111c;
  --bg-panel-2: #101827;
  --bg-hover: #162033;
  --surface: rgba(11, 18, 32, 0.90);
  --surface-glass: rgba(10, 17, 30, 0.86);
  --surface-solid: #0e1626;
  --surface-2: rgba(20, 30, 49, 0.88);
  --surface-2-solid: #162136;
  --surface-hover: rgba(32, 46, 74, 0.96);
  --border: #1e293b;
  --border-glass: rgba(56, 189, 248, 0.28);
  --border-soft: rgba(148, 163, 184, 0.16);
  --border-strong: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.14);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.14);
  --ok: #22c55e;
  --ok-bg: rgba(34, 197, 94, 0.14);
  --fading: #a78bfa;
  --shadow-lg: 0 20px 50px rgba(2, 6, 23, 0.68);
  --shadow-md: 0 8px 24px rgba(2, 6, 23, 0.44);
  --r-lg: 15px;
  --r-md: 10px;
  --r-sm: 6px;
  --r-xs: 4px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --sb-w: 300px;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --scroll-thumb: rgba(100, 116, 139, 0.42);
  --scroll-thumb-hover: rgba(148, 163, 184, 0.68);
}

[data-theme="light"] {
  --bg-canvas: #dbe6f0;
  --bg-panel: rgba(248, 250, 252, 0.97);
  --bg-panel-solid: #f8fafc;
  --bg-panel-2: #ffffff;
  --bg-hover: #e2e8f0;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-glass: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-2: rgba(241, 245, 249, 0.96);
  --surface-2-solid: #f1f5f9;
  --surface-hover: #e2e8f0;
  --border: #cbd5e1;
  --border-glass: rgba(2, 132, 199, 0.28);
  --border-soft: rgba(15, 23, 42, 0.10);
  --border-strong: #94a3b8;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent: #0284c7;
  --accent-soft: rgba(2, 132, 199, 0.12);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.10);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.12);
  --ok: #16a34a;
  --ok-bg: rgba(22, 163, 74, 0.12);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.16);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.12);
  --scroll-thumb: rgba(100, 116, 139, 0.35);
  --scroll-thumb-hover: rgba(71, 85, 105, 0.60);
}

/* Global Sleek Custom Scrollbars */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}
*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* MapLibre GL Container */
#tactical-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-canvas);
  z-index: 1;
}
.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right,
.maplibregl-ctrl-top-left,
.maplibregl-ctrl-top-right {
  display: none !important;
}

/* MapLibre Glass Popups (Track waypoint hover) */
.uav-maplibre-popup .maplibregl-popup-content {
  background: var(--surface-solid);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 6px 10px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  line-height: 1.35;
  backdrop-filter: blur(14px);
}
.uav-maplibre-popup .maplibregl-popup-tip {
  display: none;
}

/* =====================================================================
   CUSTOM MAPLIBRE TRACK MARKERS (Missile w/ Exhaust + Delta UAV, Clean)
   NOTE: Must keep MapLibre .maplibregl-marker position:absolute; top:0; left:0
   ===================================================================== */
.tactical-uav-container {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  will-change: transform;
}
.tactical-uav-container.fading { opacity: 0.56; }

.tm-node {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

.tm-pulse-ring {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 158, 11, 0.52);
  pointer-events: none;
  animation: tmMarkerPulse 2.1s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}
.tm-node.missile .tm-pulse-ring {
  border-color: rgba(239, 68, 68, 0.62);
  animation-duration: 1.5s;
}
@keyframes tmMarkerPulse {
  0% { transform: scale(0.76); opacity: 0.72; }
  100% { transform: scale(1.62); opacity: 0; }
}

.tm-sel-ring {
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  border: 1.7px solid #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
  pointer-events: none;
}
[data-theme="light"] .tm-sel-ring {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.tm-rotator {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--ease);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
}
.tm-rotator svg { overflow: visible; }
.tm-exhaust {
  transform-origin: 0px 8.2px;
  animation: tmFlameFlicker 0.28s ease-in-out infinite alternate;
}
@keyframes tmFlameFlicker {
  from { transform: scaleY(0.86); opacity: 0.85; }
  to { transform: scaleY(1.22); opacity: 1; }
}

/* Group Multiplier Micro-Badge (×N) */
.tm-group-badge {
  position: absolute;
  top: -1px;
  left: 25px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #0b1220;
  border: 1px solid var(--warning);
  color: #fde68a;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.tm-node.missile .tm-group-badge {
  border-color: var(--danger);
  color: #fecaca;
}

/* Clean Label Pill — Shown ONLY when target is selected (→ Город) */
.tm-sel-pill {
  position: absolute;
  left: 34px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--warning);
  color: #090d15;
  border: 1px solid #ffffff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.48);
}
.tm-node.missile .tm-sel-pill {
  background: var(--danger);
  color: #ffffff;
}

/* Intercepted marker */
.tm-intercepted-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.2);
  border: 1.5px solid var(--fading);
  color: #ede9fe;
  display: grid;
  place-items: center;
  font-size: 12px;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.55);
}

/* Map Radar Ripple Ping on New Target Arrival (keeps MapLibre absolute anchoring) */
.radar-alert-ping {
  width: 160px;
  height: 160px;
  pointer-events: none;
}
.radar-alert-ping .rap-wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.2px solid rgba(245, 158, 11, 0.85);
  opacity: 0;
  animation: rapExpand 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.radar-alert-ping.kind-missile .rap-wave {
  border-color: rgba(239, 68, 68, 0.9);
}
.radar-alert-ping .rap-wave:nth-child(2) { animation-delay: 0.34s; }
.radar-alert-ping .rap-wave:nth-child(3) { animation-delay: 0.68s; }
.radar-alert-ping .rap-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(245, 158, 11, 0.32);
  animation: rapCoreFade 1.4s ease-out forwards;
}
.radar-alert-ping.kind-missile .rap-core { background: rgba(239, 68, 68, 0.38); }

@keyframes rapExpand {
  0% { transform: scale(0.12); opacity: 0.85; border-width: 2.4px; }
  100% { transform: scale(1); opacity: 0; border-width: 1px; }
}
@keyframes rapCoreFade {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}

/* =====================================================================
   DESKTOP LEFT SIDEBAR — Tactical C2 style, docked & gently rounded
   ===================================================================== */
.sidebar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sb-w);
  background: var(--bg-panel);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--border);
  border-radius: 0 12px 12px 0;
  box-shadow: 6px 0 28px rgba(2, 6, 23, 0.42);
  z-index: 25;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.24s var(--ease);
}
.sidebar.collapsed { transform: translateX(calc(-100% - 4px)); pointer-events: none; }

.sb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 52px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.85), var(--bg-panel-solid));
  flex-shrink: 0;
}
[data-theme="light"] .sb-head { background: var(--bg-panel-solid); }

.brand-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo-box {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.42);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.brand-logo-box.mini { width: 24px; height: 24px; border-radius: 7px; }
[data-theme="light"] .brand-logo-box { background: #0f172a; border-color: rgba(2, 132, 199, 0.45); }

.brand-text-col { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.1; }
.brand-title-line { display: flex; align-items: center; gap: 6px; }
.brand-name {
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-primary);
}

.beta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.42);
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.beta-pill:hover { background: rgba(245, 158, 11, 0.24); border-color: rgba(245, 158, 11, 0.68); }
.beta-pill:active { transform: scale(0.95); }
.beta-pill.mini { font-size: 8.5px; padding: 1.5px 5px; border-radius: 4px; }
.beta-pill.lg { font-size: 10px; padding: 3px 8px; border-radius: 6px; cursor: default; }
[data-theme="light"] .beta-pill {
  color: #b45309;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(217, 119, 6, 0.45);
}
.brand-caption {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--bg-panel-2);
  transition: all 0.14s;
}
.icon-btn:hover { color: var(--text-primary); border-color: var(--border-strong); background: var(--bg-hover); }

.sidebar-reopen {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 24;
  display: none;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  background: var(--bg-panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  font-weight: 600;
  font-size: 12.5px;
}
.sidebar-reopen.visible { display: inline-flex; }

.sb-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel-solid);
  flex-shrink: 0;
}
.sb-tab {
  padding: 9px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all 0.14s;
  text-align: center;
  white-space: nowrap;
}
.sb-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.sb-tab.active { color: var(--text-primary); border-bottom-color: var(--accent); background: var(--bg-panel-2); }

.sb-toolbar {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.search-input {
  flex: 1 1 0;
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-size: 12px;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent); outline: none; }

.filter-group { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.filter-pill {
  height: 30px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-panel-2);
  transition: all 0.14s;
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-pill:hover { color: var(--text-primary); border-color: var(--border-strong); }
.filter-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.sb-list { flex: 1; min-height: 0; overflow-y: auto; }

/* Zero-Threat "Небо чисто" Empty State Placeholder */
.empty-state-box {
  padding: 34px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}
.empty-state-ico {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--ok-bg);
  border: 1px solid rgba(34, 197, 94, 0.34);
  color: var(--ok);
  margin-bottom: 2px;
}
.empty-state-ico.neutral {
  background: var(--bg-panel-2);
  border-color: var(--border);
  color: var(--text-muted);
}
.empty-state-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.empty-state-sub {
  font-size: 11.5px;
  line-height: 1.48;
  color: var(--text-secondary);
  max-width: 230px;
}

.track-row {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s;
}
.track-row:hover { background: var(--bg-hover); }
.track-row.selected { background: var(--bg-panel-2); border-left-color: var(--accent); }
.track-row.type-missile { border-left-color: var(--danger); }
.track-row.selected.type-missile { background: var(--danger-bg); }
.track-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.track-id { font-size: 11.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; min-width: 0; }
.badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--r-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.badge.missile { background: var(--danger); color: #fff; }
.badge.drone { background: var(--warning); color: #090d15; }
.badge.intercepted { background: var(--fading); color: #090d15; }
.track-eta { font-size: 11px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.track-route { font-size: 12px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); }

.region-row {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.region-row:hover { background: var(--bg-hover); }
.sev-dot { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
.sev-DANGER { background: var(--danger); }
.sev-WARNING { background: var(--warning); }
.sev-ATTENTION { background: #eab308; }
.sev-FADING { background: var(--fading); }

.feed-row { padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.feed-row:hover { background: var(--bg-hover); }
.feed-head { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; color: var(--text-muted); margin-bottom: 4px; }
.feed-text { font-size: 12px; line-height: 1.45; color: var(--text-primary); word-break: break-word; }

/* =====================================================================
   APPROVED THREAT STATUS & FILTER ISLAND (TOP-LEFT OF MAP)
   ===================================================================== */
.threat-island {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 38px;
  padding: 3px 5px;
  pointer-events: auto;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--surface-glass);
  backdrop-filter: blur(22px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.threat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.36);
  color: #fca5a5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  user-select: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
[data-theme="light"] .threat-badge { color: #b91c1c; border-color: rgba(220, 38, 38, 0.32); }

.threat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.85);
  animation: dangerDotPing 1.6s infinite;
}
@keyframes dangerDotPing {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Approved "Небо чисто" Zero-Threat State */
.threat-badge.clear {
  background: var(--ok-bg);
  border-color: rgba(34, 197, 94, 0.38);
  color: #86efac;
}
[data-theme="light"] .threat-badge.clear {
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.34);
}
.threat-badge.clear .threat-status-dot {
  background: var(--ok);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
  animation: none;
}

.is-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.14s;
  white-space: nowrap;
}
.is-btn:hover { background: var(--surface-2); color: var(--text-primary); }
.is-btn.active {
  background: var(--accent-soft);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.42);
}
.is-btn.k-missile.active {
  background: var(--danger-bg);
  color: #fecaca;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.46);
}
.is-btn.k-drone.active {
  background: var(--warning-bg);
  color: #fde68a;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.46);
}
[data-theme="light"] .is-btn.k-missile.active { color: #991b1b; }
[data-theme="light"] .is-btn.k-drone.active { color: #92400e; }
.is-count { font-size: 12.5px; font-weight: 800; }

/* =====================================================================
   APPROVED EVENT NOTIFICATION: SLIM TOP FLOATING GLASS TOAST
   ===================================================================== */
.alert-top-toast {
  position: absolute;
  top: 60px;
  left: calc(50% + 150px);
  transform: translate(-50%, -14px) scale(0.97);
  z-index: 34;
  width: min(410px, calc(100% - 340px));
  background: var(--surface-glass);
  backdrop-filter: blur(22px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.28s var(--ease), left 0.26s var(--ease);
}
.alert-top-toast.sb-off { left: 50%; width: min(410px, calc(100% - 28px)); }
.alert-top-toast.open { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
.att-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 13px;
  position: relative;
}
.att-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--warning);
}
.alert-top-toast.kind-missile .att-bar { background: var(--danger); }
.alert-top-toast.kind-info .att-bar { background: var(--accent); }
.att-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--warning-bg);
  color: var(--warning);
}
.alert-top-toast.kind-missile .att-ico { background: var(--danger-bg); color: var(--danger); }
.alert-top-toast.kind-info .att-ico { background: var(--accent-soft); color: var(--accent); }
.att-copy { flex: 1; min-width: 0; }
.att-title { font-size: 12px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-sub { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.att-go {
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent);
  flex-shrink: 0;
  transition: all 0.14s;
}
.att-go:hover { border-color: var(--accent); background: var(--accent-soft); }
.att-close {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 12px;
}
.att-close:hover { background: var(--surface-2); color: var(--text-primary); }
.att-progress { height: 2px; width: 100%; background: rgba(148, 163, 184, 0.12); }
.att-progress-fill {
  height: 100%;
  width: 100%;
  transform-origin: left;
  background: var(--warning);
}
.alert-top-toast.kind-missile .att-progress-fill { background: var(--danger); }
.alert-top-toast.kind-info .att-progress-fill { background: var(--accent); }
.alert-top-toast.open .att-progress-fill { animation: toastDrain 5.5s linear forwards; }
@keyframes toastDrain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* =====================================================================
   TOP HUD BAR (TOP-RIGHT DIGITAL CLOCK + ROUND LAYERS BUTTON)
   ===================================================================== */
.top-hud-bar {
  position: absolute;
  top: 12px;
  left: 314px;
  right: 14px;
  z-index: 23;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
  transition: left 0.24s var(--ease);
}
.top-hud-bar.sb-off { left: 236px; }

.top-right-group {
  pointer-events: auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-clock-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.clock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.75);
}
.stage.history-mode .clock-dot { background: var(--warning); box-shadow: 0 0 8px rgba(245, 158, 11, 0.75); }
.top-clock-time { font-size: 14px; font-weight: 700; letter-spacing: 0.03em; color: var(--text-primary); }
.top-clock-tz {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
}
.stage.history-mode .top-clock-tz { background: var(--warning-bg); color: var(--warning); }

.layers-fab {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  color: var(--text-primary);
  transition: all 0.16s var(--ease);
}
.layers-fab:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.layers-fab.active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25), var(--shadow-md);
}

/* Desktop Map Settings & Sound Popover */
.desk-layers-pop {
  position: absolute;
  top: 58px;
  right: 14px;
  width: 278px;
  z-index: 36;
  background: var(--surface-glass);
  backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 13px;
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: popIn 0.16s var(--ease);
}
.desk-layers-pop.open { display: flex; }
@keyframes popIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.mlp-head-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mlp-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 6px; }
.mlp-head-row .mlp-label { margin-bottom: 0; }
.mlp-divider { height: 1px; background: var(--border); margin: 0 -2px; }
.mlp-seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; background: var(--bg-panel-2); border: 1px solid var(--border); padding: 3px; border-radius: var(--r-md); }
.mlp-seg button { padding: 6px 4px; border-radius: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-secondary); transition: all 0.14s; }
.mlp-seg button:hover { color: var(--text-primary); }
.mlp-seg button.active { background: var(--accent); color: #04101d; }
[data-theme="light"] .mlp-seg button.active { color: #ffffff; }
.mlp-checks { display: flex; gap: 6px; flex-wrap: wrap; }
.mlp-chip {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.14s;
}
.mlp-chip:hover { color: var(--text-primary); border-color: var(--border-strong); }
.mlp-chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* Sound Settings Block inside Map Settings Popover */
.snd-switch {
  position: relative;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-strong);
  transition: background 0.18s, border-color 0.18s;
  flex-shrink: 0;
}
.snd-switch::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.18s var(--ease), background 0.18s;
}
.snd-switch.on { background: var(--accent-soft); border-color: var(--accent); }
.snd-switch.on::after { transform: translateX(15px); background: var(--accent); }

.snd-controls { display: flex; flex-direction: column; gap: 8px; transition: opacity 0.18s; }
.snd-controls.muted { opacity: 0.42; }
.snd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; }
.snd-preset-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.14s;
}
.snd-preset-btn:hover { border-color: var(--border-strong); color: var(--text-primary); }
.snd-preset-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.snd-play-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(148, 163, 184, 0.12);
  color: currentColor;
  flex-shrink: 0;
}
.snd-preset-btn.active .snd-play-dot { background: rgba(56, 189, 248, 0.22); }

.vol-row { display: flex; align-items: center; gap: 8px; }
.vol-ico { color: var(--text-secondary); flex-shrink: 0; display: grid; place-items: center; }
.vol-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.26);
  outline: none;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-panel-solid);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28);
}
.vol-val { font-size: 11px; font-weight: 600; color: var(--text-secondary); min-width: 32px; text-align: right; }

/* Zoom Stack — Right Middle (Desktop & Mobile) */
.zoom-stack {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 22;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: top 0.24s var(--ease);
}
.zoom-btn {
  width: 36px;
  height: 35px;
  display: grid;
  place-items: center;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  transition: background 0.14s, color 0.14s;
}
.zoom-btn:last-child { border-bottom: none; }
.zoom-btn:hover { background: var(--surface-hover); color: var(--accent); }
.zoom-btn:active { background: var(--surface-2); }
.zoom-btn.active { color: #38bdf8; background: rgba(56, 189, 248, 0.14); }
.zoom-btn.locating { color: #38bdf8; }
.zoom-btn.locating svg { animation: geoLocPulse 0.9s ease-in-out infinite; }
@keyframes geoLocPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.84); opacity: 0.55; }
}

.user-loc-marker {
  position: relative;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.user-loc-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.34);
  animation: userLocRing 2.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.user-loc-dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.85);
}
@keyframes userLocRing {
  0% { transform: scale(0.55); opacity: 0.85; }
  100% { transform: scale(2.15); opacity: 0; }
}

.map-status-toast {
  position: absolute;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  transform: translate3d(-50%, 12px, 0);
  z-index: 42;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.map-status-toast.visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}
.map-status-toast.error {
  border-color: rgba(239, 68, 68, 0.55);
  color: #fca5a5;
}
[data-theme="light"] .map-status-toast.error { color: #b91c1c; }

.hover-tip {
  position: absolute;
  pointer-events: none;
  z-index: 35;
  padding: 6px 10px;
  border-radius: var(--r-md);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  font-size: 11.5px;
  white-space: nowrap;
  display: none;
  transform: translate(14px, -50%);
}
.hover-tip.visible { display: flex; align-items: center; gap: 7px; }

/* =====================================================================
   FINAL APPROVED GLASS DOCK (ВИТРИНА → 3 КОЛОНКИ + PURE LIVE + TIMELINE)
   ===================================================================== */
.dock-arena {
  position: absolute;
  left: calc(50% + 150px);
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 28;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 324px);
  transition: left 0.24s var(--ease);
}
.dock-arena.sb-off { left: 50%; max-width: calc(100vw - 32px); }

.summary-shell {
  overflow: hidden;
  background: var(--surface-glass);
  backdrop-filter: blur(22px) saturate(135%);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    width 0.30s var(--ease),
    opacity 0.20s ease,
    margin-right 0.26s var(--ease),
    transform 0.26s var(--ease),
    border-color 0.22s ease;
  will-change: width, opacity, transform;
}
.dock-arena.sev-missile .summary-shell { border-color: rgba(239, 68, 68, 0.42); }

.live-shell {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  transition:
    width 0.28s var(--ease),
    height 0.24s var(--ease),
    border-radius 0.24s var(--ease),
    opacity 0.18s ease,
    transform 0.24s var(--ease),
    background-color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
  will-change: width, height, opacity, transform;
}
.live-pill-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.14s ease 0.10s;
}
.red-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.85);
  animation: livePing 1.6s infinite;
}
@keyframes livePing {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.85); }
  70% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.timeline-inner {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: calc(100vw - 344px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  white-space: nowrap;
  flex-wrap: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.07s ease;
}
.dock-arena.sb-off .timeline-inner { width: calc(100vw - 44px); }
.dock-arena[data-state="timeline"] .live-pill-btn { opacity: 0; pointer-events: none; transition: opacity 0.07s ease; }
.dock-arena[data-state="timeline"] .timeline-inner { opacity: 1; pointer-events: auto; transition: opacity 0.16s ease 0.10s; }

.tl-play-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent);
  color: #04101d;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
[data-theme="light"] .tl-play-btn { color: #ffffff; }
.tl-speed-btn {
  padding: 4px 7px;
  border-radius: var(--r-sm);
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.tl-speed-btn:hover { color: var(--text-primary); }
.tl-current-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
}
.tl-track-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tl-slider-row { position: relative; display: flex; align-items: center; height: 18px; }
.tl-range { width: 100%; accent-color: var(--danger); cursor: pointer; position: relative; z-index: 2; }
.tl-events { position: absolute; left: 6px; right: 6px; top: 50%; transform: translateY(-50%); height: 6px; pointer-events: none; z-index: 1; }
.tl-ev-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--surface-solid); }
.tl-ticks { position: relative; height: 15px; font-size: 9.5px; color: var(--text-muted); user-select: none; }
.tl-tick-mark {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  white-space: nowrap;
  line-height: 1;
}
.tl-tick-mark::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -4px;
  width: 1px;
  height: 3px;
  background: var(--border-strong);
}
.tl-tick-mark.is-midnight {
  color: var(--text-secondary);
  font-weight: 700;
}
.tl-tick-mark.is-midnight::before {
  background: var(--accent);
  height: 4px;
}
.tl-history-stat { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }
.tl-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  flex-shrink: 0;
}
.tl-live-pill.stale { background: var(--bg-panel-2); color: var(--text-secondary); border: 1px solid var(--border); }
.tl-live-pill.stale:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* 4 Dock States */
.dock-arena[data-state="idle"] .summary-shell {
  width: 0;
  height: 0;
  opacity: 0;
  border-width: 0;
  margin-right: 0;
  pointer-events: none;
  transform: translateY(8px);
}
.dock-arena[data-state="idle"] .live-shell {
  width: 92px;
  height: 42px;
  border-radius: 999px;
  background-color: #dc2626;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 26px rgba(239, 68, 68, 0.44);
}
.dock-arena[data-state="idle"] .live-shell:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(239, 68, 68, 0.58); }

.dock-arena.history-active[data-state="idle"] .live-shell,
.dock-arena.history-active[data-state="compact"] .live-shell {
  background-color: var(--surface-solid);
  border-color: var(--warning);
  box-shadow: var(--shadow-md);
}
.dock-arena.history-active .live-pill-btn { color: var(--warning); }
.dock-arena.history-active .red-pulse-dot { background: var(--warning); animation: none; }

.dock-arena[data-state="timeline"] .summary-shell {
  width: 0;
  height: 0;
  opacity: 0;
  border-width: 0;
  margin-right: 0;
  pointer-events: none;
}
.dock-arena[data-state="timeline"] .live-shell {
  width: calc(100vw - 344px);
  height: 52px;
  border-radius: 999px;
  background-color: var(--surface-glass);
  backdrop-filter: blur(22px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-lg);
}
.dock-arena.sb-off[data-state="timeline"] .live-shell { width: calc(100vw - 44px); }

.dock-arena[data-state="compact"] .summary-shell {
  width: min(684px, calc(100vw - 434px));
  opacity: 1;
  margin-right: 10px;
}
.dock-arena.sb-off[data-state="compact"] .summary-shell {
  width: min(720px, calc(100vw - 140px));
}
.dock-arena[data-state="compact"] .live-shell {
  width: 86px;
  height: 42px;
  border-radius: 999px;
  background-color: #dc2626;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.40);
}
.dock-arena[data-state="compact"] .live-shell:hover { transform: translateY(-2px); }

.dock-arena[data-state="expanded"] .summary-shell {
  width: min(860px, calc(100vw - 328px));
  opacity: 1;
  margin-right: 0;
  border-color: rgba(56, 189, 248, 0.42);
}
.dock-arena.sb-off[data-state="expanded"] .summary-shell { width: min(900px, calc(100vw - 48px)); }
.dock-arena[data-state="expanded"] .live-shell {
  width: 0;
  height: 42px;
  opacity: 0;
  border-width: 0;
  margin: 0;
  pointer-events: none;
  transform: scale(0.86);
}

/* Summary Showcase & 3-Column Expanded Content */
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.sum-inner { padding: 12px 15px; display: flex; flex-direction: column; gap: 10px; }
.sum-expanded-wrap { animation: fadeUp 0.22s var(--ease); display: flex; flex-direction: column; gap: 11px; }
.sum-expanded-wrap.no-anim { animation: none; }

.sum-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sum-id-group { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: nowrap; }
.sum-title { font-size: 14px; font-weight: 800; white-space: nowrap; }
.sum-sub { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.26);
}
.status-chip.danger { background: var(--danger-bg); color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
.status-chip.ok { background: var(--ok-bg); color: #86efac; border-color: rgba(34, 197, 94, 0.35); }
[data-theme="light"] .status-chip.danger { color: #b91c1c; border-color: rgba(220, 38, 38, 0.32); }
[data-theme="light"] .status-chip.ok { color: #15803d; border-color: rgba(22, 163, 74, 0.34); }
.sum-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.more-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border-radius: 7px;
  background: var(--accent);
  color: #04101d;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: filter 0.14s;
}
.more-btn:hover { filter: brightness(1.08); }
[data-theme="light"] .more-btn:not(.secondary) { color: #ffffff; }
.more-btn.secondary { background: var(--bg-panel-2); color: var(--accent); border: 1px solid var(--border-strong); }

.c-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 13px;
  border-radius: var(--r-md);
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
}
.c-route-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 auto; }
.c-route-txt { font-size: 12.5px; font-weight: 600; line-height: 1.3; white-space: normal; word-break: break-word; }
.c-route-arrow { color: var(--accent); margin: 0 4px; font-weight: 700; }
.c-mini-prog { height: 3px; width: 100%; background: var(--border); border-radius: 99px; overflow: hidden; }
.c-mini-prog-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--warning)); border-radius: 99px; transition: width 0.4s ease; }
.c-metrics {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  flex-shrink: 0;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}
.c-met {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 0 10px;
  border-right: 1px solid var(--border-soft);
  line-height: 1.15;
}
.c-met:first-child { padding-left: 0; }
.c-met:last-child { padding-right: 0; border-right: none; }
.c-met-k { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.c-met-v { font-size: 12px; font-weight: 700; white-space: nowrap; }

.hero-route {
  display: grid;
  grid-template-columns: 1fr 190px 1fr;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
}
.route-end { min-width: 0; }
.route-end.right { text-align: right; }
.route-k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.route-v { font-size: 13px; font-weight: 700; margin-top: 2px; line-height: 1.3; white-space: normal; word-break: break-word; }
.route-v.clickable { cursor: pointer; }
.route-v.clickable:hover { color: var(--accent); }
.route-mid { text-align: center; }
.route-prog { height: 5px; background: var(--border); border-radius: 99px; overflow: hidden; margin: 5px 0 4px; }
.route-prog-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--warning)); border-radius: 99px; transition: width 0.4s ease; }

.exp-cols-3 { display: grid; grid-template-columns: 1.05fr 1fr 1.15fr; gap: 11px; align-items: stretch; }
.kpi-grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.kpi-tile { padding: 8px 10px; border-radius: var(--r-md); background: var(--bg-panel-2); border: 1px solid var(--border); }
.kpi-k { font-size: 10px; color: var(--text-muted); margin-bottom: 2px; }
.kpi-v { font-size: 13px; font-weight: 700; }

.sub-card {
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.sub-cap {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.prob-item { cursor: pointer; padding: 3px 4px; margin: 0 -4px 4px; border-radius: 6px; transition: background 0.14s; }
.prob-item:hover { background: var(--bg-hover); }
.prob-item:last-of-type { margin-bottom: 0; }
.prob-line { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 4px; }
.prob-bg { height: 5px; background: var(--border); border-radius: 99px; overflow: hidden; }
.prob-fg { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--warning)); }

.tl-scroll { max-height: 185px; overflow-y: auto; padding-right: 4px; }
.tl-row {
  position: relative;
  display: flex;
  gap: 10px;
  font-size: 11.5px;
  line-height: 1.42;
  padding: 0 0 9px 14px;
  border-left: 1px solid var(--border-strong);
  margin-left: 5px;
}
.tl-row::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--bg-panel-2);
}
.tl-row:first-child::before { background: var(--danger); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22); }
.tl-row:last-child { border-left-color: transparent; padding-bottom: 0; }

/* =====================================================================
   MOBILE-ONLY INTERFACE (<= 760px)
   ===================================================================== */
.mobile-topbar,
.mobile-layers-pop,
.mobile-nav-dock,
.mobile-sheet-backdrop,
.mobile-target-scrim,
.mobile-sheet,
.mobile-timeline-bar {
  display: none;
}

/* =====================================================================
   BETA & LEGAL DISCLAIMER MODAL
   ===================================================================== */
.disclaimer-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 16px)) 16px max(16px, env(safe-area-inset-bottom, 16px));
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.disclaimer-overlay.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.disclaimer-card {
  width: 100%;
  max-width: 500px;
  max-height: min(86vh, 660px);
  max-height: min(86dvh, 660px);
  display: flex;
  flex-direction: column;
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(245, 158, 11, 0.14);
  overflow: hidden;
  transform: translate3d(0, 14px, 0) scale(0.97);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.disclaimer-overlay.open .disclaimer-card {
  transform: translate3d(0, 0, 0) scale(1);
}
.disclaimer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), transparent);
  flex-shrink: 0;
}
.disclaimer-head-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}
.disclaimer-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
}
.disclaimer-overlay.mandatory .disclaimer-close {
  display: none;
}
.disclaimer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.disclaimer-warn-box {
  padding: 11px 13px;
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.11);
  border: 1px solid rgba(245, 158, 11, 0.36);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
[data-theme="light"] .disclaimer-warn-box {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(217, 119, 6, 0.42);
}
.disclaimer-warn-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fbbf24;
}
[data-theme="light"] .disclaimer-warn-title { color: #b45309; }
.disclaimer-warn-box p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.48;
  color: var(--text-primary);
}
.disclaimer-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.disclaimer-list li b { color: var(--text-primary); }
.disclaimer-foot {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-panel-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.disclaimer-accept-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.32);
  transition: filter 0.15s ease, transform 0.12s ease;
}
.disclaimer-accept-btn:hover { filter: brightness(1.08); }
.disclaimer-accept-btn:active { transform: scale(0.985); }
.disclaimer-foot-note {
  font-size: 11px;
  line-height: 1.38;
  text-align: center;
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .sidebar,
  .sidebar-reopen,
  .top-hud-bar,
  .threat-island,
  .desk-layers-pop,
  .dock-arena,
  .hover-tip {
    display: none !important;
  }

  .zoom-stack {
    right: 10px;
    top: 47%;
    border-radius: 12px;
  }
  .zoom-stack.mob-up { top: 28%; }
  .zoom-btn { width: 38px; height: 38px; }

  /* Mobile positioning for approved top toast */
  .alert-top-toast,
  .alert-top-toast.sb-off {
    top: 56px;
    left: 50%;
    width: calc(100% - 20px);
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 30;
    pointer-events: none;
  }
  .mob-pill {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-md);
    contain: layout style;
  }
  .mob-sep {
    width: 1px;
    height: 13px;
    background: var(--border-strong);
  }
  .mob-clear-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    color: #86efac;
  }
  [data-theme="light"] .mob-clear-tag { color: #15803d; }
  .mob-count { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
  .mob-dot { width: 7px; height: 7px; border-radius: 50%; }
  .mob-right-group { display: flex; align-items: center; gap: 6px; pointer-events: auto; }
  .mob-live-btn {
    height: 38px;
    padding: 0 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.42);
  }
  .stage.history-mode .mob-live-btn {
    background: var(--surface-solid);
    color: var(--warning);
    border: 1px solid var(--warning);
    box-shadow: var(--shadow-md);
  }
  .stage.history-mode .mob-live-btn .red-pulse-dot {
    background: var(--warning);
    animation: none;
  }
  .mob-layers-btn {
    height: 38px;
    width: 38px;
    border-radius: 50%;
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid var(--border-strong);
    box-shadow: var(--shadow-md);
    display: grid;
    place-items: center;
  }
  .mob-layers-btn.active { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25); }

  .mobile-timeline-bar {
    position: absolute;
    top: 56px;
    left: 10px;
    right: 10px;
    z-index: 31;
    background: var(--surface-solid);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    gap: 8px;
  }
  .mobile-timeline-bar.open { display: flex; }

  .mobile-layers-pop {
    position: absolute;
    top: 56px;
    right: 10px;
    width: 274px;
    z-index: 36;
    background: var(--surface-solid);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: 13px;
    flex-direction: column;
    gap: 11px;
  }
  .mobile-layers-pop.open { display: flex; }

  .mobile-nav-dock {
    display: flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 28;
    padding: 7px;
    border-radius: 16px;
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
    transform: translate3d(0, 0, 0);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
    will-change: transform, opacity;
  }
  .mobile-nav-dock.hidden { transform: translate3d(0, 125%, 0); opacity: 0; pointer-events: none; }
  .mobile-nav-dock.dragging-sync { transition: none !important; }
  .mnav-btn {
    flex: 1;
    height: 54px;
    border-radius: 11px;
    padding: 0 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: background 0.14s, color 0.14s;
  }
  .mnav-btn:active { background: var(--surface-2); }
  .mnav-btn.active { background: var(--accent-soft); color: var(--accent); }

  .mobile-sheet-backdrop,
  .mobile-target-scrim {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.44);
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
    z-index: 32;
  }
  .mobile-target-scrim { z-index: 33; background: rgba(2, 6, 23, 0.50); }
  .mobile-sheet-backdrop.open { opacity: 1; pointer-events: auto; }

  .mobile-sheet {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    background: var(--bg-panel-solid);
    border-top: 1px solid var(--border-strong);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.55);
    transform: translate3d(0, 110%, 0);
    max-height: 74vh;
    max-height: 74dvh;
    overflow: hidden;
    will-change: transform;
    contain: layout style;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    pointer-events: none;
  }
  .mobile-sheet.open { pointer-events: auto; }
  .mobile-sheet.mob-target-sheet {
    max-height: 82vh;
    max-height: 82dvh;
  }

  .sheet-handle-area {
    padding: 12px 0 8px;
    display: flex;
    justify-content: center;
    cursor: grab;
    flex-shrink: 0;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }
  .sheet-handle-area:active { cursor: grabbing; }
  .sheet-handle {
    width: 42px;
    height: 4.5px;
    border-radius: 99px;
    background: var(--text-muted);
    opacity: 0.55;
    transform-origin: center;
    will-change: transform, opacity;
  }
  .sheet-head {
    padding: 2px 14px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }
  .sheet-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 10px 14px calc(20px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .mob-target-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    will-change: opacity;
  }
  .mob-target-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 2px;
    opacity: 0;
    transform: translate3d(0, 26px, 0);
    pointer-events: none;
    will-change: transform, opacity;
  }
  .mob-detail-card {
    flex-shrink: 0;
    will-change: transform, opacity;
  }
  .mob-seg-filter {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    flex-shrink: 0;
    padding: 3px;
    background: var(--bg-panel-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
  }
  .mob-seg-btn {
    padding: 6px 4px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .mob-seg-btn.active { background: var(--accent); color: #04101d; }
  [data-theme="light"] .mob-seg-btn.active { color: #ffffff; }
  .mob-card {
    position: relative;
    padding: 10px 12px 10px 14px;
    border-radius: var(--r-md);
    background: var(--bg-panel-2);
    border: 1px solid var(--border);
    flex-shrink: 0;
    cursor: pointer;
  }
  .mob-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--warning);
  }
  .mob-card.type-missile::before, .mob-card.sev-DANGER::before { background: var(--danger); }
  .mob-card.sev-WARNING::before { background: #f97316; }
  .mob-card.sev-ATTENTION::before { background: #eab308; }
  .mob-card.sev-FADING::before { background: var(--fading); }
  .mob-route-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px 12px;
    border-radius: var(--r-md);
    background: var(--bg-panel-2);
    border: 1px solid var(--border);
  }
  .mob-route-ends { display: grid; grid-template-columns: minmax(105px, auto) 1fr; gap: 12px; align-items: start; }
  .mob-route-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10.5px; color: var(--text-muted); }
  .kpi-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; flex-shrink: 0; }
  .expand-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: var(--r-sm);
    flex-shrink: 0;
    background: var(--bg-panel-2);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    touch-action: none;
  }
  .mob-expand-prog {
    position: absolute;
    inset: 0;
    background: var(--accent-soft);
    transform-origin: left center;
    transform: scaleX(0);
    pointer-events: none;
    will-change: transform;
  }
  .mob-exp-lbls {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
  }
  .mob-exp-lbl-up,
  .mob-exp-lbl-down {
    grid-area: 1 / 1;
    white-space: nowrap;
    will-change: opacity;
  }
  .mob-exp-lbl-down { opacity: 0; }
  .mob-expand-chev {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
  }
}

/* ============================================================================
   AUTH GATE (VK ID / Яндекс ID) & ACCOUNT BAR (v12.0)
   ============================================================================ */
.maintenance-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: rgba(245, 158, 11, 0.94);
  color: #0b1120;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  padding: 6px 14px;
  letter-spacing: 0.01em;
}

.auth-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 10, 20, 0.78);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
.auth-gate-overlay.open {
  display: flex;
}
.auth-gate-card {
  width: 100%;
  max-width: 390px;
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 28px 24px 22px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-gate-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.auth-logo-lg {
  width: 54px;
  height: 54px;
  border-radius: 15px;
}
.auth-gate-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-gate-title-row h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}
.auth-gate-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.48;
  color: var(--text-secondary);
  max-width: 310px;
}
.auth-gate-error {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.38);
  color: #fca5a5;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: center;
}
.auth-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  min-height: 48px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
}
.auth-provider-btn:active {
  transform: scale(0.985);
}
.auth-provider-btn.auth-vk {
  background: #0077FF;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 119, 255, 0.30);
}
.auth-provider-btn.auth-vk:hover {
  filter: brightness(1.08);
}
.auth-provider-btn.auth-ya {
  background: #1b2436;
  color: #f8fafc;
  border: 1px solid rgba(252, 63, 29, 0.45);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}
[data-theme="light"] .auth-provider-btn.auth-ya {
  background: #111827;
  color: #ffffff;
}
.auth-provider-btn.auth-ya:hover {
  border-color: rgba(252, 63, 29, 0.8);
  filter: brightness(1.06);
}
.auth-ico {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.auth-ico-vk {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.auth-ico-ya {
  background: #FC3F1D;
  color: #ffffff;
  font-size: 13.5px;
}
.auth-gate-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.auth-gate-foot p {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
}
.auth-gate-foot a {
  font-size: 11.5px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.auth-gate-foot a:hover {
  text-decoration: underline;
}

.auth-account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.auth-account-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.auth-account-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-account-meta {
  font-size: 10.5px;
  color: var(--text-muted);
}
.auth-logout-btn {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #f87171;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.auth-logout-btn:hover {
  background: rgba(239, 68, 68, 0.24);
}
