:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#dce6ef;background:#0d1521;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.33;cursor:default}[hidden]{display:none!important}:focus-visible{outline:2px solid #4de1c8;outline-offset:3px}
.app-shell{min-height:100vh;display:flex;flex-direction:column}.topbar{height:62px;background:#111d2c;border-bottom:1px solid #2a3948;display:flex;align-items:center;padding:0 22px;gap:19px}.brand,.auth-brand{font-size:23px;font-weight:780;letter-spacing:-1.1px;color:#fff}.brand{border:0;background:none;padding:0}.brand span:last-child,.auth-brand span:last-child{color:#60e9d0}.brand-mark{display:inline-flex;color:#4ae6c9!important;font-size:31px;transform:rotate(25deg);margin-right:5px;vertical-align:-2px}.top-divider,.tool-divider{height:26px;width:1px;background:#354456}.top-caption,.eyebrow,.side-heading,.side-footer,.statusbar,.breadcrumbs span,.property-tag{letter-spacing:.13em;font-size:10px;font-weight:800;color:#8ca4bb}.top-spacer,.projectbar-spacer,.toolbar-flex,.status-spacer{flex:1}.save-state{font-size:12px;color:#abc3d4}.save-state:before{content:"●";color:#62d9bf;margin-right:8px}.save-state[data-variant="dirty"]:before{color:#eab463}.save-state[data-variant="error"]:before{color:#fa777f}.top-account{color:#b9cad8;background:#1a2a3a;border:1px solid #34495b;border-radius:8px;padding:8px 11px;font-size:12px}
.primary{background:#46dec4;color:#062c30;border:1px solid #66ead4;border-radius:9px;font-weight:750;padding:11px 16px;box-shadow:0 2px 12px #38e5c327}.primary:hover{background:#73f1dc}.primary.small{padding:8px 13px;font-size:12px}.full{width:100%}.subtle-button{border:1px solid #324459;background:#1b2b3d;color:#c4d4df;border-radius:8px;padding:8px 11px;font-size:12px}.subtle-button:hover,.icon-button:hover,.tiny-button:hover{background:#30465b}.text-button{background:none;border:0;color:#60e9d0;padding:15px 0;font-size:13px}.danger-text{color:#fb9c9d!important}.danger-button{background:#e85c67!important;border-color:#f07c82!important;color:#fff!important}.muted{color:#92a9ba}
.dashboard{width:min(1120px,calc(100% - 48px));margin:68px auto}.dashboard-heading{display:flex;justify-content:space-between;align-items:end;gap:15px;margin-bottom:32px}.dashboard h1{font-size:42px;letter-spacing:-.05em;margin:4px 0}.dashboard-heading p:last-child{color:#9ab0c3;margin:0}.project-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px}.project-card{background:#172538;border:1px solid #30445b;border-radius:16px;padding:22px;min-height:215px}.project-icon{display:block;background:#183e44;border:1px solid #2b7c78;width:46px;height:46px;border-radius:12px;color:#58dfc5;font-size:29px;text-align:center}.project-card h2{font-size:18px;margin:18px 0 3px;overflow-wrap:anywhere}.project-card p{font-size:12px;color:#8ba5b8;margin:0 0 19px}.card-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.card-actions .subtle-button{border:0;background:transparent;padding:7px}.empty-state{text-align:center;border:1px dashed #3b586b;border-radius:18px;padding:80px 15px;color:#9db1c0}.empty-state span{font-size:64px;color:#55dfca}.empty-state h2{color:#e7f2f6;margin:5px}
.workspace{display:flex;flex-direction:column;height:calc(100vh - 62px);min-height:500px}.projectbar{height:56px;flex:none;display:flex;align-items:center;gap:12px;padding:0 15px;border-bottom:1px solid #2b3c4f;background:#152233}.breadcrumbs{display:flex;flex-direction:column;gap:2px}.breadcrumbs strong{font-size:14px;max-width:270px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.icon-button,.tiny-button{background:transparent;color:#b9ced9;border:0;border-radius:6px}.icon-button{font-size:23px;width:32px;height:32px}.tiny-button{font-size:17px;width:26px;height:26px}.workarea{display:grid;grid-template-columns:234px minmax(0,1fr) 248px;flex:1;min-height:0}.sidebar,.inspector{background:#142235;min-height:0;display:flex;flex-direction:column}.sidebar{border-right:1px solid #2b3e51}.inspector{border-left:1px solid #2b3e51}.side-heading{height:48px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 15px;border-bottom:1px solid #293c4f}.side-heading .tiny-button{color:#52dfc9;font-size:22px}.sheet-list{padding:9px;overflow:auto}.sheet-item{display:flex;align-items:center;border-radius:7px;margin:2px 0}.sheet-item:hover{background:#20354a}.sheet-item.selected{background:#214849;border-left:2px solid #47ddc4}.sheet-name{flex:1;min-width:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:left;color:#c5d5e2;background:transparent;border:0;padding:11px 7px;font-size:12px}.sheet-item.selected .sheet-name{color:#71eddb;font-weight:700}.sheet-actions{display:none;align-items:center;padding-right:2px}.sheet-item:hover .sheet-actions,.sheet-item:focus-within .sheet-actions{display:flex}.sheet-actions .tiny-button{width:19px;font-size:13px;padding:0}.side-footer,.inspector-footer{margin-top:auto;padding:16px;border-top:1px solid #293c4f}.inspector-footer{font-size:11px;color:#8197aa;line-height:1.5}
.editor-column{display:flex;flex-direction:column;min-width:0;min-height:0}.toolbar{display:flex;align-items:center;gap:9px;background:#1a2a3c;border-bottom:1px solid #34495a;padding:0 13px;height:50px;flex:none}.tool-group{display:flex;gap:3px;align-items:center}.tool,.tool-icon{background:transparent;border:1px solid transparent;border-radius:7px;color:#b9cbd8;height:34px}.tool{padding:0 10px;font-size:17px;display:flex;gap:6px;align-items:center}.tool span{font-size:12px}.tool.active{color:#5ce9d2;background:#1d514f;border-color:#45bcae}.tool:not(.active):hover,.tool-icon:hover{background:#30465a}.tool-icon{min-width:31px;font-size:20px}.zoom-label{font-size:11px;min-width:36px;text-align:center;color:#adc5d5}.hint{font-size:11px;color:#879fb2;white-space:nowrap}.canvas-frame{position:relative;flex:1;min-height:0;overflow:hidden;background:#fbfdff}.canvas-frame svg{display:block;width:100%;height:100%;touch-action:none;cursor:crosshair}.canvas-frame svg[data-tool="select"]{cursor:default}.canvas-frame svg[data-tool="select"] .drawn-object{cursor:move}.drawn-object .block-shape{fill:#fff;stroke:#233e55;stroke-width:2.2}.drawn-object .block-pin{stroke:#31536a;stroke-width:2.2}.pin-dot{fill:#fff;stroke:#325774;stroke-width:2}.drawn-object .block-label{font-size:14px;font-weight:700;fill:#18364d;pointer-events:none}.note-outline{fill:#fff9e8;stroke:#d5ad5c;stroke-width:1.5}.note-label{font-size:13px;fill:#685022;pointer-events:none}.drawn-object.is-selected .block-shape,.drawn-object.is-selected .note-outline{stroke:#00a992;stroke-width:3;filter:drop-shadow(0 0 5px #40dbc586)}#preview-layer{opacity:.48;pointer-events:none}.canvas-empty{position:absolute;top:48%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;pointer-events:none;color:#849aa9}.canvas-empty b{font-size:18px;color:#496378}.canvas-empty small{font-size:12px}.empty-icon{font-size:42px;border:1px solid #cee1e6;border-radius:18px;width:67px;height:67px;line-height:60px;color:#2da894;background:#e9f8f6}.canvas-corner{position:absolute;bottom:14px;right:16px;color:#94a9b7;font-size:11px;pointer-events:none}.statusbar{height:30px;flex:none;background:#172638;display:flex;align-items:center;gap:20px;padding:0 14px;border-top:1px solid #304459;font-size:10px;letter-spacing:.05em}.properties{padding:16px;overflow:auto}.inspector-empty{text-align:center;padding:46px 7px;color:#8399ad;font-size:12px}.inspector-empty span{font-size:43px;color:#54758b}.property-tag{color:#4cdfc6;margin-bottom:24px}.property-field{display:block;font-size:11px;color:#8ea9ba;margin:14px 0}.property-field span{display:block;margin-bottom:7px}.property-field input{width:100%;background:#0f1d2d;color:#e6f5f5;border:1px solid #344c5d;padding:9px;border-radius:7px}.property-tip{margin-top:25px;padding:12px;background:#203147;border-radius:8px;color:#a5bbc8;font-size:11px;line-height:1.5}
.auth-screen{min-height:100vh;display:flex;flex-direction:column;background:radial-gradient(circle at 65% 45%,#1659564a,transparent 34%),#0d1826;padding:26px}.auth-brand{align-self:flex-start}.auth-panel{width:min(430px,100%);margin:auto;background:#18283a;border:1px solid #3b5668;border-radius:18px;padding:34px;box-shadow:0 30px 70px #07101b88}.auth-panel h1{font-size:36px;margin:8px 0;letter-spacing:-.04em}.auth-panel .muted{font-size:13px;line-height:1.6}.auth-panel form{margin-top:28px}.auth-panel label{display:block;font-size:12px;font-weight:700;color:#b9ced9;margin:14px 0}.auth-panel input{display:block;width:100%;background:#102031;border:1px solid #446071;color:#fff;border-radius:8px;padding:12px;margin-top:7px}.form-error{color:#ff999b;font-size:12px;min-height:15px}
dialog{background:#192a3b;color:#e8f3f5;border:1px solid #477081;border-radius:14px;width:min(410px,calc(100% - 24px));padding:24px;box-shadow:0 25px 80px #03101bcc}dialog::backdrop{background:#03101bcc}.modal-heading{display:flex;align-items:center;justify-content:space-between}.modal-heading h2{margin:0;font-size:21px}dialog .muted{font-size:13px;line-height:1.5}dialog label{display:block;color:#a8c0ce;font-size:12px;margin:23px 0}dialog label span{display:block;margin-bottom:8px}dialog input{width:100%;background:#0d1b2b;color:#fff;border:1px solid #456173;border-radius:8px;padding:11px}.modal-actions{display:flex;justify-content:flex-end;gap:9px}.toast{position:fixed;bottom:23px;left:50%;transform:translate(-50%,20px);background:#244f4c;border:1px solid #55d5be;color:#edfffa;border-radius:10px;padding:12px 18px;font-size:12px;z-index:10;opacity:0;pointer-events:none;transition:.2s}.toast.visible{opacity:1;transform:translate(-50%,0)}.toast.error{background:#613237;border-color:#dd777b}
@media(max-width:1050px){.workarea{grid-template-columns:196px minmax(0,1fr) 205px}.hint{display:none}.tool span{display:none}.tool{min-width:34px;justify-content:center}.sidebar .side-footer{font-size:8px}}@media(max-width:740px){.top-caption,.top-divider,.inspector,#history-btn{display:none}.topbar{padding:0 12px}.workarea{grid-template-columns:130px minmax(0,1fr)}.sidebar .side-heading{padding:0 6px;font-size:9px}.sheet-list{padding:4px}.sheet-name{font-size:11px}.sheet-actions{flex-wrap:wrap;width:40px}.sheet-item:hover .sheet-actions,.sheet-item:focus-within .sheet-actions{display:flex}.toolbar{padding:0 5px;gap:2px}.tool-divider{margin:0 2px}.tool-icon{min-width:25px}.zoom-label{min-width:30px}.breadcrumbs strong{max-width:82px}.projectbar{gap:5px;padding:0 7px}#backup-btn{font-size:10px;padding:7px 4px}.statusbar{gap:8px;font-size:9px}.dashboard{width:calc(100% - 30px);margin:35px auto}.dashboard h1{font-size:32px}.dashboard-heading{align-items:center}}

/* Stage 2: component palette and editable engineering geometry. */
.sidebar .sheet-list{flex:0 1 auto;max-height:45%;min-height:44px}.component-heading{border-top:1px solid #304459;margin-top:3px}.palette-count{letter-spacing:0;text-transform:none;color:#6b899e;font-size:10px}.component-palette{overflow:auto;flex:1;min-height:100px;padding:8px}.palette-item{width:100%;background:transparent;color:#c3d5e1;border:1px solid transparent;border-radius:8px;display:flex;align-items:center;gap:8px;text-align:left;height:43px;padding:0 9px;font-size:11px}.palette-item:hover{background:#213a50}.palette-item.active{background:#205052;border-color:#43b6a9;color:#83f2dc}.palette-glyph{width:28px;height:28px;display:grid;place-items:center;border:1px solid #4c6574;color:#67ddc9;border-radius:6px;font-family:ui-monospace,monospace;font-size:17px}.palette-item small{margin-left:auto;color:#849ead;font-size:10px}.part-body{stroke:#253e57;stroke-width:2.2;fill:#fcfeff;stroke-linecap:round;stroke-linejoin:round}.part-lead{stroke:#2d5167;stroke-width:2.2;fill:none}.symbol-pin{fill:#fff;stroke:#347996;stroke-width:1.6}.symbol-detail{fill:#314b62;font-family:ui-monospace,monospace;font-size:18px;pointer-events:none}.part-reference{font-family:ui-monospace,monospace;font-size:13px;font-weight:750;fill:#183951;pointer-events:none}.part-value{font-family:ui-monospace,monospace;font-size:11px;fill:#607d90;pointer-events:none}.is-selected .part-body{stroke:#00ab99;stroke-width:3;filter:drop-shadow(0 0 5px #37bfa47a)}.symbol-pin:hover{fill:#37e0c5;stroke:#007d74;stroke-width:3}.wire-line{fill:none;stroke:#26678d;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.wire-hit{fill:none;stroke:transparent;stroke-width:20;stroke-linecap:round;stroke-linejoin:round;pointer-events:stroke}.is-selected .wire-line{stroke:#04b7aa;stroke-width:3.5}.wire-handle{fill:#f9fffe;stroke:#00a69f;stroke-width:2;cursor:crosshair}.wire-preview{fill:none;stroke:#00b7a7;stroke-width:2.5;stroke-dasharray:8 5}.snap-preview{fill:#54e5d16b;stroke:#00a993;stroke-width:1.5}.marquee{fill:#2bceb127;stroke:#16a69a;stroke-width:1.5;stroke-dasharray:5 3}.tool-icon:disabled:hover{background:transparent}
@media(max-width:740px){.component-palette{padding:4px}.palette-item{gap:4px;font-size:10px;padding:0 3px}.palette-item small{display:none}.palette-glyph{width:22px;flex:0 0 22px;font-size:12px}.toolbar .tool-icon{font-size:16px}.toolbar .tool-group{gap:0}.toolbar{overflow-x:auto;scrollbar-width:thin}.sidebar .side-footer{display:none}}
