:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --neon-cyan: #00f0ff;
  --neon-pink: #ff007f;
  --neon-green: #10b981;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-glass: rgba(15, 23, 42, 0.92);
  --border-color: #475569;
  --text-main: #ffffff;
  --text-secondary: #e2e8f0;
  --text-muted: #cbd5e1;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar {
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(8px);
}

/* Cards */
.card-custom {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.card-header-custom {
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

/* Forms & Inputs - High Contrast */
.form-label {
  color: #f8fafc !important;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form-text {
  color: #cbd5e1 !important;
  font-size: 0.825rem;
}

.form-control, 
.form-select {
  background-color: #0b1120 !important;
  color: #ffffff !important;
  border: 1px solid #475569 !important;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
}

.form-control:focus, 
.form-select:focus {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

.form-control::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}

.form-select option {
  background-color: #1e293b !important;
  color: #ffffff !important;
  padding: 8px;
}

/* Dropzone styling */
.dropzone-container {
  border: 2px dashed #64748b;
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.6);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.dropzone-container:hover, 
.dropzone-container.dragover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.dropzone-icon {
  font-size: 2.8rem;
  color: #60a5fa;
  margin-bottom: 0.75rem;
}

/* Map Dashboard Layout */
.map-viewport-container {
  height: calc(100vh - 120px);
  min-height: 600px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

#map {
  width: 100%;
  height: 100%;
  background: #0b1120;
}

/* ==========================================================
   Google Maps Styled Map Controls Card (Collapsible & Light UI)
   ========================================================== */

.map-control-card {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 1000;
  width: 380px;
  max-height: calc(100% - 30px);
  background: #ffffff;
  color: #202124;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.map-control-card.collapsed {
  transform: translateX(120%);
  opacity: 0;
  pointer-events: none;
}

.map-control-header {
  background: #ffffff;
  border-bottom: 1px solid #ebebeb;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.map-control-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a0dab; /* Classic Google Blue */
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-close-btn {
  color: #5f6368;
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.map-close-btn:hover {
  background: #f1f3f4;
  color: #202124;
}

/* Floating Open Controls Button (visible when card is collapsed) */
.map-open-controls-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 990;
  background: #ffffff;
  color: #1a73e8;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-open-controls-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
  color: #1557b0;
}

.map-open-controls-btn.d-none {
  display: none !important;
}

.map-control-body {
  overflow-y: auto;
  padding: 14px 16px;
  font-size: 13px;
  color: #202124;
}

/* Light High-Contrast Form Controls in Card */
.map-control-card .form-label {
  color: #202124 !important;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.map-control-card .form-select,
.map-control-card .form-control {
  background-color: #ffffff !important;
  color: #202124 !important;
  border: 1px solid #dadce0 !important;
  border-radius: 4px !important;
  padding: 6px 10px;
  font-size: 13px;
}

.map-control-card .form-select:focus,
.map-control-card .form-control:focus {
  border-color: #1a73e8 !important;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2) !important;
}

.map-control-card .form-select option {
  background-color: #ffffff !important;
  color: #202124 !important;
}

/* Opacity Slider Container */
.map-control-card .opacity-slider-container {
  background: #f8f9fa;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  border: 1px solid #dadce0;
}

/* Metrics Card */
.map-control-card .metrics-box {
  background: #f8f9fa;
  border: 1px solid #dadce0;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.map-control-card .metrics-item {
  background: #ffffff;
  border: 1px solid #e8eaed;
  border-radius: 4px;
  padding: 6px;
}

/* Navigation Tabs */
.map-control-card .nav-tabs {
  border-bottom: 1px solid #dadce0;
}

.map-control-card .nav-tabs .nav-link {
  color: #5f6368;
  font-size: 12px;
  font-weight: 500;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 6px 8px;
}

.map-control-card .nav-tabs .nav-link:hover {
  color: #202124;
}

.map-control-card .nav-tabs .nav-link.active {
  color: #1a73e8;
  background: transparent;
  border-bottom: 2px solid #1a73e8;
  font-weight: 600;
}

/* GCP Table */
.map-control-card .gcp-table {
  font-size: 12px;
  width: 100%;
  color: #202124;
}

.map-control-card .gcp-table th {
  color: #5f6368;
  font-size: 11px;
  font-weight: 600;
  border-bottom: 1px solid #dadce0;
  padding: 6px 4px;
}

.map-control-card .gcp-table td {
  padding: 6px 4px;
  border-bottom: 1px solid #ebebeb;
  color: #202124;
}

.map-control-card .gcp-row-clickable:hover {
  background: #f1f3f4;
}

/* Quick Map Toolbar (Top Left) */
.map-quick-toolbar {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-toolbar-btn {
  background: #ffffff;
  color: #202124;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}

.map-toolbar-btn:hover {
  background: #f8f9fa;
  border-color: #1a73e8;
  color: #1a73e8;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.map-toolbar-btn.active {
  background: #e8f0fe;
  border-color: #1a73e8;
  color: #1a73e8;
}
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

/* JSON display block */
.json-inspector {
  background: #020617;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  font-family: monospace;
  font-size: 0.78rem;
  color: #38bdf8;
  max-height: 200px;
  overflow: auto;
}

/* ==========================================================
   Pulsing Glowing Neon Vector Markers & Overlays
   ========================================================== */

.mapbox-neon-marker {
  position: relative;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.radar-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--neon-cyan);
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan);
  z-index: 2;
}

.radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--neon-cyan);
  opacity: 0.8;
  animation: radar-pulse 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  z-index: 1;
}

.radar-ring.ring-2 {
  animation-delay: 0.75s;
}

@keyframes radar-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 1;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.4);
    opacity: 0;
  }
}

/* Neon Polygon Glowing Animation */
@keyframes neon-line-glow {
  0% {
    filter: drop-shadow(0 0 3px #00f0ff) drop-shadow(0 0 8px #00f0ff);
  }
  50% {
    filter: drop-shadow(0 0 7px #00f0ff) drop-shadow(0 0 15px #38bdf8);
  }
  100% {
    filter: drop-shadow(0 0 3px #00f0ff) drop-shadow(0 0 8px #00f0ff);
  }
}

/* ==========================================================
   Classic Google Maps InfoWindow & Tooltip Callout Card Design
   ========================================================== */

.mapboxgl-popup {
  z-index: 1200;
  max-width: 420px !important;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

.mapboxgl-popup-content {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #ababab !important;
  border-radius: 4px !important;
  padding: 14px 16px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  min-width: 290px;
}

/* Classic Google Maps Pointer Stem */
.mapboxgl-popup-anchor-top .mapboxgl-popup-tip {
  border-bottom-color: #ffffff !important;
  border-bottom-width: 14px !important;
}
.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
  border-top-color: #ffffff !important;
  border-top-width: 16px !important;
  border-left-width: 12px !important;
  border-right-width: 12px !important;
}
.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
  border-right-color: #ffffff !important;
  border-right-width: 14px !important;
}
.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
  border-left-color: #ffffff !important;
  border-left-width: 14px !important;
}

.mapboxgl-popup-close-button {
  color: #777777 !important;
  font-size: 16px !important;
  font-weight: normal !important;
  top: 6px !important;
  right: 8px !important;
  padding: 2px 6px !important;
  background: transparent !important;
  border-radius: 2px !important;
}
.mapboxgl-popup-close-button:hover {
  color: #000000 !important;
  background-color: #e8e8e8 !important;
}

/* Classic Google Maps InfoWindow Content Structure */
.gmap-classic-card {
  font-size: 12px;
  line-height: 1.35;
  color: #222222;
}

.gmap-classic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-right: 18px;
}

.gmap-classic-title-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.gmap-classic-title {
  font-size: 15px;
  font-weight: bold;
  color: #1a0dab; /* Classic Google Blue */
  margin: 0;
  text-decoration: none;
  cursor: pointer;
}

.gmap-classic-title:hover {
  text-decoration: underline;
}

.gmap-star-fav {
  color: #888888;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
}
.gmap-star-fav:hover {
  color: #fbbc04;
}

.gmap-classic-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.gmap-classic-details {
  flex: 1;
  font-size: 12px;
  color: #333333;
}

.gmap-classic-line {
  margin-bottom: 2px;
  color: #222222;
}

.gmap-classic-link {
  color: #1a0dab;
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  display: inline-block;
  margin-top: 1px;
  margin-bottom: 3px;
}

.gmap-rating-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}

.gmap-stars-red {
  color: #ea4335; /* Classic Red Stars */
  font-size: 12px;
  letter-spacing: 1px;
}

.gmap-reviews-count {
  color: #1a0dab;
  font-size: 11px;
  text-decoration: none;
}

.gmap-classic-thumbnail {
  width: 84px;
  height: 64px;
  border: 1px solid #cccccc;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  background-color: #f0f0f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Bottom Action Links Bar */
.gmap-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #ebebeb;
  padding-top: 8px;
  margin-top: 4px;
  font-size: 12px;
}

.gmap-action-link {
  color: #1a0dab;
  text-decoration: none;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.gmap-action-link:hover {
  text-decoration: underline;
}

/* Classic Google Red Map Pin Marker */
.gmap-classic-pin {
  width: 28px;
  height: 38px;
  cursor: pointer;
  position: relative;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.5));
  transition: transform 0.15s ease;
}

.gmap-classic-pin:hover {
  transform: translateY(-4px) scale(1.08);
}

/* Mapbox Navigation & Geolocation Controls */
.mapboxgl-ctrl-group {
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
  overflow: hidden;
}

.mapboxgl-ctrl-group button {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.mapboxgl-ctrl-group button:last-child {
  border-bottom: none !important;
}
.mapboxgl-ctrl-group button .mapboxgl-ctrl-icon {
  filter: invert(1) brightness(1.5) !important;
}

/* User Profile Avatar & Demo Pill Badges */
.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f0ff, #3b82f6);
  color: #0b0f19;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.demo-pill-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  padding: 4px 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

