:root{font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:#27323b;background:#f4f5f6;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{border:1px solid #d9dee3;background:white;color:#34404a;border-radius:6px;padding:9px 12px;cursor:pointer;white-space:nowrap}button:hover{background:#f4f6f7}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #9a4450;outline-offset:1px}.primary{background:#792b35;color:white;border-color:#792b35}.primary:hover{background:#62212a}input:not([type=checkbox]):not([type=file]),select{border:1px solid #d9dee3;border-radius:6px;background:white;padding:9px 10px;width:100%;min-width:0;color:#25313a}label{display:block;font-size:12px;color:#66737e;margin:12px 0 6px}h1,h2,h3,p{margin-top:0}h2{font-size:14px;font-weight:650;margin-bottom:14px}h3{font-size:12px;margin:20px 0 8px;color:#53616b}.topbar{height:66px;background:white;border-bottom:1px solid #e1e5e9;display:flex;align-items:center;justify-content:space-between;padding:0 20px;gap:15px}.brand{display:flex;align-items:center;gap:12px}.brand>div{display:flex;flex-direction:column;gap:3px}.brand span:not(.brand-mark){font-size:11px;color:#7a858e}.brand-mark{width:43px;height:43px;display:grid;place-items:center;background:#792b35;color:white;font-size:22px;font-weight:700;border-radius:8px}.brand-mark.small{width:36px;height:36px;font-size:18px}.top-actions{display:flex;align-items:center;gap:10px}.save-state{font-size:12px;color:#6c7881}.shell{display:grid;grid-template-columns:270px minmax(0,1fr) 290px;min-height:calc(100vh - 66px)}.sidebar,.inspector{background:white;padding:18px;min-width:0}.sidebar{border-right:1px solid #e2e6e9}.inspector{border-left:1px solid #e2e6e9}.sidebar-section{padding-bottom:21px;margin-bottom:21px;border-bottom:1px solid #e9ecef}.sidebar-section:last-child{border:0}.section-heading{display:flex;align-items:center;justify-content:space-between}.section-heading h2{margin:0}.section-heading button{padding:6px 11px}.wide{width:100%;margin-top:10px}.tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.tool-grid button{padding:12px 5px}.part-list{max-height:280px;overflow:auto;display:flex;flex-direction:column;gap:5px}.part-row{display:flex;align-items:center;gap:8px;width:100%;text-align:left;white-space:normal}.part-row.active{background:#f7eaec;border-color:#bb8790}.part-row small{display:block;color:#7b858e;font-size:11px;margin-top:2px}.part-row .number{font-size:11px;color:#792b35;min-width:48px}.workspace{display:flex;flex-direction:column;min-width:0;padding:16px;gap:12px}.view-toolbar,.statusbar,.summary{background:white;border:1px solid #e0e5e9;border-radius:8px}.view-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:10px}.segmented{display:flex;gap:3px;flex-wrap:wrap}.segmented button{padding:8px 10px;border-color:transparent}.segmented button.active{background:#f6e9eb;color:#702833}.view-controls{display:flex;flex-wrap:wrap;gap:14px}.view-controls label{margin:0;display:flex;align-items:center;gap:5px;font-size:12px}.viewport{min-height:420px;flex:1;position:relative;background:#fafbfc;border:1px solid #e0e5e9;border-radius:8px;overflow:hidden}#scene{position:absolute;inset:0}#scene canvas{display:block;width:100%;height:100%}.labels{position:absolute;inset:0;pointer-events:none;overflow:hidden}.model-label{position:absolute;transform:translate(-50%,-50%);background:#fffef2e8;border:1px solid #cdd7d8;border-radius:3px;padding:2px 5px;font-size:11px;color:#25323a;white-space:nowrap}.viewport-hint{position:absolute;bottom:12px;left:14px;font-size:11px;color:#7a858e;background:#ffffffdd;padding:5px 8px;border-radius:4px}.statusbar{display:flex;align-items:center;justify-content:space-between;padding:8px 13px;gap:10px;color:#66737e;font-size:12px}.statusbar>div{display:flex;align-items:center;gap:8px}.statusbar label{margin:0}.statusbar select{width:auto;padding:5px}.summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:14px 0}.metric{display:flex;flex-direction:column;gap:5px;padding:0 18px;min-width:0}.metric+.metric{border-left:1px solid #e5e8ea}.metric span{font-size:11px;color:#7b858e}.metric strong{font-size:19px;font-weight:650;white-space:nowrap}.empty,.helper,.note p{font-size:12px;color:#75818b;line-height:1.6}.part-id{background:#f7ecee;color:#792b35;font-weight:650;font-size:12px;border-radius:5px;padding:9px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 10px}.inspector-actions{display:flex;gap:8px;margin-top:20px}.inspector-actions button{flex:1}.danger{color:#a33f39;border-color:#e5b9b6}.note{margin-top:26px;padding:14px;background:#f5f7f8;border-radius:7px}.note strong{font-size:12px}.note p{margin:6px 0 0}.auth{position:fixed;inset:0;display:grid;place-items:center;background:#eef1f3;z-index:10;padding:20px}.auth-card{background:white;border:1px solid #e0e5e9;border-radius:10px;padding:32px;width:min(100%,390px);box-shadow:0 12px 40px #1b303610}.auth-card h1{font-size:22px;margin:18px 0 8px}.auth-card p{color:#7b858e}.auth-card button{width:100%;margin-top:16px}.auth-card small{color:#8c959c}.error{color:#b0413b!important;min-height:20px}.modal{position:fixed;inset:0;background:#15212d80;display:grid;place-items:center;z-index:20;padding:20px}.modal[hidden],#auth[hidden],#app[hidden],#partEditor[hidden],#emptySelection[hidden]{display:none!important}.modal-card{width:min(100%,560px);max-height:90vh;overflow:auto;background:white;border-radius:10px;padding:24px}.modal-header{display:flex;justify-content:space-between;align-items:center}.modal-header h2{font-size:18px;margin:0}.modal-card>p{margin-top:16px;line-height:1.5;color:#66737e}.update-info{display:flex;justify-content:space-between;background:#f4f7f8;border-radius:6px;padding:12px}.modal-card input[type=file]{display:block;margin:8px 0 14px;max-width:100%}.history{font-size:12px;line-height:1.8;color:#66737e;white-space:pre-wrap}@media(max-width:1100px){.shell{grid-template-columns:240px minmax(0,1fr)}.inspector{grid-column:1/-1;border-left:0;border-top:1px solid #e2e6e9;display:block}.inspector #partEditor{max-width:720px}.viewport{min-height:470px}}@media(max-width:700px){.topbar{height:auto;min-height:64px;padding:10px;flex-wrap:wrap}.top-actions{margin-left:auto}.save-state{display:none}.shell{display:flex;flex-direction:column}.sidebar{border-right:0;border-bottom:1px solid #e2e6e9}.workspace{padding:10px}.viewport{min-height:430px}.view-toolbar{align-items:flex-start}.metric{padding:0 10px}.metric strong{font-size:16px}.viewport-hint{font-size:10px}.inspector{padding:16px}}

/* CI Dunkelrot: ruhige Akzente, einheitliche Abstände und kontrollierter Umbruch */
:root{--ci:#792b35;--ci-dark:#62212a;--border:#e3e4e6} .topbar{border-top:4px solid var(--ci);height:70px}.brand-mark{border-radius:6px}.auth{background:#f2eeef}.auth-card{border-top:4px solid var(--ci)}.sidebar-section h2,.inspector h2{color:#3e3033}.metric strong,.part-row strong,.part-id{overflow-wrap:anywhere}.part-row{min-width:0}.part-row>span:last-child{min-width:0;overflow-wrap:anywhere}.viewport-hint{max-width:calc(100% - 28px);white-space:normal}.summary .metric{min-width:0}.metric strong{white-space:normal;overflow-wrap:anywhere}.view-controls{align-items:center}.tool-grid button{white-space:normal;min-height:43px}.sidebar,.inspector{overflow-wrap:anywhere}@media(max-width:700px){.topbar{height:auto}.summary{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* V0.1.4: Testbereich und kompakte, einheitliche Bedienelemente */
.test-tools .wide{white-space:normal;min-height:40px}.test-summary{font-size:12px;font-weight:600;color:#792b35;margin-top:12px;line-height:1.5}.test-results{max-height:210px;overflow:auto;margin-top:7px}.test-result{font-size:11px;line-height:1.45;padding:5px 7px;border-radius:4px;margin:3px 0;overflow-wrap:anywhere}.test-pass{background:#edf6ee;color:#28613b}.test-fail{background:#fff0ee;color:#9a3129}.sidebar{overflow-y:auto}.view-toolbar button{font-size:13px}.test-tools h2{margin-bottom:8px}

/* Version 0.1.6: ruhiges Dashboard mit konsistenten Karten und Abständen */
.dashboard-layer[hidden]{display:none!important}.dashboard-layer{position:fixed;inset:0;z-index:80;background:rgba(27,24,25,.42);display:grid;place-items:center;padding:20px;overflow:auto}.dashboard-card{width:min(820px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border:1px solid #e6e2e3;border-radius:9px;box-shadow:0 16px 48px #271a1a2e;padding:26px;box-sizing:border-box}.dashboard-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;border-bottom:1px solid #e9e9ea;padding-bottom:18px}.dashboard-head h2{font-size:24px;line-height:1.2;margin:4px 0 7px;color:#292e35}.dashboard-head p{font-size:13px;color:#65717e;margin:0;overflow-wrap:anywhere}.dash-kicker{font-size:11px;letter-spacing:.07em;font-weight:700;color:#792b35}.dash-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.dash-metrics article{background:#f7f7f8;border:1px solid #e6e7e9;border-radius:7px;padding:16px;min-width:0}.dash-metrics span{display:block;color:#687481;font-size:12px;margin-bottom:9px}.dash-metrics strong{display:block;color:#2d3339;font-size:22px;line-height:1.2;overflow-wrap:anywhere}.dash-body{display:grid;grid-template-columns:1fr 1fr;gap:18px}.dash-body>div{border:1px solid #e6e7e9;border-radius:7px;padding:18px;min-width:0}.dash-body h3{font-size:14px;margin:0 0 13px}.dash-type{padding:8px 0;border-bottom:1px solid #eee;font-size:13px}.dash-type:last-child{border-bottom:0}.dash-actions{display:grid;gap:9px}.dash-actions button{min-height:40px}.view-toolbar .segmented{flex-wrap:wrap}.view-toolbar #dashboardBtn{color:#792b35;font-weight:650}@media(max-width:700px){.dashboard-card{padding:17px}.dash-metrics{gap:7px}.dash-metrics article{padding:10px}.dash-metrics strong{font-size:16px}.dash-body{grid-template-columns:1fr}}

/* V0.2.0: Kompaktes, eigenständiges Dashboard und bildschirmfüllender Editor */
#editorShell[hidden],#dashboard[hidden]{display:none!important}
#dashboard.dashboard-page{display:flex;flex-direction:column;gap:14px;width:min(1380px,100%);height:calc(100dvh - 70px);margin:0 auto;padding:20px 24px;overflow:auto}
.dash-title{display:flex;justify-content:space-between;align-items:center;gap:16px}.dash-title h1{font-size:23px;margin:4px 0}.dash-title p{font-size:13px;color:#6d7881;margin:0}.dash-title-actions{display:flex;gap:8px;flex-wrap:wrap}
.dashboard-page .dash-metrics{margin:0;gap:12px}.dashboard-page .dash-metrics article{padding:13px 16px;background:white}.dashboard-page .dash-metrics span{margin-bottom:6px}.dashboard-page .dash-metrics strong{font-size:21px}.dashboard-page .dash-metrics .dash-project-title{font-size:16px;line-height:1.45}
.dash-projects{background:white;border:1px solid #e1e5e8;border-radius:8px;min-height:0;display:flex;flex-direction:column;flex:1;overflow:hidden}.dash-projects-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 17px;border-bottom:1px solid #e7e9eb}.dash-projects-head h2{margin:0;font-size:15px}.dash-projects-head span{font-size:12px;color:#79838a}.dash-table-wrap{overflow:auto;flex:1}.dash-table{border-collapse:collapse;width:100%;min-width:650px}.dash-table th,.dash-table td{text-align:left;padding:12px 16px;border-bottom:1px solid #edf0f1;font-size:13px}.dash-table th{position:sticky;top:0;background:#f8f9fa;color:#69747d;font-size:11px;z-index:1}.dash-table th:last-child{width:340px}.dash-row-actions{display:flex;gap:6px;flex-wrap:wrap}.dash-row-actions button{padding:7px 9px;font-size:12px}.dash-empty{color:#7b858d;text-align:center;padding:45px!important}.dash-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;color:#7b858d;font-size:12px}.dash-footer>div{display:flex;gap:8px}
#editorShell.shell{height:calc(100dvh - 70px);min-height:0;overflow:hidden;grid-template-columns:228px minmax(0,1fr) 258px}.shell .sidebar,.shell .inspector{overflow:auto;padding:13px}.shell .sidebar-section{padding-bottom:13px;margin-bottom:13px}.shell .sidebar-section h2{margin-bottom:8px}.shell .sidebar label,.shell .inspector label{margin:8px 0 4px}.shell .tool-grid button{min-height:35px;padding:8px 3px}.shell .workspace{min-height:0;padding:10px;gap:8px}.shell .viewport{min-height:180px}.shell .summary{padding:7px 0}.shell .metric strong{font-size:16px}.shell .note{margin-top:15px;padding:10px}.shell .part-list{max-height:28vh}.shell .view-toolbar{padding:6px}.shell .view-controls{gap:9px}.shell .view-toolbar button{padding:7px 8px}.shell .statusbar{padding:6px 10px}
@media(max-width:1100px){#editorShell.shell{grid-template-columns:190px minmax(0,1fr) 220px}.shell .inspector{grid-column:auto;border-left:1px solid #e2e6e9;border-top:0}.shell .workspace{min-width:0}}
@media(max-width:780px){#dashboard.dashboard-page{height:calc(100dvh - 64px);padding:12px;gap:10px}.dash-title{align-items:flex-start;flex-wrap:wrap}.dashboard-page .dash-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.dashboard-page .dash-metrics article{padding:9px}.dashboard-page .dash-metrics strong{font-size:16px}.dash-projects-head span{display:none}#editorShell.shell{display:flex;flex-direction:column;height:auto;min-height:calc(100dvh - 70px);overflow:visible}.shell .sidebar,.shell .inspector{overflow:visible}.shell .workspace{min-height:65vh}.shell .viewport{min-height:420px}.dash-footer{flex-wrap:wrap}}

/* V0.2.1: Kompakte Dialoge, saubere Maßeingaben */
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 12px}.settings-grid>div{min-width:0}.settings-grid label{margin:12px 0 5px}.settings-grid input,.settings-grid select{width:100%}.compact-dialog{max-width:450px}.move-preview{font-size:13px;color:#792b35;background:#f7ecee;padding:10px;border-radius:5px}.modal-card .primary{margin-top:8px}@media(max-width:450px){.settings-grid{grid-template-columns:1fr}}

/* V0.2.2: Bauteil-Kontextmenü */
.part-context{position:fixed;z-index:50;background:white;border:1px solid #ded7d9;border-radius:7px;box-shadow:0 8px 24px #23151b25;padding:5px;width:180px}.part-context[hidden]{display:none!important}.part-context button{display:block;text-align:left;width:100%;border:0;border-radius:4px;padding:9px 10px;background:transparent;font-size:13px}.part-context button:hover{background:#f7ecee;color:#792b35}#scene svg [data-dimension-edit]:hover{stroke:#792b35;stroke-width:1}

#distributionModal select,#distributionModal input{width:100%;margin:6px 0 14px}#distributeBtn{border-color:#792b35;color:#792b35}.part-row.active{box-shadow:inset 3px 0 #792b35}
