/* ---------- network map (js/netmap.js) ---------- */
.nm-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 16px;
}
.nm-head-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nm-tone { width: 5px; align-self: stretch; border-radius: 999px; background: #cbd5e1; }
.nm-tone.good { background: #10b981; }
.nm-tone.warn { background: #f59e0b; }
.nm-tone.bad { background: #ef4444; }
.nm-tone.muted { background: #cbd5e1; }
.nm-headline { font-size: 17px; font-weight: 600; color: #1e293b; line-height: 1.3; }
.nm-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nm-kpi { padding: 12px 14px; }
.nm-kpi .text-xl { font-variant-numeric: tabular-nums; }

.nm-clear {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-left: 4px solid #10b981;
}
.nm-clear i { color: #10b981; font-size: 18px; }
.nm-clear b { display: block; color: #1e293b; font-size: 14px; }

.nm-finding {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; margin-bottom: 8px;
  border-left: 4px solid #cbd5e1;
}
.nm-finding.bad { border-left-color: #ef4444; }
.nm-finding.warn { border-left-color: #f59e0b; }
.nm-finding.info { border-left-color: #38bdf8; }
.nm-finding-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: #f1f5f9; color: #64748b; }
.nm-finding.bad .nm-finding-icon { background: #fee2e2; color: #dc2626; }
.nm-finding.warn .nm-finding-icon { background: #fef3c7; color: #d97706; }
.nm-finding.info .nm-finding-icon { background: #e0f2fe; color: #0284c7; }
.nm-finding-title { font-size: 14px; font-weight: 600; color: #1e293b; }
.nm-finding-side { text-align: right; flex: none; min-width: 118px; }
.nm-big { font-size: 20px; font-weight: 700; color: #dc2626; line-height: 1; }
.nm-evidence { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.nm-evidence span {
  font-size: 10.5px; color: #475569; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 999px; padding: 1px 8px;
}

.nm-simbar {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; margin-bottom: 16px;
  border: 1px solid #fecaca; background: #fff1f2; border-radius: 12px;
}
.nm-simbar.line { border-color: #fde68a; background: #fffbeb; }
.nm-sim-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #fee2e2; color: #dc2626; flex: none; }
.nm-simbar.line .nm-sim-icon { background: #fef3c7; color: #b45309; }

.nm-sites { display: flex; flex-wrap: wrap; gap: 6px; }
.nm-site {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
  padding: 5px 10px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; color: #475569;
}
.nm-site:hover { border-color: #55a4ff; color: #0a4fae; }
.nm-site.on { background: #036aee; border-color: #036aee; color: #fff; }
.nm-site em { font-style: normal; font-size: 10px; background: rgb(239 68 68 / .15); color: #b91c1c; border-radius: 999px; padding: 0 6px; }
.nm-site.on em { background: rgb(255 255 255 / .25); color: #fff; }

.nm-map-card { padding: 16px; }
.nm-map-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.nm-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 10.5px; color: #64748b; align-items: center; }
.nm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.nm-legend b { display: inline-block; }
.nm-map {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px;
  background: linear-gradient(180deg, #f8fafc, #ffffff); border-radius: 12px;
}
.nm-col { flex: 1 1 0; min-width: 180px; }
.nm-col-net { flex: 0 0 150px; min-width: 150px; }
.nm-col-head {
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #64748b;
  font-weight: 600; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px dashed #e2e8f0;
}
.nm-node {
  display: block; width: 100%; text-align: left; border: 1px solid #e2e8f0; background: #fff;
  border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.nm-node:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgb(15 23 42 / .08); border-color: #93c5fd; }
.nm-node.down { border-color: #fecaca; background: #fff5f5; }
.nm-node.hit { border-color: #ef4444; box-shadow: 0 0 0 2px rgb(239 68 68 / .18); }
.nm-node.miss { opacity: .38; }
.nm-node.picked { outline: 2px solid #036aee; outline-offset: 1px; }
.nm-node-net { border-style: dashed; background: #f8fafc; cursor: default; }
.nm-node-net:hover { transform: none; box-shadow: none; border-color: #e2e8f0; }
.nm-node-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nm-node-name { font-size: 12.5px; font-weight: 600; color: #1e293b; overflow-wrap: anywhere; flex: 1; min-width: 0; }
.nm-node-sub { font-size: 10.5px; color: #64748b; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-node-up { font-size: 10.5px; color: #94a3b8; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-node-up i { font-size: 9px; }
.nm-node-cust { font-size: 10.5px; color: #0a4fae; margin-top: 3px; font-weight: 500; }
.nm-node-cust i { font-size: 9px; margin-right: 2px; }
.nm-dot { width: 8px; height: 8px; border-radius: 999px; flex: none; background: #94a3b8; }
.nm-dot.up { background: #10b981; box-shadow: 0 0 0 3px rgb(16 185 129 / .14); }
.nm-dot.down { background: #ef4444; box-shadow: 0 0 0 3px rgb(239 68 68 / .14); }
.nm-dot.idle { background: #f59e0b; }
.nm-ev {
  font-size: 9px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
  border-radius: 999px; padding: 1px 6px; flex: none; background: #f1f5f9; color: #64748b;
}
.nm-ev.verified { background: #dcfce7; color: #15803d; }
.nm-ev.inferred { background: #fef3c7; color: #b45309; }
.nm-ev.unknown { background: #f1f5f9; color: #64748b; }
.nm-ev-dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; background: #cbd5e1; }
.nm-ev-dot.verified { background: #10b981; }
.nm-ev-dot.inferred { background: #f59e0b; }
.nm-ev-dot.unknown { background: #cbd5e1; }

.nm-lines { display: flex; flex-wrap: wrap; gap: 10px; }
.nm-line { flex: 1 1 320px; max-width: 430px; border: 1px solid #e2e8f0; border-left: 4px solid #10b981; border-radius: 10px; padding: 10px 12px; }
.nm-line.degraded { border-left-color: #f59e0b; }
.nm-line.down { border-left-color: #ef4444; background: #fff5f5; }
.nm-line-method { margin-left: auto; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: #64748b; background: #f1f5f9; border-radius: 999px; padding: 1px 7px; }
.nm-line-members { margin-top: 8px; display: grid; gap: 4px; }
.nm-line-row { display: grid; grid-template-columns: 1.5fr .55fr .9fr .9fr; gap: 8px; font-size: 11px; color: #475569; align-items: center; }
.nm-line-iface { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nm-agents { display: grid; gap: 6px; }
.nm-agent { display: flex; align-items: center; gap: 10px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 10px; }
.nm-claim { margin-top: 4px; border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 10px; padding: 10px; }
.nm-claim pre { margin: 6px 0 8px; font-size: 11px; white-space: pre-wrap; word-break: break-all; color: #0f172a; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px; }

.nm-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11.5px; color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 9px; padding: 7px 10px; }
.nm-path i { font-size: 8px; color: #94a3b8; }
.nm-person { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 5px 0; border-bottom: 1px solid #f1f5f9; }
.nm-person:last-child { border-bottom: 0; }
.nm-impact { border: 1px dashed #fecaca; background: #fff5f5; border-radius: 10px; padding: 9px 11px; }
.nm-impact b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #b91c1c; margin-bottom: 2px; }
.nm-error { display: flex; align-items: center; gap: 12px; }
.nm-error > i { color: #ef4444; font-size: 18px; }

/* the network scan — every port, every machine, every drop */
.nm-scan-head { margin-bottom: 12px; }
.nm-note {
  display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: #475569;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 9px 12px;
}
.nm-note > i { margin-top: 2px; color: #64748b; font-size: 12px; }
.nm-note.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.nm-note.warn > i { color: #d97706; }
.nm-scan-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.nm-kind {
  font-size: 9px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; border-radius: 999px;
  padding: 1px 6px; background: #f1f5f9; color: #64748b; white-space: nowrap;
}
.nm-kind.customer { background: #dcfce7; color: #15803d; }
.nm-kind.named { background: #e0f2fe; color: #0369a1; }
.nm-kind.box { background: #ede9fe; color: #6d28d9; }
.nm-kind.address { background: #fef3c7; color: #b45309; }
.nm-lock { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: #b91c1c; }
.nm-lock i { font-size: 10px; }
.nm-node-scan { font-size: 10.5px; color: #475569; margin-top: 3px; }
.nm-node-scan.lock { color: #b91c1c; }
.nm-node-scan.down { color: #94a3b8; }
.nm-node-scan i { font-size: 9px; margin-right: 2px; }

body.dark .nm-headline, body.dark .nm-finding-title, body.dark .nm-node-name, body.dark .nm-clear b { color: #e2e8f0; }
body.dark .nm-node { background: #0f1e35; border-color: #1e3a5f; }
body.dark .nm-node.down { background: #3b1118; border-color: #7f1d1d; }
body.dark .nm-node-net { background: #0b1a33; }
body.dark .nm-map { background: linear-gradient(180deg, #0b1a33, #0f172a); }
body.dark .nm-col-head { color: #94a3b8; border-color: #1e3a5f; }
body.dark .nm-evidence span { background: #0b1a33; border-color: #1e3a5f; color: #cbd5e1; }
body.dark .nm-finding-icon { background: #0b1a33; }
body.dark .nm-simbar { background: #3b1118; border-color: #7f1d1d; }
body.dark .nm-simbar.line { background: #3b2a0b; border-color: #78350f; }
body.dark .nm-line { border-color: #1e3a5f; }
body.dark .nm-line.down { background: #3b1118; }
body.dark .nm-line .text-slate-500 { color: #cbd5e1 !important; }
body.dark .nm-line-method { background: rgba(148, 163, 184, .18); color: #cbd5e1; }
body.dark .nm-agent { border-color: #1e3a5f; }
body.dark .nm-claim, body.dark .nm-path { background: #0b1a33; border-color: #1e3a5f; }
body.dark .nm-claim pre { background: #0f172a; border-color: #1e3a5f; color: #e2e8f0; }
body.dark .nm-impact { background: #3b1118; border-color: #7f1d1d; }
body.dark .nm-site { background: #0f1e35; border-color: #1e3a5f; color: #cbd5e1; }
body.dark .nm-site.on { background: #0a55c4; border-color: #2f8cf7; color: #fff; }
body.dark .nm-node-sub, body.dark .nm-node-up { color: #94a3b8; }
body.dark .nm-line-iface { color: #e2e8f0; }
body.dark .nm-line-row { color: #cbd5e1; }
body.dark .nm-node-cust { color: #7dd3fc; }
body.dark .nm-finding { background: #0f1e35; border-color: #1e3a5f; }
body.dark .nm-clear { background: #0f1e35; border-color: #1e3a5f; }
body.dark .nm-note { background: #0b1a33; border-color: #1e3a5f; color: #cbd5e1; }
body.dark .nm-note.warn { background: #3b2a0b; border-color: #78350f; color: #fcd34d; }
body.dark .nm-node-scan { color: #94a3b8; }
body.dark .nm-node-scan.lock, body.dark .nm-lock { color: #fca5a5; }
