/* ============================================
   PathSense India — Design System
   "Don't just navigate. Know your road."
   ============================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ══════════════════════════════════════════════
   Design Tokens
   ══════════════════════════════════════════════ */
:root {
  /* ── Primary: Cyan/Teal (Road Intelligence) ── */
  --primary-50: #ecfeff;
  --primary-100: #cffafe;
  --primary-200: #a5f3fc;
  --primary-300: #67e8f9;
  --primary-400: #22d3ee;
  --primary-500: #06b6d4;
  --primary-600: #0891b2;
  --primary-700: #0e7490;
  --primary-800: #155e75;
  --primary-900: #164e63;

  /* ── Accent: Emerald (Sustainability) ── */
  --accent-300: #6ee7b7;
  --accent-400: #34d399;
  --accent-500: #10b981;
  --accent-600: #059669;
  --accent-700: #047857;

  /* ── Backgrounds (Deep Space Dark) ── */
  --bg-primary: #050a18;
  --bg-secondary: #0a1128;
  --bg-tertiary: #111d3a;
  --bg-elevated: #162040;
  --bg-card: rgba(11, 17, 40, 0.82);
  --bg-card-hover: rgba(16, 25, 55, 0.9);

  /* ── Glass Effect ── */
  --glass-bg: rgba(10, 17, 40, 0.65);
  --glass-bg-strong: rgba(10, 17, 40, 0.82);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-border-hover: rgba(255, 255, 255, 0.12);
  --glass-blur: 24px;

  /* ── Text ── */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #22d3ee;

  /* ── TEI Grade Colors ── */
  --tei-excellent: #10b981;
  --tei-good: #34d399;
  --tei-average: #fbbf24;
  --tei-poor: #f97316;
  --tei-bad: #ef4444;
  --tei-dangerous: #6b7280;

  /* ── Semantic ── */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* ── Gradients ── */
  --gradient-primary: linear-gradient(135deg, #06b6d4, #10b981);
  --gradient-primary-reverse: linear-gradient(135deg, #10b981, #06b6d4);
  --gradient-hot: linear-gradient(135deg, #ef4444, #f97316);
  --gradient-warm: linear-gradient(135deg, #f97316, #fbbf24);
  --gradient-cool: linear-gradient(135deg, #3b82f6, #06b6d4);
  --gradient-hero: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(16, 185, 129, 0.10));
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.12), transparent 60%);

  /* ── Shadows ── */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.7);
  --shadow-glow-sm: 0 0 12px rgba(6, 182, 212, 0.2);
  --shadow-glow: 0 0 24px rgba(6, 182, 212, 0.25);
  --shadow-glow-lg: 0 0 48px rgba(6, 182, 212, 0.3);
  --shadow-glow-accent: 0 0 24px rgba(16, 185, 129, 0.25);

  /* ── Typography ── */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* ── Spacing ── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* ── Border Radius ── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ── Transitions ── */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 280ms var(--ease-out);
  --transition-slow: 450ms var(--ease-out);
  --transition-spring: 500ms var(--ease-spring);

  /* ── Z-Index Layers ── */
  --z-map: 1;
  --z-panel: 100;
  --z-navbar: 200;
  --z-fab: 250;
  --z-modal: 500;
  --z-toast: 600;
  --z-loading: 700;
}


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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--text-accent);
  text-decoration: none;
}

button {
  font-family: var(--font-primary);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: var(--font-primary);
  outline: none;
  border: none;
  background: none;
  color: var(--text-primary);
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

::selection {
  background: rgba(6, 182, 212, 0.3);
  color: var(--text-primary);
}


/* ══════════════════════════════════════════════
   Glassmorphism Components
   ══════════════════════════════════════════════ */
.glass-panel {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.glass-panel-light {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.glass-card {
  background: rgba(15, 23, 55, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  transition: all var(--transition-base);
}

.glass-card:hover {
  background: rgba(20, 30, 65, 0.65);
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}


/* ══════════════════════════════════════════════
   Navbar
   ══════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: var(--z-navbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  background: rgba(5, 10, 24, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.4));
}

.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.logo-accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-badge {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: var(--bg-primary);
  margin-left: var(--space-1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

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

.nav-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.nav-btn.active {
  background: rgba(6, 182, 212, 0.12);
  color: var(--primary-400);
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.2);
}


/* ══════════════════════════════════════════════
   Search Panel
   ══════════════════════════════════════════════ */
#search-panel {
  position: fixed;
  top: 72px;
  left: 16px;
  width: 380px;
  max-height: calc(100vh - 140px);
  z-index: var(--z-panel);
  padding: var(--space-6);
  overflow-y: auto;
  transition: transform var(--transition-slow), opacity var(--transition-slow);
}

#search-panel.collapsed {
  transform: translateX(-420px);
  opacity: 0;
  pointer-events: none;
}

/* ── Hero Section ── */
#hero-section {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#hero-section h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Search Form ── */
.search-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  position: relative;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  height: 48px;
  padding: 0 var(--space-4) 0 var(--space-10);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.input-wrapper input:focus {
  border-color: var(--primary-500);
  background: rgba(6, 182, 212, 0.04);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.input-dot {
  position: absolute;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  z-index: 2;
}

.input-dot.source {
  background: var(--accent-500);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.input-dot.dest {
  background: var(--primary-500);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.swap-btn {
  align-self: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  margin: -4px 0;
}

.swap-btn:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--primary-500);
  color: var(--primary-400);
  transform: rotate(180deg);
}

/* ── Suggestions Dropdown ── */
.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  margin-top: 4px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: none;
}

.suggestions-dropdown.active {
  display: block;
  animation: slideDown 200ms var(--ease-out);
}

.suggestion-item {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: rgba(6, 182, 212, 0.08);
  color: var(--text-primary);
}

.suggestion-item .suggestion-icon {
  font-size: 0.9rem;
  opacity: 0.6;
}

.suggestion-item .suggestion-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Primary Button ── */
.primary-btn {
  height: 48px;
  padding: 0 var(--space-6);
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.primary-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.primary-btn:hover::before {
  opacity: 1;
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.primary-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Quick Demos ── */
.quick-demos {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.demo-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-btn {
  font-size: var(--text-xs);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.15);
  color: var(--primary-400);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.demo-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: var(--shadow-glow-sm);
}

/* ── Route Results ── */
.route-results {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.route-results h3 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-1);
}

.route-card {
  background: rgba(15, 23, 55, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.route-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
  transition: all var(--transition-base);
}

.route-card:hover {
  background: rgba(20, 30, 65, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.route-card.selected {
  border-color: var(--primary-500);
  background: rgba(6, 182, 212, 0.06);
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.15);
}

.route-card.selected::before {
  background: var(--gradient-primary);
}

.route-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-2);
}

.route-card-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.route-card-tei {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.tei-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.route-card-details {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.route-card-details span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.route-card-factors {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.mini-factor {
  flex: 1;
  height: 3px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.mini-factor-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 800ms var(--ease-out);
}

/* ── Recommended badge ── */
.recommended-badge {
  position: absolute;
  top: -1px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--gradient-primary);
  color: var(--bg-primary);
}


/* ══════════════════════════════════════════════
   Stats Bar (Bottom)
   ══════════════════════════════════════════════ */
#stats-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-panel);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-3) var(--space-8);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.06);
}


/* ══════════════════════════════════════════════
   Report FAB
   ══════════════════════════════════════════════ */
.fab-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: var(--z-fab);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  color: var(--bg-primary);
  font-weight: 600;
  font-size: var(--text-sm);
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-base);
}

.fab-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-glow-lg);
}

.fab-icon {
  font-size: 1.1rem;
}


/* ══════════════════════════════════════════════
   Modal
   ══════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--space-8);
  animation: scaleIn 300ms var(--ease-out);
}

.modal-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-6);
}

.close-btn {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

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

/* ── Report Types ── */
.report-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.report-type {
  padding: var(--space-4);
  text-align: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.report-type:hover {
  background: rgba(6, 182, 212, 0.06);
  border-color: rgba(6, 182, 212, 0.15);
  color: var(--text-primary);
}

.report-type.selected {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--primary-500);
  color: var(--primary-400);
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.15);
}

.report-type span:first-child {
  font-size: 1.5rem;
}

/* ── Severity Slider ── */
.severity-slider {
  margin-bottom: var(--space-5);
}

.severity-slider label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
}

.severity-slider input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, var(--accent-500), var(--warning), var(--danger));
  border-radius: var(--radius-full);
  outline: none;
}

.severity-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
}

.severity-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* ── Report Textarea ── */
#report-description {
  width: 100%;
  min-height: 80px;
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  resize: vertical;
  margin-bottom: var(--space-4);
  transition: all var(--transition-fast);
}

#report-description:focus {
  border-color: var(--primary-500);
  background: rgba(6, 182, 212, 0.04);
}

.report-location {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}


/* ══════════════════════════════════════════════
   Loading Overlay
   ══════════════════════════════════════════════ */
#loading-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-loading);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 24, 0.85);
  backdrop-filter: blur(8px);
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

.loader-road {
  width: 120px;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.loader-road::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  animation: loadSlide 1.2s ease-in-out infinite;
}

.loader p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}


/* ══════════════════════════════════════════════
   Toast Notifications
   ══════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  min-width: 280px;
  max-width: 380px;
  padding: var(--space-4) var(--space-5);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  animation: slideInRight 300ms var(--ease-out);
}

.toast.toast-exit {
  animation: slideOutRight 250ms var(--ease-out) forwards;
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-body {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 2px;
}

.toast-message {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.toast-success { border-left: 3px solid var(--success); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-danger  { border-left: 3px solid var(--danger); }
.toast-info    { border-left: 3px solid var(--info); }


/* ══════════════════════════════════════════════
   Utility Classes
   ══════════════════════════════════════════════ */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ══════════════════════════════════════════════
   Animations
   ══════════════════════════════════════════════ */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(24px); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

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

@keyframes loadSlide {
  0%   { left: -40%; }
  100% { left: 100%; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(6, 182, 212, 0.3); }
  50%      { box-shadow: 0 0 28px rgba(6, 182, 212, 0.5); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

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

@keyframes dashDraw {
  to { stroke-dashoffset: 0; }
}

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


/* ══════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  #search-panel {
    width: 340px;
  }

  #dashboard-panel {
    width: 360px;
  }
}

@media (max-width: 768px) {
  #search-panel {
    width: calc(100% - 32px);
    left: 16px;
    max-height: 50vh;
    top: auto;
    bottom: 80px;
    border-radius: var(--radius-xl) var(--radius-xl) var(--radius-lg) var(--radius-lg);
  }

  #dashboard-panel {
    width: calc(100% - 32px);
    right: 16px;
    max-height: 60vh;
    top: auto;
    bottom: 80px;
  }

  #hero-section h1 {
    font-size: var(--text-xl);
  }

  #stats-bar {
    gap: var(--space-4);
    padding: var(--space-2) var(--space-5);
  }

  .stat-value {
    font-size: var(--text-base);
  }
}

@media (max-width: 480px) {
  .report-types {
    grid-template-columns: repeat(2, 1fr);
  }

  #stats-bar {
    width: calc(100% - 32px);
    justify-content: space-around;
  }

  .stat-label {
    font-size: 0.6rem;
  }
}
