.topology-panel { min-width: 0; }
.topology-panel .panel-head h2 { margin-bottom: 3px; }
.topology-panel .panel-head .muted { font-size: 12px; }
.topology-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; }
.topology-toolbar > label { min-width: 170px; }
.topology-toolbar .topology-search { flex: 1; max-width: 340px; }
.topology-toolbar .topology-toggle { min-width: auto; display: flex; gap: 7px; align-items: center; min-height: 38px; font-weight: 400; color: var(--text); }
.topology-toggle input { width: 15px; height: 15px; min-height: 0; accent-color: var(--brand); }
.topology-stats { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; padding: 17px 0 13px; color: var(--muted); font-size: 12px; }
.topology-stats strong { font-size: 20px; font-weight: 650; color: var(--text); }
.topology-scope { color: var(--brand); }
.topology-workspace { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.topology-workspace.has-inspector { grid-template-columns: minmax(0, 1fr) 300px; }
.topology-stage { position: relative; min-width: 0; height: clamp(540px, 68vh, 860px); background: radial-gradient(circle, #dbe4e8 .8px, transparent .9px) 0 0 / 22px 22px, #f8fafb; overflow: hidden; }
.topology-map { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; user-select: none; }
.topology-map.is-dragging { cursor: grabbing; }
.topology-zoom-tools { position: absolute; top: 14px; left: 14px; z-index: 1; display: flex; align-items: center; gap: 2px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 3px 12px #263d4710; }
.topology-zoom-tools button { border: 0; padding: 5px 10px; }
.topology-zoom-tools button:hover { background: #eef6f4; }
.topology-zoom-tools span { padding: 0 7px; min-width: 49px; text-align: center; font-size: 12px; color: var(--muted); }
.topology-canvas-hint { position: absolute; bottom: 12px; left: 14px; right: 14px; pointer-events: none; font-size: 11px; color: #71818e; text-align: center; }
.topology-relation { cursor: pointer; outline: none; }
.topology-relation-line { fill: none; stroke: #a8bcc5; stroke-width: 1.8; vector-effect: non-scaling-stroke; pointer-events: none; }
.topology-relation-hit { fill: none; stroke: transparent; stroke-width: 16; vector-effect: non-scaling-stroke; }
.topology-relation.is-muted { opacity: .14; }
.topology-relation.is-related .topology-relation-line { stroke: #4b958d; stroke-width: 2.5; }
.topology-relation:hover .topology-relation-line, .topology-relation:focus .topology-relation-line, .topology-relation.is-selected .topology-relation-line { stroke: #0f766e; stroke-width: 3.5; }
.topology-relation.is-disabled .topology-relation-line { stroke-dasharray: 5 5; }
.topology-relation-count rect { fill: #0f766e; stroke: #fff; stroke-width: 2; }
.topology-relation-count text { fill: #fff; font-size: 11px; pointer-events: none; }
.topology-device { cursor: pointer; outline: none; }
.topology-device.is-muted { opacity: .25; }
.topology-device-card { fill: #fff; stroke: #c0cfd5; stroke-width: 1.4; }
.topology-device.is-external .topology-device-card { fill: #fffaf0; stroke: #dccba5; }
.topology-device:hover .topology-device-card, .topology-device:focus .topology-device-card, .topology-device.is-selected .topology-device-card { stroke: #0f766e; stroke-width: 2.5; fill: #f1fbf8; }
.topology-device-icon { fill: #e8f3f1; stroke: #76aaa3; }
.topology-device-icon-line { fill: none; stroke: #377f75; stroke-width: 1.4; }
.topology-device-title { font: 600 14px -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; fill: #20353e; }
.topology-device-subtitle { font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; fill: #71828a; }
.topology-inspector { padding: 16px; min-width: 0; max-height: clamp(540px, 68vh, 860px); overflow: auto; border-left: 1px solid var(--line); background: #fff; overflow-wrap: anywhere; }
.topology-inspector-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.topology-inspector-head button { border: 0; padding: 0 6px; font-size: 22px; }
.topology-inspector h3 { font-size: 17px; line-height: 1.5; margin: 15px 0 6px; }
.topology-inspector h4 { margin: 20px 0 10px; font-size: 12px; }
.topology-inspector p { font-size: 12px; }
.topology-inspector details { margin-top: 13px; }
.topology-inspector summary { cursor: pointer; font-size: 12px; }
.topology-between { display: block; color: #95aaa9; font-size: 16px; line-height: 1.2; }
.topology-neighbor { display: grid; gap: 4px; width: 100%; margin: 7px 0; text-align: left; white-space: normal; background: #f9fbfb; font-size: 12px; }
.topology-neighbor span { font-size: 11px; color: var(--muted); }
.topology-protocols { display: flex; gap: 5px; flex-wrap: wrap; }
.topology-protocols span { background: #edf5f3; color: #347a6f; padding: 3px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.topology-interface-detail { padding: 12px 0; border-top: 1px solid #e8edef; }
.topology-interface-detail summary span { display: block; margin: 5px 0 0 13px; color: var(--muted); font-size: 11px; }
.topology-interface-detail > .mono { font-size: 11px; }
.topology-route-detail { display: grid; gap: 3px; padding: 8px 0; border-bottom: 1px solid #eef2f4; font-size: 11px; }
.topology-route-detail span { color: var(--muted); }
.topology-footnote { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; padding: 12px 0; font-size: 11px; color: var(--muted); }
.topology-footnote i { display: inline-block; width: 17px; border-top: 2px solid #a8bcc5; vertical-align: middle; margin-right: 4px; }
.topology-footnote i.dashed { border-top-style: dashed; margin-left: 12px; }
.topology-text-button { border: 0; background: transparent; color: var(--brand); padding: 0 4px; font-size: inherit; }
.topology-disclosure { margin-top: 8px; border-top: 1px solid var(--line); padding: 14px 0 2px; }
.topology-disclosure > summary { cursor: pointer; color: #516571; font-size: 12px; }
.topology-disclosure > p { font-size: 12px; }
.topology-detail-toolbar { display: flex; gap: 12px; margin-top: 16px; }
.topology-detail-toolbar input { max-width: 450px; }
.topology-pagination { display: flex; justify-content: end; align-items: center; gap: 10px; padding: 12px 0; font-size: 12px; }
.topology-empty { height: 100%; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; color: var(--muted); }
.topology-empty span { font-size: 12px; }
.topology-expanded { position: fixed; inset: 12px; z-index: 90; overflow: auto; box-shadow: 0 0 0 30px #162e3c99; }
.topology-expanded .topology-stage, .topology-expanded .topology-inspector { height: calc(100vh - 240px); max-height: none; min-height: 400px; }
@media (max-width: 1050px) { .topology-workspace.has-inspector { grid-template-columns: minmax(0, 1fr); } .topology-inspector { border-left: 0; border-top: 1px solid var(--line); max-height: 430px; } }
@media (max-width: 650px) { .topology-toolbar > label { min-width: 120px; flex: 1; } .topology-toolbar .topology-toggle { flex: 0 0 auto; } .topology-toolbar .topology-search { max-width: none; flex-basis: 100%; } .topology-stage { height: 480px; } .topology-expanded { inset: 0; } .topology-detail-toolbar { flex-wrap: wrap; } .topology-panel .panel-head { align-items: start; flex-wrap: wrap; } .topology-canvas-hint { font-size: 10px; } }
