:root {
  --canvas-bg: #fafafa;
  --canvas-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --network-pipe-color: #0077be;
  --network-pipe-width: 1.5;

  --network-pipe-palette-1:  #0077be;
  --network-pipe-palette-2:  #2bc064;
  --network-pipe-palette-3:  #8e44ad;
  --network-pipe-palette-4:  #09efff;
  --network-pipe-palette-5:  #f9aafc;
  --network-pipe-palette-6:  #7f8c8d;
  --network-pipe-palette-7:  #c0392b;
  --network-pipe-palette-8:  #a0522d;
  --network-pipe-palette-9:  #27ae60;
  --network-pipe-palette-10: #d35400;
  --network-pipe-palette-11: #16a085;
  --network-pipe-palette-12: #f39c12;

  --network-marker-fill: #e74c3c;
  --network-marker-stroke: #c0392b;
  --network-marker-radius: 5;
  --network-marker-stroke-width: 1;

  --network-label-font-size: 10;
  --network-label-color: #333333;
  --network-label-bg: rgba(255, 255, 255, .75);
  --network-label-padding: 2;
  --network-label-min-scale: .8;

  --network-pipe-label-font-size: 9;
  --network-pipe-label-color: #333333;
  --network-pipe-label-bg: rgba(255, 255, 255, .85);
  --network-pipe-label-padding: 2;
  --network-pipe-label-min-length: 40;

  --network-legend-bg: rgba(255, 255, 255, .92);
  --network-legend-border: #cccccc;
  --network-legend-text: #333333;
  --network-legend-font-size: 11;
  --network-legend-padding: 8;
  --network-legend-margin: 10;
  --network-legend-swatch-size: 10;
  --network-legend-swatch-gap: 6;
  --network-legend-line-height: 18;
  --network-legend-show-structures: 1;

  --network-zoom-factor: 1.15;
  --network-zoom-min: .0001;

  --network-hint-color: rgba(0, 0, 0, .45);
  --network-hint-font-size: 11;
  --network-hint-margin: 10;

  --network-structure-palette-1:  #e74c3c;
  --network-structure-palette-2:  #3498db;
  --network-structure-palette-3:  #f39c12;
  --network-structure-palette-4:  #9b59b6;
  --network-structure-palette-5:  #1abc9c;
  --network-structure-palette-6:  #e67e22;
  --network-structure-palette-7:  #2ecc71;
  --network-structure-palette-8:  #34495e;
  --network-structure-palette-9:  #c0392b;
  --network-structure-palette-10: #16a085;
  --network-structure-palette-11: #8e44ad;
  --network-structure-palette-12: #f1c40f;

  --network-structure-stroke-width: 1;
}

.canvas-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin-bottom: 0;
  position: relative;
}

#networkCanvas {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  background: var(--canvas-bg);
  border: 1px solid var(--c-border, #e2e6ec);
}

/* ============================================================
   Seletor de zona UTM
   ============================================================ */

.utm-zone-switcher {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  gap: 2px;
  padding: 3px;
  font-family: var(--canvas-font-family);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #cccccc;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  pointer-events: auto;
  user-select: none;
}

.utm-btn {
  border: none;
  background: transparent;
  color: #333333;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.utm-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.utm-btn:focus-visible {
  outline: 2px solid #0077be;
  outline-offset: 1px;
}

.utm-btn.active {
  background: #0077be;
  color: #ffffff;
}

.utm-btn.active:hover {
  background: #0066a3;
}