/* ═══════════════════════════════════════════════════════════
   gis-map/frontend/css/map.css
   Styles khusus Map Mode
═══════════════════════════════════════════════════════════ */

/* ── Map container ───────────────────────────────────────── */
#map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ── Leaflet overrides ───────────────────────────────────── */
.leaflet-container { font-family: var(--font); }

.leaflet-control-zoom {
  border: 1px solid var(--border2) !important;
  border-radius: 9px !important;
  overflow: hidden;
  box-shadow: none !important;
}
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text2) !important;
  border-bottom: 1px solid var(--border) !important;
  width: 32px !important; height: 32px !important; line-height: 32px !important;
  font-size: 16px !important; transition: all 0.15s !important;
}
.leaflet-control-zoom a:hover {
  background: var(--surface2) !important;
  color: var(--text) !important;
}

.leaflet-tooltip {
  background: rgba(6,10,20,0.97) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #e2e8f0 !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  padding: 8px 11px !important;
  font-family: 'Inter', sans-serif !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6) !important;
  white-space: normal !important;
  max-width: 260px !important;
  min-width: 140px !important;
  line-height: 1.55 !important;
  backdrop-filter: blur(8px) !important;
  pointer-events: auto !important;
  transition: opacity 0.1s !important;
}
.leaflet-tooltip::before { display: none !important; }
.leaflet-tooltip-interactive { pointer-events: auto !important; cursor: default !important; }

.leaflet-popup-content-wrapper {
  background: var(--surface) !important;
  border: 1px solid var(--border2) !important;
  border-radius: 11px !important;
  color: var(--text) !important;
  box-shadow: 0 6px 28px rgba(0,0,0,0.55) !important;
  padding: 0 !important;
}
.leaflet-popup-tip-container { display: none; }
.leaflet-popup-content { margin: 0 !important; min-width: 220px; }
.leaflet-popup-close-button {
  color: var(--text2) !important;
  font-size: 18px !important;
  top: 10px !important; right: 10px !important;
  padding: 0 !important; width: 20px !important; height: 20px !important;
  line-height: 20px !important; text-align: center;
}

/* ── Node marker ─────────────────────────────────────────── */
.noc-node {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; user-select: none;
}
.node-pin {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.88);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: #fff; position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}
.noc-node:hover .node-pin { transform: scale(1.12); }
.node-pin.up   { background: #16a34a; box-shadow: 0 0 14px rgba(34,197,94,0.45); }
.node-pin.warn { background: #d97706; box-shadow: 0 0 14px rgba(245,158,11,0.45); }
.node-pin.down { background: #dc2626; box-shadow: 0 0 14px rgba(239,68,68,0.45); animation: pulse-red 2s infinite; }
@keyframes pulse-red {
  0%,100%{ box-shadow: 0 0 14px rgba(239,68,68,0.45); }
  50%{ box-shadow: 0 0 22px rgba(239,68,68,0.7); }
}
.node-badge {
  position: absolute; top: -3px; right: -3px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--red); border: 2px solid #0b0f1a;
}
.node-lbl {
  background: rgba(6,10,20,0.84); color: var(--text);
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: 4px; white-space: nowrap;
  backdrop-filter: blur(4px);
  border: 0.5px solid rgba(255,255,255,0.1);
}
.node-lbl.day { background: rgba(15,23,42,0.82); color: #f1f5f9; }

/* ── Node popup ──────────────────────────────────────────── */
.node-popup { padding: 14px 16px; }
.popup-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.popup-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.popup-icon.up   { background: var(--green-bg); color: #4ade80; }
.popup-icon.warn { background: var(--amber-bg); color: #fbbf24; }
.popup-icon.down { background: var(--red-bg);   color: #f87171; }
.popup-title { font-size: 13px; font-weight: 600; color: var(--text); }
.popup-sub   { font-size: 10px; color: var(--text2); margin-top: 2px; }
.popup-rows  { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.popup-row   { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.popup-row .lbl { color: var(--text2); }
.popup-row .val { color: var(--text); font-family: var(--mono); }
.popup-actions { display: flex; gap: 6px; }
.popup-btn {
  flex: 1; padding: 6px 8px; border-radius: 6px; font-size: 11px;
  border: 1px solid var(--border2); background: rgba(255,255,255,0.05);
  color: var(--text2); cursor: pointer; transition: all 0.15s; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.popup-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.popup-btn.danger:hover { background: var(--red-bg); color: #f87171; border-color: var(--red-bd); }

/* ── Floating tool panel ─────────────────────────────────── */
#tool-panel {
  position: absolute;
  top: 12px;
  left: 38px;   /* geser kanan agar tidak nabrak tombol expand sidebar */
  z-index: 800;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: left 0.25s ease;
}

/* Saat sidebar visible, tool-panel lebih ke kanan lagi */
#sidebar:not(.collapsed) ~ * #tool-panel {
  left: 12px;
}
.tp-btn {
  width: 34px; height: 34px; border-radius: 7px;
  border: 1px solid transparent; background: transparent;
  color: var(--text2); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 17px; transition: all 0.15s;
}
.tp-btn:hover       { background: rgba(255,255,255,0.07); color: var(--text); }
.tp-btn.active-tool { background: var(--blue-bg); color: #93c5fd; border-color: var(--blue-bd); }
.tp-sep { height: 1px; background: var(--border); margin: 2px 0; }

/* ── Link info panel ─────────────────────────────────────── */
#link-panel {
  position: absolute; top: 12px; right: 12px; z-index: 800;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 10px; padding: 13px 15px; width: 210px; display: none;
}
.lp-title {
  font-size: 12px; font-weight: 600; color: var(--text);
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.lp-row { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 11px; }
.lp-label { color: var(--text2); }
.lp-val { color: var(--text); font-family: var(--mono); }

/* ── Add node panel ──────────────────────────────────────── */
#add-node-panel {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 12px; padding: 18px 20px; width: 270px;
  z-index: 2000; display: none;
}
#add-node-panel h3 {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 14px; display: flex; align-items: center; gap: 7px;
}

/* ── Link hint banner ────────────────────────────────────── */
#link-hint {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  background: var(--blue-bg); border: 1px solid var(--blue-bd);
  color: #93c5fd; font-size: 12px; padding: 7px 20px;
  border-radius: 999px; z-index: 800; display: none;
  backdrop-filter: blur(4px); white-space: nowrap;
}

/* ── Legend ──────────────────────────────────────────────── */
#map-legend {
  position: absolute; bottom: 36px; right: 54px; z-index: 800; /* di samping kiri tombol zoom +/-, sejajar bawahnya */
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 9px; padding: 9px 12px; font-size: 11px; color: var(--text2);
}
.leg-row { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.leg-row:last-child { margin-bottom: 0; }
.leg-line { width: 20px; height: 3px; border-radius: 2px; }
.leg-icon { width: 14px; font-size: 13px; text-align: center; line-height: 1; }

/* ── Context menu ────────────────────────────────────────── */
#ctx-menu {
  position: absolute; z-index: 3000;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 9px; padding: 4px; min-width: 165px;
  display: none; box-shadow: 0 6px 24px rgba(0,0,0,0.45);
}
.ctx-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 11px; border-radius: 6px; font-size: 12px;
  color: var(--text2); cursor: pointer; transition: background 0.1s;
}
.ctx-item:hover  { background: rgba(255,255,255,0.06); color: var(--text); }
.ctx-item.danger { color: #f87171; }
.ctx-item.danger:hover { background: var(--red-bg); }
.ctx-item i { font-size: 14px; color: var(--text3); }
.ctx-item.danger i { color: #f87171; }
.ctx-sep { height: 1px; background: var(--border); margin: 3px 0; }
/* ── Passive Nodes (tiang, ODP, ODC, dll) ─────────────────── */
.noc-passive-node {
  display: flex; flex-direction: column; align-items: center;
  pointer-events: all; cursor: pointer;
}
.passive-pin {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid #60a5fa;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.noc-passive-node:hover .passive-pin {
  transform: scale(1.18);
  box-shadow: 0 0 12px rgba(96,165,250,0.5);
}
.noc-passive-node .node-lbl {
  font-size: 9px !important;
  margin-top: 2px;
}

/* Override Leaflet default div icon (hapus background putih & border hitam) */
.leaflet-div-icon-clean {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Ghost style untuk titik pasif yang di-hidden */
.noc-passive-hidden {
  opacity: 0.25;
  filter: saturate(0.3);
  transition: opacity 0.2s, filter 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.noc-passive-hidden:hover {
  opacity: 0.8;
  filter: saturate(1);
}

/* Waypoint handle tooltip hint */
.leaflet-interactive[stroke="#60a5fa"] {
  cursor: grab;
}
.leaflet-interactive[stroke="#60a5fa"]:hover {
  cursor: grab;
}
/* ── Map Compass (rotate widget) ─────────────────────────── */
#map-compass {
  position: absolute;
  bottom: 80px;
  right: 12px;
  z-index: 800;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
  transition: box-shadow 0.15s;
  padding: 0;
  gap: 0;
}
#map-compass:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08);
}
#compass-rose {
  width: 48px;
  height: 48px;
  transition: transform 0.1s ease-out;
  flex-shrink: 0;
}
#compass-rose svg {
  width: 100%;
  height: 100%;
  display: block;
}
#compass-bearing {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 1px 5px;
  pointer-events: none;
}
#compass-reset {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
#compass-reset:hover {
  background: var(--blue-bg);
  color: #93c5fd;
  border-color: var(--blue-bd);
}
/* ══════════════════════════════════════════════════════════
   PROFILE DROP ZONE — drag device dari sidebar ke kanvas peta
   ══════════════════════════════════════════════════════════ */
#map.map-drop-active {
  outline: 3px dashed #60a5fa;
  outline-offset: -3px;
  background: rgba(96, 165, 250, 0.04);
}

/* ══════════════════════════════════════════════════════════
   ONU LINK OFFLINE — garis merah tipis berkedip saat ONU down
   (ditempel ke elemen <path> polyline via classList, lihat
   applyOnuLinkBlink() di pages/map.js)
   ══════════════════════════════════════════════════════════ */
@keyframes onu-link-blink {
  0%, 100%  { opacity: 1;    }
  50%       { opacity: 0.12; }
}
.onu-link-blink {
  animation: onu-link-blink 1s ease-in-out infinite;
}

/* ── Minimize legend & tool panel (dengan animasi) ───────── */
#tool-panel { transition: left .25s ease, padding .28s ease, gap .28s ease; }
#tool-panel > :not(#tp-min-btn) {
  max-height: 44px; opacity: 1;
  transition: max-height .28s ease, opacity .2s ease .06s, margin .28s ease;
}
#tool-panel.tp-collapsed { padding: 4px; gap: 0; }
#tool-panel.tp-collapsed > :not(#tp-min-btn) {
  max-height: 0; opacity: 0; margin-top: 0; margin-bottom: 0;
  overflow: hidden; pointer-events: none;
  transition: max-height .28s ease, opacity .12s ease, margin .28s ease;
}
.tp-min-ic { position: relative; width: 17px; height: 17px; display: block; }
.tp-min-ic i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  transition: opacity .22s ease, transform .3s ease;
}
.tp-min-ic .i-closed { opacity: 0; transform: rotate(-90deg) scale(.6); }
#tool-panel.tp-collapsed .tp-min-ic .i-open   { opacity: 0; transform: rotate(90deg) scale(.6); }
#tool-panel.tp-collapsed .tp-min-ic .i-closed { opacity: 1; transform: none; }

#map-legend {
  overflow: hidden; box-sizing: border-box;
  transition: width .3s ease, padding .28s ease;
}
#map-legend .leg-head {
  display: flex; align-items: center; gap: 0; cursor: pointer; user-select: none;
  margin: -2px 0 7px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
  font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text3);
  transition: margin .28s ease, padding .28s ease, border-color .28s ease, color .15s;
}
#map-legend .leg-head:hover { color: var(--text); }
#map-legend .leg-head-icon { font-size: 14px; flex-shrink: 0; transition: font-size .28s ease; }
#map-legend .leg-head-title, #map-legend .leg-head-chev {
  overflow: hidden; white-space: nowrap; opacity: 1;
  transition: max-width .28s ease, margin .28s ease, opacity .2s ease;
}
#map-legend .leg-head-title { flex: 1; max-width: 120px; margin-left: 7px; }
#map-legend .leg-head-chev  { font-size: 13px; max-width: 16px; margin-left: 7px; }

#map-legend-body {
  display: grid; grid-template-rows: 1fr; opacity: 1;
  transition: grid-template-rows .28s ease, opacity .2s ease;
}
#map-legend-body > .leg-body-inner { overflow: hidden; min-height: 0; width: max-content; }
#map-legend .leg-row { white-space: nowrap; }

#map-legend.leg-collapsed { width: 36px; padding: 6px 8px; }
#map-legend.leg-collapsed .leg-head { margin: 0; padding: 0; border-bottom-color: transparent; }
#map-legend.leg-collapsed .leg-head-icon { font-size: 17px; }
#map-legend.leg-collapsed .leg-head-title,
#map-legend.leg-collapsed .leg-head-chev { max-width: 0; margin-left: 0; opacity: 0; flex: 0; }
#map-legend.leg-collapsed #map-legend-body { grid-template-rows: 0fr; opacity: 0; }
/* Pemilih basemap (Peta / Satelit / Hybrid) */
.basemap-switch {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.basemap-switch .bm-btn {
  padding: 6px 11px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  color: var(--text2);
  font: 500 11px var(--font);
  cursor: pointer;
}
.basemap-switch .bm-btn:last-child { border-right: 0; }
.basemap-switch .bm-btn:hover { color: var(--text); background: var(--surface2); }
.basemap-switch .bm-btn.active { color: #fff; background: var(--accent); }
.basemap-switch .bm-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ═══════════════════════════════════════════════════════════
   FOTO TITIK / PERANGKAT / ONU  (js/node-photos.js)
   - .np-block   : blok foto di dalam kotak hover (#map-live-tooltip)
   - #np-dialog  : dialog tambah / edit foto
   - #np-viewer  : modal zoom
═══════════════════════════════════════════════════════════ */
.np-block { margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.07); }
.np-block:empty { display: none; }
.np-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px;
  font-size: 10px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .05em; }
.np-head i { margin-right: 4px; font-size: 11px; }
.np-count { font-family: 'IBM Plex Mono', monospace; font-weight: 500; }

.np-main { position: relative; height: 120px; border-radius: 7px; overflow: hidden; cursor: zoom-in;
  background: linear-gradient(100deg, rgba(255,255,255,.04) 30%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 70%);
  background-size: 200% 100%; animation: np-shimmer 1.3s linear infinite; }
.np-main:hover .np-zoom { opacity: 1; }
.np-img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .2s; }
.np-img.loaded { opacity: 1; }
.np-img.failed { display: none; }
.np-zoom { position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff;
  background: rgba(0,0,0,.55); opacity: 0; transition: opacity .15s; pointer-events: none; }
@keyframes np-shimmer { to { background-position: -200% 0; } }

.np-cap { margin-top: 5px; font-size: 10.5px; color: #cbd5e1; line-height: 1.4; word-break: break-word; }

.np-thumbs { display: flex; gap: 4px; margin-top: 6px; }
.np-thumb { flex: 1 1 0; min-width: 0; height: 34px; padding: 0; border: 1.5px solid transparent; border-radius: 5px;
  overflow: hidden; cursor: pointer; background: rgba(255,255,255,.05); opacity: .6; transition: opacity .15s, border-color .15s; }
.np-thumb:hover { opacity: 1; }
.np-thumb.on { opacity: 1; border-color: #3b82f6; }
.np-timg { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .2s; }
.np-timg.loaded { opacity: 1; }

.np-actions { display: flex; gap: 5px; margin-top: 7px; }
.np-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 9px;
  border-radius: 6px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  color: #cbd5e1; font: 500 10.5px 'Inter', sans-serif; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.np-btn i { font-size: 12px; }
.np-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.np-btn.danger { color: #f87171; border-color: rgba(248,113,113,.3); }
.np-btn.danger:hover { background: rgba(248,113,113,.15); color: #fca5a5; }
.np-btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.np-btn.primary:hover { background: #3b82f6; }
.np-btn:disabled { opacity: .5; cursor: default; }
.np-actions .np-btn { flex: 1; }

.np-add-empty { width: 100%; padding: 8px; border-radius: 7px; border: 1px dashed rgba(255,255,255,.2);
  background: transparent; color: #94a3b8; font: 500 11px 'Inter', sans-serif; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px; transition: all .15s; }
.np-add-empty:hover { border-color: #3b82f6; color: #93c5fd; background: rgba(59,130,246,.08); }

/* ── Overlay dasar (dialog + viewer) ── */
.np-overlay { position: fixed; inset: 0; z-index: 10100; display: flex; align-items: center; justify-content: center;
  background: rgba(2,6,14,.72); backdrop-filter: blur(3px); font-family: 'Inter', sans-serif; }

/* ── Dialog tambah / edit ── */
.np-card { width: 340px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow-y: auto;
  background: #111827; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; padding: 18px;
  box-shadow: 0 16px 48px rgba(0,0,0,.7); color: #e2e8f0; }
.np-card-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 600; font-size: 14px; color: #fff; margin-bottom: 12px; }
.np-card-title i { color: #60a5fa; }
.np-card-sub { font-size: 11px; font-weight: 400; color: #64748b; }
.np-prev { position: relative; height: 190px; border-radius: 9px; overflow: hidden; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.np-prev img { display: none; width: 100%; height: 100%; object-fit: contain; }
.np-prev.has img { display: block; }
.np-prev.has .np-prev-ph { display: none; }
.np-prev-ph { font-size: 34px; color: #334155; }
.np-filerow { display: flex; align-items: center; gap: 8px; margin: 9px 0 12px; }
.np-fname { font-size: 10px; color: #64748b; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-lbl { display: block; font-size: 11px; color: #94a3b8; margin-bottom: 4px; }
.np-lbl span { color: #475569; }
.np-input { width: 100%; box-sizing: border-box; padding: 7px 10px; border-radius: 7px; border: 1px solid rgba(255,255,255,.15);
  background: #1e293b; color: #fff; font: 12px 'Inter', sans-serif; outline: none; }
.np-input:focus { border-color: #3b82f6; }
.np-err { min-height: 16px; margin-top: 6px; font-size: 11px; color: #f87171; }
.np-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.np-foot .np-btn { padding: 6px 12px; font-size: 11px; }

/* ── Modal zoom ── */
.np-viewer { flex-direction: column; align-items: stretch; justify-content: flex-start; background: rgba(2,6,14,.93); z-index: 10050; }
.npv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; color: #e2e8f0; flex-shrink: 0; }
.npv-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; min-width: 0; }
.npv-title span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.npv-title i { color: #60a5fa; }
.npv-count { font: 500 11px 'IBM Plex Mono', monospace; color: #64748b; }
.npv-tools { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.npv-sep { width: 1px; height: 18px; background: rgba(255,255,255,.14); margin: 0 4px; }
.npv-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #cbd5e1; font-size: 16px; cursor: pointer; transition: all .15s; }
.npv-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.npv-btn.danger { color: #f87171; }
.npv-btn.danger:hover { background: rgba(248,113,113,.18); }
.npv-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; touch-action: none; }
.npv-img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; transform-origin: center center;
  transition: opacity .2s, transform .12s ease-out; cursor: zoom-in; will-change: transform; }
.npv-img.drag { transition: opacity .2s; cursor: grabbing !important; }
.npv-spin { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 28px; pointer-events: none; }
.npv-spin i { animation: np-spin 1s linear infinite; }
@keyframes np-spin { to { transform: rotate(360deg); } }
.npv-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 42px; height: 64px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.07); color: #e2e8f0; font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.npv-nav:hover { background: rgba(255,255,255,.16); }
.npv-nav.prev { left: 12px; }
.npv-nav.next { right: 12px; }
.npv-cap { flex-shrink: 0; padding: 10px 18px 16px; text-align: center; font-size: 12.5px; color: #cbd5e1; line-height: 1.5; }
@media (max-width: 640px) {
  .npv-nav { width: 34px; height: 52px; }
  .npv-nav.prev { left: 4px; } .npv-nav.next { right: 4px; }
}