/* Project material checkout. Scoped to this form to preserve other modules. */
body #modal:has(#ppSaleForm) .modal-card{width:calc(100vw - 32px)!important;max-width:1600px!important;max-height:96dvh;padding:18px;overflow:auto}
#ppSaleForm{font-size:13px;min-width:0}
#ppSaleForm .pp-pos-head{padding:4px 0 14px}
#ppSaleForm .pp-pos-head p{font-size:12px}
#ppSaleForm .pp-pos-layout{display:grid;grid-template-columns:minmax(260px, .8fr) minmax(0,2fr);gap:16px;align-items:start}
#ppSaleForm .pp-pos-catalog,#ppSaleForm .pp-pos-sale{min-width:0;border:1px solid #dbe7f2;border-radius:12px;background:white;padding:14px}
#ppSaleForm .pp-pos-catalog{position:sticky;top:0;background:#f8fbff}
#ppSaleForm .pp-catalog-heading{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
#ppSaleForm .pp-catalog-heading small{width:100%;font-size:10px;color:#6e7f98;font-weight:800;letter-spacing:.07em}
#ppSaleForm h3{font-size:16px;margin:0}
#ppSaleForm .pp-catalog-results{max-height:62dvh;overflow:auto;display:grid;gap:8px;padding:2px}
#ppSaleForm .pp-product{width:100%;display:flex;gap:10px;align-items:center;text-align:left;padding:12px 10px;background:#fff;border:1px solid #d8e5f4;border-radius:9px;cursor:pointer;color:#12233f}
#ppSaleForm .pp-product:hover,#ppSaleForm .pp-product:focus-visible{border-color:#1267df;background:#edf5ff;outline:2px solid #bdd8ff}
#ppSaleForm .pp-product.selected{border-color:#89d3ad;background:#f1fcf5}
#ppSaleForm .pp-product-image{width:38px;flex-shrink:0;font-size:24px}
#ppSaleForm .pp-product-image img{width:38px;height:42px;object-fit:contain}
#ppSaleForm .pp-product-info{min-width:0;display:grid;gap:4px;flex:1;overflow-wrap:anywhere}
#ppSaleForm .pp-product-info b{font-size:12px}
#ppSaleForm .pp-product-info small{font-size:10px;color:#65788f}
#ppSaleForm .pp-product-info strong{color:#1267df}
#ppSaleForm .pp-product-add{background:#e8f1ff;color:#1267df;border-radius:7px;font-size:22px;width:32px;height:36px;text-align:center;line-height:36px;flex-shrink:0}
#ppSaleForm .pp-pos-destination{margin:0;grid-template-columns:repeat(2,minmax(0,1fr));padding:12px;gap:10px}
#ppSaleForm label{min-width:0;font-size:11px}
#ppSaleForm input,#ppSaleForm select,#ppSaleForm textarea{min-width:0;max-width:100%;width:100%;font-size:13px}
#ppSaleForm .pp-material-panel{border:0;box-shadow:none;padding:0;margin-bottom:12px}
#ppSaleForm .pp-material-head{padding:4px 0 12px}
#ppSaleForm #ppCartCount{color:#6e7f98;font-size:11px}
#ppSaleForm .pp-cart-list{gap:16px;max-height:43dvh;overflow:auto;padding:10px 2px 2px}
#ppSaleForm .pp-catalog-grid{grid-template-columns:minmax(0,1.4fr) minmax(65px,.65fr) minmax(80px,.8fr) minmax(65px,.65fr) minmax(95px,1fr) 36px;gap:8px}
#ppSaleForm .pp-manual-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
#ppSaleForm .pp-manual-grid label:first-child{grid-column:span 3}
#ppSaleForm .pp-material-select{display:grid;gap:6px;align-self:center;overflow-wrap:anywhere}
#ppSaleForm .pp-line-total{min-width:0;padding:8px}
#ppSaleForm .pp-line-total b{white-space:normal;overflow-wrap:anywhere}
#ppSaleForm .pp-remove{min-width:32px;width:36px;padding:0}
#ppSaleForm .pp-empty-cart{min-height:220px;align-content:center;background:#fafcff;border:1px dashed #d7e3ef}
#ppSaleForm .pp-notes{padding:10px 0;color:#65788f}
#ppSaleForm summary{cursor:pointer}
#ppSaleForm textarea{border:1px solid #dbe7f2;border-radius:8px;padding:10px}
#ppSaleForm .pp-pos-footer{position:sticky;bottom:-18px;background:#f6faff;margin:12px -14px -14px;padding:16px;border-radius:0 0 12px 12px;z-index:2}
#ppSaleForm .pp-pos-footer .invoice-total{color:#128047;text-align:left;font-size:26px}
#ppSaleForm .pp-emit{background:#148348}
#ppSaleForm button:focus-visible{outline:3px solid #8ab9ff;outline-offset:2px}
@media(max-width:1150px){#ppSaleForm .pp-catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#ppSaleForm .pp-material-select{grid-column:1/-1}#ppSaleForm .pp-line-total{grid-column:span 2}#ppSaleForm .pp-remove{justify-self:end}}
@media(max-width:760px){body #modal:has(#ppSaleForm) .modal-card{padding:12px!important;max-width:calc(100vw - 20px)!important}#ppSaleForm .pp-pos-layout{grid-template-columns:minmax(0,1fr)}#ppSaleForm .pp-pos-catalog{position:static}#ppSaleForm .pp-catalog-results{max-height:260px}#ppSaleForm .pp-cart-list{max-height:none}#ppSaleForm .pp-pos-footer{position:static}#ppSaleForm .pp-pos-footer>div{width:100%}#ppSaleForm .pp-pos-footer button{width:100%}#ppSaleForm .pp-manual-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#ppSaleForm .pp-manual-grid label:first-child{grid-column:1/-1}#ppSaleForm .pp-remove{grid-column:auto}#ppSaleForm .pp-product-grid{grid-template-columns:minmax(0,1fr)}}
