#counterRail[hidden],#counterPayments[hidden]{display:none!important}
#counterRail,#counterPayments{min-width:0}
#counterRail .counter-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#counterRail .counter-actions button{min-width:0;min-height:44px;padding:8px 4px;border:0;border-radius:5px;background:#0c8196;color:white;font-size:12px;font-weight:700}
#counterRail .counter-actions .counter-danger{background:#b92d4b}
#counterRail .counter-actions .counter-orange{background:#d97716}
#counterRail .counter-actions .counter-blue{background:#247bb7}
#counterRail .counter-keypad-hint{font-size:13px;line-height:1.5;color:#ccd8e7;padding:12px}
#counterPayments{display:grid;grid-template-columns:minmax(180px,.9fr) 1fr 1fr;gap:10px;padding:12px;background:#101a2a;border:1px solid #405069;border-radius:10px}
.counter-payment-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.counter-payment-buttons button{border:0;border-radius:10px;min-height:62px;padding:12px 8px;color:#fff;font-weight:700;line-height:1.35;background:#344b60}
.counter-payment-buttons .counter-pay-cash{background:#199e5e}.counter-payment-buttons .counter-pay-mpaisa{background:#be1837}.counter-payment-buttons .counter-pay-card,.counter-payment-buttons .counter-pay-eftpos{background:#2479ed}
.counter-total{display:flex;flex-direction:column;justify-content:space-between;gap:10px;min-width:0;padding:16px;border-radius:10px;text-align:center;color:#fff}
.counter-total>span{font-weight:700;text-transform:uppercase;font-size:13px}.counter-total>strong{font-size:clamp(22px,2.1vw,36px);overflow-wrap:anywhere}.counter-total small{font-size:11px;opacity:.9}
.counter-sale-total{background:#8b3596}.counter-payment-total{background:#0868de}
@media(min-width:601px){
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"].active-view{grid-template-columns:minmax(0,1fr) minmax(360px,32%);gap:10px;padding:10px;background:#101a2a;border-radius:12px;align-items:stretch}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"]>.catalog{display:flex;flex-direction:column;gap:10px;grid-column:1;grid-row:1;padding:10px;min-height:460px;border:1px solid #405069;border-radius:8px;background:#142033}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .catalog>.search-row{width:100%;margin:0}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .catalog>.category-list{position:static;display:flex;flex-direction:row;flex-wrap:nowrap;gap:6px;width:100%;max-width:100%;margin:0;padding:0 0 6px;border:0;overflow-x:auto;flex:none}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .category-list .category{width:auto;min-width:100px;min-height:48px;padding:8px 12px;flex:none;background:#1c2c43;border:1px solid #67758a;color:#fff;border-radius:7px;white-space:normal}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .category-list .category.active{background:#008e91;border:2px solid #00d7c7}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .catalog>#productList{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,155px),1fr));gap:9px;margin:0;width:100%;align-content:start;flex:1}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .catalog>#productList.list-mode{grid-template-columns:minmax(0,1fr)}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"]>.cart-panel{grid-column:2;grid-row:1/4;position:sticky;top:calc(var(--workspace-top,72px) + 10px);height:calc(100dvh - var(--workspace-top,72px) - 24px);min-height:550px;border:1px solid #405069;border-radius:8px;background:#fff;min-width:0}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .cart-actions #payBtn{min-height:60px;font-size:19px;background:#ff9c13;color:#101a2a;border:0}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #workspaceSaleActions{display:none}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #counterRail{grid-column:1;grid-row:2;background:#142033;padding:10px;border:1px solid #405069;border-radius:8px}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #counterPayments{grid-column:1;grid-row:3}
}
@media(min-width:960px){
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"].active-view{grid-template-columns:clamp(180px,16vw,280px) minmax(0,1fr) clamp(365px,29vw,520px);grid-template-rows:minmax(420px,1fr) max-content}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"]>.catalog{grid-column:2;grid-row:1;min-height:0;max-height:calc(100dvh - var(--workspace-top,72px) - 220px);overflow:auto}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"]>.cart-panel{grid-column:3;grid-row:1/3}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #counterPayments{grid-column:2;grid-row:2}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #counterRail{grid-column:1;grid-row:1/3;display:flex;flex-direction:column;gap:12px;position:sticky;top:calc(var(--workspace-top,72px) + 10px);max-height:calc(100dvh - var(--workspace-top,72px) - 24px);overflow:auto}
 #counterRail>#priceEntryPanel{display:flex;flex:0 0 auto;flex-direction:column;gap:8px;margin:0;padding:0;background:transparent;border:0;min-height:0;max-height:none;position:static;width:auto}
 #counterRail>#priceEntryPanel .price-entry-row{display:flex;flex-direction:column;gap:6px}
 #counterRail>#priceEntryPanel .price-entry-row label{width:100%;margin:0}
 #counterRail>#priceEntryPanel input{min-width:0;width:100%;min-height:50px;background:#0e1726;color:white;border:1px solid #65738a;font-size:22px}
 #counterRail>#priceEntryPanel p{font-size:11px;line-height:1.4;color:#bdccdf;margin:0}
 #counterRail>#priceEntryPanel details{display:block;width:100%;min-width:0;flex:0 0 auto;margin:0;position:static}#counterRail>#priceEntryPanel summary{display:none}
 #counterRail>#priceEntryPanel #priceKeypad{display:grid;position:static;width:100%;max-width:none;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0;padding:0}
 #counterRail #priceEntryPanel #priceKeypad>button{grid-column:auto;width:100%;min-width:0;min-height:62px;border:1px solid #40536e;border-radius:3px;background:#1b2b42;color:#fff;font-size:23px;padding:12px 4px}
 #counterRail #priceKeypad>button[data-key="back"],#counterRail #priceKeypad>button[data-key="clear"],#counterRail #priceKeypad>button[data-key="enter"]{font-size:16px;background:#31435e}
 #counterRail #priceKeypad>button[data-key="7"]{order:1}#counterRail #priceKeypad>button[data-key="8"]{order:2}#counterRail #priceKeypad>button[data-key="9"]{order:3}
 #counterRail #priceKeypad>button[data-key="4"]{order:4}#counterRail #priceKeypad>button[data-key="5"]{order:5}#counterRail #priceKeypad>button[data-key="6"]{order:6}
 #counterRail #priceKeypad>button[data-key="1"]{order:7}#counterRail #priceKeypad>button[data-key="2"]{order:8}#counterRail #priceKeypad>button[data-key="3"]{order:9}
 #counterRail #priceKeypad>button[data-key="0"]{order:10}#counterRail #priceKeypad>button[data-key="00"]{order:11}#counterRail #priceKeypad>button[data-key="."]{order:12}
 #counterRail #priceKeypad>button[data-key="back"]{order:13}#counterRail #priceKeypad>button[data-key="clear"]{order:14}#counterRail #priceKeypad>button[data-key="enter"]{order:15}
 #counterRail .price-quick-amounts{display:none}
 #counterRail .counter-actions{margin-top:0}
}
@media(max-width:600px){#counterRail,#counterPayments{display:none!important}}
#appScreen #counterRail #priceKeypad>button:not(:disabled){background:#1b2b42!important;border-color:#40536e!important}
#appScreen #counterPayments .counter-pay-cash:not(:disabled){background:#199e5e!important}
#appScreen #counterPayments .counter-pay-mpaisa:not(:disabled){background:#be1837!important}
#appScreen #counterPayments :is(.counter-pay-card,.counter-pay-eftpos):not(:disabled){background:#2479ed!important}
#appScreen #orderView[data-sales-layout="counter"] #payBtn:not(:disabled){background:#ff9c13!important;color:#101a2a!important}
#counterPayments{grid-template-columns:minmax(170px,.8fr) minmax(0,2fr);align-items:stretch}
.counter-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}
.counter-summary-grid .counter-total{padding:10px;gap:8px;justify-content:center;min-height:72px}
.counter-summary-grid .counter-total>strong{font-size:clamp(20px,1.7vw,31px)}
.counter-summary-grid .counter-total>span{font-size:12px}
.counter-balance-total{background:#657481}.counter-change-total{background:#d90053}
.counter-tender-controls{display:flex;flex-direction:column;gap:7px;min-width:0}
#appScreen #counterPayments .counter-tender-entry{display:grid;gap:4px;color:#d9e7f3;font-size:11px;margin:0;min-width:0}
#appScreen #counterPayments #counterTenderAmount{height:34px;min-height:34px;min-width:0;width:100%;padding:6px 8px;background:#fff;color:#102b42;font-size:13px;border-radius:5px}
#appScreen #counterPayments .counter-payment-buttons{flex:1;gap:6px}
#appScreen #counterPayments .counter-payment-buttons button{min-width:0;min-height:43px;padding:7px 4px;font-size:12px;display:flex;flex-direction:column;gap:4px;justify-content:center;align-items:center}
#counterPayments .counter-payment-buttons button[aria-pressed=true]{outline:3px solid #ffe137;outline-offset:-3px}
#counterPayments .counter-payment-buttons small{font-size:11px;line-height:1.2}
.counter-tender-status{grid-column:1/-1;margin:0;color:#fff0bd;font-size:12px;line-height:1.4}
#counterTenderDialog{max-width:480px;width:calc(100% - 24px)}
#counterTenderDialog .dialog-card{display:grid;gap:12px}
#counterTenderDialog label{display:grid;gap:5px;min-width:0}
#counterTenderDialog :is(input,select){width:100%;min-width:0}
@media(min-width:601px) and (max-width:1299px){#counterPayments{grid-template-columns:minmax(0,1fr)}#counterPayments .counter-payment-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Compact totals keep the primary payment action prominent. */
@media screen and (min-width:601px){
 #appScreen #counterPayments{padding:8px;gap:8px;align-items:start}
 #appScreen #counterPayments .counter-summary-grid{align-self:start;align-content:start;gap:6px}
 #appScreen #counterPayments .counter-summary-grid .counter-total{min-height:52px;padding:7px 8px;gap:3px;justify-content:center}
 #appScreen #counterPayments .counter-total>span{font-size:11px;line-height:1.2}
 #appScreen #counterPayments .counter-total>strong{font-size:clamp(18px,1.35vw,24px);line-height:1.25}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .cart-actions #payBtn{min-height:84px;padding:16px 12px;font-size:25px;line-height:1.3;font-weight:800;width:100%}
}
@media screen and (min-width:1300px){
 #appScreen #counterPayments{grid-template-columns:minmax(215px,1fr) minmax(0,1.6fr)}
 #appScreen #counterPayments .counter-payment-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media screen and (min-width:601px){
 #appScreen #counterPayments .counter-payment-buttons{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 #appScreen #counterPayments .counter-payment-buttons button{min-height:60px;padding:8px 6px;font-size:14px;line-height:1.3;gap:5px;border-radius:8px}
 #appScreen #counterPayments .counter-payment-buttons small{font-size:13px;font-weight:700}
 #appScreen #counterPayments .counter-pay-more{grid-column:1/-1;min-height:48px}
}
/* Smaller product tiles adapt to the available catalogue width. */
@media screen and (min-width:601px){
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .catalog>#productList:not(.list-mode){grid-template-columns:repeat(auto-fill,minmax(min(100%,130px),1fr));grid-auto-rows:minmax(96px,auto);gap:6px}
 #appScreen #orderView[data-sales-layout="counter"] #productList:not(.list-mode) .product-card{height:auto;min-height:96px;padding:7px;gap:4px;border-radius:8px}
 #appScreen #orderView[data-sales-layout="counter"] #productList:not(.list-mode) .product-card-main{min-height:34px;gap:6px;flex:1;align-items:center}
 #appScreen #orderView[data-sales-layout="counter"] #productList:not(.list-mode) :is(.product-visual,.product-photo){width:34px;height:34px;min-width:34px;flex-basis:34px;padding:0;border-radius:5px}
 #appScreen #orderView[data-sales-layout="counter"] #productList:not(.list-mode) .product-details{padding:0;min-width:0}
 #appScreen #orderView[data-sales-layout="counter"] #productList:not(.list-mode) .product-details strong{font-size:13px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 #appScreen #orderView[data-sales-layout="counter"] #productList:not(.list-mode) .product-card footer{margin-top:3px;padding-top:4px;gap:2px}
 #appScreen #orderView[data-sales-layout="counter"] #productList:not(.list-mode) .price{font-size:16px;line-height:1.2}
 #appScreen #orderView[data-sales-layout="counter"] #productList:not(.list-mode) .product-card small{font-size:10px;line-height:1.2}
}
@media screen and (min-width:601px){
 #appScreen #orderView[data-sales-layout="counter"] #productList.keypad-flow-products>.keypad-products-side,
 #appScreen #orderView[data-sales-layout="counter"] #productList.keypad-flow-products>.keypad-products-below{grid-template-columns:repeat(auto-fill,minmax(min(100%,130px),1fr));gap:6px}
}
/* Desktop Quick Sale payment chooser; keep bank details compact. */
dialog#counterMorePaymentDialog:not(#workspaceProductDrawer):not(#mobileMoreDialog),
dialog#counterTenderDialog:not(#workspaceProductDrawer):not(#mobileMoreDialog){width:min(440px,calc(100vw - 20px));max-width:440px;max-height:calc(100dvh - 20px);padding:0}
#counterMorePaymentDialog .dialog-card,#counterTenderDialog .dialog-card{padding:16px;gap:12px;display:grid;min-width:0}
#counterMorePaymentDialog .dialog-head{margin:0;display:flex;align-items:center;justify-content:space-between;gap:8px}
#counterMorePaymentDialog h2,#counterTenderDialog h2{margin:0;font-size:20px}
.counter-more-amount{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 10px;background:#edf6fb;border-radius:6px;font-size:12px}
.counter-more-amount strong{font-size:21px;white-space:nowrap;color:#155e75}
.counter-more-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#counterMorePaymentDialog .counter-more-choices button{min-height:76px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;font-size:14px;line-height:1.3;padding:8px;background:#155e75;color:white;border:2px solid transparent;border-radius:8px}
#counterMorePaymentDialog .counter-more-choices button[aria-pressed=true]{border-color:#ffd438;background:#087d86}
#counterMorePaymentDialog .counter-more-choices strong{font-size:16px}
#counterMorePaymentDialog .muted{font-size:11px;margin:0;line-height:1.4}
#counterMoreError:empty,#counterTenderError:empty,#counterTenderFee:empty{display:none}
#counterCheckoutProgress{display:none}
dialog#paymentDialog.counter-direct-checkout:not(#workspaceProductDrawer):not(#mobileMoreDialog){width:min(320px,calc(100vw - 24px));max-width:320px;padding:24px;box-sizing:border-box}
#paymentDialog.counter-direct-checkout #paymentForm{display:none}
#paymentDialog.counter-direct-checkout #counterCheckoutProgress{display:block;text-align:center;font-size:19px;font-weight:700;color:#155e75;padding:8px}
/* Light Touch Counter workspace, matching the standard sales screen. */
@media screen and (min-width:601px){
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"].active-view{background:#fff;border:1px solid #d7e3ef}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"]>.catalog{background:#fff;border-color:#d7e3ef}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #counterRail{background:#edf6ff;border-color:#c4def2}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"]>.cart-panel{border-color:#d7e3ef}
 #appScreen #orderView[data-sales-layout="counter"] #counterPayments{background:#fff;border-color:#d7e3ef}
 #appScreen #orderView[data-sales-layout="counter"] #priceEntryAmount{background:#fff;color:#17364d;border-color:#a9cde8}
 #appScreen #orderView[data-sales-layout="counter"] #priceEntryAmount::placeholder{color:#627b91;opacity:1}
 #appScreen #orderView[data-sales-layout="counter"] #priceEntryPanel p,
 #appScreen #orderView[data-sales-layout="counter"] .counter-keypad-hint{color:#526f86}
 #appScreen #counterRail #priceKeypad>button:not(:disabled){background:#155e75!important;border-color:#155e75!important;color:#fff}
 #appScreen #counterRail #priceKeypad>button:hover:not(:disabled){background:#0d4c62!important}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .category-list .category{background:var(--tile-tint,#eef6fb);color:var(--tile-colour,#155e75);border-color:transparent}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .category-list .category.active{background:#076b63;color:#fff;border-color:#076b63}
 #appScreen #counterPayments .counter-pay-more:not(:disabled){background:#155e75!important;color:#fff}
 #appScreen #counterPayments .counter-tender-status{color:#705307}
}
@media screen and (min-width:601px){
 #appScreen #orderView[data-sales-layout="counter"] #priceKeypad>.price-quick-amounts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-column:1/-1;order:16;gap:5px;margin-top:2px}
 #appScreen #orderView[data-sales-layout="counter"] #priceKeypad .price-quick-amounts button{grid-column:auto;min-height:40px;padding:4px 0;font-size:14px;background:#0369a1!important;border-color:#0369a1!important;color:#fff}
 #appScreen #orderView[data-sales-layout="counter"] #priceKeypad .price-quick-amounts :is([data-amount="5"],[data-amount="2"],[data-amount="1"]){display:none}
 #appScreen #counterPayments .counter-payment-total{background:#047857}
 #appScreen #counterRail .counter-actions [data-counter-action="salesHoldBtn"]:not(:disabled){background:#155e75!important;color:#fff}
 #appScreen #counterRail .counter-actions [data-counter-action="salesResumeBtn"]:not(:disabled){background:#155e75!important;color:#fff}
 #appScreen #counterRail .counter-actions [data-counter-action="clearCart"]:not(:disabled){background:#155e75!important;color:#fff}
 #appScreen #counterRail .counter-actions [data-counter-action="printDraftBill"]:not(:disabled){background:#155e75!important;color:#fff}
 #appScreen #counterRail .counter-actions [data-counter-action="selectSalesRep"]:not(:disabled){background:#155e75!important;color:#fff}
 #appScreen #counterRail .counter-actions [data-counter-action="salesMoreBtn"]:not(:disabled){background:#155e75!important;color:#fff}
}
/* Keep Quick Sale usable on 1024 x 768 terminals, including browser chrome. */
@media screen and (min-width:960px) and (max-width:1299px){
 #appScreen.workspace-shell:has(#orderView[data-sales-layout="counter"].active-view)>.topbar{display:flex;flex-wrap:nowrap;align-items:center;min-height:62px;padding:5px 10px;gap:10px}
 #appScreen.workspace-shell:has(#orderView[data-sales-layout="counter"].active-view)>.topbar .header-brand{flex:0 1 220px;gap:8px}
 #appScreen.workspace-shell:has(#orderView[data-sales-layout="counter"].active-view)>.topbar .top-actions{display:flex;flex:1;min-width:0;flex-wrap:nowrap;gap:8px;margin:0}
 #appScreen.workspace-shell:has(#orderView[data-sales-layout="counter"].active-view)>.topbar .shop-label{flex:1;min-width:0}
 #appScreen.workspace-shell:has(#orderView[data-sales-layout="counter"].active-view)>.topbar .shop-label select{width:100%;min-width:100px;max-width:100%;min-height:36px}
 #appScreen.workspace-shell:has(#orderView[data-sales-layout="counter"].active-view)>.topbar .account-menu{min-width:0;max-width:245px}
 #appScreen.workspace-shell:has(#orderView[data-sales-layout="counter"].active-view)>.topbar .user-chip{min-width:0}
 #appScreen.workspace-shell:has(#orderView[data-sales-layout="counter"].active-view)>.topbar #userName{display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media screen and (min-width:960px) and (max-height:840px){
 #appScreen.workspace-shell:has(#orderView[data-sales-layout="counter"].active-view)>main{padding:6px}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"].active-view{grid-template-columns:150px minmax(0,1fr) minmax(340px,30%);grid-template-rows:minmax(0,1fr) auto;gap:6px;padding:6px;height:calc(100dvh - var(--counter-top,90px) - 8px);min-height:0}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"]>.catalog{grid-column:2;grid-row:1;min-height:0;max-height:none;overflow:auto;padding:6px;gap:6px}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"]>.cart-panel{grid-column:3;grid-row:1/3;position:static;height:100%;min-height:0;overflow:hidden}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #counterRail{grid-column:1;grid-row:1/3;position:static;max-height:none;min-height:0;overflow:auto;gap:6px;padding:6px}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #counterPayments{grid-column:2;grid-row:2;padding:6px;gap:6px;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
 #appScreen #counterRail>#priceEntryPanel{gap:5px}
 #appScreen #counterRail>#priceEntryPanel .price-entry-row{gap:4px}
 #appScreen #counterRail>#priceEntryPanel input{min-height:38px;height:38px;font-size:16px;padding:5px}
 #appScreen #counterRail>#priceEntryPanel #clearPriceEntry{min-height:30px;padding:4px;font-size:12px}
 #appScreen #counterRail>#priceEntryPanel p{font-size:10px;line-height:1.25;margin:0}
 #appScreen #counterRail>#priceEntryPanel #priceKeypad{gap:4px}
 #appScreen #counterRail #priceEntryPanel #priceKeypad>button{min-height:38px;height:38px;padding:4px;font-size:19px}
 #appScreen #orderView[data-sales-layout="counter"] #priceKeypad>.price-quick-amounts{gap:3px;margin:0}
 #appScreen #orderView[data-sales-layout="counter"] #priceKeypad .price-quick-amounts button{min-height:32px;padding:3px 0;font-size:12px}
 #appScreen #counterRail .counter-actions{gap:4px}
 #appScreen #counterRail .counter-actions button{min-height:34px;padding:4px 2px;font-size:11px}
 #appScreen #counterPayments .counter-payment-buttons{gap:4px}
 #appScreen #counterPayments .counter-payment-buttons button{min-height:42px;padding:4px 2px;font-size:12px;gap:2px}
 #appScreen #counterPayments .counter-payment-buttons small{font-size:11px}
 #appScreen #counterPayments .counter-pay-more{min-height:34px}
 #appScreen #counterPayments .counter-summary-grid .counter-total{min-height:48px;padding:5px 3px;gap:3px}
 #appScreen #counterPayments .counter-total>span{font-size:10px}
 #appScreen #counterPayments .counter-total>strong{font-size:18px}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .category-list .category{min-width:78px;min-height:34px;padding:5px 8px;font-size:11px}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .catalog>.search-row{gap:4px}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .search-row :is(input,button){min-height:34px;font-size:12px;padding:5px 7px}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .catalog>#productList:not(.list-mode){grid-template-columns:repeat(auto-fill,minmax(min(100%,110px),1fr));grid-auto-rows:minmax(86px,auto);flex:0 0 auto}
 #appScreen #orderView[data-sales-layout="counter"] #productList:not(.list-mode) .product-card{min-height:86px;padding:5px}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .cart-title{padding:8px;gap:6px;flex-wrap:wrap}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .cart-title h2{font-size:14px}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .cart{padding:8px;min-height:0;overflow:auto;flex:1}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .cart-items{min-height:0;max-height:none}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .cart-actions{padding:8px;gap:6px}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .cart-actions #payBtn{min-height:48px;padding:8px;font-size:20px}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] :is(.cart-grid-heading,.cart-grid-row){grid-template-columns:minmax(48px,1fr) 34px 74px 64px 54px;gap:3px;font-size:11px}
}

@media screen and (min-width:960px) and (max-height:840px){
 #appScreen.workspace-shell #orderView[data-sales-layout=counter] .cart-grid-price{white-space:nowrap;overflow-wrap:normal;font-size:11px;padding:5px 2px}
 #appScreen.workspace-shell #orderView[data-sales-layout=counter] .cart-grid-actions{gap:3px}
 #appScreen.workspace-shell #orderView[data-sales-layout=counter] .cart-grid-actions button{width:25px;min-width:25px;padding:0}
}
/* Scale text with the space available on smaller Quick Sale terminals. */
@media screen and (min-width:601px) and (max-width:1299px), screen and (min-width:601px) and (max-height:740px){
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"]{--counter-text:clamp(11px,min(1.15vw,1.8vh),13px);--counter-value:clamp(14px,min(1.45vw,2.5vh),18px);font-size:var(--counter-text)}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #productList:not(.list-mode) .product-details strong{font-size:var(--counter-text);line-height:1.25}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #productList:not(.list-mode) .price{font-size:clamp(13px,min(1.4vw,2.4vh),16px)}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #productList :is(small,.stock,.product-price-currency){font-size:10px}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] :is(.category-list .category,.search-row input,.search-row button,.counter-actions button,.counter-payment-buttons button,.sale-customer,#chooseSaleCustomer,.cart-grid-heading,.cart-grid-row,.cart-grid-qty){font-size:var(--counter-text)}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #counterPayments .counter-payment-buttons small{font-size:clamp(10px,1.05vw,12px)}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #counterPayments .counter-total>span{font-size:clamp(9px,.95vw,11px)}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #counterPayments .counter-total>strong{font-size:var(--counter-value);line-height:1.2;white-space:nowrap;overflow-wrap:normal}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .cart-title h2{font-size:clamp(12px,1.3vw,16px)}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .cart-summary{font-size:clamp(15px,1.6vw,19px)}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .cart-summary strong{font-size:clamp(19px,min(2vw,3.5vh),25px)}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] .cart-actions #payBtn{font-size:clamp(17px,1.8vw,23px)}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #counterRail #priceEntryPanel #priceKeypad>button{font-size:clamp(16px,min(1.8vw,3vh),22px)}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #counterRail #priceEntryPanel #priceEntryAmount{font-size:clamp(14px,1.5vw,18px)}
 #appScreen.workspace-shell #orderView[data-sales-layout="counter"] #counterRail #priceKeypad .price-quick-amounts button{font-size:clamp(10px,1.05vw,13px)}
}
