:root{--wiring-primary:#ea580c;--wiring-primary-hover:#c2410c;--wiring-primary-light:#fed7aa;--wiring-dark:#1a1a1a;--wiring-dark-secondary:#2d2d2d;--wiring-dark-tertiary:#404040;--wiring-text-light:#fff;--wiring-text-muted:#a3a3a3;--wiring-border:#404040}.wiring-diagram-editor{background:#262626;width:100%;height:calc(100vh - 60px);position:relative;overflow:hidden}.wiring-diagram-editor:focus{outline:none}.canvas-container{position:absolute;inset:0;overflow:hidden}.diagram-canvas{cursor:crosshair;background:#1f1f1f;width:100%;height:100%}.wiring-toolbar{background:var(--wiring-dark,#1a1a1a);border:1px solid var(--wiring-border,#404040);z-index:100;border-radius:12px;flex-direction:column;max-height:calc(100vh - 120px);transition:all .3s;display:flex;position:absolute;top:1rem;left:1rem;overflow:hidden;box-shadow:0 4px 24px #00000080}.wiring-toolbar.collapsed{width:48px;max-height:48px}.wiring-toolbar.collapsed .toolbar-content{display:none}.toolbar-header{border-bottom:1px solid var(--wiring-border,#404040);background:var(--wiring-dark-secondary,#2d2d2d);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:12px 12px 0 0;justify-content:space-between;align-items:center;padding:.75rem 1rem;display:flex}.toolbar-header h3{color:var(--wiring-primary,#ea580c);margin:0;font-size:.9rem;font-weight:600}.toolbar-toggle{cursor:pointer;width:28px;height:28px;color:var(--wiring-text-muted,#a3a3a3);background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;transition:all .2s;display:flex}.toolbar-toggle:hover{background:var(--wiring-dark-tertiary,#404040);color:var(--wiring-primary,#ea580c)}.toolbar-content{background:var(--wiring-dark,#1a1a1a);flex:1;padding:.75rem;overflow-y:auto}.tool-section{margin-bottom:1rem}.tool-section-header{color:var(--wiring-text-muted,#a3a3a3);text-transform:uppercase;letter-spacing:.5px;margin-bottom:.5rem;padding:0 .25rem;font-size:.7rem;font-weight:700}.tool-buttons{flex-wrap:wrap;gap:.375rem;display:flex}.tool-button{background:var(--wiring-dark-secondary,#2d2d2d);border:2px solid var(--wiring-border,#404040);cursor:pointer;width:40px;height:40px;color:var(--wiring-text-light,#fff);border-radius:8px;justify-content:center;align-items:center;padding:0;font-size:1.1rem;transition:all .2s;display:flex}.tool-button:hover{background:var(--wiring-dark-tertiary,#404040);border-color:var(--wiring-primary,#ea580c);transform:translateY(-1px)}.tool-button.active{background:var(--wiring-primary,#ea580c);border-color:var(--wiring-primary,#ea580c);color:#fff;box-shadow:0 2px 8px #ea580c80}.tool-button:disabled{opacity:.5;cursor:not-allowed}.color-picker{flex-wrap:wrap;gap:.375rem;display:flex}.color-swatch{cursor:pointer;border-radius:6px;width:28px;height:28px;padding:0;transition:all .2s;box-shadow:0 1px 3px #0000004d}.color-swatch:hover{transform:scale(1.15);box-shadow:0 2px 8px #0006}.color-swatch.selected{box-shadow:0 0 0 3px var(--wiring-primary,#ea580c);transform:scale(1.1)}.component-grid{grid-template-columns:repeat(3,1fr);gap:.375rem;display:grid}.component-item{background:var(--wiring-dark-secondary,#2d2d2d);border:2px solid var(--wiring-border,#404040);cursor:pointer;border-radius:8px;flex-direction:column;justify-content:center;align-items:center;min-height:60px;padding:.5rem;transition:all .2s;display:flex}.component-item:hover{background:var(--wiring-dark-tertiary,#404040);border-color:var(--wiring-primary,#ea580c);transform:translateY(-1px)}.component-item.selected{background:var(--wiring-primary,#ea580c);border-color:var(--wiring-primary,#ea580c);box-shadow:0 2px 8px #ea580c80}.component-item.selected path{stroke:#fff!important}.component-item .component-name{color:var(--wiring-text-muted,#a3a3a3);text-align:center;margin-top:.125rem;font-size:.6rem;font-weight:600}.component-item.selected .component-name{color:#fff}.property-panel,.property-panel-empty{background:var(--wiring-dark,#1a1a1a);border:1px solid var(--wiring-border,#404040);z-index:100;border-radius:12px;width:220px;max-height:calc(100vh - 120px);transition:all .3s;position:absolute;top:1rem;right:1rem;overflow:hidden;box-shadow:0 4px 24px #00000080}.property-panel.collapsed,.property-panel-empty.collapsed{width:48px;max-height:48px}.property-panel.collapsed .property-content,.property-panel-empty.collapsed .property-content{display:none}.property-header{border-bottom:1px solid var(--wiring-border,#404040);background:var(--wiring-dark-secondary,#2d2d2d);cursor:pointer;border-radius:12px 12px 0 0;justify-content:space-between;align-items:center;padding:.75rem 1rem;display:flex}.property-header h3{color:var(--wiring-primary,#ea580c);margin:0;font-size:.9rem;font-weight:600}.property-content{background:var(--wiring-dark,#1a1a1a);padding:.75rem;overflow-y:auto}.property-panel-empty .property-content{justify-content:center;align-items:center;min-height:80px;display:flex}.property-panel-empty p{color:var(--wiring-text-muted,#a3a3a3);text-align:center;margin:0;font-size:.8rem}.property-group{margin-bottom:.75rem}.property-group label{color:var(--wiring-text-muted,#a3a3a3);text-transform:uppercase;letter-spacing:.3px;margin-bottom:.375rem;font-size:.75rem;font-weight:600;display:block}.property-group input[type=text],.property-group input[type=number],.property-group select{border:2px solid var(--wiring-border,#404040);background:var(--wiring-dark-secondary,#2d2d2d);width:100%;color:var(--wiring-text-light,#fff);border-radius:6px;padding:.5rem;font-size:.85rem;transition:border-color .2s}.property-group input:focus,.property-group select:focus{border-color:var(--wiring-primary,#ea580c);outline:none}.position-inputs{grid-template-columns:1fr 1fr;gap:.5rem;display:grid}.zoom-controls{background:var(--wiring-dark,#1a1a1a);border:1px solid var(--wiring-border,#404040);z-index:100;border-radius:10px;gap:.375rem;padding:.5rem;display:flex;position:absolute;bottom:1rem;right:1rem;box-shadow:0 4px 24px #00000080}.zoom-controls.collapsed{padding:.25rem}.zoom-controls.collapsed .zoom-button:not(.zoom-toggle),.zoom-controls.collapsed .zoom-level{display:none}.zoom-button{background:var(--wiring-dark-secondary,#2d2d2d);border:1px solid var(--wiring-border,#404040);cursor:pointer;width:36px;height:36px;color:var(--wiring-text-light,#fff);border-radius:8px;justify-content:center;align-items:center;padding:0;font-size:1.1rem;font-weight:600;transition:all .2s;display:flex}.zoom-button.active{background:var(--wiring-primary,#ea580c);border-color:var(--wiring-primary,#ea580c);color:#fff}.zoom-button:hover:not(:disabled):not(.active){background:var(--wiring-dark-tertiary,#404040);border-color:var(--wiring-primary,#ea580c);color:var(--wiring-primary,#ea580c)}.zoom-button:disabled{opacity:.3;cursor:not-allowed}.zoom-level{color:var(--wiring-text-muted,#a3a3a3);justify-content:center;align-items:center;min-width:45px;padding:0 .5rem;font-size:.8rem;font-weight:600;display:flex}.grid-size-controls{border-left:1px solid var(--wiring-border,#404040);align-items:center;gap:.25rem;margin-left:.5rem;padding-left:.5rem;display:flex}.grid-label{color:var(--wiring-text-muted,#a3a3a3);margin-right:.25rem;font-size:.75rem;font-weight:600}.grid-size-value{color:var(--wiring-text-light,#fff);text-align:center;min-width:36px;font-size:.75rem;font-weight:600}.zoom-button.small{width:28px;height:28px;font-size:.9rem}.zoom-controls.collapsed .grid-size-controls{display:none}.connection-point{cursor:pointer;transition:r .2s,filter .2s}.connection-point:hover{filter:brightness(1.2)}.connection-point.selected{filter:drop-shadow(0 0 4px #ea580ce6)}.wire{cursor:pointer;transition:stroke-width .2s,filter .2s}.wire:hover{stroke-width:5px}.wire.selected{stroke-width:5px;filter:drop-shadow(0 0 4px #ea580ccc)}.point-label{fill:var(--wiring-text-light,#fff);pointer-events:none;-webkit-user-select:none;user-select:none;font-size:12px;font-weight:600}.wire-label{fill:var(--wiring-text-muted,#a3a3a3);pointer-events:none;-webkit-user-select:none;user-select:none;font-size:10px;font-weight:500}.annotation{cursor:pointer}.annotation-text{fill:var(--wiring-primary,#ea580c);pointer-events:none;-webkit-user-select:none;user-select:none;font-size:11px}.component-symbol{cursor:pointer;transition:all .2s}.component-symbol:hover rect{stroke:var(--wiring-primary,#ea580c);stroke-width:2.5px}.component-symbol.selected rect{stroke:var(--wiring-primary,#ea580c);stroke-width:3px}.component-symbol path{transition:stroke-width .2s}.component-symbol:hover path{stroke-width:3px}.component-symbol.selected path{stroke-width:3.5px}.component-label{fill:var(--wiring-text-light,#fff);pointer-events:none;-webkit-user-select:none;user-select:none;font-size:10px;font-weight:700}.component-type-label{fill:var(--wiring-text-muted,#a3a3a3);pointer-events:none;-webkit-user-select:none;user-select:none;text-transform:uppercase;letter-spacing:.5px;font-size:9px;font-weight:600}.component-pin{cursor:pointer}.pin-circle{transition:r .2s,stroke-width .2s}.component-pin:hover .pin-circle{filter:brightness(1.2)}.pin-label{opacity:0;pointer-events:none;-webkit-user-select:none;user-select:none;transition:opacity .2s}.component-pin:hover .pin-label{opacity:1}.pin-hover-glow{pointer-events:none;animation:1.5s ease-in-out infinite pulse-glow}@keyframes pulse-glow{0%,to{opacity:.3}50%{opacity:.5}}.power-indicator{animation:2s ease-in-out infinite power-pulse}@keyframes power-pulse{0%,to{opacity:.8}50%{opacity:1}}.light-glow{animation:3s ease-in-out infinite light-flicker}@keyframes light-flicker{0%,to{opacity:.4}50%{opacity:.6}}.editor-actions{background:var(--wiring-dark,#1a1a1a);border:1px solid var(--wiring-border,#404040);z-index:100;border-radius:10px;align-items:center;gap:.75rem;padding:.75rem 1.25rem;display:flex;position:absolute;bottom:1rem;left:50%;transform:translate(-50%);box-shadow:0 4px 24px #00000080}.save-button{background:var(--wiring-primary,#ea580c);color:#fff;cursor:pointer;border:none;border-radius:6px;padding:.5rem 1.25rem;font-size:.85rem;font-weight:600;transition:background .2s}.save-button:hover{background:var(--wiring-primary-hover,#c2410c)}.status-text{color:var(--wiring-text-muted,#a3a3a3);font-size:.8rem;font-style:italic}.modal-overlay{z-index:1000;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#000000b3;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.modal-dialog{background:var(--wiring-dark,#1a1a1a);border:1px solid var(--wiring-border,#404040);border-radius:12px;min-width:360px;max-width:450px;padding:1.5rem;box-shadow:0 20px 60px #00000080}.modal-dialog h3{color:var(--wiring-primary,#ea580c);margin:0 0 .5rem;font-size:1.1rem}.modal-dialog p{color:var(--wiring-text-muted,#a3a3a3);margin:0 0 1.25rem;font-size:.9rem}.modal-dialog input[type=number],.modal-dialog input[type=text]{border:2px solid var(--wiring-border,#404040);background:var(--wiring-dark-secondary,#2d2d2d);width:100%;color:var(--wiring-text-light,#fff);box-sizing:border-box;border-radius:8px;padding:.75rem;font-size:1rem;transition:border-color .2s}.modal-dialog input[type=number]:focus,.modal-dialog input[type=text]:focus{border-color:var(--wiring-primary,#ea580c);outline:none}.modal-dialog .form-group{margin-bottom:1rem}.modal-dialog .form-group label{color:var(--wiring-text-muted,#a3a3a3);margin-bottom:.375rem;font-size:.85rem;font-weight:600;display:block}.modal-dialog .dialog-buttons{justify-content:flex-end;gap:.75rem;margin-top:1.5rem;display:flex}.modal-dialog .dialog-buttons button{cursor:pointer;border:none;border-radius:8px;padding:.625rem 1.25rem;font-size:.9rem;font-weight:600;transition:all .2s}.modal-dialog .cancel-button{background:var(--wiring-dark-secondary,#2d2d2d);color:var(--wiring-text-light,#fff);border:1px solid var(--wiring-border,#404040)}.modal-dialog .cancel-button:hover{background:var(--wiring-dark-tertiary,#404040)}.modal-dialog .create-button{background:var(--wiring-primary,#ea580c);color:#fff}.modal-dialog .create-button:hover{background:var(--wiring-primary-hover,#c2410c)}.modal-buttons{justify-content:flex-end;gap:.75rem;display:flex}.modal-buttons button{cursor:pointer;border:none;border-radius:8px;padding:.625rem 1.25rem;font-size:.9rem;font-weight:600;transition:all .2s}.cancel-button{background:var(--wiring-dark-secondary,#2d2d2d);color:var(--wiring-text-light,#fff);border:1px solid var(--wiring-border,#404040)}.cancel-button:hover{background:var(--wiring-dark-tertiary,#404040)}.confirm-button{background:var(--wiring-primary,#ea580c);color:#fff}.confirm-button:hover{background:var(--wiring-primary-hover,#c2410c)}.wiring-test-page{max-width:100%;height:calc(100vh - 60px);margin:0;padding:0}.wiring-test-page h1,.debug-info{display:none}@media (max-width:768px){.wiring-diagram-editor{height:calc(100vh - 50px)}.wiring-toolbar{border-radius:16px 16px 0 0;width:100%;max-height:50vh;inset:auto 0 0}.wiring-toolbar.collapsed{width:100%;max-height:48px}.toolbar-header{border-radius:16px 16px 0 0}.toolbar-content{flex-direction:column;gap:.5rem;padding:.5rem;display:flex}.tool-section{background:var(--wiring-dark-secondary,#2d2d2d);border-radius:8px;margin-bottom:0;padding:.5rem}.tool-section-header{margin-bottom:.375rem;font-size:.65rem}.tool-buttons{gap:.25rem}.tool-button{width:32px;height:32px}.color-picker{gap:.25rem}.color-swatch{width:24px;height:24px}.tool-section:last-child{background:var(--wiring-dark,#1a1a1a);border:1px solid var(--wiring-border,#404040);margin-top:.25rem;padding:.5rem}.component-grid{grid-template-columns:repeat(auto-fit,minmax(60px,1fr));gap:.25rem;width:100%}.component-item{border-width:1px;border-radius:6px;min-height:50px;padding:.375rem}.component-item div[style*="width: 48px"]{width:36px!important;height:32px!important}.component-item svg{width:36px;height:32px}.component-item .component-name{margin-top:.125rem;font-size:.55rem}.property-panel,.property-panel-empty{width:160px;top:.5rem;right:.5rem}.zoom-controls{padding:.375rem;inset:.5rem auto auto .5rem}.zoom-button{width:28px;height:28px;font-size:.9rem}.editor-actions{padding:.375rem .75rem;top:.5rem;bottom:auto;left:50%;transform:translate(-50%)}.save-button{padding:.375rem .75rem;font-size:.75rem}}.wiring-diagram-viewer{background:#262626;width:100%;height:calc(100vh - 60px);position:relative;overflow:hidden}.wiring-diagram-viewer .canvas-container{position:absolute;inset:0}