* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #1a1a1a; color: #e8e8e8; }
body { display: grid; grid-template-columns: 280px 1fr 320px; grid-template-rows: 48px 1fr; height: 100vh; overflow: hidden; }
header { grid-column: 1 / -1; background: #2a2a2a; display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid #333; }
header h1 { font-size: 15px; font-weight: 500; letter-spacing: 0.3px; }
header .meta { margin-left: auto; font-size: 12px; color: #888; }
header nav.nav { display: flex; gap: 4px; margin-left: 24px; }
header nav.nav a { padding: 6px 14px; font-size: 12px; color: #999; text-decoration: none; border-radius: 4px; border: 1px solid transparent; }
header nav.nav a:hover { color: #e8e8e8; border-color: #444; }
header nav.nav a.active { color: #7ec8ff; border-color: #7ec8ff; background: rgba(126,200,255,0.08); }
aside { background: #222; padding: 20px; overflow-y: auto; border-right: 1px solid #333; }
aside.right { border-right: none; border-left: 1px solid #333; }
aside h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #999; margin-bottom: 16px; font-weight: 600; }
main { position: relative; background: #2c2c2c; }
#canvas { width: 100%; height: 100%; display: block; }
.control { margin-bottom: 18px; }
.control label { display: block; font-size: 12px; color: #bbb; margin-bottom: 6px; }
.control .value { float: right; color: #7ec8ff; font-variant-numeric: tabular-nums; }
.control input[type="range"] { width: 100%; accent-color: #7ec8ff; }
.control select { width: 100%; padding: 6px 8px; background: #333; color: #e8e8e8; border: 1px solid #444; border-radius: 4px; font-size: 13px; }
.bom { font-size: 12px; }
.bom-row { padding: 8px 0; border-bottom: 1px solid #333; display: grid; grid-template-columns: 1fr auto; gap: 4px; }
.bom-row:last-child { border-bottom: none; }
.bom-row .name { font-weight: 500; color: #e8e8e8; }
.bom-row .dims { font-variant-numeric: tabular-nums; color: #999; font-size: 11px; }
.bom-row .thickness { color: #666; font-size: 11px; }
.bom-total { margin-top: 16px; padding-top: 12px; border-top: 2px solid #444; font-size: 12px; color: #999; }
.section-divider { margin: 24px 0 16px; padding-bottom: 8px; border-bottom: 1px solid #333; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #666; }
.hint { font-size: 11px; color: #666; margin-top: 4px; }
button.action { width: 100%; padding: 10px; background: #1e5aa0; color: white; border: none; border-radius: 4px; font-size: 13px; cursor: pointer; margin-bottom: 8px; }
button.action:hover { background: #2670c7; }
button.secondary { background: #333; }
button.secondary:hover { background: #444; }
.right-hint { margin-top: 16px; }

/* Viewer-Modus (Kunden-Ansicht): linke Konfig-Spalte ausblenden, Rahmen-Layout auf 2 Spalten */
body.viewer-mode { grid-template-columns: 1fr 320px; }
body.viewer-mode aside.left { display: none; }
body.viewer-mode #btn-share,
body.viewer-mode #btn-json,
body.viewer-mode #btn-bxf2,
body.viewer-mode #btn-obj { display: none; }
body.viewer-mode header h1::after { content: ' — Kunden-Ansicht'; color: #7ec8ff; font-weight: 400; }

