/* Network Map page styles (works with /assets/css/shared.css tokens) */

:root{
  --nm-card-bg: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
}

/* Layout */
.viewTabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin: 18px 0 14px;
}

.tabBtn{
  appearance:none;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  padding: 8px 12px;
  border-radius: 999px;
  cursor:pointer;
  font-size: 13px;
  letter-spacing: .02em;
}

.tabBtn:hover{ background: rgba(255,255,255,0.10); }

.tabBtn[aria-selected="true"]{
  background: rgba(93,143,255,0.20);
  border-color: rgba(93,143,255,0.75);
  box-shadow: 0 0 0 2px rgba(93,143,255,0.18);
}

.mapShell{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 1100px){
  .mapShell{ grid-template-columns: 1fr; }
}

.mapStage{
  min-height: 740px;
}

.stageBody{
  padding: 14px;
}

.stageCanvas{
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(0,0,0,.10);
  overflow:hidden;
}

.stageCanvas svg{
  width: 100%;
  height: auto;
  display:block;
}

.hidden{ display:none; }

.hintRow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 12px;
}

.details{
  position: sticky;
  top: 86px;
}

.detailsBody{
  padding: 14px;
}

.kv{
  display:grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 10px;
  align-items: start;
}

.k{ color: var(--muted); font-size: 12px; }
.v{ font-size: 13px; }

.sep{ height:1px; background: rgba(255,255,255,.08); margin: 14px 0; }

.codeBox{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  border-radius: 14px;
  padding: 12px;
  white-space: pre-wrap;
  line-height: 1.35;
}

/* SVG styling */
#topologySvg, #flowsSvg{ color: rgba(255,255,255,0.92); }

.node rect{
  fill: rgba(255,255,255,0.06);
  stroke: rgba(255,255,255,0.14);
  stroke-width: 1;
  rx: 14;
  ry: 14;
}

.node:hover rect{
  fill: rgba(255,255,255,0.09);
  stroke: rgba(93,143,255,0.75);
}

.node text.title{
  font-size: 16px;
  font-weight: 650;
}

.node text.meta{
  font-size: 12px;
  fill: rgba(255,255,255,0.72);
}

.badge{
  fill: rgba(255,255,255,0.08);
  stroke: rgba(255,255,255,0.12);
  rx: 999;
  ry: 999;
}

.badgeText{
  font-size: 11px;
  fill: rgba(255,255,255,0.85);
}

.edge path{
  fill: none;
  stroke: rgba(255,255,255,0.18);
  stroke-width: 2;
}

.edge:hover path{ stroke: rgba(93,143,255,0.85); }

.edge text{
  font-size: 11px;
  fill: rgba(255,255,255,0.65);
  text-anchor: middle;
}

/* Slight glow behind labels to keep readability */
.edge text{
  paint-order: stroke;
  stroke: rgba(0,0,0,0.55);
  stroke-width: 4px;
}

/* Header nav helpers (to match Records look) */
.brandLink{
  display:flex;
  align-items:center;
  gap: 14px;
  text-decoration:none;
  color: var(--text);
}

.titleRow{ display:flex; flex-direction:column; gap:2px; }

.projNav{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
  justify-content:flex-end;
}

.navLink{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration:none;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.90);
  font-size: 13px;
}

.navLink:hover{
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.10);
  transform: translateY(-1px);
}

/* Records-like card head */
.card-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.12);
}

/* Override base .card padding so inner sections align */
.mapStage.card, .details.card{
  padding:0;
}
