.tp-map-tools{display:flex;flex-wrap:wrap;align-items:end;gap:12px 16px;padding:12px 18px;background:var(--tp-panel);border-bottom:1px solid var(--line)}
.tp-map-tools .tp-map-controls{position:static;display:flex;align-items:end;flex-wrap:wrap;gap:12px;padding:0;background:none;z-index:auto}.tp-zoom-group{display:flex;gap:4px}.tp-map-tools .tp-map-controls .button{width:36px;min-width:36px;height:36px;min-height:36px;padding:5px}
.tp-map-tools .tp-map-root,.tv-controls label{display:grid;gap:5px;margin:0;font-size:11px;color:var(--muted)}.tp-map-tools .tp-map-root select,.tv-controls select{box-sizing:border-box;min-width:0;width:100%;height:36px;padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface-solid);color:var(--text);font:inherit;font-size:12px}.tp-map-tools .tp-map-root{width:170px}
.tv-controls{display:flex;align-items:end;flex-wrap:wrap;gap:12px;padding:0}.tv-layer-field{width:110px}.tv-vid-field{width:150px}.tv-origin-field{width:175px}.tv-controls .tv-refresh{width:36px;min-width:36px;height:36px;min-height:36px;padding:8px}.tv-refresh svg{width:18px;height:18px}
.tv-controls .tv-check{display:flex;align-items:center;gap:8px;min-height:36px;cursor:pointer;white-space:nowrap}.tv-check input{width:16px;height:16px;margin:0;accent-color:var(--accent)}
.tv-context{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;flex-basis:100%;min-width:0;color:var(--muted);font-size:11px;line-height:1.5}.tv-context .form-error{margin:0}.tv-legend{display:flex;flex-wrap:wrap;gap:12px}.tv-key{display:inline-flex;align-items:center;gap:6px}.tv-key i{width:18px;border-top:3px solid var(--tv-color)}
.tv-help{min-width:0}.tv-help summary{cursor:pointer;color:var(--muted);text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}.tv-help[open]{flex-basis:100%}.tv-help>div{max-width:1000px;padding-top:4px}.tv-help p{margin:5px 0}.tv-help summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.tv-configured{--tv-color:var(--accent)}.tv-unknown{--tv-color:var(--warning)}.tv-conflict{--tv-color:var(--danger)}.tv-mixed{--tv-color:var(--cyan)}.tv-excluded,.tv-outside{--tv-color:var(--muted)}
.tv-key.tv-unknown i,.tv-key.tv-outside i{border-top-style:dashed}
.tp-map-stage path.tv-configured{stroke:var(--accent);stroke-width:4;opacity:1}.tp-map-stage path.tv-unknown{stroke:var(--warning);stroke-dasharray:6 5;opacity:.8}.tp-map-stage path.tv-conflict{stroke:var(--danger);stroke-width:4;opacity:1}.tp-map-stage path.tv-mixed{stroke:var(--cyan);stroke-width:3;stroke-dasharray:8 3;opacity:1}.tp-map-stage path.tv-excluded,.tp-map-stage path.tv-outside{stroke:var(--muted);opacity:.2;stroke-dasharray:3 5}
.tp-map-stage circle[class*="tv-"]{fill:var(--tv-color)}.tp-link-port-label.tv-route[class*="tv-"]{border-color:var(--tv-color)}.tp-link-port-label.tv-excluded,.tp-link-port-label.tv-outside{opacity:.55}.tp-link-port-label.tv-route:focus-visible,.tp-link-port-label.tv-route:hover{opacity:1}
.tp-map-node.tv-node-path{border:2px solid var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 12%,transparent)}.tp-map-node.tv-node-member{border-color:var(--accent)}.tp-map-node.tv-node-muted{opacity:.65}.tp-map-node.tv-node-muted:hover,.tp-map-node.tv-node-muted:focus-visible{opacity:1}
.tp-map-node.tp-client-group.tv-node-member{box-shadow:0 0 0 3px var(--accent-soft)}
.tv-member-tag{border:1px solid var(--line);border-radius:12px;padding:2px 7px;color:var(--accent);font-size:11px;white-space:nowrap}
.tv-detail{padding:10px 0 20px;border-bottom:1px solid var(--line)}.tv-detail h3{overflow-wrap:anywhere}.tv-status{border-left:3px solid var(--tv-color);padding-left:10px}.tv-endpoints{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.tv-endpoints>div{padding:14px;background:var(--surface-solid);border:1px solid var(--line);border-radius:10px}.tv-endpoints small{display:block;color:var(--muted)}.tv-endpoints button{margin-top:10px}
@media(max-width:650px){.tp-map-tools{padding:12px;gap:12px}.tp-map-tools .tp-map-controls{width:100%}.tp-map-tools .tp-map-root{flex:1;min-width:120px}.tv-controls{width:100%;gap:10px}.tv-controls label:not(.tv-check){min-width:0;flex:1 1 120px}.tv-controls .tv-check{white-space:normal}.tv-endpoints{grid-template-columns:1fr}}

.shell-main:has(.tp-map-workspace){display:flex;flex-direction:column;height:100dvh;min-height:0}
.shell-main:has(.tp-map-workspace)>.topbar,.shell-main:has(.tp-map-workspace)>.settings-incident-bar{flex:none}
#workspace:has(.tp-map-workspace){display:flex;flex:1;flex-direction:column;min-height:0;padding-block-start:12px;overflow:auto;overflow-anchor:none}
.tp-map-workspace{display:flex;flex:1;flex-direction:column;max-width:none;margin:0}
.tp-topbar{justify-content:flex-start;gap:7px 10px;margin-bottom:8px}
.tp-topbar .tp-site-picker{width:fit-content;min-width:145px;max-width:min(260px,100%)}
.tp-topbar .tp-site-picker>summary{min-height:34px;gap:9px;padding:5px 9px}
.tp-topbar .tp-site-picker>summary svg{width:16px}
.tp-topbar .tp-site-picker>summary strong{max-width:130px;font-size:12px}
.tp-topbar .tp-site-current-count{white-space:nowrap;font-size:11px;color:var(--muted)}
.tp-topbar .tp-site-popover{min-width:min(240px,calc(100vw - 32px))}
.tp-topbar>.physical-tabs{margin:0;padding:2px;min-height:0;gap:2px;max-width:100%}
.tp-topbar>.physical-tabs button{min-height:30px;padding:5px 9px;font-size:12px}
.tp-topbar .tp-toolbar{margin:0;margin-inline-start:auto}
.tp-topbar .tp-toolbar .button{min-height:34px;padding:5px 8px}
.tp-summary-compact{display:flex;flex-wrap:wrap;gap:5px;margin:0}
.tp-summary-compact .tp-stat{min-height:29px;padding:3px 8px;gap:5px;border-radius:8px;font-size:11px}
.tp-summary-compact .tp-stat>span:nth-child(2){display:flex;align-items:center;gap:5px}
.tp-summary-compact .tp-stat b{margin:0;font-size:12px;line-height:1}
.tp-summary-compact .tp-stat .tp-orb{width:16px;height:16px;font-size:11px;box-shadow:none}
.tp-summary-compact .tp-chevron{display:none}
.tp-summary-compact .tp-stat:hover,.tp-summary-compact .tp-stat.selected{transform:none}
.tp-map{display:flex;flex:1;flex-direction:column;overflow:visible;background-image:none}
.tp-map-tools{align-items:center;gap:6px 10px;padding:6px 9px;border-radius:inherit;border-end-start-radius:0;border-end-end-radius:0}
.tp-map-tools .button,.tp-display-settings>summary{min-height:32px;padding:4px 9px;font-size:12px}
.tp-map-tools .tp-zoom-group{align-items:center}
.tp-map-tools .tp-zoom-group .button{min-width:30px;padding-inline:6px}
.tp-map-tools:not(:has(>[data-action=tp-edit-map]))>[data-action=tp-refresh]{margin-inline-start:auto}
.tp-map-scale{min-width:38px;text-align:center;color:var(--muted);font-variant-numeric:tabular-nums}
.tp-display-settings{position:relative}
.tp-display-settings>summary{display:flex;align-items:center;gap:7px;list-style:none;cursor:pointer;border:1px solid var(--line);border-radius:8px;background:var(--tp-raised);color:var(--text)}
.tp-display-settings>summary::-webkit-details-marker{display:none}
.tp-display-popover{position:absolute;z-index:20;inset:calc(100% + 5px) auto auto 0;display:grid;gap:10px;width:min(420px,calc(100vw - 40px));max-height:60dvh;overflow:auto;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-solid);box-shadow:0 12px 32px #0004}
.tp-display-popover .tp-map-root{width:100%;max-width:none}
.tp-display-popover .tp-map-root select{max-width:none}
.tp-display-popover .tp-client-controls{min-height:24px}
.tp-display-popover .tp-legend{justify-content:flex-start;gap:8px}
.tp-layer-label{color:var(--accent);font-size:12px}
.tp-map-scroll{position:relative;flex:1;overflow:clip;max-height:none;min-height:340px;padding:0;border-end-start-radius:11px;border-end-end-radius:11px;background-image:radial-gradient(var(--line) .65px,transparent .65px);background-size:18px 18px;touch-action:none;user-select:none;cursor:grab}
.tp-map-scroll.is-panning,.te-view.is-panning{cursor:grabbing}
.tp-map-scroll:focus-visible,.te-view:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.tp-map-stage{position:absolute;inset:0 auto auto 0}
.tp-map-empty{position:absolute;top:18px;left:12px;margin:0;pointer-events:none}
.tp-board-details{margin-top:8px;color:var(--muted)}
.tp-board-details>summary{width:fit-content;padding:6px 2px;cursor:pointer}
@media(max-width:620px){.tp-topbar .tp-site-current-count{display:none}.tp-topbar>.physical-tabs button{padding-inline:5px;font-size:11px}.tp-display-popover{inset-inline-start:-100px}.tp-map-scroll{min-height:315px}}
