:root {
  --bg: #05070b;
  --bg-2: #090e18;
  --panel: rgba(15, 22, 36, 0.78);
  --panel-strong: rgba(12, 16, 26, 0.94);
  --panel-glass: rgba(18, 32, 48, 0.58);
  --line: rgba(121, 241, 255, 0.16);
  --line-hot: rgba(46, 238, 199, 0.55);
  --text: #eaf6ff;
  --muted: #89a0b7;
  --cyan: #42f4ff;
  --cyan-2: #00a9ff;
  --green: #2effc8;
  --orange: #ffb239;
  --red: #ff5a6f;
  --blue: #1aa8ff;
  --purple: #8567ff;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --nav-h: 82px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(42, 255, 205, 0.16), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(0, 169, 255, 0.13), transparent 35%),
    linear-gradient(160deg, #030408 0%, #07111d 45%, #030509 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.16;
  z-index: 1000;
  background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 100% 4px;
  mix-blend-mode: overlay;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, #0b1828 0%, #05070b 62%);
  transition: opacity .55s ease, transform .55s ease;
}
.splash-screen.done { opacity: 0; transform: scale(1.02); pointer-events: none; }
.splash-card {
  position: relative;
  width: min(340px, calc(100vw - 42px));
  padding: 34px;
  border-radius: 32px;
  background: linear-gradient(160deg, rgba(14, 24, 39, .92), rgba(5, 10, 18, .92));
  border: 1px solid rgba(63, 244, 255, .24);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .6), inset 0 0 60px rgba(43, 255, 212, .05);
  overflow: hidden;
  text-align: center;
}
.splash-card .orb {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66, 244, 255, .28), transparent 68%);
  filter: blur(8px);
  left: 50%; top: -55px;
  transform: translateX(-50%);
}
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  width: 74px;
  height: 74px;
  border-radius: 24px;
  color: var(--green);
  font-weight: 900;
  letter-spacing: -1px;
  border: 1px solid rgba(46, 255, 200, .42);
  background: rgba(9, 255, 198, .08);
  box-shadow: 0 0 36px rgba(46, 255, 200, .18);
}
.splash-card h1 { margin: 0; font-size: 2.3rem; letter-spacing: -1.5px; }
.splash-card p { margin: 8px 0 22px; color: var(--muted); }
.boot-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.boot-bar span {
  display: block;
  width: 48%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  animation: boot 1.4s ease-in-out infinite alternate;
}
@keyframes boot { to { width: 100%; } }
.dots { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px);
  transition: opacity .35s ease;
}
.app-shell.is-hidden { opacity: 0; pointer-events: none; }

.topbar {
  position: sticky;
  top: env(safe-area-inset-top);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin: 0 auto 14px;
  max-width: 1180px;
  border: 1px solid rgba(91, 124, 255, .28);
  border-radius: 16px;
  background: rgba(7, 9, 15, .86);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.icon-btn, .pill, .primary-btn, .ghost-btn, .floating-btn, .nav-btn, .quick-menu button {
  border: 0;
  color: var(--text);
  cursor: pointer;
}
.icon-btn {
  width: 42px; height: 42px;
  border-radius: 13px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.topbar-title { min-width: 0; flex: 1; display: flex; align-items: baseline; gap: 7px; }
.topbar-title strong { letter-spacing: .3px; }
.topbar-title small { color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
  flex: 0 0 auto;
}
.topbar-actions { display: flex; gap: 6px; }
.pill {
  padding: 9px 11px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 800;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}
.pill.safe { color: var(--green); border-color: rgba(46,255,200,.32); box-shadow: inset 0 0 18px rgba(46,255,200,.06); }

.quick-menu {
  position: fixed;
  z-index: 90;
  top: calc(68px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  padding: 12px;
  max-width: 420px;
  border-radius: 18px;
  background: rgba(5, 7, 11, .94);
  border: 1px solid rgba(66, 244, 255, .18);
  box-shadow: var(--shadow);
}
.quick-menu button {
  width: 100%;
  display: block;
  text-align: left;
  padding: 14px;
  margin: 4px 0;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
}

.view { display: none; width: min(1180px, 100%); margin: 0 auto; }
.view.active { display: block; animation: rise .25s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.panel {
  position: relative;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(16, 24, 39, .86), rgba(6, 10, 17, .86));
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.03);
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(66,244,255,.10), transparent 30%, rgba(46,255,200,.04));
}

.hero-card {
  display: grid;
  gap: 20px;
  padding: 24px;
  margin-bottom: 14px;
}
.eyebrow {
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  font-weight: 900;
}
h1, h2, p { position: relative; }
h1 { margin: 4px 0 8px; font-size: clamp(2.2rem, 10vw, 4.4rem); line-height: .92; letter-spacing: -2px; }
h2 { margin: 4px 0; font-size: 1.45rem; letter-spacing: -.5px; }
p { color: var(--muted); line-height: 1.55; }

.primary-btn, .ghost-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 14px;
  font-weight: 900;
}
.primary-btn {
  background: linear-gradient(135deg, rgba(0,169,255,.96), rgba(46,255,200,.75));
  color: #001018;
  box-shadow: 0 12px 36px rgba(0, 169, 255, .18);
}
.ghost-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.stat-card {
  padding: 18px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat-icon { font-size: 1.5rem; opacity: .9; }
.stat-card strong { font-size: 2.35rem; color: var(--cyan); letter-spacing: -1px; }
.stat-card span:last-child { color: var(--muted); font-weight: 700; font-size: .82rem; }

.section-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.brand-panel, .feed-preview, .scanner-card, .settings-card { padding: 18px; margin-bottom: 14px; }
.tiny-badge, .scan-state, .mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: .72rem;
  font-weight: 900;
  color: var(--cyan);
  background: rgba(0,169,255,.1);
  border: 1px solid rgba(0,169,255,.22);
  white-space: nowrap;
}
.tiny-badge.orange { color: var(--orange); background: rgba(255,178,57,.1); border-color: rgba(255,178,57,.26); }
.tiny-badge.danger, .pill.danger { color: #fff; background: rgba(255,90,111,.14); border-color: rgba(255,90,111,.38); box-shadow: inset 0 0 18px rgba(255,90,111,.08), 0 0 18px rgba(255,90,111,.08); }

.brand-bars { position: relative; display: grid; gap: 12px; }
.brand-row { display: grid; gap: 6px; }
.brand-label { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; }
.brand-track { height: 7px; background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden; }
.brand-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan-2), var(--green)); }
.brand-row:nth-child(2) .brand-fill { background: var(--purple); }
.brand-row:nth-child(3) .brand-fill { background: #ff66b3; }
.brand-row:nth-child(4) .brand-fill { background: var(--orange); }
.brand-row:nth-child(5) .brand-fill { background: #b2c3d5; }

.control-row, .map-actions { position: relative; display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.neon-panel { border-color: rgba(46,255,200,.42); box-shadow: 0 22px 80px rgba(0,0,0,.52), inset 0 0 50px rgba(46,255,200,.05); }
.terminal {
  position: relative;
  min-height: 320px;
  max-height: 58vh;
  overflow: auto;
  padding: 12px;
  border-radius: 18px;
  background:
    linear-gradient(rgba(46,255,200,.04), rgba(46,255,200,.015)),
    rgba(0, 12, 9, .72);
  border: 1px solid rgba(46,255,200,.24);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color: #d8fff5;
  box-shadow: inset 0 0 32px rgba(46,255,200,.06);
}
.small-terminal { min-height: 170px; max-height: 220px; }
.term-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 4px 0;
  font-size: .78rem;
  border-bottom: 1px solid rgba(255,255,255,.035);
}
.term-line b { color: var(--green); }
.term-line .sig { color: var(--orange); font-weight: 900; }
.term-line .name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.wifi-list { position: relative; display: grid; gap: 10px; }
.wifi-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.06);
}
.wifi-item strong { color: var(--text); }
.wifi-item small { color: var(--muted); }
.wifi-item .dbm { color: var(--orange); font-weight: 900; }

.ops-panel {
  border-color: rgba(255, 90, 111, .34);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 90, 111, .15), transparent 34%),
    linear-gradient(145deg, rgba(18, 8, 14, .94), rgba(4, 5, 9, .92));
  box-shadow: 0 22px 80px rgba(0,0,0,.58), inset 0 0 50px rgba(255, 90, 111, .045);
}
.ops-panel[hidden] { display: none !important; }
.danger-eyebrow { color: var(--red); text-shadow: 0 0 14px rgba(255,90,111,.38); }
.ops-subtext { margin: 4px 0 0; font-size: .84rem; color: #ffb8c1; }
.target-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}
.target-pill {
  display: grid;
  gap: 3px;
  text-align: left;
  min-width: 0;
  padding: 11px;
  border-radius: 15px;
  color: var(--text);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
}
.target-pill.active {
  background: rgba(255,90,111,.16);
  border-color: rgba(255,90,111,.42);
  box-shadow: inset 0 0 18px rgba(255,90,111,.06);
}
.target-pill strong { color: var(--red); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; }
.target-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; }
.target-pill small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-actions {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.op-btn {
  min-height: 46px;
  padding: 11px 12px;
  border-radius: 15px;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(135deg, rgba(255,90,111,.24), rgba(133,103,255,.14));
  border: 1px solid rgba(255,90,111,.25);
  box-shadow: inset 0 0 20px rgba(255,255,255,.03);
}
.op-btn:active { transform: scale(.98); }
.ops-meter {
  position: relative;
  height: 8px;
  margin-bottom: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.07);
}
.ops-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  transition: width .28s ease;
  background: linear-gradient(90deg, var(--red), var(--orange));
  box-shadow: 0 0 20px rgba(255,90,111,.32);
}
.ops-terminal {
  min-height: 180px;
  max-height: 280px;
  background:
    linear-gradient(rgba(255,90,111,.05), rgba(255,90,111,.015)),
    rgba(14, 3, 8, .76);
  border-color: rgba(255,90,111,.22);
  color: #ffe7eb;
}
.ops-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 5px 0;
  font-size: .76rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.ops-line b { color: var(--red); }
.ops-line span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ops-line em { color: var(--orange); font-style: normal; font-weight: 900; }
.unsafe-mode .topbar {
  border-color: rgba(255,90,111,.28);
  box-shadow: var(--shadow), inset 0 0 26px rgba(255,90,111,.035);
}


.driver-panel { padding: 16px; margin-bottom: 12px; }
.mode-badge { color: #fff; background: rgba(255, 90, 111, .14); border-color: rgba(255,90,111,.32); margin-bottom: 10px; }
.map-head p { margin: 4px 0 0; font-size: .86rem; }
.searchbar {
  position: relative;
  display: flex;
  gap: 8px;
}
.searchbar input, .setting-row select {
  width: 100%;
  min-height: 48px;
  color: var(--text);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
}
.searchbar input:focus, .setting-row select:focus { border-color: rgba(66,244,255,.5); box-shadow: 0 0 0 4px rgba(66,244,255,.08); }
.searchbar button {
  width: 52px;
  border-radius: 14px;
  background: rgba(0,169,255,.18);
  border: 1px solid rgba(0,169,255,.24);
  color: var(--text);
}

.map-wrap {
  height: min(72vh, 760px);
  min-height: 520px;
  overflow: hidden;
  background: #070b10;
}
.map { position: absolute; inset: 0; z-index: 1; background: #06090f; }
.leaflet-container { background: #06090f; font-family: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  color: var(--text);
  background: rgba(11, 13, 22, .96);
  border: 1px solid rgba(66,244,255,.18);
  box-shadow: var(--shadow);
}
.leaflet-popup-content { margin: 14px; min-width: 220px; }
.popup-card { display: grid; gap: 8px; }
.popup-card h3 { margin: 0; font-size: 1rem; }
.popup-grid { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; font-size: .82rem; }
.popup-grid span:nth-child(odd) { color: var(--muted); }
.popup-grid span:nth-child(even) { font-weight: 800; text-align: right; }
.popup-card a { color: #001018; background: var(--cyan); text-decoration: none; text-align: center; padding: 10px; border-radius: 12px; font-weight: 900; }
.leaflet-control-zoom a { color: var(--text) !important; background: rgba(8, 10, 17, .95) !important; border-color: rgba(255,255,255,.1) !important; }
.leaflet-control-attribution { background: rgba(8, 10, 17, .74) !important; color: rgba(255,255,255,.65) !important; }
.leaflet-control-attribution a { color: var(--cyan) !important; }
.camera-marker { filter: drop-shadow(0 0 8px rgba(0, 169, 255, .75)); }
.user-marker { filter: drop-shadow(0 0 10px rgba(255,90,111,.8)); }

.map-hud {
  pointer-events: none;
  position: absolute;
  z-index: 8;
  display: grid;
  gap: 8px;
}
.map-hud span {
  display: block;
  width: fit-content;
  max-width: min(76vw, 430px);
  padding: 9px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 7, 11, .82);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 12px 36px rgba(0,0,0,.35);
  backdrop-filter: blur(14px);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 900;
  font-size: .76rem;
}
.top-left { top: 12px; left: 12px; }
.bottom-left { left: 12px; bottom: 12px; }
.floating-btn {
  position: absolute;
  right: 14px;
  bottom: 18px;
  z-index: 9;
  width: 50px;
  height: 50px;
  border-radius: 17px;
  background: rgba(5,7,11,.86);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  font-weight: 900;
  font-size: 1.2rem;
}

.setting-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.setting-row strong { display: block; margin-bottom: 3px; }
.setting-row small { color: var(--muted); line-height: 1.45; }
.setting-row select { color-scheme: dark; }
.switch-row { grid-template-columns: 1fr auto; align-items: center; }
.switch-row input { width: 24px; height: 24px; accent-color: var(--green); }
.notice {
  position: relative;
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,178,57,.08);
  border: 1px solid rgba(255,178,57,.16);
  color: #ffe6b8;
  line-height: 1.5;
}

.bottom-nav {
  position: fixed;
  z-index: 60;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 24px;
  background: rgba(5, 7, 11, .88);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 70px rgba(0,0,0,.52);
}
.nav-btn {
  display: grid;
  gap: 3px;
  place-items: center;
  min-height: 54px;
  border-radius: 17px;
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
}
.nav-btn span { font-size: 1.05rem; }
.nav-btn.active {
  color: var(--text);
  background: rgba(66, 244, 255, .12);
  border: 1px solid rgba(66,244,255,.14);
}

@media (min-width: 760px) {
  .app-shell { padding-left: 18px; padding-right: 18px; }
  .hero-card { grid-template-columns: 1fr auto; align-items: center; padding: 34px; }
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .view-dashboard { display: none; }
  .view-dashboard.active { display: block; }
  .view-scanner.active { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
  .scanner-card { margin-bottom: 0; }
  .view-map.active { display: grid; grid-template-columns: 380px 1fr; gap: 14px; align-items: stretch; }
  .driver-panel { margin-bottom: 0; height: fit-content; position: sticky; top: 86px; }
  .map-wrap { height: calc(100vh - 126px); min-height: 650px; }
  .setting-row { grid-template-columns: 1fr 290px; align-items: center; }
  .switch-row { grid-template-columns: 1fr auto; }
}

@media (max-width: 410px) {
  .topbar-title small { display: none; }
  .pill { padding: 8px 9px; font-size: .68rem; }
  .hero-card, .brand-panel, .feed-preview, .scanner-card, .settings-card { padding: 15px; }
  .map-wrap { min-height: 500px; height: 70vh; }
  .terminal { font-size: .74rem; }
}

/* ProxySniff v1.1 map hardening: keeps Leaflet usable even if CDN CSS loads late/fails. */
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}
.leaflet-container {
  overflow: hidden;
  touch-action: pan-x pan-y;
  -webkit-tap-highlight-color: transparent;
}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.leaflet-safari .leaflet-tile { image-rendering: -webkit-optimize-contrast; }
.leaflet-zoom-box {
  width: 0;
  height: 0;
  box-sizing: border-box;
  z-index: 800;
}
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }
.leaflet-control {
  position: relative;
  z-index: 800;
  pointer-events: auto;
}
.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}
.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }
.leaflet-control { float: left; clear: both; }
.leaflet-right .leaflet-control { float: right; }
.leaflet-top .leaflet-control { margin-top: 10px; }
.leaflet-bottom .leaflet-control { margin-bottom: 10px; }
.leaflet-left .leaflet-control { margin-left: 10px; }
.leaflet-right .leaflet-control { margin-right: 10px; }
.leaflet-control-zoom a {
  display: block;
  width: 34px;
  height: 34px;
  line-height: 34px;
  text-align: center;
  text-decoration: none;
}
.leaflet-popup {
  position: absolute;
  text-align: center;
  margin-bottom: 20px;
}
.leaflet-popup-content-wrapper { text-align: left; border-radius: 16px; }
.leaflet-popup-content { line-height: 1.4; }
.leaflet-popup-tip-container {
  width: 40px;
  height: 20px;
  position: absolute;
  left: 50%;
  margin-left: -20px;
  overflow: hidden;
  pointer-events: none;
}
.leaflet-popup-tip {
  width: 17px;
  height: 17px;
  padding: 1px;
  margin: -10px auto 0;
  transform: rotate(45deg);
}
.leaflet-container a.leaflet-popup-close-button {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  text-align: center;
  width: 24px;
  height: 24px;
  font: 20px/24px Tahoma, Verdana, sans-serif;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  background: transparent;
}
.leaflet-container a.leaflet-popup-close-button:hover { color: #fff; }

.fullscreen-btn {
  top: 14px;
  right: 14px;
  bottom: auto;
  font-size: 1.35rem;
}

.map-fullscreen {
  overflow: hidden;
  background: #03060a;
}
.map-fullscreen .app-shell {
  padding: 0 !important;
  min-height: 100dvh;
}
.map-fullscreen .topbar,
.map-fullscreen .bottom-nav,
.map-fullscreen .driver-panel,
.map-fullscreen .quick-menu,
.map-fullscreen .scanlines {
  display: none !important;
}
.map-fullscreen .view {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}
.map-fullscreen .view-map.active {
  display: block !important;
}
.map-fullscreen .map-wrap {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: 0 !important;
}
.map-fullscreen .map-hud.top-left {
  top: calc(12px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
}
.map-fullscreen .map-hud.bottom-left {
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: calc(12px + env(safe-area-inset-left));
}
.map-fullscreen .fullscreen-btn {
  top: calc(14px + env(safe-area-inset-top));
  right: calc(14px + env(safe-area-inset-right));
  border-color: rgba(66,244,255,.38);
  background: rgba(0, 169, 255, .22);
}
.map-fullscreen #recenterBtn {
  right: calc(14px + env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
}

/* ProxySniff v1.2: keep Leaflet zoom controls above the recenter button. */
.map-wrap .leaflet-bottom.leaflet-right .leaflet-control-zoom {
  margin-bottom: 82px !important;
}
.map-fullscreen .map-wrap .leaflet-bottom.leaflet-right .leaflet-control-zoom {
  margin-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
}
@media (max-width: 520px) {
  .map-wrap .leaflet-bottom.leaflet-right .leaflet-control-zoom {
    margin-bottom: 86px !important;
  }
}

/* v1.3 Follow Mode: red means the map is actively locking back to GPS. */
.primary-btn.following {
  background: linear-gradient(135deg, rgba(255, 58, 84, .98), rgba(255, 130, 82, .88));
  color: #fff;
  border: 1px solid rgba(255, 125, 125, .42);
  box-shadow: 0 12px 34px rgba(255, 64, 91, .24), inset 0 0 22px rgba(255,255,255,.08);
}
.primary-btn.following::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 14px rgba(255,255,255,.85);
}

@media (max-width: 410px) {
  .target-strip, .ops-actions { grid-template-columns: 1fr; }
}


/* ProxySniff logo/icon integration - visual only. */
.brand-logo {
  position: relative;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.splash-logo {
  width: 142px;
  height: 142px;
  margin: 0 auto 12px;
  filter: drop-shadow(0 0 24px rgba(66, 244, 255, .38)) drop-shadow(0 18px 32px rgba(0, 0, 0, .55));
}
.topbar-logo {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  object-fit: contain;
  align-self: center;
  filter: drop-shadow(0 0 9px rgba(66, 244, 255, .32));
}
@media (max-width: 410px) {
  .splash-logo {
    width: 126px;
    height: 126px;
  }
  .topbar-logo {
    width: 23px;
    height: 23px;
  }
}
