/* ────────────────────────────────────────────────
   Atomic blue glow container
   ──────────────────────────────────────────────── */
.atomic-shell {
  background: rgba(8, 12, 20, 0.72);
  border: 1px solid rgba(0, 180, 255, 0.22);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(0, 180, 255, 0.18) inset,
    0 0 24px rgba(0, 180, 255, 0.12),
    0 0 64px rgba(0, 180, 255, 0.06);
  padding: 24px;
}

/* ────────────────────────────────────────────────
   Map shell + area
   ──────────────────────────────────────────────── */
.map-shell {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 180, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(0, 180, 255, 0.18) inset,
    0 0 28px rgba(0, 180, 255, 0.1),
    0 0 72px rgba(0, 180, 255, 0.06);
}

/* Visible map region */
.map-area {
  position: relative;
  width: 100%;
  height: min(85vh, 1000px);
  background-color: #243E45;   /* <-- your custom color */
  background: radial-gradient(
      1200px 600px at 50% 50%,
      rgba(0, 180, 255, 0.07),
      transparent 60%
    ),
    rgba(5, 9, 16, 0.85);
  overflow: hidden;
}

/* Let Leaflet fill map area safely */
.map-area .leaflet-container {
  width: 100%;
  height: 100%;
}

/* Leaflet map container inherits this background */
.leaflet-container {
  background-color: #243E45 !important;
  background: rgba(5, 9, 16, 0.85);
}



/* ────────────────────────────────────────────────
   Admin legend card
   ──────────────────────────────────────────────── */
.legend-card {
  z-index: 500;
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 180px;
  max-height: 60vh;
  overflow-y: auto;
  border-radius: 10px;
  background: rgba(5, 9, 16, 0.25); /* 👈 was 0.88 */
  border: 1px solid rgba(0, 180, 255, 0.18); /* softer */
  box-shadow:
    0 0 8px rgba(0, 180, 255, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.35);
  padding: 10px 12px;
  font-size: 12px;
  color: #dbe9ff;
  backdrop-filter: blur(6px); /* 👈 adds glass effect */
  -webkit-backdrop-filter: blur(6px);
}


.legend-title {
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  color: #e6f6ff;
}
.legend-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(0, 180, 255, 0.12);
}
.legend-row:last-child {
  border-bottom: 0;
}
.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
.legend-count {
  color: #9cc8ff;
  font-variant-numeric: tabular-nums;
}

/* ────────────────────────────────────────────────
   Sidebar links
   ──────────────────────────────────────────────── */
.nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #b7dfff;
  border: 1px solid transparent;
  background: linear-gradient(
    180deg,
    rgba(0, 180, 255, 0.06),
    rgba(0, 0, 0, 0)
  );
  transition: all 0.15s ease;
}
.nav-link:hover {
  color: #ffffff;
  background: linear-gradient(
    180deg,
    rgba(0, 180, 255, 0.12),
    rgba(0, 0, 0, 0)
  );
  border-color: rgba(0, 180, 255, 0.25);
}

/* ────────────────────────────────────────────────
   Leaflet popup styling (dark theme)
   ──────────────────────────────────────────────── */
.leaflet-popup-content-wrapper {
  background: #0d1420;
  color: #e9f5ff;
  border: 1px solid rgba(0, 180, 255, 0.25);
  border-radius: 10px;
}
.leaflet-popup-tip {
  background: #0d1420;
  border: 1px solid rgba(0, 180, 255, 0.25);
}

.team-clickable { cursor:pointer; transition:background .2s; }
.team-clickable:hover { background:rgba(0,180,255,0.08); }
.legend-members { margin-left:16px; font-size:11px; color:#aee0ff; }
.legend-member { padding:2px 0; opacity:0.8; }
.legend-member:hover { opacity:1; color:#fff; }
.hidden { display:none; }


/* ─────────────────────────────── OUTSIDE LEGEND STYLE ─────────────────────────────── */
.legend-card-outside {
  flex: 0 0 260px;
  align-self: stretch;
  background: rgba(5, 9, 16, 0.75);
  border: 1px solid rgba(0, 180, 255, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow:
    0 0 0 1px rgba(0, 180, 255, 0.18) inset,
    0 0 30px rgba(0, 180, 255, 0.08),
    0 0 80px rgba(0, 180, 255, 0.05);
  color: #dbe9ff;
  font-size: 13px;
  overflow-y: auto;
  max-height: 85vh;
  min-height: 65vh;
  z-index: 20;
}

/* Title & Rows */
.legend-card-outside .legend-title {
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 6px;
  color: #e6f6ff;
}
.legend-card-outside .legend-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(0, 180, 255, 0.12);
  cursor: pointer;
}
.legend-card-outside .legend-row:hover {
  background: rgba(0, 180, 255, 0.08);
}
.legend-card-outside .legend-member {
  padding-left: 22px;
  font-size: 12px;
  color: #9cc8ff;
  cursor: pointer;
}
.legend-card-outside .legend-member:hover {
  color: #fff;
  text-shadow: 0 0 6px rgba(0, 180, 255, 0.8);
}

/* Map Layout */
.map-shell {
  flex: 1;
  min-height: 600px;
}
.map-area {
  width: 100%;
  height: 100%;
}
