/* ── Track Live — popup button ────────────────────────────────────── */
.popup-btn-track   { background: #f59e0b; }
.popup-btn-untrack { background: #ef4444; }  /* red when actively tracking */

/* ── Sharp trail layer — animated flowing dash ────────────────────── */
/* Leaflet sets className on the SVG <path> element directly */
.tl-sharp {
  stroke-dasharray: 12, 5;
  animation: tl-flow 0.8s linear infinite;
}
@keyframes tl-flow {
  from { stroke-dashoffset: 17; }
  to   { stroke-dashoffset: 0;  }
}

/* ── Bearing arrow markers ────────────────────────────────────────── */
.tl-arrow {
  font-size: 12px;
  line-height: 1;
  display: block;
  text-align: center;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

/* ── Sonar pulse rings on tracked vehicle marker ──────────────────── */
.tl-marker-active {
  overflow: visible !important;
}

/* Two <div class="tl-pulse-ring"> injected by JS into the marker element */
.tl-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 4px solid var(--tl-color, #3b82f6);
  background: transparent;
  animation: tl-sonar 1.6s ease-out infinite;
  pointer-events: none;
  z-index: 1000;
}
/* Second ring fires 0.8 s later for continuous double-pulse */
.tl-pulse-ring-2 {
  animation-delay: 0.8s;
}

@keyframes tl-sonar {
  0%   { transform: scale(0.3); opacity: 1;   }
  60%  { opacity: 0.5; }
  100% { transform: scale(4.2); opacity: 0;   }
}

/* ── Tracking panel ───────────────────────────────────────────────── */
.tl-panel {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  background: #0f172a;
  border: 1px solid #1e3a5f;
  border-radius: 12px;
  min-width: 268px;
  max-width: 360px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
  pointer-events: auto;
}

.tl-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #1e293b;
}

.tl-panel-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tl-panel-count { color: #3b82f6; }

.tl-stop-all-btn {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.tl-stop-all-btn:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

/* ── Per-vehicle row ──────────────────────────────────────────────── */
.tl-panel-body { padding: 4px 0; }

.tl-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  transition: background 0.1s;
}
.tl-row:hover { background: #1a2540; }

.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: tl-dot-pulse 1.5s ease-in-out infinite;
}
@keyframes tl-dot-pulse {
  0%, 100% { opacity: 1;   transform: scale(1);    }
  50%       { opacity: 0.5; transform: scale(1.35); }
}

.tl-row-reg {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  font-family: monospace;
  flex: 1;
  letter-spacing: 0.02em;
}

.tl-row-speed {
  font-size: 12px;
  color: #64748b;
  min-width: 72px;
  text-align: right;
}

.tl-row-stop {
  background: #1e293b;
  color: #ef4444;
  border: 1px solid #334155;
  border-radius: 5px;
  width: 26px;
  height: 26px;
  font-size: 11px;
  