/* Dedicated touch-friendly POS. Navigation becomes a drawer on every screen. */
.pos-workspace .app-sidebar{transform:translateX(-100%);z-index:30;width:236px}
.pos-workspace.sidebar-open .app-sidebar{transform:translateX(0)}
.pos-workspace.sidebar-open .mobile-overlay{display:block;position:fixed;inset:0;background:#13282b66;z-index:29}
.pos-workspace .app-shell{margin:0}
.pos-workspace .app-topbar{height:64px;min-height:64px;padding:10px 24px;gap:16px}
.pos-workspace .menu-toggle{display:block;background:white;color:var(--ink);min-height:40px}
.pos-workspace .app-shell main{max-width:none;padding:0 24px 24px}
.pos-workspace .page-heading{display:none}
.pos-workspace .pos-tabs{height:48px;align-items:center;margin:0 0 14px;gap:28px}
.pos-workspace .pos-tab{padding:12px 0;font-size:14px}
.pos-workspace main>.notice{display:none}
.pos-workspace #network{position:absolute;top:21px;left:280px;margin:0;font-size:12px}
.pos-workspace #message:empty{display:none}
.pos-workspace #message:not(:empty){position:fixed;bottom:18px;left:24px;z-index:35;max-width:65vw;box-shadow:0 4px 20px #14332b24;padding:14px 22px}
.pos-workspace #shift{height:52px;margin:0 0 14px;padding:8px 18px;box-sizing:border-box}
.pos-workspace #shift button{min-height:36px;padding:6px 18px}
.pos-workspace #cashier{display:grid;grid-template-columns:minmax(0,1fr) minmax(350px,390px);gap:18px;height:calc(100dvh - 216px);min-height:460px}
.pos-workspace #cashier>.panel{padding:20px;margin:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.pos-workspace #cashier h3{margin:0;font-size:16px}
.pos-workspace #cashier h3:after{display:none}
.product-toolbar,.cart-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}
.pos-workspace #productSearch{width:230px;max-width:55%;margin:0;min-height:42px}
.pos-workspace #products{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:14px;overflow:auto;align-content:start;flex:1;padding:2px}
.pos-workspace #products .product-card{height:145px;min-height:145px;padding:14px;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;border:1px solid #dbe7e3;background:#fff;color:var(--ink);margin:0;text-align:left}
.pos-workspace #products .product-card:hover{border-color:var(--teal);background:#f0f8f5}
.product-mark{width:35px;height:35px;border-radius:10px;display:grid;place-items:center;color:#087e75;background:#e8f3ef;font-weight:700}
.product-card strong{font-size:15px;line-height:1.3;overflow-wrap:anywhere}
.product-card>span:last-child{font-size:15px;color:var(--teal);font-weight:650}
.pos-workspace #cart{flex:1;overflow:auto;min-height:50px}
.cart-empty{height:100%;min-height:70px;display:grid;place-items:center;color:#97a8ad;font-size:13px}
.cart-line{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;border-bottom:1px solid var(--line);padding:10px 0}
.cart-line>div:first-child{min-width:0}.cart-line strong{font-size:13px;overflow-wrap:anywhere}.cart-line small{display:block;font-size:11px;color:var(--muted);margin-top:4px}
.quantity-control{display:flex;align-items:center;gap:6px}.quantity-control>span{min-width:18px;text-align:center;font-variant-numeric:tabular-nums}.quantity-control button{margin:0;width:36px;height:36px;min-height:36px;padding:0;background:#f0f6f3;color:var(--teal);border:1px solid #dbe7e3}
.cart-line>strong{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;overflow-wrap:normal}
.pos-workspace .payment-panel{border-top:1px solid var(--line);padding-top:12px}
.pos-workspace #total{border:0;padding:0;margin:0 0 12px;font-size:27px}
.pos-workspace #cashier label{margin:8px 0;font-size:11px}
.pos-workspace #cashier input,.pos-workspace #cashier select{height:40px;min-height:40px;padding:7px 12px;margin:4px 0 0}
#cashShortcuts{display:flex;gap:5px;flex-wrap:wrap}.cash-shortcut{flex:1;min-height:32px;padding:5px;margin:0!important;background:#f0f6f3;color:#087e75;font-size:11px}
#changePreview{color:var(--teal);font-size:13px;min-height:16px;margin:8px 0}
.pos-workspace #checkout{margin:0;height:52px;min-height:52px;font-size:17px}
.pos-workspace #clearCart{font-size:12px;padding:5px 12px;min-height:34px}
.pos-workspace #hq{margin:20px 0}.pos-workspace #hq>p{font-size:13px;color:var(--muted)}
@media(min-width:900px) and (min-height:680px){.pos-workspace.pos-selling{overflow:hidden}.pos-workspace #cashier{min-height:0}}
@media(max-width:900px){.pos-workspace #cashier{grid-template-columns:minmax(0,1fr) 330px;gap:12px}.pos-workspace .app-shell main{padding:0 16px 16px}.pos-workspace #cashier>.panel{padding:16px}.pos-workspace #network{left:180px;font-size:10px}.pos-workspace .breadcrumb{display:none}.pos-workspace #products{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}}
@media(max-width:650px){.pos-workspace #cashier{height:auto;grid-template-columns:1fr;min-height:0}.pos-workspace #products{max-height:360px;min-height:180px;grid-template-columns:repeat(2,1fr)}.pos-workspace #cart{max-height:250px;min-height:70px}.pos-workspace #network{position:static;margin:8px 0}.pos-workspace .app-topbar{padding:10px 16px}.pos-workspace .pos-tabs{gap:20px}.pos-workspace .profile-chip{display:none}.pos-workspace #message:not(:empty){max-width:calc(100vw - 32px);left:16px;bottom:10px}.pos-workspace #cashier>.panel{overflow:visible}}
@media print{.pos-workspace{overflow:visible!important}.pos-workspace #message{display:none!important}}

.pos-workspace #network{position:static;margin:0 0 0 auto;white-space:nowrap}.pos-workspace .breadcrumb{margin-right:auto}.pos-workspace .pos-tabs{overflow-y:hidden;box-sizing:border-box}.pos-workspace #shift{overflow:hidden}@media(max-width:650px){.pos-workspace #network{display:none}}

.pos-workspace #products .product-card{height:205px;min-height:205px;padding:0 0 12px;overflow:hidden;gap:8px}.product-card .product-photo{width:100%;height:120px;object-fit:cover;background:#edf4ee}.product-card strong,.product-card>span:last-child{padding:0 12px}.catalog-thumbnail{width:85px;height:65px;object-fit:cover;vertical-align:middle;border-radius:8px;margin-right:15px}.catalog-row small{color:#8d9b94;font-size:11px}.upload-preview{width:100%;max-height:160px;object-fit:contain;display:block;margin:10px 0;border-radius:8px}.form-fields label:has(input[type=file]){grid-column:1/-1}.supply-product-photo{width:100%;max-height:180px;object-fit:cover;border-radius:10px;margin-bottom:14px}

.stock-status{display:block;color:#729185;font-size:11px;margin-top:7px}.stock-status.stock-empty{color:#a46c24}

.payment-method-field{margin:8px 0}.payment-method-field>span{display:block;font-size:11px;color:var(--muted);margin-bottom:6px}.payment-method-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pos-workspace .payment-method{min-height:52px;margin:0;padding:10px;border:2px solid #dbe7e3;background:#fff;color:var(--ink);font-size:16px;font-weight:650;touch-action:manipulation}.pos-workspace .payment-method.active{border-color:var(--teal);background:var(--teal);color:#fff}.pos-workspace .payment-method:focus-visible{outline:3px solid #e6ae48;outline-offset:2px}

/* Keep the basket readable on shorter desktop and landscape tablet screens. */
@media(min-width:651px) and (max-height:800px){.pos-workspace .app-topbar{height:56px;min-height:56px;padding-top:6px;padding-bottom:6px}.pos-workspace .pos-tabs{height:42px;margin-bottom:10px}.pos-workspace #shift{height:48px;margin-bottom:10px}.pos-workspace #cashier{height:calc(100dvh - 184px)}.pos-workspace #cashier>.panel{padding:16px}.cart-heading{margin-bottom:10px}.pos-workspace .payment-panel{padding-top:10px}.pos-workspace #total{font-size:25px;line-height:1.2;margin-bottom:8px}.pos-workspace #cashier label{margin:6px 0}.payment-method-field{margin:6px 0}.pos-workspace .payment-method{min-height:48px;padding:8px}.pos-workspace #changePreview{line-height:18px;margin:6px 0}.pos-workspace #checkout{height:48px;min-height:48px}}

/* Product selection and quantity controls are separate buttons, never nested. */
.pos-workspace #products .product-card{height:auto;min-height:0;padding:0 0 8px;gap:6px;justify-content:flex-start;align-self:start;cursor:default;border-radius:8px}
.pos-workspace #products .product-card.in-cart{border-color:var(--teal);background:#f0f8f5}
.pos-workspace #products .product-select{display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:100%;flex:none;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--ink);text-align:left;touch-action:manipulation}
.product-select .product-price{padding:0 12px;font-size:15px;color:var(--teal);font-weight:650}
.product-quantity{display:flex;align-items:center;justify-content:center;gap:4px;width:100%;padding:0 6px;box-sizing:border-box}
.pos-workspace #products .product-quantity button{width:44px;height:44px;min-height:44px;padding:0;margin:0;border:1px solid #dbe7e3;background:#e8f3ef;color:var(--teal);font-size:20px;touch-action:manipulation}
.product-quantity-value{min-width:18px;text-align:center;font-size:16px;font-weight:650;font-variant-numeric:tabular-nums}
.product-select:focus-visible,.product-quantity button:focus-visible{outline:3px solid #e6ae48;outline-offset:-3px}
@media(min-width:651px) and (max-width:900px){.pos-workspace #products{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}}

.pos-workspace #products .product-quantity button:first-child{border-color:#b94343;background:#b94343;color:#fff}.pos-workspace #products .product-quantity button:last-child{border-color:#087e75;background:#087e75;color:#fff}.pos-workspace #products .product-quantity button:disabled{opacity:.35;cursor:default}

.pos-workspace #products{grid-auto-rows:max-content}

.product-categories{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px;flex-shrink:0}
.pos-workspace .category-card{min-height:48px;margin:0;padding:8px;border:1px solid #dbe7e3;background:#fff;color:var(--ink);font-size:15px;font-weight:650;touch-action:manipulation}
.pos-workspace .category-card.active{color:#fff;background:var(--teal);border-color:var(--teal)}
.category-empty{font-size:13px;color:var(--muted);margin:8px 0}
.pos-workspace #products{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
.pos-workspace #products .product-photo{height:72px;flex-shrink:0}
@media(max-width:650px){.pos-workspace #products{grid-template-columns:repeat(2,minmax(0,1fr))}}

.pos-workspace .product-toolbar{margin-bottom:12px}

/* Order review stays on the left; primary touch ordering stays on the right. */
@media(min-width:651px){.pos-workspace #cashier{grid-template-columns:minmax(330px,.6fr) minmax(280px,.4fr)}.pos-workspace #cashier>.order-panel{grid-column:1;grid-row:1}.pos-workspace #cashier>.panel:not(.order-panel){grid-column:2;grid-row:1}}
.pos-workspace #cashier>.order-panel{display:flex;flex-direction:column}
.pos-workspace .order-panel .cart-heading{flex-shrink:0}
.pos-workspace .order-panel #cart{flex:1;min-height:0}
.pos-workspace .order-panel .payment-panel{display:grid;grid-template-columns:auto minmax(150px,1fr) minmax(130px,.8fr);align-items:center;gap:12px;flex-shrink:0;border-top:1px solid var(--line);padding-top:12px}
.pos-workspace .order-panel #total{font-size:24px;line-height:1.25;margin:0;white-space:nowrap}
.pos-workspace .order-panel .payment-method-field{margin:0}
.pos-workspace .order-panel #paymentMethodLabel{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.pos-workspace .order-panel #checkout{width:100%;height:52px;min-height:52px;margin:0}
.pos-workspace .order-panel .cart-line{padding:6px 0}
.pos-workspace .order-panel .cart-line>div:first-child{display:flex;align-items:center;gap:12px}
.pos-workspace .order-panel .cart-line small{margin:0;white-space:nowrap}
.pos-workspace #products{grid-template-columns:repeat(2,minmax(0,1fr))}
.checkout-dialog section{width:min(460px,calc(100vw - 32px));box-sizing:border-box}
.checkout-due{font-size:30px;font-weight:700;color:var(--ink);margin:16px 0 22px}
.checkout-dialog label{display:block;font-size:14px;margin:14px 0}
.checkout-dialog input:not([type=checkbox]){display:block;width:100%;box-sizing:border-box;height:52px;font-size:20px;margin:8px 0 0}
.checkout-dialog #cashShortcuts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.checkout-dialog .cash-shortcut{min-height:48px;font-size:14px}
.checkout-dialog #changePreview{font-size:20px;font-weight:650;min-height:30px;margin:16px 0}
.checkout-dialog .arrival-confirm{display:flex;align-items:center;gap:10px;min-height:48px;background:#edf6f2;padding:8px;border-radius:8px}
.checkout-dialog input[type=checkbox]{width:24px;height:24px;margin:0;flex-shrink:0;accent-color:var(--teal)}
.checkout-hint{font-size:14px;color:var(--muted)}
.sub-dialog.checkout-dialog footer{display:grid;grid-template-columns:1fr 1.4fr;gap:12px}
.checkout-dialog footer button{min-height:52px;margin:0;font-size:16px}
@media(min-width:651px) and (max-width:999px){.pos-workspace .order-panel .payment-panel{grid-template-columns:1fr 1fr}.pos-workspace .order-panel #total{grid-column:1/-1}.pos-workspace .order-panel .cart-line>div:first-child{display:block}.pos-workspace .order-panel .cart-line small{margin-top:4px}}
@media(max-width:650px){.pos-workspace .order-panel .payment-panel{grid-template-columns:1fr 1fr}.pos-workspace .order-panel #total{grid-column:1/-1}.pos-workspace .order-panel .cart-line>div:first-child{display:block}.pos-workspace .order-panel .cart-line small{margin-top:4px}}

.sub-dialog.cash-checkout section{width:min(720px,calc(100vw - 32px));max-width:720px;max-height:calc(100dvh - 24px);overflow:auto}
.cash-checkout #paymentDetails{display:grid;grid-template-columns:minmax(0,1fr) 240px;column-gap:24px;align-items:start}
.cash-checkout #paymentDetails>label{grid-column:1;grid-row:1;margin-top:0}
.cash-checkout #cashShortcuts{grid-column:1;grid-row:2}
.cash-checkout #changePreview{grid-column:1;grid-row:3}
.cash-checkout #tendered{font-size:30px;text-align:right;font-variant-numeric:tabular-nums;background:#f7faf9}
.cash-checkout .cash-keypad{grid-column:2;grid-row:1/4;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.sub-dialog.cash-checkout .cash-keypad button{min-height:56px;margin:0;padding:8px;background:#edf4f2;color:var(--ink);border:1px solid #d5e3dd;font-size:25px;touch-action:manipulation}
.sub-dialog.cash-checkout .cash-keypad .cash-key-clear{grid-column:1/-1;min-height:44px;font-size:16px;background:#fff0ee;color:#b94343;border-color:#efccc7}
.sub-dialog.cash-checkout footer{margin-top:18px}
@media(max-width:650px){.cash-checkout #paymentDetails{grid-template-columns:1fr}.cash-checkout .cash-keypad{grid-column:1;grid-row:4}.sub-dialog.cash-checkout .cash-keypad button{min-height:44px}.cash-checkout .checkout-due{font-size:26px;margin:10px 0 16px}.cash-checkout #changePreview{margin:10px 0}.sub-dialog.cash-checkout section{padding:18px}.sub-dialog.cash-checkout footer{position:sticky;bottom:-18px;background:white;padding:12px 0;margin-top:6px}}
