.pw-workplace .pw-columns { display:grid;grid-template-columns:minmax(340px,1fr) minmax(400px,1.15fr);align-items:start;gap:16px }
.pw-orders { display:block;overflow:auto;max-height:72vh }
.pw-orders table { width:100%;border-collapse:collapse;text-align:left;font-size:13px }
.pw-orders th { position:sticky;top:0;background:var(--panel,#fff);padding:10px;border-bottom:2px solid #d3dfdb;z-index:1 }
.pw-orders td { padding:12px 8px;border-bottom:1px solid #dde5e1;vertical-align:top;white-space:normal;overflow-wrap:anywhere }
.pw-orders tr[data-order-id] { cursor:pointer }

.pw-orders tr:focus-visible { outline:2px solid #176b50;outline-offset:-2px }
.pw-orders small { display:block;margin-top:5px;color:#52635b }
.pw-workplace #productionActionPanel { min-width:0 }
.pw-workplace #productionOrderDetailsPanel { box-shadow:none;border:0;padding:0;margin-top:20px;min-width:0 }
.pw-workplace #productionOrderDetails { overflow:auto }
.pw-workplace #productionBomPreview { display:none }
.pw-shortage { border:1px solid #d9e3dd;border-radius:9px;padding:12px;margin:10px 0;overflow-wrap:anywhere }
.pw-shortage p { margin:6px 0 }
#pwTimeline { border-block:1px solid #d9e3dd;margin:16px 0;padding:12px 0 }
.pw-dialog { width:min(680px,94vw);max-height:90vh;overflow:auto }
.pw-dialog label { display:grid;gap:6px;margin:12px 0 }
.pw-dialog input,.pw-dialog textarea,.pw-dialog select { width:100%;box-sizing:border-box }
.pw-dialog [hidden] { display:none }
.pw-dialog .pw-form-fields { display:contents }
@media(max-width:1100px) { .pw-workplace .pw-columns { grid-template-columns:minmax(290px,.85fr) minmax(320px,1fr) } }
@media(max-width:900px) { .pw-workplace .pw-columns { display:block }.pw-orders { max-height:none }.pw-workplace #productionActionPanel { overflow:auto;max-height:94dvh } }

.pw-dialog input[type=checkbox] { width:auto;justify-self:start }

/* Readability93: queue stays visible; product data precedes actions and archives. */
body:has([data-screen-panel="production"].active) #caseContextBar{display:none!important}
body:has([data-screen-panel="production"].active) #feedbackDock{position:static!important;display:flex;justify-content:flex-end;padding:10px}
.pw-workplace #productionMetrics{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.pw-workplace #productionMetrics .metric{display:flex;flex-direction:row;align-items:center;gap:9px;box-shadow:none;padding:8px 12px;border-radius:8px;min-width:0;flex:1;font-size:11px}
.pw-workplace #productionMetrics .metric strong{font-size:18px;order:-1}.pw-workplace #productionMetrics .metric small{display:none}
.pw-workplace .pw-columns{grid-template-columns:minmax(340px,.9fr) minmax(440px,1.3fr);gap:14px}
.pw-columns>section:first-child{position:sticky;top:12px;padding:14px;min-width:0}
.pw-columns>section:first-child>.panel-head{margin-bottom:10px}.pw-columns>section:first-child>.panel-head h1{font-size:21px}.pw-columns>section:first-child>.panel-head p{display:none}
.pw-workplace .production-filters{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap;margin:8px 0 12px}
.pw-workplace .production-filters>label{flex:1;min-width:110px;font-size:11px}
.pw-workplace .production-filters select{width:100%;min-width:0;min-height:36px}
.pw-workplace [data-pw-advanced]{flex-basis:100%;font-size:11px}.pw-workplace [data-pw-advanced]>summary{cursor:pointer;padding:5px 0;color:#42645c}
.pw-advanced-fields{display:flex;gap:8px;flex-wrap:wrap;padding:7px 0}.pw-advanced-fields>label{min-width:100px;flex:1}
.pw-orders{max-height:calc(100dvh - 315px);min-height:180px;overscroll-behavior:contain}
.pw-orders table{table-layout:fixed;font-size:12px}.pw-orders th,.pw-orders td{padding:10px 6px;line-height:1.4}
.pw-orders th:nth-child(1){width:19%}.pw-orders th:nth-child(2){width:34%}.pw-orders th:nth-child(3){width:calc(10ch + 12px)}
.pw-workplace #productionActionPanel{padding:14px;max-height:calc(100dvh - 100px);overflow:auto;overscroll-behavior:contain}
.pw-workplace #productionActionPanel>.panel-head{margin-bottom:8px}.pw-workplace #productionActionPanel>.panel-head p{display:none}.pw-workplace #productionActionPanel h2{font-size:21px}
#pwOrderHero{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0 0 12px;font-size:11px}#pwOrderHero>strong{flex-basis:100%;font-size:16px}#pwOrderHero>span:first-of-type{flex:1}
#pwProductOverview h3{font-size:13px;margin:9px 0}.pw-product{border:1px solid #cbded5;background:#f8fbfa;padding:11px;border-radius:10px;margin-bottom:8px;min-width:0}
.pw-product-title{display:flex;justify-content:space-between;gap:8px;font-size:13px}.pw-product-title>span{font-size:11px;color:#5b7268}
.pw-product dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px 12px;margin:10px 0}.pw-product dt{font-size:10px;color:#5b7268}.pw-product dd{font-size:13px;font-weight:650;margin:3px 0 0;overflow-wrap:anywhere}.pw-product dl>div:nth-child(-n+3) dd{font-size:18px;color:#145b4e}
.pw-product details{font-size:11px;margin-top:7px}.pw-product summary{cursor:pointer;padding:4px 0}.pw-product details p{margin:5px 0}.pw-item-notes{font-size:12px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.pw-main-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.pw-main-actions>.btn{min-height:40px}.pw-main-actions>.primary{flex:1}.pw-finish-reason{flex-basis:100%;font-size:11px;color:#715c20;margin:0}
.pw-office-warning{flex-basis:100%;padding:8px 10px!important;font-size:11px}.pw-office-warning .validation-list{margin:5px 0;padding-left:16px}
.pw-fold{border:1px solid #d8e4df;border-radius:9px;padding:0;margin-top:10px;min-width:0}.pw-fold>summary{cursor:pointer;padding:11px;font-size:12px;font-weight:600;color:#365b4e}.pw-fold[open]>:not(summary){margin:0;padding:10px;box-shadow:none;border:0}
#pwProductionShortages{margin-top:14px}#pwProductionShortages>h3{font-size:13px}.pw-shortage{font-size:12px;padding:10px}
.pw-workplace #pwTimeline{margin:0;border:0;padding:0}.pw-workplace #productionOrderDetailsPanel{margin:0}
.pw-workplace>div.layout:not(.pw-columns){display:block}.pw-workplace #productionOrderDetails .spreadsheet{min-height:0}
.pw-dialog{padding:20px;border:1px solid #bcd1c5;border-radius:12px}.pw-dialog h2{font-size:20px}.pw-dialog input,.pw-dialog select{min-height:44px;padding:9px;font:inherit}.pw-dialog textarea{min-height:90px;padding:9px;font:inherit}.pw-dialog .pw-quantity-unit{display:grid;grid-template-columns:1fr 1fr;gap:12px}.pw-dialog [role=status]{font-size:13px;line-height:1.5;color:#7e5218}.pw-summary{border:1px solid #b9d9ca;background:#eaf6ef;padding:10px;border-radius:7px;font-weight:650;overflow-wrap:anywhere}.pw-dialog .pw-confirm{display:flex;align-items:flex-start}.pw-dialog .pw-confirm input{min-height:20px;flex:none}.pw-dialog [data-pw-latest]{padding:10px;border:1px solid #cbdccf;margin:10px 0;font-size:12px}
@media(max-width:1100px){body:has([data-screen-panel="production"].active) .sidebar{display:none!important}body:has([data-screen-panel="production"].active) .app{grid-template-columns:minmax(0,1fr)}.pw-workplace .pw-columns{grid-template-columns:minmax(330px,.9fr) minmax(420px,1.2fr)}}
@media(max-width:900px){.pw-workplace .pw-columns{display:block}.pw-columns>section:first-child{position:static}.pw-orders{max-height:none}.pw-workplace #productionMetrics .metric{flex:1 1 40%;padding:6px 9px}body:not(.production-detail-open) .pw-workplace #productionActionPanel{display:none}body.production-detail-open .pw-workplace #productionActionPanel{display:block;max-height:none;padding:12px 12px 120px}body.production-detail-open #productionActionPanel>.panel-head{position:sticky;top:-12px;background:white;z-index:3;padding:10px 0}body.production-detail-open .pw-workplace .pw-columns>section:first-child{display:none}.pw-dialog{padding:15px}.pw-dialog h2{font-size:18px}.pw-dialog .actions{position:sticky;bottom:-15px;background:white;padding:10px 0;flex-wrap:wrap}.pw-dialog button{min-height:44px}.pw-product dl{gap:8px}.pw-product dd{font-size:12px}.pw-workplace #productionActionPanel{overflow:auto}.pw-dialog .pw-quantity-unit{gap:8px}}

.pw-workplace #productionMetrics .metric{min-height:0!important;height:auto!important}
.pw-orders table{min-width:0!important;max-width:100%;width:100%!important}
.pw-orders th,.pw-orders td{min-width:0;white-space:normal!important;text-overflow:clip;overflow:visible}

.pw-orders td:nth-child(3){font-size:11px;font-variant-numeric:tabular-nums}
.pw-orders td:nth-child(3) time{white-space:nowrap}

.pw-workplace #productionActionPanel{overflow-anchor:none}

.pw-summary.incomplete { background:#f5f6f7; border-color:#d7dce0; }
.pw-hero-status { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.pw-hero-deadline { white-space:nowrap; }
#pwMobileNotice { display:none; }
@media (max-width:900px) {
  body:has(.pw-workplace.active) #toastStack .toast[data-scope="production"] { display:none; }
  #pwMobileNotice:not(:empty) { display:block; margin:8px 0; }
  #pwMobileNotice .toast { width:100%; max-width:none; }
}

.pw-pending-ops { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:8px }
.pw-pending-ops strong { color:#854815 }

/* Owner request 04Nov: a full-width grouped list like CRM, details on selection. */
.pw-workplace .pw-columns{grid-template-columns:minmax(0,1fr)}
.pw-columns>section:first-child{position:static;padding:18px;border:1px solid var(--line,#dbe4e6);border-radius:14px}
.pw-workplace .pw-orders{max-height:none;min-height:180px;overflow:visible}
.pw-queue-group{border:1px solid var(--line,#e0e9e7);border-radius:9px;margin:9px 0;overflow:hidden}
.pw-queue-group>summary{cursor:pointer;display:flex;gap:10px;align-items:center;padding:10px 12px;background:var(--panel-soft,#f0f7f4);font-size:13px;font-weight:700}
.pw-queue-group>summary:before{content:'›';font-size:18px}.pw-queue-group[open]>summary:before{transform:rotate(90deg)}
.pw-queue-group>summary b{border-radius:15px;background:var(--panel,#fff);padding:1px 7px;font-size:11px}
.pw-orders table{font-size:12px}.pw-orders th{position:static;background:var(--panel,#fff);font-size:10px;color:var(--muted,#637673);border-bottom:0}
.pw-orders td,.pw-orders th{padding:10px 12px}.pw-orders th:nth-child(1){width:19%}.pw-orders th:nth-child(2){width:35%}.pw-orders th:nth-child(3){width:calc(11ch + 24px)}
.pw-orders tr[data-order-id]:hover{background:var(--panel-soft,#f0f7f4)}
body:not(.production-detail-open) .pw-workplace #productionActionPanel{display:none}
body.production-detail-open .pw-workplace #productionActionPanel [data-production-detail-close]{display:inline-flex}
@media(min-width:901px){body.production-detail-open .pw-workplace .pw-columns{grid-template-columns:minmax(0,1.25fr) minmax(400px,1fr)}body.production-detail-open .pw-workplace #productionActionPanel{position:sticky;top:12px;display:block}}
@media(max-width:900px){.pw-columns>section:first-child{padding:10px}.pw-orders th,.pw-orders td{padding:9px 6px}.pw-orders th:nth-child(1){width:19%}.pw-orders th:nth-child(2){width:32%}}
.pw-list-workspace [hidden]{display:none!important}
[data-pw-order-tabs],[data-pw-detail-tabs]{display:flex;gap:8px;flex-wrap:wrap;padding:12px 0}
[data-pw-order-tabs] [aria-current=true],[data-pw-detail-tabs] [aria-pressed=true]{background:#176b50;color:white;border-color:#176b50}
.pw-order-tab{display:inline-flex;max-width:100%}
.pw-order-tab [data-pw-tab]{border-start-end-radius:0;border-end-end-radius:0}
.pw-order-tab [data-pw-close-tab]{border-start-start-radius:0;border-end-start-radius:0;margin-inline-start:-1px;min-width:44px;padding-inline:8px;font-size:1.25rem}
.pw-order-tab .btn:focus-visible{position:relative;z-index:1}
.pw-product-table{overflow:auto}.pw-product-table table{width:100%;border-collapse:collapse;min-width:700px}
.pw-product-table th,.pw-product-table td{padding:12px;border-bottom:1px solid #d8e4df;text-align:left;vertical-align:top;white-space:normal}
.pw-list-workspace #productionActions:has([data-pw-label-actions]:not([hidden]))>:not([data-pw-label-actions]){display:none!important}
.pw-list-workspace [data-pw-order-tabs],.pw-list-workspace [data-pw-detail-tabs]{height:auto;min-height:0;align-items:center;align-content:start;align-self:start;padding:6px 0}
.pw-list-workspace [data-pw-order-tabs] .btn,.pw-list-workspace [data-pw-detail-tabs] .btn{height:40px;min-height:40px;align-self:start}
body.production-detail-open .pw-list-workspace #productionMetrics{display:none!important}

/* Owner request: open one order across the whole workspace at every width. */
body.production-detail-open .pw-workplace .pw-columns{grid-template-columns:minmax(0,1fr)}
body.production-detail-open .pw-workplace .pw-columns>section:first-child{display:none!important}
body.production-detail-open .pw-workplace #productionActionPanel{position:static;display:block;width:100%;min-width:0;max-width:none;max-height:none;box-sizing:border-box}
.pw-list-workspace .pw-product-table table{min-width:1400px;font-size:12px}
.pw-list-workspace .pw-product-table th{background:var(--panel-soft,#f0f7f4);font-size:11px}
.pw-list-workspace .pw-product-table td{padding:10px;min-width:65px}
.pw-list-workspace .pw-product-table td:last-child{min-width:240px}
.pw-current-stage{display:grid;gap:4px;margin-bottom:8px;padding:8px 10px;border-left:4px solid #176b50;background:#edf7f2;border-radius:5px}
.pw-current-stage>span{font-size:10px;color:#4b6257}.pw-current-stage>strong{font-size:12px}
.pw-current-stage[data-pw-current-stage="waiting"]{border-color:#a65d09;background:#fff4df}
.pw-stage-track{display:flex;flex-wrap:wrap;gap:5px 12px;list-style:none;margin:0 0 6px;padding:0;color:#61716b;font-size:11px}
.pw-stage-track li:before{content:'○';margin-right:4px}.pw-stage-track .is-complete:before{content:'✓';color:#176b50}
.pw-stage-track .is-current{font-weight:700;color:#176b50}.pw-stage-track .is-current:before{content:'●'}
@media(max-width:900px){.pw-current-stage{padding:6px}.pw-stage-track{gap:5px}}

.pw-list-workspace #productionActionPanel>*{min-width:0;max-width:100%;box-sizing:border-box}
.pw-list-workspace #productionActionPanel>.panel-head{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.pw-list-workspace .pw-product-table{max-width:100%;min-width:0;overflow-x:auto}
.pw-list-workspace{min-width:0;max-width:100%;width:100%;box-sizing:border-box;align-content:start}
.pw-list-workspace .pw-columns{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
.pw-list-workspace #pwProductOverview{overflow:hidden}

[data-product-shortages] [data-material-rows] fieldset{min-width:0;max-width:100%;box-sizing:border-box;padding:12px;margin:12px 0;border:1px solid #adc8bd;border-radius:8px}
[data-product-shortages] [data-material-rows] pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:12px;line-height:1.5}
[data-product-shortages] select,[data-product-shortages] input,[data-product-shortages] textarea{max-width:100%;min-width:0;box-sizing:border-box}

[data-product-shortages] .pw-component-choice{display:flex;align-items:flex-start;gap:10px;margin:0;font-weight:600}
[data-product-shortages] .pw-component-choice input[type=checkbox]{width:20px;min-height:20px;margin:0;flex:0 0 20px}
[data-product-shortages] .pw-component-choice span{flex:1;min-width:0;overflow-wrap:anywhere}
[data-product-shortages] .pw-component-choice strong{font-size:12px;white-space:nowrap}
[data-product-shortages] [data-material-configuration]{margin-top:12px}

.pw-technical-facts{margin:0;display:grid;gap:8px}.pw-technical-facts>div{display:block;overflow-wrap:anywhere}.pw-technical-facts dt{font-size:.82rem;color:#50635d}.pw-technical-facts dd{margin:1px 0 0;font-weight:600}.pw-product-notes{white-space:pre-wrap;overflow-wrap:anywhere}

.pw-material-tree{display:grid;gap:18px;max-width:850px;margin:12px auto}.pw-tree-node{position:relative;background:#fff;border:1px solid #c3d1cc;border-radius:12px;padding:16px;min-width:0}.pw-tree-node h4{margin:0 0 8px}.pw-tree-node p{margin:6px 0;overflow-wrap:anywhere}.pw-tree-node.is-current{border:2px solid #176e62;box-shadow:0 0 0 3px #176e6212}.pw-tree-node.is-complete{background:#f0f7f3}.pw-material-tree>.pw-tree-node:not(:first-child)::before{content:'';position:absolute;left:50%;top:-19px;height:18px;border-left:2px solid #97aaa3}.pw-tree-branches{display:grid;grid-template-columns:1fr 1fr;gap:14px}.pw-tree-branch{min-width:0;opacity:.65}.pw-tree-branch.is-chosen{opacity:1}.pw-tree-node .actions{display:flex;flex-wrap:wrap;gap:8px}.pw-tree-node .btn{white-space:normal;max-width:100%}@media(max-width:650px){.pw-tree-branches{grid-template-columns:1fr}.pw-material-tree{max-width:100%;gap:14px}.pw-tree-node{padding:12px}}

/* Audit 06 Nov: readable queue and progressive technical disclosure. */
.pw-orders .pw-current-stage{margin-bottom:4px;padding:6px 8px}
.pw-current-stage[data-pw-current-stage="to_order"],.pw-current-stage[data-pw-current-stage="waiting_materials"]{border-color:#a65d09;background:#fff4df}
.pw-read-control{display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:12px;color:#50635d}.pw-read-error{color:#9a4710;font-weight:600}
.pw-product-table details{margin-top:8px}.pw-product-table summary{cursor:pointer;color:#145e4e;font-weight:600}.pw-product-table details[open]>summary{margin-bottom:8px}
.pw-product-table .pw-technical-facts{gap:5px}.pw-product-table .pw-product-notes p{white-space:pre-wrap}

/* Production audit 07 Nov: filter scope and immediate per-order card entry. */
.pw-list-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:12px 0;color:#4b6257;font-size:12px}
.pw-orders tr[data-order-id]:focus-visible,.pw-orders .btn:focus-visible{outline:3px solid #227d68;outline-offset:2px}
@media(max-width:900px){.pw-list-summary .btn{min-height:40px}.pw-list-summary{align-items:flex-start}}

/* Narrow screens: full-width actions instead of four squeezed table columns. */
@media(max-width:650px){
 .pw-orders table,.pw-orders tbody{display:block;width:100%!important;max-width:100%;min-width:0!important}
 .pw-orders thead{display:none}
 .pw-orders tr[data-order-id]{display:grid;grid-template-columns:minmax(90px,.6fr) minmax(0,1.4fr);padding:8px 0;border-bottom:1px solid #d8e4df;gap:0;max-width:100%;box-sizing:border-box}
 .pw-orders tr[data-order-id]>td{display:block;width:auto!important;min-width:0;max-width:100%;border:0;padding:6px 10px;box-sizing:border-box}
 .pw-orders tr[data-order-id]>td:nth-child(3),.pw-orders tr[data-order-id]>td:nth-child(4){grid-column:1/-1}
 .pw-orders tr[data-order-id]>td:nth-child(3)::before{content:'Termin: ';color:#52635b}
}

.pw-tree-node[data-pw-card-pending]{background:#e3f5e7;border-color:#24783d}
.pw-orders tr[data-pw-card-pending]>td{background:#e3f5e7}
.pw-orders tr[data-pw-unread],
.pw-orders tr[data-pw-unread] > td {
  background:#14543b;
  color:#fff;
}
.pw-orders tr[data-pw-unread] small,
.pw-orders tr[data-pw-unread] > td:nth-child(3)::before {
  color:#deefe5;
}
.pw-orders tr[data-pw-unread] .pw-unread-label { font-weight:700 }
.pw-orders tr[data-pw-unread] .pw-current-stage {
  background:#1f6248;
  border-color:#b3dcc4;
  color:#fff;
}
.pw-orders tr[data-pw-unread]:focus-visible {
  outline:3px solid #f4d787;
  outline-offset:-3px;
}

@media(min-width:901px){
  .pw-workplace .pw-columns,
  body.production-detail-open .pw-workplace .pw-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
  body.production-detail-open .pw-workplace .pw-columns>section:first-child{display:block!important}
  .pw-workplace.pw-list-workspace #productionActionPanel,
  body:not(.production-detail-open) .pw-workplace.pw-list-workspace #productionActionPanel{display:block;position:sticky;top:12px;max-height:calc(100dvh - 24px);overflow:auto}
}

.pw-orders tr[aria-current="true"] > td {
  box-shadow: inset 0 2px #2563a7, inset 0 -2px #2563a7;
}
.pw-orders tr[aria-current="true"]:not([data-pw-card-pending]):not([data-pw-unread]) > td {
  background: #e0efff;
}
.pw-orders tr[aria-current="true"] > td:first-child {
  box-shadow: inset 4px 0 #2563a7, inset 0 2px #2563a7, inset 0 -2px #2563a7;
}
@media (min-width:901px) {
  .pw-workplace.pw-list-workspace #productionActionPanel[data-pw-detail-view="products"] {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

[data-pw-checklist]{min-width:0;margin:0 0 12px;padding:6px 12px 9px;border:1px solid #d1dce4;border-radius:9px}
[data-pw-checklist][hidden]{display:none}
[data-pw-checklist] legend{padding:0 5px;font-weight:650}
.pw-checklist-items{display:flex;flex-wrap:wrap;gap:2px 18px}
.pw-checklist-items label{display:inline-flex;align-items:center;gap:7px;min-height:32px;cursor:pointer}
.pw-checklist-items input[type=checkbox]{width:17px;height:17px;margin:0;accent-color:#176b63}
[data-pw-checklist-status]{font-size:.83rem}

/* Keep the selected order as compact as the adjacent queue. */
.pw-list-workspace #productionActionPanel {
  font-size:12px;
  line-height:1.4;
}
.pw-list-workspace #productionActionPanel > .panel-head h2 {font-size:18px}
.pw-list-workspace #pwOrderHero {margin-bottom:7px}
.pw-list-workspace #pwOrderHero > strong {font-size:14px}
.pw-list-workspace #productionOrderDetails > .detail-grid {
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
  margin:5px 0 7px;
}
.pw-list-workspace #productionOrderDetails .fact {
  min-width:0;
  min-height:0;
  padding:5px 7px;
  gap:2px;
}
.pw-list-workspace #productionOrderDetails .fact > span {font-size:10px}
.pw-list-workspace #productionOrderDetails .fact > strong {
  font-size:12px;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.pw-list-workspace #productionOrderDetails > .form-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px;
}
.pw-list-workspace #productionOrderDetails > .form-grid > .field {
  grid-column:auto;
  gap:3px;
  min-width:0;
}
.pw-list-workspace #productionOrderDetails > .form-grid label {font-size:10px}
.pw-list-workspace #productionOrderDetails .summary-box {
  min-height:0;
  padding:5px 7px;
  font-size:12px;
  line-height:1.4;
  overflow-wrap:anywhere;
}
.pw-list-workspace .pw-product-table th {font-size:10px}
.pw-list-workspace .pw-product-table td {padding:7px 6px;line-height:1.4}
.pw-list-workspace .pw-product-table .pw-technical-facts dt {font-size:11px}

@media(max-width:520px) {
  .pw-list-workspace #productionOrderDetails > .detail-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .pw-list-workspace #productionOrderDetails > .form-grid {grid-template-columns:minmax(0,1fr)}
}

.pw-product-heading { margin-bottom:8px }
.pw-product-heading h3 { margin:0 0 4px }
.pw-product-scroll {
  display:grid;
  gap:2px;
  font-size:12px;
  color:var(--muted,#4b6257);
}
.pw-product-scroll[hidden] { display:none }
.pw-product-scroll input[type="range"] {
  width:100%;
  min-height:24px;
  margin:0;
  padding:0;
  accent-color:#176b50;
  cursor:ew-resize;
}
.pw-product-table { scrollbar-width:auto }

.pw-stage-menu {
  position: fixed;
  z-index: 200;
  display: grid;
  gap: 4px;
  min-width: min(245px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  padding: 8px;
  border: 1px solid var(--line, #cbd5d1);
  border-radius: 10px;
  background: var(--panel, #fff);
  color: var(--ink, #172b24);
  box-shadow: 0 8px 24px #172b2429;
}
.pw-stage-menu strong, .pw-stage-menu small { padding: 2px 8px; }
.pw-stage-menu button {
  padding: 7px 8px;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.pw-stage-menu button:hover:not(:disabled), .pw-stage-menu button:focus-visible { background: #dfeee8; color: #172b24; }
.pw-stage-menu button:disabled { opacity: .55; cursor: default; }

[data-pw-queue-switch]{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 12px}
[data-pw-queue-list="archive"] tr[data-order-id] td{background:var(--panel-soft,#f2f5f4);color:var(--muted,#53625d)}
[data-pw-queue-list="archive"] tr[data-order-id]:is(:hover,:focus-visible,[aria-current="true"]) td{background:var(--panel,#fff);color:var(--text,#1d2522)}
[data-pw-queue-list="archive"] .pw-current-stage{border-color:#818c87;background:#edf0ef;color:#48544f}
#pwCrmStages{margin-bottom:12px}
.pw-crm-stage{padding:8px 0;border-top:1px solid var(--line,#d9e3dd)}
.pw-crm-stage p,.pw-crm-stage ul{margin:4px 0}
.pw-crm-stage time{white-space:nowrap}
dialog[data-product-shortages]{position:fixed;inset:0;margin:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;box-sizing:border-box;border:0;border-radius:0;padding:clamp(12px,2vw,24px);background:#fff}
[data-product-shortages] .pw-matrix-header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:8px}
[data-product-shortages] .pw-matrix-header :is(h2,p){margin:0 0 4px}
[data-product-shortages] .pw-matrix-header p{font-size:13px}
[data-product-shortages] .pw-material-grid{overflow:auto;width:min(100%,calc(152px + var(--pw-component-count,1) * 76px));max-height:52dvh;border:1px solid #b7c9c3;border-radius:6px;box-sizing:border-box}
[data-product-shortages] .pw-material-grid table{width:100%;min-width:calc(132px + var(--pw-component-count,1) * 50px);border-spacing:0;table-layout:fixed;font-size:11px;line-height:1.22}
[data-product-shortages] .pw-material-grid :is(th,td){border-right:1px solid #dae5e1;border-bottom:1px solid #dae5e1;padding:3px 4px;white-space:normal;overflow-wrap:anywhere;font-size:11px;vertical-align:middle}
[data-product-shortages] .pw-material-grid td{text-align:center}
[data-product-shortages] .pw-material-grid thead th{position:sticky;top:0;z-index:2;background:#ecf5f0;text-align:left;letter-spacing:0;text-transform:none}
[data-product-shortages] .pw-material-grid tr>th:first-child{position:sticky;left:0;z-index:1;background:#f7faf8;width:146px;text-align:left}
[data-product-shortages] .pw-material-grid thead th:first-child{z-index:3}
[data-product-shortages] .pw-material-grid caption.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
[data-product-shortages] .pw-material-grid thead th span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
[data-product-shortages] .pw-column-choice{display:grid;justify-items:center;gap:3px;margin:0;text-align:center;cursor:pointer}
[data-product-shortages] .pw-column-choice input[type=checkbox]{width:16px;min-width:16px;height:16px;min-height:16px;margin:0}
[data-product-shortages] .pw-material-grid tbody th small{display:block;margin-top:2px;font-size:10px;font-weight:400;color:#445750}
[data-product-shortages] .pw-material-check{display:grid;place-items:center;align-content:center;gap:1px;margin:0;padding:2px;min-height:29px;cursor:pointer}
[data-product-shortages] .pw-material-check input[type=checkbox]{width:16px;min-width:16px;height:16px;min-height:16px;margin:0;justify-self:center}
[data-product-shortages] .pw-material-check:has(input:checked){background:#d7eee1;border-radius:4px}
[data-product-shortages] .pw-material-summary{max-width:660px;margin:12px 0}
[data-product-shortages] .pw-material-summary h3,[data-product-shortages] [data-material-selection-summary]{margin:0 0 5px}
[data-product-shortages] .pw-material-totals{width:100%;min-width:0;table-layout:fixed;border-spacing:0;font-size:13px;text-align:left}
[data-product-shortages] .pw-material-totals :is(th,td){padding:4px 6px;border-bottom:1px solid #dae5e1;text-align:left;overflow-wrap:anywhere}
[data-product-shortages] .pw-material-totals thead th{background:#ecf5f0}.pw-material-totals thead th:nth-child(2){width:80px}.pw-material-totals thead th:nth-child(3){width:94px}.pw-material-totals thead th:nth-child(4){width:100px}
[data-product-shortages] .pw-material-totals td:nth-child(2){white-space:nowrap}
[data-product-shortages] .pw-material-totals input{width:88px;min-width:0;max-width:100%;padding:3px 4px;min-height:29px}
[data-product-shortages] [data-material-rows] fieldset[hidden]{display:none}
[data-product-shortages] [data-material-rows] fieldset label{margin:6px 0}
[data-product-shortages] .pw-matrix-footer{position:sticky;bottom:0;background:#fff;border-top:1px solid #b7c9c3;padding:8px 0;z-index:4}
[data-product-shortages] .pw-matrix-footer p:empty{display:none}
[data-product-shortages] .pw-matrix-footer>small{display:inline-block;margin-left:8px}
@media(max-width:600px){[data-product-shortages] .pw-material-grid tr>th:first-child{width:108px}[data-product-shortages] .pw-material-totals input{width:72px}[data-product-shortages] .pw-material-totals thead th:nth-child(2){width:62px}[data-product-shortages] .pw-material-totals thead th:nth-child(3){width:68px}[data-product-shortages] .pw-material-totals thead th:nth-child(4){width:74px}}
@media(pointer:coarse){[data-product-shortages] .pw-material-check{min-height:36px}}

[data-product-shortages] .pw-material-grid thead th[data-readable-label] span{display:block;overflow:visible}
[data-product-shortages] .pw-material-check small{font-size:10px;color:#445750}
[data-product-shortages] .pw-reported-shortages{margin:0 0 10px;padding:7px 9px;border:1px solid #b7c9c3;border-radius:6px;background:#f4faf6;font-size:12px}
[data-product-shortages] .pw-reported-shortages :is(h3,p){margin:0 0 4px}
[data-product-shortages] .pw-reported-shortages p{margin:4px 0 0}
[data-product-shortages] .pw-reported-scroll{max-height:19dvh;overflow:auto}
[data-product-shortages] .pw-material-check .pw-material-already-reported{color:#17633d;font-weight:700}

[data-product-shortages] .pw-mesh-width-suggestion{display:block;margin-top:3px;white-space:normal;line-height:1.25}

.pw-aluprof-header,.pw-aluprof-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
.pw-aluprof-header h2,.pw-aluprof-footer p{margin:0}
.pw-aluprof-list{max-height:58dvh;overflow:auto;padding:0;border:0;margin:0 0 12px;min-inline-size:0}
.pw-aluprof-list details{border:1px solid #d3dfda;border-radius:6px;margin:0 0 6px;padding:6px 9px}
.pw-aluprof-list summary{cursor:pointer;font-weight:650}
.pw-aluprof-list summary span,.pw-aluprof-item small{color:var(--muted,#53655d);font-weight:400}
.pw-aluprof-list .pw-aluprof-item,.pw-aluprof-list .pw-aluprof-select-all{display:flex;align-items:flex-start;gap:8px;margin:0;padding:6px 2px}
.pw-aluprof-item{border-top:1px solid #d3dfda}
.pw-aluprof-item span{flex:1;overflow-wrap:anywhere}
.pw-aluprof-item small{display:block}
.pw-aluprof-item strong{white-space:nowrap}
.pw-aluprof-list input[type=checkbox]{width:auto;min-width:auto}

/* Leave room for fulfillment alongside the status, including split view. */
.pw-orders th:nth-child(2){width:29%}
.pw-orders th:nth-child(5){width:17%}
.pw-orders td[data-pw-realization]{font-weight:600;overflow-wrap:normal}
@media(max-width:900px){.pw-orders th:nth-child(2){width:26%}.pw-orders th:nth-child(3){width:calc(8ch + 12px)}.pw-orders th:nth-child(5){width:20%}}

/* Production warehouse */
.pw-dialog[data-pw-coulisse-dialog] {
  box-sizing: border-box;
  width: min(1100px, calc(100vw - 24px));
  height: min(780px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
}
.pw-dialog[data-pw-coulisse-dialog][open] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pw-warehouse-tabs, .pw-warehouse-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pw-warehouse-tabs { padding-bottom: 10px; border-bottom: 1px solid #cbd8d2; }
.pw-warehouse-body {
  flex: 1;
  overflow: auto;
  min-height: 0;
}
.pw-warehouse-table { overflow: auto; max-height: 53dvh; }
.pw-warehouse-table thead { position: sticky; top: 0; z-index: 1; background: white; }
.pw-warehouse-table small { display: block; font-weight: normal; }
.pw-warehouse-modes input[type=search] { width: min(100%, 320px); }
.pw-warehouse-footer { position: sticky; bottom: 0; padding: 10px 0; background: white; }
@media (max-width: 650px) {
  .pw-dialog[data-pw-coulisse-dialog] { padding: 12px; }
  .pw-warehouse-tabs .btn { flex: 1 1 40%; }
  .pw-warehouse-table td[data-stock-key] { min-width: 92px; }
}

.pw-coulisse-picture figure { margin: 12px 0; }
.pw-coulisse-picture img { display: block; width: 100%; max-height: 56vh; object-fit: contain; background: white; border-radius: 6px; }
.pw-coulisse-picture img[hidden] { display: none; }
.pw-coulisse-picture figcaption { margin-top: 8px; font-size: 12px; }
