/* Utility Operations — map, heat grid and small extras */
.u-map{position:relative}
.u-map-svg{display:block;width:100%;height:auto;max-height:520px}
.u-terr{fill:#0a2437;stroke:#23506f;stroke-width:1.5}
.u-river{fill:none;stroke:#1d5a80;stroke-width:6;stroke-linecap:round;opacity:.55}
.u-road{stroke:#1a3a52;stroke-width:1.5;stroke-dasharray:1 5;stroke-linecap:round}
.u-line{stroke:#2b5673;stroke-width:4;stroke-linecap:round}
.u-flow{stroke:var(--accent);stroke-width:2;stroke-dasharray:6 10;stroke-linecap:round;animation:u-flow 1.4s linear infinite}
.u-edge[data-level="warn"] .u-flow{stroke:var(--warn)}
.u-edge[data-level="bad"] .u-flow{stroke:var(--bad)}
.u-edge[data-level="off"] .u-flow{stroke:#3a4f60;animation:none;stroke-dasharray:2 6}
@keyframes u-flow{to{stroke-dashoffset:-32}}
.u-dp{fill:#0c2133;stroke:var(--accent-2);stroke-width:2.5}
.u-dp-label{fill:var(--accent-2);font-size:13px;font-weight:700}
.u-node{cursor:pointer;outline:none}
.u-halo{fill:transparent;stroke:transparent;stroke-width:2;transition:fill .2s ease}
.u-sub{fill:var(--good);stroke:#04121d;stroke-width:2.5;transition:fill .3s ease}
.u-bolt{fill:#04121d}
.u-node[data-level="warn"] .u-sub{fill:var(--warn)}
.u-node[data-level="bad"] .u-sub{fill:var(--bad)}
.u-node.is-out .u-sub{animation:u-blink 1s ease-in-out infinite}
@keyframes u-blink{50%{opacity:.35}}
.u-node:hover .u-halo,.u-node:focus-visible .u-halo{fill:rgba(54,195,239,.14)}
.u-node.is-selected .u-halo{fill:rgba(54,195,239,.18);stroke:var(--accent)}
.u-label{fill:#b9d6e6;font-size:13px;font-weight:600;paint-order:stroke;stroke:#0a2437;stroke-width:4px;stroke-linejoin:round}
.u-node.is-selected .u-label{fill:#fff}
.u-map-legend{display:flex;flex-wrap:wrap;gap:6px 14px;color:var(--muted);font-size:13px}
.u-map-legend span{display:inline-flex;align-items:center;gap:6px}
.u-loading{margin-top:14px}
.u-loading .progress{margin-top:8px}
.u-dispatch{width:100%;margin-top:18px}
.u-sub-cell{color:var(--muted);font-size:12.5px}

/* AMI heat grid */
.u-heat{overflow-x:auto;-webkit-overflow-scrolling:touch}
.u-heat-grid{display:grid;grid-template-columns:62px repeat(24,minmax(14px,1fr));gap:3px;min-width:440px}
.u-heat-h{color:var(--faint);font-size:11px;text-align:center}
.u-heat-d{color:var(--muted);font-size:12px;white-space:nowrap;align-self:center}
.u-cell{aspect-ratio:1;min-height:14px;padding:0;border:0;border-radius:3px;background:#12405e;cursor:pointer}
.u-cell.l0{background:#11496b}.u-cell.l1{background:#1d6f96}.u-cell.l2{background:#c28b2c}.u-cell.l3{background:#d8662f}.u-cell.l4{background:#e24848}
.u-cell:hover{outline:2px solid var(--accent-2);outline-offset:1px}
.u-cell.is-sel{outline:2px solid #fff;outline-offset:1px}
.u-heat-legend{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12.5px}
.u-heat-legend i{width:90px;height:10px;border-radius:999px;background:linear-gradient(90deg,#11496b,#1d6f96,#c28b2c,#d8662f,#e24848)}

@media (max-width:767px){
  .u-label{display:none}
  .u-node.is-selected .u-label{display:block}
  .u-dp-label{font-size:16px}
  .u-map-legend{font-size:12.5px}
}
@media (prefers-reduced-motion:reduce){
  .u-flow,.u-node.is-out .u-sub{animation:none}
}
