/* ═══════════════════════════════════════════════════════════════════
   HELIOS — Design System & Component Styles
   Light ops-dashboard theme with risk-accent colors
   ═══════════════════════════════════════════════════════════════════ */

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

/* ─── CSS Custom Properties (Design Tokens) — LIGHT THEME ─────── */
:root {
  /* Surfaces */
  --bg-primary:    #f0f2f5;
  --bg-secondary:  #ffffff;
  --bg-card:       #ffffff;
  --bg-card-hover: #f7f8fa;
  --bg-elevated:   #f0f2f5;
  --bg-topbar:     #ffffff;
  --bg-map:        #e8e0d8;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-card:   rgba(0, 0, 0, 0.08);
  --border-hover:  rgba(0, 0, 0, 0.15);

  /* Text */
  --text-primary:   #111827;
  --text-secondary: #4b5563;
  --text-muted:     #9ca3af;
  --text-inverse:   #ffffff;

  /* Accent */
  --accent:         #0891b2;
  --accent-dim:     rgba(8, 145, 178, 0.08);
  --accent-glow:    rgba(8, 145, 178, 0.15);
  --accent-text:    #0e7490;

  /* Risk Colors */
  --risk-low:        #16a34a;
  --risk-low-bg:     rgba(22, 163, 74, 0.08);
  --risk-low-border: rgba(22, 163, 74, 0.25);
  --risk-moderate:   #d97706;
  --risk-mod-bg:     rgba(217, 119, 6, 0.08);
  --risk-mod-border: rgba(217, 119, 6, 0.25);
  --risk-high:       #dc2626;
  --risk-high-bg:    rgba(220, 38, 38, 0.07);
  --risk-high-border:rgba(220, 38, 38, 0.25);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card:     0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-elevated: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-popup:    0 8px 24px rgba(0,0,0,0.12);
  --shadow-topbar:   0 1px 3px rgba(0,0,0,0.05);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --topbar-height: 60px;
  --sidebar-width: 480px;
}

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

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
}

/* ─── Scrollbar Styling ──────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.25);
}

/* ═══════════════════════════════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-2xl);
  z-index: 1000;
  box-shadow: var(--shadow-topbar);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.topbar__logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.topbar__title-group {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.topbar__title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.topbar__subtitle {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.topbar__controls {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

/* City Selector */
.city-selector {
  position: relative;
}

.city-selector__button {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.city-selector__button:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.city-selector__icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

/* City Dropdown Menu */
.city-selector__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-popup);
  z-index: 2000;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: all var(--transition-fast);
}

.city-selector__dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.city-selector__option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.city-selector__option:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.city-selector__option.active {
  background: var(--accent-dim);
  color: var(--accent-text);
  font-weight: 600;
}

.city-selector__option-check {
  width: 14px;
  height: 14px;
  opacity: 0;
}

.city-selector__option.active .city-selector__option-check {
  opacity: 1;
  color: var(--accent);
}

/* Time Horizon Toggle */
.time-toggle {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.time-toggle__btn {
  padding: var(--space-sm) var(--space-md);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.time-toggle__btn:not(:last-child) {
  border-right: 1px solid var(--border-subtle);
}

.time-toggle__btn:hover {
  color: var(--text-secondary);
  background: var(--bg-card-hover);
}

.time-toggle__btn.active {
  color: var(--accent-text);
  background: var(--accent-dim);
  font-weight: 600;
}

/* Status Pill */
.status-pill {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-pill--normal {
  background: var(--risk-low-bg);
  color: var(--risk-low);
  border: 1px solid var(--risk-low-border);
}

.status-pill--watch {
  background: var(--risk-mod-bg);
  color: var(--risk-moderate);
  border: 1px solid var(--risk-mod-border);
  animation: pulse-amber 2s ease-in-out infinite;
}

.status-pill--alert {
  background: var(--risk-high-bg);
  color: var(--risk-high);
  border: 1px solid var(--risk-high-border);
  animation: pulse-red 1.5s ease-in-out infinite;
}

.status-pill--loading {
  background: rgba(8, 145, 178, 0.08);
  color: var(--accent);
  border: 1px solid rgba(8, 145, 178, 0.18);
}

.status-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

@keyframes pulse-amber {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.2); }
  50%      { box-shadow: 0 0 0 6px rgba(217, 119, 6, 0); }
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.2); }
  50%      { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

/* ═══════════════════════════════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════════════════════════════ */
.main-layout {
  display: flex;
  margin-top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
}

/* ─── Map Area ────────────────────────────────────────────────── */
.map-container {
  flex: 1;
  position: relative;
  min-width: 0;
  background: var(--bg-map);
}

#map {
  width: 100%;
  height: 100%;
  background: var(--bg-map);
}

/* Leaflet overrides for light theme */
.leaflet-control-zoom a {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-card) !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 16px !important;
  transition: all var(--transition-fast);
}

.leaflet-control-zoom a:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--border-hover) !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow-elevated) !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
}

/* Map Legend */
.map-legend {
  position: absolute;
  bottom: 24px;
  left: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  z-index: 800;
  box-shadow: var(--shadow-elevated);
}

.map-legend__title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.map-legend__items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-legend__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.map-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.map-legend__dot--low      { background: var(--risk-low); }
.map-legend__dot--moderate  { background: var(--risk-moderate); }
.map-legend__dot--high      { background: var(--risk-high); }

/* ─── Analysis Area Banner ──────────────────────────────────────── */
.map-analysis-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 800;
  background: var(--bg-card);
  border: 1px solid rgba(8, 145, 178, 0.25);
  border-radius: var(--radius-full);
  padding: 5px 16px;
  box-shadow: var(--shadow-elevated);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-text);
  pointer-events: none;
}

.map-analysis-banner__icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.map-analysis-banner__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: analysis-pulse 2s ease-in-out infinite;
}

@keyframes analysis-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* Leaflet Popup Overrides */
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-popup) !important;
  border: 1px solid var(--border-card);
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
}

.leaflet-popup-tip {
  background: var(--bg-card) !important;
  box-shadow: none !important;
}

.leaflet-popup-close-button {
  color: var(--text-muted) !important;
  font-size: 18px !important;
  top: 6px !important;
  right: 8px !important;
}

.leaflet-popup-close-button:hover {
  color: var(--text-primary) !important;
}

/* Custom popup content */
.popup-content {
  padding: var(--space-lg);
  min-width: 200px;
}

.popup-content__name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: var(--space-xs);
}

.popup-content__hazard {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.popup-content__hazard-icon {
  width: 16px;
  height: 16px;
}

.popup-content__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.popup-content__link:hover {
  color: var(--accent-text);
}

/* Leaflet Tooltip Overrides */
.leaflet-tooltip {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-elevated) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.8rem !important;
  padding: var(--space-sm) var(--space-md) !important;
}

.leaflet-tooltip::before {
  border-top-color: var(--bg-card) !important;
}

/* ─── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Section common styles */
.sidebar-section {
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
}

.sidebar-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.sidebar-section__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.sidebar-section__badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--risk-high-bg);
  color: var(--risk-high);
  border: 1px solid var(--risk-high-border);
}

/* ─── Alert Cards ─────────────────────────────────────────────── */
.alerts-section {
  flex: 0 0 auto;
  max-height: 40%;
  overflow-y: auto;
  border-bottom: 1px solid var(--border-subtle);
}

.alert-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Loading indicator */
.alert-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.alert-loading__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-card);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.alert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.alert-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}

.alert-card--high::before    { background: var(--risk-high); }
.alert-card--moderate::before { background: var(--risk-moderate); }
.alert-card--low::before     { background: var(--risk-low); }

.alert-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.alert-card.active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.alert-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.alert-card__severity {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.alert-card__severity--high {
  background: var(--risk-high-bg);
  color: var(--risk-high);
}

.alert-card__severity--moderate {
  background: var(--risk-mod-bg);
  color: var(--risk-moderate);
}

.alert-card__location {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.alert-card__hazard {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.alert-card__hazard-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.alert-card__summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: var(--space-sm);
}

.alert-card__time-chips {
  display: flex;
  gap: var(--space-xs);
}

.time-chip {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.time-chip--active {
  background: var(--accent-dim);
  color: var(--accent-text);
  border-color: rgba(8, 145, 178, 0.2);
}

/* Empty state */
.alert-empty {
  background: var(--risk-low-bg);
  border: 1px solid var(--risk-low-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  text-align: center;
}

.alert-empty__icon {
  width: 32px;
  height: 32px;
  color: var(--risk-low);
  margin-bottom: var(--space-sm);
}

.alert-empty__title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--risk-low);
  margin-bottom: var(--space-xs);
}

.alert-empty__text {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ─── Detail Panel ────────────────────────────────────────────── */
.detail-section {
  flex: 1;
  overflow-y: auto;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--space-3xl);
  text-align: center;
}

.detail-placeholder__icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.3;
  margin-bottom: var(--space-lg);
}

.detail-placeholder__text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Detail card when a location is selected */
.detail-card {
  animation: slideInRight 0.3s ease;
}

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

.detail-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.detail-card__type {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.detail-card__risk-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
}

.risk-badge--low {
  background: var(--risk-low-bg);
  color: var(--risk-low);
  border: 1px solid var(--risk-low-border);
}

.risk-badge--moderate {
  background: var(--risk-mod-bg);
  color: var(--risk-moderate);
  border: 1px solid var(--risk-mod-border);
}

.risk-badge--high {
  background: var(--risk-high-bg);
  color: var(--risk-high);
  border: 1px solid var(--risk-high-border);
}

.trend-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.trend-indicator__arrow {
  width: 14px;
  height: 14px;
}

.trend-indicator--rising  { color: var(--risk-high); }
.trend-indicator--stable  { color: var(--text-muted); }
.trend-indicator--falling { color: var(--risk-low); }

/* Risk sparkline bar chart */
.risk-chart {
  margin-bottom: var(--space-xl);
}

.risk-chart__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.risk-chart__bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 48px;
  padding: 2px 0;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
}

.risk-chart__bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  min-height: 3px;
  transition: all var(--transition-fast);
  position: relative;
}

.risk-chart__bar:hover {
  opacity: 0.8;
  transform: scaleY(1.05);
  transform-origin: bottom;
}

.risk-chart__bar--low      { background: var(--risk-low); }
.risk-chart__bar--moderate { background: var(--risk-moderate); }
.risk-chart__bar--high     { background: var(--risk-high); }

.risk-chart__time-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xs);
}

.risk-chart__time-label {
  font-size: 0.6rem;
  color: var(--text-muted);
}

/* Action checklist */
.action-list {
  list-style: none;
}

.action-list__title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.action-list__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.action-list__item:last-child {
  border-bottom: none;
}

.action-list__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--accent);
}

/* ─── Timeline Bar ────────────────────────────────────────────── */
.timeline-section {
  flex: 0 0 auto;
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
}

.timeline {
  display: flex;
  gap: var(--space-sm);
}

.timeline__segment {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-xs);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  color: inherit;
}

.timeline__segment:hover {
  background: var(--bg-elevated);
  border-color: var(--border-card);
}

.timeline__segment.active {
  background: var(--accent-dim);
  border-color: rgba(8, 145, 178, 0.2);
}

.timeline__icon-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.timeline__dot--low      { background: var(--risk-low); }
.timeline__dot--moderate { background: var(--risk-moderate); }
.timeline__dot--high     { background: var(--risk-high); }

.timeline__hazard-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.timeline__label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
}

.timeline__time {
  font-size: 0.58rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════════
   SKELETON / SHIMMER LOADERS
   ═══════════════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(
    90deg,
    #e5e7eb 25%,
    #f3f4f6 50%,
    #e5e7eb 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 100px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
}

.skeleton-bar {
  height: 12px;
  margin-bottom: var(--space-sm);
}

.skeleton-bar--short { width: 60%; }
.skeleton-bar--long  { width: 90%; }

/* ═══════════════════════════════════════════════════════════════════
   RISK BADGE CHIP (shared)
   ═══════════════════════════════════════════════════════════════════ */
.risk-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
}

.risk-chip--low {
  background: var(--risk-low-bg);
  color: var(--risk-low);
}

.risk-chip--moderate {
  background: var(--risk-mod-bg);
  color: var(--risk-moderate);
}

.risk-chip--high {
  background: var(--risk-high-bg);
  color: var(--risk-high);
}

/* ═══════════════════════════════════════════════════════════════════
   MAP MARKER PULSE
   ═══════════════════════════════════════════════════════════════════ */
@keyframes marker-pulse {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

.marker-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: marker-pulse 2s ease-out infinite;
}

/* ═══════════════════════════════════════════════════════════════════
   ALERT DETAIL MODAL
   ═══════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.18), 0 6px 24px rgba(0,0,0,0.1);
  width: 720px;
  max-width: 94vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--space-2xl) var(--space-2xl) var(--space-xl);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.modal__header-info {
  flex: 1;
}

.modal__severity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.modal__severity--high {
  background: var(--risk-high-bg);
  color: var(--risk-high);
  border: 1px solid var(--risk-high-border);
}

.modal__severity--moderate {
  background: var(--risk-mod-bg);
  color: var(--risk-moderate);
  border: 1px solid var(--risk-mod-border);
}

.modal__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.modal__subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.modal__close {
  background: none;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  margin-left: var(--space-lg);
}

.modal__close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.modal__body {
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* ─── Expand / Collapse Button ──────────────────────────────────── */
.modal__expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 12px 20px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--accent-text);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal__expand-btn:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.modal__expand-icon {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.modal__expand-btn.open .modal__expand-icon {
  transform: rotate(180deg);
}

/* ─── Collapsible Details Section ───────────────────────────────── */
.modal__details-expanded {
  display: none;
  flex-direction: column;
  gap: var(--space-xl);
  animation: modalExpandIn 0.35s ease;
}

.modal__details-expanded.open {
  display: flex;
}

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

/* Model Consensus Bar */
.model-consensus {
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
}

.model-consensus__title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.model-consensus__badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--risk-low-bg);
  color: var(--risk-low);
  border: 1px solid var(--risk-low-border);
}

.model-consensus__badge--agree {
  background: var(--risk-low-bg);
  color: var(--risk-low);
  border-color: var(--risk-low-border);
}

.model-consensus__badge--partial {
  background: var(--risk-mod-bg);
  color: var(--risk-moderate);
  border-color: var(--risk-mod-border);
}

.model-consensus__models {
  display: flex;
  gap: var(--space-md);
}

.model-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
  text-align: center;
}

.model-card__name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.model-card__verdict {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.model-card__verdict--high { color: var(--risk-high); }
.model-card__verdict--moderate { color: var(--risk-moderate); }
.model-card__verdict--low { color: var(--risk-low); }

.model-card__conf {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Modal Section */
.modal-section {
  /* Reusable section within the modal body */
}

.modal-section__title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.modal-section__title-icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.modal-section__text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Outcomes Grid */
.outcomes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.outcome-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
}

.outcome-card__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.outcome-card__value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Source Links */
.source-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.source-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--accent-text);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.source-item:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.source-item__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--accent);
}

.source-item__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
}

/* Modal Actions List */
.modal-actions {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-actions__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-actions__item:last-child {
  border-bottom: none;
}

.modal-actions__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  :root {
    --sidebar-width: 420px;
  }
}

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 360px;
  }
  
  .topbar__subtitle {
    display: none;
  }

  .time-toggle__btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
  }

  .modal {
    width: 620px;
  }

  .outcomes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-layout {
    flex-direction: column;
  }

  .map-container {
    height: 40vh;
  }

  .sidebar {
    width: 100%;
    height: 60vh;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }

  .topbar__controls {
    gap: var(--space-sm);
  }
  
  .city-selector__button span {
    display: none;
  }

  .modal {
    width: 95vw;
    max-height: 90vh;
  }

  .sim-panel {
    bottom: 108px;
  }

  .sim-panel__dropdown {
    width: min(360px, calc(100vw - 32px));
  }

  .reports-modal-overlay {
    padding: 16px;
  }

  .reports-modal {
    max-height: 88vh;
  }
}

/* ─── Data Source Badge ──────────────────────────────────────── */
.data-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.data-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.data-badge--live {
  background: rgba(22, 163, 74, 0.08);
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.2);
}
.data-badge--live .data-badge__dot {
  background: #16a34a;
  animation: pulse-dot 2s ease-in-out infinite;
}

.data-badge--loading {
  background: rgba(8, 145, 178, 0.08);
  color: #0891b2;
  border: 1px solid rgba(8, 145, 178, 0.2);
}
.data-badge--loading .data-badge__dot {
  background: #0891b2;
  animation: pulse-dot 1s ease-in-out infinite;
}

.data-badge--mock {
  background: rgba(156, 163, 175, 0.08);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.2);
}
.data-badge--mock .data-badge__dot {
  background: #9ca3af;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ─── AI Badge in Modal ──────────────────────────────────────── */
.modal__ai-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 6px;
}

.modal__ai-badge--loading {
  background: rgba(8, 145, 178, 0.1);
  color: #0891b2;
  border: 1px solid rgba(8, 145, 178, 0.2);
  animation: pulse-badge 1.5s ease-in-out infinite;
}

.modal__ai-badge--live {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.modal__ai-badge--fallback {
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ─── Simulation Panel ──────────────────────────────────────── */
.sim-panel {
  position: absolute;
  bottom: 132px;
  left: 16px;
  z-index: 1000;
}

.sim-panel__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.sim-panel__toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.sim-panel__toggle--active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.sim-panel__toggle--active:hover {
  color: white;
  background: #0e7490;
}

.sim-panel__dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 380px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  overflow: hidden;
}

.sim-panel__dropdown.open {
  display: block;
  animation: sim-slide-up 0.2s ease;
}

@keyframes sim-slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.sim-panel__header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sim-panel__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.sim-panel__subtitle {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.sim-panel__scenarios {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 4px;
}

.sim-scenario {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s ease;
}

.sim-scenario:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
}

.sim-scenario__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 145, 178, 0.08);
  border-radius: 10px;
  color: var(--accent);
}

.sim-scenario__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sim-scenario__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.sim-scenario__desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.sim-panel__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
}

.sim-panel__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(8, 145, 178, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.sim-panel__reset {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 16px);
  margin: 8px;
  padding: 10px 16px;
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.15);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sim-panel__reset:hover {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.3);
}

/* Custom simulation form */
.sim-scenario--custom {
  border-top: 1px solid var(--border-subtle);
  margin-top: 4px;
  padding-top: 12px;
}

.sim-panel__custom {
  padding: 12px;
}

.sim-custom__back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 12px;
  padding: 4px 0;
}

.sim-custom__back:hover {
  color: var(--accent);
}

.sim-custom__fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.sim-custom__row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sim-custom__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.sim-custom__input {
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-primary);
  width: 100%;
}

.sim-custom__input:focus {
  outline: none;
  border-color: var(--accent);
}

.sim-custom__textarea {
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text-primary);
  width: 100%;
  min-height: 60px;
  resize: vertical;
}

.sim-custom__textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.sim-custom__run {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: background 0.15s;
}

.sim-custom__run:hover {
  background: #0e7490;
}

/* Simulation data badge */
.data-badge--sim {
  background: rgba(168, 85, 247, 0.08);
  color: #7c3aed;
  border: 1px solid rgba(168, 85, 247, 0.2);
}
.data-badge--sim .data-badge__dot {
  background: #7c3aed;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

/* ─── Community Reports Badge (on map) ──────────────────────── */
.reports-badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
}

.reports-badge__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
  text-decoration: none;
}

.reports-badge__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.reports-badge__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

/* ─── Community Reports Sidebar ─────────────────────────────── */
.reports-sidebar-section {
  border-top: 1px solid var(--border-subtle);
}

.reports-sidebar-section__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reports-view-all-btn {
  border: 1px solid rgba(8,145,178,0.18);
  background: rgba(8,145,178,0.06);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reports-view-all-btn:hover {
  background: rgba(8,145,178,0.12);
  border-color: rgba(8,145,178,0.28);
}

.reports-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
}

.reports-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px 12px;
  max-height: 300px;
  overflow-y: auto;
}

.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--text-muted);
  transition: all 0.15s ease;
}

.report-card--high { border-left-color: var(--risk-high); }
.report-card--moderate { border-left-color: var(--risk-moderate); }
.report-card--low { border-left-color: var(--risk-low); }

.report-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.report-card__type {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.report-card__time {
  font-size: 10px;
  color: var(--text-muted);
}

.report-card__desc {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 4px;
}

.report-card__location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.report-card__photo {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 6px;
  margin-top: 6px;
}

.reports-submit-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(8,145,178,0.2);
  border-radius: 6px;
  transition: all 0.15s;
}

.reports-submit-link:hover {
  background: rgba(8,145,178,0.06);
  border-color: var(--accent);
}

.reports-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.44);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2500;
}

.reports-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.reports-modal {
  width: min(720px, 100%);
  max-height: min(80vh, 760px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.reports-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.reports-modal__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.reports-modal__subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.reports-modal__close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reports-modal__close:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.reports-modal__body {
  overflow-y: auto;
  padding: 18px 20px 22px;
}

.reports-modal__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reports-empty--modal {
  min-height: 220px;
  justify-content: center;
}
