/* client-explorer.css v1.2 (Rings and Tree views) v1.1 (full screen) v1.0 (2026-11-04, Joseph: Client Explorer, components/client-explorer.js). The canvas is the dark "network" look of the
   other network views (relation-network.css); the bar and side panel use theme colours (--t-*), so they follow every theme. */
.cex{display:flex;flex-direction:column;gap:8px;min-width:0}
.cex-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.cex-bar .cex-title{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--t-muted);margin-right:6px}
.cex-bar button{font-size:12px;padding:3px 10px;border-radius:6px;border:1px solid var(--t-border);background:var(--t-button,var(--t-raised));color:var(--t-button-text,var(--t-text));cursor:pointer}
.cex-bar button:hover{border-color:var(--t-accent);color:var(--t-accent)}
.cex-legend{flex:1 1 auto;display:flex;flex-wrap:wrap;gap:4px 10px;font-size:11px;color:var(--t-muted)}
.cex-lg{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.cex-lg::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--c);box-shadow:0 0 5px var(--c)}
.cex-lg.ring::before{background:transparent;border:2px solid #ff4d5e;box-shadow:0 0 5px #ff4d5e}
.cex-lg.ring.amber::before{border-color:#ffb020;box-shadow:0 0 5px #ffb020}
/* stage: canvas + sliding side panel */
.cex-stage{position:relative;height:calc(100vh - 210px);min-height:520px;border-radius:10px;overflow:hidden;border:1px solid #1d3a4f;
  background:radial-gradient(ellipse at center,#0f2233 0%,#081320 55%,#050b12 100%);box-shadow:inset 0 0 60px #000a}
.cex-canvas{position:absolute;inset:0;transition:right .3s ease}
.cex-canvas::after{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,#ffffff05 0 1px,transparent 1px 3px)}
.cex-stage.pinned.side-open .cex-canvas{right:332px}
.cex-svg{display:block;width:100%;height:100%;cursor:grab;touch-action:none;user-select:none;font-family:'Segoe UI',Arial,sans-serif}
.cex-svg.dragging{cursor:grabbing}
.cex-vp{transform-origin:0 0}
.cex-hint{position:absolute;left:12px;bottom:6px;margin:0;font-size:11px;color:#7f9bb3;pointer-events:none}
/* nodes and lines */
.cex-e{fill:none;stroke:color-mix(in srgb,var(--c) 45%,#1b3448);stroke-width:1.3;opacity:.85}
.cex-e.on{stroke:var(--c);stroke-width:2.6;opacity:1;filter:drop-shadow(0 0 4px var(--c))}
.cex-n{cursor:pointer}
.cex-dot{fill:color-mix(in srgb,var(--c) 30%,#0b1722);stroke:var(--c);stroke-width:2;filter:drop-shadow(0 0 5px color-mix(in srgb,var(--c) 70%,transparent))}
.cex-n:hover .cex-dot{fill:color-mix(in srgb,var(--c) 55%,#0b1722)}
.cex-client .cex-dot{stroke-width:3;fill:color-mix(in srgb,var(--c) 40%,#0b1722)}
.cex-hub .cex-dot{stroke-width:2.5}
.cex-n.open .cex-dot{fill:color-mix(in srgb,var(--c) 60%,#0b1722)}
.cex-n.sel .cex-dot{stroke:#fff;stroke-width:3}
.cex-n.empty{opacity:.4}
.cex-n.err .cex-dot{stroke-dasharray:4 3}
.cex-ring{fill:none;stroke-width:2.5}
.cex-ring.red{stroke:#ff4d5e;filter:drop-shadow(0 0 5px #ff4d5e);animation:cex-pulse 1.6s ease-in-out infinite}
.cex-ring.amber{stroke:#ffb020;filter:drop-shadow(0 0 4px #ffb020)}
@keyframes cex-pulse{50%{stroke-opacity:.35}}
@media (prefers-reduced-motion:reduce){.cex-ring.red{animation:none}}
.cex-ini{fill:#fff;font-size:17px;font-weight:600;text-anchor:middle;pointer-events:none}
.cex-ico{fill:#fff;font-size:18px;text-anchor:middle;pointer-events:none}
.cex-plus{fill:#fff;font-size:11px;font-weight:700;text-anchor:middle;pointer-events:none}
.cex-lab{text-anchor:middle;pointer-events:none;paint-order:stroke;stroke:#050b12;stroke-width:3px}
.cex-lab-c{fill:#fff;font-size:15px;font-weight:600}
.cex-lab-s{fill:#9fc3dc;font-size:11px}
.cex-lab-h{fill:#e3f1fb;font-size:12.5px;font-weight:600;letter-spacing:.02em}
.cex-rlab{fill:#cfe3f1;font-size:11px;pointer-events:none;paint-order:stroke;stroke:#050b12;stroke-width:3px}
.cex-group .cex-rlab,.cex-case .cex-rlab{fill:#fff;font-weight:600;font-size:11.5px}
.cex-n.sel .cex-rlab{fill:#fff}
.cex-cnt rect{fill:#0b1722;stroke:#6fd6e8;stroke-width:1}
.cex-cnt text{fill:#e3f1fb;font-size:10px;font-weight:600;text-anchor:middle}
.cex-n.err .cex-cnt rect{stroke:#ff4d5e}
/* side panel */
.cex-sidebox{position:absolute;top:0;right:0;bottom:0;width:320px;padding:12px;overflow:auto;background:var(--t-surface,#fff);border-left:1px solid var(--t-border,#dce3ea);
  color:var(--t-text,#233549);font-size:12px;transform:translateX(100%);transition:transform .3s ease}
.cex-stage.side-open .cex-sidebox{transform:none}
.cex-stage:not(.pinned).side-open .cex-sidebox{box-shadow:-10px 0 30px #0008}
.cex-side-tools{position:absolute;top:6px;right:8px;display:flex;gap:4px}
.cex-side-tools button{font-size:12px;padding:1px 7px;border-radius:5px;border:1px solid var(--t-border);background:var(--t-raised,#f5f8fb);color:var(--t-text);cursor:pointer}
.cex-stage.pinned .cex-side-tools [data-cex="pin"]{border-color:var(--t-accent);color:var(--t-accent)}
.cex-trail{display:flex;flex-wrap:wrap;align-items:center;gap:2px;margin:0 60px 8px 0;font-size:11px;color:var(--t-muted)}
.cex-crumb{border:0;background:none;padding:1px 3px;color:var(--t-accent);cursor:pointer;font-size:11px}
.cex-crumb:hover{text-decoration:underline}
.cex-sh{display:flex;gap:10px;align-items:center;margin-bottom:10px}
.cex-sh b{display:block;font-size:14px;color:var(--t-strong,var(--t-text))}
.cex-sh small{display:block;color:var(--t-muted)}
.cex-badge{flex:0 0 40px;height:40px;border-radius:50%;display:grid;place-items:center;font-weight:600;color:#fff;background:color-mix(in srgb,var(--c) 45%,#0b1722);border:2px solid var(--c)}
.cex-pill{display:inline-block;margin-top:3px;font-size:10px;padding:1px 7px;border-radius:9px;color:#fff;background:#d23a4b}
.cex-pill.amber{background:#c98400}
.cex-side table,.cex-info table{width:100%;border-collapse:collapse;margin:4px 0 8px}
.cex-side th,.cex-side td,.cex-info th,.cex-info td{text-align:left;vertical-align:top;padding:4px 6px;border-bottom:1px solid var(--t-border,#e2e7ed);background:transparent!important;color:var(--t-text)!important}
.cex-side th{width:84px;color:var(--t-muted)!important;font-weight:500}
.cex-note{white-space:pre-wrap;padding:7px 9px;border-radius:6px;background:var(--t-inset,#f5f8fb)}
.cex-list{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.cex-list li{position:relative;border:1px solid var(--t-border,#e2e7ed);border-left:3px solid var(--c);border-radius:5px;background:var(--t-surface,#fff)}
.cex-list button{display:block;width:100%;text-align:left;border:0;background:none;padding:5px 22px 5px 8px;cursor:pointer;color:var(--t-text)}
.cex-list button:hover{background:var(--t-inset,#f5f8fb)}
.cex-list b{display:block;font-weight:600;font-size:12px}
.cex-list small{display:block;color:var(--t-muted)}
.cex-list i{position:absolute;right:8px;top:50%;width:9px;height:9px;margin-top:-5px;border-radius:50%;border:2px solid #ff4d5e}
.cex-list i.amber{border-color:#ffb020}
.cex-sw{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;background:var(--c)}
.cex-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.cex-act{font-size:12px;padding:4px 10px;border-radius:6px;border:1px solid var(--t-accent,#1762a3);background:var(--t-surface,#fff);color:var(--t-accent,#1762a3);cursor:pointer;text-decoration:none}
.cex-act:hover{background:var(--t-accent,#1762a3);color:#fff}
/* How it works */
.cex-info{border:1px solid var(--t-border);border-radius:10px;background:var(--t-surface);padding:14px 18px;color:var(--t-text);font-size:13px;max-height:calc(100vh - 210px);overflow:auto}
.cex-info h3{margin:0 0 8px;font-size:15px}.cex-info h4{margin:14px 0 4px;font-size:13px}
.cex-info td:first-child{white-space:nowrap}
.cex-k{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;border:2px solid #6fd6e8;background:#0b1722;color:#fff;font-size:11px;font-weight:700;vertical-align:middle}
.cex-k.client{width:24px;height:24px;border:3px solid #ee6575}
.cex-k.hub{width:22px;height:22px;border-color:#f4d35e}
.cex-k.rec{width:15px;height:15px;font-size:10px}
.cex-k.ring{background:transparent;border-width:3px}
.cex-k.ring.red{border-color:#ff4d5e;box-shadow:0 0 5px #ff4d5e}.cex-k.ring.amber{border-color:#ffb020}
.cex-k.line{width:28px;height:3px;border:0;border-radius:2px;background:#6fd6e8;box-shadow:0 0 5px #6fd6e8}
@media(max-width:900px){.cex-sidebox{width:86%}.cex-stage.pinned.side-open .cex-canvas{right:0}}
/* v1.1 (2026-11-04, Joseph: full screen button): the Explorer fills the browser window */
.cex.cex-full{position:fixed;inset:0;z-index:2000;padding:10px 12px;background:var(--t-bg,var(--t-surface,#0b1420))}
.cex.cex-full .cex-stage{flex:1 1 auto;height:auto;min-height:0}
.cex.cex-full .cex-info{flex:1 1 auto;max-height:none;min-height:0}
/* v1.2 (2026-11-04, Joseph: the Rings and Tree views) */
.cex-modes{display:inline-flex;border:1px solid var(--t-border);border-radius:7px;overflow:hidden;margin-right:6px}
.cex-bar .cex-modes button{border:0;border-radius:0;border-right:1px solid var(--t-border)}
.cex-bar .cex-modes button:last-child{border-right:0}
.cex-bar .cex-modes button.on{background:var(--t-accent,#1762a3);color:#fff}
.cex-sg{cursor:pointer}
.cex-sg path{fill:color-mix(in srgb,var(--c) 38%,#0b1722);stroke:#050b12;stroke-width:1.2;transition:fill .15s}
.cex-sg:hover path{fill:color-mix(in srgb,var(--c) 65%,#0b1722)}
.cex-sg.on path{fill:color-mix(in srgb,var(--c) 60%,#0b1722)}
.cex-sg.sel path{stroke:#fff;stroke-width:2}
.cex-sg-red path{stroke:#ff4d5e;stroke-width:1.8}
.cex-sg-amber path{stroke:#ffb020;stroke-width:1.5}
.cex-sgt{fill:#eaf4fb;font-size:10.5px;text-anchor:middle;pointer-events:none;paint-order:stroke;stroke:#050b12;stroke-width:2.5px}
.cex-core{cursor:pointer}
.cex-core circle{fill:color-mix(in srgb,var(--c) 40%,#0b1722);stroke:var(--c);stroke-width:3;filter:drop-shadow(0 0 8px color-mix(in srgb,var(--c) 60%,transparent))}
.cex-core-l{fill:#fff;font-size:11px;font-weight:600;text-anchor:middle;pointer-events:none}
.cex-core-s{fill:#9fc3dc;font-size:9.5px;text-anchor:middle;pointer-events:none}
.cex-core .cex-ini{font-size:16px}
.cex-tr{cursor:pointer}
.cex-tr-hit{fill:transparent}
.cex-tr:hover .cex-tr-hit{fill:#ffffff0d}
.cex-tr.sel .cex-tr-hit{fill:#6fd6e826;stroke:#6fd6e8;stroke-width:1}
.cex-tr.empty{opacity:.45}
.cex-tl{fill:#d7e9f5;font-size:12px;pointer-events:none}
.cex-tl.b{font-weight:600;fill:#fff}
.cex-tm{fill:#8fb0c8;font-size:10.5px;font-weight:400}
