/* ==========================================================================
   FLOCKRADAR - COMPREHENSIVE STYLESHEET
   Aesthetics: Deep Cyber Slate, Glowing Radar Accents, Glassmorphism, Waze HUD
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-base: #07090e;
  --bg-surface: #0f1523;
  --bg-surface-elevated: #161e31;
  --bg-card: rgba(22, 30, 49, 0.75);
  --bg-card-hover: rgba(30, 41, 68, 0.85);
  --bg-hud: rgba(15, 21, 35, 0.85);
  
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-glow: rgba(56, 189, 248, 0.25);
  --border-alert: rgba(239, 68, 68, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-radar: #ef4444;
  --accent-radar-glow: rgba(239, 68, 68, 0.35);
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-indigo: #6366f1;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radius & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.15);
  --shadow-radar: 0 0 25px rgba(239, 68, 68, 0.25);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(14, 116, 144, 0.2), transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 60%, rgba(239, 68, 68, 0.08), transparent 60%),
    radial-gradient(circle at 10% 80%, rgba(99, 102, 241, 0.08), transparent 50%);
  background-attachment: fixed;
}

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   NAVIGATION & VIEW SWITCHER
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 9, 14, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo-emblem {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.35), 0 0 4px rgba(56, 189, 248, 0.5);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.brand-wrapper:hover .brand-logo-img {
  transform: scale(1.08) rotate(2deg);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.6), 0 0 8px rgba(244, 63, 94, 0.5);
}

.brand-radar-ping {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  background: #f43f5e;
  border: 1.5px solid #07090e;
  border-radius: 50%;
  box-shadow: 0 0 8px #f43f5e;
  animation: brand-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes brand-ping {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.8); }
  70% { transform: scale(1.3); box-shadow: 0 0 0 8px rgba(244, 63, 94, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #ffffff 0%, #38bdf8 55%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 14px rgba(56, 189, 248, 0.2);
}

.brand-tagline {
  font-size: 0.66rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: uppercase;
}

/* Nav Mode Switcher */
.nav-mode-switcher {
  display: inline-flex;
  background: rgba(15, 21, 35, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 3px;
  gap: 2px;
}

.nav-mode-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.nav-mode-btn:hover {
  color: #ffffff;
}

.nav-mode-btn.active {
  background: var(--accent-cyan);
  color: #07090e;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.nav-text-mobile {
  display: none;
}

.nav-text-desktop {
  display: inline;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.badge-live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
}

.live-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  animation: live-blink 1.5s infinite ease-in-out;
}

@keyframes live-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Driver Profile Pill */
.user-profile-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 5px 14px;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.user-profile-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.points-badge {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 1px 6px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
}

/* ==========================================================================
   VIEW 1: RADAR MAP & WAZE-STYLE DRIVER HUD
   ========================================================================== */
.radar-view-container {
  height: calc(100vh - 65px);
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #090d16;
}

.radar-map-canvas {
  width: 100%;
  height: 100%;
  background: #090d16;
}

/* Floating Driver HUD */
.driver-hud {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 500;
  width: 320px;
  background: var(--bg-hud);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--transition-normal);
}

.hud-capsule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hud-capsule-actions {
  display: none;
}

.hud-collapsible-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-header {
  display: none;
}

.tools-overlay {
  display: none;
}

/* HUD Zone Badges */
.hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  width: fit-content;
}

.badge-clear {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-amber);
  animation: warning-pulse 1.5s infinite;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: var(--accent-radar);
  animation: danger-pulse 1s infinite;
}

@keyframes warning-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 14px 2px rgba(245, 158, 11, 0.2); }
}

@keyframes danger-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50% { box-shadow: 0 0 20px 4px rgba(239, 68, 68, 0.4); }
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-clear { background: var(--accent-emerald); }
.dot-warning { background: var(--accent-amber); }
.dot-danger { background: var(--accent-radar); }

/* HUD Metrics */
.hud-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hud-metric-box {
  background: rgba(7, 9, 14, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.hud-val-group {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.hud-metric-number {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.hud-metric-unit {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
}

.hud-metric-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-top: 4px;
}

.hud-location-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(7, 9, 14, 0.4);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pulsing Warning Banner */
.hud-banner-alert {
  display: none;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(185, 28, 28, 0.3));
  border: 1px solid var(--accent-radar);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #ffffff;
  font-size: 0.8rem;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.hud-banner-alert.visible {
  display: flex;
  animation: banner-in 0.3s ease;
}

@keyframes banner-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.banner-pulse-icon {
  font-size: 1.3rem;
  animation: icon-bounce 0.8s infinite alternate ease-in-out;
}

@keyframes icon-bounce {
  from { transform: scale(0.9); }
  to { transform: scale(1.15); }
}

/* Quick Location Selector & Search */
.hud-spotted-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.hud-location-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.location-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.loc-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.loc-chip:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.loc-chip.active {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

#btn-locate-me.active {
  background: rgba(6, 182, 212, 0.28);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.45);
}

#btn-locate-me.active svg {
  animation: pulseGps 1.8s ease-in-out infinite;
  color: #38bdf8;
}

@keyframes pulseGps {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(6, 182, 212, 0)); }
  50% { transform: scale(1.18); filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.9)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(6, 182, 212, 0)); }
}

.map-search-box {
  display: flex;
  gap: 6px;
}

.map-search-box input {
  flex: 1;
  background: rgba(7, 9, 14, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.75rem;
  color: #ffffff;
  outline: none;
  transition: border-color var(--transition-fast);
}

.map-search-box input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

.map-search-box button {
  background: var(--accent-cyan);
  border: none;
  color: #07090e;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.map-search-box button:hover {
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

/* Floating Top Controls (Simulator, Audio, GPS) */
.map-top-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-hud-action {
  padding: 9px 16px;
  background: var(--bg-hud);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-fast);
}

.btn-hud-action:hover {
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-hud-action.active {
  background: var(--accent-radar);
  color: #ffffff;
  border-color: var(--accent-radar);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
}

/* Floating Map Legend */
.map-legend {
  position: absolute;
  bottom: 24px;
  left: 20px;
  z-index: 500;
  background: var(--bg-hud);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  font-size: 0.75rem;
  color: var(--text-muted);
  box-shadow: var(--shadow-md);
}

.legend-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin-bottom: 10px;
}

.legend-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-radar);
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-sample-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.35);
  border: 1.5px solid var(--accent-radar);
}

.legend-sample-pin {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.legend-sample-car {
  width: 12px;
  height: 12px;
  background: var(--accent-cyan);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* Floating Report Camera FAB */
.btn-report-fab {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  padding: 14px 22px;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  border: none;
  border-radius: 9999px;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.45);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-report-fab:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.6);
}

/* Leaflet Map Custom Overlays */
.flock-radar-circle {
  transition: fill-opacity 0.3s ease;
}

.camera-map-pin {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cam-pulse-wave {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--accent-radar);
  animation: cam-wave 2s infinite ease-out;
}

@keyframes cam-wave {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

.cam-dot-center {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-radar);
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
}

.community-pin .cam-dot-center {
  background: var(--accent-amber);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
}

/* User Vehicle Marker */
.user-vehicle-marker {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s linear;
}

.radar-scan-cone {
  position: absolute;
  top: -15px;
  width: 30px;
  height: 30px;
  background: radial-gradient(circle at 50% 100%, rgba(6, 182, 212, 0.4), transparent 70%);
  clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
  pointer-events: none;
}

.car-body-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.car-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 8px solid #07090e;
  margin-top: -2px;
}

/* Map Popups */
.radar-popup-card {
  padding: 12px 14px;
  color: #07090e;
  font-family: var(--font-body);
}

.popup-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #ef4444;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.popup-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 4px 0 8px;
  color: #0f172a;
}

.popup-meta {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 10px;
}

.popup-inspect-btn {
  width: 100%;
  padding: 6px 10px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.popup-inspect-btn:hover {
  background: #06b6d4;
  color: #07090e;
}

/* ==========================================================================
   VIEW 2: DIRECTORY HERO & STATS (REUSED)
   ========================================================================== */
.hero-section {
  padding: 64px 0 40px;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 9999px;
  color: var(--accent-cyan);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-mono);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 48px;
  font-weight: 400;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0.6;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--shadow-glow);
}

.stat-card.radar-card::before {
  background: linear-gradient(90deg, transparent, var(--accent-radar), transparent);
}

.stat-card.radar-card:hover {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: var(--shadow-radar);
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-subtext {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ==========================================================================
   DIRECTORY CONTROLS & CARDS
   ========================================================================== */
.state-chips-wrapper {
  margin-bottom: 32px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.state-chips-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chips-title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.state-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.state-chips-scroll::-webkit-scrollbar { height: 4px; }
.state-chips-scroll::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 4px; }

.state-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.state-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.state-chip.active {
  background: var(--accent-cyan);
  color: #07090e;
  font-weight: 700;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.chip-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.8;
}

.controls-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  display: flex;
}

.search-input {
  width: 100%;
  padding: 16px 52px 16px 50px;
  background: rgba(7, 9, 14, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.search-shortcut {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  display: none;
  border-radius: 50%;
}

.clear-search-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.filter-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: center;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.select-custom {
  padding: 10px 14px;
  background: rgba(7, 9, 14, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.select-custom:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.checkbox-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-muted);
  user-select: none;
  margin-top: 22px;
}

.checkbox-toggle-label input { display: none; }

.toggle-switch {
  width: 40px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  position: relative;
  transition: var(--transition-fast);
  border: 1px solid var(--border-subtle);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.checkbox-toggle-label input:checked + .toggle-switch {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.checkbox-toggle-label input:checked + .toggle-switch::after {
  transform: translateX(18px);
  background: #07090e;
}

.action-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.results-counter {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.results-counter strong {
  color: #ffffff;
  font-family: var(--font-mono);
}

.view-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.view-toggle-btns {
  display: inline-flex;
  background: rgba(7, 9, 14, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
}

.view-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}

.view-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
}

/* Directory Specific Camera Nodes & Hardware Images Grid */
.directory-cameras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.dir-cam-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.dir-cam-card:hover {
  transform: translateY(-4px);
  border-color: #38bdf8;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.2);
}

.dir-cam-image-container {
  width: 100%;
  height: 180px;
  background: #090d16;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dir-cam-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.dir-cam-card:hover .dir-cam-img {
  transform: scale(1.04);
}

.dir-cam-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.9));
  color: #94a3b8;
  padding: 16px;
  text-align: center;
}

.dir-cam-placeholder-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  margin-bottom: 2px;
}

.dir-cam-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dir-cam-badge.verified {
  background: rgba(16, 185, 129, 0.85);
  color: #fff;
  border: 1px solid #34d399;
}

.dir-cam-badge.unverified {
  background: rgba(245, 158, 11, 0.85);
  color: #fff;
  border: 1px solid #fcd34d;
}

.dir-cam-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

/* Prominent Cross Streets Box */
.dir-cam-cross-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(15, 23, 42, 0.6));
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

.dir-cam-cross-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.dir-cam-cross-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dir-cam-cross-label {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #38bdf8;
  font-family: var(--font-mono);
}

.dir-cam-cross-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dir-cam-city-tag {
  font-size: 0.75rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
}

.dir-cam-img-hover-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.75);
  color: #38bdf8;
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dir-cam-card:hover .dir-cam-img-hover-hint {
  opacity: 1;
}

.btn-dir-cam-upload-trigger {
  margin-top: 6px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #38bdf8;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-dir-cam-upload-trigger:hover {
  background: rgba(6, 182, 212, 0.3);
  color: #ffffff;
}

.dir-cam-intersection {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.35;
}

.dir-cam-agency-meta {
  font-size: 0.82rem;
  color: #38bdf8;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dir-cam-specs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
}

.dir-cam-spec-item {
  display: flex;
  flex-direction: column;
}

.dir-cam-spec-label {
  font-size: 0.65rem;
  color: #94a3b8;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.dir-cam-spec-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
}

.dir-cam-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}

.btn-dir-cam-jump {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-dir-cam-jump:hover {
  background: linear-gradient(135deg, #0891b2, #0369a1);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.btn-dir-cam-details {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-dir-cam-details:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Portals Grid */
.portals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.portal-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.portal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.card-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.agency-state-badge {
  padding: 3px 8px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.agency-type-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 7px;
  border-radius: 4px;
}

.card-title-area { margin-bottom: 16px; }

.agency-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
  margin-bottom: 4px;
}

.agency-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px;
  background: rgba(7, 9, 14, 0.4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.card-metric-item { display: flex; flex-direction: column; }

.card-metric-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.card-metric-lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-flags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.flag-badge {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.flag-badge.audit-true {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.flag-badge.sharing-network {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.card-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.btn-inspect {
  flex: 1;
  padding: 9px 14px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-inspect:hover {
  background: #38bdf8;
  color: #07090e;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

.btn-direct-link {
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-direct-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Table View */
.table-container {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: 48px;
  box-shadow: var(--shadow-md);
}

.portals-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.portals-table th {
  background: rgba(7, 9, 14, 0.8);
  padding: 14px 18px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.portals-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  color: var(--text-main);
  vertical-align: middle;
}

.portals-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.table-agency-cell { display: flex; flex-direction: column; }
.table-agency-title { font-weight: 600; color: #ffffff; }
.table-agency-slug { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); }

.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 64px;
}

.pagination-btn {
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
}

.pagination-btn.active {
  background: var(--accent-cyan);
  color: #07090e;
  font-weight: 700;
  border-color: var(--accent-cyan);
}

.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==========================================================================
   AGENCY INSPECTION MODAL (<dialog>)
   ========================================================================== */
.agency-dialog {
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  max-width: 820px;
  width: 90%;
  margin: auto;
  padding: 0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), var(--shadow-glow);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 90vh;
  overflow-y: auto;
}

.agency-dialog::backdrop {
  background: rgba(5, 8, 15, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: rgba(7, 9, 14, 0.5);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.modal-agency-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.modal-agency-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.close-modal-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.close-modal-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-radar);
}

.modal-body { padding: 28px; }

.modal-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.modal-cta-text h4 { font-size: 1rem; font-weight: 700; color: #ffffff; }
.modal-cta-text p { font-size: 0.8rem; color: var(--text-muted); }

.btn-open-flock {
  padding: 10px 20px;
  background: var(--accent-cyan);
  color: #07090e;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.3);
}

.btn-open-flock:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.modal-stat-box {
  background: rgba(7, 9, 14, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.modal-stat-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.modal-stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.modal-section {
  margin-bottom: 24px;
  background: rgba(7, 9, 14, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.modal-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.policy-text { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

.reasons-list { display: flex; flex-direction: column; gap: 8px; }

.reason-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.reason-name { color: var(--text-main); }
.reason-count { font-family: var(--font-mono); font-weight: 600; color: var(--accent-cyan); }

.sharing-search-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(7, 9, 14, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.sharing-partners-box {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: rgba(7, 9, 14, 0.5);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sharing-tag {
  font-size: 0.75rem;
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
}

.research-tools-row { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-research {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.82rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-research:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }

/* Education Section */
.education-section {
  padding: 64px 0;
  border-top: 1px solid var(--border-subtle);
  background: rgba(15, 21, 35, 0.4);
}

.education-header { text-align: center; max-width: 800px; margin: 0 auto 48px; }
.education-title { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 800; color: #ffffff; margin-bottom: 12px; }
.education-desc { color: var(--text-muted); font-size: 1.05rem; }

.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.edu-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.edu-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 18px;
}

.edu-card-title { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; color: #ffffff; margin-bottom: 10px; }
.edu-card-text { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

.edu-card-list {
  list-style: none;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edu-card-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.edu-card-list li::before { content: '▸'; color: var(--accent-cyan); }

/* Footer */
.site-footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border-subtle);
  background: #05070a;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-disclaimer { max-width: 650px; line-height: 1.6; }
.footer-links { display: flex; gap: 16px; }
.footer-link { color: var(--text-muted); text-decoration: none; }
.footer-link:hover { color: #ffffff; }

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glow);
  color: #ffffff;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Responsive Mobile Driving Mode (Calm, Uncluttered, Immersive Map) */
@media (max-width: 768px) {
  html, body {
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
  }

  /* Full Bleed Radar Canvas on Mobile */
  .radar-view-container {
    height: calc(100dvh - 48px);
    height: calc(100svh - 48px);
    width: 100%;
  }

  /* Ultra-Compact Site Nav */
  .site-nav {
    padding: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));
    min-height: 48px;
  }
  .brand-text .brand-tagline,
  .badge-live-pulse {
    display: none;
  }
  .brand-title {
    font-size: 0.92rem;
  }
  .nav-mode-switcher {
    gap: 4px;
  }
  .nav-mode-btn {
    padding: 5px 8px;
    font-size: 0.72rem;
  }
  .nav-text-desktop {
    display: none;
  }
  .nav-text-mobile {
    display: inline;
  }
  .user-profile-pill {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  /* Sleek Floating Top Driving Capsule */
  .driver-hud {
    position: absolute;
    top: max(8px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    width: auto;
    padding: 8px 12px;
    border-radius: 16px;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    gap: 4px;
    z-index: 1000;
  }

  .hud-capsule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .hud-badge {
    padding: 4px 8px;
    font-size: 0.68rem;
    gap: 5px;
    flex-shrink: 0;
  }

  .hud-metrics-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
  }

  .hud-metric-box {
    padding: 0;
    background: transparent;
    border: none;
  }

  .hud-metric-number {
    font-size: 1.15rem;
    font-weight: 800;
  }

  .hud-metric-unit {
    font-size: 0.65rem;
  }

  .hud-metric-label {
    display: none;
  }

  .hud-capsule-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }

  .btn-capsule-trigger {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
  }

  .btn-capsule-trigger:active {
    background: rgba(6, 182, 212, 0.3);
    border-color: #06b6d4;
  }

  .btn-expand-details {
    padding: 6px 8px;
  }

  .hud-location-bar {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 2px 0 0;
    padding: 0;
    border: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  /* Hidden by default on mobile to ensure 100% map visibility */
  .hud-collapsible-content {
    display: none;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
  }

  .driver-hud.is-expanded .hud-collapsible-content {
    display: flex;
  }

  /* Slide-Up Driving Controls Drawer */
  .map-top-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    background: rgba(10, 14, 23, 0.97);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px 22px 0 0;
    padding: 16px 16px max(28px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(105%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 3000;
    box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.75);
    max-height: 75vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .map-top-controls.open-drawer {
    transform: translateY(0);
  }

  .drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .drawer-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
  }

  .btn-close-drawer {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .btn-hud-action {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    font-size: 0.88rem;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 10px;
  }

  .tools-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 2999;
    backdrop-filter: blur(2px);
    transition: opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
    display: block;
  }

  .tools-overlay.visible {
    opacity: 1;
    pointer-events: auto;
  }

  /* Compact Floating Action Button on Mobile */
  .driver-fab-container {
    position: absolute;
    bottom: max(18px, env(safe-area-inset-bottom));
    right: max(14px, env(safe-area-inset-right));
    z-index: 500;
    margin: 0;
    pointer-events: auto;
  }

  .btn-driver-fab {
    padding: 10px 16px;
    border-radius: 9999px;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.45);
    background: linear-gradient(135deg, #ef4444, #dc2626);
  }

  .fab-icon-glow {
    font-size: 1.25rem;
  }

  .fab-main-title {
    font-size: 0.84rem;
    font-weight: 700;
  }

  .fab-sub-title {
    display: none;
  }

  /* Minimal Recenter Button on Mobile */
  .btn-recenter-pill {
    position: absolute;
    bottom: max(18px, env(safe-area-inset-bottom));
    left: max(14px, env(safe-area-inset-left));
    right: auto;
    transform: none;
    padding: 10px 16px;
    border-radius: 9999px;
    font-size: 0.82rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    z-index: 500;
  }

  .map-legend {
    display: none;
  }

  /* Leaflet Controls minimal */
  .leaflet-control-zoom {
    display: none !important; /* Touch pinch-to-zoom is native */
  }

  /* Native Mobile Bottom Sheet for all Modals */
  .agency-dialog,
  .hardware-proof-dialog {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 22px 22px 0 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    max-height: 88dvh !important;
    margin: 0 !important;
    padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.85) !important;
    animation: sheet-slide-up 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  @keyframes sheet-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .modal-header {
    padding: 18px 20px 14px;
    border-radius: 22px 22px 0 0;
  }

  .modal-agency-name {
    font-size: 1.25rem;
  }
}

/* --- SLEEK RADAR DARK MODE FOR MAP TILES (Zero API Key, Zero Watermarks, 100% Free) --- */
#radar-map {
  background: #0d1117 !important;
}

.dark-radar-tile {
  filter: invert(100%) hue-rotate(180deg) brightness(85%) contrast(120%) saturate(30%) !important;
}

.leaflet-control-attribution {
  background: rgba(10, 14, 23, 0.7) !important;
  color: #64748b !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a {
  color: #38bdf8 !important;
}

/* ==========================================================================
   5% DRIVING APP UPGRADES: RADAR GAUGE, 1-TAP FAB, RECENTER, SENSITIVITY
   ========================================================================== */

/* 1. Radar Detector Signal Strength Gauge (Valentine One / Escort Style) */
.hud-radar-gauge-container {
  margin-top: 10px;
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.hud-radar-gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.hud-gauge-title {
  color: var(--text-muted);
  font-weight: 600;
}

.hud-gauge-status {
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-size: 0.65rem;
}

.status-green {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.status-yellow {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
}

.status-red {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
  animation: pulse-red-alert 0.8s infinite alternate;
}

@keyframes pulse-red-alert {
  from { opacity: 0.7; }
  to { opacity: 1; transform: scale(1.02); }
}

.hud-signal-meter {
  display: flex;
  gap: 4px;
  height: 8px;
}

.signal-bar {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  transition: all 0.2s ease-out;
}

.signal-bar.active-green {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.signal-bar.active-yellow {
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
}

.signal-bar.active-red {
  background: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.9);
  animation: pulse-bar 0.4s infinite alternate;
}

@keyframes pulse-bar {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

/* 2. Sensitivity Toggle (City vs Highway) */
.hud-sensitivity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sensitivity-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.sensitivity-toggle-group {
  display: flex;
  gap: 4px;
}

.sens-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sens-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sens-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 600;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

/* 3. Giant 1-Tap "Log Flock Camera" Driver FAB */
.driver-fab-container {
  position: absolute;
  bottom: 25px;
  right: 25px;
  z-index: 1100;
}

.btn-driver-fab {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50px;
  padding: 14px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(239, 68, 68, 0.55), 0 0 15px rgba(239, 68, 68, 0.4);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  touch-action: manipulation;
}

.btn-driver-fab:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.75), 0 0 25px rgba(239, 68, 68, 0.5);
  border-color: #ffffff;
}

.btn-driver-fab:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
}

.fab-icon-glow {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
  animation: pulse-icon 1.5s infinite;
}

@keyframes pulse-icon {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.fab-text-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.fab-main-title {
  font-size: 0.95rem;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.fab-sub-title {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.3px;
}

/* 4. Floating Recenter on Vehicle Pill */
.btn-recenter-pill {
  position: absolute;
  bottom: 95px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  animation: float-pill 0.3s ease-out;
}

.btn-recenter-pill:hover {
  background: #38bdf8;
  color: #0f172a;
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.6);
  transform: translateX(-50%) translateY(-2px);
}

.btn-recenter-pill.hidden {
  display: none !important;
}

@keyframes float-pill {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}



/* ==========================================================================
   PHOTO EVIDENCE & DEMOCRATIC VERIFICATION ENGINE
   ========================================================================== */

.hardware-proof-dialog {
  max-width: 580px;
  width: 92vw;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(6, 182, 212, 0.15);
  overflow: hidden;
}

.cam-verification-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cam-verification-badge.badge-verified {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
}

.cam-verification-badge.badge-unverified {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

.cam-verification-badge.badge-contested {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #f87171;
}

/* Proof Photo Container */
.proof-photo-container {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(8, 12, 20, 0.6);
}

.proof-photo-box {
  position: relative;
  width: 100%;
  max-height: 300px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.proof-photo-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.proof-photo-img:hover {
  transform: scale(1.02);
}

.proof-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 0.78rem;
  color: #f8fafc;
}

.proof-photo-author {
  font-weight: 600;
  color: #38bdf8;
}

.proof-photo-date {
  color: #94a3b8;
  font-size: 0.72rem;
}

/* Professional Vector SVG Icon System */
.flock-svg {
  width: 1.15em;
  height: 1.15em;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.flock-svg-sm {
  width: 0.9em;
  height: 0.9em;
}

.flock-svg-md {
  width: 1.25rem;
  height: 1.25rem;
}

.flock-svg-lg {
  width: 1.8rem;
  height: 1.8rem;
}

.flock-svg-xl {
  width: 2.2rem;
  height: 2.2rem;
}

.flock-svg-hero {
  width: 28px;
  height: 28px;
}

/* Empty Photo Prompt State */
.proof-empty-box {
  padding: 26px 20px;
  text-align: center;
  border: 1px dashed rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
}

.proof-empty-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px auto;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.proof-empty-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 6px;
}

.proof-empty-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.5;
  max-width: 440px;
  margin: 0 auto 16px auto;
}

.btn-proof-snap-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  color: #ffffff;
  border: none;
  padding: 12px 22px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
  transition: all 0.2s ease;
}

.btn-proof-snap-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

/* Specs Grid */
.proof-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.proof-spec-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.proof-spec-card .spec-label {
  display: block;
  font-size: 0.68rem;
  color: #94a3b8;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.proof-spec-card .spec-val {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f8fafc;
}

/* Consensus Banner */
.proof-consensus-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(14, 116, 144, 0.12);
  border-left: 3px solid #06b6d4;
  border-radius: var(--radius-sm);
}

.proof-consensus-banner .consensus-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.proof-consensus-banner .consensus-text strong {
  display: block;
  font-size: 0.82rem;
  color: #38bdf8;
  margin-bottom: 2px;
}

.proof-consensus-banner .consensus-text p {
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
}

/* Action Buttons Row */
.proof-actions-row {
  display: grid;
  grid-template-columns: 1.4fr 1.3fr 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.btn-proof-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-confirm-vote {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #10b981;
  color: #34d399;
}

.btn-confirm-vote:hover {
  background: #10b981;
  color: #0f172a;
}

.btn-confirm-vote.voted {
  background: #10b981;
  color: #0f172a;
  cursor: default;
}

.btn-add-photo {
  background: rgba(6, 182, 212, 0.18);
  border: 1px solid #06b6d4;
  color: #38bdf8;
}

.btn-add-photo:hover {
  background: #06b6d4;
  color: #0f172a;
}

.btn-contest-vote {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-contest-vote:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.btn-nav-maps {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

.btn-nav-maps:hover {
  background: rgba(148, 163, 184, 0.25);
}

.photo-preview-box.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  .proof-actions-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

/* Photo Verified Pin & Contested Pin on Map */
.camera-map-pin.has-photo-pin .cam-dot-center {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
}

.camera-map-pin.has-photo-pin .cam-pulse-wave {
  border-color: rgba(16, 185, 129, 0.6);
}

.camera-map-pin.is-contested-pin .cam-dot-center {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
}

.camera-map-pin.is-contested-pin .cam-pulse-wave {
  border-color: rgba(245, 158, 11, 0.6);
}

.pin-photo-dot {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 0.7rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #10b981;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  animation: pulse-photo-dot 2s infinite ease-in-out;
}

@keyframes pulse-photo-dot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.popup-badge.badge-verified-photo {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
}

.popup-badge.badge-contested-tag {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}



