* { box-sizing: border-box; }
body { margin:0; background:#0b1020; color:#cdd6ff; font-family:-apple-system,"Segoe UI",Roboto,"PingFang SC",sans-serif; }
#topbar { display:flex; align-items:center; gap:14px; padding:9px 16px; background:#11183a; border-bottom:1px solid #1e294e; flex-wrap:wrap; }
#topbar h1 { font-size:15px; margin:0; color:#fff; font-weight:700; }
#stats { font-size:12px; color:#8b97c9; }
#search { background:#0b1020; border:1px solid #2a3566; color:#cdd6ff; padding:5px 9px; border-radius:6px; font-size:13px; }
#refresh { background:#2a3566; color:#cdd6ff; border:none; padding:5px 12px; border-radius:6px; cursor:pointer; font-size:13px; }
#refresh:hover { background:#36447e; }
/* 缩放控制 + 画布/节点光标 */
.zoom-ctl { display:inline-flex; align-items:center; gap:4px; background:#0b1020; border:1px solid #2a3566; border-radius:6px; padding:2px 4px; }
.zoom-ctl button { background:#2a3566; color:#cdd6ff; border:none; width:24px; height:24px; border-radius:5px; cursor:pointer; font-size:15px; line-height:1; }
.zoom-ctl button:hover { background:#36447e; }
#zoomLevel { font-size:12px; color:#8b97c9; min-width:42px; text-align:center; user-select:none; }
#graphSvg { cursor:grab; }
.node-circle { cursor:grab; }
#typeFilter { display:flex; gap:10px; flex-wrap:wrap; }
.tf { display:flex; align-items:center; gap:5px; font-size:12px; cursor:pointer; user-select:none; }
.tf input { accent-color:#7c8cff; }
#legend { display:flex; gap:12px; flex-wrap:wrap; font-size:12px; color:#9aa6d8; }
.dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:4px; vertical-align:middle; }
.dot-wrap { display:inline-flex; align-items:center; margin-left:8px; white-space:nowrap; }
.rt-badge { font-size:10px; margin-right:3px; }
.tool-btn { background:#2a3566; color:#cdd6ff; border:1px solid #3a4a82; padding:5px 12px; border-radius:6px; cursor:pointer; font-size:12px; }
.tool-btn:hover { background:#36447e; }
.gov-badge { display:inline-block; background:#ef4444; color:#fff; border-radius:10px; font-size:10px; font-weight:700; padding:0 6px; margin-left:5px; line-height:16px; vertical-align:middle; }
/* 节点 hover 速览浮层 */
.node-tip { position:absolute; display:none; pointer-events:none; background:#16203f; border:1px solid #3a4a82; border-radius:7px; padding:7px 10px; font-size:12px; color:#cdd6ff; z-index:40; box-shadow:0 6px 18px rgba(0,0,0,.45); max-width:260px; line-height:1.5; }
.node-tip b { color:#fff; }
.node-tip .nt-type { display:inline-block; margin-left:6px; font-size:10px; color:#7e8cc0; }
.node-tip .nt-rt { color:#9fb0e8; }
/* 胶囊内部子图 */
.cap-inner { margin-top:6px; }
.cap-inner-empty { color:#8b97c8; font-size:12px; padding:6px 0; }
.cap-legend { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; font-size:10px; color:#9aa6d8; }
.cap-legend span { display:inline-flex; align-items:center; gap:3px; }
.cap-legend i { width:9px; height:9px; border-radius:2px; display:inline-block; }
.cap-code-tip { position:fixed; display:none; z-index:60; background:#0a0f24; border:1px solid #3a4a82; border-radius:6px; padding:8px 10px; max-width:460px; max-height:320px; overflow:auto; box-shadow:0 8px 22px rgba(0,0,0,.5); }
.cap-code-tip b { color:#fff; font-size:12px; }
.cap-code-tip pre { margin:6px 0 0; font-size:11px; line-height:1.45; color:#cfe0ff; white-space:pre-wrap; word-break:break-all; }
.gov-toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px); background:#16203f; color:#cdd6ff; border:1px solid #3a4a82; padding:10px 18px; border-radius:8px; font-size:13px; opacity:0; pointer-events:none; transition:opacity .25s, transform .25s; z-index:50; box-shadow:0 6px 20px rgba(0,0,0,.4); }
.gov-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
/* 治理清单侧栏 */
.gov-panel { position:fixed; top:0; right:0; width:340px; height:100vh; background:#0e1430; border-left:1px solid #2a3566; box-shadow:-8px 0 24px rgba(0,0,0,.45); transform:translateX(100%); transition:transform .28s ease; z-index:60; display:flex; flex-direction:column; }
.gov-panel.open { transform:translateX(0); }
.gov-head { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid #1e294e; font-size:14px; font-weight:700; color:#fff; }
.gov-x { background:none; border:none; color:#8b97c9; font-size:20px; cursor:pointer; line-height:1; padding:0 4px; }
.gov-x:hover { color:#fff; }
.gov-body { flex:1; overflow:auto; padding:10px 12px 30px; }
.gov-sum { font-size:12px; color:#9aa6d8; margin-bottom:10px; padding-bottom:8px; border-bottom:1px dashed #1e294e; }
.gov-sum b { color:#fbbf24; font-size:13px; }
.gov-grp { margin:12px 0 4px; font-size:12px; font-weight:700; color:#7c8cff; letter-spacing:.5px; }
.gov-item { padding:6px 8px; margin:3px 0; border-radius:6px; background:#141c3c; border:1px solid #1e294e; cursor:pointer; display:flex; flex-direction:column; gap:2px; }
.gov-item:hover { background:#1c2750; border-color:#3a4a82; }
.gov-item b { font-size:12px; color:#dfe6ff; }
.gov-item em { font-size:11px; font-style:normal; color:#f5a9c4; }
.gov-item i { font-size:11px; color:#8b97c8; font-style:normal; }
.gov-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:5px; vertical-align:middle; }
.gov-item b:first-of-type { display:inline; }
.gov-empty { color:#4ade80; font-size:13px; padding:14px 0; text-align:center; }
.gov-rec { margin-top:10px; }
.gov-rec-badge { display:inline-block; background:#3a1f2e; color:#fca5c0; border:1px solid #6b2b45; border-radius:4px; padding:1px 7px; font-size:11px; font-weight:700; }
/* 侧栏头/工具栏/脚注 */
.gov-head-btns { display:flex; gap:6px; align-items:center; }
.gov-tbtn { background:#1b2552; color:#cdd6ff; border:1px solid #2a3566; border-radius:5px; font-size:11px; padding:3px 7px; cursor:pointer; }
.gov-tbtn:hover { background:#243168; }
.gov-tbtn.on { background:#3b2a66; border-color:#6b4bb0; color:#d8c8ff; }
.gov-tbtn.primary { background:#2563eb; border-color:#3b82f6; color:#fff; }
.gov-tbtn.primary:hover { background:#1d4ed8; }
.gov-toolbar { display:flex; gap:6px; padding:8px 12px; border-bottom:1px solid #1e294e; }
.gov-search { flex:1; background:#0b1230; border:1px solid #2a3566; color:#dfe6ff; border-radius:5px; padding:5px 8px; font-size:12px; outline:none; }
.gov-search:focus { border-color:#3b82f6; }
.gov-foot { display:flex; align-items:center; justify-content:space-between; padding:8px 12px; border-top:1px solid #1e294e; }
.gov-selall { font-size:11px; color:#9aa6d8; display:flex; align-items:center; gap:4px; cursor:pointer; }
.gov-selall input { accent-color:#3b82f6; }
/* 分组折叠 */
.gov-group.collapsed .gov-grp-items { display:none; }
.gov-grp { display:flex; align-items:center; gap:6px; margin:12px 0 4px; font-size:12px; font-weight:700; color:#7c8cff; letter-spacing:.5px; cursor:pointer; user-select:none; }
.gov-grp-toggle { font-size:10px; color:#5a6bb0; }
/* 条目内勾选框 */
.gov-item { padding:6px 8px; margin:3px 0; border-radius:6px; background:#141c3c; border:1px solid #1e294e; cursor:pointer; display:flex; align-items:flex-start; gap:7px; }
.gov-item:hover { background:#1c2750; border-color:#3a4a82; }
.gov-cb { margin-top:2px; accent-color:#3b82f6; flex:none; }
.gov-item-main { display:flex; flex-direction:column; gap:2px; min-width:0; }
.gov-item-main b { font-size:12px; color:#dfe6ff; }
.gov-item-main em { font-size:11px; font-style:normal; color:#f5a9c4; }
.gov-item-main i { font-size:11px; font-style:normal; color:#8b97c8; }
.gov-newbadge { display:inline-block; background:#143a1f; color:#4ade80; border:1px solid #2f7d4a; border-radius:3px; font-size:9px; padding:0 4px; margin-left:5px; vertical-align:middle; }
.gov-sum .gov-new { color:#4ade80; }
.gov-sum .gov-fix { color:#fbbf24; }
#main { display:flex; height:calc(100vh - 54px); }
#graphWrap { flex:1; position:relative; overflow:hidden; }
#graphSvg { width:100%; height:100%; display:block; }
.node-circle { cursor:pointer; }
.edge-line { stroke-opacity:.45; }
.edge-label { fill:#7e8cc0; font-size:10px; pointer-events:none; }
#detail { width:330px; background:#0e1430; border-left:1px solid #1e294e; padding:14px; overflow:auto; font-size:13px; }
#detail h4 { margin:0 0 8px; font-size:15px; }
.kv { font-size:12px; color:#aab6e8; line-height:1.7; }
.kv b { color:#dfe6ff; }
.kv.sub { padding-left:10px; border-left:2px solid #2a3566; margin-left:2px; color:#8b97c8; }
.mech-files { display:flex; flex-wrap:wrap; gap:6px; margin:4px 0 2px 0; }
.mech-files code { display:inline-block; background:#0e1530; border:1px solid #2a3566; border-radius:4px; padding:2px 6px; font-size:11px; color:#9fe6c5; font-family:ui-monospace,Menlo,Consolas,monospace; cursor:pointer; }
.mech-files code:hover { border-color:#4f63b5; background:#16204a; }
.mech-files code.miss { color:#fca5a5; border-color:#7f1d1d; background:#2a1414; cursor:help; }
.mech-files code.copied { color:#86efac; border-color:#16a34a; background:#0e2a18; }
.hint { color:#6b76a8; font-size:11px; }
.concept-link { color:#fbbf24; cursor:pointer; border-bottom:1px dotted #fbbf24; }
.concept-link:hover { color:#fde68a; }
.rel { font-size:12px; color:#9fb0e8; margin:3px 0; }
.rel[data-target] { padding:2px 4px; border-radius:4px; }
.rel[data-target]:hover { background:#1c2750; color:#fff; }
.rel b { color:#cdd6ff; }
.tag { display:inline-block; background:#1c2750; border:1px solid #2a3566; border-radius:4px; padding:1px 6px; margin:2px 4px 2px 0; font-size:11px; }
.health-up { color:#4ade80; } .health-down { color:#f87171; } .health-unknown { color:#fbbf24; }
.runtime-legend { font-size:11px; color:#7e8cc0; display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.runtime-legend span { display:inline-flex; align-items:center; gap:4px; }
.runtime-legend i { width:9px; height:9px; border-radius:50%; display:inline-block; }
/* 运行态总览 chips */
.runtime-overview { display:flex; gap:8px; flex-wrap:wrap; width:100%; margin-top:2px; }
.rt-chip { display:inline-flex; align-items:baseline; gap:5px; padding:3px 9px; border:1px solid #2a3566; border-radius:14px; font-size:11px; background:#0e1430; white-space:nowrap; }
.rt-chip b { font-weight:600; opacity:.85; font-size:10px; }
.rt-chip i { font-style:normal; font-weight:700; font-size:13px; }
.rt-chip em { font-style:normal; opacity:.7; font-size:10px; margin-left:2px; }
.detail-btn { margin-top:10px; background:#2a3566; color:#cdd6ff; border:1px solid #3a4a82; padding:5px 12px; border-radius:6px; cursor:pointer; font-size:12px; }
.detail-btn:hover { background:#36447e; }
#resetView { background:#2a3566; color:#cdd6ff; border:1px solid #3a4a82; padding:5px 12px; border-radius:6px; cursor:pointer; font-size:13px; }
#resetView:hover { background:#36447e; }
.empty { color:#6b76a8; font-size:13px; padding:20px; }

/* 实时执行底部面板 */
.exec-dock { position:fixed; left:0; right:0; bottom:0; height:300px; background:#0a1024; border-top:1px solid #27325e; display:flex; flex-direction:column; z-index:32; box-shadow:0 -6px 20px rgba(0,0,0,.45); }
.exec-dock-head { display:flex; align-items:center; gap:14px; padding:7px 14px; border-bottom:1px solid #1d2747; background:#0e1530; }
.exec-dock-title { font-size:13px; font-weight:700; color:#cdd6ff; }
.exec-tabs { display:flex; gap:4px; }
.exec-tab { font-size:12px; color:#8b97c8; padding:3px 10px; border-radius:5px; cursor:pointer; }
.exec-tab:hover { background:#1a2347; color:#cdd6ff; }
.exec-tab.active { background:#27407f; color:#fff; }
.exec-dock-meta { font-size:11px; color:#7e8cc0; margin-left:auto; }
.exec-dock-close { background:none; border:none; color:#8b97c8; font-size:18px; cursor:pointer; line-height:1; }
.exec-dock-close:hover { color:#fff; }
.exec-dock-body { flex:1; overflow:auto; padding:10px 14px; }
.exec-pane { height:100%; }
.exec-feed-bar { display:flex; gap:8px; align-items:center; margin-bottom:8px; flex-wrap:wrap; }
.exec-feed-bar select, .exec-feed-bar input { background:#0e1530; border:1px solid #2a3566; color:#cdd6ff; border-radius:5px; padding:4px 7px; font-size:12px; }
.exec-feed-bar input#execQInp { width:160px; }
.exec-feed-bar input#execAgentInp { width:130px; }
.exec-auto { font-size:11px; color:#8b97c8; }
.detail-btn.sm { margin-top:0; padding:2px 8px; font-size:11px; margin-left:6px; }
.exec-feed-rows { font-size:12px; }
.exec-row { display:grid; grid-template-columns:150px 110px 150px 120px 52px 64px 1fr; gap:8px; padding:3px 6px; border-bottom:1px solid #141d3a; align-items:center; }
.exec-row:hover { background:#121a38; }
.exec-row .exec-time { color:#7e8cc0; font-variant-numeric:tabular-nums; }
.exec-row .exec-ws, .exec-row .exec-agent { color:#9fb0e8; cursor:pointer; }
.exec-row .exec-ws:hover, .exec-row .exec-agent:hover { color:#fff; text-decoration:underline; }
.exec-row .exec-fw { color:#b6c2f0; }
.exec-row .exec-task { color:#8b97c8; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.exec-ok { color:#4ade80; font-weight:600; }
.exec-fail { color:#f87171; font-weight:600; }
.exec-loading, .exec-empty { color:#7e8cc0; font-size:12px; padding:14px; }
/* 运行时拓扑条 */
.topo-legend { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:10px; font-size:11px; color:#9aa6d8; }
.topo-switch { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.topo-switch-label { font-size:12px; color:#8b97c9; }
.topo-switch select { background:#0e1530; border:1px solid #2a3566; color:#cdd6ff; border-radius:5px; padding:4px 7px; font-size:12px; }
.exec-topo-body { height:calc(100% - 40px); overflow:auto; }
.topo-legend span { display:inline-flex; align-items:center; gap:4px; }
.topo-legend i { width:10px; height:10px; border-radius:2px; display:inline-block; }
.topo-row { display:flex; align-items:center; gap:12px; margin-bottom:8px; }
.topo-ws { width:150px; flex:none; font-size:12px; color:#cdd6ff; cursor:pointer; }
.topo-ws em { font-style:normal; color:#7e8cc0; margin-left:4px; }
.topo-ws:hover { color:#fff; text-decoration:underline; }
.topo-bars { flex:1; display:flex; flex-direction:column; gap:3px; }
.topo-bar { height:14px; min-width:2px; border-radius:3px; font-size:10px; color:#06122e; line-height:14px; padding-left:5px; overflow:hidden; white-space:nowrap; }
/* 概览卡片 */
.ov-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:10px; }
.ov-card { background:#0e1530; border:1px solid #2a3566; border-left-width:3px; border-radius:8px; padding:10px 12px; }
.ov-card b { display:block; font-size:11px; color:#8b97c8; font-weight:600; }
.ov-card i { display:block; font-size:20px; font-style:normal; font-weight:700; margin-top:3px; }
.ov-card em { display:block; font-size:10px; color:#6b76a8; font-style:normal; margin-top:2px; }
/* 详情面板：实体执行下钻 */
.ent-exec-host { margin-top:4px; }
.ent-exec-sum { font-size:12px; color:#9fb0e8; margin-bottom:4px; }
.ent-exec-sum b { color:#cdd6ff; }
.ent-exec-rows { font-size:11px; max-height:200px; overflow:auto; border:1px solid #1d2747; border-radius:6px; }
.ent-exec-row { display:grid; grid-template-columns:140px 120px 50px 56px 1fr; gap:6px; padding:2px 6px; border-bottom:1px solid #141d3a; align-items:center; }
.ent-exec-row .exec-task { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#8b97c8; }

/* ── 流转 tab（生命周期五层，P2）────────────────────────────────── */
.flow-meta { color:#7e8cc0; font-size:11px; margin-bottom:8px; }
.flow-layer { display:flex; align-items:center; gap:8px; margin:3px 0; }
.flow-name { width:86px; color:#cdd6ff; font-size:12px; text-align:right; flex:none; }
.flow-bar-wrap { flex:1; background:#0b1020; border-radius:4px; overflow:hidden; }
.flow-bar { height:18px; border-radius:4px; display:flex; align-items:center; justify-content:flex-end; padding:0 6px; min-width:30px; }
.flow-bar span { font-size:11px; color:#0b1020; font-weight:700; }
.flow-src { width:230px; color:#7e8cc0; font-size:10.5px; flex:none; }
.flow-arrow { color:#454e78; font-size:11px; margin-left:86px; line-height:10px; }
.flow-fw-title { margin-top:10px; color:#8b97c9; font-size:12px; }
.flow-fw { margin-top:4px; display:flex; flex-wrap:wrap; gap:8px; }
.flow-fw span { color:#cdd6ff; font-size:11px; display:inline-flex; align-items:center; gap:4px; }
.flow-fw i { width:8px; height:8px; border-radius:2px; display:inline-block; }
