*{box-sizing:border-box;margin:0;padding:0}html,body,#root{width:100%;height:100%;font-family:Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:1.4;overflow:hidden}.gorky-cad-pro{background:var(--bg-color);width:100%;height:100%;color:var(--text-color);flex-direction:column;display:flex}[data-theme=light]{--bg-color:#f0f0f0;--panel-bg:#fff;--panel-bg-secondary:#f8f9fa;--border-color:#dee2e6;--text-color:#212529;--text-secondary:#6c757d;--accent-color:#0d6efd;--accent-hover:#0b5ed7;--danger-color:#dc3545;--warning-color:#ffc107;--success-color:#198754;--toolbar-bg:#fff;--toolbar-height:72px;--sidebar-width:280px;--sidebar-right-width:240px;--status-height:28px;--canvas-bg:#f5f5f5;--selection-color:#06f;--hover-color:#0a4;--shadow:0 1px 3px #0000001a;--shadow-lg:0 4px 12px #00000026;--input-bg:#fff;--input-border:#ced4da;--button-bg:#e9ecef;--button-hover:#dee2e6;--active-bg:#0d6efd;--active-text:#fff}[data-theme=dark]{--bg-color:#1a1a2e;--panel-bg:#16213e;--panel-bg-secondary:#1a1a2e;--border-color:#2a2a40;--text-color:#e0e0e0;--text-secondary:#888;--accent-color:#48f;--accent-hover:#59f;--danger-color:#f44;--warning-color:#fa4;--success-color:#4f8;--toolbar-bg:#16213e;--toolbar-height:72px;--sidebar-width:280px;--sidebar-right-width:240px;--status-height:28px;--canvas-bg:#1a1a2e;--selection-color:#48f;--hover-color:#4f8;--shadow:0 1px 3px #0000004d;--shadow-lg:0 4px 12px #0006;--input-bg:#2a2a40;--input-border:#3a3a50;--button-bg:#2a2a40;--button-hover:#3a3a50;--active-bg:#48f;--active-text:#fff}[data-theme=blueprint]{--bg-color:#1e3a5f;--panel-bg:#264a70;--panel-bg-secondary:#1e3a5f;--border-color:#3a6a90;--text-color:#e0f0ff;--text-secondary:#8bd;--accent-color:#0cf;--accent-hover:#0df;--danger-color:#f44;--warning-color:#fa0;--success-color:#4f8;--toolbar-bg:#264a70;--toolbar-height:72px;--sidebar-width:280px;--sidebar-right-width:240px;--status-height:28px;--canvas-bg:#1e3a5f;--selection-color:#0df;--hover-color:#0fa;--shadow:0 1px 3px #0000004d;--shadow-lg:0 4px 12px #0006;--input-bg:#1e3a5f;--input-border:#3a6a90;--button-bg:#264a70;--button-hover:#3a6a90;--active-bg:#0cf;--active-text:#1e3a5f}.layout{flex-direction:column;height:100vh;display:flex;overflow:hidden}.layout-header{flex:0 0 var(--toolbar-height);border-bottom:1px solid var(--border-color);background:var(--toolbar-bg);z-index:100;flex-direction:column;display:flex}.layout-body{flex:auto;min-height:0;display:flex;overflow:hidden}.layout-sidebar-left{border-right:1px solid var(--border-color);background:var(--panel-bg);flex-direction:column;flex:none;min-width:0;min-height:0;display:flex;overflow:hidden}.layout-canvas{background:var(--canvas-bg);touch-action:none;flex:auto;min-width:0;min-height:0;position:relative;overflow:hidden}.layout-sidebar-right{border-left:1px solid var(--border-color);background:var(--panel-bg);flex-direction:column;flex:none;min-width:0;min-height:0;display:flex;overflow:hidden}.layout-footer{flex:0 0 var(--status-height);border-top:1px solid var(--border-color);background:var(--panel-bg);z-index:100}.toolbar{height:auto;min-height:var(--toolbar-height);background:var(--toolbar-bg);border-bottom:1px solid var(--border-color);flex-direction:column;align-items:stretch;gap:0;padding:0;display:flex;overflow:visible}.toolbar-row{flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:0;height:36px;padding:0 4px;display:flex}.toolbar-dropdown{z-index:200;position:relative}.toolbar-group{border-right:1px solid var(--border-color);flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:0;height:100%;padding:0 2px;display:flex}.toolbar-group:last-child{border-right:none}.toolbar-btn{width:auto;height:28px;color:var(--text-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;gap:3px;padding:0 4px;font-size:11px;line-height:1;transition:background .15s,color .15s;display:inline-flex;position:relative}.toolbar-btn .icon{font-size:14px;line-height:1}.toolbar-btn:hover{background:var(--button-hover);color:var(--text-color)}.toolbar-btn.active{background:var(--active-bg);color:var(--active-text)}.toolbar-btn-icon-only{gap:0;width:32px;padding:0}.toolbar-btn-icon-only span{font-size:16px}.toolbar-btn:disabled{opacity:.4;cursor:not-allowed}@media (width<=768px){.toolbar-btn-icon-only{width:28px;min-width:28px;height:28px}.toolbar-btn-icon-only span{font-size:14px}}@media (width<=480px){.toolbar-btn-icon-only{width:24px;min-width:24px;height:24px}.toolbar-btn-icon-only span{font-size:12px}}.toolbar-separator{background:var(--border-color);flex-shrink:0;width:1px;height:20px;margin:0 4px}.toolbar-brand-btn{cursor:pointer;white-space:nowrap;background:linear-gradient(135deg,#198754 0%,#157347 100%);border:none;border-radius:5px;flex-shrink:0;align-items:center;gap:3px;height:24px;padding:0 6px;font-size:11px;font-weight:700;text-decoration:none;transition:all .2s;display:inline-flex;box-shadow:0 1px 2px #1987544d;color:#fff!important}.toolbar-brand-btn:hover{background:linear-gradient(135deg,#157347 0%,#146c43 100%);transform:translateY(-1px);box-shadow:0 2px 6px #19875466;color:#fff!important}.toolbar-brand-btn span:first-child{font-size:14px}.toolbar-brand-btn-sochi{cursor:pointer;white-space:nowrap;background:linear-gradient(135deg,#198754 0%,#157347 100%);border:none;border-radius:5px;flex-shrink:0;align-items:center;gap:2px;height:24px;padding:0 4px;font-size:10px;font-weight:700;text-decoration:none;transition:all .2s;display:inline-flex;box-shadow:0 1px 2px #1987544d;color:#fff!important}.toolbar-brand-btn-sochi:hover{background:linear-gradient(135deg,#157347 0%,#146c43 100%);transform:translateY(-1px);box-shadow:0 2px 6px #19875466;color:#fff!important}.toolbar-brand-btn-sochi span:first-child{font-size:13px}.toolbar-brand-btn-nn{cursor:pointer;white-space:nowrap;background:linear-gradient(135deg,#dc3545 0%,#a71d2a 100%);border:none;border-radius:5px;flex-shrink:0;align-items:center;gap:2px;height:24px;padding:0 4px;font-size:10px;font-weight:700;text-decoration:none;transition:all .2s;display:inline-flex;box-shadow:0 1px 2px #dc35454d;color:#fff!important}.toolbar-brand-btn-nn:hover{background:linear-gradient(135deg,#a71d2a 0%,#7a1520 100%);transform:translateY(-1px);box-shadow:0 2px 6px #dc354566;color:#fff!important}.toolbar-brand-btn-nn span:first-child{font-size:13px}.toolbar-phone-btn{height:28px;color:var(--text-color);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:6px;flex-shrink:0;align-items:center;gap:4px;padding:0 6px;font-size:11px;font-weight:600;text-decoration:none;transition:all .15s;display:inline-flex}.toolbar-phone-btn:hover{background:var(--button-hover);color:var(--accent-color)}.toolbar-phone-btn span:first-child{font-size:13px}.toolbar-app-logo{height:28px;color:var(--text-color);letter-spacing:-.3px;white-space:nowrap;-webkit-user-select:none;user-select:none;flex-shrink:0;align-items:center;gap:5px;padding:0 8px;font-size:13px;font-weight:800;display:inline-flex}.toolbar-app-logo .logo-icon{font-size:16px;line-height:1}.toolbar-app-logo .logo-text{background:linear-gradient(90deg, var(--accent-color), #0d6efd);-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text}.toolbar-project-name{color:var(--text-color);white-space:nowrap;text-overflow:ellipsis;max-width:120px;padding:0 4px;font-size:11px;font-weight:600;line-height:28px;overflow:hidden}.toolbar-btn-wide{flex-direction:row;gap:4px;width:auto;padding:0 6px;font-size:11px}.toolbar-zoom-label{color:var(--text-secondary);text-align:center;-webkit-user-select:none;user-select:none;min-width:36px;font-size:11px;line-height:32px}.sidebar{height:100%;width:var(--sidebar-width);flex-direction:column;display:flex;overflow:hidden}.sidebar-header{border-bottom:1px solid var(--border-color);color:var(--text-color);flex:none;align-items:center;gap:6px;padding:8px 10px;font-size:12px;font-weight:600;display:flex}.sidebar-search{border-bottom:1px solid var(--border-color);flex:none;align-items:center;gap:6px;padding:6px 8px;display:flex}.sidebar-search input{border:1px solid var(--input-border);background:var(--input-bg);width:140px;height:24px;color:var(--text-color);border-radius:4px;outline:none;padding:0 6px;font-size:12px}.sidebar-search input:focus{border-color:var(--accent-color);box-shadow:0 0 0 2px #0d6efd26}.sidebar-content{flex:auto;overflow:hidden auto}.sidebar-category{border-bottom:1px solid var(--border-color)}.sidebar-category-header{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:6px;padding:6px 8px;transition:background .15s;display:flex}.sidebar-category-header:hover{background:#0000000a}[data-theme=dark] .sidebar-category-header:hover,[data-theme=blueprint] .sidebar-category-header:hover{background:#ffffff0a}.sidebar-category-header .chevron{color:var(--text-secondary);text-align:center;width:14px;font-size:10px;transition:transform .2s}.sidebar-category.expanded .chevron{transform:rotate(90deg)}.sidebar-category-title{color:var(--text-color);flex:1;align-items:center;gap:4px;font-size:12px;font-weight:500;display:flex}.sidebar-category-icon{justify-content:center;align-items:center;width:20px;height:20px;font-size:14px;display:flex}.sidebar-category-count{color:var(--text-secondary);background:var(--button-bg);border-radius:8px;padding:1px 5px;font-size:10px}.sidebar-items{grid-template-columns:repeat(3,1fr);gap:6px;padding:8px;display:grid}.sidebar-item{cursor:grab;-webkit-user-select:none;user-select:none;border-radius:4px;flex-direction:column;justify-content:center;align-items:center;gap:2px;width:auto;height:auto;min-height:64px;padding:6px 2px;transition:background .15s;display:flex;position:relative}.sidebar-item:hover{background:var(--button-hover)}.sidebar-item:active{cursor:grabbing}.sidebar-item-icon{flex-shrink:0;justify-content:center;align-items:center;width:28px;height:28px;font-size:20px;display:flex}.sidebar-item-icon svg{width:100%;height:100%;display:block}.sidebar-item-label{color:var(--text-secondary);text-align:center;text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:10px;line-height:1.2;overflow:hidden}.sidebar-item-dimensions{display:none}.sidebar-fav-btn{cursor:pointer;width:14px;height:14px;color:var(--text-secondary);background:0 0;border:none;justify-content:center;align-items:center;padding:0;font-size:10px;transition:color .15s;display:flex;position:absolute;top:1px;right:1px}.sidebar-fav-btn:hover{color:#ffc107}.properties-panel{height:100%;width:var(--sidebar-right-width);flex-direction:column;display:flex;overflow:hidden}.properties-tabs{border-bottom:1px solid var(--border-color);background:var(--panel-bg-secondary);scrollbar-width:thin;scrollbar-color:var(--border-color) transparent;-ms-overflow-style:auto;flex:none;display:flex;overflow-x:auto}.properties-tabs::-webkit-scrollbar{background:0 0;height:3px}.properties-tabs::-webkit-scrollbar-thumb{background:var(--border-color);border-radius:2px}.properties-tab{color:var(--text-secondary);cursor:pointer;white-space:nowrap;text-align:center;background:0 0;border:none;border-bottom:2px solid #0000;flex:none;padding:5px 8px;font-size:10px;transition:color .15s,border-color .15s,background .15s}.properties-tab:hover{color:var(--text-color);background:var(--button-hover)}.properties-tab.active{color:var(--accent-color);border-bottom-color:var(--accent-color);background:var(--panel-bg)}.properties-tab-badge{background:var(--danger-color);color:#fff;text-align:center;border-radius:6px;min-width:14px;margin-left:4px;padding:0 4px;font-size:10px;line-height:14px;display:inline-block}.properties-content{flex:auto;overflow:hidden auto}.properties-header{border-bottom:1px solid var(--border-color);color:var(--text-color);flex:none;padding:8px 10px;font-size:12px;font-weight:600}.properties-empty{text-align:center;color:var(--text-secondary);padding:16px 10px;font-size:12px}.properties-group{border-bottom:1px solid var(--border-color)}.properties-group-header{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:6px;padding:6px 10px;transition:background .15s;display:flex}.properties-group-header:hover{background:var(--button-hover)}.properties-group-title{color:var(--text-color);font-size:12px;font-weight:500}.properties-group-body{padding:6px 10px}.property-row{align-items:center;gap:6px;margin-bottom:6px;display:flex}.property-row:last-child{margin-bottom:0}.property-label{color:var(--text-secondary);text-align:right;white-space:nowrap;flex:0 0 80px;font-size:11px}.property-value{flex:auto;align-items:center;gap:4px;min-width:0;display:flex}.property-input{border:1px solid var(--input-border);background:var(--input-bg);height:24px;color:var(--text-color);border-radius:4px;outline:none;flex:1;min-width:0;padding:4px 8px;font-size:12px}.property-input:focus{border-color:var(--accent-color);box-shadow:0 0 0 2px #0d6efd26}.property-select{border:1px solid var(--input-border);background:var(--input-bg);height:24px;color:var(--text-color);border-radius:4px;outline:none;flex:1;min-width:0;padding:4px 6px;font-size:12px}.property-unit{color:var(--text-secondary);white-space:nowrap;font-size:10px}.status-bar{height:var(--status-height);color:var(--text-secondary);background:var(--panel-bg);border-top:1px solid var(--border-color);-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;padding:0 10px;font-size:11px;display:flex}.status-left{align-items:center;gap:10px;display:flex;overflow:hidden}.status-right{flex-shrink:0;align-items:center;gap:10px;display:flex}.status-item{white-space:nowrap;align-items:center;gap:4px;display:flex}.status-item.clickable{cursor:pointer;border-radius:3px;padding:2px 4px;transition:background .15s}.status-item.clickable:hover{background:var(--button-hover)}.status-progress{background:var(--accent-color);height:2px;transition:width .3s;position:absolute;top:0;left:0}.status-saved{color:var(--success-color)}.status-unsaved{color:var(--danger-color)}.canvas-overlay{z-index:50;pointer-events:none;position:absolute;top:12px;left:12px}.canvas-overlay>*{pointer-events:auto}.canvas-controls{background:var(--panel-bg);border:1px solid var(--border-color);box-shadow:var(--shadow);border-radius:6px;flex-direction:column;gap:4px;padding:4px;display:flex}.canvas-control-btn{width:32px;height:32px;color:var(--text-color);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;transition:background .15s;display:flex}.canvas-control-btn:hover{background:var(--button-hover)}.canvas-info{z-index:50;pointer-events:none;color:var(--text-secondary);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#0000000d;border-radius:4px;padding:4px 8px;font-size:11px;position:absolute;bottom:8px;left:12px}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--border-color);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--text-secondary)}.sidebar-content::-webkit-scrollbar{width:4px}.sidebar-content::-webkit-scrollbar-thumb{background:var(--border-color);border-radius:2px}.dragging-ghost{opacity:.8;pointer-events:none;z-index:9999;background:var(--panel-bg);border:1px solid var(--accent-color);box-shadow:var(--shadow-lg);color:var(--text-color);border-radius:6px;padding:8px 12px;font-size:12px;position:fixed}.toolbar-dropdown{display:inline-block;position:relative}.toolbar-dropdown-menu{z-index:999;background:var(--panel-bg);border:1px solid var(--border-color);box-shadow:var(--shadow-lg);border-radius:6px;flex-direction:column;gap:2px;min-width:180px;padding:4px;display:flex;position:absolute;top:100%;left:0}.toolbar-dropdown-item{color:var(--text-color);cursor:pointer;text-align:left;white-space:nowrap;background:0 0;border:none;border-radius:4px;align-items:center;gap:8px;padding:8px 12px;font-size:13px;transition:background .15s;display:flex}.toolbar-dropdown-item:hover{background:var(--button-hover)}.sidebar-item{transition:background .15s,transform .15s,box-shadow .15s}.toolbar-btn,.property-input,.property-select,.sidebar-category-header,.properties-group-header,.canvas-control-btn,.sidebar-fav-btn{transition:all .15s}@media (width<=1024px){.layout-sidebar-left,.layout-sidebar-right{min-width:200px}.toolbar-btn{width:38px;height:34px;padding:0 2px;font-size:11px}.toolbar-btn .icon{font-size:13px}.toolbar-row{height:36px;padding:0 4px}.toolbar-group{gap:1px;padding:0 3px}.toolbar-project-name{max-width:100px;font-size:10px}.toolbar-zoom-label{min-width:30px;font-size:10px}}@media (width<=768px){.layout{flex-direction:column}.layout-sidebar-left,.layout-sidebar-right{z-index:150;max-width:320px;transition:transform .3s;position:fixed;top:0;bottom:0;transform:translate(-100%);width:85vw!important}.layout-sidebar-left{left:0;right:auto}.layout-sidebar-right{left:auto;right:0;transform:translate(100%)}.layout-sidebar-left.open,.layout-sidebar-right.open{transform:translate(0)}.layout-header{z-index:100;height:auto;position:fixed;inset:auto 0 28px}.toolbar{flex-direction:column;height:auto;overflow:visible}.toolbar-row{flex-wrap:nowrap;height:40px;padding:0 4px}.toolbar-btn{width:36px;min-width:32px;height:36px;padding:0 2px;font-size:10px}.toolbar-btn .icon{font-size:14px}.toolbar-btn span:nth-child(2){display:none}.toolbar-btn-wide{width:auto;padding:0 4px}.toolbar-btn-wide span:nth-child(2),.toolbar-project-name{display:none}.toolbar-zoom-label{min-width:28px;font-size:10px}.toolbar-group{gap:2px;padding:0 2px}.toolbar-brand-btn span:nth-child(2){display:none}.toolbar-brand-btn{justify-content:center;width:36px;padding:0}.toolbar-brand-btn-sochi span:nth-child(2),.toolbar-brand-btn-nn span:nth-child(2){display:none}.toolbar-brand-btn-sochi,.toolbar-brand-btn-nn{justify-content:center;width:32px;padding:0}.toolbar-phone-btn{display:none}.layout-body{padding-top:32px;padding-bottom:110px}.layout-footer{z-index:90;flex:0 0 28px;height:28px;position:fixed;bottom:0;left:0;right:0}.status-bar{height:28px;font-size:10px}.mobile-drawer{background:var(--panel-bg);border-top:1px solid var(--border-color);z-index:200;border-radius:12px 12px 0 0;max-height:70vh;animation:.25s slideUp;position:fixed;bottom:110px;left:0;right:0;overflow-y:auto;box-shadow:0 -4px 20px #0003}@keyframes slideUp{0%{transform:translateY(100%)}to{transform:translateY(0)}}.mobile-drawer-overlay{z-index:199;background:#0006;animation:.2s fadeIn;position:fixed;inset:0}.mobile-drawer-header{border-bottom:1px solid var(--border-color);color:var(--text-color);justify-content:space-between;align-items:center;padding:12px 16px;font-size:14px;font-weight:600;display:flex}.mobile-drawer-close{color:var(--text-secondary);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;width:32px;height:32px;padding:4px;font-size:20px;display:flex}.mobile-drawer-section{border-bottom:1px solid var(--border-color);padding:8px 12px}.mobile-drawer-section-title{text-transform:uppercase;letter-spacing:.5px;color:var(--text-secondary);margin-bottom:4px;padding:8px 4px 4px;font-size:11px;font-weight:700}.mobile-drawer-grid{grid-template-columns:repeat(4,1fr);gap:6px;display:grid}.mobile-drawer-grid-3{grid-template-columns:repeat(3,1fr);gap:6px;display:grid}.mobile-drawer-btn{background:var(--panel-bg-secondary);color:var(--text-color);cursor:pointer;border:none;border-radius:8px;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:64px;padding:10px 4px;font-size:11px;transition:background .15s;display:flex}.mobile-drawer-btn:active{background:var(--button-hover)}.mobile-drawer-btn.active{background:var(--active-bg);color:var(--active-text)}.mobile-drawer-btn .icon{font-size:22px;line-height:1}.mobile-drawer-list{flex-direction:column;gap:2px;display:flex}.mobile-drawer-list-item{color:var(--text-color);cursor:pointer;text-align:left;background:0 0;border:none;border-radius:6px;align-items:center;gap:10px;padding:10px 12px;font-size:13px;transition:background .15s;display:flex}.mobile-drawer-list-item:active{background:var(--button-hover)}.mobile-drawer-list-item .icon{text-align:center;width:24px;font-size:18px}}@media (width<=480px){.toolbar-row{height:32px}.toolbar-btn{width:32px;min-width:28px;height:28px;font-size:10px}.toolbar-btn .icon{font-size:12px}.toolbar-group{gap:0;padding:0 1px}.toolbar-project-name{display:none}.toolbar-dropdown-menu{min-width:140px}.toolbar-dropdown-item{padding:5px 8px;font-size:11px}.toolbar-brand-btn span:nth-child(2){display:none}.toolbar-brand-btn{justify-content:center;width:28px;padding:0}.toolbar-brand-btn-sochi span:nth-child(2),.toolbar-brand-btn-nn span:nth-child(2){display:none}.toolbar-brand-btn-sochi,.toolbar-brand-btn-nn{justify-content:center;width:28px;padding:0}.toolbar-phone-btn{padding:0 4px;font-size:10px}.toolbar-app-logo .logo-text{display:none}.toolbar-app-logo{padding:0 4px}.status-bar{height:24px;font-size:10px}.status-item{padding:0 4px}.modal-container{border-radius:8px}.modal-header{padding:10px 12px;font-size:14px}.modal-body{padding:12px}.modal-footer{padding:10px 12px}}.toolbar-btn:focus-visible,.sidebar-category-header:focus-visible,.properties-group-header:focus-visible,.property-input:focus-visible,.canvas-control-btn:focus-visible{outline:2px solid var(--accent-color);outline-offset:2px}@media (prefers-reduced-motion:reduce){*{transition-duration:.01ms!important;animation-duration:.01ms!important}}.modal-overlay{z-index:500;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#00000080;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.modal-container{background:var(--panel-bg);border:1px solid var(--border-color);box-shadow:var(--shadow-lg);border-radius:12px;flex-direction:column;width:90%;max-width:600px;max-height:80vh;display:flex;overflow-y:auto}.modal-header{border-bottom:1px solid var(--border-color);justify-content:space-between;align-items:center;padding:16px 20px;font-size:16px;font-weight:600;display:flex}.modal-body{flex:1;padding:20px;overflow-y:auto}.modal-footer{border-top:1px solid var(--border-color);justify-content:flex-end;gap:8px;padding:12px 20px;display:flex}.modal-btn{cursor:pointer;border:none;border-radius:6px;padding:8px 16px;font-size:13px;transition:background .15s}.modal-btn-primary{background:var(--accent-color);color:#fff}.modal-btn-primary:hover{background:var(--accent-hover)}.modal-btn-secondary{background:var(--button-bg);color:var(--text-color)}.modal-btn-secondary:hover{background:var(--button-hover)}.modal-close{cursor:pointer;color:var(--text-secondary);background:0 0;border:none;font-size:20px;transition:color .15s}.modal-close:hover{color:var(--text-color)}.toast-container{z-index:600;flex-direction:column;gap:8px;display:flex;position:fixed;top:16px;right:16px}.toast{color:#fff;box-shadow:var(--shadow-lg);border-radius:6px;max-width:320px;padding:12px 16px;font-size:13px;animation:.3s toast-in}.toast-success{background:var(--success-color,#198754)}.toast-error{background:var(--danger-color,#dc3545)}.toast-warning{background:var(--warning-color,#ffc107);color:#333}.toast-info{background:var(--accent-color,#0d6efd)}@keyframes toast-in{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.error-boundary{text-align:center;color:var(--text-color);padding:40px}.error-boundary h2{color:var(--danger-color);margin-bottom:16px}.error-boundary pre{background:var(--panel-bg-secondary);text-align:left;border-radius:8px;max-height:300px;padding:16px;font-size:12px;overflow:auto}.cabinet-editor{flex-direction:column;height:100%;display:flex;overflow:hidden}.cabinet-shield-tab{flex-direction:row;gap:12px;height:100%;display:flex;overflow:hidden}.cabinet-palette{border-right:1px solid var(--border-color);flex-direction:column;flex:none;width:240px;height:100%;min-height:0;padding-right:8px;display:flex;overflow:hidden}.cabinet-palette-scroll{flex-direction:column;flex:1;gap:8px;min-height:0;display:flex;overflow-y:auto}.cabinet-rails-container{flex-direction:column;flex:1;gap:8px;height:100%;min-height:0;display:flex;overflow-y:auto}.cabinet-rail{background:var(--panel-bg-secondary);border:1px solid var(--border-color);border-radius:6px;align-items:flex-start;gap:2px;min-height:70px;padding:4px;display:flex;position:relative}.cabinet-rail-label{color:var(--text-secondary);background:var(--panel-bg);padding:0 4px;font-size:10px;position:absolute;top:-10px;left:8px}.cabinet-device{cursor:pointer;-webkit-user-select:none;user-select:none;color:#fff;border-radius:4px;flex-direction:column;justify-content:center;align-items:center;height:64px;font-size:10px;transition:transform .1s,box-shadow .15s;display:flex;position:relative;box-shadow:0 1px 2px #0003}.cabinet-device:hover{transform:translateY(-2px);box-shadow:0 3px 6px #0000004d}.cabinet-device.breaker-b{color:#333;background:#e6b800}.cabinet-device.breaker-c{background:#28a745}.cabinet-device.breaker-d{background:#dc3545}.cabinet-device.rcd{background:#007bff}.cabinet-device.dif{background:#fd7e14}.cabinet-device.spd{background:#6c757d}.cabinet-device.contactor{background:#17a2b8}.cabinet-device.voltage-relay{background:#20c997}.cabinet-device.meter{color:#333;background:#adb5bd}.cabinet-device.power-limiter{color:#333;background:#ffc107}.cabinet-device.cross-module{background:#343a40}.cabinet-device.priority-relay{background:#7952b3}.cabinet-palette{background:var(--panel-bg-secondary);border:1px solid var(--border-color);border-radius:8px;flex-direction:column;gap:4px;min-width:140px;padding:8px;display:flex}.cabinet-palette-item{cursor:grab;border-radius:4px;align-items:center;gap:8px;padding:6px 8px;font-size:12px;transition:background .15s;display:flex}.cabinet-palette-item:hover{background:var(--button-hover)}.cabinet-palette-color{border-radius:2px;flex-shrink:0;width:12px;height:12px}.cabinet-summary{color:var(--text-secondary);align-items:center;gap:12px;font-size:13px;display:flex}[title]{position:relative}.help-content h3{color:var(--text-color);margin:12px 0 6px;font-size:14px}.help-content p{color:var(--text-secondary);margin-bottom:8px;font-size:13px;line-height:1.5}.help-content kbd{background:var(--button-bg);border:1px solid var(--border-color);color:var(--text-color);border-radius:4px;padding:2px 6px;font-family:monospace;font-size:12px;display:inline-block}.properties-actions{flex-wrap:wrap;gap:6px;padding:8px 12px;display:flex}.properties-actions .toolbar-btn{flex-direction:row;gap:4px;height:28px;font-size:12px}.door-direction-selector{gap:4px;display:flex}.door-direction-btn{border:1px solid var(--border-color);background:var(--input-bg);cursor:pointer;border-radius:4px;justify-content:center;align-items:center;width:32px;height:32px;font-size:14px;transition:background .15s,border-color .15s;display:flex}.door-direction-btn:hover{background:var(--button-hover)}.door-direction-btn.active{border-color:var(--active-bg);background:var(--active-bg);color:var(--active-text)}.about-modal-body{max-height:70vh;padding:0;overflow-y:auto}.about-hero{text-align:center;background:var(--panel-bg-secondary);border-bottom:1px solid var(--border-color);padding:24px 20px 20px}.about-hero-logo{letter-spacing:-.5px;color:var(--text-color);margin-bottom:4px;font-size:32px;font-weight:800}.about-hero-subtitle{color:var(--text-secondary);margin-bottom:8px;font-size:13px;font-weight:500}.about-hero-version{color:var(--text-secondary);text-transform:uppercase;letter-spacing:.5px;background:var(--border-color);border-radius:12px;padding:2px 10px;font-size:11px;font-weight:600;display:inline-block}.about-section{border-bottom:1px solid var(--border-color);padding:20px}.about-section:last-child{border-bottom:none}.about-section-title{text-transform:uppercase;letter-spacing:.8px;color:var(--text-secondary);align-items:center;gap:8px;margin-bottom:14px;font-size:13px;font-weight:700;display:flex}.about-section-title:after{content:"";background:var(--border-color);flex:1;height:1px;margin-left:4px}.about-text{color:var(--text-color);white-space:pre-line;font-size:13px;line-height:1.7}.about-text-secondary{color:var(--text-secondary);white-space:pre-line;font-size:12px;line-height:1.7}.about-features-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;display:grid}.about-feature-card{border:1px solid var(--border-color);background:var(--panel-bg);border-radius:6px;align-items:flex-start;gap:10px;padding:12px;transition:border-color .15s,box-shadow .15s;display:flex}.about-feature-card:hover{border-color:var(--accent-color);box-shadow:var(--shadow)}.about-feature-icon{flex-shrink:0;font-size:20px;line-height:1}.about-feature-title{color:var(--text-color);margin-bottom:2px;font-size:12px;font-weight:600}.about-feature-desc{color:var(--text-secondary);font-size:11px;line-height:1.4}.about-list{margin:0;padding:0;list-style:none}.about-list li{color:var(--text-color);align-items:center;gap:8px;padding:2px 0;font-size:13px;line-height:1.8;display:flex}.about-list-allowed:before{content:"✓";color:var(--success-color);flex-shrink:0;font-weight:700}.about-list-prohibited:before{content:"✗";color:var(--danger-color);flex-shrink:0;font-weight:700}.about-warning-box{background:#ffc1071f;border:1px solid #ffc10766;border-radius:6px;padding:14px 16px}.about-warning-box .about-text{color:#856404}[data-theme=dark] .about-warning-box .about-text{color:#ffdf7e}.about-owner-block{background:var(--panel-bg-secondary);border:1px solid var(--border-color);border-radius:6px;padding:16px}.about-owner-name{color:var(--text-color);margin-bottom:4px;font-size:15px;font-weight:700}.about-owner-desc{color:var(--text-secondary);margin-bottom:10px;font-size:12px}.about-owner-services{flex-wrap:wrap;gap:6px;margin-bottom:12px;display:flex}.about-owner-service-tag{background:var(--border-color);color:var(--text-secondary);border-radius:12px;padding:3px 10px;font-size:11px;font-weight:500}.about-owner-contact{flex-wrap:wrap;gap:16px;font-size:12px;display:flex}.about-owner-contact a{color:var(--accent-color);font-weight:600;text-decoration:none}.about-owner-contact a:hover{text-decoration:underline}.about-footer-bar{color:var(--text-secondary);background:var(--panel-bg-secondary);border-top:1px solid var(--border-color);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding:10px 16px;font-size:11px;display:flex}.about-footer-bar a{color:var(--text-secondary);text-decoration:none}.about-footer-bar a:hover{color:var(--accent-color);text-decoration:underline}@media (width<=600px){.about-features-grid{grid-template-columns:1fr}.about-footer-bar{flex-direction:column;align-items:flex-start;gap:6px}}.mobile-only{display:none!important}@media (width<=768px){.mobile-only{display:flex!important}.desktop-only{display:none!important}.mobile-overlay{z-index:140;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#00000073;animation:.2s fadeIn;position:fixed;inset:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.layout-sidebar-left,.layout-sidebar-right{z-index:150;background:var(--panel-bg);max-width:320px;transition:transform .25s cubic-bezier(.4,0,.2,1);position:fixed;top:0;bottom:0;transform:translate(-100%);box-shadow:4px 0 16px #0003;width:85vw!important}.layout-sidebar-right{left:auto;right:0;transform:translate(100%);box-shadow:-4px 0 16px #0003}.layout-sidebar-left.open,.layout-sidebar-right.open{transform:translate(0)}.layout-body{padding-top:32px;padding-bottom:110px}.layout-header{z-index:100;height:auto;position:fixed;inset:auto 0 28px}.layout-footer{z-index:90;position:fixed;bottom:0;left:0;right:0}.toolbar{overflow:visible}.toolbar-row{flex-wrap:nowrap;height:40px;padding:0 4px}.toolbar-btn{width:36px;min-width:32px;height:36px;padding:0 2px;font-size:10px}.toolbar-btn .icon{font-size:12px}.toolbar-btn span:nth-child(2){display:none}.toolbar-project-name{max-width:80px;font-size:10px}.toolbar-group{gap:1px;padding:0 2px}.toolbar-brand-btn-sochi span:nth-child(2),.toolbar-brand-btn-nn span:nth-child(2){display:none}.toolbar-brand-btn-sochi,.toolbar-brand-btn-nn{justify-content:center;width:32px;padding:0}.modal-container{width:96vw;max-height:90vh;margin:8px auto;max-width:96vw!important}.modal-body{max-height:calc(90vh - 100px)}.properties-group-body{padding:10px}.property-row{flex-direction:column;align-items:stretch;gap:4px}.property-label{width:auto;font-size:11px}.property-value{width:100%}.property-input,.property-select{min-height:36px;font-size:14px}.sidebar-category-header{min-height:40px;padding:10px 12px}.sidebar-item{min-height:44px;padding:10px 12px}.toast-container{top:8px;left:8px;right:8px}.toast-item{max-width:100%}.canvas-info{font-size:10px;bottom:90px}}@media (width<=480px){.toolbar-row{height:34px}.toolbar-btn{width:36px;min-width:32px;height:32px;font-size:11px}.toolbar-btn .icon{font-size:13px}.toolbar-group{gap:0;padding:0 1px}.toolbar-project-name,.toolbar-brand-btn span:nth-child(2){display:none}.toolbar-dropdown-menu{min-width:140px}.toolbar-dropdown-item{min-height:40px;padding:6px 10px;font-size:12px}.toolbar-brand-btn{justify-content:center;width:28px;padding:0}.toolbar-brand-btn-sochi span:nth-child(2),.toolbar-brand-btn-nn span:nth-child(2){display:none}.toolbar-brand-btn-sochi,.toolbar-brand-btn-nn{justify-content:center;width:28px;padding:0}.toolbar-phone-btn{padding:0 4px;font-size:10px}.toolbar-app-logo .logo-text{display:none}.toolbar-app-logo{padding:0 4px}.status-bar{height:24px;font-size:10px}.status-item{padding:0 4px}.modal-container{border-radius:8px}.modal-header{padding:10px 12px;font-size:14px}.modal-body{padding:12px}.modal-footer{padding:10px 12px}.about-hero-logo{font-size:24px}.about-feature-card{padding:10px}.about-section{padding:14px}.properties-group-header{padding:8px 12px}.properties-group-title{font-size:12px}}.sw-update-toast{z-index:10000;background:var(--accent-color);color:#fff;box-shadow:var(--shadow-lg);border-radius:8px;align-items:center;gap:10px;padding:10px 16px;font-size:13px;animation:.3s slideIn;display:flex;position:fixed;bottom:40px;right:20px}.sw-update-toast button{color:#fff;cursor:pointer;background:#fff3;border:none;border-radius:4px;padding:4px 10px;font-size:12px;font-weight:600}.sw-update-toast button:hover{background:#ffffff59}@media print{.layout-header,.layout-sidebar-left,.layout-sidebar-right,.layout-footer,.mobile-overlay,.mobile-drawer,.toast-container,.sw-update-toast,.modals-root,.toolbar-dropdown{display:none!important}.layout-body{height:auto!important;position:static!important}.layout-canvas,.gorky-cad-pro{width:100%!important;height:100%!important;overflow:visible!important}canvas,.konvajs-content{width:100%!important;height:100%!important}@page{margin:10mm;size:auto}.gorky-cad-pro,.layout-canvas,canvas,.konvajs-content{-webkit-print-color-adjust:exact;print-color-adjust:exact;background:#fff!important}}@media (pointer:coarse){.toolbar-btn,.toolbar-dropdown-item,.sidebar-item,.sidebar-category-header,.property-input,.property-select,.modal-btn,.canvas-control-btn{min-height:44px}.toolbar-btn-icon-only{min-width:44px;min-height:44px}}.mobile-overlay{z-index:140;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#0006;animation:.2s fadeIn;position:fixed;inset:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.sidebar-item,.toolbar-btn,.canvas-control-btn,.properties-tab,.property-input,.property-select,.sidebar-category-header,.properties-group-header,.modal-btn,.toolbar-dropdown-item{-webkit-tap-highlight-color:transparent}.sidebar-item,.toolbar-btn,.canvas-control-btn,.properties-tab,.modal-btn{touch-action:manipulation}@media (width<=768px){.sidebar-item{min-height:72px;padding:8px 4px}.sidebar-item-icon{width:36px;height:36px;font-size:24px}.sidebar-item-label{font-size:11px}.sidebar-category-header{padding:10px 8px}.sidebar-search input{height:36px;font-size:14px}.properties-tab{padding:10px 8px;font-size:12px}.property-input,.property-select{height:36px;font-size:14px}.property-row{margin-bottom:10px}.modal-container{width:95%;max-width:95vw;max-height:85vh}.modal-body{padding:16px}.canvas-control-btn{width:40px;height:40px;font-size:18px}}.sidebar-item,.toolbar-btn,.canvas-control-btn,.properties-tab{-webkit-user-select:none;user-select:none}
