dialog:has(#consumptionPreview),dialog:has(#materialPrices),dialog:has(#manualStockWarnings){width:min(1160px,96vw)}.stock-correction-dialog{width:min(1050px,96vw)}.consumption-preview{max-height:54vh;overflow:auto}.material-preview-table{min-width:770px}.material-preview-table td{padding:14px 13px}.material-preview-table th{padding:13px;font-size:9px}.material-preview-table td:first-child{min-width:260px;max-width:430px}.material-preview-table small{display:block;margin-top:5px}.material-preview-table select{font-size:10px;padding:6px;margin-top:10px;max-width:100%}tfoot td{background:#eef8f7;font-weight:700;border-top:2px solid #c6e4e1;padding:18px 14px}tfoot td:last-child{font-size:16px;white-space:nowrap;color:#087f8e}.match-error{background:#fff7f1}.stock-warning{background:#fffaf0;border:1px solid #f1dba9;border-radius:9px;padding:17px;margin-bottom:20px}.stock-warning h3{font-size:15px;color:#a77321}.stock-warning table{background:#fff;border-radius:7px}.stock-warning .actions{align-items:center;margin-top:15px;gap:12px}.stock-warning small{display:block;font-size:10px;line-height:1.7}.stock-warning th{font-size:9px}.stock-warning td{padding:13px}.stock-correction-dialog input{min-width:90px}.stock-correction-dialog td:first-child{min-width:210px}.stock-correction-dialog td input[type=number]{width:130px}.scope-help{background:#f2f7f7;padding:12px 15px;border-radius:7px;color:#67828a;font-size:11px;line-height:1.7}.preview-pagination{display:flex;justify-content:center;gap:18px;align-items:center;margin-top:17px;color:#7f91a4;font-size:11px}.material-price-section{margin:23px 0}.material-price-section h3{font-size:15px;margin-bottom:14px}.material-price-section td{padding:15px 12px}.material-price-section th{padding:13px 12px;font-size:9px}.material-price-section table{min-width:650px}.material-price-section>small{display:block;padding-top:12px}.stock-warning>button{margin-top:14px}.consume-line .inline-number{width:135px}.consume-line select{max-width:620px}@media(max-width:650px){.stock-warning{padding:13px}.stock-warning .actions .btn{width:100%}.stock-warning td{padding:10px}.consumption-preview{max-height:57vh}.consume-line .inline-number{width:105px}}
.stock-correction-dialog small{display:block;margin-top:5px;font-size:10px;color:#8a9bad}.stock-correction-dialog input[data-correction-name]{margin-top:8px}

#editForm details{border:1px solid #e1e7f0;border-radius:8px;padding:12px}#editForm details summary{cursor:pointer;color:#52647a;font-size:12px}#editForm details[open] summary{margin-bottom:16px}#editForm label[hidden]{display:none}

/* Full-width grid sections must span both columns, including notes and details. */
.form-grid > .full{grid-column:1 / -1;min-width:0}
dialog:has(#editForm[data-production]){width:min(880px,calc(100vw - 32px));max-height:calc(100dvh - 32px)}
#editForm[data-production] .modal-body{padding:24px 30px}
#editForm[data-production] .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 24px;align-items:start}
#editForm[data-production] .field{font-size:14px;line-height:1.5;min-width:0;color:#263950}
#editForm[data-production] input,#editForm[data-production] select{font-size:15px;min-height:46px;min-width:0;max-width:100%;padding:11px 12px}
#editForm[data-production] input[type=checkbox]{min-height:0;width:18px;height:18px;flex-shrink:0;padding:0}
#editForm[data-production] .note{font-size:14px;line-height:1.7;color:#415a76}
#editForm[data-production] details{padding:18px}
#editForm[data-production] details summary{font-size:14px;line-height:1.6;font-weight:600;color:#344c65;white-space:normal}
#editForm[data-production] .modal-head h2{font-size:22px}
#editForm[data-production] .btn{font-size:14px;padding:12px 18px;white-space:normal}
@media(max-width:640px){
 dialog:has(#editForm[data-production]){width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}
 #editForm[data-production] .modal-body{padding:20px 18px}
 #editForm[data-production] .form-grid{grid-template-columns:minmax(0,1fr);gap:18px}
 #editForm[data-production] details{padding:14px}
 #editForm[data-production] input,#editForm[data-production] select{font-size:16px}
}

dialog:has(#editForm[data-production]) .modal-head{position:sticky;top:0;background:white;z-index:2}#editForm[data-production] .form-grid{gap:18px 24px}#editForm[data-production] .modal-body{padding-top:18px;padding-bottom:18px}


dialog:has(#importFile){width:min(1000px,96vw)}dialog:has(#importFile) .note{font-size:14px;line-height:1.7}dialog:has(#importFile) .field{font-size:14px}dialog:has(#importFile) .import-preview{overflow:auto}

dialog:has(#projectImportFile){width:min(1250px,96vw)}dialog:has(#projectImportFile) .note{font-size:14px;line-height:1.7}dialog:has(#projectImportFile) .import-preview{overflow:auto}dialog:has(#projectImportFile) td{white-space:normal;min-width:100px}dialog:has(#projectImportFile) td:nth-child(4){min-width:260px}

#projectImportPreview .table-wrap{max-height:38vh;overflow:auto}dialog:has(#projectImportFile) .modal-head{position:sticky;top:0;background:white;z-index:2}dialog:has(#projectImportFile) .modal-foot{position:sticky;bottom:-24px;background:white;padding:16px 0}dialog:has(#projectImportFile) .form-grid{gap:14px}dialog:has(#projectImportFile) .modal-body{padding-top:16px}


dialog:has(#projectImportFile) #projectImportPreview{max-height:none;overflow:visible;margin-top:0}dialog:has(#projectImportFile) .modal-foot{position:static}dialog:has(#projectImportFile) #projectImportPreview .table-wrap{max-height:300px}dialog:has(#projectImportFile) td{font-size:13px}dialog:has(#projectImportFile) .field{font-size:14px}


.catalog-filters{align-items:end;gap:18px;flex-wrap:wrap}.catalog-filters .field{flex:1;min-width:220px;font-size:14px}.catalog-filters input,.catalog-filters select{font-size:15px}.catalog-table td{white-space:normal;font-size:14px;line-height:1.6;overflow-wrap:anywhere}.catalog-table td:nth-child(2){min-width:260px}.catalog-table small{display:block}#chosenDefinition{overflow-wrap:anywhere;font-size:14px}#catalogResults .actions{flex-wrap:wrap}

.warehouse-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:22px}.warehouse-card{margin:0}.warehouse-summary{display:flex;gap:25px;flex-wrap:wrap;padding:20px 24px;align-items:center}.warehouse-summary p{margin:0;color:#60748c;font-size:14px}.warehouse-summary b{font-size:22px;color:#173b50;margin-right:5px}.warehouse-buttons{display:flex;flex-wrap:wrap;gap:10px;padding:0 24px 24px}.warehouse-filters{gap:22px;flex-wrap:wrap;align-items:end}.warehouse-filters .field{flex:1;min-width:220px;font-size:14px}.warehouse-table td{white-space:normal;line-height:1.6;font-size:14px}.warehouse-table td:first-child{min-width:240px}.warehouse-table small{display:block;font-size:13px;color:#657b91;margin-top:4px}.warehouse-table .actions{min-width:190px}.warehouse-table th{white-space:nowrap}.warehouse-card h2{overflow-wrap:anywhere}@media(max-width:640px){.warehouse-summary{gap:16px;padding:18px}.warehouse-buttons{padding:0 18px 18px}.warehouse-filters .field{min-width:0;width:100%}}
