/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Orbitron:wght@500;700&display=swap');

/* Reset */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: #0d1117;
  color: #fff;
}

/* === HEADER WITH RED-BLACK GRADIENT === */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(
    90deg,
    rgba(8, 0, 0, 0.95) 0%,
    rgba(60, 0, 0, 0.92) 40%,
    rgba(120, 0, 0, 0.9) 100%
  );
  backdrop-filter: blur(8px);
  color: #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 68, 68, 0.3);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.1);
}


.site-logo {
  height: 50px;
  width: auto;
  display: block;
}

/* === Cyber Header Buttons === */
header button {
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid rgba(255, 68, 68, 0.5);
  color: #ff6666;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  box-shadow: 0 0 6px rgba(255, 68, 68, 0.15);
  margin-left: 6px;
}

header button:hover {
  background: rgba(255, 68, 68, 0.1);
  color: #ff4444;
  border-color: #ff4444;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
  transform: translateY(-1px);
}

header button.active {
  background: linear-gradient(90deg, #ff4444, #b22222);
  border: 1px solid #ff7777;
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 68, 68, 0.5);
}

/* Pulse glow for active button */
@keyframes buttonPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 68, 68, 0.25); }
  50% { box-shadow: 0 0 14px rgba(255, 68, 68, 0.5); }
}

header button.active {
  animation: buttonPulse 2.5s infinite ease-in-out;
}

header button:hover {
  background: rgba(255, 68, 68, 0.12);
  box-shadow: inset 0 0 8px rgba(255, 68, 68, 0.2), 0 0 10px rgba(255, 68, 68, 0.3);
}

/* Map */
#map {
  position: absolute;
  top: 60px;
  bottom: 0;
  width: 100%;
}

/* Metrics bar (floats just below header) */
#metrics {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  position: absolute;
  top: 64px; /* moved down slightly */
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100; /* higher than header (1000) */
  box-shadow: 0 4px 20px rgba(255, 68, 68, 0.08);
}

.metric-card {
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.3);
}
.metric-card h3 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ccc;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
}
.metric-card p {
  margin: 5px 0 0;
  font-size: 1.3rem;
  font-weight: bold;
  color: #e74c3c;
  font-family: 'Orbitron', sans-serif;
}
.metric-card canvas {
  width: 100% !important;
  max-height: 90px;
  display: block;
}

/* === KPI GRID (Responsive 2x2 layout) === */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 14px;
  margin-bottom: 20px;
}

/* === KPI Grid Layout === */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 12px;
  margin-bottom: 16px;
}

/* === KPI Card Style (matches incident cards) === */
.metric-card.small {
  padding: 10px 12px;
  text-align: center;
  background: rgba(18, 18, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  transition: all 0.25s ease;
}

.metric-card.small h3 {
  font-size: 0.65rem;
  color: #9ca3af; /* muted grey title */
  text-transform: uppercase;
  margin: 0 0 4px;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.metric-card.small p {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ff5252;
  margin: 0;
  font-family: 'Orbitron', sans-serif;
}

/* === Incident title link === */
.incident-title a {
  color: #ff6666;
  text-decoration: none;
  font-family: 'Orbitron', sans-serif;
  transition: color 0.25s ease, text-shadow 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.incident-title a:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.8);
}

/* Small arrow icon for new tab */
.external-icon {
  font-size: 0.8em;
  opacity: 0.8;
  margin-left: 2px;
  color: #ff7777;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animate icon slightly on hover */
.incident-title a:hover .external-icon {
  transform: translateY(-2px);
  opacity: 1;
  color: #fff;
}


.kpi-card.wide {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.kpi-card canvas {
  margin-top: 10px;
  max-width: 180px;
}

.kpi-card h3 {
  font-family: 'Orbitron', sans-serif;
  color: #ff6666;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 20px;
}

/* === Hover subtle highlight === */
.metric-card.small:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 68, 68, 0.25);
  box-shadow: 0 0 6px rgba(255, 68, 68, 0.15);
}

/* === Section Title === */
.kpi-section-title {
  font-family: 'Orbitron', sans-serif;
  color: #e5e7eb;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 4px;
  margin-bottom: 12px;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.08);
}

/* === Top Incidents List === */
.top-incidents {
  background: rgba(18, 18, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
}

.top-incidents h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 6px;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.8px;
}

.top-incidents ol {
  margin: 0;
  padding-left: 18px;
  color: #f0f0f0;
}

.top-incidents li {
  margin-bottom: 5px;
  line-height: 1.3;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-incidents li span {
  color: #ff5252;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
}

/* === Responsive single-column === */
@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
#sidebar {
  position: absolute;
  top: 60px;
  right: 0;
  width: 320px;
  bottom: 0;
  background: rgba(15, 15, 15, 0.8);
  backdrop-filter: blur(6px);
  border-left: 1px solid #333;
  transform: translateX(0);
  transition: transform 0.3s ease;
  z-index: 950;

  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
}
#sidebar.closed {
  transform: translateX(100%);
}

/* Sidebar sections (Feed / About toggle) */
.sidebar-section {
  display: none;
  flex: 1;
  overflow-y: auto;
}
.sidebar-section.active {
  display: flex;
  flex-direction: column;
}

/* ===== Feed Section ===== */
#feedSection h2 {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(6px);
  z-index: 20;
  margin: 0;
  padding: 10px;
  border-bottom: 1px solid #333;
  font-size: 16px;
  color: #ff4444;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
}

#feedSection .feed-controls {
  position: sticky;
  top: 42px;
  background: rgba(0, 0, 0, 0.95);
  z-index: 19;
  padding: 8px 10px;
  border-bottom: 1px solid #333;
}

#sidebar input, #sidebar select {
  width: calc(100% - 20px);
  margin: 5px 10px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #111827;
  color: #fff;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease;
}
#sidebar input:hover, 
#sidebar select:hover {
  border-color: #ff4444;
}

#incidentFeed {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  padding-bottom: 70px; /* gives room for footer overlay */
}

/* ===== About Section ===== */
#aboutSection {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  line-height: 1.5;
}

#aboutSection h2 {
  color: #ff4444;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
}
#aboutSection p, 
#aboutSection ul {
  font-size: 14px;
  color: #ddd;
  font-family: 'Inter', sans-serif;
}
#aboutSection ul {
  margin: 8px 0 0 18px;
  padding: 0;
}
#aboutSection h3 {
  margin: 12px 10px 6px;
  font-size: 14px;
  color: #ff4444;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 0, 0, 0.2);
  padding-bottom: 3px;
}

/* ================================
   INCIDENT FEED - KPI THEME MATCH
   ================================ */
#feedSection {
  font-family: 'Inter', sans-serif;
}

/* Section header */
#feedSection h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  color: #ff4444;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 68, 68, 0.3);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

/* Filters (search + dropdowns) */
#feedSection input[type="text"],
#feedSection select {
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #fff;
  padding: 10px 12px;
  font-size: 0.85rem;
  width: 100%;
  transition: all 0.2s ease;
  margin-bottom: 10px;
}
#feedSection input[type="text"]:focus,
#feedSection select:focus {
  outline: none;
  border-color: rgba(255, 68, 68, 0.3);
  box-shadow: 0 0 6px rgba(255, 68, 68, 0.15);
}
#feedSection input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Incident card container */
.incident-card {
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
  transition: all 0.25s ease-in-out;
}
.incident-card:hover {
  border-color: rgba(255, 68, 68, 0.3);
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.15);
}

/* Title */
.incident-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  color: #ff6666;
  text-transform: none;
  line-height: 1.4;
  margin-bottom: 8px;
}

/* Metadata rows */
.incident-card strong {
  color: #ff6666;
  font-weight: 600;
  margin-right: 4px;
}
.incident-card span {
  color: #fff;
}

/* Summary paragraph */
.incident-card p {
  color: #e0e0e0;
  font-size: 0.85rem;
  line-height: 1.45;
  margin-top: 6px;
}

/* Metrics (score-box) */
.incident-card .score-box {
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
}
.incident-card .score-box h4 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  color: #ff6666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 4px;
}

/* Helper tooltip icons */
.helper {
  color: #ff6666;
  opacity: 0.8;
}
.ai-note {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
  font-style: italic;
}

/* Incident cards */
.incident-card {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid #444;
  border-radius: 8px;
  padding: 10px;
  margin: 10px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.incident-card:hover {
  transform: translateY(-2px);
  border-color: #444;
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.3);
}
.incident-card h4 {
  margin: 0 0 5px;
  font-size: 15px;
  color: #ff4444;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}
.incident-card p {
  margin: 2px 0;
  font-size: 13px;
  color: #ddd;
  font-family: 'Inter', sans-serif;
}
.incident-card.active {
  border-color: #ff4444;
  box-shadow: 0 0 14px rgba(255, 0, 0, 0.5);
  transform: translateY(-2px);
}

/* Mapbox popup */
.mapboxgl-popup-content {
  background: rgba(20, 20, 20, 0.9) !important;
  backdrop-filter: blur(6px);
  border: 1px solid #444;
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #eee !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  font-family: 'Inter', sans-serif;
}
.mapboxgl-popup-content h3 {
  margin-top: 0;
  font-size: 16px;
  font-weight: bold;
  color: #ff4444;
  border-bottom: 1px solid rgba(255, 0, 0, 0.2);
  padding-bottom: 4px;
  font-family: 'Orbitron', sans-serif;
}
.mapboxgl-popup-content p strong {
  color: #ff4444;
  font-weight: 600;
}
.mapboxgl-popup-tip {
  border-top-color: rgba(20, 20, 20, 0.9) !important;
}

.popup-summary {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #ddd;
}

.mapboxgl-popup-content {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 15px rgba(255, 68, 68, 0.15);
}



/* === Clean Label/Value Grid for Popups === */
.mapboxgl-popup-content .popup-meta {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 2px 8px;
  align-items: center;
  font-size: 12px;
  margin-bottom: 6px;
}

.mapboxgl-popup-content .popup-meta span {
  white-space: nowrap;
}

.mapboxgl-popup-content .popup-meta strong {
  color: #ff4444;
  font-weight: 600;
}

/* Fix text bleed in popup meta grid */
.mapboxgl-popup-content .popup-meta {
  padding-right: 6px;               /* add some breathing room */
  word-break: break-word;           /* break long words if needed */
  overflow-wrap: anywhere;          /* modern fallback for long strings */
  line-height: 1.45;                /* slightly more relaxed line height */
}

.mapboxgl-popup-content .popup-meta span {
  color: #e0e0e0;                   /* soften the white text a touch */
  display: inline-block;
  max-width: 110px;                 /* constrain long values a bit */
  text-overflow: ellipsis;          /* clip if they still overflow */
  overflow: hidden;
  vertical-align: middle;
}

/* ================================
   Feed Card Compact Styling
================================ */
.incident-card {
  font-size: 0.9rem;
  line-height: 1.3;
  padding: 10px 12px;
}

.incident-card h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  line-height: 1.2;
}

.incident-card .popup-meta {
  font-size: 0.8rem;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 6px;
  row-gap: 2px;
  margin-bottom: 6px;
}

.incident-card .popup-meta strong {
  color: #ff4d4d;
  font-weight: 600;
}

.incident-card .popup-summary {
  font-size: 0.85rem;
  margin: 6px 0 10px;
  color: #ddd;
}

.incident-card .score-box {
  font-size: 0.8rem;
  padding: 6px 8px;
  margin-top: 6px;
  border: 1px solid rgba(255, 77, 77, 0.2);
  border-radius: 6px;
  background: rgba(20, 20, 20, 0.5);
}

.incident-card .score-box h4 {
  font-size: 0.85rem;
  color: #ff4d4d;
  margin-bottom: 4px;
}

.incident-card .helper {
  font-size: 0.7rem;
  opacity: 0.6;
  cursor: help;
  margin-left: 3px;
}

.incident-card .ai-note {
  font-size: 0.7rem;
  opacity: 0.5;
  margin-top: 6px;
}

/* Attack type badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 12px;
  margin-right: 6px;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}
.badge.ransomware { background: #c62828; color: white; }
.badge.databreach { background: #e65100; color: white; }
.badge.phishing { background: #fbc02d; color: black; }
.badge.ddos { background: #0288d1; color: white; }
.badge.undisclosed { background: #2ecc71; color: white; }

/* Attack dots on map */
.attack-dot.mapboxgl-marker {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  border: 2px solid #111 !important;
  opacity: 1 !important;
  display: block !important;
  box-shadow: none !important;
}

/* Header buttons group */
#header-buttons {
  display: flex;
  gap: 8px;
}
#header-buttons button {
  background: #111827;
  border: 1px solid rgba(255, 0, 0, 0.5);
  color: #ff4444;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s ease, color 0.2s ease;
}
#header-buttons button:hover {
  background: #ff4444;
  color: #fff;
}

/* Custom Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: #1a1a1a #111; /* dark idle */
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: #111;
}
*::-webkit-scrollbar-thumb {
  background-color: #1a1a1a;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}
/* Active (scrolling/hovering) */
.show-scrollbar {
  scrollbar-color: #ff4444 #111;
}
.show-scrollbar::-webkit-scrollbar-thumb {
  background-color: #ff4444;
}
.show-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: #ff6666;
}
#seo-content {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
/* === Impact & Confidence Visualization === */

.impact-section,
.confidence-section {
  margin-top: 8px;
  font-size: 0.9rem;
}

.impact-bar,
.confidence-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

/* Fill animation */
.impact-fill,
.confidence-fill {
  height: 100%;
  transition: width 0.6s ease-out, background 0.3s ease;
  border-radius: 3px;
}

/* === Impact color thresholds === */
.impact-fill.low { background: #2196f3; }    /* Low - blue */
.impact-fill.medium { background: #ff9800; } /* Medium - orange */
.impact-fill.high { background: #d32f2f; }   /* High - red */

/* === Confidence color thresholds === */
.confidence-fill.low { background: #e53935; }    /* Low - red */
.confidence-fill.medium { background: #fbc02d; } /* Medium - yellow */
.confidence-fill.high { background: #43a047; }   /* High - green */

/* === Tooltip styling === */
.impact-bar[data-tooltip],
.confidence-bar[data-tooltip] {
  position: relative;
  cursor: help;
}

.impact-bar[data-tooltip]::after,
.confidence-bar[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.95);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

/* Tooltip hover state */
.impact-bar[data-tooltip]:hover::after,
.confidence-bar[data-tooltip]:hover::after {
  opacity: 1;
}

/* Tooltip color variation */
.impact-bar.low[data-tooltip]::after { background: rgba(33,150,243,0.9); }
.impact-bar.medium[data-tooltip]::after { background: rgba(255,152,0,0.9); color: #222; }
.impact-bar.high[data-tooltip]::after { background: rgba(211,47,47,0.9); }

.confidence-bar.low[data-tooltip]::after { background: rgba(229,57,53,0.9); }
.confidence-bar.medium[data-tooltip]::after { background: rgba(251,192,45,0.9); color: #222; }
.confidence-bar.high[data-tooltip]::after { background: rgba(67,160,71,0.9); }

/* === Legend styling === */
#legend {
  background: rgba(20, 20, 20, 0.85);
  padding: 12px 16px;
  border-radius: 8px;
  color: #eee;
  font-size: 0.9rem;
  max-width: 220px;
  margin-top: 10px;
}

#legend h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 4px;
}

.legend-group { margin-top: 10px; }

.legend-group h4 {
  margin-bottom: 4px;
  color: #bbb;
  font-size: 0.85rem;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}
.tags {
  margin-top: 8px;
}
.tag {
  display: inline-block;
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.4);
  color: #f88;
  border-radius: 8px;
  font-size: 0.8rem;
  padding: 2px 8px;
  margin: 2px 4px 0 0;
  text-transform: capitalize;
}
/* Feed */
.feed-item {
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
  transition: 0.2s;
}
.feed-item:hover {
  background: #1a1a1a;
  cursor: pointer;
}

/* === Attack Type Pills (Enhanced) === */
.attack-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px 3px;
  margin-left: 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.3px;
  color: #fff;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  backdrop-filter: blur(3px);
  transition: all 0.25s ease;
  vertical-align: middle;
}

.attack-pill:hover {
  box-shadow: 0 0 8px currentColor, 0 0 15px rgba(255,255,255,0.1);
  transform: translateY(-1px);
}

/* Neutral fallback for unknown types */
.attack-pill[data-type="undisclosed"],
.attack-pill[data-type="unknown"] {
  background: linear-gradient(90deg, #2ecc71, #27ae60);
  color: #fff;
}

/* Align attack type pill flush with title */
.attack-type-row {
  margin: 4px 0 6px 0;
  padding-left: 0;
  text-align: left;
}

.attack-type {
  margin-left: 0 !important;
  display: inline-block;
}

/* Optional: tighten top spacing in popups */
.mapboxgl-popup-content .attack-type-row {
  margin-top: 6px;
  margin-bottom: 8px;
}

/* Align attack-type pill row flush with title */
.attack-type-row {
  margin: 4px 0 8px 0;
  padding: 0;
  text-align: left;
}

/* Ensure it ignores inherited padding/margins */
.map-popup .attack-type-row,
.incident-card .attack-type-row {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Tighten popup text spacing */
.map-popup h4,
.map-popup h3 {
  margin-bottom: 4px !important;
}

/* Prevent inner span from introducing any offset */
.attack-type-row .attack-pill {
  margin-left: 0 !important;
  display: inline-block;
}

/* Subtle dark outline for readability on bright map zones */
.map-popup .attack-pill {
  border: 1px solid rgba(0,0,0,0.25);
}


/* Progress bars */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #333;
  border-radius: 3px;
  overflow: hidden;
  margin: 3px 0 8px 0;
}
.progress-bar div {
  height: 100%;
  border-radius: 3px;
}
.progress-bar.impact div {
  background: #ff4d4d;
}
.progress-bar.confidence div {
  background: #00ff66;
}

/* --- Popup visual refresh --- */
.mapboxgl-popup-content {
  background: #111;
  color: #eee;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  max-width: 370px;
  min-width: 320px;
  line-height: 1.4;
}

/* Header now uses the attack color */
.popup-header {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  border-bottom: 2px solid var(--attack-color, #ff4444);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

/* Grid spacing improved */
.popup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.popup-grid p {
  margin: 0;
  display: flex;
  justify-content: space-between;
}

.popup-grid strong {
  color: #ff4444;
  font-weight: 600;
}

/* Impact + confidence */
.popup-impact {
  margin-top: 8px;
}

.popup-impact strong {
  color: #fff;
}

/* === Popup Severity Hierarchy Fix === */
.popup-impact {
  margin-top: 6px;
}

.popup-impact .severity-section strong {
  font-size: 13px;           /* smaller than card title */
  color: #fff;
  text-transform: none;
}

.popup-impact .severity-section {
  margin-bottom: 6px;
}

.popup-impact strong {
  font-size: 12px;           /* Impact / Confidence labels slightly smaller */
  color: #ccc;               /* subtle contrast */
  font-weight: 600;
}

.popup-impact span,
.popup-impact .severity-sub {
  font-size: 10.5px;         /* supporting text smaller */
  color: #999;
}

/* === Feed Card Severity Hierarchy Match === */
.incident-card .impact-section strong,
.incident-card .confidence-section strong,
.incident-card .severity-section strong {
  font-size: 13px;        /* same as popup */
  color: #fff;
  text-transform: none;
  font-weight: 700;
}

.incident-card .impact-section strong,
.incident-card .confidence-section strong {
  font-size: 12px;        /* slightly smaller than severity */
  color: #ccc;
  font-weight: 600;
}

.incident-card .severity-sub {
  font-size: 10.5px;
  color: #999;
}

/* Summary spacing improved */
.popup-summary {
  margin-top: 14px;
  font-size: 0.86rem;
  color: #ddd;
}

/* Subtle hover accent */
.mapboxgl-popup-content:hover {
  border-color: var(--attack-color, #ff4444);
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.25);
}

/* Mobile */
@media (max-width: 480px) {
  .popup-grid {
    grid-template-columns: 1fr;
  }
}

/* === SOURCES SECTION (Feed + Popup) === */
.sources {
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid #ff4444;
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.sources strong {
  color: #ff6666;
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.sources ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.sources li {
  margin: 3px 0;
}

.sources a {
  color: #66b3ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sources a:hover {
  text-decoration: underline;
  color: #99ccff;
}

.mapboxgl-popup-content .sources {
  background: rgba(255, 255, 255, 0.03);
  border-left-color: #ff6666;
}

#incidentFeed .sources {
  margin-top: 6px;
  padding: 6px 8px;
  font-size: 0.75rem;
}

/* === Score Box === */
.score-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 16px 0;
  box-shadow: inset 0 0 6px rgba(255, 68, 68, 0.1);
}

.score-box h4 {
  color: #ff4444;
  font-size: 0.9rem;
  text-transform: uppercase;
  margin: 0 0 8px 0;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 68, 68, 0.2);
  padding-bottom: 4px;
}

.bar-fill {
  animation: fillbar 0.8s ease-out;
}

@keyframes fillbar {
  from { width: 0; opacity: 0.4; }
  to { opacity: 1; }
}

/* === Feed Card Score Box === */
.incident-card .score-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 68, 68, 0.15);
  margin-top: 10px;
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: inset 0 0 6px rgba(255, 68, 68, 0.08);
}

.incident-card .score-box h4 {
  font-size: 0.8rem;
  color: #ff5555;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 68, 68, 0.1);
  padding-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* === Severity Index Visualization === */
.severity-section {
  margin-top: 10px;
  font-size: 1rem; /* larger than other bars */
}

.severity-bar {
  position: relative;
  width: 100%;
  height: 10px; /* larger than Impact/Confidence bars */
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 4px;
  margin-bottom: 2px;
}

.severity-fill {
  height: 100%;
  transition: width 0.6s ease-out, background 0.3s ease;
  border-radius: 5px;
}

.severity-fill.low {
  background: #43a047; /* green */
}
.severity-fill.medium {
  background: #ff9800; /* orange */
}
.severity-fill.high {
  background: #d32f2f; /* red */
}

.severity-sub {
  display: block;
  color: #888;
  font-size: 0.75rem;
  margin-top: 2px;
}
#top5Severity {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #ddd;
  line-height: 1.3;
  text-align: left;
}
#top5Severity br {
  margin-bottom: 4px;
}

/* === Leaderboard styling === */
.leaderboard {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  font-family: 'Inter', sans-serif;
}

.leaderboard-item {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.85rem;
  color: #eee;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
  padding: 2px 4px;
}

.leaderboard-item:hover {
  background: rgba(255, 68, 68, 0.1);
  color: #ff6666;
}

.leaderboard-item .rank {
  color: #ff4444;
  font-weight: 700;
  margin-right: 6px;
  min-width: 1rem;
}

.leaderboard-item .title {
  flex-grow: 1;
  font-weight: 600;
  color: #fff;
}

.leaderboard-item .score {
  color: #888;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
}

/* === Leaderboard Styling (Top 5 Severe Incidents) â€” Compact Version === */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'Inter', sans-serif;
  padding: 4px 0;
}

.leaderboard-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.78rem; /* ðŸ”¹ smaller font */
  color: #ccc;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s ease, transform 0.15s ease;
  cursor: pointer;
}

.leaderboard-item:hover {
  background: rgba(255, 68, 68, 0.1);
  transform: translateY(-1px);
}

.leaderboard-item.active {
  background: rgba(255, 68, 68, 0.15);
  border-left: 2px solid #ff4444;
}

.leaderboard-item .rank {
  color: #ff4444;
  font-weight: 600;
  margin-right: 6px;
}

.leaderboard-item .title {
  flex: 1;
  font-weight: 500;
  color: #ddd;
  line-height: 1.2;
}

.leaderboard-item .score {
  font-weight: 600;
  font-size: 0.8rem;
  color: #ff4444; /* ðŸ”¹ red score */
  margin-left: 6px;
}

/* === Smaller Map Popups (force override) === */
.mapboxgl-popup {
  max-width: 260px !important;
  z-index: 9999;
}

.mapboxgl-popup-content {
  background: rgba(15, 15, 15, 0.92) !important;
  backdrop-filter: blur(6px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: #eee !important;
  max-width: 400px !important;
}

.mapboxgl-popup-content h3 {
  font-size: 13px !important;
  margin-top: 0 !important;
  margin-bottom: 6px !important;
  color: #ff4444 !important;
  font-family: 'Orbitron', sans-serif !important;
}

.mapboxgl-popup-content p {
  margin: 4px 0 !important;
  font-size: 12px !important;
  color: #ddd !important;
}

.impact-bar,
.confidence-bar {
  height: 4px !important;
  margin-top: 3px !important;
}

/* Slight offset so popup hovers above marker */
.mapboxgl-popup-tip {
  margin-top: -6px !important;
}

/* === KPI Dock (compact & translucent) === */
#kpiDock {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.55) 90%);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(calc(100% - 32px));
  transition: transform 0.4s ease-in-out, opacity 0.3s ease;
  z-index: 15;
  opacity: 0.75;
}

#kpiDock:hover {
  opacity: 1;
}

/* subtle glow line */
#kpiDock::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 68, 68, 0.6), transparent);
  z-index: 16;
}

#kpiDock.active {
  transform: translateY(0);
}

/* === KPI Layout (scrollable) === */
#kpiContent {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.6rem 1rem 0.8rem;
  justify-content: flex-start;
  align-items: stretch;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}
#kpiContent::-webkit-scrollbar {
  height: 6px;
}
#kpiContent::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
#kpiContent::-webkit-scrollbar-thumb {
  background: rgba(255, 68, 68, 0.4);
  border-radius: 3px;
}

/* === KPI Cards (smaller footprint) === */
#kpiContent .metric-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 0 5px rgba(255, 68, 68, 0.2);
}
#kpiContent .metric-card:hover {
  transform: scale(1.04);
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}
#kpiContent .metric-card h3 {
  margin-bottom: 0.25rem;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
#kpiContent .metric-card p {
  margin: 0;
  color: #ff4444;
  font-size: 1.1rem;
  font-weight: bold;
}

/* === Responsive tweaks === */
@media (max-width: 768px) {
  #kpiDock {
    transform: translateY(calc(100% - 28px));
  }
  #kpiContent {
    gap: 0.6rem;
    padding: 0.5rem;
  }
  #kpiContent .metric-card {
    flex: 0 0 160px;
  }
}

/* === MAP & WRAPPER LAYOUT === */
#mapWrapper {
  position: absolute;
  top: 60px;     /* adjust for header height */
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;    /* sits under sidebar, above background */
  overflow: hidden;
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;  /* ðŸ”¥ required for Mapbox to render */
  z-index: 1;
}

/* === KPI Dock alignment tweak === */
#kpiContent {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  padding: 12px 20px 16px;
  max-width: 1200px;
  width: 100%;
  justify-content: start;    /* âœ… left-align instead of centered */
  margin-left: 8%;           /* âœ… shift whole grid slightly left */
  align-items: stretch;
  box-sizing: border-box;
}

/* === Map â†’ KPI Dock gradient fade === */
#kpiDock::before {
  content: "";
  position: absolute;
  top: -40px; /* height above the dock */
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(
    to bottom,
    rgba(13,17,23,0) 0%,          /* fully transparent at top */
    rgba(13,17,23,0.95) 100%      /* fades into dock color */
  );
  pointer-events: none; /* don't block interactions */
  z-index: 10;
}

/* === KPI Dock Behavior === */
#kpiDock {
  position: fixed;
  bottom: 0;
  left: 0;
  width: calc(100% - 320px); /* keeps it out of the feed area */
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  transition: transform 0.5s ease, opacity 0.4s ease;
  transform: translateY(100%); /* start hidden */
  opacity: 0;
  z-index: 10;
  border-top: 1px solid #ff0000;
  padding: 10px 0;
}

/* Expanded = visible */
#kpiDock.expanded {
  transform: translateY(0);
  opacity: 1;
}

/* Collapsed = compact floating button */
#kpiDock.collapsed {
  position: fixed;
  top: 20px;
  left: 20px;
  width: auto;
  height: auto;
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 30px;
  padding: 8px 16px;
  color: #ff4444;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.2);
  transition: all 0.25s ease;
  transform: none;   /* override the slide-down behavior */
  opacity: 1;        /* visible in collapsed mode */
  z-index: 50;       /* keep above map */
}

#kpiDock.collapsed:hover {
  background: rgba(255, 68, 68, 0.15);
  border-color: rgba(255, 68, 68, 0.5);
  transform: translateY(-1px);
}


/* === KPI SIDEBAR STYLING === */
#kpiSection {
  padding: 14px 16px;
  color: #eee;
  font-family: "Inter", "Roboto", sans-serif;
}

#kpiSection h2 {
  font-size: 1.4rem;
  margin-bottom: 18px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 0, 0, 0.4);
  padding-bottom: 6px;
}

#kpiPanel.kpi-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Metric Cards */
.metric-card {
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid rgba(255, 0, 0, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease-in-out;
}

.metric-card:hover {
  border-color: rgba(255, 0, 0, 0.4);
  transform: translateY(-2px);
}

/* Headings */
.metric-card h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ff4444;
  margin-bottom: 6px;
}

/* Numbers */
.metric-card p {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ff4444;
  margin: 0;
}

/* Leaderboard styling */
.metric-card ol.leaderboard {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
}

.metric-card ol.leaderboard li {
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid rgba(255, 0, 0, 0.5);
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #ddd;
  transition: background 0.2s, border-color 0.2s;
}

.metric-card ol.leaderboard li:hover {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: #ff4444;
  cursor: pointer;
}

.metric-card .score {
  float: right;
  color: #ff7777;
  font-weight: 600;
}


/* Sidebar panel */
#sidebar {
  position: fixed;
  right: 0;
  top: 60px;
  width: 340px;
  height: calc(100vh - 60px);
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(8px);
  border-left: 1px solid rgba(255, 68, 68, 0.2);
  color: white;
  overflow-y: auto;
  transition: transform 0.4s ease-in-out;
  z-index: 1000;
  padding-bottom: 80px; /* add extra clearance for footer */
}

#sidebar.collapsed {
  transform: translateX(100%);
}

/* === Sidebar Edge Handle (Enhanced Visibility) === */
#sidebar-handle {
  position: absolute;
  right: -30px; /* push it further outside the sidebar */
  top: 140px;
  width: 28px;
  height: 70px;
  background: linear-gradient(180deg, rgba(255,68,68,0.35) 0%, rgba(255,68,68,0.7) 100%);
  border: 1px solid rgba(255,68,68,0.8);
  border-left: none;
  border-radius: 0 10px 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  cursor: pointer;
  z-index: 1200;
  transition: all 0.25s ease-in-out;
  box-shadow: 0 0 12px rgba(255,68,68,0.6);
  text-shadow: 0 0 6px rgba(255,68,68,0.9);
  opacity: 0.85;
}

#sidebar-handle:hover {
  opacity: 1;
  transform: translateX(3px);
  background: rgba(255,68,68,0.9);
  box-shadow: 0 0 18px rgba(255,68,68,0.8);
}

/* Section styling */
.sidebar-section {
  padding: 16px 18px;
  font-family: 'Inter', sans-serif;
}

.sidebar-section h2 {
  color: #ff4444;
  font-family: 'Orbitron', sans-serif;
  margin-bottom: 10px;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 68, 68, 0.3);
  padding-bottom: 6px;
}

/* Metric cards */
.metric-card {
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid rgba(255, 68, 68, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  transition: all 0.2s ease;
}
.metric-card:hover {
  border-color: rgba(255, 68, 68, 0.5);
  transform: translateY(-2px);
}
.metric-card h3 {
  font-size: 0.85rem;
  color: #ff4444;
  text-transform: uppercase;
  margin: 0 0 6px;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
}
.metric-card p {
  font-size: 1.8rem;
  color: #ff4444;
  margin: 0;
  font-family: 'Orbitron', sans-serif;
}

/* Leaderboard inside KPI tab */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.leaderboard-item {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid rgba(255, 68, 68, 0.3);
  padding: 6px 8px;
  border-radius: 6px;
  color: #ddd;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  cursor: pointer;
}
.leaderboard-item:hover {
  background: rgba(255, 68, 68, 0.1);
  border-left-color: #ff4444;
  color: #ff6666;
}
.leaderboard-item.active {
  background: rgba(255, 68, 68, 0.12);
  border-left-color: #ff4444;
}
.leaderboard-item .score {
  float: right;
  color: #ff7777;
  font-weight: 600;
  font-family: 'Orbitron', sans-serif;
}

/* === Metric Helper Tooltips === */
.helper {
  display: inline-block;
  color: #ff6666;
  font-size: 0.8rem;
  cursor: help;
  margin-left: 4px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  position: relative;
}
.helper:hover { opacity: 1; }

.helper::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.95);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}
.helper:hover::after { opacity: 1; }

/* === About Section Enhancements === */
#aboutSection h3 {
  color: #ff5555;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 68, 68, 0.2);
  padding-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

#aboutSection ul {
  margin: 6px 0 10px 20px;
  padding: 0;
  color: #ddd;
  font-size: 0.85rem;
  line-height: 1.4;
}

#aboutSection li {
  margin-bottom: 4px;
}

#aboutSection .ai-info-box {
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid #ff4444;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 8px 0 10px;
  font-size: 0.85rem;
  color: #ccc;
}

#aboutSection h3 {
  text-transform: uppercase;
  color: #ff4444;
  border-bottom: 1px solid rgba(255, 68, 68, 0.3);
  margin-top: 16px;
  padding-bottom: 3px;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
}

#aboutSection p strong {
  color: #ff6666;
}

/* === AI Impact Assessment Styling === */
.ai-impact-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #00e0ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-impact-title::before {
  content: "ðŸ¤–";
  font-size: 1rem;
  opacity: 0.85;
}

.score-box {
  margin-top: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 224, 255, 0.1);
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0, 224, 255, 0.05) inset;
}

.ai-note {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 8px;
  font-style: italic;
}

/* === Compact Incident Feed Cards === */
.incident-card {
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  transition: all 0.2s ease-in-out;
}

.incident-card:hover {
  border-color: rgba(255, 68, 68, 0.3);
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.2);
  transform: translateY(-2px);
}

/* Headings + links */
.incident-card h4 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  color: #ff6666;
  margin: 0 0 4px;
}

.incident-card a {
  color: #ff6666;
  text-decoration: none;
}
.incident-card a:hover {
  text-decoration: underline;
}

/* Meta line under title */
.meta-line {
  font-size: 0.8rem;
  color: #aaa;
  margin: 0 0 6px;
}

/* AI description snippet */
.summary {
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* Severity metric section */
.metric {
  position: relative;
  font-size: 0.85rem;
  color: #fff;
}

.metric strong {
  color: #ff6666;
  font-weight: 600;
}

.metric .bar {
  height: 6px;
  background: #333;
  border-radius: 4px;
  margin: 4px 0;
  overflow: hidden;
}

.metric .fill {
  height: 100%;
  background: linear-gradient(90deg, #ff4444, #ff9800);
  border-radius: 4px;
  transition: width 0.4s ease-out;
}

.metric .score {
  font-size: 0.8rem;
  color: #aaa;
}

/* Tooltip (info icon hover) */
.helper {
  cursor: help;
  color: #888;
  margin-left: 3px;
  font-size: 0.85em;
  position: relative;
}

.helper:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  left: 0;
  background: rgba(20, 20, 20, 0.95);
  color: #fff;
  font-size: 0.75rem;
  padding: 6px 8px;
  border-radius: 4px;
  width: 220px;
  line-height: 1.3;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
  white-space: normal;
  z-index: 10;
}

/* === Compact Map Popups === */
.mapboxgl-popup {
  max-width: 300px !important;
  font-family: 'Inter', sans-serif;
}

.map-popup {
  background: rgba(10,10,10,0.9);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #e0e0e0;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.map-popup h4 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  color: #ff6666;
  margin: 0 0 4px;
}

.map-popup a {
  color: #ff6666;
  text-decoration: none;
}
.map-popup a:hover {
  text-decoration: underline;
}

.map-popup .meta-line {
  font-size: 0.8rem;
  color: #aaa;
  margin: 0 0 6px;
}

.map-popup .summary {
  color: #ccc;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* Severity metric */
.map-popup .metric {
  font-size: 0.85rem;
}
.map-popup .metric strong {
  color: #ff6666;
  font-weight: 600;
}
.map-popup .metric .bar {
  height: 6px;
  background: #333;
  border-radius: 4px;
  margin: 4px 0;
  overflow: hidden;
}
.map-popup .metric .fill {
  height: 100%;
  background: linear-gradient(90deg,#ff4444,#ff9800);
  border-radius: 4px;
  transition: width 0.4s ease-out;
}
.map-popup .metric .score {
  font-size: 0.8rem;
  color: #aaa;
}

/* Tooltip helper */
.map-popup .helper {
  cursor: help;
  color: #888;
  margin-left: 3px;
  font-size: 0.85em;
  position: relative;
}
.map-popup .helper:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  left: 0;
  background: rgba(20,20,20,0.95);
  color: #fff;
  font-size: 0.75rem;
  padding: 6px 8px;
  border-radius: 4px;
  width: 220px;
  line-height: 1.3;
  box-shadow: 0 0 8px rgba(255,68,68,0.3);
  white-space: normal;
  z-index: 10;
}

/* === AI IMPACT ASSESSMENT (Updated Hierarchy) === */

.ai-impact {
  margin-top: 8px;
}

.metric.primary {
  margin-top: 10px;
  margin-bottom: 10px;
}

.bar.primary {
  height: 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
  box-shadow: 0 0 8px rgba(255, 152, 0, 0.3);
}

.fill.primary {
  height: 100%;
  background: linear-gradient(90deg, #ff4444, #ff9800);
  transition: width 0.5s ease;
  box-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
}

.metric-caption {
  display: block;
  font-size: 0.75rem;
  color: #aaa;
  margin-top: 4px;
  line-height: 1.3;
  max-width: 320px;
}

.metric.secondary {
  margin-top: 6px;
}

.bar.secondary {
  height: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.fill.secondary.impact {
  background: #e53935;
  transition: width 0.4s ease;
}

.fill.secondary.confidence {
  background: #43a047;
  transition: width 0.4s ease;
}

.score {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: #bbb;
  font-family: 'Orbitron', sans-serif;
}

#mini-footer {
  position: fixed;
  bottom: 0;
  right: 0;
  width: auto;
  padding: 8px 18px 10px 18px;
  background: rgba(10, 10, 10, 0.85);
  border-top-left-radius: 10px;
  border: 1px solid rgba(255, 68, 68, 0.25);
  border-bottom: none;
  box-shadow:
    0 0 15px rgba(255, 68, 68, 0.2),
    inset 0 0 10px rgba(255, 68, 68, 0.15);
  z-index: 9999;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #ddd;
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
}

#mini-footer a {
  color: #ff6666;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

#mini-footer a:hover {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 68, 68, 0.9);
}

#mini-footer span {
  color: #ff4444;
  margin: 0 8px;
  opacity: 0.8;
}

/* ==============================
   FLOATING KPI CARDS
   ============================== */
#kpi-overlay {
  position: fixed;
  top: 100px;
  left: 25px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.kpi-card {
  background: rgba(15, 15, 20, 0.8);
  border: 1px solid rgba(255, 68, 68, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  width: 210px;
  color: #ddd;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 15px rgba(255, 68, 68, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(255, 68, 68, 0.25);
}

.kpi-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  color: #ff6666;
  margin: 0 0 5px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(255,68,68,0.4);
}

.kpi-card p {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

#kpi-top5 {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
}
#kpi-top5 li {
  margin-bottom: 3px;
  color: #ccc;
}

/* === KPI PANEL POLISH === */
.kpi-card {
  background: rgba(15, 15, 20, 0.9);
  border: 1px solid rgba(255, 68, 68, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
  width: 240px;
  color: #e0e0e0;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(255, 68, 68, 0.25);
}

/* Section titles */
.kpi-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  color: #ff5555;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(255,68,68,0.5);
  border-bottom: 1px solid rgba(255,68,68,0.15);
  padding-bottom: 4px;
}

/* Values */
.kpi-card p {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
  text-shadow: 0 0 6px rgba(255, 68, 68, 0.2);
}

/* === TOP 5 LIST === */
#kpi-top5 {
  list-style: none;
  margin: 0;
  padding: 0;
}

#kpi-top5 li {
  margin: 4px 0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  padding: 4px 6px;
  transition: background 0.2s ease, transform 0.2s ease;
}

#kpi-top5 li:hover {
  background: rgba(255, 68, 68, 0.1);
  transform: translateX(4px);
}

/* Link styling (red glow) */
.kpi-link,
.kpi-link:visited {
  color: #ff6666 !important;
  text-decoration: none !important;
  font-weight: 500;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.kpi-link:hover {
  color: #fff !important;
  text-shadow: 0 0 10px rgba(255, 68, 68, 0.8);
}

.kpi-score {
  color: #bbb;
  font-size: 0.8rem;
  margin-left: 4px;
  opacity: 0.8;
}
/* === TOP 5 LIST POLISH === */
#kpi-top5 {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

#kpi-top5 li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 6px 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

#kpi-top5 li:hover {
  background: rgba(255, 68, 68, 0.1);
  transform: translateX(6px);
}

/* Victim name (left side) */
.kpi-victim {
  color: #fff;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
  font-size: 0.95rem;
}

/* Date (middle, smaller, subtle) */
.kpi-date {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: #aaa;
  letter-spacing: 0.3px;
  opacity: 0.8;
}

/* Severity (right side) */
.kpi-score {
  color: #ff6666;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(255, 68, 68, 0.6);
}

mark.highlight {
  background: rgba(255, 68, 68, 0.35);
  color: #fff;
  font-weight: 600;
  padding: 0 2px;
  border-radius: 3px;
}

/* === Compact AI Metrics Alignment === */
.ai-impact {
  margin-top: 10px;
}

.ai-impact .metric {
  margin-bottom: 6px;
}

.ai-impact strong {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ff5555;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.ai-impact .bar.primary.impact {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 4px;
}

.ai-impact .bar.secondary.confidence {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.ai-impact .fill.primary.impact {
  background: linear-gradient(90deg, #ff4500, #ffbb00);
  transition: width 0.5s ease;
  height: 100%;
}

.ai-impact .fill.secondary.confidence {
  background: #43a047;
  transition: width 0.5s ease;
  height: 100%;
}

.ai-impact .score {
  font-family: 'Orbitron', sans-serif;
  color: #bbb;
  font-size: 0.8rem;
}

.ai-impact .metric-caption {
  font-size: 0.7rem;
  color: #999;
  line-height: 1.3;
  margin-top: 3px;
  max-width: 280px;
}

.ai-impact .fill {
  transition: width 0.8s ease, background-color 0.4s ease;
}

.kpi-number {
  font-weight: 700;
  font-size: 1.6rem;
  color: #fff;
}

.kpi-scale {
  font-weight: 400;
  font-size: 0.9rem;
  opacity: 0.7;
  margin-left: 4px;
}

/* KPI Overlay */
#kpi-overlay {
  position: absolute;
  top: 80px;
  right: 20px;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 12px;
  padding: 1rem;
  z-index: 100;
  width: 280px;
  backdrop-filter: blur(8px);
}

/* KPI Header */
#kpi-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
}

#toggle-kpi-btn {
  background: transparent;
  color: #ff4444;
  border: 1px solid #ff4444;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-weight: bold;
  font-size: 1rem;
  line-height: 1rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

#toggle-kpi-btn:hover {
  background: #ff4444;
  color: #fff;
}

#kpi-label {
  margin-left: 8px;
  font-family: 'Orbitron', sans-serif;
  color: #ff4444;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* Collapsible KPI cards */
.kpi-cards {
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out;
  overflow: hidden;
  max-height: 2000px; /* large enough to fit all */
}

.kpi-cards.collapsed {
  max-height: 0;
  opacity: 0;
}

/* === KPI Dock Conflict Override â€” Final Authority === */
#kpiDock.collapsed {
  transform: none !important;
  opacity: 1 !important;
  width: auto !important;
  height: auto !important;
  bottom: auto !important;
  top: 20px !important;
  left: 20px !important;
  right: auto !important;
  background: rgba(20, 20, 20, 0.85) !important;
  border: 1px solid rgba(255, 68, 68, 0.3) !important;
  border-radius: 30px !important;
  padding: 8px 16px !important;
  color: #ff4444 !important;
  font-family: 'Orbitron', sans-serif !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.2) !important;
  transition: all 0.25s ease !important;
  z-index: 9999 !important;
}

#kpiDock.collapsed:hover {
  background: rgba(255, 68, 68, 0.15) !important;
  border-color: rgba(255, 68, 68, 0.5) !important;
  transform: translateY(-1px) !important;
}

/* === Reopen KPI Button === */
#reopen-kpi-btn {
  position: fixed;
  top: 80px; /* ðŸ§­ adjust as needed */
  left: 20px;
  background: rgba(255, 68, 68, 0.15);
  border: 1px solid rgba(255, 68, 68, 0.5);
  color: #ff6666;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  z-index: 9999; /* ðŸ‘ˆ keeps it above Mapbox UI */
  backdrop-filter: blur(6px);
  transition: all 0.25s ease;
}

#reopen-kpi-btn:hover {
  background: rgba(255, 68, 68, 0.3);
  color: #fff;
  transform: translateY(-1px);
}

.filter-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 0, 0, 0.25);
  color: #ddd;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: #ff4444;
  color: #fff;
  box-shadow: 0 0 6px rgba(255, 0, 0, 0.2);
}

.chip.active {
  background: linear-gradient(90deg, #a00 0%, #c00 100%);
  color: #fff;
  border-color: #ff4444;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
}

/* === COMPACT FILTER CONTROLS === */
.feed-controls {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 0, 0, 0.2);
}

#searchInput {
  margin-bottom: 6px;
  padding: 5px 8px;
  font-size: 0.8rem;
}

/* Filter Toggle Button */
.filter-toggle {
  width: calc(100% - 20px);
  margin: 5px 10px;
  padding: 6px 10px;
  background: rgba(255, 68, 68, 0.08);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 6px;
  color: #ff6666;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.filter-toggle:hover {
  background: rgba(255, 68, 68, 0.15);
  border-color: rgba(255, 68, 68, 0.5);
}

.filter-chevron {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 0.65rem;
  margin-left: 6px;
}

.filter-toggle.expanded .filter-chevron {
  transform: rotate(180deg);
}

/* Collapsible Filter Panel */
.filter-panel {
  max-height: 500px;
  overflow: hidden;
  opacity: 1;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  padding: 6px 10px;
  border-top: 1px solid rgba(255, 68, 68, 0.15);
}

.filter-panel.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0 10px;
}

/* Filter Group Styling */
.filter-group {
  margin-bottom: 6px;
}

.filter-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #ff6666;
  font-weight: 600;
  margin-bottom: 3px;
  letter-spacing: 0.5px;
  font-family: 'Orbitron', sans-serif;
}

/* Chip Group (horizontal, compact) */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 4px;
}

/* Individual Chip */
.chip {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.02);
  color: #aaa;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 500;
  white-space: nowrap;
}

.chip:hover {
  color: #fff;
  border-color: rgba(255, 0, 0, 0.5);
  background: rgba(255, 0, 0, 0.08);
}

.chip.active {
  color: #fff;
  background: linear-gradient(90deg, #a00, #d00);
  border-color: #ff4444;
  box-shadow: 0 0 4px rgba(255, 68, 68, 0.3);
}

/* Clear Filters Button */
.clear-filters-btn {
  width: calc(100% - 12px);
  margin-top: 6px;
  padding: 4px 6px;
  background: transparent;
  border: 1px solid rgba(255, 68, 68, 0.25);
  border-radius: 4px;
  color: #ff6666;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-filters-btn:hover {
  background: rgba(255, 68, 68, 0.1);
  border-color: rgba(255, 68, 68, 0.5);
}

/* === STATUS STRIP === */
#status-strip {
  display: flex;
  justify-content: center;
  gap: 40px;
  background: linear-gradient(90deg, rgba(60, 0, 0, 0.85) 0%, rgba(15, 0, 0, 0.9) 100%);
  border-top: 1px solid rgba(255, 68, 68, 0.25);
  border-bottom: 1px solid rgba(255, 68, 68, 0.25);
  box-shadow: inset 0 0 20px rgba(255, 68, 68, 0.15), 0 0 8px rgba(255, 68, 68, 0.15);
  padding: 10px 25px;
  color: #ff6666;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  text-transform: lowercase;
  align-items: center;
}

#status-strip span {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: transform 0.3s ease, color 0.3s ease;
}

#status-strip strong {
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 80, 80, 0.6);
}

#status-strip span:hover {
  transform: scale(1.05);
  color: #fff;
}
#kpi-90days {
  color: #ff5252; /* red = warning */
}
#kpi-90days.status-low {
  color: #4ade80; /* green = normal */
}

/* === FIX HEADER / SIDEBAR OVERLAP === */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(
    90deg,
    rgba(8, 0, 0, 0.95) 0%,
    rgba(60, 0, 0, 0.92) 40%,
    rgba(120, 0, 0, 0.9) 100%
  );
  backdrop-filter: blur(8px);
  color: #e0e0e0;
  z-index: 1000; /* ensures header stays on top */
}

/* Push main content below fixed header */
main,
#map,
.sidebar,
.feed-container {
  margin-top: 60px; /* same as header height */
}
