/* ==========================================================================
   GeoPulse Maps Explorer 3D PRO - Ultra-Polished Modern Design System
   ========================================================================== */

:root {
  --bg-dark: #070a14;
  --bg-panel: rgba(13, 19, 36, 0.92);
  --bg-panel-solid: #0d1324;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-card-active: rgba(59, 130, 246, 0.16);
  
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.2);
  --border-active: rgba(59, 130, 246, 0.65);
  --border-glow: rgba(59, 130, 246, 0.45);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: #60a5fa;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
  
  --petrol-color: #f59e0b;
  --cng-color: #10b981;
  --food-color: #f97316;
  --hospital-color: #ec4899;
  --atm-color: #3b82f6;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 16px 45px -8px rgba(0, 0, 0, 0.75);
  --glow-primary: 0 0 20px rgba(59, 130, 246, 0.4);
  --glow-cyan: 0 0 25px rgba(6, 182, 212, 0.45);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-full: 9999px;
  
  --header-height: 70px;
  --sidebar-width: 420px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', var(--font-sans);
}

/* ==========================================================================
   Universal Reset (Zero default browser white buttons)
   ========================================================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

button {
  cursor: pointer;
  user-select: none;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ==========================================================================
   Google Places Autocomplete Dropdown Dark Mode Overrides (.pac-container)
   Fixes Image 1: Replaces ugly default white Google Places list
   ========================================================================== */
.pac-container {
  background-color: #0e1424 !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
  border-radius: 12px !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 15px rgba(59, 130, 246, 0.2) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  font-family: var(--font-sans) !important;
  padding: 6px !important;
  margin-top: 6px !important;
  z-index: 99999 !important;
}

.pac-item {
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding: 10px 14px !important;
  font-size: 0.85rem !important;
  color: #cbd5e1 !important;
  cursor: pointer !important;
  border-radius: 8px !important;
  transition: all 0.15s ease !important;
  line-height: 1.4 !important;
}

.pac-item:hover, .pac-item-selected {
  background-color: rgba(59, 130, 246, 0.22) !important;
  color: #ffffff !important;
}

.pac-item-query {
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  padding-right: 4px !important;
}

.pac-matched {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}

.pac-icon {
  filter: invert(1) hue-rotate(180deg) brightness(1.5) !important;
  margin-top: 4px !important;
}

.pac-item span {
  color: #94a3b8 !important;
}

.hdpi.pac-logo::after {
  filter: invert(0.8) !important;
  padding-right: 8px !important;
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.top-nav {
  height: var(--header-height);
  background: var(--bg-panel);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 14px;
  z-index: 35;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.45);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.1;
}

.pro-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  color: white;
  border-radius: var(--radius-sm);
  -webkit-text-fill-color: white;
  letter-spacing: 0.06em;
}

.brand-text span {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Search Bar */
.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 430px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--text-secondary);
  pointer-events: none;
}

.search-wrapper input {
  width: 100%;
  padding: 10px 74px 10px 40px;
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.86rem;
  transition: all 0.2s ease;
}

.search-wrapper input:focus {
  border-color: var(--primary);
  background: rgba(10, 15, 29, 0.98);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

#voice-search-btn {
  position: absolute;
  right: 36px;
  color: var(--accent-light);
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#voice-search-btn:hover {
  color: white;
  background: rgba(6, 182, 212, 0.2);
}

#clear-search {
  position: absolute;
  right: 10px;
  color: var(--text-muted);
  display: none;
}

/* Weather & AQI Pill */
.weather-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.weather-chip:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-hover);
}

.weather-chip svg {
  width: 16px;
  height: 16px;
  color: #fbbf24;
}

.weather-temp {
  font-weight: 700;
  color: var(--text-primary);
}

.aqi-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Radius Dropdown */
.radius-dropdown-wrapper {
  position: relative;
}

.radius-trigger-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.radius-trigger-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-hover);
}

.radius-trigger-btn svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.radius-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 120px;
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 5px;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
  animation: fadeIn 0.15s ease;
}

.radius-menu.visible {
  display: flex;
}

.radius-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.radius-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.radius-option.active {
  background: rgba(59, 130, 246, 0.2);
  color: var(--primary-light);
  font-weight: 700;
}

/* Top Buttons */
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--primary), #2563eb);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 8px 15px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(6, 182, 212, 0.3);
}

.btn-accent:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-admin:hover {
  background: rgba(139, 92, 246, 0.3);
  color: white;
}

.btn-sos {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  border-radius: var(--radius-full);
  padding: 8px 13px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-sos:hover {
  background: var(--danger);
  color: white;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
}

.pending-counter {
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  margin-left: 2px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--border-hover);
}

.icon-btn, .icon-btn-subtle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.icon-btn-subtle {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
}

.icon-btn-subtle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Main Content & Sidebar
   ========================================================================== */
.main-content {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-panel);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 12px;
  z-index: 20;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.sidebar.collapsed {
  transform: translateX(-100%);
  position: absolute;
  height: 100%;
}

.category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-tabs::-webkit-scrollbar {
  height: 3px;
}

.category-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 7px 13px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cat-pill svg {
  width: 14px;
  height: 14px;
}

.cat-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.cat-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

.sub-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.sub-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.73rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.sub-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.sub-pill.active {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.5);
  font-weight: 600;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2px;
}

.sidebar-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-light);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

/* Places List */
.places-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
}

.places-list::-webkit-scrollbar {
  width: 4px;
}

.places-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.place-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.place-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.place-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.place-card.active {
  background: var(--bg-card-active);
  border-color: var(--border-active);
}

.place-card.active::before {
  opacity: 1;
}

.place-category-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
}

.place-category-icon.petrol { background: rgba(245, 158, 11, 0.15); color: var(--petrol-color); }
.place-category-icon.cng { background: rgba(16, 185, 129, 0.15); color: var(--cng-color); }
.place-category-icon.restaurant { background: rgba(249, 115, 22, 0.15); color: var(--food-color); }
.place-category-icon.hospital { background: rgba(236, 72, 153, 0.15); color: var(--hospital-color); }
.place-category-icon.atm { background: rgba(59, 130, 246, 0.15); color: var(--atm-color); }

.place-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.place-info-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.place-info h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.best-deal-tag {
  font-size: 0.62rem;
  font-weight: 800;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}

.place-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.fuel-tags-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.fuel-tag {
  font-size: 0.67rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.fuel-tag.petrol { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
.fuel-tag.cng { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.fuel-tag.cuisine { background: rgba(249, 115, 22, 0.18); color: #fb923c; }

.place-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.place-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--warning);
  font-weight: 600;
}

.place-rating svg { width: 11px; height: 11px; fill: currentColor; }

.dist-badge {
  margin-left: auto;
  color: var(--accent-light);
  font-weight: 600;
}

/* Detail Card */
.location-detail-card {
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  display: none;
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.location-detail-card.visible {
  display: flex;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.detail-title-area {
  flex: 1;
}

.detail-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.detail-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-light);
  font-weight: 700;
}

.detail-status-pill {
  font-size: 0.65rem;
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.verified-pill svg { width: 11px; height: 11px; }

.detail-title-area h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.detail-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.detail-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.detail-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.amenity-meta-box {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.amenity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  text-align: center;
}

.amenity-item { display: flex; flex-direction: column; }
.amenity-label { font-size: 0.65rem; color: var(--text-muted); }
.amenity-val { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item svg {
  width: 13px;
  height: 13px;
  color: var(--primary);
}

.detail-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.btn-detail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-detail-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
}

/* ==========================================================================
   Voice Assistant Modal / Real-time Map Place Resolution (Image 2 Fix)
   ========================================================================== */
.voice-hud-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.voice-hud-overlay.visible {
  display: flex;
}

.voice-hud-card {
  width: 100%;
  max-width: 540px;
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), var(--glow-cyan);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  position: relative;
}

.voice-orb {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.6);
  animation: pulseVoiceOrb 1.5s infinite ease-in-out;
}

.voice-orb svg {
  width: 30px;
  height: 30px;
}

@keyframes pulseVoiceOrb {
  0% { transform: scale(0.95); box-shadow: 0 0 20px rgba(6, 182, 212, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 45px rgba(6, 182, 212, 0.8); }
  100% { transform: scale(0.95); box-shadow: 0 0 20px rgba(6, 182, 212, 0.4); }
}

.voice-transcript-box {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
}

/* Rich Detected Place Card inside Voice Modal */
.voice-match-card {
  width: 100%;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  animation: fadeIn 0.2s ease;
}

.voice-match-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.voice-match-details {
  flex: 1;
  min-width: 0;
}

.voice-match-details h4 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-match-details p {
  font-size: 0.76rem;
  color: #93c5fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Multiple Predictions List inside Voice Modal */
.voice-predictions-list {
  width: 100%;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.voice-pred-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.voice-pred-item:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--primary);
}

.voice-pred-item-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

.voice-pred-item-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.voice-hud-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}

.voice-hud-actions button {
  flex: 1;
  justify-content: center;
  padding: 10px;
  font-size: 0.86rem;
}

/* ==========================================================================
   Map Canvas & Floating Perspective Controls
   ========================================================================== */
.map-wrapper {
  flex: 1;
  position: relative;
  height: 100%;
  width: 100%;
  background: #080c16;
}

#map {
  width: 100%;
  height: 100%;
}

.floating-controls {
  position: absolute;
  z-index: 10;
  pointer-events: none;
}

.floating-controls > * {
  pointer-events: auto;
}

.floating-controls.top-left {
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.floating-controls.top-right {
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.floating-controls.bottom-right {
  bottom: 24px;
  right: 24px;
}

/* 3D & Aerial Perspective Control Hub */
.perspective-control-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-header-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-light);
}

.panel-header-title svg {
  width: 13px;
  height: 13px;
}

.perspective-buttons {
  display: flex;
  gap: 5px;
}

.perspective-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.perspective-btn svg {
  width: 14px;
  height: 14px;
}

.perspective-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--border-hover);
}

.perspective-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--glow-primary);
}

.btn-orbit {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.45);
  color: #c4b5fd;
}

.btn-orbit:hover {
  background: rgba(139, 92, 246, 0.35);
  color: white;
}

.btn-orbit.active {
  background: var(--purple);
  color: white;
  animation: pulsePurple 1.5s infinite alternate;
}

@keyframes pulsePurple {
  from { box-shadow: 0 0 4px rgba(139, 92, 246, 0.4); }
  to { box-shadow: 0 0 16px rgba(139, 92, 246, 0.8); }
}

/* Control Groups */
.control-group {
  display: flex;
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 3px;
  box-shadow: var(--shadow-md);
}

.theme-btn, .type-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 11px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.theme-btn svg {
  width: 13px;
  height: 13px;
}

.theme-btn:hover, .type-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.theme-btn.active, .type-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
}

/* Action Tool Stack */
.action-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: var(--shadow-lg);
}

.map-action-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.map-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.map-action-btn.active {
  background: var(--primary);
  color: white;
}

.map-action-btn svg {
  width: 17px;
  height: 17px;
}

/* Measurement Overlay Banner */
.measure-banner {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  box-shadow: var(--shadow-md);
}

.measure-banner span {
  color: var(--accent-light);
  font-weight: 700;
}

/* Coordinates Indicator Pill */
.coords-pill {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 10;
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: none;
  font-family: monospace;
}

.coords-pill svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

/* Route Navigation Drawer */
.route-panel {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 390px;
  max-height: calc(100% - 28px);
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 16px;
  z-index: 15;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.route-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.route-title {
  display: flex;
  gap: 10px;
  align-items: center;
}

.route-title svg {
  color: var(--primary);
  width: 22px;
  height: 22px;
}

.route-title h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.route-title span {
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 600;
}

.travel-modes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.2s ease;
}

.mode-btn svg {
  width: 14px;
  height: 14px;
}

.mode-btn.active {
  background: var(--primary);
  color: white;
}

.fuel-cost-card {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fuel-cost-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--petrol-color);
}

.fuel-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 0.75rem;
}

.fuel-calc-val {
  font-weight: 800;
  color: var(--text-primary);
}

.route-steps {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.step-item {
  display: flex;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--primary);
}

.step-num {
  font-weight: 700;
  color: var(--primary);
}

/* Street View */
.street-view-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: #000;
  display: flex;
  flex-direction: column;
}

.street-view-top-bar {
  height: 48px;
  background: rgba(14, 20, 36, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: white;
  font-size: 0.88rem;
  font-weight: 600;
}

.street-view-top-bar span {
  display: flex;
  align-items: center;
  gap: 8px;
}

#street-view-canvas {
  flex: 1;
  width: 100%;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-dialog {
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-dialog.modal-large {
  max-width: 820px;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header-icon.admin-icon {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
}

.modal-header-icon.sos-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-header p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.modal-header .close-modal {
  margin-left: auto;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.moderation-notice-banner {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 10px;
}

.moderation-notice-banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Forms */
.form-row {
  display: flex;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.form-group.flex-2 { flex: 2; }

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.req { color: var(--danger); }

.form-group input, .form-group select, .form-group textarea {
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.form-dynamic-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 12px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-subtitle {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-subtitle svg {
  width: 14px;
  height: 14px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* QR Code */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: white;
  border-radius: var(--radius-md);
  margin: 0 auto;
  width: fit-content;
}

.qr-code-img {
  width: 180px;
  height: 180px;
}

.qr-caption {
  font-size: 0.8rem;
  color: #1e293b;
  font-weight: 600;
  text-align: center;
}

/* Star Rating */
.star-rating-picker {
  display: flex;
  gap: 8px;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
}

.star-rating-picker span {
  color: var(--border-hover);
  transition: all 0.2s ease;
}

.star-rating-picker span.active, .star-rating-picker span:hover {
  color: var(--warning);
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.25);
}

.admin-tab-btn {
  color: var(--text-secondary);
  padding: 12px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.admin-tab-btn svg { width: 14px; height: 14px; }

.admin-tab-btn.active {
  color: #c4b5fd;
  border-bottom-color: #8b5cf6;
}

.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

.admin-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-approve {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-approve:hover {
  background: var(--success);
  color: white;
}

.btn-reject {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-reject:hover {
  background: var(--danger);
  color: white;
}

/* Loading Screen */
.map-loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 25;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.map-loading-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* InfoWindow */
.gm-style .gm-style-iw-c {
  background: #0d1324 !important;
  color: #f8fafc !important;
  border-radius: 14px !important;
  box-shadow: 0 14px 35px rgba(0,0,0,0.8) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  padding: 14px !important;
}

.gm-style .gm-style-iw-d { overflow: hidden !important; color: #f8fafc !important; }
.gm-style .gm-style-iw-tc::after { background: #0d1324 !important; }
.gm-ui-hover-effect { filter: invert(1) !important; }

.custom-infowindow { max-width: 270px; font-family: var(--font-sans); }
.custom-infowindow h4 { font-size: 0.98rem; font-weight: 700; margin-bottom: 4px; color: #f8fafc; }
.custom-infowindow p { font-size: 0.78rem; color: #94a3b8; line-height: 1.35; margin-bottom: 8px; }
.custom-infowindow .iw-btn-group { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.custom-infowindow .iw-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  display: block;
}

/* Responsive adjustments */
@media (max-width: 1080px) {
  :root { --sidebar-width: 360px; }
  .search-wrapper { max-width: 280px; }
  .weather-chip { display: none; }
}

@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    height: calc(100vh - var(--header-height));
    width: 100%;
    max-width: 360px;
    box-shadow: var(--shadow-lg);
  }
  .brand-text span { display: none; }
  .floating-controls.top-left { top: 65px; left: 10px; }
  .floating-controls.top-right { top: 10px; right: 10px; }
  .route-panel { width: calc(100% - 20px); left: 10px; }
}
