.map-shell {
  min-height: 420px;
}

.map-panel {
  padding: 18px;
}

.map-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.shipping-watch-map {
  width: 100%;
  min-height: 620px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
}

.muted {
  opacity: 0.78;
}

.map-toolbar-v2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 16px;
  align-items: center;
}

.map-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.map-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.legend-energy { background: #d97706; }
.legend-fertiliser { background: #2563eb; }
.legend-au-energy { background: #dc2626; }
.legend-other { background: #6b7280; }

.map-legend-counts {
  margin-bottom: 12px;
  font-size: 14px;
}

.legend-risk-moderate { background: #f59e0b; }
.legend-risk-watch { background: #fbbf24; }

.popup-card {
  min-width: 240px;
}

.popup-section {
  margin-top: 10px;
}

.popup-section-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.popup-list {
  margin: 6px 0 0 16px;
  padding: 0;
}

.map-legend-counts {
  margin-bottom: 12px;
  font-size: 14px;
}

.map-action-btn {
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.map-action-btn:hover {
  background: rgba(255,255,255,0.14);
}

.top-risk-panel {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
}

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

.top-risk-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.risk-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
}

.risk-card-rank {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: rgba(255,255,255,0.12);
}

.risk-card-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.risk-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  opacity: 0.88;
  margin-bottom: 8px;
}

.risk-card-list {
  margin: 0 0 0 16px;
  padding: 0;
  font-size: 13px;
}

.risk-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
}

.risk-moderate {
  box-shadow: inset 0 0 0 1px rgba(245,158,11,0.45);
}

.risk-watch {
  box-shadow: inset 0 0 0 1px rgba(251,191,36,0.45);
}

.risk-clear {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.top-risk-empty {
  padding: 8px 0;
}

.legend-risk-moderate { background: #f59e0b; }
.legend-risk-watch { background: #fbbf24; }

.popup-card {
  min-width: 240px;
}

.popup-section {
  margin-top: 10px;
}

.popup-section-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.popup-list {
  margin: 6px 0 0 16px;
  padding: 0;
}

@media (max-width: 1100px) {
  .top-risk-list {
    grid-template-columns: 1fr;
  }

  .map-toolbar-v2 {
    grid-template-columns: 1fr;
  }
}
