/* Getriebe 3D – Ergänzungen zu style.css */
body { font-family: system-ui, -apple-system, 'Segoe UI', Calibri, sans-serif; }
#areas { left: 50%; transform: translateX(-50%); max-width: calc(100vw - 460px); }
body.ui-narrow #areas, body.ui-phone #areas { left: 10px; right: 92px; transform: none; max-width: none; top: auto; bottom: 64px; }
body.ui-compact #side { top: calc(var(--hdr, 94px) + 18px); bottom: 118px; }
body.ui-compact #inspector { bottom: 118px; }
body.ui-compact #seq-banner { bottom: 118px; }

/* Positionsnummern */
.pos-label { pointer-events: auto; cursor: pointer; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(8,12,20,.88); border: 1.5px solid #f59e0b; color: #fde68a; font: 700 12px/1 system-ui, sans-serif; box-shadow: 0 2px 6px #0008; }
.pos-label:hover { background: #f59e0b; color: #111; }
#labels-layer.hidden .pos-label { opacity: 0; pointer-events: none; }

/* Werkzeugleiste */
.tool-dock { display: flex; gap: 10px; padding: 6px 8px; overflow-x: auto; scrollbar-width: thin; max-width: calc(100vw - 120px); }
body.ui-compact .tool-dock { left: 10px; right: 92px; bottom: 10px; transform: none; max-width: none; }
.tool-dock .tgrp { display: flex; gap: 3px; align-items: stretch; padding-right: 10px; border-right: 1px solid var(--border); }
.tool-dock .tgrp:last-child { border-right: 0; }
.tgrp-h { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text2); align-self: center; }
.tool-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 70px; padding: 5px 3px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: #cbd5e1; cursor: pointer; }
.tool-btn .ic { font-size: 20px; line-height: 1.1; }
.tool-btn .tn { font-size: 10px; line-height: 1.15; text-align: center; max-height: 2.4em; overflow: hidden; }
.tool-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.tool-btn.on { background: rgba(245,158,11,.18); border-color: #f59e0b; color: #fff; }
body.ui-phone .tool-dock { display: flex; left: 6px; right: 60px; bottom: 6px; } body.ui-phone .tool-btn .tn { display: none; } body.ui-phone .tool-btn { width: 40px; }
body.ui-phone #side { bottom: 64px; }

/* Werkstatt-Panel */
.ws-safety { display: grid; gap: 6px; margin-bottom: 10px; }
.ws-tog { text-align: left; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--border); background: rgba(255,255,255,.04); color: #e2e8f0; font-size: 14px; cursor: pointer; }
.ws-tog:hover { background: rgba(255,255,255,.08); }
.ws-tog.on { background: rgba(245,158,11,.16); border-color: #f59e0bAA; color: #fde68a; }
.ws-tog small { color: var(--text2); font-size: 11.5px; }
.power-btn.running { background: #7f1d1d; border-color: #ef4444aa; }
.ws-row { display: flex; gap: 6px; margin-top: 6px; } .ws-row > * { flex: 1; }
.wide-btn { color: #e2e8f0; cursor: pointer; font-size: 13px; }
.oil-box { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.oil-box b { display: block; font-weight: 600; } .oil-box small { color: var(--text2); }
.oil-gauge { position: relative; flex: 0 0 26px; height: 74px; border: 2px solid #64748b; border-radius: 6px; background: #0f172a; overflow: hidden; }
.oil-gauge i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(#e0a43a, #b7791f); }
.oil-gauge i.old { background: linear-gradient(#5a4220, #2d1f0b); }
.oil-gauge span { position: absolute; left: 0; right: 0; height: 1px; background: #ef4444; font-size: 0; }
.ws-state { display: grid; gap: 4px; font-size: 13px; color: #cbd5e1; }
.ok { color: #4ade80; } .bad { color: #f87171; }

/* Info-Fenster */
.chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: #cbd5e1; }
.chip.in { border-color: #22c55e88; color: #86efac; } .chip.out { border-color: #f59e0b88; color: #fde68a; } .chip.sub { border-color: #38bdf888; color: #7dd3fc; }
.chip.new { background: #14532d; color: #bbf7d0; border-color: #22c55e; } .chip.wear { color: #fcd34d; } .chip.dirty { color: #d6b07a; border-color: #a16207; }
.chip.bad { background: #7f1d1d; color: #fecaca; border-color: #ef4444; }
#inspector-actions { padding: 0 16px; }
.act-btn small { color: var(--text2); font-weight: 400; margin-left: 4px; }
.act-btn.dim { opacity: .5; }
.act-row { display: flex; gap: 6px; } .act-row .act-btn { flex: 1; padding: 7px 6px; font-size: 13px; }
.ins-res { margin: 2px 0 10px; padding: 9px 11px; border-radius: 9px; font-size: 14px; line-height: 1.45; border: 1px solid; }
.ins-res b { display: block; font-size: 12px; letter-spacing: .04em; margin-bottom: 2px; }
.ins-res.ok { background: rgba(34,197,94,.1); border-color: #22c55e66; } .ins-res.warn { background: rgba(250,204,21,.1); border-color: #facc1566; color: #fef08a; }
.ins-res.bad { background: rgba(239,68,68,.14); border-color: #ef444488; color: #fecaca; }

/* Stückliste, Plan */
.parts-filter { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: #0f172a; color: #fff; margin-bottom: 8px; }
.parts-t, .plan-t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.parts-t th, .plan-t th { text-align: left; color: var(--text2); font-weight: 600; padding: 4px 5px; border-bottom: 1px solid var(--border); position: sticky; top: -12px; background: #0e1420; }
.parts-t td, .plan-t td { padding: 5px; border-bottom: 1px solid #1f2937; vertical-align: top; }
.parts-t td small { display: block; color: var(--text2); font-size: 11.5px; }
.parts-t tr { cursor: pointer; } .parts-t tr:hover td { background: rgba(255,255,255,.05); } .parts-t tr.sel td { background: rgba(56,189,248,.14); }
.st { font-style: normal; margin-left: 3px; } .st.in { color: #4ade80; } .st.out { color: #f59e0b; } .st.new { color: #86efac; }
.plan-tabs { display: flex; gap: 4px; margin-bottom: 8px; } .plan-tabs button { flex: 1; padding: 6px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: #cbd5e1; cursor: pointer; font-size: 12.5px; }
.plan-tabs button.active { background: rgba(56,189,248,.16); color: #fff; }
.err-list { margin-left: 18px; font-size: 13px; color: #fecaca; display: grid; gap: 4px; }

/* Szenario */
.scen-btns button { color: #e2e8f0; cursor: pointer; }

/* Ablauf-Banner */
#seq-banner ul { margin: 4px 0 4px 18px; } #seq-banner li { margin: 2px 0; }
#seq-banner.probe { border-color: #f59e0b88; }

/* Rechner */
.calc-nav { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.calc-nav button { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: #cbd5e1; cursor: pointer; font-size: 13px; }
.calc-nav button.active { background: rgba(56,189,248,.16); color: #fff; border-color: #38bdf888; }
.calc-main h3 { font-size: 18px; margin-bottom: 8px; }
.calc-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; align-items: end; }
.calc-form.one { grid-template-columns: 1fr; }
.calc-form label { display: grid; gap: 3px; font-size: 13px; color: var(--text2); }
.calc-form input, .calc-form select { width: 100%; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: #0f172a; color: #fff; font-size: 15px; }
.calc-out { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14.5px; }
.calc-out th { text-align: left; color: #cbd5e1; font-weight: 500; padding: 7px 10px; width: 42%; border-bottom: 1px solid #1f2937; font-family: Consolas, monospace; font-size: 13.5px; }
.calc-out td { padding: 7px 10px; border-bottom: 1px solid #1f2937; } .calc-out b { color: #fde68a; }
.calc-note { margin-top: 10px; font-size: 12.5px; color: var(--text2); }

/* Flansch-Dialog */
.flange-svg { width: 100%; max-width: 340px; display: block; margin: 6px auto 10px; }
.flange-svg .fl { fill: #3f5866; stroke: #94a3b8; stroke-width: 2; } .flange-svg .hole { fill: #0b0f18; }
.flange-svg .sc { cursor: pointer; } .flange-svg .sc circle { fill: #1f2937; stroke: #cbd5e1; stroke-width: 2; }
.flange-svg .sc:hover circle { stroke: #f59e0b; } .flange-svg .sc.on circle { fill: #f59e0b; stroke: #fde68a; }
.flange-svg text { fill: #111; font: 700 15px system-ui; text-anchor: middle; pointer-events: none; }

/* Typenschild, Unterlagen */
.plate-big { max-width: 460px; margin: 4px auto; padding: 14px 18px; border-radius: 10px; background: linear-gradient(#e2e6ea, #c9cfd5); color: #111; font-family: Calibri, sans-serif; border: 3px solid #555; }
.plate-big .pl-h { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #555; margin-bottom: 6px; padding-bottom: 4px; }
.plate-big .pl-h b { font-size: 22px; } .plate-big table { width: 100%; font-size: 16px; } .plate-big td { padding: 2px 4px; } .plate-big td:last-child { text-align: right; }
.docs { list-style: none; display: grid; gap: 6px; margin-bottom: 12px; } .docs a { color: #7dd3fc; font-size: 15px; }
.flow-choice { display: flex; gap: 10px; } .flow-choice .primary { flex: 1; }
#explode-slider { position: fixed; z-index: 11; right: 92px; bottom: 118px; padding: 8px 12px; font-size: 13px; color: #cbd5e1; }
#explode-slider input { vertical-align: middle; width: 160px; }

/* Lexikon */
.lx-t { margin: 10px 0; } .kq { margin-top: 24px; padding: 12px 16px; border-radius: 10px; background: rgba(56,189,248,.08); border: 1px solid #38bdf844; }
.kq h3 { font-size: 15px; margin-bottom: 4px; } .lx-btns { margin-top: 14px; }
#d-article a[data-pos] { color: #fbbf24; text-decoration: none; border-bottom: 1px dotted #fbbf24; }
#d-article h4 { font-size: 17px; color: #fff; margin: 18px 0 4px; }

/* Druck: Demontage-/Montageplan */
#print-area { display: none; }
@media print {
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block !important; }
  body.printing { background: #fff !important; color: #000; overflow: visible; height: auto; }
  .pr-page { font: 12pt/1.35 Calibri, Arial, sans-serif; color: #000; }
  .pr-head { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 4px; margin-bottom: 8px; font-size: 13pt; }
  .pr-page h2 { font-size: 15pt; margin: 14px 0 6px; }
  .pr-page table { width: 100%; border-collapse: collapse; }
  .pr-page th, .pr-page td { border: 1px solid #000; padding: 4px 6px; text-align: left; vertical-align: top; height: 22px; }
  .pr-page th { background: #e5e7eb; }
  @page { size: A4 portrait; margin: 15mm; }
}
@media (max-width: 1350px) { body:not(.ui-narrow):not(.ui-phone) #areas { left: 340px; right: 92px; transform: none; max-width: none; justify-content: flex-start; } }
.flange-svg .hood { fill: #4a6573; stroke: #94a3b8; stroke-width: 1.5; }
