/* ═══════════════════════════════════════════════════
   CORTEX Production-Manager · Tool-spezifisches CSS
   Basis-Reset und Tokens kommen aus /cortex.css
═══════════════════════════════════════════════════ */

/* ── LAYOUT ── */
html, body { height:100%; }
body { overflow:hidden; }
#app { display:flex; height:100vh; overflow:hidden; }

/* ── NAV RAIL ── */
.nav-rail {
  width:116px; flex:0 0 116px;
  background:#101013;
  border-right:1px solid rgba(255,255,255,0.14);
  display:flex; flex-direction:column; align-items:center;
  padding:22px 0; gap:4px; overflow-y:auto;
}
.nav-logo {
  width:44px; height:44px; border-radius:12px;
  background:#E82127; color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:20px; font-weight:900; text-decoration:none;
  margin-bottom:18px; flex:0 0 44px;
}
.nav-logo:hover { opacity:.9; }
.nav-btn {
  width:80px; min-height:62px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  border:none; background:none; cursor:pointer;
  border-radius:12px; color:#5b5b60;
  font-size:11px; font-weight:700; font-family:inherit;
  padding:8px 4px; transition:color .15s, background .15s;
}
.nav-btn:hover { background:#1c1c20; color:#c7c7cc; }
.nav-btn.active { background:#1c1c20; color:#f5f5f7; }
.nav-btn--disabled { pointer-events:none; opacity:.35; cursor:default; }
.nav-spacer { flex:1; }
.nav-user {
  width:36px; height:36px; border-radius:50%;
  background:#2a2a2e; color:#86868b;
  display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:800;
}

/* ── MAIN COLUMN ── */
.main-col { flex:1; display:flex; flex-direction:column; min-width:0; overflow:hidden; }

/* ── TOPBAR (overrides cortex.css) ── */
.topbar {
  height:74px; flex:0 0 74px; background:#101013; border-bottom:1px solid rgba(255,255,255,0.14);
  display:flex; align-items:center; padding:0 24px; gap:18px; position:sticky; top:0; z-index:100;
}
.topbar-brandwrap { display:flex; flex-direction:column; line-height:1.2; flex:0 0 auto; }
.topbar-title { font-size:17px; font-weight:800; letter-spacing:-.3px; color:#f5f5f7; }
.topbar-subtitle { font-size:11.5px; color:#86868b; font-weight:500; }

/* ── SEARCH BOX (icon inside flex) ── */
.search-box {
  flex:1; max-width:420px; margin:0 auto;
  display:flex; align-items:center; gap:10px;
  background:#17171a; border:1px solid rgba(255,255,255,0.14);
  border-radius:12px; padding:0 16px; height:46px;
}
.search-box input {
  flex:1; background:none; border:none; outline:none;
  color:#f5f5f7; font-size:14px; font-family:inherit; min-width:0;
}
.search-box:focus-within { border-color:rgba(232,33,39,.4); }

/* ── TOPBAR CLOCK ── */
.topbar-clock { flex:0 0 auto; text-align:right; }
.clock-time { font-size:14px; font-weight:700; color:#f5f5f7; }
.clock-date { font-size:11px; color:#86868b; }

/* ── CONTENT (overrides cortex.css) ── */
.content {
  flex:1; overflow-y:auto; min-height:0;
  padding:30px 34px 60px; max-width:none; margin:0;
}
.content, .nav-rail { scrollbar-width:thin; scrollbar-color:rgba(255,255,255,0.18) transparent; }
.content::-webkit-scrollbar, .nav-rail::-webkit-scrollbar { width:8px; }
.content::-webkit-scrollbar-track, .nav-rail::-webkit-scrollbar-track { background:transparent; }
.content::-webkit-scrollbar-thumb, .nav-rail::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.18); border-radius:8px; }
.content::-webkit-scrollbar-thumb:hover, .nav-rail::-webkit-scrollbar-thumb:hover { background:rgba(255,255,255,0.28); }

/* ── PAGE HEADING (overrides cortex.css) ── */
.page-h1 { font-size:30px !important; }

/* ── KPI override ── */
.kpi-value { font-size:38px !important; }

/* ── Detail tabs ── */
.detail-tabs { display:flex; gap:0; border-bottom:1px solid rgba(255,255,255,0.14); margin-bottom:22px; overflow-x:auto; }
.detail-tab {
  padding:10px 22px; font-size:14px; font-weight:700; color:#86868b;
  cursor:pointer; border:none; background:none;
  border-bottom:3px solid transparent; margin-bottom:-1px;
  font-family:inherit; transition:color .15s;
  white-space:nowrap; flex:0 0 auto;
}
.detail-tab.active { color:#f5f5f7; border-bottom-color:#E82127; }
.detail-tab:hover:not(.active) { color:#c7c7cc; }

/* ── Back link (in-content navigation) ── */
.back-link { display:inline-flex; align-items:center; gap:6px; color:#86868b; text-decoration:none; font-size:13px; font-weight:600; background:#1c1c20; padding:8px 16px 8px 12px; border-radius:999px; }
.back-link:hover { color:#f5f5f7; }

/* ── ORDER LIST ── */
.order-list { display:flex; flex-direction:column; gap:12px; }
.order-row {
  background:#17171a; border:1px solid rgba(255,255,255,0.14); border-radius:18px; padding:20px 24px;
  cursor:pointer; display:flex; align-items:center; gap:20px; flex-wrap:wrap;
}
.order-row:hover { background:#1c1c20; }
.prio-bar { width:6px; height:56px; border-radius:4px; flex:0 0 6px; }
.order-main { flex:1 1 260px; min-width:0; }
.order-top { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.order-kunde { font-size:16.5px; font-weight:800; letter-spacing:-.2px; }
.order-projekt { font-size:13px; color:#c7c7cc; font-weight:600; margin-top:3px; }
.order-nr { font-size:11.5px; color:#86868b; margin-top:2px; }
.order-progress { flex:1 1 200px; min-width:160px; }
.order-progress-label { font-size:12px; color:#86868b; font-weight:600; margin-bottom:6px; }
.seg-bar { height:7px; border-radius:5px; background:#232326; overflow:hidden; display:flex; }
.seg { height:100%; }
.order-deliver { flex:0 0 auto; text-align:right; }
.order-deliver-label { font-size:11px; color:#86868b; font-weight:600; }
.order-deliver-date { font-size:14.5px; font-weight:800; margin-top:2px; }
.order-deliver-tage { font-size:11.5px; font-weight:700; }
.chev { color:#5b5b60; flex:0 0 auto; }

/* ── DETAIL HEADER ── */
.detail-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:18px; flex-wrap:wrap; }
.detail-kunde { font-size:24px; font-weight:800; letter-spacing:-.5px; }
.detail-projekt { font-size:15px; color:#c7c7cc; font-weight:600; margin-top:3px; }
.detail-meta { display:flex; align-items:center; gap:9px; margin-top:8px; flex-wrap:wrap; }
.detail-nr { font-size:12px; color:#86868b; font-weight:600; }
.deliver-box { text-align:right; background:#17171a; border:1px solid rgba(255,255,255,0.14); border-radius:14px; padding:12px 18px; flex:0 0 auto; }

.progress-legend { display:flex; gap:18px; margin-top:14px; flex-wrap:wrap; }
.legend-item { display:flex; align-items:center; gap:7px; font-size:12px; }
.legend-dot { width:9px; height:9px; border-radius:3px; flex:0 0 9px; }

.mat-row { display:flex; align-items:center; gap:14px; padding:11px 0; border-top:1px solid rgba(255,255,255,0.14); }
.mat-row:first-child { border-top:none; }
.mat-dot { width:8px; height:8px; border-radius:50%; background:#5e9eff; flex:0 0 8px; }
.mat-name { font-size:13.5px; font-weight:700; }
.mat-meta { font-size:11.5px; color:#86868b; }
.mat-amount { font-size:13px; font-weight:700; color:#c7c7cc; white-space:nowrap; }
.mat-chip { font-size:10.5px; font-weight:800; padding:3px 9px; border-radius:20px; white-space:nowrap; flex:0 0 auto; }
.mat-summary { display:flex; gap:16px; flex-wrap:wrap; margin-bottom:14px; }
.mat-summary-item { display:flex; align-items:center; gap:6px; font-size:11.5px; color:#86868b; }
.mat-summary-dot { width:8px; height:8px; border-radius:50%; flex:0 0 8px; }

.group-title { font-size:12.5px; font-weight:800; color:#5b5b60; text-transform:uppercase; letter-spacing:.5px; margin:20px 0 10px; }

/* ── ARTICLE CARDS (flat, outer dark bg) ── */
.article-card { background:#101013; border:1px solid rgba(255,255,255,0.14); border-radius:16px; overflow:hidden; margin-bottom:14px; }
.article-head { display:flex; align-items:center; justify-content:space-between; padding:16px 20px 12px; }
.article-name { font-size:15.5px; font-weight:800; }
.article-sub { font-size:12px; color:#86868b; margin-top:2px; }
.article-pct { font-size:13px; font-weight:700; color:#c7c7cc; }

.parts-card { background:#17171a; border-top:1px solid rgba(255,255,255,0.14); border-radius:0; overflow-x:auto; }
.part-cols { display:grid; grid-template-columns: minmax(64px,max-content) 40px minmax(170px,1.3fr) 100px 100px 40px minmax(130px,1.1fr) minmax(110px,1fr) 90px 18px; gap:8px; align-items:center; }
.part-table-header { padding:10px 16px; font-size:11px; font-weight:800; color:#86868b; text-transform:uppercase; letter-spacing:.4px; border-top:1px solid rgba(255,255,255,0.14); min-width:960px; }
.part-table-header > div { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.part-row { padding:13px 16px; border-top:1px solid rgba(255,255,255,0.14); cursor:pointer; min-width:960px; }
.part-row:first-child { border-top:none; }
.part-row:hover { background:#1c1c20; }
.part-dot { width:9px; height:9px; border-radius:50%; flex:0 0 9px; display:inline-block; margin-right:6px; vertical-align:middle; }
.part-nr { font-size:13.5px; color:#c7c7cc; font-weight:700; white-space:nowrap; }
.pt-cell { font-size:13.5px; color:#c7c7cc; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pt-cell.dim { color:#86868b; font-variant-numeric:tabular-nums; }
.pt-cell.dim.empty { color:#5b5b60; }
.part-bez { font-size:14.5px; font-weight:700; color:#f5f5f7; }
.part-menge { text-align:center; font-size:14.5px; font-weight:700; }
.status-pill { font-size:11.5px; font-weight:700; padding:5px 12px; border-radius:20px; white-space:nowrap; text-align:center; }
.hinweis-cell { overflow:visible; text-align:center; }
.hinweis-icon-btn { background:none; border:none; padding:4px; font-size:16px; line-height:1; cursor:pointer; }
.hinweis-popover {
  position:absolute; z-index:500; max-width:260px; background:#1c1c20;
  border:1px solid rgba(240,180,41,0.4); border-radius:10px; padding:12px 14px;
  font-size:13px; color:#f5f0e6; line-height:1.5; box-shadow:0 8px 24px rgba(0,0,0,0.4);
}

/* ── Akkordeon ── */
.acc-title { display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; user-select:none; margin-bottom:0; }
.acc-chevron { width:9px; height:9px; border-right:2px solid #86868b; border-bottom:2px solid #86868b; transform:rotate(45deg); transition:transform .2s ease; flex:0 0 auto; }
.acc-body { max-height:0; overflow:hidden; transition:max-height .25s ease; }
.card.open .acc-title { margin-bottom:12px; }
.card.open .acc-chevron { transform:rotate(-135deg); }
.card.open .acc-body { max-height:2000px; }
.acc-body-inner { padding-top:2px; }

/* ── Stückliste title ── */
.stueckliste-title { font-size:13px; font-weight:800; color:#86868b; text-transform:uppercase; letter-spacing:.5px; margin-bottom:14px; }

/* ── Produktionsfreigabe ── */
.freigabe-box { background:#141a19; border:1px solid rgba(45,212,191,0.28); border-radius:16px; padding:18px 22px; margin-bottom:20px; }
.freigabe-head { display:flex; align-items:center; gap:9px; margin-bottom:12px; }
.freigabe-head-label { font-size:13px; font-weight:800; color:#2dd4bf; text-transform:uppercase; letter-spacing:.4px; }
.freigabe-grid { display:flex; gap:36px; flex-wrap:wrap; }
.freigabe-k { font-size:12px; color:#86868b; font-weight:600; }
.freigabe-v { font-size:15px; font-weight:700; margin-top:2px; }
.freigabe-offen { font-size:13px; color:#f0b429; margin-top:12px; }

/* ── Freigabe button: done state ── */
.btn-freigabe-done {
  background:rgba(48,209,88,.14); border:1px solid rgba(48,209,88,.3); color:#30d158;
  height:46px; border-radius:12px; padding:0 22px;
  font-size:14px; font-weight:700; font-family:inherit; cursor:pointer;
}
.btn-freigabe-done:hover { background:rgba(48,209,88,.22); }

/* ── Weiter-Button (Bauteil) ── */
.btn-advance {
  background:#30d158; color:#04210d;
  height:54px; border-radius:14px; border:none;
  font-size:15px; font-weight:800; font-family:inherit; cursor:pointer;
  padding:0 28px; transition:background .15s;
}
.btn-advance:hover:not(:disabled) { background:#28b84d; }
.btn-advance:disabled { background:#232326; color:#5b5b60; cursor:not-allowed; }

.plain-progress { margin-bottom:24px; }
.plain-progress-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.plain-progress-title { font-size:15px; font-weight:800; }
.plain-progress-count { font-size:13px; color:#86868b; font-weight:600; }

.action-row { display:flex; gap:12px; margin-top:26px; padding-top:22px; border-top:1px solid rgba(255,255,255,0.14); flex-wrap:wrap; }

.seg-toggle { display:flex; background:#0f0f11; border-radius:10px; padding:3px; gap:3px; }
.seg-toggle button { flex:1; background:none; border:none; height:38px; border-radius:8px; font-size:13px; font-weight:700; color:#86868b; cursor:pointer; }
.seg-toggle button.active.mat { background:#2dd4bf; color:#03211d; }
.seg-toggle button.active.det { background:#5e9eff; color:#04182e; }
.seg-toggle-4 button { font-size:12px; padding:0 4px; }
.seg-toggle button.active.stat { background:#E82127; color:#fff; }

/* ── BAUTEIL ── */
.bt-grid { display:flex; gap:20px; align-items:flex-start; flex-wrap:wrap; }
.bt-side { flex:0 0 320px; display:flex; flex-direction:column; gap:16px; min-width:280px; }
.bt-main { flex:1; min-width:320px; display:flex; flex-direction:column; gap:16px; }
.box-scene { width:100%; height:190px; display:flex; align-items:center; justify-content:center; perspective:950px; cursor:grab; }
.box-inner { position:relative; transform-style:preserve-3d; }
.box-face { position:absolute; left:50%; top:50%; border:1px solid rgba(255,255,255,0.16); box-sizing:border-box; }
.dim-row { display:flex; justify-content:space-around; font-size:12px; color:#86868b; font-weight:600; margin-bottom:12px; }
.kanten-mini { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.kanten-mini .k { display:flex; align-items:center; gap:8px; }
.kanten-mini .sw { width:12px; height:12px; border-radius:3px; border:1px solid rgba(255,255,255,0.14); flex:0 0 12px; }
.kanten-mini .lbl { font-size:12px; color:#c7c7cc; font-weight:600; }

.timeline-h-wrap { margin-bottom:20px; }
.timeline-h { position:relative; display:flex; align-items:flex-start; padding-top:15px; }
.timeline-h-track { position:absolute; top:15px; height:2px; background:#232326; }
.timeline-h-fill { position:absolute; top:15px; height:2px; background:#E82127; }
.tl-step-h { flex:1 1 0; display:flex; flex-direction:column; align-items:center; gap:8px; min-width:0; }
.tl-dot { width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex:0 0 30px; z-index:1; border:2px solid; }
.tl-label-h { font-size:11.5px; font-weight:700; text-align:center; line-height:1.25; padding:0 2px; }

.spec-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px 30px; }
.spec-k { font-size:11.5px; color:#86868b; font-weight:600; }
.spec-v { font-size:14.5px; font-weight:700; margin-top:2px; }

/* ── SIBLIST ── */
.siblist { flex:0 0 212px; background:#101013; border:1px solid rgba(255,255,255,0.14); border-radius:16px; padding:8px; max-height:600px; overflow-y:auto; }
.siblist-title { font-size:10.5px; font-weight:700; color:#5b5b60; text-transform:uppercase; letter-spacing:.5px; padding:10px 10px 8px; }
.sib-row { display:flex; align-items:center; gap:9px; padding:10px; border-radius:10px; cursor:pointer; }
.sib-row:hover { background:#1c1c20; }
.sib-row.active { background:#1c1c20; border-left:3px solid #E82127; }
.sib-dot { width:8px; height:8px; border-radius:50%; flex:0 0 8px; }
.sib-bez { font-size:12.5px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sib-sub { font-size:10.5px; color:#86868b; }

/* ── MASSIVHOLZ-LISTE ── */
.mh-mat-row { display:flex; gap:12px; overflow-x:auto; padding-bottom:8px; margin-bottom:26px; }
.mh-mat-chip { flex:0 0 230px; text-align:left; border-radius:16px; padding:15px 16px; cursor:pointer; border:1px solid rgba(255,255,255,0.14); background:#141416; }
.mh-mat-chip.active { background:#1c1c20; border-color:rgba(232,33,39,.5); }
.mh-mat-chip.done { border-color:rgba(48,209,88,.28); }
.mh-mat-top { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.mh-mat-qcount { font-size:11px; font-weight:800; color:#5e9eff; background:rgba(94,158,255,.14); padding:2px 8px; border-radius:6px; }
.mh-mat-remain { font-size:12px; font-weight:800; padding:2px 9px; border-radius:20px; }
.mh-mat-name { font-size:14px; font-weight:700; line-height:1.3; height:37px; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.mh-mat-bar { height:6px; border-radius:4px; background:#232326; overflow:hidden; margin-top:10px; }
.mh-mat-bar-fill { height:100%; }
.mh-mat-sub { font-size:12px; color:#86868b; margin-top:6px; }
.mh-q-badge { font-size:13px; font-weight:800; padding:4px 12px; border-radius:8px; }
.mh-cut-card { background:#17171a; border:1px solid rgba(255,255,255,0.14); border-radius:16px; padding:18px 20px; cursor:pointer; display:flex; align-items:center; gap:18px; }
.mh-cut-card.done { background:#111214; border-color:rgba(48,209,88,.22); }
.mh-cut-card.next { border-color:rgba(232,33,39,.5); animation:nextPulse 2s ease-in-out infinite; }
@keyframes nextPulse { 0%,100% { box-shadow:0 0 0 0 rgba(232,33,39,.45); } 50% { box-shadow:0 0 0 5px rgba(232,33,39,0); } }
.mh-cut-len { font-size:38px; font-weight:800; letter-spacing:-1.5px; line-height:1; }
.mh-cut-check { width:56px; height:56px; border-radius:50%; border:2px solid; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }

.hinweis-box { background:rgba(240,180,41,0.1); border:1px solid rgba(240,180,41,0.4); border-radius:14px; padding:16px 20px; display:flex; gap:12px; align-items:flex-start; }
.hinweis-title { font-size:11px; font-weight:800; color:#f0b429; letter-spacing:.4px; text-transform:uppercase; }
.hinweis-text { font-size:14px; color:#f5f0e6; margin-top:4px; line-height:1.5; }
.hinweis-box--large { padding:20px 22px; }
.hinweis-box--large .hinweis-text { font-size:15.5px; line-height:1.6; }

/* ── Order row: überfällig ── */
.order-row--ueberfaellig { border-color:#E82127; border-width:2px; }
.order-row--ueberfaellig:hover { border-color:#ff4540; }

/* ── Freigabe strip (compact) ── */
.freigabe-strip {
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  padding:10px 16px; margin-bottom:18px;
  background:rgba(45,212,191,.08); border:1px solid rgba(45,212,191,.22); border-radius:12px;
}
.freigabe-strip-icon { color:#2dd4bf; font-size:14px; flex:0 0 auto; }
.freigabe-strip-label { font-size:12.5px; font-weight:700; color:#2dd4bf; }
.freigabe-strip-meta { font-size:12px; color:#86868b; margin-left:auto; }

/* ── Stückliste search ── */
.stl-search-row { display:flex; align-items:center; gap:8px; padding:10px 0 2px; }
.stl-search-box {
  flex:1; display:flex; align-items:center; gap:8px;
  background:#101013; border:1px solid rgba(255,255,255,0.14); border-radius:10px;
  padding:0 12px; height:38px;
}
.stl-search-box input {
  flex:1; background:none; border:none; outline:none;
  color:#f5f5f7; font-size:13.5px; font-family:inherit;
}
.stl-search-box:focus-within { border-color:rgba(232,33,39,.4); }
.btn-scan-sm {
  flex:0 0 38px; height:38px; border-radius:10px; border:none;
  background:#1c1c20; color:#86868b; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background .15s, color .15s;
}
.btn-scan-sm:hover { background:#2a2a2e; color:#f5f5f7; }

/* ── Advance panel (full-width, above grid) ── */
.advance-panel { display:flex; flex-direction:column; gap:10px; margin-bottom:20px; }
.advance-panel .btn-advance { width:100%; }

/* ── Akkordeon: größere max-height für lange Stücklisten ── */
.card.open .acc-body { max-height:30000px; }

/* ── QR Scan overlay ── */
.scan-overlay {
  position:fixed; inset:0; background:#000; z-index:300;
  display:flex; flex-direction:column; align-items:stretch;
}
.scan-overlay.hidden { display:none; }
.cnc-qr-box.hidden { display:none; }
.cnc-qr-box { margin-bottom:10px; }
.cnc-qr-svg { background:#fff; border-radius:8px; padding:8px; width:fit-content; margin-bottom:8px; }
.cnc-qr-svg svg { display:block; width:180px; height:180px; }
.cnc-path-text { font-size:12px; color:#86868b; word-break:break-all; }
.scan-topbar {
  flex:0 0 auto; display:flex; align-items:center; justify-content:space-between;
  padding:16px 22px; background:rgba(0,0,0,.7);
}
.scan-title { font-size:17px; font-weight:800; color:#f5f5f7; }
.scan-close {
  width:36px; height:36px; border-radius:50%; background:#2a2a2e; border:none; color:#c7c7cc;
  font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center;
  font-family:inherit;
}
.scan-video-wrap {
  flex:1; position:relative; overflow:hidden;
  display:flex; align-items:center; justify-content:center; background:#000;
}
.scan-video { width:100%; height:100%; object-fit:cover; }
.scan-reticle {
  position:absolute; width:220px; height:220px;
  border:2.5px solid #E82127; border-radius:18px;
  box-shadow:0 0 0 2000px rgba(0,0,0,.5);
  pointer-events:none;
}
.scan-hint { flex:0 0 auto; font-size:13px; color:#86868b; text-align:center; padding:16px; font-weight:600; }
.scan-feedback {
  position:absolute; bottom:24px; left:50%; transform:translateX(-50%);
  background:#E82127; color:#fff; padding:10px 24px; border-radius:10px;
  font-size:14px; font-weight:700; white-space:nowrap; opacity:0; transition:opacity .25s;
  pointer-events:none;
}
.scan-feedback.show { opacity:1; }

/* ── LIEFERSCHEIN-SEKTION (in renderOrder) ── */
.ls-section { margin-top:28px; padding-top:22px; border-top:1px solid rgba(255,255,255,0.14); }
.ls-section-title { font-size:12.5px; font-weight:800; color:#5b5b60; text-transform:uppercase; letter-spacing:.5px; margin-bottom:14px; }
.ls-note-card { background:#17171a; border:1px solid rgba(255,255,255,0.14); border-radius:14px; padding:14px 18px; margin-bottom:10px; }
.ls-note-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.ls-note-number { font-size:14px; font-weight:800; color:#f5f5f7; }
.ls-note-date { font-size:12px; color:#86868b; font-weight:600; }
.ls-note-meta { font-size:12px; color:#5b5b60; margin-top:4px; }

/* ── WIZARD CONTAINER ── */
.ls-wizard { max-width:680px; }
.ls-step-header { display:flex; align-items:center; gap:10px; margin-bottom:24px; }
.ls-step-dot {
  width:28px; height:28px; border-radius:50%; flex:0 0 28px;
  display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:800;
  background:#2a2a2e; color:#5b5b60;
}
.ls-step-dot.active { background:#E82127; color:#fff; }
.ls-step-dot.done { background:rgba(48,209,88,.18); color:#30d158; }
.ls-step-line { flex:1; height:2px; background:#2a2a2e; }
.ls-step-line.done { background:#30d158; }
.ls-wizard-title { font-size:22px; font-weight:800; letter-spacing:-.3px; margin-bottom:20px; }
.ls-wizard-sub { font-size:14px; color:#86868b; margin-bottom:20px; font-weight:500; }

/* ── AB SELECTION (step 0) ── */
.ls-ab-cards { display:flex; flex-direction:column; gap:12px; }
.ls-ab-card {
  background:#17171a; border:1px solid rgba(255,255,255,0.14); border-radius:16px;
  padding:18px 22px; cursor:pointer; display:flex; align-items:center; justify-content:space-between;
  gap:16px; transition:border-color .15s, background .15s;
}
.ls-ab-card:hover { background:#1c1c20; border-color:rgba(232,33,39,.3); }
.ls-ab-card-num { font-size:18px; font-weight:800; }
.ls-ab-card-meta { font-size:13px; color:#86868b; margin-top:3px; }
.ls-ab-card-arrow { font-size:18px; color:#5b5b60; }

/* ── POSITION SELECTION (step 1) ── */
.ls-pos-group-title { font-size:12px; font-weight:800; color:#5b5b60; text-transform:uppercase; letter-spacing:.5px; margin:18px 0 8px; }
.ls-pos-row {
  display:flex; align-items:center; gap:14px; padding:13px 16px;
  background:#17171a; border:1px solid rgba(255,255,255,0.14); border-radius:12px; margin-bottom:8px;
  cursor:pointer; transition:border-color .12s;
}
.ls-pos-row.selected { border-color:rgba(48,209,88,.4); background:#111814; }
.ls-pos-check {
  width:22px; height:22px; border-radius:6px; border:2px solid rgba(255,255,255,0.18);
  flex:0 0 22px; display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:900; color:#04210d;
}
.ls-pos-row.selected .ls-pos-check { background:#30d158; border-color:#30d158; }
.ls-pos-row.locked { cursor:default; opacity:.5; }
.ls-pos-row.locked .ls-pos-check { background:#232326; border-color:#2a2a2e; font-size:11px; }
.ls-pos-name { flex:1; font-size:14.5px; font-weight:700; }
.ls-pos-amount { font-size:13px; color:#86868b; font-weight:600; white-space:nowrap; }

/* ── COMMENT (step 2) ── */
.ls-comment-area {
  width:100%; min-height:140px; background:#17171a; border:1px solid rgba(255,255,255,0.14);
  border-radius:14px; padding:16px; color:#f5f5f7; font-family:inherit; font-size:14.5px;
  resize:vertical; outline:none; line-height:1.6;
}
.ls-comment-area:focus { border-color:rgba(232,33,39,.4); }

/* ── SIGNATURE PADS (step 3) ── */
.ls-sig-blocks { display:flex; flex-direction:column; gap:22px; }
.ls-sig-block { background:#17171a; border:1px solid rgba(255,255,255,0.14); border-radius:16px; padding:18px 20px; }
.ls-sig-label { font-size:12px; font-weight:700; color:#86868b; text-transform:uppercase; letter-spacing:.4px; margin-bottom:6px; }
.ls-sig-name { font-size:16px; font-weight:800; margin-bottom:14px; }
.ls-sig-canvas {
  width:100%; height:180px; background:#101013; border-radius:10px;
  border:1px solid rgba(255,255,255,0.14); display:block; touch-action:none; cursor:crosshair;
}
.ls-sig-canvas.signed { border-color:rgba(48,209,88,.3); }
.ls-sig-clear {
  margin-top:10px; background:none; border:none; color:#86868b; font-family:inherit;
  font-size:12.5px; font-weight:600; cursor:pointer; padding:0;
}
.ls-sig-clear:hover { color:#c7c7cc; }

/* ── EMAIL PREVIEW (step 4) ── */
.ls-preview-box { background:#101013; border:1px solid rgba(255,255,255,0.14); border-radius:14px; padding:18px 20px; margin-bottom:20px; }
.ls-preview-label { font-size:11.5px; color:#86868b; font-weight:700; text-transform:uppercase; letter-spacing:.4px; margin-bottom:6px; }
.ls-preview-value { font-size:14px; color:#f5f5f7; font-weight:600; }
.ls-email-input {
  width:100%; background:#17171a; border:1px solid rgba(255,255,255,0.14); border-radius:10px;
  padding:12px 14px; color:#f5f5f7; font-family:inherit; font-size:14px; outline:none;
}
.ls-email-input:focus { border-color:rgba(232,33,39,.4); }
.ls-send-error { background:rgba(232,33,39,.12); border:1px solid rgba(232,33,39,.3); border-radius:10px; padding:12px 16px; font-size:13.5px; color:#ff7a6e; margin-top:14px; display:none; }
.ls-send-error.visible { display:block; }

@media (max-width:720px) {
  .nav-rail { display:none; }
  .topbar { padding:0 16px; }
  .topbar-clock { display:none; }
  .search-box { display:none; }
  .content { padding:20px 16px 70px; }
  .bt-side { flex:1 1 100%; }
  .siblist { display:none; }
}

/* ── Aufgaben-Tab (Kanban je Auftrag) ──
   Spiegelt aufgaben/style.css, hier mit ob-Präfix (Order-Board) benannt,
   um Verwechslung mit dem globalen Aufgaben-Tool zu vermeiden. ── */
.ob-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
}
.ob-board-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px;
  min-height: 160px;
}
.ob-add-btn {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: none;
  border: 1px dashed var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.ob-add-btn:hover { background: var(--surface-hover); color: var(--text-secondary); }
.ob-board-col-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 800; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 12px;
}
.ob-board-col-count {
  background: var(--surface-hover);
  color: var(--text-muted);
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
}
.ob-board-col-cards {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 60px;
  border-radius: var(--radius-sm);
  transition: background 0.1s;
}
.ob-board-col-cards.drag-over {
  background: var(--accent-bg);
  outline: 2px dashed var(--accent-border);
}
.ob-task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 30px 12px 14px;
  user-select: none;
  position: relative;
}
.ob-drag-handle {
  position: absolute;
  top: 8px;
  right: 6px;
  touch-action: none;
  cursor: grab;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1;
  padding: 4px 6px;
}
.ob-drag-handle:active { cursor: grabbing; }
.ob-task-card--dragging { opacity: 0.35; }
.ob-task-card--ghost {
  position: fixed;
  z-index: 2000;
  pointer-events: none;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  opacity: 0.95;
}
.ob-task-card-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.ob-task-card-desc {
  font-size: 12.5px; color: var(--text-muted);
  margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ob-task-card-foot { display: flex; align-items: center; justify-content: flex-start; }
.ob-assignee-badge {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue); color: #04122b;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}

/* ── Picker (Verantwortlicher im Aufgaben-Modal) ── */
.ob-picker { position: relative; }
.ob-picker-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--surface-2);
  border: 1px solid var(--border-input);
  border-radius: 10px;
  max-height: 220px; overflow-y: auto;
  z-index: 10;
}
.ob-picker-list:empty { display: none; }
.ob-picker-item {
  padding: 10px 14px; font-size: 13px; cursor: pointer;
  display: flex; justify-content: space-between; gap: 10px;
}
.ob-picker-item:hover { background: var(--surface-hover); }
.ob-picker-item-sub { color: var(--text-muted); font-size: 11.5px; }
.ob-picker-item--error { color: var(--accent); cursor: default; }
.ob-picker-item--error:hover { background: none; }

.ob-board > .loading,
.ob-board > .empty {
  grid-column: 1 / -1;
}

@media (max-width: 1200px) {
  .ob-board {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 85%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .ob-board-col { scroll-snap-align: start; }
}

/* Fixed bottom-right "Name/Abmelden" widget (msal-auth.js) covers the
   Aufgaben-Board and Stückliste on small screens -- hide it here, it stays
   visible in the other Hub-Tools. */
#bm-logout-widget { display:none !important; }

/* ── CNC-Sperrzonen ── */
.sz-karte{background:#141417;border:1px solid #2a2a2e;border-radius:14px;padding:16px;
  margin-bottom:12px;cursor:pointer;transition:border-color .15s}
.sz-karte:hover{border-color:#3a3a40}
.sz-kopf{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.sz-nr{font-weight:800;font-size:16px;font-variant-numeric:tabular-nums}
.sz-name{color:#c7c7cc;font-size:15px;margin-left:8px}
.sz-badge{font-size:10.5px;font-weight:800;letter-spacing:.5px;padding:4px 10px;
  border-radius:20px;border:1px solid;white-space:nowrap;background:rgba(232,33,39,.12)}
.sz-meta{color:#86868b;font-size:12.5px;margin-top:4px}
.sz-body{display:grid;grid-template-columns:auto minmax(0,1fr);gap:18px;margin-top:14px;align-items:start}
@media (max-width:720px){.sz-body{grid-template-columns:1fr}}
.sz-titel{font-weight:800;font-size:14.5px;margin-bottom:4px}
.sz-text{color:#c7c7cc;font-size:13px;max-width:60ch}
.sz-stellen{margin-top:10px;display:flex;flex-direction:column;gap:2px}
.sz-stelle{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;color:#86868b}
.sz-leer{color:#86868b;font-size:14px;padding:18px;background:#141417;
  border:1px solid #2a2a2e;border-radius:14px}
.sz-leer--unklar{color:#f0b429;border-color:rgba(240,180,41,.42);background:rgba(240,180,41,.08)}
.sz-leer--unklar span{color:#c7c7cc;font-size:13px}
.sz-fuss{color:#5b5b60;font-size:12.5px;margin-top:14px}
.sz-dot{color:#E82127;font-size:9px;margin-left:5px;vertical-align:middle}
.sz-warnkarte{background:rgba(232,33,39,.08);border:1px solid rgba(232,33,39,.45);
  border-radius:14px;padding:16px;margin-bottom:14px}
