/* ══════════════════════════════════════════════════════════════════
   SENTINEL WORLD v9 — Responsive Design System
   Desktop:  sidebar layout · full map · tabbed detail panels
   Mobile:   bottom nav · full-screen panels · swipe-friendly
   Tablet:   adaptive breakpoint at 768px
   All GPU-only transitions · CSS containment · no layout thrash
   ══════════════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────────────── */
:root {
  --bg:    #05050a;  --bg1: #0e0e14;  --bg2: #16161e;
  --bg3:   #1e1e2c;  --bg4: #27273a;  --bg5: #32324e;
  --sep:   rgba(255,255,255,.07);
  --sep2:  rgba(255,255,255,.13);
  --sep3:  rgba(255,255,255,.22);
  --glass: rgba(12,12,20,.93);
  --gl2:   rgba(22,22,32,.97);
  --t0: #fff;  --t1: rgba(255,255,255,.88);
  --t2: rgba(255,255,255,.55);  --t3: rgba(255,255,255,.3);  --t4: rgba(255,255,255,.13);

  --blue:   #3b82f6;  --green:  #22c55e;  --orange: #f59e0b;
  --red:    #ef4444;  --purple: #a855f7;  --teal:   #06b6d4;
  --yellow: #eab308;  --pink:   #ec4899;
  --c0:#22c55e; --c1:#84cc16; --c2:#f59e0b; --c3:#f97316; --c4:#ef4444;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Helvetica, Arial, sans-serif;
  --mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', 'Roboto Mono', monospace;

  /* Layout sizes */
  --topbar-h:  50px;
  --tabbar-h:  42px;
  --mnav-h:    0px;   /* mobile only */
  --sidebar-w: 340px;
  --list-w:    340px;
  --r:  10px;  --rs: 7px;  --rl: 14px;
}

/* Mobile layout sizes */
@media (max-width: 767px) {
  :root {
    --topbar-h: 54px;
    --tabbar-h: 0px;
    --mnav-h:   60px;
    --sidebar-w: 100%;
    --list-w: 100%;
  }
}

/* ── RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--t0);
  font-size: 13px; height: 100%; overflow: hidden;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body.loading { overflow: hidden; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 2px; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; color: inherit; }

/* ── BOOT ───────────────────────────────────────────────────────── */
#boot {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  transition: opacity .5s;
}
#boot.off { opacity: 0; pointer-events: none; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 240px; }
.boot-logo { font-size: 40px; font-weight: 700; letter-spacing: -2px; }
.boot-ver  { font-size: 11px; color: var(--t3); letter-spacing: .04em; margin-bottom: 16px; text-align: center; }
.boot-ring { width: 38px; height: 38px; border-radius: 50%; border: 2.5px solid var(--bg4); border-top-color: var(--blue); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot-progress { width: 100%; height: 3px; background: var(--bg4); border-radius: 2px; overflow: hidden; margin-top: 14px; }
#boot-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--teal)); border-radius: 2px; transition: width .1s linear; }
#boot-msg { font-size: 11px; color: var(--t3); font-family: var(--mono); margin-top: 6px; text-align: center; }

/* ── TOAST ──────────────────────────────────────────────────────── */
#toasts { position: fixed; top: 66px; right: 14px; z-index: 8000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  background: var(--gl2); border: 1px solid var(--sep2); border-radius: var(--rs);
  padding: 8px 14px; font-size: 12px; font-weight: 500;
  display: flex; align-items: center; gap: 8px; max-width: 280px;
  transform: translateX(110%); transition: transform .3s; pointer-events: all; contain: layout;
}
.toast.show { transform: translateX(0); }
.toast-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ── MODAL ──────────────────────────────────────────────────────── */
#mover {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.65); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .18s; padding: 16px;
}
#mover.on { opacity: 1; pointer-events: all; }
#modal {
  background: var(--bg1); border: 1px solid var(--sep2); border-radius: var(--rl);
  width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
  transform: scale(.95) translateY(10px); transition: transform .18s;
  box-shadow: 0 32px 100px rgba(0,0,0,.8);
}
#mover.on #modal { transform: scale(1) translateY(0); }
#mhdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--sep);
  position: sticky; top: 0; background: var(--bg1); z-index: 1;
}
#mtit { font-size: 15px; font-weight: 600; }
#mcls { width: 26px; height: 26px; border-radius: 50%; background: var(--bg3); color: var(--t1); font-size: 14px; display: flex; align-items: center; justify-content: center; transition: background .12s; }
#mcls:hover { background: var(--bg4); }
#mbody { padding: 18px; }
.mrow { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--sep); gap: 12px; }
.mrow:last-child { border-bottom: none; }
.mkey { font-size: 11px; color: var(--t2); flex-shrink: 0; }
.mval { font-size: 11px; font-weight: 500; font-family: var(--mono); text-align: right; word-break: break-all; }
.msec { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--t3); margin: 12px 0 4px; font-weight: 600; }

/* ── APP SHELL ──────────────────────────────────────────────────── */
#app { display: flex; flex-direction: column; width: 100vw; height: 100dvh; opacity: 0; transition: opacity .35s; }
#app.show { opacity: 1; }

/* ── TOPBAR ─────────────────────────────────────────────────────── */
#topbar {
  height: var(--topbar-h); display: flex; align-items: center;
  padding: 0 14px; gap: 12px; background: var(--gl2);
  border-bottom: 1px solid var(--sep2); flex-shrink: 0; z-index: 200;
  contain: layout style; user-select: none;
}
.brand { display: flex; align-items: center; gap: 9px; cursor: pointer; flex-shrink: 0; }
.brand-icon { width: 26px; height: 26px; border-radius: 6px; background: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.brand-name { font-size: 13px; font-weight: 700; letter-spacing: -.2px; }
.brand-world { color: var(--teal); }
.brand-sub  { font-size: 9px; color: var(--t3); margin-top: 1px; display: none; }
@media (min-width: 900px) { .brand-sub { display: block; } }

.top-mid { flex: 1; display: flex; justify-content: center; overflow: hidden; }
.clock-group { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.ck { text-align: center; }
.ckl { font-size: 8px; color: var(--t3); display: block; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.ckv { font-size: 11px; font-weight: 600; font-family: var(--mono); }
.ck-div { width: 1px; height: 20px; background: var(--sep2); }
.live-dot { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; color: var(--green); font-family: var(--mono); padding: 2px 8px; background: rgba(34,197,94,.12); border-radius: 12px; }
.dot-anim { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: bdot 2s infinite; }
@keyframes bdot { 0%,100%{opacity:1} 50%{opacity:.2} }

.top-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
#hdr-badges { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.hbdg { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 14px; font-family: var(--mono); white-space: nowrap; transition: opacity .15s; }
.hbdg:hover { opacity: .8; }
.bg  { background: rgba(34,197,94,.13);  color: var(--green);  }
.bo  { background: rgba(245,158,11,.13); color: var(--orange); }
.br  { background: rgba(239,68,68,.13);  color: var(--red);    }
.bb  { background: rgba(59,130,246,.13); color: var(--blue);   }
.bt  { background: rgba(6,182,212,.13);  color: var(--teal);   }
.bp  { background: rgba(168,85,247,.13); color: var(--purple); }
.by  { background: rgba(234,179,8,.13);  color: var(--yellow); }

.icon-btn { display: none; width: 34px; height: 34px; border-radius: var(--rs); background: var(--bg3); align-items: center; justify-content: center; font-size: 18px; color: var(--t1); }

@media (max-width: 767px) {
  #hdr-badges { display: none; }
  .icon-btn { display: flex; }
  .top-mid .ck:nth-child(n+4) { display: none; }
  .ck-div:nth-child(n+4) { display: none; }
}

/* ── DESKTOP TABBAR ─────────────────────────────────────────────── */
#tabbar {
  height: var(--tabbar-h); display: flex; align-items: stretch;
  background: var(--bg1); border-bottom: 1px solid var(--sep2);
  flex-shrink: 0; overflow-x: auto; overflow-y: hidden;
  contain: layout style;
}
#tabbar::-webkit-scrollbar { height: 0; }
.tab {
  display: flex; align-items: center; gap: 4px; padding: 0 13px;
  font-size: 11.5px; font-weight: 500; color: var(--t2);
  border-bottom: 2px solid transparent; white-space: nowrap; flex-shrink: 0;
  transition: color .13s, border-color .13s; user-select: none;
}
.tab:hover { color: var(--t1); }
.tab.on  { color: var(--t0); border-bottom-color: var(--blue); }
.tab span:first-child { font-size: 13px; }
.tab-lbl { display: none; }
@media (min-width: 640px) { .tab-lbl { display: inline; } }
.tbdg { font-size: 9px; font-weight: 700; font-family: var(--mono); padding: 1px 5px; border-radius: 7px; margin-left: 1px; }

@media (max-width: 767px) { #tabbar { display: none; } }

/* ── MOBILE BOTTOM NAV ──────────────────────────────────────────── */
#mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--mnav-h); z-index: 300;
  background: var(--gl2); border-top: 1px solid var(--sep2);
  contain: layout style;
  padding-bottom: env(safe-area-inset-bottom);
}
@media (max-width: 767px) { #mobile-nav { display: flex; } }
.mnav {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; font-size: 18px; color: var(--t3);
  transition: color .13s; padding: 4px 0; cursor: pointer;
}
.mnav span { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.mnav.on { color: var(--blue); }

/* ── MORE MENU ──────────────────────────────────────────────────── */
.more-menu { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; }
.more-menu.hidden { display: none; }
.more-menu-inner {
  width: 100%; background: var(--bg1); border-radius: var(--rl) var(--rl) 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 6px;
}
.more-menu-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--t2); text-align: center; }
.more-menu-inner button { padding: 12px 16px; border-radius: var(--rs); background: var(--bg2); font-size: 14px; font-weight: 500; text-align: left; }

/* ── CONTENT ────────────────────────────────────────────────────── */
#content {
  flex: 1; overflow: hidden; position: relative; contain: layout;
  margin-bottom: var(--mnav-h); /* space for mobile nav */
}

/* ── PANELS ─────────────────────────────────────────────────────── */
.panel { display: none; width: 100%; height: 100%; overflow: hidden; contain: layout; }
.panel.on { display: flex; }

/* ── WORLD MAP LAYOUT ───────────────────────────────────────────── */
#map-col { flex: 1; position: relative; overflow: hidden; }
#leafmap { position: absolute; inset: 0; z-index: 10; }
#flt-canvas { position: absolute; inset: 0; z-index: 20; pointer-events: none; will-change: contents; }

#world-side {
  width: var(--sidebar-w); border-left: 1px solid var(--sep2);
  background: var(--bg1); display: flex; flex-direction: column;
  overflow: hidden; flex-shrink: 0; contain: layout;
}
.ws-top { flex-shrink: 0; border-bottom: 1px solid var(--sep); }
.ws-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--t2); padding: 8px 12px 5px; }
.ws-body { flex: 1; overflow-y: auto; contain: layout; }
.wss { border-bottom: 1px solid var(--sep); padding-bottom: 10px; }
.wss-t { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--t2); padding: 8px 12px 6px; }
.wss-hdr { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 6px; }
.wss-hdr .wss-t { padding: 0; }
.secbdg { font-size: 10px; font-weight: 700; font-family: var(--mono); padding: 2px 7px; border-radius: 9px; }
.sbg { background: rgba(34,197,94,.13);  color: var(--green);  }
.sbo { background: rgba(245,158,11,.13); color: var(--orange); }
.sbr { background: rgba(239,68,68,.13);  color: var(--red);    }
.sbb { background: rgba(59,130,246,.13); color: var(--blue);   }
.sbt { background: rgba(6,182,212,.13);  color: var(--teal);   }
.sbp { background: rgba(168,85,247,.13); color: var(--purple); }

@media (max-width: 1023px) {
  #world-side { display: none; } /* hide sidebar on tablet; use modal for details */
}

/* ── MAP HUD ────────────────────────────────────────────────────── */
.mhud {
  position: absolute; z-index: 500; background: var(--glass);
  border: 1px solid var(--sep2); border-radius: var(--rs);
  font-family: var(--mono); font-size: 10px; color: var(--t2); contain: layout style;
}
.mhud-tl { top: 10px; left: 10px; padding: 7px 11px; line-height: 1.85; }
.mhud-tl strong { color: var(--t0); }
.mhud-br { bottom: 10px; right: 10px; padding: 4px 9px; }
.dim { color: var(--t3); }
.map-coords { position: absolute; bottom: 10px; right: 10px; z-index: 500; background: var(--glass); border: 1px solid var(--sep2); border-radius: 6px; padding: 4px 9px; font-family: var(--mono); font-size: 10px; color: var(--t2); }

.layer-panel {
  position: absolute; top: 10px; right: 10px; z-index: 500;
  background: var(--glass); border: 1px solid var(--sep2);
  border-radius: var(--rs); width: 165px; overflow: hidden;
}
.lp-title { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--t3); padding: 7px 11px 4px; }
.lrow { display: flex; align-items: center; gap: 7px; padding: 5px 11px; font-size: 10.5px; color: var(--t2); transition: background .12s; border-top: 1px solid var(--sep); cursor: pointer; }
.lrow:hover { background: rgba(255,255,255,.05); }
.lrow.on { color: var(--t0); }
.lrow input { display: none; }
.ltog { width: 22px; height: 12px; border-radius: 6px; background: var(--bg5); position: relative; flex-shrink: 0; transition: background .15s; }
.lrow.on .ltog { background: var(--blue); }
.ltog span { display: block; position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; border-radius: 50%; background: #fff; transition: transform .15s; }
.lrow.on .ltog span { transform: translateX(10px); }

.mleg {
  position: absolute; bottom: 10px; left: 10px; z-index: 500;
  background: var(--glass); border: 1px solid var(--sep2);
  border-radius: var(--rs); padding: 8px 10px; contain: layout style;
}
.leg-h { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--t3); margin-bottom: 6px; }
.lgi { display: flex; align-items: center; gap: 5px; padding: 2px 0; font-size: 10px; color: var(--t1); }
.lgd { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.lgr { width: 8px; height: 8px; transform: rotate(45deg); flex-shrink: 0; }
.lgs { font-size: 11px; line-height: 1; flex-shrink: 0; }

@media (max-width: 767px) {
  .layer-panel { display: none; }
  .mleg { display: none; }
}

/* ── CITY PILLS ─────────────────────────────────────────────────── */
.cpills, .fpills {
  display: flex; gap: 4px; padding: 6px 10px; overflow-x: auto;
  flex-wrap: nowrap; scrollbar-width: none; contain: layout;
}
.cpills::-webkit-scrollbar, .fpills::-webkit-scrollbar { display: none; }
.cpill, .fpill {
  font-size: 10px; font-weight: 500; padding: 4px 10px;
  border-radius: 14px; cursor: pointer; background: var(--bg3); color: var(--t2);
  border: 1px solid transparent; white-space: nowrap; flex-shrink: 0;
  transition: background .12s, color .12s; -webkit-tap-highlight-color: transparent;
}
.cpill:hover, .fpill:hover { background: var(--bg4); color: var(--t1); }
.cpill.on, .fpill.on { background: rgba(59,130,246,.18); color: var(--blue); border-color: rgba(59,130,246,.3); }

/* KPI grid */
.kgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--sep); }
.kc { background: var(--bg1); padding: 9px 11px; cursor: pointer; transition: background .12s; }
.kc:hover { background: var(--bg2); }
.klbl { font-size: 8px; text-transform: uppercase; letter-spacing: .07em; color: var(--t3); margin-bottom: 3px; }
.kval { font-size: 17px; font-weight: 700; font-family: var(--mono); letter-spacing: -.5px; line-height: 1; }
.ksub { font-size: 9px; color: var(--t3); margin-top: 2px; }
.kbar { height: 2px; background: var(--bg4); border-radius: 1px; overflow: hidden; margin-top: 5px; }
.kfill { height: 100%; border-radius: 1px; transition: width .6s ease; }

/* Threat */
.thbdg { font-size: 10px; font-weight: 700; font-family: var(--mono); padding: 2px 7px; border-radius: 9px; }
.thsegs { display: flex; gap: 3px; padding: 0 12px; }
.thseg { flex: 1; height: 4px; border-radius: 2px; background: var(--bg4); transition: background .4s; }
.thlbls { display: flex; padding: 3px 12px; font-size: 8px; text-transform: uppercase; letter-spacing: .04em; color: var(--t4); }
.thlbls span { flex: 1; text-align: center; }
.thtxt { font-size: 12px; font-weight: 600; padding: 6px 12px 0; }

/* Signal bars */
.sigrow { display: flex; align-items: center; gap: 8px; padding: 3px 12px; }
.siglbl { font-size: 10px; color: var(--t2); width: 76px; flex-shrink: 0; }
.sigtrack { flex: 1; height: 3px; background: var(--bg4); border-radius: 2px; overflow: hidden; }
.sigfill { height: 100%; border-radius: 2px; transition: width 1.1s ease; }
.sigpct { font-size: 10px; font-family: var(--mono); font-weight: 600; width: 32px; text-align: right; flex-shrink: 0; }

/* Sources */
.srcrow { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--sep); cursor: pointer; transition: background .12s; }
.srcrow:hover { background: rgba(255,255,255,.03); }
.srcrow:last-child { border-bottom: none; }
.srcdot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; animation: bdot 2s infinite; }
.srcnm { flex: 1; font-size: 11px; }
.srcst { font-size: 10px; font-weight: 600; font-family: var(--mono); }

/* ── DETAIL LAYOUT ──────────────────────────────────────────────── */
.dl-layout { display: flex; width: 100%; height: 100%; overflow: hidden; }
.dl-col {
  width: var(--list-w); flex-shrink: 0;
  border-right: 1px solid var(--sep2); background: var(--bg1);
  display: flex; flex-direction: column; overflow: hidden; contain: layout;
}
.dm { flex: 1; overflow-y: auto; background: var(--bg); padding: 18px; contain: layout; }
.dl-hdr {
  display: flex; align-items: center; gap: 8px; padding: 9px 13px 7px;
  border-bottom: 1px solid var(--sep2); flex-shrink: 0; flex-wrap: wrap;
}
.dl-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--t2); flex: 1; }
.dl-meta  { font-size: 10px; font-family: var(--mono); color: var(--t2); }

/* Search */
.search-row { padding: 6px 10px; border-bottom: 1px solid var(--sep); flex-shrink: 0; }
.search-inp {
  width: 100%; background: var(--bg3); border: 1px solid var(--sep2);
  border-radius: var(--rs); padding: 6px 10px; font-size: 12px; color: var(--t0);
  outline: none; font-family: var(--font); transition: border-color .15s;
}
.search-inp:focus { border-color: var(--blue); }
.search-inp::placeholder { color: var(--t3); }

/* Virtual lists */
.vlist { flex: 1; overflow-y: auto; contain: layout; }
.tbl-wrap { flex: 1; overflow-y: auto; contain: layout; }

/* ── PAGINATION ─────────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-top: 1px solid var(--sep);
  flex-shrink: 0; contain: layout style;
}
.page-info { font-size: 11px; font-family: var(--mono); color: var(--t2); }
.page-btns { display: flex; gap: 4px; align-items: center; }
.pbtn {
  width: 28px; height: 28px; border-radius: var(--rs);
  background: var(--bg3); color: var(--t1); font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s; -webkit-tap-highlight-color: transparent;
}
.pbtn:hover { background: var(--bg4); }
.pbtn:disabled { opacity: .3; cursor: not-allowed; }
.pbtn.on { background: rgba(59,130,246,.22); color: var(--blue); }
.page-nums { display: flex; gap: 3px; }
.pnum { min-width: 28px; height: 28px; border-radius: var(--rs); background: var(--bg3); color: var(--t2); font-size: 11px; font-family: var(--mono); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0 4px; transition: background .12s; }
.pnum:hover { background: var(--bg4); color: var(--t0); }
.pnum.on { background: var(--blue); color: #fff; cursor: default; }
.pnum.ellipsis { pointer-events: none; color: var(--t3); }

/* ── TABLE ──────────────────────────────────────────────────────── */
.dtbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.dtbl th {
  font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--t3);
  padding: 7px 12px; text-align: left; border-bottom: 1px solid var(--sep2);
  position: sticky; top: 0; background: var(--bg1); z-index: 1; font-weight: 600;
}
.dtbl td {
  font-size: 11px; padding: 7px 12px; border-bottom: 1px solid var(--sep);
  vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dtbl tr:hover td { background: rgba(255,255,255,.04); cursor: pointer; }
.dtbl tr.on td { background: rgba(59,130,246,.09); }

/* ── LIST ROWS ──────────────────────────────────────────────────── */
.lrow2 {
  display: flex; align-items: center; gap: 9px; padding: 9px 13px;
  border-bottom: 1px solid var(--sep); cursor: pointer; transition: background .1s;
  -webkit-tap-highlight-color: transparent; contain: layout;
}
.lrow2:hover { background: rgba(255,255,255,.04); }
.lrow2:active { background: rgba(255,255,255,.07); }
.lrow2.on { background: rgba(59,130,246,.08); border-left: 3px solid var(--blue); }
.lico { font-size: 18px; flex-shrink: 0; line-height: 1; }
.linf { flex: 1; min-width: 0; }
.lt  { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls  { font-size: 10px; color: var(--t2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls2 { font-size: 10px; color: var(--t3); margin-top: 1px; }
.lr  { text-align: right; flex-shrink: 0; }
.lrv { font-size: 13px; font-weight: 700; font-family: var(--mono); }
.lru { font-size: 9px; color: var(--t3); }

.trow {
  display: flex; align-items: center; gap: 9px; padding: 9px 13px;
  border-bottom: 1px solid var(--sep); border-left: 3px solid transparent;
  cursor: pointer; transition: background .1s; contain: layout;
  -webkit-tap-highlight-color: transparent;
}
.trow:hover { background: rgba(255,255,255,.04); }
.trow.on { background: rgba(59,130,246,.07); }
.tdot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.tinf { flex: 1; min-width: 0; }
.tn { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc { font-size: 9px; color: var(--t3); }
.tst { font-size: 10px; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.tpb { height: 2px; background: var(--bg4); border-radius: 1px; overflow: hidden; margin-top: 3px; }
.tpf { height: 100%; border-radius: 1px; transition: width .6s ease; }
.tspd { font-size: 14px; font-weight: 700; font-family: var(--mono); text-align: right; flex-shrink: 0; }
.tsu  { font-size: 9px; color: var(--t3); font-weight: 400; }

.irow {
  display: flex; gap: 9px; padding: 8px 13px; border-bottom: 1px solid var(--sep);
  cursor: pointer; transition: background .1s; position: relative; contain: layout;
  -webkit-tap-highlight-color: transparent;
}
.irow:hover { background: rgba(255,255,255,.04); }
.irow::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.irow.s3::before { background: var(--red); }
.irow.s2::before { background: var(--orange); }
.irow.s1::before { background: var(--green); }
.iico { font-size: 18px; flex-shrink: 0; line-height: 1; }
.iinf { flex: 1; min-width: 0; }
.it  { font-size: 12px; font-weight: 600; }
.id2 { font-size: 10px; color: var(--t2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im  { font-size: 10px; color: var(--t3); margin-top: 2px; }
.ibdg { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 9px; flex-shrink: 0; align-self: flex-start; }

.erow {
  display: flex; align-items: center; gap: 9px; padding: 9px 13px;
  border-bottom: 1px solid var(--sep); cursor: pointer; transition: background .1s; contain: layout;
}
.erow:hover { background: rgba(255,255,255,.04); }
.erow.on { background: rgba(59,130,246,.07); }
.emag { font-family: var(--mono); font-size: 15px; font-weight: 700; width: 38px; text-align: center; flex-shrink: 0; }
.einf { flex: 1; min-width: 0; }
.epl { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etm { font-size: 9px; color: var(--t3); margin-top: 2px; }
.edep { font-family: var(--mono); font-size: 10px; color: var(--t2); flex-shrink: 0; }

.evrow {
  padding: 9px 13px; border-bottom: 1px solid var(--sep); cursor: pointer;
  transition: background .1s; contain: layout;
}
.evrow:hover { background: rgba(255,255,255,.04); }
.evhdr { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.evcat { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: 2px 6px; border-radius: 9px; }
.evtime { font-size: 10px; color: var(--t3); margin-left: auto; }
.evtit { font-size: 11px; font-weight: 500; color: var(--t1); line-height: 1.4; margin-bottom: 2px; }
.evsrc { font-size: 10px; color: var(--t3); font-family: var(--mono); }

/* ── DETAIL CARDS ───────────────────────────────────────────────── */
.dcard { background: var(--bg2); border-radius: var(--r); padding: 14px; margin-bottom: 10px; border: 1px solid var(--sep); contain: layout; }
.dcard-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 4px; }
.dcell { background: var(--bg3); border-radius: var(--rs); padding: 9px 10px; }
.dclbl { font-size: 8.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--t3); margin-bottom: 3px; }
.dcval { font-size: 14px; font-weight: 600; font-family: var(--mono); }
.drow { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--sep); gap: 12px; }
.drow:last-child { border-bottom: none; }
.dkey { font-size: 11px; color: var(--t2); flex-shrink: 0; }
.dval { font-size: 11px; font-weight: 500; font-family: var(--mono); text-align: right; word-break: break-all; }
.dsect { font-size: 8.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--t3); margin: 12px 0 5px; font-weight: 600; }
.dbtn { display: block; width: 100%; padding: 10px; border-radius: var(--rs); font-size: 13px; font-weight: 600; margin-top: 8px; transition: opacity .15s; }
.dbtn:hover { opacity: .85; }

/* Map button in detail */
.map-action { background: var(--bg2); border: 1px solid var(--sep); border-radius: var(--r); padding: 12px; margin-top: 8px; }

/* ── WEATHER ────────────────────────────────────────────────────── */
.wx-hero { padding: 16px; background: linear-gradient(135deg,rgba(59,130,246,.1),rgba(34,197,94,.05)); border-bottom: 1px solid var(--sep); }
.wx-top { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 11px; }
.wx-temp-big { font-size: 52px; font-weight: 200; letter-spacing: -3px; line-height: 1; }
.wx-unit { font-size: 18px; color: var(--t2); }
.wx-icon { font-size: 42px; }
.wx-cond { font-size: 13px; font-weight: 500; }
.wx-feels { font-size: 11px; color: var(--t3); margin-top: 2px; }
.wx-cells { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; margin-top: 12px; }
.wxc { background: rgba(255,255,255,.06); border-radius: var(--rs); padding: 7px; text-align: center; cursor: pointer; transition: background .12s; }
.wxc:hover { background: rgba(255,255,255,.1); }
.wxcv { font-size: 12px; font-weight: 600; font-family: var(--mono); margin-bottom: 2px; }
.wxcl { font-size: 8px; text-transform: uppercase; letter-spacing: .06em; color: var(--t3); }
.fc-strip { display: flex; gap: 5px; padding: 9px 13px; overflow-x: auto; }
.fc-strip::-webkit-scrollbar { height: 0; }
.fcd { flex-shrink: 0; text-align: center; background: var(--bg3); border-radius: var(--rs); padding: 7px 9px; min-width: 50px; cursor: pointer; transition: background .12s; }
.fcd:hover { background: var(--bg4); }
.fcd.today { background: rgba(59,130,246,.16); border: 1px solid rgba(59,130,246,.3); }
.fcdn { font-size: 8px; text-transform: uppercase; color: var(--t3); margin-bottom: 2px; }
.fcdi { font-size: 17px; margin-bottom: 2px; }
.fcdh { font-size: 11px; font-weight: 600; }
.fcdl { font-size: 10px; color: var(--t3); }

/* ── AQ ─────────────────────────────────────────────────────────── */
.aq-row2 { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.aq-circ { width: 54px; height: 54px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; border: 3px solid var(--green); transition: border-color .4s; }
.aq-num { font-size: 18px; font-weight: 700; font-family: var(--mono); line-height: 1; }
.aq-lbl { font-size: 8px; text-transform: uppercase; color: var(--t2); }
.aq-tier { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.aq-desc { font-size: 11px; color: var(--t2); line-height: 1.4; }
.aq-prog { height: 4px; background: var(--bg4); border-radius: 2px; overflow: hidden; margin-bottom: 9px; }
.aq-pfill { height: 100%; border-radius: 2px; transition: width 1s ease; }
.aq-pols { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.aqp { background: var(--bg3); border-radius: var(--rs); padding: 6px; cursor: pointer; transition: background .12s; }
.aqp:hover { background: var(--bg4); }
.aqpv { font-size: 11px; font-weight: 600; font-family: var(--mono); }
.aqpn { font-size: 8px; text-transform: uppercase; color: var(--t3); margin-top: 1px; }

/* ── ISS ─────────────────────────────────────────────────────────── */
.space-layout { width: 100%; height: 100%; overflow-y: auto; padding: 18px; max-width: 960px; margin: 0 auto; }
.iss-hero { background: linear-gradient(135deg,rgba(234,179,8,.1),rgba(6,182,212,.05)); border-radius: var(--r); padding: 16px; margin-bottom: 12px; border: 1px solid var(--sep); }
.iss-top { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.iss-ico { font-size: 34px; }
.iss-nm { font-size: 15px; font-weight: 600; }
.iss-orb { font-size: 11px; color: var(--t3); margin-top: 2px; }
.iss-cells { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.iss-cell { background: rgba(255,255,255,.06); border-radius: var(--rs); padding: 9px; text-align: center; }
.iss-cv { font-size: 15px; font-weight: 700; font-family: var(--mono); }
.iss-cl { font-size: 8px; text-transform: uppercase; color: var(--t3); margin-top: 2px; }

/* ── SATELLITE ───────────────────────────────────────────────────── */
#sat-wrap { position: relative; width: 100%; height: 100%; }
#sat-map  { position: absolute; inset: 0; z-index: 10; }
.sat-sw { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; background: var(--glass); border: 1px solid var(--sep2); border-radius: 18px; overflow: hidden; }
.sbt { padding: 5px 13px; font-size: 11px; font-weight: 500; color: var(--t2); transition: color .12s; }
.sbt:hover { color: var(--t1); }
.sbt.on { background: var(--blue); color: #fff; border-radius: 16px; }
.cam-panel { position: absolute; top: 52px; right: 10px; z-index: 500; width: 215px; max-height: 60%; overflow-y: auto; background: var(--glass); border: 1px solid var(--sep2); border-radius: var(--rs); }
.cam-hdr { padding: 8px 11px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--t2); border-bottom: 1px solid var(--sep); }
.camrow { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-bottom: 1px solid var(--sep); cursor: pointer; font-size: 11px; transition: background .12s; }
.camrow:hover { background: rgba(255,255,255,.05); }
.camrow:last-child { border-bottom: none; }

/* ── EMPTY STATE ────────────────────────────────────────────────── */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--t3); gap: 10px; padding: 40px; text-align: center; }
.es-ico { font-size: 36px; opacity: .35; }
.es-txt { font-size: 13px; }

/* ── REAL-TIME PULSE ────────────────────────────────────────────── */
.rt-pulse { animation: rt-pulse .6s ease-out; }
@keyframes rt-pulse { 0%{background:rgba(59,130,246,.25)} 100%{background:transparent} }

/* ── LEAFLET OVERRIDES ──────────────────────────────────────────── */
.leaflet-container { background: #06060f !important; font-family: var(--font) !important; }
.leaflet-control-zoom { border: 1px solid var(--sep2) !important; border-radius: var(--rs) !important; }
.leaflet-control-zoom a { background: var(--glass) !important; color: var(--t1) !important; border-bottom-color: var(--sep) !important; width: 28px !important; height: 28px !important; line-height: 28px !important; font-size: 17px !important; }
.leaflet-control-zoom a:hover { color: var(--t0) !important; }
.leaflet-control-attribution { background: rgba(0,0,0,.7) !important; color: var(--t3) !important; font-size: 9px !important; }
.leaflet-control-attribution a { color: var(--t2) !important; }
.leaflet-popup-content-wrapper { background: var(--bg1) !important; color: var(--t0) !important; border: 1px solid var(--sep2) !important; border-radius: var(--r) !important; box-shadow: 0 14px 60px rgba(0,0,0,.9) !important; }
.leaflet-popup-tip { background: var(--bg1) !important; }
.leaflet-popup-content { margin: 11px 14px !important; font-family: var(--font) !important; font-size: 12px !important; min-width: 180px; }
.leaflet-popup-close-button { color: var(--t2) !important; font-size: 17px !important; top: 8px !important; right: 10px !important; }
.ptype { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--t3); margin-bottom: 4px; font-family: var(--mono); }
.ptit  { font-size: 13px; font-weight: 600; margin-bottom: 8px; padding-right: 18px; }
.pgrid { display: grid; grid-template-columns: auto 1fr; gap: 3px 11px; }
.pk { font-size: 11px; color: var(--t2); }
.pv { font-size: 11px; font-weight: 600; font-family: var(--mono); text-align: right; }

/* ── RESPONSIVE DETAIL LAYOUT ───────────────────────────────────── */
@media (max-width: 767px) {
  .dl-layout { flex-direction: column; }
  .dl-col { width: 100%; border-right: none; border-bottom: 1px solid var(--sep2); max-height: 50%; }
  .dm { padding: 14px; }
  .tbl-wrap { overflow-y: auto; }
  .space-layout { padding: 14px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  :root { --list-w: 300px; --sidebar-w: 0px; }
  #world-side { display: none; }
}

/* ── MISC UTILITIES ─────────────────────────────────────────────── */
.font-mono { font-family: var(--mono); }
.text-green  { color: var(--green);  }
.text-orange { color: var(--orange); }
.text-red    { color: var(--red);    }
.text-blue   { color: var(--blue);   }
.text-teal   { color: var(--teal);   }
.text-yellow { color: var(--yellow); }
.text-dim    { color: var(--t2);     }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
