.map-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #8b949e;
  text-transform: uppercase;
}

.control-group.well-count {
  font-size: 0.9rem;
  color: #e6edf3;
}

.loading-text {
  color: #a78bfa;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.crumb {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: #e6edf3;
}

.region-select {
  min-width: 220px;
  max-width: 360px;
  padding: 0.35rem 0.5rem;
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #0d1117;
  color: #e6edf3;
  font-size: 0.85rem;
}

.crumb:hover {
  background: #21262d;
  border-color: #805ad5;
  color: #c4b5fd;
}

.crumb.active {
  background: #2e1065;
  border-color: #805ad5;
  color: #e9d5ff;
  font-weight: 600;
  cursor: default;
}

.crumb-sep {
  color: #484f58;
  font-size: 0.9rem;
}

.map-container {
  position: relative;
  height: calc(100vh - 220px);
  min-height: 500px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #30363d;
}

#wells-map {
  width: 100%;
  height: 100%;
  background: #e2e8f0;
}

.leaflet-well-dots-canvas {
  position: absolute;
  z-index: 450;
  cursor: crosshair;
}

.map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #161b22;
  color: #e6edf3;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #30363d;
  border-top-color: #805ad5;
  border-radius: 50%;
  animation: well-map-spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

.map-legend {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  font-size: 0.85rem;
}

.legend-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.legend-section strong {
  color: #e6edf3;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #8b949e;
}

.legend-gradient {
  display: flex;
  align-items: center;
  gap: 2px;
}

.grad-box {
  width: 20px;
  height: 14px;
  border: 1px solid #30363d;
}

.grad-label {
  font-size: 0.75rem;
  color: #8b949e;
  margin-left: 4px;
}

.legend-divider {
  color: #484f58;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.oil { background: #d97706; }
.dot.gas { background: #2563eb; }
.dot.injection { background: #16a34a; }
.dot.other { background: #9ca3af; }

.dot-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: #2563eb;
}

.dot-status.bright { opacity: 0.9; }
.dot-status.dim { opacity: 0.5; }
.dot-status.faded { opacity: 0.3; }

.well-count-label {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  text-align: center;
  white-space: nowrap;
}

.well-popup {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 320px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #30363d;
}

.popup-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #e6edf3;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #8b949e;
}

.popup-body {
  padding: 1rem;
}

.popup-field {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #e6edf3;
}

.popup-field strong {
  color: #8b949e;
}