/* Peta jaringan JARVIS — tema gelap menyatu HUD */
.nm-wrap { display: grid; grid-template-columns: 1fr 220px; gap: 12px; height: 100%; min-height: 420px; }
.nm-mapwrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid rgba(22,217,255,.18); }
#nmMap { position: absolute; inset: 0; width: 100%; height: 100%; background: #0a0e14; }
/* Gelapkan tile OSM jadi tema HUD (invert + putar warna). Hanya kena tile, marker canvas tak terpengaruh. */
.nm-dark-tiles { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.92) saturate(0.55); }
.nm-noleaf { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--err,#ff4d6a); font-size: 13px; }

/* Leaflet override gelap */
.nm-mapwrap .leaflet-container { background: #0a0e14; font-family: inherit; }
.nm-mapwrap .leaflet-control-zoom a { background: rgba(10,16,22,.9); color: #16d9ff; border-color: rgba(22,217,255,.25); }
.nm-mapwrap .leaflet-control-zoom a:hover { background: rgba(22,217,255,.2); }
.nm-mapwrap .leaflet-popup-content-wrapper { background: #0d1420; color: #dbeafe; border: 1px solid rgba(22,217,255,.3); box-shadow: 0 8px 30px rgba(0,0,0,.6); border-radius: 10px; }
.nm-mapwrap .leaflet-popup-tip { background: #0d1420; }
.nm-mapwrap .leaflet-popup-content { font-size: 12.5px; line-height: 1.5; margin: 10px 12px; }
.nm-mapwrap .leaflet-popup-content a { color: #16d9ff; }
.nm-pp { color: #8aa0b4; font-size: 11px; }
.nm-tag { color: #011; font-weight: 800; font-size: 10px; padding: 1px 6px; border-radius: 6px; }

/* Marker ODP/ODC */
.nm-node-pin { width: 20px; height: 20px; border-radius: 6px; transform: rotate(45deg);
  display: flex; align-items: center; justify-content: center; background: var(--c); border: 2px solid #0a0e14;
  box-shadow: 0 0 8px var(--c), 0 2px 6px rgba(0,0,0,.5); color: #011; font: 800 11px/1 Orbitron, system-ui; }
.nm-node-pin > span { transform: rotate(-45deg); }

/* Sidebar */
.nm-side { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.nm-card { background: rgba(13,20,32,.6); border: 1px solid rgba(22,217,255,.15); border-radius: 12px; padding: 10px 12px; }
.nm-ct { font: 700 10px/1 Orbitron, system-ui; letter-spacing: 1.5px; color: #7fb5c8; margin-bottom: 8px; }
.nm-leg { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #cfe3ee; padding: 5px 0; cursor: pointer; }
.nm-leg input { accent-color: #16d9ff; cursor: pointer; }
.nm-leg em { margin-left: auto; color: #8aa0b4; font-style: normal; font-weight: 700; }
.nm-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.nm-dot.on { background: #22e39a; box-shadow: 0 0 6px #22e39a; }
.nm-dot.off { background: #ff4d6a; box-shadow: 0 0 6px #ff4d6a; }
.nm-dot.odp { background: #ffb020; border-radius: 3px; transform: rotate(45deg); }
.nm-dot.odc { background: #22d3ee; border-radius: 3px; transform: rotate(45deg); }
.nm-btn { width: 100%; margin-top: 6px; padding: 8px 10px; border-radius: 9px; border: 1px solid rgba(22,217,255,.25);
  background: rgba(22,217,255,.08); color: #cfe3ee; font-size: 12.5px; cursor: pointer; transition: .15s; }
.nm-btn:hover { background: rgba(22,217,255,.2); }

/* Search di atas peta */
.nm-search { position: absolute; top: 10px; right: 10px; z-index: 600; width: 240px; }
.nm-search input { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(22,217,255,.3);
  background: rgba(10,16,22,.92); color: #eaf6ff; font-size: 12.5px; outline: none; box-shadow: 0 4px 18px rgba(0,0,0,.4); box-sizing: border-box; }
.nm-search input:focus { border-color: #16d9ff; }
#nmSearchRes { background: rgba(10,16,22,.96); border-radius: 10px; margin-top: 4px; max-height: 240px; overflow-y: auto; display: none;
  border: 1px solid rgba(22,217,255,.2); }
#nmSearchRes.show { display: block; }
.nm-sr { padding: 8px 11px; font-size: 12px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.05); color: #cfe3ee; }
.nm-sr:hover { background: rgba(22,217,255,.12); }
.nm-sr span { display: block; color: #8aa0b4; font-size: 11px; }
.nm-sr.none { color: #8aa0b4; cursor: default; }
.nm-st { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.nm-st.on { background: #22e39a; } .nm-st.off { background: #ff4d6a; }

@media (max-width: 820px) {
  .nm-wrap { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .nm-side { flex-direction: row; overflow-x: auto; }
  .nm-card { min-width: 190px; flex-shrink: 0; }
  .nm-search { width: 180px; }
}
