:root {
  --primary: #2563eb;
  --accent: #8b5cf6;
  --accent2: #06b6d4;
  --glass: rgba(10, 20, 50, 0.72);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text: #f0f6ff;
  --muted: rgba(240, 246, 255, 0.5);
  --map-bg: #0a1222;
  --panel-w: 320px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Poppins", sans-serif;
  background: var(--map-bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 58px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  background: rgba(5, 10, 25, 0.85);
  backdrop-filter: blur(28px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}
.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.5);
}
.dot {
  color: var(--accent2);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a {
  padding: 7px 16px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}
.nav-links a.active {
  color: var(--accent2);
}
.nav-sep {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Route bar */
.route-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 7px 16px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}
.route-pill:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.3);
}
.route-pill i {
  color: var(--accent2);
}
.nav-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.nav-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.nav-icon-btn.active {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(37, 99, 235, 0.4);
  color: var(--accent2);
}

/* ── MAP CONTAINER ── */
.map-container {
  position: fixed;
  inset: 0;
  padding-top: 58px;
  background: var(--map-bg);
  overflow: hidden;
}
.map-svg {
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center center;
}

/* ── SIDE PANEL ── */
.side-panel {
  position: fixed;
  top: 58px;
  right: 0;
  bottom: 0;
  width: var(--panel-w);
  z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(200%);
  border-left: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.panel-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.panel-header h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--muted);
  margin-bottom: 14px;
}
.search-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 9px 14px;
}
.search-mini i {
  color: var(--accent2);
  font-size: 0.82rem;
  flex-shrink: 0;
}
.search-mini input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 0.8rem;
}
.search-mini input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* location card */
.loc-card {
  margin: 16px 16px 0;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 14px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.loc-card::before {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.3), transparent 70%);
}
.loc-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.loc-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}
.loc-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 3px;
}
.loc-info p {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.5;
}
.loc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  padding: 3px 10px;
  border-radius: 100px;
  margin-top: 4px;
}
.loc-badge.open {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.25);
}
.loc-badge.busy {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.25);
}
.loc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.loc-stat {
  text-align: center;
  padding: 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
}
.loc-stat .val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent2);
  display: block;
}
.loc-stat .lbl {
  font-size: 0.62rem;
  color: var(--muted);
}
.btn-navigate {
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-navigate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.5);
}

/* POI list */
.poi-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.poi-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--muted);
  margin-bottom: 10px;
  margin-top: 4px;
  font-weight: 600;
}
.poi-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  margin-bottom: 7px;
  transition: all 0.2s;
}
.poi-item:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.25);
}
.poi-item.selected {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.4);
}
.poi-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.poi-item h4 {
  font-size: 0.8rem;
  font-weight: 600;
}
.poi-item span {
  font-size: 0.68rem;
  color: var(--muted);
  display: block;
}
.poi-dist {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--accent2);
  font-weight: 600;
  white-space: nowrap;
}

/* ── CONTROLS ── */
.map-controls {
  position: fixed;
  left: 24px;
  bottom: 100px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ctrl-btn {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(10, 20, 50, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.ctrl-btn:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(37, 99, 235, 0.4);
  transform: scale(1.05);
}
.ctrl-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

/* ── BOTTOM BAR ── */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: var(--panel-w);
  z-index: 150;
  padding: 14px 24px;
  background: rgba(5, 10, 25, 0.8);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 20px;
}
.layer-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.layer-chip {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}
.layer-chip.on {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(37, 99, 235, 0.4);
  color: #60a5fa;
}
.layer-chip.off {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}
.layer-chip:hover {
  border-color: rgba(37, 99, 235, 0.3);
}
.coord-display {
  margin-left: auto;
  font-family: "Space Mono", monospace;
  font-size: 0.65rem;
  color: var(--muted);
  display: flex;
  gap: 12px;
}
.coord-val {
  color: rgba(96, 165, 250, 0.8);
}

.nav-links a i {
  margin-right: 5px;
  font-size: 0.75rem;
}

/* ── ANIMATIONS ── */
@keyframes pulse-ring {
  0% {
    r: 14;
    opacity: 0.8;
  }
  100% {
    r: 30;
    opacity: 0;
  }
}
@keyframes dash-flow {
  to {
    stroke-dashoffset: -40;
  }
}
@keyframes glow-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 5px #3b82f6)
      drop-shadow(0 0 12px rgba(59, 130, 246, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 10px #3b82f6)
      drop-shadow(0 0 24px rgba(139, 92, 246, 0.6));
  }
}
@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

.pin-pulse {
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.route-animated {
  animation: dash-flow 1.2s linear infinite;
}
.route-glow {
  animation: glow-pulse 2s ease-in-out infinite;
}

::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
