:root{--bg:#f4f4f1;--panel:#fff;--ink:#161616;--muted:#6e6e68;--line:#deded8;--soft:#f7f7f4;--accent:#111;--ok:#19733b;--warn:#a66b00;--bad:#a92d2d;--purple:#9333ea;--orange:#f97316;--blue:#0ea5e9}
*{box-sizing:border-box}html{font-size:16px}body{margin:0;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink);font-size:16px;line-height:1.4}button,input,select{font:inherit}button{cursor:pointer}.hidden{display:none!important}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.brand{display:flex;gap:13px;align-items:center}.brand-mark{width:42px;height:42px;border-radius:11px;background:#111;color:#fff;display:grid;place-items:center;font-size:18px;font-weight:900}.brand strong{display:block;font-size:18px;letter-spacing:.04em}.brand span{display:block;color:var(--muted);font-size:14px;margin-top:2px}.top-actions{display:flex;gap:10px;align-items:center}.button{border:1px solid var(--line);border-radius:12px;padding:11px 18px;background:#fff;font-weight:800;font-size:16px;min-height:46px}.button:hover{filter:brightness(.97)}.button.primary{background:#111;color:#fff;border-color:#111}.button.dark{background:#151515;color:white;border-color:#151515}.button.light{background:white}.button.compact{padding:8px 14px;min-height:40px;font-size:15px}.button.large{padding:15px 22px;font-size:17px}.button.danger{color:#9f2c2c;border-color:#e8bcbc;background:#fff8f8}.button:disabled{opacity:.4;cursor:not-allowed}.icon-btn{border:1px solid var(--line);background:#fff;border-radius:11px;width:40px;height:40px;font-size:21px;font-weight:800}.app-shell{display:grid;grid-template-columns:300px minmax(0,1fr);min-height:calc(100vh - 76px)}.library{background:#fff;border-right:1px solid var(--line);padding:22px 16px;position:sticky;top:76px;height:calc(100vh - 76px);overflow:auto}.library-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.library h1{font-size:30px;margin:0}.eyebrow{font-size:12px;font-weight:900;letter-spacing:.14em;color:var(--muted);margin:0 0 4px}.search{width:100%;border:1px solid var(--line);border-radius:12px;padding:12px 13px;font-size:15px;background:#fff}.program-list{display:flex;flex-direction:column;gap:9px;margin-top:12px}.program-card{border:1px solid var(--line);background:#fff;border-radius:14px;padding:13px;text-align:left;display:grid;gap:5px}.program-card.active{border:2px solid #111;padding:12px}.program-card strong{font-size:17px}.program-card .name{font-size:14px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.program-card .meta{display:flex;justify-content:space-between;color:var(--muted);font-size:12px}.empty{padding:25px 10px;color:var(--muted);text-align:center}.workspace{min-width:0}.welcome{min-height:calc(100vh - 76px);display:grid;place-items:center;padding:40px}.welcome-card{max-width:760px;background:#fff;border:1px solid var(--line);border-radius:24px;padding:42px;box-shadow:0 20px 70px rgba(0,0,0,.06)}.welcome-card h2{font-size:40px;line-height:1.08;margin:8px 0 18px}.welcome-card p:not(.eyebrow){font-size:18px;color:var(--muted);line-height:1.55}.editor{padding:18px}.program-head{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px 18px;display:flex;justify-content:space-between;gap:15px;align-items:center}.program-name-row{display:flex;gap:8px;align-items:center}.order-number{font-size:24px;font-weight:900;border:0;border-bottom:1px solid var(--line);padding:2px 2px 4px;width:280px}.file-name{font-size:14px;color:var(--muted);display:block;margin-top:5px}.program-head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.status-pill{border-radius:999px;padding:7px 11px;font-size:12px;font-weight:900;background:#eee}.step-nav{display:grid;grid-template-columns:repeat(9,minmax(96px,1fr));gap:7px;margin:14px 0;overflow-x:auto}.step-btn{border:1px solid var(--line);background:#fff;border-radius:13px;padding:12px 11px;text-align:left;min-width:104px}.step-btn .num{width:28px;height:28px;border-radius:50%;display:inline-grid;place-items:center;background:#ecece8;font-weight:900;font-size:14px;margin-right:5px}.step-btn .label{display:block;font-size:14px;font-weight:850;line-height:1.2;margin-top:6px}.step-btn.active{background:#111;color:#fff;border-color:#111}.step-btn.active .num{background:#fff;color:#111}.step-btn.done:not(.active){border-color:#b7d8c2;background:#f2faf5}.step-btn.done .num{background:#dcefe2;color:#18572e}.wizard-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(390px,.75fr);gap:14px}.drawing-panel,.step-panel{background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;min-width:0}.drawing-head{height:72px;padding:13px 16px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.drawing-head h3{font-size:22px;margin:0}.drawing-actions{display:flex;gap:6px}.canvas-wrap{height:calc(100vh - 330px);min-height:560px;background:#fbfbf9;position:relative;overflow:hidden}.canvas-wrap svg{width:100%;height:100%;display:block}.canvas-empty{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-size:18px}.drawing-legend{min-height:54px;border-top:1px solid var(--line);padding:10px 14px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}.legend-item{display:inline-flex;gap:7px;align-items:center;border:1px solid var(--line);border-radius:999px;padding:7px 11px;font-size:14px;font-weight:700;background:#fff}.legend-dot{width:10px;height:10px;border-radius:50%;display:inline-block}.step-panel{display:flex;flex-direction:column;min-height:calc(100vh - 200px)}.step-panel #stepContent{padding:20px;overflow:auto;flex:1}.step-title{margin-bottom:18px}.step-title h2{font-size:28px;line-height:1.12;margin:4px 0 7px}.step-title p{color:var(--muted);font-size:16px;margin:0;line-height:1.5}.wizard-actions{border-top:1px solid var(--line);padding:13px 16px;display:flex;justify-content:space-between;gap:10px}.card{border:1px solid var(--line);border-radius:14px;background:#fff;padding:14px;margin-bottom:11px}.card.soft{background:var(--soft)}.card h3{font-size:19px;margin:0 0 8px}.card p{font-size:15px;color:var(--muted);margin:5px 0}.field{display:grid;gap:6px;margin:11px 0}.field label,.field>span{font-size:15px;font-weight:850}.field input,.field select{width:100%;border:1px solid var(--line);border-radius:10px;padding:11px 12px;background:#fff;font-size:16px;min-height:46px}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.radio-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.radio-card{border:1px solid var(--line);border-radius:12px;padding:11px;display:flex;gap:8px;align-items:flex-start;background:#fff}.radio-card input{margin-top:3px}.radio-card strong{font-size:15px;display:block}.radio-card small{display:block;color:var(--muted);font-size:13px;margin-top:2px}.geometry-list,.item-list{display:flex;flex-direction:column;gap:8px}.geometry-row,.item-row{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:10px 11px}.geometry-row .badge,.item-row .badge{font-size:13px;font-weight:900;border-radius:999px;padding:6px 10px;background:#efefeb}.geometry-row strong,.item-row strong{font-size:15px}.geometry-row small,.item-row small{font-size:13px;color:var(--muted);display:block}.item-row.selected{border:2px solid #111;background:#f6f6f2}.notice{border-radius:12px;padding:12px 13px;font-size:15px;line-height:1.45;margin-bottom:11px}.notice.ok{background:#eaf7ee;color:#18572e;border:1px solid #b9dec4}.notice.warn{background:#fff8e9;color:#845700;border:1px solid #ead9ab}.notice.bad{background:#fff0f0;color:#8c2727;border:1px solid #e4b6b6}.summary-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.summary-box{border:1px solid var(--line);border-radius:12px;padding:11px}.summary-box span{display:block;color:var(--muted);font-size:13px}.summary-box strong{display:block;font-size:19px;margin-top:2px}.layer-table{display:flex;flex-direction:column;gap:6px}.layer-row{display:grid;grid-template-columns:14px 100px 1fr;gap:8px;align-items:center;border:1px solid var(--line);border-radius:10px;padding:9px}.layer-row code{font-size:16px;font-weight:900}.layer-row span{font-size:14px}.source-segment{stroke-width:5!important;stroke:#7c3aed!important;opacity:.45}.source-segment.selected{stroke:#ef4444!important;opacity:1}.dxf-shape{fill:none;stroke:#333;stroke-width:1.8;vector-effect:non-scaling-stroke}.dxf-shape.outer{stroke:#202020;stroke-width:2.4}.dxf-shape.inner{stroke:#777}.dxf-shape.hole{stroke:#9a6b21}.dxf-shape.focus{stroke:#2563eb;stroke-width:4}.dxf-shape.dimmed{opacity:.2}.dxf-shape.assigned{stroke-width:3.2}.engraving-candidate{stroke:#7c3aed;stroke-dasharray:5 3;stroke-width:2.5;fill:none;vector-effect:non-scaling-stroke}.engraving-candidate.selected{stroke:#dc2626;stroke-width:4}.entry-overlay{stroke:var(--purple);stroke-width:3;stroke-dasharray:6 4;fill:none;vector-effect:non-scaling-stroke}.break-overlay{stroke:var(--orange);stroke-width:7;stroke-linecap:round;fill:none;vector-effect:non-scaling-stroke}.waterjet-overlay{stroke:var(--blue);stroke-width:2.5;stroke-dasharray:8 5;fill:none;vector-effect:non-scaling-stroke}.check-list{display:flex;flex-direction:column;gap:7px}.check-item{border:1px solid var(--line);border-radius:10px;padding:10px 11px;font-size:14px}.check-item.ERROR{background:#fff2f2;border-color:#e1b4b4}.check-item.WARNING{background:#fff9ec;border-color:#e4d2a9}.check-item strong{display:block}.check-item span{display:block;color:var(--muted);margin-top:2px}.manual-pick{display:flex;gap:8px;align-items:center}.manual-pick .value{font-size:13px;color:var(--muted)}.step-confirm{display:flex;gap:8px;align-items:center;margin-top:12px}.step-confirm input{width:20px;height:20px}.step-confirm label{font-weight:800;font-size:15px}.toast{position:fixed;right:22px;bottom:22px;z-index:80;background:#111;color:#fff;border-radius:12px;padding:14px 18px;max-width:480px;font-size:15px;box-shadow:0 18px 60px rgba(0,0,0,.25)}dialog{border:0;border-radius:20px;padding:0;width:min(580px,92vw);box-shadow:0 30px 110px rgba(0,0,0,.28)}dialog::backdrop{background:rgba(0,0,0,.45)}.dialog-card{padding:25px}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:18px}.dialog-head h2{font-size:28px;margin:3px 0}.dialog-card label{display:grid;gap:7px;font-size:14px;font-weight:850;margin:13px 0}.dialog-card input{border:1px solid var(--line);border-radius:10px;padding:12px}.dialog-note{font-size:13px;color:var(--muted);line-height:1.45}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
@media(max-width:1200px){.app-shell{grid-template-columns:250px 1fr}.wizard-grid{grid-template-columns:1fr}.step-panel{min-height:620px}.canvas-wrap{height:560px}.step-nav{grid-template-columns:repeat(9,110px)}}
@media(max-width:760px){.topbar{padding:0 12px}.brand span{display:none}.app-shell{display:block}.library{position:static;height:auto;max-height:300px;border-right:0;border-bottom:1px solid var(--line)}.editor{padding:10px}.program-head{align-items:flex-start;flex-direction:column}.step-nav{grid-template-columns:repeat(9,105px)}.canvas-wrap{height:470px}.field-row,.radio-grid,.summary-grid{grid-template-columns:1fr}.wizard-grid{display:block}.drawing-panel{margin-bottom:10px}.step-panel{min-height:0}.welcome-card{padding:28px}.welcome-card h2{font-size:32px}}
/* V4.2 */
.cutout-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.cutout-head h3 small{font-weight:700;color:var(--muted);font-size:14px;margin-left:6px}.field-row.compact{grid-template-columns:auto auto;gap:6px}.check-inline{display:flex;gap:9px;align-items:center;font-size:15px;font-weight:700;margin:10px 0}.check-inline input{width:20px;height:20px}.code-preview{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:14px;background:#f4f4f0;border:1px dashed var(--line);border-radius:10px;padding:9px 11px;margin:8px 0;min-height:20px;color:#333}.code-preview:empty{display:none}details.card summary{cursor:pointer;font-weight:850;font-size:16px}.item-list.small .item-row{padding:7px 10px}.item-list.small .item-row strong{font-size:14px}.rohglas-overlay{stroke:#6b7280;stroke-width:2;stroke-dasharray:3 4;fill:none;vector-effect:non-scaling-stroke}.entry-dot{fill:var(--purple);stroke:#fff;stroke-width:1.5}
.card.warn-border{border:2px solid #b9761d}
/* V4.4 Schnittdarstellungen */
.section-view{margin:10px 0;border:1px solid var(--line);border-radius:12px;padding:8px 10px;background:#fff}.section-view small{display:block;color:var(--muted);font-size:13px;margin-top:4px}
.sec-glass{fill:#dbeafe;stroke:#1e3a8a;stroke-width:1.5}.sec-tool{fill:rgba(147,51,234,.10);stroke:#9333ea;stroke-width:1;stroke-dasharray:4 3}.sec-dim{stroke:#b45309;stroke-width:1;stroke-dasharray:3 2}.sec-txt{font-size:13px;font-weight:700;fill:#111}.sec-lbl{font-size:12px;fill:#555}
.countersink-ring{fill:none;stroke:#b45309;stroke-width:1.5;stroke-dasharray:4 3;vector-effect:non-scaling-stroke}.mill-band{fill:none;stroke:rgba(147,51,234,.28);stroke-linecap:round;stroke-linejoin:round}
/* V4.5.11 Login */
.login-body{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card{width:100%;max-width:420px;background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:28px 28px 22px;box-shadow:0 10px 30px rgba(0,0,0,.06)}.login-card .brand{display:flex;gap:12px;align-items:center;margin-bottom:18px}.login-card .brand span{display:block;color:var(--muted);font-size:14px}.login-card h1{font-size:26px;margin:0 0 14px}.login-card .field{margin-bottom:14px}.login-card .button{width:100%;margin-top:6px}.login-hint{color:var(--muted);font-size:13px;margin:16px 0 0;text-align:center}
