#modal[data-purchase-entry] .direct-purchase-supplier{font-size:12px;margin:0 0 14px;max-width:560px}
#modal[data-purchase-entry] .direct-purchase-supplier input{min-height:38px;font-size:13px}
#modal[data-purchase-entry] .direct-purchase-editor .mr-add-purchase-item>[hidden]{display:none!important}
#modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-payment>.field[hidden]{display:none!important}
#modal[data-purchase-entry] .direct-purchase-editor [data-mr-buy-type]{height:34px;min-height:34px;font-size:12px;padding:5px 7px}
#modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-item-head>label{min-width:0;font-size:11px}
#modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-item-head>label input{min-width:0;width:100%;box-sizing:border-box;height:36px;min-height:36px;font-size:13px;padding:6px 8px}
.direct-purchase-order{border-top:1px solid #dfebe5;margin-top:14px;padding-top:14px}
.direct-purchase-order-heading,.direct-purchase-receipt-line{display:flex;gap:12px;justify-content:space-between;align-items:center;margin:10px 0}
.direct-purchase-order small,.direct-purchase-receipt-line small{display:block;color:#657b75;line-height:1.5;margin-top:4px}
.direct-purchase-details{margin-block:16px;padding:16px}
@media(max-width:720px){
 #modal[data-purchase-entry] .direct-purchase-supplier input,#modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-item-head>label input,#modal[data-purchase-entry] .direct-purchase-editor [data-mr-buy-type]{min-height:44px;height:44px;font-size:16px}
 .direct-purchase-order-heading,.direct-purchase-receipt-line{align-items:stretch;flex-direction:column}
 .direct-purchase-pending .btn{min-height:44px}
}
/* Keep manual invoice rows compact without narrowing the photo panel. */
#modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-item-head>.badge{display:none}
#modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-item-head{grid-template-columns:82px minmax(0,1fr) 28px;align-items:end;gap:5px 7px}
#modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-item-head>label:has([data-mr-buy-type]){grid-column:1;grid-row:1}
#modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-item-head>label:has([data-mr-buy-name]){grid-column:2;grid-row:1}
#modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-item-head>label:has([data-mr-buy-spec]){grid-column:1/3;grid-row:2}
#modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-item-head>[data-mr-remove-item]{grid-column:3;grid-row:1/3;align-self:center}
@media(min-width:721px){
 #modal[data-purchase-entry]:has(.direct-purchase-form260) .mr-purchase-metadata{grid-template-columns:1.15fr .8fr .9fr 1.15fr}
 #modal[data-purchase-entry] .mr-purchase-metadata>.direct-purchase-supplier{max-width:none;margin:0}
 #modal[data-purchase-entry] .mr-purchase-form.direct-purchase-editor .mr-purchase-outside{grid-template-columns:minmax(220px,1fr) 48px 60px 100px 80px;gap:7px}
}
@container(max-width:540px){
 #modal[data-purchase-entry] .mr-purchase-form.direct-purchase-editor .mr-purchase-outside{grid-template-columns:1fr 1fr}
 #modal[data-purchase-entry] .mr-purchase-form.direct-purchase-editor .mr-purchase-item-head{grid-column:1/-1}
 #modal[data-purchase-entry] .mr-purchase-form.direct-purchase-editor .mr-purchase-choice output{grid-column:2}
}
@media(max-width:720px){
 #modal[data-purchase-entry] .mr-purchase-metadata>.direct-purchase-supplier{max-width:none;margin:0;grid-column:1/-1}
 #modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-item-head{grid-template-columns:85px minmax(0,1fr) 30px}
}
@media(min-width:721px){
 #modal[data-purchase-entry].workspace-dialog .direct-purchase-form260 :is(input:not([type=checkbox]):not([type=radio]),select){font-size:13px!important;min-height:36px!important;height:36px;padding:6px 8px!important}
 #modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-item-head{grid-template-columns:94px minmax(0,1fr) 28px}
}
@media(max-width:720px){
 #modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-item-head{grid-template-columns:110px minmax(0,1fr) 44px}
 #modal[data-purchase-entry] .direct-purchase-editor .mr-purchase-item-head>[data-mr-remove-item]{min-width:44px;min-height:44px}
}
#modal[data-purchase-entry] .direct-purchase-form260 .proof-preview-stage{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
#modal[data-purchase-entry] .direct-purchase-form260 .proof-preview-stage>img{width:100%;height:100%;min-width:0;min-height:0;object-fit:contain}
