#map-title {
  margin: 0 0 8px 2px;
  font-family: sans-serif;
  font-weight: 600;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #fafafa;
  color: #111827;
}

.controls {
  margin: 8px 0;
  font-family: sans-serif;
}

#map-container {
  position: relative;
  width: 100%;
  height: 600px;
  border: 2px solid #333; /* map border */
  border-radius: 6px;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
}

/* Legend sits INSIDE the map */
#legend {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 12px;
  border-radius: 6px;
  font-family: sans-serif;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.legend-title {
  font-weight: bold;
  margin-bottom: 6px;
  text-align: center;
}

.legend-bar {
  width: 180px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(to right, rgb(0, 0, 255), rgb(255, 0, 0));
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.control-spacer{display:inline-block;width:16px;}

/* --- Top Navigation --- */
.top-nav {
  display: flex;
  gap: 20px;
  padding: 12px 20px;
  background: #374151; 
  margin-bottom: 20px;
}

.nav-link {
  color: #e5e7eb;
  text-decoration: none;
  font-weight: 500;
}

.nav-link.active {
  color: #ffffff;
  border-bottom: 2px solid #ffffff;
}

/* --- Dashboard Layout --- */
.dashboard-page {
  padding: 20px;
}

.dashboard-header {
  margin-bottom: 20px;
}

.dashboard-cards {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.dashboard-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  padding: 20px;
  border-radius: 12px;
  min-width: 150px;
  text-align: center;
}

.dashboard-card h2 {
  margin-bottom: 10px;
  font-size: 16px;
}

.dashboard-card div {
  font-size: 24px;
  font-weight: bold;
}

/* --- Map Section --- */
.dashboard-map-section {
  margin-top: 20px;
}

#liveMap {
  width: 100%;
  height: 400px;
  border: 2px solid #ccc;
  border-radius: 12px;
}

/* --- Status Message --- */
#statusMessage {
  margin-top: 5px;
  color: #dc2626; /* red for warning */
  font-weight: 500;
}