:root { color-scheme:light; --ink:#17201b; --muted:#617069; --line:rgba(23,32,27,.14); --blue:#315d8f; --green:#2f7d57; --amber:#a96112; --red:#a74638; --bg:#e8eeeb; }
* { box-sizing:border-box; }
html,body { width:100%; min-height:100%; margin:0; }
body,button,input,select { font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
body { color:var(--ink); background:var(--bg); }
button,a { font:inherit; }
a { color:inherit; text-decoration:none; }
.workbench-app { display:grid; grid-template-columns:minmax(0,1fr) 390px; min-height:100vh; }
.scene { position:relative; min-width:0; min-height:680px; overflow:hidden; background:#dfe6e2; }
.scene canvas { display:block; width:100%; height:100%; }
.scene-nav,.view-controls,.dimension-overlay { position:absolute; z-index:3; display:flex; gap:5px; }
.scene-nav { top:14px; left:14px; }
.scene-nav a,.view-controls button { display:inline-flex; align-items:center; justify-content:center; min-height:34px; padding:0 10px; border:1px solid rgba(23,32,27,.14); border-radius:7px; color:var(--ink); background:rgba(255,255,255,.86); font-size:11px; font-weight:900; backdrop-filter:blur(12px); }
.view-controls { top:14px; right:14px; }
.view-controls button { cursor:pointer; }
.dimension-overlay { left:14px; bottom:14px; flex-direction:column; }
.dimension-overlay span { padding:6px 8px; border:1px solid rgba(23,32,27,.12); border-radius:6px; color:#26312b; background:rgba(255,255,255,.82); font-size:10px; font-weight:850; }
.control-panel { display:flex; flex-direction:column; gap:12px; max-height:100vh; overflow-y:auto; padding:18px; border-left:1px solid var(--line); background:rgba(255,255,255,.95); }
.panel-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.eyebrow,.section-title { margin:0 0 5px; color:var(--muted); font-size:10px; font-weight:900; text-transform:uppercase; }
h1,p { margin:0; letter-spacing:0; }
h1 { max-width:270px; font-size:23px; line-height:1.1; }
.fit-badge { flex:0 0 auto; padding:5px 7px; border:1px solid rgba(169,97,18,.3); border-radius:5px; color:var(--amber); background:rgba(169,97,18,.08); font-size:9px; font-weight:950; }
.fit-badge.pass { color:var(--green); border-color:rgba(47,125,87,.3); background:rgba(47,125,87,.08); }
.fit-badge.blocked { color:var(--red); border-color:rgba(167,70,56,.3); background:rgba(167,70,56,.08); }
.control-section { display:grid; gap:9px; padding:12px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.segmented { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
.assembly-toggle { grid-template-columns:repeat(3,minmax(0,1fr)); }
.segmented button { min-height:34px; padding:0 7px; border:1px solid var(--line); border-radius:6px; color:var(--muted); background:#fff; font-size:10px; font-weight:900; cursor:pointer; }
.segmented button.active { color:#fff; border-color:var(--blue); background:var(--blue); }
.control-section label { display:grid; gap:5px; color:var(--muted); font-size:10px; font-weight:850; }
.control-section label>span { display:flex; justify-content:space-between; gap:10px; }
.control-section label b { color:var(--ink); }
select { width:100%; min-height:36px; padding:0 9px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:#fff; }
input[type="range"] { width:100%; accent-color:var(--blue); }
.fit-result { display:grid; gap:10px; padding:12px; border:1px solid rgba(169,97,18,.28); border-radius:8px; background:rgba(255,248,230,.9); }
.fit-result.pass { border-color:rgba(47,125,87,.28); background:rgba(47,125,87,.06); }
.fit-result.blocked { border-color:rgba(167,70,56,.28); background:rgba(167,70,56,.06); }
.fit-result-head { display:flex; justify-content:space-between; gap:10px; font-size:12px; }
.fit-result-head span { color:var(--muted); font-size:10px; font-weight:850; }
.fit-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; }
.fit-metrics div { display:grid; gap:3px; padding-top:7px; border-top:1px solid var(--line); }
.fit-metrics span { color:var(--muted); font-size:8px; font-weight:850; text-transform:uppercase; }
.fit-metrics b { font-size:10px; }
.fit-result p,.supplier-note p,.action-message { color:var(--muted); font-size:10px; line-height:1.4; }
.panel-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.panel-actions button { min-height:40px; border-radius:7px; font-weight:900; cursor:pointer; }
.secondary-action { border:1px solid var(--blue); color:var(--blue); background:#fff; }
.primary-action { border:1px solid var(--blue); color:#fff; background:var(--blue); }
.action-message { min-height:14px; }
@media(max-width:900px){.workbench-app{grid-template-columns:1fr}.scene{min-height:58vh}.control-panel{max-height:none;overflow:visible;border-left:0;border-top:1px solid var(--line)}}
@media(max-width:520px){.scene{min-height:52vh}.control-panel{padding:14px}.panel-header{flex-direction:column}.view-controls{top:auto;right:14px;bottom:14px}.assembly-toggle{grid-template-columns:1fr}.fit-metrics{grid-template-columns:1fr}.panel-actions{grid-template-columns:1fr}}
