:root{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  color:#f4f5ff;background:#0b0e19;--border:#2b314c;--muted:#9ba5c8;
  --purple:#a38bff;--blue:#70d7fa;--gold:#edbf75;--panel:#121727;
}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;font-size:15px}button,select,a{font:inherit}
button,a{cursor:pointer}button{background:#20253b;color:#e7e9fa;border:1px solid #3b456a;border-radius:7px;padding:7px 9px}
button:hover:not(:disabled){border-color:#a38bff;color:white}button:disabled{opacity:.42;cursor:default}
a{color:#bcaaff;text-decoration:none}header{padding:10px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#101423;border-bottom:1px solid var(--border)}
.brand{display:flex;align-items:center;gap:10px}.brand-icon{font-size:20px;color:var(--purple);background:#24213c;border:1px solid #564b81;border-radius:8px;padding:5px 8px}
.brand strong{display:block;font-size:17px}.brand small{display:block;color:var(--muted);font-size:12px}
#mode-banner{font-size:12px;padding:6px 10px;border-radius:16px;border:1px solid #685136;background:#342719;color:#ffdb9f}
.intro{padding:12px 18px 8px;display:flex;justify-content:space-between;align-items:center;gap:12px}
h1{font-size:20px;font-weight:600;margin:0 0 4px}.intro p{margin:0;color:var(--muted);font-size:14px;line-height:1.45}
.intro a{font-size:13px;border:1px solid #514773;padding:7px 10px;border-radius:7px}.status{margin:6px 18px 12px;padding:9px 11px;background:#181d30;border:1px solid var(--border);border-radius:8px;color:#c3cced;font-size:14px;line-height:1.45}
.status.error{background:#39282a;border-color:#745051;color:#ffd7be}.workspace{display:grid;grid-template-columns:190px minmax(270px,1fr) 230px;gap:8px;margin:0 12px 14px;align-items:stretch}
.config,.detail,.graph-panel{background:var(--panel);border:1px solid var(--border);border-radius:8px;min-width:0}.config,.detail{padding:12px}
.section-title{display:flex;align-items:center;gap:7px;margin:0 0 9px}.section-title span{font-size:10px;color:#bba9ff;border:1px solid #564979;border-radius:5px;padding:2px 4px}h2{font-size:15px;margin:0}
.config label{display:block;color:#c6cdec;font-size:13px;margin-top:9px}select{display:block;width:100%;background:#1d2339;color:#e6e9f7;border:1px solid #3d486a;border-radius:7px;padding:7px;margin-top:5px;outline:none}
.primary{width:100%;background:linear-gradient(120deg,#7958c9,#565acc);border-color:#9781da;font-size:14px}.secondary{font-size:13px;margin-top:8px;width:100%}
.config>.section-title:not(:first-child){margin-top:14px}.check-list{margin:6px 0 11px;max-height:145px;overflow:auto}
.check-list label{display:flex;align-items:flex-start;gap:7px;font-size:13px;line-height:1.35;margin:8px 0}.check-list input{accent-color:#a38bff;margin-top:2px}
.check-list small{display:block;color:var(--muted);font-size:11px}.muted{color:var(--muted);font-size:13px;line-height:1.5}.footnote{font-size:12px;color:#7582ac;line-height:1.45;margin:12px 0 0}
.allow-settings{border-top:1px solid var(--border);margin-top:13px;padding-top:10px}.allow-settings summary{cursor:pointer;color:#bbaaff;font-size:13px}.page-buttons{display:flex;gap:6px}.page-buttons button{width:auto;flex:1}
#component-state,#page-state{margin:8px 0 0;font-size:13px}.graph-toolbar{padding:11px 12px;display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid var(--border);flex-wrap:wrap}
.graph-toolbar small{color:var(--muted);font-size:12px;display:block;margin-top:3px}.graph-controls{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.graph-controls button{font-size:13px;padding:6px 7px}.graph-controls span{font-size:11px;color:var(--muted);min-width:33px;text-align:center}
.legend{display:flex;flex-wrap:wrap;gap:10px;padding:8px 12px;font-size:12px;color:var(--muted)}.legend span{display:flex;align-items:center;gap:5px}.legend i{display:block;height:7px;width:7px;border-radius:50%}.purple{background:var(--purple)}.blue{background:var(--blue)}.gold{background:var(--gold)}
.graph-scroller{background:#0d1221;overflow:auto;min-height:520px;max-height:calc(100vh - 210px);border-top:1px solid #232a40}.graph-scroller svg{display:none;vertical-align:top}.empty-state{text-align:center;padding:95px 14px}.empty-icon{color:var(--purple);font-size:38px}.empty-state h3{font-size:17px;font-weight:500}.empty-state p{font-size:14px;color:var(--muted);line-height:1.7}
.graph-scroller{scrollbar-color:#8798bd #171e30}.graph-scroller::-webkit-scrollbar{width:12px;height:12px}.graph-scroller::-webkit-scrollbar-track{background:#171e30}.graph-scroller::-webkit-scrollbar-thumb{background:#8798bd;border:3px solid #171e30;border-radius:8px}
.graph-footer{display:flex;justify-content:space-between;gap:10px;padding:9px 12px;font-size:12px;color:#8d99be;border-top:1px solid var(--border)}
.node{cursor:pointer;outline:none}.node rect{fill:#192338;stroke:#506885;stroke-width:1.2}.node text{fill:#e8f4ff;pointer-events:none}.node.origin rect{fill:#302448;stroke:#aa8fff}.node.relation rect{fill:#20253d;stroke:#687199}.node.blocked rect,.node.empty rect,.node.limit rect{fill:#30283a;stroke:#be9e72;stroke-dasharray:4 3}.node.active rect{stroke:#fff;stroke-width:2.5;filter:url(#selected-glow)}.node:hover rect{stroke:#eee6ff;stroke-width:2}
.node .label{font-size:15px;font-weight:600}.node .subtitle{font-size:12px;fill:#aab8d5}.node.dispatch rect{fill:#152b43;stroke:#62b7f1}.node.order rect{fill:#302448;stroke:#aa8fff}.node.source rect{fill:#16392f;stroke:#55b99b}.node.other.record rect{fill:#25303e;stroke:#91a0b1}
.edge{fill:none;stroke:#657dac;stroke-width:1.4;opacity:.78}.edge-label{font-size:12px;fill:#d8e2ff;paint-order:stroke;stroke:#0d1221;stroke-width:4px;stroke-linejoin:round}
.detail{min-height:320px}.detail h3{font-size:16px;line-height:1.4;color:#d3c3ff;overflow-wrap:anywhere;margin:12px 0 6px}.detail .node-type{font-size:12px;color:var(--muted)}.detail dl{font-size:13px;margin:14px 0;line-height:1.5}.detail dt{color:#7f8db6;font-size:11px;margin-top:10px}.detail dd{margin:3px 0;color:#cdd7ed;overflow-wrap:anywhere}.detail .note{padding:9px;border:1px solid #4f4260;border-radius:7px;color:#d8c6f0;font-size:13px;line-height:1.5;background:#251e32}
.summary-row{border-bottom:1px solid #262f46;padding:9px 0}.summary-row b{font-size:12px;color:#9faed0;font-weight:400}.summary-row p{margin:4px 0;font-size:14px;color:#e3ecff;overflow-wrap:anywhere}.coordinates{margin-top:15px;padding-top:10px;border-top:1px solid var(--border);font-size:12px;color:var(--muted)}.coordinates summary{cursor:pointer}
.node-shortcuts{display:block;padding:5px 8px;font-size:14px;flex-shrink:0;border-top:1px solid var(--border)}.node-shortcuts select{font-size:14px;padding:5px;margin-top:3px;min-width:0}.collaboration-editor{margin:10px 0;padding:9px;border:1px solid #6e619b;border-radius:8px;background:#211e36}.collaboration-editor label{display:block;font-size:15px;margin-bottom:5px}.collaboration-editor textarea{font:inherit;font-size:15px;line-height:1.4;width:100%;min-height:80px;max-height:180px;resize:vertical;background:#11182a;color:#f4f5ff;border:1px solid #657292;border-radius:5px;padding:6px}.collaboration-editor .primary{margin-top:6px}.collaboration-editor .secondary{font-size:14px}.collaboration-editor .muted,.note-status{font-size:14px;line-height:1.4;margin:6px 0 0;overflow-wrap:anywhere}.note-status.error{color:#ffd7be}
.maximize .graph-panel{position:fixed;inset:12px;z-index:100;background:var(--panel);box-shadow:0 0 0 20px #000a;display:flex;flex-direction:column}.maximize .graph-scroller{flex:1;max-height:none}.maximize .graph-footer{flex-shrink:0}
.layout-switch{display:flex;gap:3px}.layout-switch button{font-size:14px;padding:6px 8px;white-space:nowrap}.layout-switch button[aria-pressed="true"]{background:#413161;color:#f4edff;border-color:#ac91e7}.current-order{min-width:0}.current-order h2{overflow-wrap:anywhere;font-size:16px}.node .label{font-size:16px}.node .subtitle{font-size:14px}.edge-label{font-size:14px}.lane rect{fill:#151d2e;stroke:#303b53;stroke-width:1}.lane-1 rect{fill:#192135}.lane-title{font-size:15px;fill:#b8c8e4}.detail .node-type,.detail .note,.detail .muted,.summary-row b,.summary-row p{font-size:14px}.summary-row p{font-size:15px}.detail .section-title{position:sticky;top:0;background:var(--panel);padding-bottom:8px;z-index:1}#close-detail,#toggle-details{display:none}
.business-mode{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}.business-mode header{padding:7px 10px;min-height:42px;flex-shrink:0}.business-mode .brand-icon{font-size:17px;padding:2px 6px}.business-mode .brand strong{font-size:16px}.business-mode .brand small,.business-mode .intro{display:none}.business-mode #mode-banner{font-size:14px;padding:3px 7px;max-width:52%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.business-mode .status{margin:5px 8px;font-size:14px;padding:5px 8px;line-height:1.4;max-height:52px;overflow:auto;flex-shrink:0}
.business-mode .workspace{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 220px;grid-template-rows:auto minmax(0,1fr);gap:7px;margin:0 8px 8px;position:relative;align-items:stretch}.business-mode .config{grid-column:1 / -1;grid-row:1;padding:7px 9px;min-width:0}.business-mode .record-pickers{display:grid;grid-template-columns:108px minmax(85px,.8fr) minmax(85px,.8fr) minmax(180px,1.4fr);gap:7px;align-items:end}.business-mode .record-pickers label{margin:0;font-size:14px;line-height:1.1}.business-mode .record-pickers select{font-size:14px;margin-top:4px;padding:5px 6px;height:32px}.business-mode .record-pickers .primary{height:32px;font-size:14px;padding:4px;white-space:nowrap}.business-mode .record-page{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-top:6px}.business-mode #page-state{font-size:14px;margin:0;line-height:1.25}.business-mode .page-buttons{flex-shrink:0}.business-mode .page-buttons button{margin:0;font-size:14px;padding:3px 7px;width:auto;white-space:nowrap}.business-mode #component-state{font-size:14px;margin:4px 0 0;line-height:1.2}.business-mode .allow-settings:not([hidden]){max-height:110px;overflow:auto}
.business-mode .graph-panel{grid-column:1;grid-row:2;display:flex;flex-direction:column;min-height:0;overflow:hidden}.business-mode .graph-toolbar{padding:7px 8px;gap:6px;flex-shrink:0}.business-mode .graph-toolbar small{font-size:14px;margin-top:2px}.business-mode .graph-controls{gap:3px}.business-mode .graph-controls button{font-size:14px;padding:4px 6px}.business-mode .graph-controls span{font-size:14px}.business-mode #maximize{display:none}.business-mode .legend{padding:5px 8px;font-size:14px;gap:8px;flex-shrink:0}.business-mode .graph-scroller{flex:1;min-height:0;max-height:none;overflow:auto}.business-mode .graph-footer{padding:5px 8px;font-size:14px;flex-shrink:0}.business-mode .empty-state{padding:48px 10px}.business-mode .detail{grid-column:2;grid-row:2;min-height:0;padding:10px;overflow:auto}.business-mode .detail h3{font-size:16px}.business-mode .detail .secondary{font-size:14px}.business-mode .coordinates{font-size:14px}
@media(min-width:1100px){.workspace{grid-template-columns:210px minmax(420px,1fr) 260px;gap:10px;margin:0 18px 18px}.graph-scroller{min-height:560px}}
@media(max-width:899px) and (min-width:721px){.workspace{grid-template-columns:160px minmax(285px,1fr) 220px;gap:7px;margin:0 8px 12px}.config,.detail{padding:10px}.graph-controls #maximize{display:none}.graph-scroller{min-height:500px}}
@media(max-width:720px){header{padding:12px;align-items:flex-start;flex-direction:column}.intro{padding:14px 12px;align-items:flex-start;flex-direction:column}h1{font-size:19px}.status{margin:0 12px 12px}.workspace{display:flex;flex-direction:column;margin:0 12px 16px}.config,.detail,.graph-panel{width:100%}.graph-scroller{max-height:600px;min-height:400px}.graph-toolbar{padding:10px}.legend{padding:10px;gap:8px}.graph-footer{padding:10px;flex-direction:column}}
@media(max-width:720px){.business-mode header{flex-direction:row;align-items:center}.business-mode .workspace{grid-template-columns:minmax(0,1fr) 220px}.business-mode .graph-footer{flex-direction:row}.business-mode .record-pickers{grid-template-columns:100px minmax(70px,.8fr) minmax(70px,.8fr) minmax(140px,1.3fr)}}
@media(max-width:620px){.business-mode .workspace{grid-template-columns:minmax(0,1fr)}.business-mode .record-pickers{grid-template-columns:100px minmax(0,1fr)}.business-mode .record-pickers label:last-child{grid-column:2}.business-mode .record-pickers label:nth-child(3){grid-column:1;grid-row:2}.business-mode .record-page{flex-wrap:wrap}.business-mode .detail{display:none;position:absolute;inset:0 0 0 auto;width:min(280px,85%);z-index:10;box-shadow:-8px 0 30px #0008}.business-mode.details-open .detail{display:block}.business-mode #toggle-details,.business-mode #close-detail{display:block}.business-mode #close-detail{margin-left:auto;font-size:14px;padding:3px 6px}.business-mode .graph-toolbar{justify-content:space-between}.business-mode .graph-controls{flex-basis:100%}.business-mode .legend{font-size:14px}.business-mode #mode-banner{max-width:45%}}
