/* =========================================================
   Peta Jaringan — dark cyan dashboard (referensi visual)
   ========================================================= */

body.is-map-page {
  padding-bottom: 0;
  background: #00050a;
}

.map-page {
  --map-bg: #00050a;
  --map-teal: #0a3d4a;
  --map-cyan: #00e5ff;
  --map-cyan-dim: rgba(0, 229, 255, 0.35);
  --map-yellow: #ffd700;
  --map-ink: #e8f7fb;
  --map-muted: #7aa8b5;
  min-height: 100dvh;
  background: var(--map-bg);
  color: var(--map-ink);
  padding-bottom: 40px;
}

.map-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, rgba(0, 5, 10, 0.95), rgba(0, 5, 10, 0.75));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 229, 255, 0.12);
}

.map-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.map-brand:hover { color: var(--map-cyan); }
.map-brand .brand-mark {
  background: linear-gradient(135deg, #00c4d4, #1B8A4A);
}

.map-topbar-actions { display: flex; gap: 8px; }
.map-btn-ghost {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.map-stage {
  position: relative;
  height: min(62vh, 520px);
  margin: 0 12px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.2);
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, 0.05),
    0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 0 80px rgba(0, 229, 255, 0.04);
  background:
    radial-gradient(ellipse at 50% 40%, #042830 0%, #00050a 70%);
}

.map-canvas {
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
}

.map-hud {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  padding: 14px 16px;
}
.map-hud-tl { top: 8px; left: 8px; }
.map-hud-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--map-cyan);
  font-weight: 700;
  margin-bottom: 4px;
}
.map-hud strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
}
.map-hud p {
  font-size: 0.75rem;
  color: var(--map-muted);
  margin-top: 2px;
}

/* Leaflet dark overrides */
.map-page .leaflet-container {
  background: transparent;
  font-family: var(--font);
}
.map-page .leaflet-control-attribution {
  background: rgba(0, 5, 10, 0.7) !important;
  color: var(--map-muted) !important;
  font-size: 9px !important;
}
.map-page .leaflet-control-attribution a { color: var(--map-cyan) !important; }
.map-page .leaflet-control-zoom a {
  background: rgba(4, 40, 48, 0.9) !important;
  color: var(--map-cyan) !important;
  border-color: rgba(0, 229, 255, 0.25) !important;
}

.map-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--map-cyan);
  border: 2px solid #fff;
  box-shadow: 0 0 12px var(--map-cyan), 0 0 4px #fff;
  animation: mapPulse 2.4s ease-in-out infinite;
}
.map-marker.is-offline {
  background: #3d6a78;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.3);
  animation: none;
}
@keyframes mapPulse {
  0%, 100% { box-shadow: 0 0 8px var(--map-cyan), 0 0 2px #fff; transform: scale(1); }
  50% { box-shadow: 0 0 18px var(--map-cyan), 0 0 6px #fff; transform: scale(1.15); }
}

.map-panel {
  position: absolute;
  right: 12px;
  top: 12px;
  bottom: 12px;
  width: min(300px, calc(100% - 24px));
  background: rgba(0, 12, 18, 0.92);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 14px;
  padding: 16px;
  z-index: 20;
  backdrop-filter: blur(10px);
  overflow-y: auto;
}
.map-panel[hidden] { display: none !important; }
.map-panel-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--map-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.map-panel-close:hover { color: #fff; }
.map-panel h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 6px;
  padding-right: 24px;
}
.map-panel .meta {
  font-size: 0.8rem;
  color: var(--map-muted);
  margin-bottom: 10px;
}
.map-panel .tagline {
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 14px;
}
.map-panel .btn { width: 100%; }

.map-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 720px;
  margin: 22px auto 0;
  padding: 0 16px;
  text-align: center;
}
.map-stat-num {
  display: block;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  color: var(--map-cyan);
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 0 24px rgba(0, 229, 255, 0.35);
}
.map-stat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--map-muted);
  margin-top: 4px;
  font-weight: 600;
}
.map-stat-mid .map-stat-num { color: #7af0ff; }

.map-cta-row {
  display: flex;
  justify-content: center;
  margin: 18px 16px 10px;
}
.map-cta-btn {
  min-width: 220px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 24px rgba(255, 215, 0, 0.35);
}

.map-clubs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px 8px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.map-club {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.22);
  background: rgba(4, 40, 48, 0.85);
  color: #b8e8f0;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.map-club span {
  color: var(--map-cyan);
  font-variant-numeric: tabular-nums;
}
.map-club:hover,
.map-club.is-active {
  border-color: var(--map-cyan);
  background: rgba(0, 229, 255, 0.12);
  color: #fff;
}
.map-club.is-hot {
  border-color: rgba(255, 215, 0, 0.45);
}

.map-list-section {
  max-width: 960px;
  margin: 28px auto 0;
  padding: 0 16px;
}
.map-list-head {
  margin-bottom: 16px;
}
.map-list-head h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.map-list-head p {
  color: var(--map-muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

.map-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.map-card {
  background: rgba(4, 28, 36, 0.9);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color .15s, transform .15s;
}
.map-card:hover {
  border-color: rgba(0, 229, 255, 0.4);
}
.map-card.is-dimmed { opacity: 0.35; pointer-events: none; }
.map-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.map-card-top h3 {
  font-size: 0.95rem;
  font-weight: 800;
}
.map-card-meta {
  font-size: 0.78rem;
  color: var(--map-muted);
  margin-bottom: 6px;
}
.map-card-tag {
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 12px;
  color: #c5e8ef;
}
.pill-coffee {
  background: rgba(255, 215, 0, 0.15);
  color: var(--map-yellow);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-outline-cyan {
  background: transparent;
  color: var(--map-cyan);
  border: 1.5px solid var(--map-cyan);
}
.btn-outline-cyan:hover {
  background: rgba(0, 229, 255, 0.12);
  color: #fff;
}

.map-list-cta {
  text-align: center;
  margin-top: 28px;
  padding: 28px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.04);
}
.map-list-cta p {
  margin-bottom: 14px;
  color: var(--map-muted);
}

@media (min-width: 768px) {
  .map-stage { height: min(68vh, 580px); margin: 0 24px; }
  .map-list { grid-template-columns: repeat(2, 1fr); }
  .map-stats { margin-top: 28px; }
}

@media (min-width: 1024px) {
  .map-list { grid-template-columns: repeat(3, 1fr); }
}
