.modal{z-index:1100}
.mes16-empty{padding:28px;color:#667085;text-align:center}
.mes16-procurement-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);gap:16px;align-items:start}
.mes16-po-panel{grid-column:1/-1}
.procurement-suggestion,.supplier-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;border-bottom:1px solid #eef0f3}
.procurement-suggestion>div:first-child,.supplier-row>div{display:grid;gap:3px;min-width:0}
.procurement-suggestion small,.procurement-suggestion span,.supplier-row small{color:#667085;font-size:11px}
.procurement-suggestion>div:last-child{display:flex;align-items:center;gap:8px;white-space:nowrap}
.procurement-suggestion>div:last-child strong{color:#a85b00}.procurement-suggestion.danger{background:#fff7f7}.procurement-suggestion.danger>div:last-child strong{color:#b4232c}
.purchase-order{padding:17px 20px;border-bottom:1px solid #eef0f3}.purchase-order.overdue{border-left:4px solid #d53a45;background:#fff8f8}
.purchase-order-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.purchase-order-head>div{display:grid;gap:4px}.purchase-order-head>div:last-child{text-align:right}
.purchase-order-head small{color:#667085;font-size:11px}.po-status{width:max-content;padding:3px 8px;border-radius:99px;background:#eef2f6;color:#475467;font-size:10px;font-weight:900}
.po-status.ordered,.po-status.partial{background:#fff3dc;color:#995500}.po-status.received{background:#e7f7ef;color:#117653}.po-status.cancelled{background:#f2f4f7;color:#98a2b3}
.purchase-order-lines{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.purchase-order-lines span{padding:5px 8px;border-radius:6px;background:#f6f7f9;color:#475467;font-size:11px}
.purchase-order-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:12px}
.mes16-modal form{width:min(760px,calc(100vw - 24px));max-height:94vh;overflow:auto}
.mes16-modal form>label{display:block;margin-top:13px;color:#475569;font-size:12px;font-weight:700}
.mes16-modal form>label>textarea,.mes16-modal form>label>input:not([type="checkbox"]){display:block;width:100%;margin-top:6px;padding:10px;border:1px solid #e2e8f0;border-radius:9px}
.mes16-modal form>label>textarea{min-height:78px;resize:vertical}
#modal{padding:12px}
#modal>form{max-height:calc(100vh - 24px);overflow:auto;overscroll-behavior:contain}
.purchase-lines-head{display:flex;align-items:center;justify-content:space-between;margin-top:16px;padding-bottom:8px;border-bottom:1px solid #e5e7eb}
.purchase-lines{display:grid;gap:8px;margin:10px 0}.purchase-line{display:grid;grid-template-columns:minmax(220px,1fr) 110px 110px 40px;gap:7px}.purchase-line .danger{padding:0}
.purchase-place-order{margin-top:12px}.receive-purchase-lines{display:grid;gap:9px;margin-bottom:14px}.receive-purchase-lines label{display:grid;grid-template-columns:1fr 130px;align-items:center;gap:14px;padding:12px;border:1px solid #e5e7eb;border-radius:9px}.receive-purchase-lines label span{display:grid;gap:3px}.receive-purchase-lines small{color:#667085}
.order-bom-section{margin-top:8px;padding:14px;border:1px solid #dfe4ea;border-radius:12px;background:#fbfcfd}
.order-bom-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.order-bom-head p{margin:3px 0;color:#667085;font-size:11px}.order-bom-head>div:last-child{display:flex;align-items:center;gap:7px}
.mes16-state{padding:4px 8px;border-radius:99px;background:#eef2f6;color:#475467;font-size:10px;font-weight:900;white-space:nowrap}.mes16-state.success{background:#e7f7ef;color:#117653}.mes16-state.warning{background:#fff3dc;color:#995500}
.order-bom-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #e7eaee}.order-bom-row>div:first-child{display:grid;gap:3px}.order-bom-row small{color:#667085}.order-bom-row span{color:#b4232c;font-size:11px;font-weight:800}.order-bom-row>div:last-child{display:flex;align-items:center;gap:6px;white-space:nowrap}.order-bom-row.ready{border-left:3px solid #1c9b70;padding-left:10px}.order-bom-row.short{border-left:3px solid #e79b27;padding-left:10px}
.order-bom-editor{display:grid;grid-template-columns:minmax(180px,1fr) 120px minmax(160px,1fr) auto;gap:7px;margin-top:12px}
.quality-checklist{display:grid;gap:8px;margin-bottom:15px}.quality-checklist label{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #e1e6eb;border-radius:9px;background:#fafbfc}.quality-checklist input{width:20px;height:20px}
.scan-flow-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:18px}
.scan-flow-card{display:grid;gap:4px;padding:12px;border:1px solid #e5e7eb;border-top:4px solid #94a3b8;border-radius:10px;background:#fff}.scan-flow-card.success{border-top-color:#1c9b70}.scan-flow-card.warning{border-top-color:#e79b27}.scan-flow-card.danger{border-top-color:#d53a45}.scan-flow-card.active{border-top-color:#2879d0;background:#f2f8ff}.scan-flow-card span,.scan-flow-card small{color:#667085;font-size:10px}.scan-flow-card button{margin-top:6px}
.scan-flow-note{margin:8px 0 0;color:#52606d;font-size:12px;font-weight:600}
.mes16-report-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;padding:18px}.mes16-report-kpis article{display:grid;gap:5px;padding:14px;border:1px solid #e5e7eb;border-top:4px solid #94a3b8;border-radius:10px}.mes16-report-kpis article.success{border-top-color:#1c9b70}.mes16-report-kpis article.warning{border-top-color:#e79b27}.mes16-report-kpis article.danger{border-top-color:#d53a45}.mes16-report-kpis span,.mes16-report-kpis small{color:#667085;font-size:11px}.mes16-report-kpis strong{font-size:20px}
@media(max-width:980px){.mes16-report-kpis{grid-template-columns:repeat(2,1fr)}.scan-flow-grid{grid-template-columns:1fr}}
@media(max-width:760px){
 .mes16-procurement-grid{grid-template-columns:1fr}.mes16-po-panel{grid-column:auto}
 .purchase-order-head,.order-bom-head,.order-bom-row{align-items:stretch;flex-direction:column}.purchase-order-head>div:last-child{text-align:left}.purchase-order-actions,.order-bom-row>div:last-child{justify-content:stretch}.purchase-order-actions button,.order-bom-row>div:last-child button{flex:1}
 .purchase-line{grid-template-columns:1fr 1fr 40px}.purchase-line select{grid-column:1/-1}.order-bom-editor{grid-template-columns:1fr 1fr}.order-bom-editor input:nth-of-type(2){grid-column:1/-1}.order-bom-editor button{grid-column:1/-1}
 .receive-purchase-lines label{grid-template-columns:1fr}.mes16-report-kpis{grid-template-columns:1fr}
}
