/* Approved three-pane sale invoice. Scoped to Sale; purchase, POS and print are unchanged. */
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-shell-head {display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:10px 0!important;background:transparent!important;box-shadow:none!important;border:0!important;margin-bottom:10px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-shell-head h1{font-size:20px!important;line-height:1.2!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-shell-head p{font-size:11px!important;margin:4px 0 0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-hub-actions{margin-left:auto!important;justify-content:flex-end!important;flex-wrap:nowrap!important;gap:6px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-hub-actions button{font-size:10px!important;padding:6px 8px!important;min-height:30px!important;white-space:nowrap!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) #saleClearButton{margin-left:8px;border-left:1px solid #d9dcef;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-layout{display:grid!important;grid-template-columns:minmax(0,21fr) minmax(0,49fr) minmax(0,30fr)!important;gap:10px!important;align-items:stretch!important;min-height:0!important;margin:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-main-surface{display:contents!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-layout .panel{min-width:0!important;min-height:0!important;margin:0!important;padding:10px!important;border:1px solid #dce1f4!important;border-radius:11px!important;box-shadow:none!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .panel-title{min-height:0!important;padding:0 0 8px!important;margin:0!important;gap:6px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .panel-title h2{font-size:14px!important;line-height:1.3!important;margin:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .panel-title small{font-size:9px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .panel-title .icon{width:16px;height:16px;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-card--products{display:flex!important;flex-direction:column!important;overflow:hidden!important;background:linear-gradient(135deg,#fff,#f5f2ff)!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-card--products .panel-title{flex-wrap:wrap;flex-shrink:0;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-search-drawer-anchor{display:flex!important;flex-direction:column!important;flex:1!important;min-height:0!important;position:static!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .scan-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:5px!important;padding:0 0 7px!important;margin:0!important;flex-shrink:0;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) #saleSearchButton{min-height:25px!important;padding:4px 8px!important;font-size:10px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-search-results-wrap{display:block!important;position:static!important;inset:auto!important;transform:none!important;width:auto!important;max-height:none!important;min-height:0!important;height:auto!important;overflow:auto!important;flex:1!important;box-shadow:none!important;border:0!important;margin:0!important;padding:0!important;background:transparent!important;z-index:auto!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-search-tools{display:none!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .search-results-grid{min-width:0!important;width:100%!important;table-layout:fixed!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .search-results-grid thead{display:none!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .search-results-grid td{padding:9px 0!important;background:transparent!important;white-space:normal!important;width:auto!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-product-result{display:flex;align-items:center;gap:7px;min-width:0;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-thumbnail{width:36px;height:42px;background:#eeeafb;border-radius:7px;display:grid;place-items:center;flex-shrink:0;overflow:hidden;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-thumbnail img{width:100%;height:100%;object-fit:contain;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-product-copy{flex:1;min-width:0;overflow-wrap:anywhere;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-product-copy strong{font-size:11px;display:block;line-height:1.25;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-product-copy small{display:block;font-size:9px;line-height:1.4;margin-top:2px;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-card--cart{display:flex!important;flex-direction:column!important;overflow:hidden!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-cart-table-wrap{flex:1!important;overflow:auto!important;min-height:0!important;max-height:none!important;height:auto!important;margin:0!important;border:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table{table-layout:fixed!important;width:100%!important;min-width:530px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table th{font-size:9px!important;padding:6px 3px!important;white-space:nowrap;position:sticky;top:0;background:#f8f9fd;z-index:1;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table td{padding:5px 3px!important;font-size:10px!important;vertical-align:top!important;white-space:normal!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table :is(th,td):nth-child(1){width:4%!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table :is(th,td):nth-child(2){width:27%!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table :is(th,td):nth-child(3){width:12%!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table :is(th,td):nth-child(4),#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table :is(th,td):nth-child(5){width:10%!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table :is(th,td):nth-child(6){width:12%!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table :is(th,td):nth-child(7){width:9%!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table :is(th,td):nth-child(8){width:11%!important;text-align:right;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table :is(th,td):nth-child(9){width:5%!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-line-product{min-width:0!important;gap:1px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-line-product strong{font-size:11px!important;line-height:1.2!important;overflow-wrap:anywhere;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-line-product small{font-size:9px!important;line-height:1.25!important;overflow-wrap:anywhere;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-has-batch td{border-bottom:0!important;padding-bottom:1px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-batch-row td{padding-top:0!important;padding-bottom:6px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-batch-row label{display:flex!important;align-items:center;gap:8px;font-size:9px!important;font-weight:500;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-batch-row .batch-select{flex:1!important;min-width:0!important;width:100%!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-cart-summary{flex-shrink:0;padding:6px 8px;margin-top:5px;background:#eee8ff;border-radius:6px;font-size:10px;font-weight:650;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-checkout-rail{display:flex!important;flex-direction:column!important;overflow:hidden!important;gap:0!important;background:#fff!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-rail-scroll{flex:1!important;min-height:0!important;overflow:auto!important;display:flex!important;flex-direction:column!important;gap:7px!important;padding:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-rail-section{padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-card--party .detail-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px 10px!important;margin:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .detail-grid label{font-size:10px!important;line-height:1.3!important;gap:3px!important;min-width:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .input{min-width:0!important;min-height:27px!important;height:27px!important;padding:4px 6px!important;font-size:10px!important;border-radius:6px!important;line-height:1.2!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table .input{min-height:25px!important;height:25px!important;padding:3px!important;font-size:10px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .icon-button{width:25px!important;height:25px!important;min-width:25px!important;min-height:25px!important;padding:4px!important;border-radius:6px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .icon-button .icon{width:15px!important;height:15px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-summary-chips{display:none!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-totals{border:0!important;box-shadow:none!important;padding:0!important;margin:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-total-row{padding:4px 7px!important;min-height:0!important;line-height:1.2!important;font-size:11px!important;gap:6px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-total-row strong{font-size:11px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-total-row.grand,#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .change-return{background:#eee8ff!important;border-radius:5px!important;border:0!important;margin:2px 0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-total-row.grand :is(span,strong){font-size:14px!important;font-weight:750!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .loyalty-mini-card{padding:5px 7px!important;margin-top:5px!important;font-size:9px!important;background:#f3efff!important;border:0!important;border-radius:7px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .loyalty-mini-card>div{gap:5px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .loyalty-mini-card :is(strong,b,small){font-size:9px!important;line-height:1.2!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .loyalty-mini-card .icon{width:14px;height:14px;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-billing-open{display:flex;align-items:center;gap:8px;width:100%;padding:7px;border:1px solid #dfe2f1;border-radius:7px;background:#fafaff;text-align:left;flex-shrink:0;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-billing-open>span:nth-child(2){flex:1;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-billing-open strong{display:block;font-size:11px;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-billing-open small{display:block;font-size:9px;color:#687591;margin-top:2px;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-billing-open .icon{width:17px;height:17px;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-rail-commit{display:flex!important;gap:7px!important;margin:7px 0 0!important;padding:7px 0 0!important;flex-shrink:0!important;background:#fff!important;border-top:1px solid #e2e5f2!important;box-shadow:none!important;position:static!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-rail-commit button{min-height:32px!important;padding:6px!important;font-size:10px!important;flex:1;white-space:nowrap;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-rail-commit button .icon{width:15px;height:15px;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-empty{padding:20px 8px;text-align:center;color:#71809a;font-size:11px;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-sr-only{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;padding:0!important;}
:is(#saleBillingDialog,#purchaseBillingDialog).swb-billing-dialog{width:min(650px,calc(100vw - 28px));max-height:calc(100dvh - 28px);margin:auto;padding:20px;border:1px solid #dfe2ef;border-radius:14px;box-shadow:0 20px 70px #111b3538;background:white;overflow:auto;color:#13213b;}
:is(#saleBillingDialog,#purchaseBillingDialog)::backdrop{background:#151c3b70;backdrop-filter:blur(1px);}
#workspaceView :is(#page-sale,#page-purchase) :is(#saleBillingDialog,#purchaseBillingDialog) .detail-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px 18px!important;}
#workspaceView :is(#page-sale,#page-purchase) :is(#saleBillingDialog,#purchaseBillingDialog) .invoice-drawer-head{grid-column:1/-1;display:flex!important;justify-content:space-between;align-items:start;position:static!important;padding:0!important;margin:0!important;border:0!important;}
:is(#saleBillingDialog,#purchaseBillingDialog) .invoice-drawer-head strong{display:block;font-size:21px;}
:is(#saleBillingDialog,#purchaseBillingDialog) .invoice-drawer-head span{display:block;font-size:12px;color:#66728c;margin-top:3px;}
#workspaceView :is(#page-sale,#page-purchase) :is(#saleBillingDialog,#purchaseBillingDialog) .input{height:35px!important;min-height:35px!important;font-size:13px!important;padding:7px 9px!important;}
#workspaceView :is(#page-sale,#page-purchase) :is(#saleBillingDialog,#purchaseBillingDialog) label{font-size:12px!important;}
:is(#saleBillingDialog,#purchaseBillingDialog) .wide-field,:is(#saleBillingDialog,#purchaseBillingDialog) .swb-billing-note,:is(#saleBillingDialog,#purchaseBillingDialog) .invoice-drawer-actions{grid-column:1/-1!important;}
#workspaceView :is(#page-sale,#page-purchase) :is(#saleBillingDialog,#purchaseBillingDialog) textarea.input{min-height:76px!important;height:76px!important;}
:is(#saleBillingDialog,#purchaseBillingDialog) .swb-billing-note{font-size:11px;color:#62708b;margin:0;}
:is(#saleBillingDialog,#purchaseBillingDialog) .invoice-drawer-actions{display:flex!important;justify-content:flex-end;position:static!important;padding:12px 0 0!important;border-top:1px solid #e2e5f2;background:white!important;}
@media(min-width:1100px){#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-layout{height:var(--swb-height,450px)!important;}}
@media(max-width:1099px){#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-layout{grid-template-columns:1fr!important;height:auto!important;}#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-shell-head{align-items:start!important;flex-direction:column;}#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-hub-actions{flex-wrap:wrap!important;}#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-search-results-wrap{max-height:250px!important;flex:none!important;}#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-cart-table-wrap{max-height:460px!important;flex:none!important;}#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-rail-scroll{overflow:visible!important;}#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .input{height:36px!important;min-height:36px!important;font-size:12px!important;}}
@media(max-width:500px){#workspaceView :is(#page-sale,#page-purchase) :is(#saleBillingDialog,#purchaseBillingDialog) .detail-grid{grid-template-columns:1fr!important;}#workspaceView :is(#page-sale,#page-purchase) :is(#saleBillingDialog,#purchaseBillingDialog) .detail-grid>*{grid-column:1!important;}:is(#saleBillingDialog,#purchaseBillingDialog).swb-billing-dialog{padding:14px;}}

#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench){padding-bottom:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-card--party h2::before,#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-card--totals h2::before{display:none!important;}

#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-card--party .panel-title::before,#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-card--totals .panel-title::before{display:none!important;}

#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table th{white-space:normal!important;line-height:1.1!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-line td{padding-top:3px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-line-product small{line-height:1.15!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-batch-row td{padding-bottom:3px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-batch-row .batch-select{height:23px!important;min-height:23px!important;}
#workspaceView :is(#page-sale,#page-purchase) :is(#saleBillingDialog,#purchaseBillingDialog) .invoice-drawer-actions{margin:0!important;width:100%!important;inset:auto!important;}
#workspaceView :is(#page-sale,#page-purchase) :is(#saleBillingDialog,#purchaseBillingDialog) .invoice-drawer-actions button{width:auto!important;min-width:140px!important;flex:0 0 auto!important;padding:8px 15px!important;}
#workspaceView :is(#page-sale,#page-purchase) :is(#saleBillingDialog,#purchaseBillingDialog) .invoice-drawer-head .icon-button{width:30px!important;height:30px!important;font-size:22px!important;}

#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-rail-section{flex:0 0 auto!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-totals{display:flex!important;flex-direction:column!important;flex:0 0 auto!important;height:auto!important;gap:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-total-row{flex:0 0 auto!important;min-height:19px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-total-row.grand strong{color:#15213c!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-workflow-footer-status{padding:0!important;margin:4px 2px 0!important;min-height:0!important;line-height:14px!important;font-size:10px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-loyalty-strip{flex:0 0 auto!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .loyalty-mini-card{display:grid!important;grid-template-columns:1fr auto!important;gap:3px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .loyalty-mini-card>small{grid-column:1/-1;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .loyalty-mini-stats{display:flex!important;gap:8px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .loyalty-mini-stats span{padding:0!important;border:0!important;background:transparent!important;display:flex!important;gap:3px!important;}

@media screen and (min-width:1100px) and (max-height:680px){
 #workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-total-row{padding-block:2px!important;min-height:17px!important;}
 #workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-billing-open{padding-block:6px!important;min-height:0!important;line-height:1.2!important;}
 #workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-billing-open small{display:none!important;}
}

@media(max-width:1099px){
 #workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table{min-width:650px!important;}
 #workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-lines-table .input,#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-batch-row .batch-select{height:36px!important;min-height:36px!important;font-size:12px!important;}
 #workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .icon-button{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;}
 #workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-rail-commit button{min-height:40px!important;font-size:12px!important;}
}

#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-thumbnail{display:flex!important;align-items:center!important;justify-content:center!important;width:42px!important;height:48px!important;padding:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-no-photo{display:flex!important;align-items:center!important;justify-content:center!important;width:100%;height:100%;padding:0;line-height:0;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-no-photo .icon{display:block!important;width:24px!important;height:24px!important;margin:0!important;color:#6873a6;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-thumbnail img{display:block!important;margin:0!important;padding:0!important;object-fit:contain!important;}

/* Compact invoice heading; spend the recovered height on the editable workspace. */
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-shell-head{min-height:0!important;padding:3px 0!important;margin:0 0 7px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-shell-head h1{margin:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-shell-head p{margin:3px 0 0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-card--cart{padding:10px 5px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-cart-table-wrap{padding:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-card--cart>.panel-title{padding-inline:4px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-product-result{cursor:pointer;padding:3px 2px;border-radius:6px;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-product-result:hover{background:#eee8ff;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-product-result:focus-visible{outline:2px solid #6035ff;outline-offset:-2px;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-total-row{padding-block:6px!important;min-height:25px!important;}
@media(min-width:1100px) and (max-height:680px){#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .transaction-total-row{padding-block:4px!important;min-height:22px!important;}}

/* Override the shared panel padding and bilateral reserved scrollbar gutters. */
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-layout .panel.invoice-card--cart{padding-inline:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-cart-table-wrap{scrollbar-gutter:auto!important;border-radius:0!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-card--cart>.panel-title{padding-inline:8px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .swb-cart-summary{margin-inline:5px!important;}

/* Small edge inset, more cart width, and compact aligned utilities/search. */
@media(min-width:1100px){#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-layout{grid-template-columns:minmax(0,20fr) minmax(0,52fr) minmax(0,28fr)!important;}}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-layout .panel.invoice-card--cart{padding-inline:5px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-hub-actions{gap:7px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-hub-actions button{height:32px!important;min-height:32px!important;margin:0!important;padding:6px 9px!important;line-height:1.2!important;gap:5px!important;border:1px solid #e0e4f0!important;box-shadow:none!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-hub-actions button .icon{width:16px!important;height:16px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .scan-grid{grid-template-columns:minmax(0,1fr) 30px!important;align-items:center!important;gap:5px!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) #saleSearchButton{display:flex!important;align-items:center!important;justify-content:center!important;width:30px!important;height:27px!important;min-height:27px!important;padding:4px!important;box-shadow:none!important;}
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) #saleSearchButton .icon{width:16px!important;height:16px!important;margin:0!important;}
@media(max-width:1099px){#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .scan-grid{grid-template-columns:minmax(0,1fr) 36px!important;}#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) #saleSearchButton{width:36px!important;height:36px!important;min-height:36px!important;}}

/* Purchase invoice/order retain receiving fields on an attached second line. */
#workspaceView #page-purchase.document-workbench .transaction-lines-table{min-width:550px!important;}
#workspaceView #page-purchase.document-workbench .swb-purchase-line>td:nth-child(1),#workspaceView #page-purchase.document-workbench thead th:nth-child(1){width:4%!important;}
#workspaceView #page-purchase.document-workbench .swb-purchase-line>td:nth-child(2),#workspaceView #page-purchase.document-workbench thead th:nth-child(2){width:29%!important;}
#workspaceView #page-purchase.document-workbench .swb-purchase-line>td:nth-child(3),#workspaceView #page-purchase.document-workbench thead th:nth-child(3){width:13%!important;}
#workspaceView #page-purchase.document-workbench .swb-purchase-line>td:nth-child(4),#workspaceView #page-purchase.document-workbench thead th:nth-child(4){width:11%!important;}
#workspaceView #page-purchase.document-workbench .swb-purchase-line>td:nth-child(5),#workspaceView #page-purchase.document-workbench thead th:nth-child(5){width:14%!important;}
#workspaceView #page-purchase.document-workbench .swb-purchase-line>td:nth-child(6),#workspaceView #page-purchase.document-workbench thead th:nth-child(6){width:10%!important;}
#workspaceView #page-purchase.document-workbench .swb-purchase-line>td:nth-child(7),#workspaceView #page-purchase.document-workbench thead th:nth-child(7){width:14%!important;text-align:right;}
#workspaceView #page-purchase.document-workbench .swb-purchase-line>td:nth-child(8),#workspaceView #page-purchase.document-workbench thead th:nth-child(8){width:5%!important;}
#workspaceView #page-purchase.document-workbench .swb-purchase-detail>td{width:auto!important;padding-block:2px 6px!important;}
.swb-purchase-batch{display:flex;gap:10px;align-items:end;flex-wrap:wrap;}
.swb-purchase-batch label{display:flex;align-items:center;gap:5px;font-size:10px;flex:1;min-width:140px;}
#workspaceView #page-purchase.document-workbench .transaction-mode-tabs{display:flex;gap:4px;}
#workspaceView #page-purchase.document-workbench .transaction-mode-tabs button{height:32px!important;padding:5px 7px!important;font-size:10px!important;}
#workspaceView #page-purchase.document-workbench .invoice-hub-actions{flex-wrap:wrap!important;}
#workspaceView #page-purchase.document-workbench .swb-billing-open{justify-content:space-between;}
/* Source invoice selection precedes return line selection. */
#workspaceView #page-sale-return-entry.document-workbench .swb-source-strip{display:grid;grid-template-columns:auto minmax(220px,380px) minmax(0,1fr);gap:10px;align-items:center;border:1px solid #dce1f4;border-radius:9px;background:#fff;padding:7px 10px;margin-bottom:8px;font-size:11px;}
#workspaceView #page-sale-return-entry.document-workbench .swb-source-strip .scan-grid{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;padding:0!important;}
#workspaceView #page-sale-return-entry.document-workbench .swb-source-strip button{font-size:10px;min-height:28px;padding:5px 9px;}
#workspaceView #page-sale-return-entry.document-workbench .source-summary{padding:0;margin:0;font-size:10px;}
#workspaceView #page-sale-return-entry.document-workbench .swb-return-source,#workspaceView #page-sale-return-entry.document-workbench .swb-replacement-finder,#workspaceView #page-sale-return-entry.document-workbench .swb-return-cart,#workspaceView #page-sale-return-entry.document-workbench .swb-replacement-cart{padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;background:transparent!important;min-height:0!important;}
#workspaceView #page-sale-return-entry.document-workbench .swb-return-source{display:flex;flex-direction:column;flex:1;overflow:hidden;}
#workspaceView #page-sale-return-entry.document-workbench .swb-return-source .table-wrap{flex:1;min-height:0!important;max-height:none!important;overflow:auto!important;padding:0!important;scrollbar-gutter:auto!important;}
#workspaceView #page-sale-return-entry.document-workbench .search-results-grid{min-width:0!important;}
#workspaceView #page-sale-return-entry.document-workbench .swb-return-middle{gap:10px;overflow:auto!important;}
#workspaceView #page-sale-return-entry.document-workbench .swb-return-middle .table-wrap{padding:0!important;scrollbar-gutter:auto!important;min-height:80px!important;max-height:240px!important;overflow:auto;}
#workspaceView #page-sale-return-entry.document-workbench .swb-return-middle .transaction-lines-table{min-width:560px!important;}
#workspaceView #page-sale-return-entry.document-workbench .swb-return-middle :is(th,td){width:auto!important;}
#workspaceView #page-sale-return-entry.document-workbench .swb-return-middle :is(th,td):first-child{width:27%!important;}
#workspaceView #page-sale-return-entry.document-workbench .swb-replacement-finder{flex:0 0 auto;max-height:42%;overflow:auto;border-top:1px solid #e0e4f0!important;padding-top:8px!important;}
#workspaceView #page-sale-return-entry.document-workbench h2{font-size:14px!important;margin:0 0 7px!important;}
#workspaceView #page-sale-return-entry.document-workbench .panel-title small{font-size:9px;}
#workspaceView #page-sale-return-entry.document-workbench .invoice-rail-scroll{gap:12px!important;}
#workspaceView #page-sale-return-entry.document-workbench .detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
#workspaceView #page-sale-return-entry.document-workbench .span-2{grid-column:1/-1;}
#workspaceView #page-sale-return-entry.document-workbench .detail-grid small,#workspaceView #page-sale-return-entry.document-workbench .sticky-actions small{font-size:10px;line-height:1.35;}
#workspaceView #page-sale-return-entry.document-workbench .sticky-actions{position:static;display:flex;flex-direction:column;padding:0;box-shadow:none;}
#workspaceView #page-sale-return-entry.document-workbench .swb-return-commit{margin-top:8px!important;}
@media(max-width:1099px){#workspaceView #page-sale-return-entry.document-workbench .swb-source-strip{grid-template-columns:1fr;}#workspaceView #page-sale-return-entry.document-workbench .swb-replacement-finder{max-height:none;}#workspaceView #page-sale-return-entry.document-workbench .swb-return-source .table-wrap{max-height:280px!important;}}

#workspaceView #page-purchase.document-workbench #purchaseSearchButton,#workspaceView #page-sale-return-entry.document-workbench #saleReturnReplacementSearchButton{display:flex!important;align-items:center!important;justify-content:center!important;width:30px!important;min-width:0!important;height:27px!important;min-height:27px!important;padding:4px!important;box-shadow:none!important;}
#workspaceView #page-purchase.document-workbench #purchaseSearchButton .icon,#workspaceView #page-sale-return-entry.document-workbench #saleReturnReplacementSearchButton .icon{width:16px!important;height:16px!important;margin:0!important;}
#workspaceView #page-purchase.document-workbench .scan-grid,#workspaceView #page-sale-return-entry.document-workbench .swb-replacement-finder .scan-grid{margin-inline:0!important;}
#workspaceView #page-purchase.document-workbench #purchaseCartRows .swb-purchase-detail>td:nth-child(2){width:auto!important;}
#workspaceView #page-purchase.document-workbench .swb-purchase-batch label{display:grid;grid-template-columns:auto minmax(0,1fr);white-space:nowrap;min-width:160px;}
#workspaceView #page-purchase.document-workbench .swb-purchase-batch .input{width:100%!important;min-width:0!important;}
#workspaceView #page-sale-return-entry.document-workbench .swb-replacement-finder .table-wrap{min-height:0!important;max-height:140px!important;padding:0!important;scrollbar-gutter:auto!important;}
#workspaceView #page-sale-return-entry.document-workbench .swb-return-source .panel-title{flex:0 0 auto;}
#workspaceView #page-sale-return-entry.document-workbench .swb-return-middle>.swb-return-cart,#workspaceView #page-sale-return-entry.document-workbench .swb-return-middle>.swb-replacement-cart{flex:0 0 auto;}
@media(max-width:1099px){#workspaceView #page-purchase.document-workbench #purchaseSearchButton,#workspaceView #page-sale-return-entry.document-workbench #saleReturnReplacementSearchButton{width:36px!important;height:36px!important;min-height:36px!important;}}

/* Icon-only finders must not inherit full-size button minimum widths. */
#workspaceView :is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) :is(#saleSearchButton,#purchaseSearchButton,#saleReturnReplacementSearchButton){min-width:0!important;max-width:100%!important;box-sizing:border-box!important;overflow:hidden!important;flex:0 0 auto!important;}

/* Explicit return-source choice stays above the three-pane workbench. */
#workspaceView #page-sale-return-entry.document-workbench .swb-source-strip{grid-template-columns:auto minmax(180px,220px) minmax(250px,1fr) minmax(160px,.8fr);}
#workspaceView #page-sale-return-entry #saleReturnModeLabel{font-size:10px;line-height:1.25;}
#workspaceView #page-sale-return-entry #saleReturnSourceMode{min-height:28px;padding:4px 7px;font-size:11px;}
#workspaceView #page-sale-return-entry #saleReturnModeNotice{grid-column:1/-1;margin:0;font-size:10px;line-height:1.3;}
@media(max-width:1099px){#workspaceView #page-sale-return-entry.document-workbench .swb-source-strip{grid-template-columns:1fr;} }

#workspaceView #page-sale-return-entry.unlinked-sale-return .swb-replacement-finder,#workspaceView #page-sale-return-entry.unlinked-sale-return .swb-replacement-cart,#workspaceView #page-sale-return-entry.unlinked-sale-return .unlinked-exchange-block{display:none!important;}

/* Compact desktop draft/post actions; keep the touch targets on narrow devices. */
@media (min-width:1100px) and (pointer:fine) {
 #workspaceView .page:is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-layout .invoice-rail-commit {justify-content:flex-end!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important;}
 #workspaceView .page:is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-layout .invoice-rail-commit button {flex:0 0 auto!important;width:auto!important;min-width:0!important;max-width:100%!important;min-height:30px!important;height:auto!important;padding:5px 10px!important;font-size:11px!important;line-height:18px!important;border-radius:7px!important;white-space:normal!important;}
 #workspaceView .page:is(#page-sale.sale-workbench,#page-purchase.document-workbench,#page-sale-return-entry.document-workbench) .invoice-layout .invoice-rail-commit button .icon {width:14px!important;height:14px!important;flex-shrink:0;}
}
