/* ===================================================================
   GeoGuard AI — Dhanbad Mining Slope Early Warning System
   Theme: High-Tech Industrial Dark Obsidian & Hazard Glassmorphism
   =================================================================== */

:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #0f1422;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-card-hover: rgba(30, 41, 59, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.16);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --red-crit: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.35);
  --amber-warn: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.35);
  --green-safe: #10b981;
  --green-glow: rgba(16, 185, 129, 0.35);
  --cyan-radar: #06b6d4;
  --blue-accent: #3b82f6;
  --purple-insar: #8b5cf6;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.dark-theme {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===================================================================
   TOP NAVBAR
   =================================================================== */
#top-navbar {
  height: 56px;
  background: #0d121f;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  flex-shrink: 0;
}

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

.brand-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-emblem {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1e3a8a, #0284c7);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.4);
}

.brand-text .brand-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.brand-text .highlight {
  color: #38bdf8;
}

.brand-text .brand-subtitle {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  font-weight: 600;
}

.top-kpis {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.kpi-pill:hover {
  background: rgba(51, 65, 85, 0.9);
  transform: translateY(-1px);
}

.kpi-high {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.kpi-moderate {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
}

.kpi-safe {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.15);
  color: #a7f3d0;
}

.kpi-hospital {
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--text-muted);
}

.kpi-val {
  font-family: var(--font-mono);
  font-weight: 700;
}

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

.red-pulse {
  background: var(--red-crit);
  box-shadow: 0 0 8px var(--red-crit);
  animation: pulse-red 1.5s infinite;
}

.amber-pulse {
  background: var(--amber-warn);
  box-shadow: 0 0 8px var(--amber-warn);
  animation: pulse-amber 2s infinite;
}

.green-pulse {
  background: var(--green-safe);
}

@keyframes pulse-red {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

@keyframes pulse-amber {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Nav Right Action Buttons */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-dem {
  background: #4338ca;
  color: #e0e7ff;
}
.btn-dem:hover { background: #4f46e5; }

.btn-amb {
  background: #0f766e;
  color: #ccfbf1;
}
.btn-amb:hover { background: #14b8a6; }

.btn-cas {
  background: #831843;
  color: #fce7f3;
}
.btn-cas:hover { background: #9d174d; }

.btn-fir {
  background: #78350f;
  color: #fef3c7;
}
.btn-fir:hover { background: #92400e; }

.btn-radar {
  background: #0e7490;
  color: #cffafe;
}
.btn-radar:hover { background: #0891b2; }

.btn-push-warning {
  background: #b91c1c;
  color: #fee2e2;
  box-shadow: 0 0 10px rgba(185, 28, 28, 0.4);
}
.btn-push-warning:hover { background: #dc2626; }

.btn-sos {
  background: #7f1d1d;
  color: #fecaca;
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}
.btn-sos:hover { background: #ef4444; }

/* ===================================================================
   SECONDARY OPERATIONAL SUB-NAVBAR
   =================================================================== */
#sub-navbar {
  height: 42px;
  background: #111726;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  font-size: 12px;
}

.search-filter-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  position: relative;
  width: 320px;
}

.search-box i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 12px;
}

.search-box input {
  width: 100%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 5px 12px 5px 30px;
  color: #fff;
  font-size: 11px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: #38bdf8;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fpill {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 3px 9px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.fpill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.fpill.active {
  background: #2563eb;
  color: #fff;
  border-color: #3b82f6;
}

.fpill-high.active {
  background: var(--red-crit);
  border-color: #f87171;
}

.fpill-mod.active {
  background: var(--amber-warn);
  border-color: #fbbf24;
}

.fpill-safe.active {
  background: var(--green-safe);
  border-color: #34d399;
}

.live-ticker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: var(--text-muted);
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.live-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.6; }
}

.btn-audio-toggle {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-audio-toggle:hover {
  color: #fff;
  border-color: #38bdf8;
}

/* ===================================================================
   MAIN APP CONTAINER & PANELS
   =================================================================== */
#app-container {
  display: flex;
  flex: 1;
  height: calc(100vh - 98px);
  overflow: hidden;
}

/* LEFT PANEL: SECTORS */
#left-panel {
  width: 280px;
  background: #0c101c;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.panel-section-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ps-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

#sectors-scroll-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Sector Card Item */
.sector-nav-card {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.sector-nav-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--border-highlight);
  transform: translateX(2px);
}

.sector-nav-card.active {
  background: rgba(30, 41, 59, 0.95);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.sector-nav-card.risk-high {
  border-left: 4px solid var(--red-crit);
}

.sector-nav-card.risk-moderate {
  border-left: 4px solid var(--amber-warn);
}

.sector-nav-card.risk-safe {
  border-left: 4px solid var(--green-safe);
}

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

.snc-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.snc-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.snc-badge.high { background: rgba(239, 68, 68, 0.25); color: #f87171; }
.snc-badge.moderate { background: rgba(245, 158, 11, 0.25); color: #fbbf24; }
.snc-badge.safe { background: rgba(16, 185, 129, 0.25); color: #34d399; }

.snc-meta {
  font-size: 10px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.snc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
}

.snc-stat-col span {
  display: block;
  font-size: 9px;
  color: var(--text-dim);
}

.snc-stat-col strong {
  font-size: 11px;
}

/* Sidebar Threshold Quick Box */
.sidebar-threshold-box {
  background: #090d17;
  border-top: 1px solid var(--border-color);
  padding: 10px 14px;
  font-size: 11px;
}

.st-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text-muted);
}

.st-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.st-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
}

.st-row strong {
  font-family: var(--font-mono);
}

/* ===================================================================
   CENTER WORKSPACE
   =================================================================== */
#center-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow: hidden;
  position: relative;
}

/* Tabs Bar */
#view-tabs {
  height: 38px;
  background: #0d1220;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  overflow-x: auto;
  flex-shrink: 0;
}

.vtab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.vtab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.vtab.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

/* View Content Containers */
.view-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.view-content.active {
  display: flex;
  flex-direction: column;
}

.view-sub-header {
  padding: 12px 18px;
  background: #0f1628;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.vsh-info h3 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.vsh-info p {
  font-size: 11px;
  color: var(--text-dim);
}

/* ===================================================================
   GIS MAP & FLOATING MICRO-SECTOR CARD
   =================================================================== */
#view-map {
  overflow: hidden;
}

#map-canvas {
  width: 100%;
  height: 100%;
  background: #0b0f19;
  z-index: 10;
}

/* Basemap Layer Selector */
.map-layer-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 400;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.map-layer-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.map-layer-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.map-layer-btn.active {
  background: #2563eb;
  color: #fff;
}

/* Dhanbad Hazard Legend */
#dhanbad-hazard-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 400;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 11px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  max-width: 260px;
}

.legend-header {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #e2e8f0;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--text-muted);
}

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

.legend-marker.red { background: var(--red-crit); box-shadow: 0 0 6px var(--red-crit); }
.legend-marker.amber { background: var(--amber-warn); box-shadow: 0 0 6px var(--amber-warn); }
.legend-marker.green { background: var(--green-safe); box-shadow: 0 0 6px var(--green-safe); }

/* FLOATING MICRO-SECTOR CARD (Matching Reference Image) */
.glass-overlay-card {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 440px;
  max-height: calc(100% - 28px);
  background: rgba(13, 18, 30, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: all 0.3s;
}

.msc-header {
  padding: 12px 14px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.micro-tag {
  font-size: 9px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.msc-title-group h4 {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3px;
}

.msc-meta {
  font-size: 10px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.msc-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}
.msc-close:hover { color: #fff; }

.msc-status-bar {
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(239, 68, 68, 0.12);
  border-bottom: 1px solid rgba(239, 68, 68, 0.25);
}

.msc-status-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.msc-status-badge.high {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.msc-status-badge.moderate {
  background: #d97706;
  color: #fff;
}

.msc-status-badge.safe {
  background: #059669;
  color: #fff;
}

.msc-update-time {
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Micro Map Inset */
.msc-map-inset-wrapper {
  position: relative;
  width: 100%;
  height: 190px;
  background: #000;
  border-bottom: 1px solid var(--border-color);
}

#micro-map-canvas {
  width: 100%;
  height: 100%;
}

.msc-coords-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: #94a3b8;
  z-index: 400;
}

.micro-sensors-legend {
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid var(--border-color);
  font-size: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-dim);
}

.micro-sensors-legend span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Micro Telemetry Grid */
.micro-telemetry-box {
  padding: 10px 14px;
}

.mt-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.mt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mt-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.mt-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.mt-value {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  margin-bottom: 4px;
}

.mt-value small {
  font-size: 10px;
  color: var(--text-muted);
}

.progress-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.pbar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s;
}

.pbar-red { background: var(--red-crit); box-shadow: 0 0 6px var(--red-crit); }
.pbar-amber { background: var(--amber-warn); }
.pbar-green { background: var(--green-safe); }

.mt-sub {
  font-size: 9px;
  color: var(--text-dim);
}

.msc-actions-bar {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msc-btn-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ===================================================================
   3D DEM VIEWPORT
   =================================================================== */
#dem-viewport-container {
  flex: 1;
  position: relative;
  background: #030712;
  overflow: hidden;
}

#dem-three-canvas {
  width: 100%;
  height: 100%;
}

.dem-hud-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
  pointer-events: none;
}

.dem-hud-card {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 11px;
  width: 240px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.hud-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #38bdf8;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hud-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
  color: var(--text-muted);
}

.hud-text {
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 3px;
}

/* ===================================================================
   INSAR & COPERNICUS DASHBOARD
   =================================================================== */
.insar-dashboard-grid {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

.insar-main-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

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

.imc-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 7px;
}

.imc-header select {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  outline: none;
}

.chart-box {
  width: 100%;
  height: 280px;
  position: relative;
}

.chart-box-sm {
  width: 100%;
  height: 220px;
  position: relative;
}

.insar-side-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.sb-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #38bdf8;
  text-transform: uppercase;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.sb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 5px;
  color: var(--text-muted);
}

/* ===================================================================
   MINING ENGINEER HUB
   =================================================================== */
.engineer-grid {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.eng-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.eng-card-header {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.eng-card-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.calc-row input {
  width: 90px;
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 4px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  text-align: right;
  outline: none;
}

.calc-result-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  margin-top: 6px;
}

.cr-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.cr-value {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-mono);
  margin: 2px 0;
}

.cr-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

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

.sensor-row {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sensor-row strong {
  font-size: 11px;
  display: block;
}

.sensor-row small {
  font-size: 9px;
  color: var(--text-dim);
}

.metric-val {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: block;
}

/* Tables */
.table-container-card {
  margin: 0 18px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.tcc-header {
  padding: 10px 14px;
  background: #0f1628;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-responsive {
  overflow-x: auto;
}

.mining-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.mining-table th {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-dim);
  font-weight: 700;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.mining-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  white-space: nowrap;
}

.mining-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ===================================================================
   PRONE AREAS PHOTOS
   =================================================================== */
.photos-masonry-grid {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.photo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.photo-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.photo-img-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  background: #000;
  overflow: hidden;
}

.photo-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.photo-card:hover .photo-img-wrap img {
  transform: scale(1.04);
}

.photo-badge-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
}

.photo-mode-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  z-index: 10;
}

/* AI Detection Bounding Box Overlay Simulation */
.ai-detection-overlay {
  position: absolute;
  top: 25%;
  left: 30%;
  width: 45%;
  height: 40%;
  border: 2px dashed #ef4444;
  border-radius: 4px;
  pointer-events: none;
  background: rgba(239, 68, 68, 0.15);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.ai-tag {
  position: absolute;
  top: -18px;
  left: 0;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 2px;
  letter-spacing: 0.4px;
}

.photo-body {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.photo-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.photo-location {
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.photo-notes {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1;
}

.photo-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 9px;
  color: var(--text-dim);
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
}

/* ===================================================================
   IMD WEATHER & NOWCAST VIEW
   =================================================================== */
.imd-cards-grid {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.imd-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.ic-header {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.ic-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ic-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.ic-row strong {
  font-family: var(--font-mono);
}

.warning-day-item {
  background: rgba(15, 23, 42, 0.7);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 6px;
  border-left: 4px solid #fff;
}

.warning-day-item.orange {
  border-left-color: #f97316;
  background: rgba(249, 115, 22, 0.1);
}

.warning-day-item.yellow {
  border-left-color: #eab308;
  background: rgba(234, 179, 8, 0.1);
}

.warning-day-item strong {
  font-size: 11px;
  display: block;
  margin-bottom: 2px;
}

.warning-day-item p {
  font-size: 10px;
  color: var(--text-muted);
}

.nowcast-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.nc-alert-header {
  font-size: 12px;
  font-weight: 800;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.nowcast-box p {
  font-size: 11px;
  color: #fecaca;
  line-height: 1.4;
  margin-bottom: 8px;
}

.nc-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
  border-top: 1px solid rgba(239, 68, 68, 0.2);
  padding-top: 6px;
  margin-bottom: 8px;
}

.nc-advisory {
  font-size: 10px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.15);
  padding: 6px 8px;
  border-radius: 4px;
}

/* ===================================================================
   EMERGENCY OPS & CASUALTIES VIEW
   =================================================================== */
.emergency-dashboard-grid {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.emer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.ec-header {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.ambulance-list, .casualty-list, .fir-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
}

.amb-card-item, .cas-card-item, .fir-card-item {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.aci-head, .cci-head, .fci-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

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

.hl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.hl-item i {
  font-size: 18px;
  margin-right: 10px;
}

.hl-item div {
  flex: 1;
}

.hl-item strong {
  display: block;
  font-size: 11px;
}

.hl-item span {
  font-size: 10px;
  color: var(--text-dim);
}

.btn-call {
  background: #1e3a8a;
  color: #bfdbfe;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.btn-call:hover { background: #2563eb; color: #fff; }

/* ===================================================================
   CHARTS ANALYTICS VIEW
   =================================================================== */
.charts-dashboard-grid {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 14px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.cc-header {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cc-body {
  width: 100%;
  height: 220px;
  position: relative;
}

.threshold-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.threshold-tag.red { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.threshold-tag.amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

/* ===================================================================
   RIGHT PANEL: SECTOR OPERATIONS
   =================================================================== */
#right-panel {
  width: 320px;
  background: #0c101c;
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 14px;
  gap: 12px;
}

.selected-sector-banner h3 {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.selected-sector-banner p {
  font-size: 10px;
  color: var(--text-dim);
}

.gauge-ring-container {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.gauge-box {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid var(--red-crit);
  box-shadow: 0 0 20px var(--red-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.08);
}

.gauge-val {
  font-size: 32px;
  font-weight: 900;
  font-family: var(--font-mono);
  line-height: 1;
}

.gauge-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-top: 4px;
}

.gauge-box small {
  font-size: 8px;
  font-weight: 700;
}

.rp-metrics-list {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rp-metric-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.rp-metric-row strong {
  font-family: var(--font-mono);
  color: #fff;
}

.rp-actions-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.management-alerts-box {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.mab-header {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.badge-count {
  background: #dc2626;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
}

.mab-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mab-item {
  font-size: 10px;
  border-left: 2px solid #ef4444;
  padding-left: 8px;
}

.mab-time {
  color: var(--text-dim);
  font-size: 9px;
}

.mab-text {
  color: var(--text-muted);
}

/* ===================================================================
   MODALS
   =================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: #0f172a;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: modal-pop 0.25s ease-out;
}

@keyframes modal-pop {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-head {
  padding: 14px 18px;
  background: #1e293b;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-head h3 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
}
.modal-close:hover { color: #fff; }

.modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  margin-top: 6px;
}

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

.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 7px 10px;
  font-size: 12px;
  font-family: var(--font-sans);
  outline: none;
}

.form-control:focus {
  border-color: #38bdf8;
}

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

.col-half {
  flex: 1;
}

.th-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.speaker-preview-box {
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 11px;
  color: #bae6fd;
}

/* ===================================================================
   BUTTONS & COMMON COMPONENTS
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 11px;
}

.btn-danger-solid {
  background: #dc2626;
  color: #fff;
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.4);
}
.btn-danger-solid:hover { background: #b91c1c; }

.btn-warning-solid {
  background: #d97706;
  color: #fff;
  border-color: #f59e0b;
}
.btn-warning-solid:hover { background: #b45309; }

.btn-primary-solid {
  background: #2563eb;
  color: #fff;
  border-color: #3b82f6;
}
.btn-primary-solid:hover { background: #1d4ed8; }

.btn-outline {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--border-color);
  color: var(--text-muted);
}
.btn-outline:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #fff;
}

.btn-text-link {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.btn-text-link:hover { text-decoration: underline; }

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
}
.btn-icon:hover { color: #fff; }

/* Badges */
.badge-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-tag.red { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-tag.amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-tag.green { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-tag.blue { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }

/* Text Utilities */
.text-red { color: var(--red-crit) !important; }
.text-amber { color: var(--amber-warn) !important; }
.text-emerald { color: var(--green-safe) !important; }
.text-cyan { color: var(--cyan-radar) !important; }
.text-blue { color: var(--blue-accent) !important; }
.text-purple { color: var(--purple-insar) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-right { text-align: right !important; }

/* Custom Scrollbar */
.custom-scroll::-webkit-scrollbar,
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

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

/* Toast Container */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  min-width: 280px;
  animation: toast-in 0.3s ease-out;
}

.toast.toast-danger {
  border-left: 4px solid var(--red-crit);
}

.toast.toast-warning {
  border-left: 4px solid var(--amber-warn);
}

.toast.toast-success {
  border-left: 4px solid var(--green-safe);
}

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}


/* ===================================================================
   LEAFLET CUSTOM MAP MARKERS & SENSORS
   =================================================================== */
.custom-map-marker {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.cmm-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.custom-map-marker:hover .cmm-circle {
  transform: scale(1.2);
}

.cmm-label {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.cmm-label strong {
  display: block;
  font-size: 10px;
}

.cmm-label span {
  font-size: 9px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.pulse-ring-red::before {
  content: '';
  position: absolute;
  left: -6px;
  top: -6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.4);
  animation: marker-pulse-red 1.8s infinite;
  z-index: -1;
}

.pulse-ring-amber::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.35);
  animation: marker-pulse-amber 2s infinite;
  z-index: -1;
}

@keyframes marker-pulse-red {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes marker-pulse-amber {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.micro-sensor-icon {
  width: 22px;
  height: 22px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.custom-leaflet-tooltip {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
}

.custom-leaflet-tooltip::before {
  border-top-color: rgba(15, 23, 42, 0.95) !important;
}
