/* Focused corrections to the original ERP, without replacing its visual design. */
.drawer{max-width:100vw;height:100dvh}
.drawer-bd{min-height:0;overflow:auto;overscroll-behavior:contain}
#live-error,#entry-error{white-space:pre-wrap;overflow-wrap:anywhere}
.purchase-picker{position:fixed;z-index:105;display:flex;flex-direction:column;box-sizing:border-box;background:white;border:1px solid var(--border,#ddd);border-radius:10px;box-shadow:0 8px 28px #10182830;overflow:hidden;color:var(--text,#182230)}
.purchase-picker-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;border-bottom:1px solid var(--border,#ddd);flex:0 0 auto}
.purchase-picker-list{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;min-height:0;flex:1 1 auto;-webkit-overflow-scrolling:touch;touch-action:pan-y}
.purchase-picker-item{display:flex;align-items:center;gap:10px;width:100%;box-sizing:border-box;padding:10px 12px;text-align:left;white-space:normal;overflow-wrap:anywhere;background:white;border:0;border-bottom:1px solid #eef0f3;font:inherit;color:inherit}
.purchase-picker-item label{display:flex;align-items:center;gap:10px;flex:1;min-width:0;cursor:pointer}.purchase-picker-item input[type=checkbox]{width:20px;height:20px;flex:0 0 20px}.purchase-picker-info{display:flex;flex-direction:column;gap:4px;min-width:0}
.purchase-picker-item strong{font-size:14px}.purchase-picker-item span{font-size:13px}.purchase-picker-item small{color:var(--text3,#667085)}.purchase-picker-item:hover,.purchase-picker-item.picker-active{background:var(--primary-bg,#eef2ff)}
.purchase-picker-footer,.purchase-picker-tools{display:flex;gap:8px;padding:8px 12px;flex:0 0 auto;border-top:1px solid #eef0f3}.purchase-picker-footer{justify-content:space-between}.purchase-picker-footer .btn,.purchase-picker-item .btn{min-height:40px}
.purchase-edit-lines{max-width:100%;overflow-x:auto}.purchase-edit-lines table{table-layout:fixed;width:100%}.purchase-edit-lines th:first-child{width:34%}.purchase-edit-lines th:last-child{width:64px}.purchase-edit-lines input,.purchase-edit-lines select{width:100%;min-width:0;box-sizing:border-box}.purchase-edit-lines [data-line-total]{overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.purchase-edit-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px;padding:12px;background:var(--primary-bg,#eef2ff);border-radius:8px}.purchase-edit-totals>div{display:flex;flex-direction:column;gap:4px;min-width:0}.purchase-edit-totals span{font-size:12px;color:var(--text3,#667085)}.purchase-edit-totals strong{font-size:18px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
@media(max-width:720px){
 .drawer{width:100vw;right:-100vw}
 .drawer.show{right:0}
 .drawer-hd{padding:12px;flex-wrap:wrap}
 .drawer-bd{padding:12px}
 #live-form .frow{display:flex;flex-direction:column}
 #live-form .fcol{width:100%;min-width:0;flex:auto}
 #live-form input,#live-form select,#live-form textarea{max-width:100%;box-sizing:border-box;font-size:16px}
 #main .actbar{flex-wrap:wrap;gap:8px}
 #goodsBox,#pkgBox{overflow-x:auto}
 #goodsBox .detail-tbl,#pkgBox .detail-tbl{min-width:620px}
 .purchase-edit-lines table,.purchase-edit-lines tbody,.purchase-edit-lines tr,.purchase-edit-lines td{display:block}.purchase-edit-lines thead{display:none}.purchase-edit-lines tbody{display:grid;gap:10px}.purchase-edit-lines tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--border,#ddd);border-radius:8px;padding:8px}.purchase-edit-lines td{min-width:0;padding:6px;border:0}.purchase-edit-lines td:first-child{grid-column:1/-1}.purchase-edit-lines td[data-label]:before{content:attr(data-label);display:block;font-size:12px;color:var(--text3,#667085);margin-bottom:5px}.purchase-edit-lines td:last-child{text-align:right}.purchase-edit-lines input,.purchase-edit-lines select{min-height:42px;font-size:16px}
}
