/* ============================================================
   ACCA Network Topology — Handoff edition (formal business)
   Light theme · restrained accents · no neon / no scanline
   ============================================================ */

:root {
  /* Surfaces — paper-stack greys */
  --bg-0: #eef1f6;
  --bg-1: #f6f8fb;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --panel-border: #d8dee8;
  --panel-border-hi: #b9c3d2;
  --hairline: #e6eaf1;

  /* Ink — slate scale */
  --ink-0: #0f1c33;
  --ink-1: #324158;
  --ink-2: #5b6a82;
  --ink-3: #8492a8;
  --ink-dim: #b8c1d1;

  /* Single corporate accent */
  --accent:        #1d4ed8;   /* deep corporate blue */
  --accent-soft:   #e6edfa;
  --accent-strong: #1e3a8a;

  /* Status */
  --ok:    #15803d;
  --warn:  #b45309;
  --bad:   #b91c1c;
  --off:   #94a3b8;
  --new:   #1d4ed8;

  /* VLAN palette — only 30 (Lab 3) and 35 (Lab 4) */
  --vlan-30:    #1d4ed8;   /* Lab 3 — corporate blue */
  --vlan-35:    #0f766e;   /* Lab 4 — teal */
  --vlan-wan:   #475569;   /* WAN — slate */

  /* Soft tints for chips / fills */
  --vlan-30-soft: #e6edfa;
  --vlan-35-soft: #e0f2ef;
  --vlan-wan-soft:#eef1f6;

  /* Shadows — subtle paper drop */
  --shadow-sm: 0 1px 2px rgba(15, 28, 51, 0.06);
  --shadow-md: 0 2px 8px rgba(15, 28, 51, 0.06), 0 1px 2px rgba(15, 28, 51, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 28, 51, 0.10), 0 2px 4px rgba(15, 28, 51, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body, #root {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg-0);
  color: var(--ink-0);
  font-family: "Source Sans 3", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mono { font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace; font-feature-settings: "zero" 1; }

/* ============================================================
   Stage / background — paper, no fx
   ============================================================ */

.stage {
  position: fixed; inset: 0;
  background: var(--bg-0);
  overflow: hidden;
}
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15, 28, 51, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 28, 51, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  mask-image: radial-gradient(1200px 800px at 50% 50%, black 70%, transparent 100%);
  pointer-events: none;
}
.scanline, .starfield { display: none; }

/* ============================================================
   App shell
   ============================================================ */

.shell { position: fixed; inset: 0; display: grid;
  grid-template-columns: 304px 1fr 360px;
  grid-template-rows: 56px 1fr 80px;
  grid-template-areas:
    "top   top    top"
    "left  canvas right"
    "left  bottom right";
  gap: 0;
}

.topbar    { grid-area: top; }
.leftbar   { grid-area: left; }
.rightbar  { grid-area: right; }
.canvas    { grid-area: canvas; position: relative; overflow: hidden; }
.bottombar { grid-area: bottom; }

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
}

/* ============================================================
   Top bar
   ============================================================ */

.topbar {
  display: flex; align-items: stretch;
  background: var(--panel);
  border-bottom: 1px solid var(--panel-border);
  position: relative; z-index: 10;
}

.tb-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px 0 20px;
  border-right: 1px solid var(--hairline);
  min-width: 304px;
}
.tb-logo {
  width: 28px; height: 28px;
  border-radius: 4px;
  background: var(--accent);
  position: relative;
}
.tb-logo::before {
  content: ""; position: absolute; inset: 6px;
  border: 1.5px solid #ffffff;
  border-radius: 2px;
}
.tb-logo::after {
  content: ""; position: absolute; left: 11px; right: 11px; top: 13px;
  height: 2px; background: #ffffff;
}
.tb-name { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-0); }
.tb-sub  { font-size: 10.5px; color: var(--ink-2); letter-spacing: 0.08em; text-transform: uppercase; }

.tb-section {
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px;
  border-right: 1px solid var(--hairline);
}
.tb-section:last-child { border-right: none; }

.tb-stat { display: flex; flex-direction: column; gap: 1px; }
.tb-stat-label { font-size: 9.5px; color: var(--ink-2); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.tb-stat-value { font-size: 13px; font-weight: 600; color: var(--ink-0); }
.tb-stat-value .mono { font-size: 12.5px; font-weight: 500; }

.tb-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  background: #ecfdf3;
  border: 1px solid #b7e4c4;
  color: #15803d;
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.tb-pill.warn   { background: #fef6e7; border-color: #f7d39a; color: #b45309; }
.tb-pill.danger { background: #fdecec; border-color: #f3b9b9; color: #b91c1c; cursor: pointer; }
.tb-pill.danger:hover { background: #fbdcdc; }
.tb-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.tb-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-right: 1px solid var(--hairline); }
.tb-search input {
  flex: 1; min-width: 0;
  height: 32px;
  background: var(--bg-1);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 0 12px 0 36px;
  color: var(--ink-0);
  font-family: inherit;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tb-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tb-search input::placeholder { color: var(--ink-3); }
.tb-search-wrap { position: relative; flex: 1; min-width: 0; }
.tb-search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }

.tb-actions { display: flex; gap: 6px; padding: 0 14px; align-items: center; }
.tb-iconbtn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--bg-1);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: var(--ink-1);
  cursor: pointer;
  transition: all 0.12s;
}
.tb-iconbtn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ============================================================
   Side panels
   ============================================================ */

.leftbar, .rightbar {
  background: var(--panel);
  overflow-y: auto;
  position: relative; z-index: 5;
}
.leftbar  { border-right: 1px solid var(--panel-border); }
.rightbar { border-left:  1px solid var(--panel-border); }

.sp-section { padding: 16px 18px; border-bottom: 1px solid var(--hairline); }
.sp-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 700;
  margin-bottom: 12px;
}
.sp-title .count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; font-weight: 500;
  padding: 2px 6px; border-radius: 3px;
  background: var(--bg-1);
  color: var(--ink-1);
  border: 1px solid var(--panel-border);
}

.layer-list { display: flex; flex-direction: column; gap: 3px; }
.layer-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  border: 1px solid transparent;
  background: transparent;
}
.layer-row:hover { background: var(--bg-1); }
.layer-row.active { background: var(--accent-soft); border-color: var(--accent); }
.layer-swatch { width: 10px; height: 10px; border-radius: 2px; }
.layer-name { flex: 1; font-size: 12.5px; color: var(--ink-0); font-weight: 500; }
.layer-meta { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--ink-2); }

.dev-list { display: flex; flex-direction: column; gap: 2px; }
.dev-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.12s;
}
.dev-row:hover { background: var(--bg-1); }
.dev-row.active { background: var(--accent-soft); border-color: var(--accent); }
.dev-row .dev-icon { width: 24px; height: 24px; display: grid; place-items: center; color: var(--ink-2); flex-shrink: 0; }
.dev-row.active .dev-icon { color: var(--accent); }
.dev-info { flex: 1; min-width: 0; }
.dev-name { font-size: 12px; color: var(--ink-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.dev-meta { font-size: 10.5px; color: var(--ink-3); font-family: "IBM Plex Mono", monospace; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status-dot.active   { background: var(--ok); }
.status-dot.new      { background: var(--new); }
.status-dot.re-IP    { background: var(--warn); }
.status-dot.disabled { background: var(--off); }

/* ============================================================
   Right inspector
   ============================================================ */

.insp-header { padding: 16px 18px 12px; border-bottom: 1px solid var(--hairline); }
.insp-eyebrow {
  font-size: 10px; color: var(--ink-2); letter-spacing: 0.16em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; font-weight: 700;
}
.insp-host { font-size: 17px; font-weight: 700; margin-top: 6px; color: var(--ink-0); letter-spacing: -0.005em; }
.insp-role { font-size: 12.5px; color: var(--ink-1); margin-top: 4px; line-height: 1.45; }
.insp-id { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--ink-3); margin-top: 8px; }

.insp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  font-size: 10.5px; letter-spacing: 0.04em; font-weight: 600;
  border-radius: 3px;
  background: var(--bg-1);
  border: 1px solid var(--panel-border);
  color: var(--ink-1);
  font-family: "IBM Plex Mono", monospace;
}
.chip.vlan-30  { color: var(--vlan-30); border-color: #b8c8ef; background: var(--vlan-30-soft); }
.chip.vlan-35  { color: var(--vlan-35); border-color: #a8d8d1; background: var(--vlan-35-soft); }
.chip.wan      { color: var(--vlan-wan); border-color: #c8d0dc; background: var(--vlan-wan-soft); }
.chip.dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.insp-block { padding: 14px 18px; border-bottom: 1px solid var(--hairline); }
.insp-block-title {
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 10px; font-weight: 700;
}

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; font-size: 12px; }
.kv dt { color: var(--ink-2); }
.kv dd { color: var(--ink-0); font-family: "IBM Plex Mono", monospace; font-size: 11.5px; word-break: break-word; }

.iface-table { display: flex; flex-direction: column; gap: 4px; }
.iface-row {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  padding: 8px 10px;
  background: var(--bg-1);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  font-size: 11.5px;
}
.iface-name { font-family: "IBM Plex Mono", monospace; color: var(--ink-0); font-weight: 500; }
.iface-ip   { font-family: "IBM Plex Mono", monospace; color: var(--accent); font-weight: 500; }
.iface-vlan { font-family: "IBM Plex Mono", monospace; color: var(--ink-2); font-size: 10.5px; }
.iface-vip  { color: var(--accent-strong); font-size: 10.5px; margin-top: 2px; font-family: "IBM Plex Mono", monospace; }

.insp-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  height: 100%; padding: 40px 24px; gap: 14px;
  color: var(--ink-2);
}
.insp-empty .ring {
  width: 84px; height: 84px; border-radius: 50%;
  border: 1px solid var(--panel-border);
  display: grid; place-items: center;
  color: var(--ink-3);
  background: var(--bg-1);
}
.insp-empty h3 { font-size: 14px; color: var(--ink-1); font-weight: 600; }
.insp-empty p { font-size: 12.5px; line-height: 1.55; max-width: 240px; }

/* ============================================================
   Canvas + topology
   ============================================================ */

.canvas {
  background: var(--bg-1);
  position: relative;
}
.canvas-svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.canvas-hud {
  position: absolute; left: 16px; top: 16px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 10px 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  color: var(--ink-2);
  letter-spacing: 0.06em;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}
.canvas-hud .label { color: var(--ink-3); }
.canvas-hud .val   { color: var(--ink-0); font-weight: 600; }

.canvas-hud-right { position: absolute; right: 16px; top: 16px; display: flex; gap: 6px; }
.zbtn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: var(--ink-1);
  cursor: pointer;
  transition: all 0.12s;
  box-shadow: var(--shadow-sm);
}
.zbtn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* SVG nodes */
.node-hit { cursor: pointer; }
.node-group .node-card {
  fill: #ffffff;
  stroke: #cbd5e1;
  stroke-width: 1;
}
.node-group.is-active .node-card,
.node-group.is-hover  .node-card {
  stroke: var(--accent);
  stroke-width: 1.5;
}
.node-group.is-dim { opacity: 0.4; }
.node-group .pulse-ring { display: none; }

.node-label { fill: var(--ink-0); font-size: 11.5px; font-weight: 600; font-family: "Source Sans 3", sans-serif; }
.node-sub   { fill: var(--ink-2); font-size: 9.5px; font-family: "IBM Plex Mono", monospace; letter-spacing: 0.04em; }
.node-tag   { fill: var(--accent); font-size: 9px; font-family: "IBM Plex Mono", monospace; letter-spacing: 0.06em; font-weight: 500; }

.node-icon-bg-active   { fill: #ecfdf3; stroke: #b7e4c4; }
.node-icon-bg-new      { fill: var(--accent-soft); stroke: #b8c8ef; }
.node-icon-bg-re-IP    { fill: #fef6e7; stroke: #f7d39a; }
.node-icon-bg-disabled { fill: #f1f3f8; stroke: #d0d5e0; }

.node-status-active   { fill: var(--ok); }
.node-status-new      { fill: var(--new); }
.node-status-re-IP    { fill: var(--warn); }
.node-status-disabled { fill: var(--off); }

/* SVG edges */
.edge-base { fill: none; stroke-linecap: round; }
.edge-trunk    { stroke: #94a3b8; stroke-width: 1.6; }
.edge-access   { stroke: #b4becd; stroke-width: 1.1; }
.edge-wan      { stroke: #475569; stroke-width: 1.8; }
.edge-disabled { stroke: #cbd5e1; stroke-width: 1;   stroke-dasharray: 4 4; }

.edge-flow   { display: none; } /* drop animated packet flow for handoff */
.edge-base.is-dim { opacity: 0.18; }
.edge-base.is-highlight { stroke-width: 2.2; }
.edge-base.is-highlight.edge-trunk,
.edge-base.is-highlight.edge-access { stroke: var(--accent); }

.vlan-30-stroke  { stroke: var(--vlan-30); }
.vlan-35-stroke  { stroke: var(--vlan-35); }
.vlan-wan-stroke { stroke: var(--vlan-wan); }

/* ============================================================
   Station rack
   ============================================================ */
.station-card {
  fill: #ffffff;
  stroke: #cbd5e1;
  stroke-width: 1;
}
.station-rack.is-hover  .station-card,
.station-rack.is-active .station-card {
  stroke: var(--accent);
  stroke-width: 1.5;
}

.station-rack-title { fill: var(--ink-0); font-size: 12px; font-weight: 700; font-family: "Source Sans 3", sans-serif; }
.station-rack-sub   { fill: var(--ink-2); font-size: 9px; font-family: "IBM Plex Mono", monospace; letter-spacing: 0.04em; }

.vlan-30-stripe { fill: var(--vlan-30); }
.vlan-35-stripe { fill: var(--vlan-35); }

.vlan-chip-bg     { stroke-width: 1; }
.vlan-30-chipbg   { fill: var(--vlan-30-soft); stroke: #b8c8ef; }
.vlan-35-chipbg   { fill: var(--vlan-35-soft); stroke: #a8d8d1; }
.vlan-chip-text   { font-size: 8.5px; font-family: "IBM Plex Mono", monospace; letter-spacing: 0.04em; font-weight: 600; }
.vlan-30-chiptxt  { fill: var(--vlan-30); }
.vlan-35-chiptxt  { fill: var(--vlan-35); }

.bank-panel {
  fill: #f6f8fb;
  stroke: #d8dee8;
  stroke-width: 0.8;
}
.station-rack.is-hover  .bank-panel,
.station-rack.is-active .bank-panel { stroke: #b9c3d2; }

.bank-label { fill: var(--ink-1); font-size: 8.5px; font-weight: 700; font-family: "IBM Plex Mono", monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.bank-meta  { fill: var(--ink-3); font-size: 8px; font-family: "IBM Plex Mono", monospace; letter-spacing: 0.08em; }

.station-cell { stroke-width: 0.6; }
.vlan-30-cell { fill: #d6e2f6; stroke: #6e8bd2; }
.vlan-35-cell { fill: #c8e3df; stroke: #4a9b91; }
.station-base { fill: #b9c3d2; }

.station-rack.is-hover  .vlan-30-cell,
.station-rack.is-active .vlan-30-cell { fill: #b8cdf0; stroke: var(--vlan-30); }
.station-rack.is-hover  .vlan-35-cell,
.station-rack.is-active .vlan-35-cell { fill: #abd5cf; stroke: var(--vlan-35); }

.bank-port-line { stroke-width: 1.2; opacity: 0.8; }
.bank-port-dot  { stroke: #ffffff; stroke-width: 1; }
.vlan-30-dot    { fill: var(--vlan-30); }
.vlan-35-dot    { fill: var(--vlan-35); }

/* Floor band labels */
.floor-label     { fill: var(--ink-3); font-size: 10px; font-family: "IBM Plex Mono", monospace; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.floor-label-big { fill: rgba(15, 28, 51, 0.05); font-size: 88px; font-weight: 800; font-family: "Source Sans 3", sans-serif; letter-spacing: -0.04em; }

/* HA cluster overlay */
.ha-link {
  fill: none;
  stroke: var(--accent-strong);
  stroke-width: 1.2;
  stroke-dasharray: 3 4;
  opacity: 0.65;
}
.ha-halo {
  fill: rgba(29, 78, 216, 0.04);
  stroke: rgba(29, 78, 216, 0.30);
  stroke-dasharray: 4 4;
}

/* ============================================================
   Bottom bar
   ============================================================ */

.bottombar {
  display: flex; align-items: stretch;
  background: var(--panel);
  border-top: 1px solid var(--panel-border);
  position: relative; z-index: 10;
}

.bb-section { display: flex; align-items: center; gap: 16px; padding: 0 18px; border-right: 1px solid var(--hairline); }
.bb-section:last-child { border-right: none; }
.bb-legend { gap: 14px; }
.bb-leg-item { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-1); font-weight: 500; }
.bb-leg-swatch { width: 10px; height: 10px; border-radius: 2px; }
.bb-leg-line { width: 22px; height: 2px; border-radius: 1px; }

.bb-mini {
  flex-shrink: 0;
  width: 200px; height: 64px;
  margin: 8px 0; align-self: center;
  position: relative;
  border: 1px solid var(--panel-border);
  background: var(--bg-1);
  border-radius: 4px; overflow: hidden;
}
.bb-mini svg { display: block; width: 100%; height: 100%; }
.bb-mini-view { fill: rgba(29, 78, 216, 0.10); stroke: var(--accent); stroke-width: 1; }

.bb-clock {
  margin-left: auto; padding: 0 18px;
  display: flex; align-items: center; gap: 14px;
  color: var(--ink-1);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: 0.04em;
}
.bb-clock .sep { color: var(--ink-dim); }
.bb-clock .lbl { color: var(--ink-3); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }

/* Tooltip */
.tooltip {
  position: absolute;
  z-index: 100;
  pointer-events: none;
  background: var(--panel);
  border: 1px solid var(--panel-border-hi);
  border-radius: 4px;
  padding: 10px 12px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  transform: translate(-50%, calc(-100% - 12px));
  font-size: 11.5px;
}
.tooltip-title { font-size: 12px; color: var(--ink-0); font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.tooltip-row { display: flex; justify-content: space-between; gap: 12px; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--ink-1); padding: 2px 0; }
.tooltip-row .k { color: var(--ink-3); }

/* Scrollbar */
.leftbar::-webkit-scrollbar, .rightbar::-webkit-scrollbar { width: 8px; }
.leftbar::-webkit-scrollbar-track, .rightbar::-webkit-scrollbar-track { background: transparent; }
.leftbar::-webkit-scrollbar-thumb, .rightbar::-webkit-scrollbar-thumb { background: #d0d5e0; border-radius: 4px; }
.leftbar::-webkit-scrollbar-thumb:hover, .rightbar::-webkit-scrollbar-thumb:hover { background: #aab3c3; }

/* Fade-in */
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn 0.2s ease-out both; }

/* Loader */
.boot {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: var(--bg-0); color: var(--ink-2); font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px; letter-spacing: 0.06em;
}

/* ============================================================
   Overlay panels — Firewall / IP Plan / HA / Open Items
   ============================================================ */

.ov {
  position: absolute;
  left: 16px; top: 16px; bottom: 16px;
  width: 560px; max-width: calc(100% - 32px);
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-border-hi);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 20;
  overflow: hidden;
  animation: ovIn 0.18s ease-out both;
}
@keyframes ovIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: none; }
}
.ov::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--ov-accent, var(--accent));
}

.ov-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--hairline);
}
.ov-eyebrow {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ov-accent, var(--accent));
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
}
.ov-title {
  font-size: 19px; font-weight: 700; color: var(--ink-0);
  margin-top: 4px; letter-spacing: -0.01em;
}
.ov-close {
  width: 30px; height: 30px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--bg-1);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: var(--ink-1); cursor: pointer;
  transition: all 0.12s;
}
.ov-close:hover { color: var(--ink-0); border-color: var(--ink-2); background: var(--bg-0); }

.ov-body { flex: 1; overflow-y: auto; padding: 0; }
.ov-body::-webkit-scrollbar { width: 8px; }
.ov-body::-webkit-scrollbar-thumb { background: #d0d5e0; border-radius: 4px; }
.ov-body::-webkit-scrollbar-thumb:hover { background: #aab3c3; }

.ov-foot { border-top: 1px solid var(--hairline); padding: 12px 20px; background: var(--bg-1); }
.ov-foot-row { display: flex; flex-wrap: wrap; gap: 22px; }
.ov-foot-cell { display: flex; flex-direction: column; gap: 2px; }
.ov-foot-cell .lbl { font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.ov-foot-cell .val { font-size: 13px; color: var(--ink-0); font-weight: 700; }
.ov-foot-cell .val.mono { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; font-weight: 500; }

.ov-block { padding: 14px 20px; border-bottom: 1px solid var(--hairline); }
.ov-block:last-child { border-bottom: none; }
.ov-block-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ov-block-title { font-size: 13px; font-weight: 700; color: var(--ink-0); display: flex; align-items: center; gap: 8px; letter-spacing: -0.005em; }
.ov-block-sub { font-size: 11px; color: var(--ink-2); margin-top: 3px; line-height: 1.5; }
.ov-count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px; color: var(--ink-1); font-weight: 600;
  padding: 3px 8px; border-radius: 3px;
  background: var(--bg-1); border: 1px solid var(--panel-border);
}
.ov-block-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 11px; color: var(--ink-2); }
.ov-mini em { font-style: normal; color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; font-size: 9.5px; margin-right: 6px; font-weight: 700; }
.ov-note { background: var(--bg-1); border: 1px solid var(--panel-border); border-radius: 4px; padding: 10px 12px; font-size: 11.5px; color: var(--ink-1); }

/* Verdict / severity pills */
.verdict {
  display: inline-block; font-size: 10.5px; padding: 3px 9px; border-radius: 3px;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.06em; border: 1px solid;
  white-space: nowrap; font-weight: 600;
}
.sev {
  display: inline-block; font-size: 9.5px; padding: 2px 7px; border-radius: 3px;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.14em; border: 1px solid;
  margin-left: 8px; font-weight: 700;
}

/* Rule table */
.rule-table { display: flex; flex-direction: column; gap: 6px; }
.rule-head {
  display: grid; grid-template-columns: 56px 1.1fr 1.1fr 0.95fr auto;
  gap: 10px; padding: 6px 10px;
  font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
  font-family: "IBM Plex Mono", monospace; font-weight: 700;
}
.rule-row {
  display: grid; grid-template-columns: 56px 1.1fr 1.1fr 0.95fr auto;
  gap: 10px; align-items: flex-start;
  padding: 10px;
  border-radius: 4px;
  background: var(--bg-1);
  border: 1px solid var(--hairline);
  transition: border-color 0.12s, background 0.12s;
  font-size: 11px;
}
.rule-row:hover { background: #eef2f8; }
.rule-row.v-DENY        { border-left: 3px solid var(--bad); }
.rule-row.v-ALLOW       { border-left: 3px solid var(--ok); }
.rule-row.v-DISABLED    { border-left: 3px solid var(--off); opacity: 0.85; }
.rule-row.v-PLACEHOLDER { border-left: 3px solid var(--warn); }
.rule-id { font-size: 11.5px; color: var(--ink-0); font-weight: 700; display: flex; align-items: center; }
.rule-cell { color: var(--ink-1); font-size: 10.5px; line-height: 1.5; word-break: break-word; }
.rule-note {
  grid-column: 1 / -1;
  font-size: 10.5px; color: var(--ink-2); line-height: 1.55;
  padding-top: 6px; border-top: 1px solid var(--hairline);
  margin-top: 2px;
}

/* IP plan table */
.scope-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.scope-dot.vlan-30 { background: var(--vlan-30); }
.scope-dot.vlan-35 { background: var(--vlan-35); }
.scope-dot.wan     { background: var(--vlan-wan); }

.ip-table { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--hairline); border-radius: 4px; overflow: hidden; }
.ip-head {
  display: grid; grid-template-columns: 130px 1fr 90px; gap: 10px;
  padding: 6px 10px;
  font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
  font-family: "IBM Plex Mono", monospace; font-weight: 700;
  background: var(--bg-1);
  border-bottom: 1px solid var(--hairline);
}
.ip-row {
  display: grid; grid-template-columns: 130px 1fr 90px; gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid var(--hairline);
  font-size: 11.5px;
  background: var(--panel);
}
.ip-row:hover { background: var(--bg-1); }
.ip-row:last-child { border-bottom: none; }
.ip-addr { color: var(--accent); font-size: 11.5px; font-weight: 500; }
.ip-host { color: var(--ink-0); }
.ip-type {
  font-size: 9.5px; font-family: "IBM Plex Mono", monospace; font-weight: 600;
  letter-spacing: 0.12em;
  padding: 2px 6px; border-radius: 3px;
  border: 1px solid var(--panel-border);
  text-align: center;
  justify-self: end;
}
.ip-type.t-static    { color: var(--ink-1); background: var(--bg-1); }
.ip-type.t-vip       { color: var(--accent-strong); border-color: #b8c8ef; background: var(--accent-soft); }
.ip-type.t-reserved  { color: var(--ink-3); }
.ip-type.t-re-IP     { color: var(--warn); border-color: #f7d39a; background: #fef6e7; }
.ip-type.t-disabled  { color: var(--off); }

/* HA panel */
.ha-members { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ha-member {
  border: 1px solid var(--panel-border); border-radius: 4px;
  padding: 10px 12px;
  background: var(--bg-1);
  cursor: pointer;
  transition: all 0.12s;
}
.ha-member:hover { border-color: var(--accent); background: var(--accent-soft); }
.ha-member.primary { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.ha-member-row { display: flex; align-items: center; justify-content: space-between; }
.ha-role { font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); font-family: "IBM Plex Mono", monospace; font-weight: 700; }
.ha-role.primary { color: var(--accent-strong); }
.ha-prio { font-size: 10px; color: var(--ink-3); font-family: "IBM Plex Mono", monospace; }
.ha-member-host { font-size: 12px; color: var(--ink-0); margin-top: 6px; word-break: break-word; line-height: 1.3; font-weight: 600; }
.ha-member-state { font-size: 10.5px; color: var(--ink-2); margin-top: 6px; font-family: "IBM Plex Mono", monospace; }

.vip-table { display: flex; flex-direction: column; gap: 6px; }
.vip-head {
  display: grid; grid-template-columns: 90px 110px 1fr 170px; gap: 10px;
  padding: 4px 10px;
  font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
  font-family: "IBM Plex Mono", monospace; font-weight: 700;
}
.vip-row {
  display: grid; grid-template-columns: 90px 110px 1fr 170px; gap: 10px;
  align-items: center;
  padding: 8px 10px; border-radius: 4px;
  background: var(--bg-1);
  border: 1px solid var(--hairline);
  font-size: 11.5px;
}

.kv.kv-3 { grid-template-columns: 140px 1fr; }
.kv.kv-3 dd { color: var(--ink-0); }

/* Open items */
.issue-list { display: flex; flex-direction: column; gap: 8px; }
.issue {
  padding: 12px 14px;
  background: var(--bg-1);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  transition: border-color 0.12s, background 0.12s;
}
.issue:hover { border-color: var(--panel-border-hi); }
.issue-head { display: flex; align-items: center; gap: 10px; }
.issue-id {
  font-size: 11px; font-weight: 700; color: var(--bad);
  padding: 2px 7px; border-radius: 3px;
  background: #fdecec; border: 1px solid #f3b9b9;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  font-family: "IBM Plex Mono", monospace;
}
.issue-title { font-size: 12.5px; color: var(--ink-0); font-weight: 600; flex: 1; line-height: 1.35; }
.issue-area {
  font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2);
  padding: 2px 7px; border-radius: 3px;
  background: var(--panel); border: 1px solid var(--panel-border);
  font-family: "IBM Plex Mono", monospace; font-weight: 700;
  flex-shrink: 0;
}
.issue-area.area-firewall { color: var(--warn); border-color: #f7d39a; background: #fef6e7; }
.issue-area.area-ha       { color: var(--accent-strong); border-color: #b8c8ef; background: var(--accent-soft); }
.issue-area.area-ip-plan  { color: var(--vlan-35); border-color: #a8d8d1; background: var(--vlan-35-soft); }
.issue-summary { font-size: 11.5px; color: var(--ink-1); margin: 8px 0 0; line-height: 1.55; }
.issue-foot { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 8px; font-size: 10.5px; color: var(--ink-2); }
.issue-foot em { font-style: normal; color: var(--ink-3); letter-spacing: 0.12em; text-transform: uppercase; font-size: 9.5px; margin-right: 6px; font-weight: 700; }
.block-tag {
  display: inline-block; padding: 1px 6px; margin-right: 4px;
  background: #fdecec; border: 1px solid #f3b9b9;
  border-radius: 3px;
  color: var(--bad); font-size: 10px; font-weight: 600;
  font-family: "IBM Plex Mono", monospace;
}

/* LeftBar views */
.view-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s;
  border: 1px solid transparent;
}
.view-row:hover { background: var(--bg-1); }
.view-row.active { background: var(--accent-soft); border-color: var(--accent); }
.view-row .view-ico {
  width: 28px; height: 28px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 4px;
  background: var(--bg-1);
  border: 1px solid var(--panel-border);
  color: var(--ink-1);
}
.view-row.active .view-ico { color: var(--accent); border-color: var(--accent); background: #ffffff; }
.view-row .view-meta { font-family: "IBM Plex Mono", monospace; font-size: 10px; color: var(--ink-2); letter-spacing: 0.04em; }
.view-row .view-name { flex: 1; font-size: 12.5px; color: var(--ink-0); font-weight: 500; }
.view-row .view-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 3px;
  background: #fdecec;
  color: var(--bad);
  border: 1px solid #f3b9b9;
  letter-spacing: 0.04em;
}
