/* Atlas • Додаткові функції карти (ідеї DeepStrike). Лише нові класи з префіксом .ds-; наявні стилі не змінюються. */
#mapContainer {
  --ds-bg: rgba(12, 15, 20, 0.94);
  --ds-bg2: #151a21;
  --ds-line: rgba(255, 255, 255, 0.09);
  --ds-text: #e6e7ea;
  --ds-muted: #8a8f99;
  --ds-accent: #ff5b1f;
  --ds-accent-soft: #ffb347;
  --ds-ok: #6ee7b7;
  --ds-top: 130px;
}
.ds-bar, .ds-rail, .ds-drawer, .ds-legend { font-family: Inter, "Segoe UI", Arial, sans-serif; color: var(--ds-text); }
.ds-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; }
.ds-muted { color: var(--ds-muted); font-size: 11px; }
.ds-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; box-shadow: 0 0 6px currentColor; }

/* ---- верхня панель ---- */
.ds-bar { position: absolute; top: 70px; left: 16px; right: 16px; z-index: 985; display: flex; align-items: flex-start; gap: 10px; pointer-events: none; flex-wrap: wrap; }
.ds-bar > * { pointer-events: auto; }
.ds-pill { display: flex; align-items: center; gap: 2px; background: var(--ds-bg); border: 1px solid var(--ds-line); border-radius: 12px; padding: 4px 6px; box-shadow: 0 8px 28px rgba(0,0,0,.35); backdrop-filter: blur(10px); }
.ds-pill-icon { color: var(--ds-muted); padding: 0 4px; display: inline-flex; align-items: center; }
.ds-pill-btn { background: transparent !important; border: 0 !important; color: var(--ds-text) !important; font-size: 12px !important; padding: 5px 9px !important; min-height: 30px !important; border-radius: 8px !important; cursor: pointer; white-space: nowrap; font-weight: 500; }
.ds-pill-btn:hover { background: rgba(255,255,255,.06) !important; filter: none; }
.ds-pill-btn.is-active { color: var(--ds-accent-soft) !important; background: rgba(255, 91, 31, .12) !important; }
.ds-icon-btn { font-size: 15px !important; padding: 4px 8px !important; }
.ds-sep { width: 1px; height: 18px; background: var(--ds-line); margin: 0 2px; }
.ds-count { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--ds-muted); padding: 0 6px; white-space: nowrap; }
.ds-dd { position: relative; }
.ds-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; max-height: 60vh; overflow: auto; background: #0e1116; border: 1px solid var(--ds-line); border-radius: 12px; padding: 8px; box-shadow: 0 18px 50px rgba(0,0,0,.6); z-index: 1200; }
.ds-menu[hidden] { display: none; }
.ds-menu-title { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ds-muted); padding: 4px 6px 6px; }
.ds-menu-sep { height: 1px; background: var(--ds-line); margin: 6px 0; }
.ds-menu-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 6px 4px 2px; border-top: 1px solid var(--ds-line); margin-top: 4px; }
.ds-check { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; font-size: 12px; cursor: pointer; }
.ds-check:hover { background: rgba(255,255,255,.05); }
.ds-check input { width: 15px !important; height: 15px !important; min-height: 0 !important; accent-color: var(--ds-accent); margin: 0; }
.ds-check-label { flex: 1; }
.ds-check em { font-style: normal; color: var(--ds-muted); font-family: 'JetBrains Mono', monospace; font-size: 10.5px; }
.ds-opt { display: block; width: 100%; text-align: left; background: transparent !important; border: 0 !important; color: var(--ds-text) !important; font-size: 12px; padding: 7px 8px !important; min-height: 0 !important; border-radius: 8px !important; cursor: pointer; }
.ds-opt:hover { background: rgba(255,255,255,.05) !important; }
.ds-opt.is-active { background: rgba(255, 91, 31, .16) !important; color: var(--ds-accent-soft) !important; }
.ds-date { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--ds-muted); padding: 3px 6px; }
.ds-date input { width: 150px !important; min-height: 32px !important; padding: 4px 8px !important; font-size: 12px !important; color-scheme: dark; }
.ds-apply { width: 100%; margin-top: 6px; background: var(--ds-accent) !important; color: #fff !important; border: 0 !important; border-radius: 8px !important; padding: 7px !important; min-height: 32px !important; font-weight: 600; cursor: pointer; font-size: 12px; }
.ds-link { background: none !important; border: 0 !important; color: var(--ds-accent-soft) !important; font-size: 11.5px; cursor: pointer; padding: 2px 4px !important; min-height: 0 !important; }

.ds-search { position: relative; display: flex; align-items: center; gap: 6px; background: var(--ds-bg); border: 1px solid var(--ds-line); border-radius: 12px; padding: 0 10px; min-width: 240px; flex: 0 1 340px; box-shadow: 0 8px 28px rgba(0,0,0,.35); backdrop-filter: blur(10px); }
.ds-search > span { font-size: 12px; opacity: .7; }
.ds-search input { background: transparent !important; border: 0 !important; min-height: 38px !important; padding: 6px 2px !important; font-size: 12.5px !important; width: 100%; }
.ds-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #0e1116; border: 1px solid var(--ds-line); border-radius: 12px; padding: 6px; box-shadow: 0 18px 50px rgba(0,0,0,.6); max-height: 55vh; overflow: auto; z-index: 1200; }
.ds-results[hidden] { display: none; }
.ds-result { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: transparent !important; border: 0 !important; color: var(--ds-text) !important; padding: 7px 8px !important; min-height: 0 !important; border-radius: 8px !important; cursor: pointer; }
.ds-result:hover, .ds-result.is-active { background: rgba(255,255,255,.06) !important; }
.ds-result-main { flex: 1; min-width: 0; }
.ds-result-main b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-result-main small { display: block; font-size: 10.5px; color: var(--ds-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-result em { font-style: normal; color: #ef4444; font-weight: 700; font-size: 11px; }
.ds-empty { color: var(--ds-muted); font-size: 12px; text-align: center; padding: 16px 8px; }
.ds-tools { margin-left: auto; }

/* ---- стрічка «Останні удари» ---- */
.ds-rail { position: absolute; right: 16px; top: var(--ds-top); bottom: 128px; width: 300px; z-index: 995; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.ds-rail > * { pointer-events: auto; }
.ds-rail.is-collapsed, #mapContainer.ds-drawer-open .ds-rail { display: none; }
.ds-rail-head { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #cfd3da; background: var(--ds-bg); border: 1px solid var(--ds-line); border-radius: 10px; padding: 6px 10px; }
.ds-rail-list { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; min-height: 0; }
.ds-card { display: block; flex-shrink: 0; width: 100%; text-align: left; background: var(--ds-bg) !important; border: 1px solid var(--ds-line) !important; border-radius: 12px !important; padding: 10px 12px !important; min-height: 0 !important; color: var(--ds-text) !important; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.ds-card:hover { border-color: rgba(255, 138, 61, .55) !important; filter: none; }
.ds-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.ds-card-mid { display: flex; gap: 10px; align-items: center; }
.ds-card-mid b { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ds-card-mid small { display: block; font-size: 10.5px; color: var(--ds-muted); margin-top: 2px; }
.ds-card-bot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--ds-line); }
.ds-kind { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; border: 1px solid; background: rgba(255, 91, 31, .08); font-size: 16px; }
.ds-kind.big { flex-basis: 42px; width: 42px; height: 42px; font-size: 20px; }
.ds-seg { display: inline-flex; gap: 3px; }
.ds-seg i { width: 12px; height: 4px; border-radius: 2px; background: #3a3f48; }
.ds-seg i.on { background: var(--ds-accent-soft); }
.ds-seg i.hot { background: var(--ds-accent); }
.ds-ok, .ds-warn { font-size: 9.5px; letter-spacing: .06em; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.ds-ok { color: var(--ds-ok); background: rgba(16, 185, 129, .1); border: 1px solid rgba(110, 231, 183, .35); }
.ds-warn { color: #fcd34d; background: rgba(234, 179, 8, .1); border: 1px solid rgba(252, 211, 77, .35); }

/* ---- картка об'єкта ---- */
.ds-drawer { position: absolute; right: 16px; top: var(--ds-top); bottom: 128px; width: 380px; max-width: calc(100% - 32px); z-index: 996; overflow-y: auto; background: rgba(12, 15, 20, .97); border: 1px solid var(--ds-line); border-radius: 14px; padding: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.55); }
.ds-drawer[hidden] { display: none; }
.ds-drawer-head { display: flex; gap: 10px; align-items: flex-start; }
.ds-drawer-title { flex: 1; min-width: 0; }
.ds-drawer-title small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.ds-drawer-title h3 { margin: 2px 0 0; font-size: 17px; line-height: 1.25; font-weight: 700; color: #fff; word-break: break-word; }
.ds-x { background: rgba(255,255,255,.05) !important; border: 1px solid var(--ds-line) !important; color: #fff !important; width: 32px; min-height: 32px !important; border-radius: 8px !important; cursor: pointer; padding: 0 !important; }
.ds-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.ds-chip { font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--ds-line); background: rgba(255,255,255,.04); color: #d6d9de; text-decoration: none; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ds-chip.ok { color: var(--ds-ok); border-color: rgba(110,231,183,.35); background: rgba(16,185,129,.1); font-weight: 700; letter-spacing: .05em; }
.ds-chip.warn { color: #fcd34d; border-color: rgba(252,211,77,.35); background: rgba(234,179,8,.1); }
.ds-chip.btn { cursor: pointer; min-height: 0 !important; color: #d6d9de !important; }
.ds-chip.btn:hover { border-color: rgba(255,138,61,.55); }
.ds-stats { display: grid; grid-template-columns: 1fr 1.3fr 1.1fr; border: 1px solid var(--ds-line); border-radius: 12px; overflow: hidden; }
.ds-stats > div { padding: 10px; border-right: 1px solid var(--ds-line); display: flex; flex-direction: column; gap: 2px; }
.ds-stats > div:last-child { border-right: 0; }
.ds-stats small { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ds-muted); }
.ds-stats b { font-size: 20px; font-weight: 600; }
.ds-stats b.accent { color: var(--ds-accent-soft); font-size: 13px; font-family: 'JetBrains Mono', monospace; }
.ds-stats b.sm { font-size: 12px; font-family: 'JetBrains Mono', monospace; }
.ds-sec { margin-top: 14px; }
.ds-sec-title { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ds-muted); margin-bottom: 7px; font-weight: 600; }
.ds-dist { border: 1px solid var(--ds-line); border-radius: 12px; padding: 10px; }
.ds-dist-row { display: flex; justify-content: space-between; align-items: baseline; }
.ds-dist-row b { font-size: 18px; }
.ds-dist-row b small { font-size: 11px; color: var(--ds-muted); }
.ds-prox { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-accent-soft); }
.ds-prox.near { color: #f87171; } .ds-prox.deep { color: #c4b5fd; }
.ds-scale { height: 5px; background: #2a2f37; border-radius: 3px; margin: 8px 0 4px; overflow: hidden; }
.ds-scale i { display: block; height: 100%; background: linear-gradient(90deg, #ef4444, #ff8a3d, #ffb347); border-radius: 3px; }
.ds-scale-lbl { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--ds-muted); margin-bottom: 4px; }
.ds-bars { display: flex; align-items: flex-end; gap: 2px; height: 46px; border: 1px solid var(--ds-line); border-radius: 10px; padding: 6px; }
.ds-bars i { flex: 1; background: #2a2f37; border-radius: 2px; min-height: 2px; }
.ds-bars i.on { background: linear-gradient(180deg, var(--ds-accent-soft), var(--ds-accent)); }
.ds-bars-axis { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--ds-muted); font-family: 'JetBrains Mono', monospace; margin-top: 3px; }
.ds-strike { border: 1px solid var(--ds-line); border-radius: 12px; padding: 9px 10px; margin-bottom: 7px; background: rgba(255,255,255,.015); }
.ds-strike-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ds-unit { font-size: 11px; color: #7dd3fc; margin-top: 5px; }
.ds-strike-desc { font-size: 12px; color: #cbd0d8; line-height: 1.4; margin-top: 5px; }
.ds-strike-links { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.ds-about { font-size: 12.5px; line-height: 1.5; color: #d6d9de; white-space: pre-line; }
.ds-about.is-clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ds-actions { display: flex; gap: 6px; margin-top: 14px; }
.ds-btn { flex: 1; background: rgba(255,255,255,.05) !important; border: 1px solid var(--ds-line) !important; color: #fff !important; font-size: 11.5px !important; padding: 7px 6px !important; min-height: 34px !important; border-radius: 9px !important; cursor: pointer; }
.ds-btn:hover { border-color: rgba(255,138,61,.55) !important; }
.ds-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--ds-line); color: var(--ds-muted); font-size: 10.5px; }

/* ---- кнопки в існуючому попапі ---- */
.ds-popup-row { display: flex; gap: 4px; margin-top: 6px; }
.ds-popup-btn { background: linear-gradient(135deg, #ff5b1f, #c2410c) !important; flex: 1; }
.ds-popup-btn.ds-popup-link { background: #334155 !important; flex: 0 0 auto; }

/* ---- легенда ---- */
.ds-legend { position: absolute; left: 16px; bottom: 92px; z-index: 985; background: var(--ds-bg); border: 1px solid var(--ds-line); border-radius: 12px; padding: 6px 10px; max-width: 280px; font-size: 11.5px; box-shadow: 0 8px 28px rgba(0,0,0,.35); }
.ds-legend-head { background: none !important; border: 0 !important; color: #cfd3da !important; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 0 !important; min-height: 0 !important; cursor: pointer; width: 100%; text-align: left; }
.ds-legend.is-collapsed .ds-legend-body { display: none; }
.ds-legend-title { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ds-muted); margin: 8px 0 4px; }
.ds-legend-row { display: flex; align-items: center; gap: 7px; margin: 3px 0; flex-wrap: wrap; }
.ds-legend-foot { font-size: 10.5px; color: var(--ds-muted); margin-top: 8px; line-height: 1.4; }
.ds-ring { display: inline-block; border-radius: 50%; border: 2px solid #f97316; background: rgba(249,115,22,.6); }
.ds-ring.s { width: 10px; height: 10px; } .ds-ring.l { width: 16px; height: 16px; border-width: 3px; }
.ds-sw { display: inline-block; width: 12px; height: 8px; border-radius: 2px; } .ds-sw.grey { background: #6b7686; } .ds-sw.orange { background: #ff8a3d; }

/* ---- шар світіння ---- */
.leaflet-dsGlow-pane { filter: blur(7px); opacity: .85; mix-blend-mode: screen; }

/* ---- вкладка «Статистика ударів» ---- */
.ds-dash { gap: 10px; }
.ds-note { font-size: 11.5px; color: var(--ds-accent-soft, #ffb347); background: rgba(255,91,31,.08); border: 1px solid rgba(255,138,61,.3); border-radius: 9px; padding: 7px 10px; }
.ds-note.warn { color: #fcd34d; background: rgba(234,179,8,.08); border-color: rgba(252,211,77,.3); }
.ds-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ds-kpi { background: #16202d; border: 1px solid #2b394b; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ds-kpi.wide { grid-column: 1 / -1; }
.ds-kpi small { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: #a8b7c8; }
.ds-kpi b { font-size: 22px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.ds-kpi b.accent { color: #ff8a3d; }
.ds-kpi b em { font-size: 12px; font-style: normal; color: #a8b7c8; }
.ds-kpi span { font-size: 10.5px; color: #a8b7c8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-panel { background: #16202d; border: 1px solid #2b394b; border-radius: 10px; padding: 10px 12px; flex-shrink: 0; }
.ds-panel-title { font-size: 12.5px; font-weight: 700; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ds-panel-title em { font-style: normal; font-weight: 500; font-size: 10.5px; color: #a8b7c8; }
.ds-chart { width: 100%; height: 120px; display: block; }
.ds-hbar, .ds-top { display: grid; grid-template-columns: 42% 1fr 64px; align-items: center; gap: 8px; font-size: 11.5px; margin: 5px 0; }
.ds-top { width: 100%; background: transparent !important; border: 0 !important; color: inherit !important; padding: 3px 0 !important; min-height: 0 !important; text-align: left; cursor: pointer; border-radius: 6px !important; }
.ds-top:hover { background: rgba(255,255,255,.04) !important; }
.ds-hbar .lbl, .ds-top .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; }
.ds-hbar .track, .ds-top .track { height: 7px; background: #243142; border-radius: 4px; overflow: hidden; }
.ds-hbar .track i, .ds-top .track i { display: block; height: 100%; background: linear-gradient(90deg, #ff5b1f, #ffb347); border-radius: 4px; }
.ds-hbar .val, .ds-top .val { text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.ds-hbar .val small { color: #a8b7c8; font-size: 9.5px; }

/* ---- режим брифінгу: не заважати ---- */
body.kiosk-mode .ds-legend { display: none; }

/* ---- мобільна розкладка ---- */
@media (max-width: 700px) {
  .ds-bar { left: 8px; right: 8px; gap: 6px; }
  .ds-search { flex: 1 1 100%; order: 3; min-width: 0; }
  .ds-count { display: none; }
  .ds-rail { top: auto; left: 8px; right: 8px; width: auto; bottom: 84px; height: 168px; }
  .ds-rail-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .ds-card { flex: 0 0 250px; scroll-snap-align: start; }
  .ds-rail-head { align-self: flex-start; }
  .ds-drawer { left: 8px; right: 8px; width: auto; max-width: none; top: 30%; bottom: 8px; z-index: 1001; border-radius: 16px 16px 12px 12px; }
  .ds-legend { display: none; }
  .ds-menu { position: fixed; left: 8px; right: 8px; top: auto; min-width: 0; }
}
