#net-wrap {
  position: relative;
  width: 100%;
  height: 680px;
  background: #f6f8fa;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #dde2e6;
  margin-bottom: 14px;
}

#net-svg {
  width: 100%;
  height: 100%;
  cursor: grab;
  display: block;
}

#net-svg:active {
  cursor: grabbing;
}

.n-link {
  stroke: #c4c9ce;
  stroke-width: 1.5;
  fill: none;
}

.n-link.hi {
  stroke: #157878;
  stroke-width: 2.5;
  stroke-opacity: 1;
}

.node-person circle {
  stroke: #fff;
  stroke-width: 2.5;
  cursor: pointer;
}

.node-person text {
  font: 600 9px "Open Sans", sans-serif;
  fill: #333;
  text-anchor: middle;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.node-person:hover text {
  opacity: 1;
}

.node-inst rect {
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 1.5;
}

.node-inst text {
  font: 700 9.5px "Open Sans", sans-serif;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.node-wp rect {
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 1.5;
}

.node-wp text {
  font: 700 10px "Open Sans", sans-serif;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

#net-tip {
  position: absolute;
  background: #fff;
  border: 1px solid #d8dde2;
  border-radius: 9px;
  padding: 10px 13px;
  font: 13px "Open Sans", sans-serif;
  pointer-events: none;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.11);
  max-width: 230px;
  display: none;
  z-index: 20;
}

#net-tip img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  float: left;
  margin: 0 10px 6px 0;
}

#net-tip .tt-name {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
}

#net-tip .tt-pos {
  color: #555;
  font-size: 11px;
  margin-top: 1px;
}

#net-tip .tt-inst {
  color: #157878;
  font-size: 11px;
  margin-top: 3px;
}

#net-tip .tt-wp {
  color: #157878;
  font-size: 11px;
  margin-top: 3px;
}

#net-tip .tt-role {
  color: #888;
  font-size: 10.5px;
  margin-top: 1px;
}

#net-tip .tt-tags {
  color: #555;
  font-size: 10.5px;
  line-height: 1.45;
  margin-top: 5px;
}

#net-tip .tt-click {
  color: #aaa;
  font-size: 10px;
  margin-top: 5px;
  font-style: italic;
}

#net-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

#net-mode-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

#net-tag-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.net-tag-label {
  font-size: 13px;
}

.fbtn {
  padding: 4px 14px;
  border-radius: 20px;
  border: 1.5px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-size: 12.5px;
  font-family: "Open Sans", sans-serif;
  transition: all 0.15s;
}

.fbtn.active {
  background: #157878;
  color: #fff;
  border-color: #157878;
}

.fbtn:hover:not(.active) {
  border-color: #157878;
  color: #157878;
}

#net-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  font: 12px "Open Sans", sans-serif;
}

.leg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 2px 0;
}

.leg-item.faded {
  opacity: 0.35;
}

.leg-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

#net-zoom-controls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zoom-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #ccc;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  line-height: 27px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  user-select: none;
}

.zoom-btn:hover {
  background: #f0f0f0;
}

#net-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#net-panel:fullscreen {
  background: #fff;
  padding: 16px 20px 20px;
  overflow: auto;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
}

#net-panel:fullscreen #net-wrap {
  flex: 1 1 auto;
  height: auto;
  min-height: 320px;
  margin-bottom: 12px;
}

.net-fullscreen-btn {
  margin-left: auto;
}

.net-fullscreen-btn.active {
  background: #0f5f5f;
  border-color: #0f5f5f;
}

#zoom-fullscreen.active {
  background: #157878;
  color: #fff;
  border-color: #157878;
}
