:root{font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;color:#263b4f;background:#f2f5f8;font-size:13px;--blue:#1675ea;--border:#e2e8f0;--muted:#8090a2}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;background:#fff;border:1px solid var(--border);border-radius:6px;color:#43566a;padding:8px 11px;white-space:nowrap}button:hover{background:#edf4fe;border-color:#adc9ee}button:disabled{opacity:.4;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #1675ea;outline-offset:2px}.primary{background:var(--blue);color:#fff;border-color:var(--blue)}.primary:hover{background:#0d62ca;color:#fff}.danger{color:#c34545;background:#fff5f5;border-color:#f1cccc}header{height:74px;display:flex;align-items:center;padding:0 24px;gap:20px;background:#fff;border-bottom:1px solid var(--border)}.brand{display:flex;gap:12px;align-items:center;white-space:nowrap}.logo{display:grid;place-items:center;width:37px;height:37px;font-size:25px;color:#fff;background:linear-gradient(140deg,#1675ea,#16a990);border-radius:10px;font-style:italic}.brand strong{font-size:16px;letter-spacing:.3px}.brand strong span{font-weight:500}.brand small{display:block;font-size:11px;color:var(--muted);margin-top:5px}.preview{color:#ac731d;background:#fff5de;border:1px solid #f5dfb7;padding:4px 8px;border-radius:5px;font-size:11px}.top-actions{display:flex;align-items:center;gap:7px;margin-left:auto}#saved{font-size:11px;color:var(--muted);margin-right:10px}.toolbar{background:#fff;height:55px;padding:0 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border)}.modes,.toolbar-right{display:flex;gap:5px;align-items:center}.toolbar button{border-color:transparent}.toolbar .active{background:#eaf3ff;color:#126bd2;border-color:#d6e6fb}.divider{height:20px;border-left:1px solid var(--border);margin:0 8px}main{display:grid;grid-template-columns:220px minmax(0,1fr) 260px;height:calc(100dvh - 129px);min-height:520px}.assets,.inspector{background:#fff;overflow:auto;position:relative}.assets{border-right:1px solid var(--border);display:flex;flex-direction:column}.inspector{border-left:1px solid var(--border)}.panel-title{height:51px;display:flex;align-items:center;justify-content:space-between;padding:0 17px;font-weight:600;border-bottom:1px solid var(--border)}.tiny{font-size:9px;letter-spacing:1px;color:#9ba8b6;font-weight:400}.counts{display:flex;gap:8px;margin:17px}.count{flex:1;padding:10px;background:#f5f8fc;border-radius:7px;font-size:10px;color:var(--muted)}.count b{display:block;font-size:22px;font-weight:500;color:#344a61;margin-bottom:3px}.section-label{padding:0 17px 12px;display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}#tree{padding:0 8px}.tree-rack{width:100%;border:0;text-align:left;font-weight:600;display:flex;justify-content:space-between;padding:10px}.tree-device{width:100%;border:0;text-align:left;font-size:11px;margin:2px 0;padding:8px 9px 8px 22px;display:flex;align-items:center;gap:7px}.tree-device span{overflow:hidden;text-overflow:ellipsis}.tree-device small{margin-left:auto;color:#8b9aab;white-space:nowrap;font-size:10px}.tree-device i{width:7px;height:7px;flex-shrink:0;border-radius:2px;background:#92b1ce}.tree-device.selected,.tree-rack.selected{background:#eaf3ff;color:#1675ea}.side-bottom{margin-top:auto;padding:22px 17px 18px}.side-bottom p{line-height:1.8;font-size:11px;color:#8998aa}.side-bottom button{font-size:11px;border:0;padding-left:0;color:#a96666}.workspace{min-width:0;display:flex;flex-direction:column}.canvas-top{height:44px;background:#f9fbfd;display:flex;align-items:center;justify-content:space-between;padding:0 20px;font-size:11px;border-bottom:1px solid var(--border)}#modeLabel,#summary{color:#8c9bad}.live-dot{display:inline-block;width:6px;height:6px;background:#20a17f;border-radius:50%;margin-right:7px}#viewport{position:relative;flex:1;min-height:0;overflow:hidden}#canvas{width:100%;height:100%;display:block;touch-action:none;user-select:none}#canvas text{font-family:"Segoe UI","Microsoft YaHei",sans-serif;pointer-events:none}#canvas .object{cursor:grab}#canvas .port{cursor:crosshair}#canvas .delete-handle{cursor:pointer}#canvas .slot{cursor:crosshair}#canvas .edge{cursor:pointer}#canvas .object:hover>rect:first-child{stroke:#1675ea}.canvas-legend{position:absolute;left:18px;bottom:18px;display:flex;gap:15px;font-size:10px;color:#8190a1;pointer-events:none}.canvas-legend span{display:flex;gap:6px;align-items:center}.canvas-legend i{width:14px;height:2px}.zoom{position:absolute;right:17px;bottom:16px;background:white;box-shadow:0 2px 10px #223a5510;border:1px solid var(--border);border-radius:7px;display:flex}.zoom button{border:0;border-radius:0;padding:8px;font-size:12px}#zoomLabel{min-width:49px}footer{height:37px;background:#fff;border-top:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 15px;font-size:10px;color:#8798aa;gap:10px}#status{color:#526a82;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.inspector #properties{padding:20px 17px}.eyebrow{font-size:10px;letter-spacing:1px;color:#8c9aad;margin-bottom:10px}.inspector h2{font-size:17px;margin:0 0 7px;color:#314b65}.inspector p{font-size:11px;color:#8492a3;line-height:1.9}.field{display:flex;flex-direction:column;gap:7px;margin:14px 0}.field>span{font-size:11px;color:#7b8c9e}input,select,textarea{border:1px solid #dce4ed;background:#fff;border-radius:5px;padding:8px 9px;width:100%;color:#334d67}input[type=color]{height:36px;padding:3px}input[type=checkbox]{width:auto}textarea{line-height:1.7;resize:vertical}.pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.full{width:100%;margin-top:8px}.props-foot{margin-top:22px;padding-top:18px;border-top:1px solid var(--border)}.source-note{margin:0 17px 20px;padding:15px;background:#f5f9fd;border:1px solid #e9eff5;border-radius:8px;color:#68809a;font-size:11px}.source-note strong{font-size:12px;font-weight:500}.source-note p{margin:8px 0}.source-note span{font-size:10px;color:#92a1b2}.stats{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--border);font-size:12px}.stats span{color:#8b99a9}.hint-card{padding:12px;background:#f7f9fc;border-radius:6px;margin-top:20px}dialog{border:1px solid #d6e1ed;border-radius:12px;width:min(620px,94vw);padding:0;box-shadow:0 30px 100px #14283b33;color:#334b63}dialog::backdrop{background:#162d4660;backdrop-filter:blur(2px)}#modalForm{padding:25px}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.dialog-head h2{font-size:18px;font-weight:600;margin:0}.dialog-head button{border:0;font-size:22px;padding:0 6px}.dialog-foot{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}#modalError{color:#ba4141;font-size:12px;line-height:1.6;max-height:100px;overflow:auto}.help{font-size:12px;color:#8393a4;line-height:1.8}.table-wrap{max-height:50vh;overflow:auto}table{border-collapse:collapse;width:100%;font-size:11px}th,td{padding:10px;text-align:left;border-bottom:1px solid var(--border)}th{background:#f5f8fc;position:sticky;top:0}#batchText{min-height:190px;font-family:Consolas,"Microsoft YaHei",monospace;font-size:12px}.check{display:flex;gap:7px;align-items:center;margin:14px 0;font-size:12px}.table-wrap td:last-child{white-space:nowrap}.port-actions{display:flex;gap:6px}.port-actions button{flex:1;font-size:11px}.key{background:#edf1f6;border:1px solid #e2e8f0;border-radius:3px;padding:0 4px}@media(max-width:1200px){main{grid-template-columns:185px minmax(0,1fr) 230px}header{padding:0 15px;gap:12px}.brand strong{font-size:14px}#saved{display:none}.toolbar{padding:0 10px}.toolbar button{padding:8px;font-size:12px}footer span:last-child{display:none}.preview{font-size:10px}}@media(max-width:950px){main{grid-template-columns:160px minmax(0,1fr) 210px}.top-actions button{font-size:11px;padding:7px}.brand small{display:none}.preview{display:none}.toolbar{overflow:auto;gap:20px}.canvas-legend{display:none}}@media(max-width:700px){header{height:100px;flex-wrap:wrap;gap:5px;padding:10px}.top-actions{width:100%;margin:0;justify-content:space-between}main{height:calc(100dvh - 155px);grid-template-columns:minmax(0,1fr) 190px}.assets{display:none}.toolbar{height:55px;flex-shrink:0}.inspector #properties{padding:13px}.panel-title{padding:0 13px}.source-note{display:none}.canvas-top{padding:0 10px}#summary{display:none}}
.assets .panel-title{flex-shrink:0}.counts{flex-shrink:0}
#canvas{cursor:grab}#canvas.panning{cursor:grabbing}#canvas .route-handle{cursor:move}#canvas .port{cursor:crosshair}
@keyframes cableTravel{to{stroke-dashoffset:-36}}.cable-flow{animation:cableTravel 1.4s linear infinite}.edge:hover .cable-base{filter:drop-shadow(0 0 2px currentColor)}@media(prefers-reduced-motion:reduce){.cable-flow{animation:none}}
#canvas .port:hover [data-port-face]{fill:#edb448;stroke:#1675ea;stroke-width:1.4}.wire-preview{pointer-events:none}
.device-library{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:15px 0 20px}.device-template{white-space:normal;text-align:left;display:flex;flex-direction:column;align-items:flex-start;gap:7px;padding:12px 10px;background:var(--tint);border:1px solid transparent;position:relative}.device-template svg{width:25px;height:25px}.device-template b{font-size:12px;color:var(--accent)}.device-template small{font-size:10px;color:#7b8c9e}.device-template[aria-pressed=true]{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.device-template[aria-pressed=true]::after{content:'✓';position:absolute;right:7px;top:6px;color:var(--accent)}dialog{max-height:92dvh;overflow:auto}.live-edit{font-size:10px;display:flex;align-items:center;gap:6px;color:#398f78;margin:12px 0 18px}.live-edit i{width:5px;height:5px;background:#35a688;border-radius:50%}.style-choices{display:grid;grid-template-columns:1fr 1fr;gap:6px}.style-choices button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:7px 3px;min-width:0;font-size:10px;color:#7b8c9e}.style-choices button[aria-pressed=true]{color:#1675ea;border-color:#9cc5f4;background:#edf5ff}.swatches{display:flex;gap:6px;flex-wrap:wrap;margin-top:-6px}.swatches button{width:19px;height:19px;padding:0;background:var(--swatch);border:2px solid #fff;box-shadow:0 0 0 1px #e0e7ef;border-radius:50%}.swatches button:hover{outline:2px solid #9cc5f4}.prop-feedback{padding:8px 9px;background:#f0f8f5;border-radius:5px;color:#398f78!important;line-height:1.6!important}.prop-feedback.error{color:#b44444!important;background:#fff0f0}input[aria-invalid=true],textarea[aria-invalid=true],select[aria-invalid=true]{border-color:#d96969;background:#fff8f8}input:disabled{opacity:.5;background:#f3f6f9}@media(max-width:500px){.device-library{grid-template-columns:repeat(2,minmax(0,1fr))}}
.field-error{color:#b44444;font-size:10px;line-height:1.6}
.route-actions{display:flex;gap:6px}.route-actions button{flex:1;padding:7px 4px;font-size:11px}#canvas .route-insert{cursor:copy}#canvas .route-handle:hover>circle:last-child{stroke:#1675ea;stroke-width:2.5}.curve-guide{pointer-events:none}
