﻿/* ─── POS LAYOUT ─── */
/* Desktop: two-column — product grid + cart panel side by side */
#pos-layout{display:flex;flex-direction:row;height:100%;background:var(--bg);overflow:hidden}
#pos-left{display:flex;flex-direction:column;flex:1;overflow:hidden;background:var(--bg);min-width:0}
/* Desktop cart panel */
#pos-right-portal{width:380px;min-width:380px;background:var(--card);border-left:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden;box-shadow:var(--shadow);flex-shrink:0}
#pos-right{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
/* #content must not have padding when POS is active */
#content.pos-content{padding:0 !important;overflow:hidden;display:flex;flex-direction:column}

/* Category pills */
.pos-cats-wrap{padding:10px 14px 6px;background:var(--card);border-bottom:1px solid var(--border);flex-shrink:0}
.pos-cats{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.pos-cats::-webkit-scrollbar{display:none}
.cat-chip{display:flex;align-items:center;gap:5px;padding:6px 14px;border-radius:20px;border:1.5px solid var(--border);font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap;transition:all .18s;background:var(--card);color:var(--muted);font-family:var(--head);letter-spacing:.3px}
.cat-chip i{font-size:11px}
.cat-chip:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-glow)}
.cat-chip.active{background:var(--accent);color:#fff;border-color:var(--accent);box-shadow:0 2px 10px rgba(8,145,178,.35)}
.cat-chip-count{background:rgba(255,255,255,.25);border-radius:10px;padding:0 5px;font-size:10px;margin-left:2px}
.cat-chip.active .cat-chip-count{background:rgba(255,255,255,.3);color:#fff}

/* Product area toolbar */
.pos-grid-toolbar{display:flex;align-items:center;justify-content:space-between;padding:8px 14px;flex-shrink:0}
.pos-result-count{font-size:12px;color:var(--muted);font-weight:500}
.layout-toggle{display:flex;gap:3px;background:var(--light);border:1px solid var(--border);border-radius:8px;padding:3px}
.layout-btn{width:28px;height:28px;border:none;border-radius:6px;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s;padding:0;color:var(--muted)}
.layout-btn:hover{color:var(--accent)}
.layout-btn.active{background:var(--card);color:var(--accent);box-shadow:0 1px 4px rgba(0,0,0,.1)}

/* Product grid */
#product-grid{display:grid;gap:10px;overflow-y:auto;flex:1;padding:10px 14px 80px;transition:grid-template-columns .2s;-webkit-overflow-scrolling:touch}
#product-grid.layout-large{grid-template-columns:repeat(2,1fr)}
#product-grid.layout-medium{grid-template-columns:repeat(4,1fr)}
#product-grid.layout-small{grid-template-columns:repeat(6,1fr)}

/* PRODUCT CARDS */
.prod-card{background:var(--card);border:1.5px solid var(--border);border-radius:14px;padding:0;cursor:pointer;transition:all .18s;display:flex;flex-direction:column;gap:0;box-shadow:0 1px 4px rgba(0,0,0,.06);overflow:hidden;position:relative}
.prod-card:hover{border-color:var(--accent);transform:translateY(-3px);box-shadow:0 8px 24px rgba(8,145,178,.18)}
.prod-card:active{transform:scale(.96)}
.prod-card.out-of-stock{opacity:.5;cursor:not-allowed}
.prod-card.in-cart{border-color:var(--accent);box-shadow:0 0 0 2.5px rgba(8,145,178,.4),0 4px 16px rgba(8,145,178,.2)}
.prod-card.in-cart .prod-img-wrap::after{content:'';position:absolute;inset:0;background:linear-gradient(to top,rgba(8,145,178,.15),transparent);z-index:1;pointer-events:none}

/* Image */
.prod-img-wrap{width:100%;aspect-ratio:4/3;overflow:hidden;background:linear-gradient(135deg,#f0f5fa,#e4edf5);flex-shrink:0;display:flex;align-items:center;justify-content:center;position:relative}
.prod-img-wrap img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s}
.prod-card:hover .prod-img-wrap img{transform:scale(1.05)}
.prod-img-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:#c0cdd8;font-size:32px;transition:all .2s}
.prod-card:hover .prod-img-placeholder{color:#a0b5c5;background:linear-gradient(135deg,#e8f2f8,#d8eaf4)}
.prod-card.out-of-stock .prod-img-wrap::before{content:'OUT OF STOCK';position:absolute;inset:0;background:rgba(239,68,68,.65);color:#fff;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;letter-spacing:1.5px;font-family:var(--head);z-index:3}

/* Cart qty badge */
.prod-qty-badge{position:absolute;top:7px;right:7px;background:var(--red);color:#fff;border-radius:50%;min-width:22px;height:22px;padding:0 4px;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;z-index:4;font-family:var(--mono);border:2.5px solid var(--card);box-shadow:0 2px 8px rgba(0,0,0,.3);animation:popIn .25s cubic-bezier(.34,1.56,.64,1)}
@keyframes popIn{from{transform:scale(0) rotate(-30deg)}to{transform:scale(1) rotate(0)}}

/* Product info */
.prod-info{padding:10px 11px 11px;display:flex;flex-direction:column;gap:2px}
.prod-name{font-size:12px;font-weight:700;color:var(--text);line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.prod-cat{font-size:10px;color:var(--muted);font-weight:500;display:flex;align-items:center;gap:3px}
.prod-price{font-family:var(--mono);font-size:15px;font-weight:800;color:var(--accent);margin-top:5px;letter-spacing:-.3px}
.prod-stock-row{display:flex;align-items:center;justify-content:space-between;margin-top:3px}
.prod-stock{font-size:10px;color:var(--muted);font-family:var(--mono)}
.prod-stock-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}

/* Small/medium layout overrides */
#product-grid.layout-small .prod-img-wrap{aspect-ratio:1/1}
#product-grid.layout-small .prod-info{padding:5px 6px 7px}
#product-grid.layout-small .prod-name{font-size:9px;-webkit-line-clamp:2}
#product-grid.layout-small .prod-cat{display:none}
#product-grid.layout-small .prod-price{font-size:11px;margin-top:3px}
#product-grid.layout-small .prod-stock-row{display:flex}
#product-grid.layout-small .prod-stock{display:none}
#product-grid.layout-small .prod-stock-row::before{content:attr(data-stock);font-size:9px;font-family:var(--mono);color:var(--muted)}
#product-grid.layout-medium .prod-img-wrap{aspect-ratio:1/1}
#product-grid.layout-medium .prod-info{padding:7px 8px 8px}
#product-grid.layout-medium .prod-name{font-size:10px}
#product-grid.layout-medium .prod-cat{display:none}
#product-grid.layout-medium .prod-price{font-size:12px;margin-top:3px}
#product-grid.layout-medium .prod-stock-row{display:flex}
/* ─── CART ─── */
/* ─── CART REDESIGN ─── */
.cart-header{padding:10px 14px 12px;border-bottom:1px solid var(--border);display:flex;flex-direction:column;gap:8px;flex-shrink:0;background:var(--card);border-radius:20px 20px 0 0;overflow:visible}
.cart-header-drag{width:36px;height:4px;background:var(--border2);border-radius:2px;margin:0 auto}
.cart-header-row{display:flex;align-items:center;justify-content:space-between}
.cart-header h3{font-family:var(--head);font-size:17px;font-weight:800;letter-spacing:.3px;display:flex;align-items:center;gap:7px}
.cart-header-badge{background:var(--accent);color:#fff;border-radius:20px;padding:1px 8px;font-size:11px;font-family:var(--mono);font-weight:700}
.cart-close-btn{width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:var(--light);border:1px solid var(--border);border-radius:50%;color:var(--muted);font-size:14px;cursor:pointer;transition:all .15s}
.cart-close-btn:hover{background:var(--red);border-color:var(--red);color:#fff}

/* Customer section */
.cart-customer-section{padding:10px 14px;background:var(--light);border-bottom:1px solid var(--border);flex-shrink:0}
.cart-cust-label{font-size:10px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.8px;margin-bottom:6px;display:flex;align-items:center;gap:5px}
.cart-cust-search{position:relative}
.cart-cust-search input{width:100%;padding:8px 36px 8px 32px;border:1.5px solid var(--border2);border-radius:8px;font-size:13px;background:var(--card);transition:border-color .15s}
.cart-cust-search input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px var(--accent-glow)}
.cart-cust-search .cust-search-icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--muted);font-size:13px;pointer-events:none}
.cart-cust-search .cust-add-btn{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:26px;height:26px;border-radius:6px;background:var(--accent);color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:12px;transition:background .15s}
.cart-cust-search .cust-add-btn:hover{background:#0e7490}
.cust-dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;background:var(--card);border:1.5px solid var(--border2);border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.12);z-index:500;max-height:200px;overflow-y:auto;display:none}
.cust-dropdown.open{display:block}
.cust-drop-item{padding:9px 12px;cursor:pointer;border-bottom:1px solid var(--border);transition:background .1s;display:flex;align-items:center;gap:8px}
.cust-drop-item:last-child{border-bottom:none}
.cust-drop-item:hover,.cust-drop-item.selected{background:var(--accent-glow)}
.cust-drop-avatar{width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;flex-shrink:0;font-family:var(--head)}
.cust-drop-info{flex:1;min-width:0}
.cust-drop-name{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cust-drop-sub{font-size:10px;color:var(--muted)}
.cust-selected-pill{display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--card);border:1.5px solid var(--accent);border-radius:8px;margin-top:6px}
.cust-selected-pill .cust-drop-avatar{width:24px;height:24px;font-size:10px}
.cust-selected-name{flex:1;font-size:12px;font-weight:600;color:var(--text)}
.cust-selected-clear{background:none;border:none;color:var(--muted);cursor:pointer;font-size:13px;padding:2px;line-height:1;transition:color .15s}
.cust-selected-clear:hover{color:var(--red)}

/* Items list */
.cart-items{flex:1 1 auto;min-height:0;overflow-y:auto;padding:8px 10px 12px;-webkit-overflow-scrolling:touch}
.cart-item{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;margin-bottom:5px;background:var(--card);border:1px solid var(--border);transition:border-color .15s;box-shadow:0 1px 3px rgba(0,0,0,.04)}
.cart-item:hover{border-color:var(--border2)}
.cart-item-thumb{width:34px;height:34px;border-radius:7px;object-fit:cover;flex-shrink:0;background:var(--light);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;color:var(--border2);font-size:14px;overflow:hidden}
.cart-item-thumb img{width:100%;height:100%;object-fit:cover}
.cart-item-info{flex:1;min-width:0}
.cart-item-name{font-size:12px;font-weight:600;color:var(--text);line-height:1.35;word-break:break-word}
.cart-item-price{font-size:11px;color:var(--muted);font-family:var(--mono);margin-top:1px}
.cart-qty{display:flex;align-items:center;gap:3px}
.qty-btn{width:24px;height:24px;border-radius:6px;border:1px solid var(--border2);background:var(--light);cursor:pointer;font-size:14px;font-weight:700;display:flex;align-items:center;justify-content:center;transition:all .15s;color:var(--text);line-height:1}
.qty-btn:hover{background:var(--accent);color:#fff;border-color:var(--accent)}
.qty-val{font-family:var(--mono);font-size:13px;font-weight:700;min-width:22px;text-align:center;background:var(--accent-glow);border-radius:4px;padding:1px 2px;color:var(--accent)}
.qty-input{border:1.5px solid var(--accent);border-radius:6px;width:46px;padding:2px 4px;font-size:12px;font-weight:700;font-family:var(--mono);color:var(--accent);background:var(--accent-glow);text-align:center;-moz-appearance:textfield}
.qty-input::-webkit-inner-spin-button,.qty-input::-webkit-outer-spin-button{-webkit-appearance:none}
.cart-item-total{font-family:var(--mono);font-size:12px;font-weight:700;min-width:54px;text-align:right;color:var(--text)}
.cart-item-del{width:26px;height:26px;display:flex;align-items:center;justify-content:center;color:var(--muted);cursor:pointer;border-radius:6px;transition:all .15s;font-size:12px;flex-shrink:0}
.cart-item-del:hover{background:#fee2e2;color:var(--red)}
.cart-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:32px 20px;color:var(--muted);gap:10px}
.cart-empty-icon{width:64px;height:64px;border-radius:50%;background:var(--light);border:2px dashed var(--border2);display:flex;align-items:center;justify-content:center;font-size:26px;color:var(--border2)}

/* Totals */
.cart-totals{padding:10px 14px;border-top:1px solid var(--border);flex-shrink:0;background:var(--light)}
.total-row{display:flex;justify-content:space-between;align-items:center;font-size:13px;margin-bottom:4px}
.total-row.grand{font-family:var(--head);font-size:22px;font-weight:800;margin-top:8px;padding-top:8px;border-top:2px dashed var(--border2);color:var(--text)}
.total-row.grand .amount{color:var(--accent)}
.total-row .amount{font-family:var(--mono);font-weight:600}

/* Discount & note */
.cart-extras{padding:8px 14px;border-top:1px solid var(--border);flex-shrink:0;background:var(--card);display:flex;flex-direction:column;gap:6px}
.disc-row{display:flex;gap:6px}
.disc-row input{flex:1;font-size:13px}
.disc-row select{width:80px;font-size:13px}

/* Actions */
.cart-actions{padding:10px 14px 14px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:8px;flex-shrink:0;background:var(--card)}
.pay-methods{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}
.pay-method{padding:8px 4px;border:1.5px solid var(--border2);border-radius:8px;text-align:center;cursor:pointer;font-size:11px;font-weight:700;transition:all .15s;font-family:var(--head);letter-spacing:.3px;display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--muted)}
.pay-method i{font-size:15px}
.pay-method:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-glow)}
.pay-method.active{border-color:var(--accent);background:var(--accent);color:#fff;box-shadow:0 2px 8px rgba(8,145,178,.3)}
.cash-input-wrap{position:relative}
.cash-input-wrap input{width:100%;padding:10px 12px;font-size:18px;font-weight:700;font-family:var(--mono);border:1.5px solid var(--border2);border-radius:8px;text-align:center;letter-spacing:1px}
.cash-input-wrap input:focus{border-color:var(--accent);outline:none}
.change-display{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;background:#dcfce7;border-radius:6px;font-size:13px;border:1px solid #86efac}
.change-display span:last-child{font-family:var(--mono);font-weight:700;color:#166534}
/* ─── MODAL ─── */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:10000;display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:opacity .2s;backdrop-filter:blur(4px)}
.modal-overlay.show{opacity:1;pointer-events:all}
.modal{background:var(--card);border-radius:14px;max-width:560px;width:90%;max-height:90vh;overflow-y:auto;box-shadow:var(--shadow-lg);transform:scale(.95);transition:transform .2s}
.modal-overlay.show .modal{transform:scale(1)}
.modal-lg{max-width:740px}
.modal-header{padding:18px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:var(--card);z-index:1}
.modal-header h3{font-family:var(--head);font-size:20px;font-weight:700}
.modal-close{background:none;border:none;font-size:20px;cursor:pointer;color:var(--muted);padding:4px 8px;border-radius:4px;line-height:1}
.modal-close:hover{background:var(--light);color:var(--text)}
.modal-body{padding:20px}
.modal-footer{padding:14px 20px;border-top:1px solid var(--border);display:flex;gap:8px;justify-content:flex-end}
/* ─── RECEIPT ─── */
#receipt{display:none}
#reorder-print{display:none}
@media print{
body *{visibility:hidden}
/* Receipt print mode */
body.printing-receipt #receipt,body.printing-receipt #receipt *{visibility:visible}
body.printing-receipt #receipt{display:block!important;position:fixed;left:0;top:0;width:80mm;font-family:'Courier New',monospace;font-size:12px;padding:8px}
/* Reorder list print mode */
body.printing-reorder #reorder-print,body.printing-reorder #reorder-print *{visibility:visible}
body.printing-reorder #reorder-print{display:block!important;position:fixed;left:0;top:0;right:0;padding:16px;font-family:Arial,sans-serif;font-size:12px;color:#000}
}
/* ─── ALERTS ─── */
.alert{padding:10px 14px;border-radius:var(--radius);border-left:4px solid;margin-bottom:8px;font-size:13px}
.alert-warning{background:#fef3c7;border-color:var(--amber);color:#92400e}
.alert-danger{background:#fee2e2;border-color:var(--red);color:#991b1b}
.alert-success{background:#dcfce7;border-color:var(--green);color:#166534}
.alert-info{background:#cffafe;border-color:var(--accent);color:#164e63}
/* ─── TOAST (see index.html and v2.3 polish block at end of file) ─── */
.toast-success{background:#059669}.toast-error{background:#dc2626}.toast-info{background:#0891b2}.toast-warning{background:#d97706}
@keyframes slideIn{from{transform:translateX(100%);opacity:0}to{transform:translateX(0);opacity:1}}
/* ─── SCROLLBAR ─── */
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border2);border-radius:3px}
/* ─── TABS ─── */
.tabs{display:flex;gap:0;border-bottom:2px solid var(--border);margin-bottom:16px}
.tab-btn{padding:8px 16px;border:none;background:none;cursor:pointer;font-family:var(--font);font-size:13px;font-weight:500;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-2px;transition:all .15s}
.tab-btn.active{color:var(--accent);border-bottom-color:var(--accent)}
.tab-btn:hover{color:var(--text)}
/* ─── INVENTORY BARS ─── */
.stock-bar{height:6px;border-radius:3px;background:var(--border);overflow:hidden;margin-top:4px}
.stock-fill{height:100%;border-radius:3px;transition:width .3s}
/* ─── LOW STOCK ─── */
.low-stock-item{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--border)}
.low-stock-item:last-child{border-bottom:none}
/* ─── CHART CONTAINER ─── */
.chart-wrap{position:relative;height:220px}
/* ─── MISC ─── */
.text-right{text-align:right}.text-center{text-align:center}.text-muted{color:var(--muted)}.text-mono{font-family:var(--mono)}
.flex{display:flex}.flex-1{flex:1}.items-center{align-items:center}.gap-8{gap:8px}.gap-12{gap:12px}
.mb-4{margin-bottom:4px}.mb-8{margin-bottom:8px}.mb-16{margin-bottom:16px}
.w-full{width:100%}
.empty-state{text-align:center;padding:60px 20px;color:var(--muted)}
.empty-state i{font-size:48px;display:block;margin-bottom:16px;opacity:.25}
.empty-state h3{font-family:var(--head);font-size:18px;margin-bottom:6px;color:var(--text)}
.empty-state p{font-size:13px}
.filter-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:16px}
.section-actions{display:flex;gap:8px;align-items:center}
/* ─── PRODUCT PEEK MODAL ─── */
#prod-peek-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:20000;display:flex;align-items:flex-end;justify-content:center;opacity:0;pointer-events:none;transition:opacity .2s;backdrop-filter:blur(3px)}
#prod-peek-overlay.show{opacity:1;pointer-events:all}
#prod-peek{background:var(--card);border-radius:20px 20px 0 0;width:100%;max-width:480px;max-height:88vh;overflow-y:auto;transform:translateY(100%);transition:transform .3s cubic-bezier(.4,0,.2,1);box-shadow:0 -8px 40px rgba(0,0,0,.2)}
#prod-peek-overlay.show #prod-peek{transform:translateY(0)}
.peek-drag{width:40px;height:4px;background:var(--border2);border-radius:2px;margin:10px auto 6px;cursor:pointer}
.peek-close{position:absolute;top:12px;right:14px;width:32px;height:32px;border-radius:50%;background:var(--light);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:16px;color:var(--muted);transition:all .15s;z-index:1}
.peek-close:hover{background:var(--red);border-color:var(--red);color:#fff}
.peek-img{width:100%;aspect-ratio:16/9;object-fit:cover;background:linear-gradient(135deg,var(--light),#e4edf5);display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}
.peek-img img{width:100%;height:100%;object-fit:cover}
.peek-img .peek-placeholder{font-size:56px;color:#c0cdd8}
.peek-body{padding:16px 18px 24px}
.peek-name{font-family:var(--head);font-size:22px;font-weight:800;line-height:1.2;margin-bottom:6px}
.peek-cat{font-size:12px;color:var(--muted);font-weight:500;display:flex;align-items:center;gap:5px;margin-bottom:14px}
.peek-attrs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:18px}
.peek-attr{background:var(--light);border:1px solid var(--border);border-radius:10px;padding:10px 12px;text-align:center}
.peek-attr-label{font-size:10px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;margin-bottom:4px}
.peek-attr-val{font-family:var(--mono);font-size:16px;font-weight:800;color:var(--text)}
.peek-attr-val.price{color:var(--accent)}
.peek-attr-val.stock-ok{color:var(--green)}
.peek-attr-val.stock-low{color:var(--amber)}
.peek-attr-val.stock-out{color:var(--red)}
.peek-add-btn{width:100%;padding:15px;border-radius:12px;background:linear-gradient(135deg,#0891b2,#06b6d4);color:#fff;border:none;font-family:var(--head);font-size:19px;font-weight:800;letter-spacing:.5px;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center;gap:10px;box-shadow:0 4px 16px rgba(8,145,178,.4)}
.peek-add-btn:hover{transform:translateY(-1px);box-shadow:0 6px 20px rgba(8,145,178,.5)}
.peek-add-btn:active{transform:scale(.97)}
.peek-add-btn:disabled{background:#94a3b8;box-shadow:none;cursor:not-allowed;transform:none}
.peek-in-cart-badge{display:flex;align-items:center;gap:8px;padding:8px 14px;background:#dcfce7;border:1px solid #86efac;border-radius:8px;font-size:13px;font-weight:600;color:#166534;margin-bottom:10px}

/* ─── PROFIT INDICATOR ─── */
.profit-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:12px;font-size:11px;font-family:var(--mono)}

/* ─── METRIC DETAIL DRAWER ─── */
#metric-drawer{position:fixed;top:0;right:0;bottom:0;width:min(440px,100vw);background:var(--card);z-index:600;box-shadow:-8px 0 40px rgba(0,0,0,.18);display:flex;flex-direction:column;transform:translateX(100%);transition:transform .3s cubic-bezier(.4,0,.2,1)}
#metric-drawer.open{transform:translateX(0)}
#drawer-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:599;opacity:0;pointer-events:none;transition:opacity .3s;backdrop-filter:blur(2px)}
#drawer-overlay.open{opacity:1;pointer-events:all}
#metric-drawer .drawer-header{padding:20px 20px 16px;border-bottom:1px solid var(--border);display:flex;align-items:flex-start;gap:14px;flex-shrink:0}
#metric-drawer .drawer-icon{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0}
#metric-drawer .drawer-header-text{flex:1;min-width:0}
#metric-drawer .drawer-header-text h2{font-family:var(--head);font-size:22px;font-weight:800;letter-spacing:.3px;line-height:1.2}
#metric-drawer .drawer-header-text p{font-size:12px;color:var(--muted);margin-top:3px}
#metric-drawer .drawer-close{width:32px;height:32px;border-radius:50%;border:1px solid var(--border);background:var(--light);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--muted);flex-shrink:0;transition:all .15s}
#metric-drawer .drawer-close:hover{background:var(--red);border-color:var(--red);color:#fff}
#metric-drawer .drawer-hero{padding:16px 20px;background:var(--light);border-bottom:1px solid var(--border);flex-shrink:0;overflow:hidden;display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:14px;width:100%}
#metric-drawer .drawer-hero-value{font-family:var(--mono);font-size:clamp(24px,7.2vw,30px);font-weight:800;line-height:1.06;color:var(--text);max-width:100%;white-space:normal;overflow-wrap:break-word;word-break:normal}
#metric-drawer .drawer-hero-sub{font-size:13px;color:var(--muted);margin-top:6px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.4}
#metric-drawer .drawer-hero-body{min-width:0;max-width:100%;display:flex;flex-direction:column;justify-content:center}
#metric-drawer .drawer-body{flex:1;overflow-y:auto;padding:16px 20px;-webkit-overflow-scrolling:touch}
#metric-drawer .drawer-section{margin-bottom:20px}
#metric-drawer .drawer-section-title{font-family:var(--head);font-size:13px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.8px;margin-bottom:10px;padding-bottom:6px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:6px}
#metric-drawer .drawer-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid var(--border)}
#metric-drawer .drawer-row:last-child{border-bottom:none}
#metric-drawer .drawer-row-label{font-size:13px;color:var(--muted)}
#metric-drawer .drawer-row-value{font-family:var(--mono);font-size:13px;font-weight:700}
#metric-drawer .drawer-kpi-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:4px}
#metric-drawer .drawer-kpi{background:var(--light);border:1px solid var(--border);border-radius:8px;padding:10px 12px}
#metric-drawer .drawer-kpi-label{font-size:10px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}
#metric-drawer .drawer-kpi-val{font-family:var(--mono);font-size:18px;font-weight:800;margin-top:2px}
#metric-drawer .drawer-list-item{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--border)}
#metric-drawer .drawer-list-item:last-child{border-bottom:none}
#metric-drawer .drawer-rank{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;flex-shrink:0;font-family:var(--mono);color:#fff}
.metric-card{cursor:pointer;transition:all .2s;position:relative}
.metric-card::after{content:'↗';position:absolute;top:10px;right:12px;font-size:14px;color:var(--border2);transition:color .2s;font-weight:700}
.metric-card:hover{border-color:var(--accent)!important;box-shadow:0 4px 16px rgba(8,145,178,.15)!important;transform:translateY(-1px)}
.metric-card:hover::after{color:var(--accent)}
.metric-card:active{transform:scale(.98)}

/* ═══════════════════════════════════
   RESPONSIVE — TABLET (≤900px)
═══════════════════════════════════ */
@media(max-width:900px){
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .grid-3{grid-template-columns:repeat(2,1fr)}
  .date-display{display:none}
}

/* ═══════════════════════════════════
   RESPONSIVE — MOBILE (≤640px)
═══════════════════════════════════ */
@media(max-width:640px){
  #metric-drawer{width:100vw;max-width:100vw;overflow-x:hidden}
  #metric-drawer .drawer-header{padding:16px 16px 12px;gap:12px}
  #metric-drawer .drawer-header-text{min-width:0}
  #metric-drawer .drawer-close{margin-left:auto}
  #metric-drawer .drawer-hero{padding:14px 16px 12px;overflow:hidden;grid-template-columns:42px minmax(0,1fr)}
  #metric-drawer .drawer-hero-value{font-size:clamp(22px,7.8vw,28px);line-height:1.08;max-width:100%;white-space:normal;overflow-wrap:break-word;word-break:normal}
  #metric-drawer #metric-drawer .drawer-hero-sub{padding-right:0}#metric-drawer .drawer-hero-body{padding-right:0}
  #metric-drawer .drawer-body{padding:14px 16px 22px}
  #metric-drawer .drawer-kpi{min-width:0}
  #metric-drawer .drawer-kpi-val{overflow-wrap:anywhere;word-break:break-word}
  #metric-drawer .drawer-row{gap:10px;align-items:flex-start}
  #metric-drawer .drawer-row > div:first-child{min-width:0;flex:1}
  #metric-drawer .drawer-row-value{max-width:45%;text-align:right;word-break:break-word}
  #sidebar{
    position:fixed;top:0;left:0;bottom:0;
    transform:translateX(-100%);
    width:280px;min-width:280px;
    box-shadow:var(--shadow-lg);
  }
  #sidebar.open{transform:translateX(0)}
  .sb-close{display:flex !important;align-items:center;justify-content:center}
  #hamburger{display:flex !important}
  #topbar{padding:0 12px;gap:8px;height:52px}
  #topbar h2{font-size:16px}
  #topbar-actions .topbar-btn span{display:none}
  #topbar-actions .topbar-btn{padding:7px 10px;min-width:36px;justify-content:center}
  .date-display{display:none}
  #content{padding:12px 14px 100px}
    .grid-4{grid-template-columns:repeat(2,1fr);gap:8px}
  .grid-3{grid-template-columns:1fr;gap:8px}
  .grid-2{grid-template-columns:1fr;gap:8px}
  .stat-card{padding:12px 14px}
  .stat-value{font-size:20px !important}
  .stat-icon{font-size:18px}
  .form-row.col-2,.form-row.col-3{grid-template-columns:1fr}
  .tbl-wrap{-webkit-overflow-scrolling:touch}
  thead th{font-size:10px;padding:7px 8px}
  tbody td{font-size:12px;padding:8px 8px}
  /* On mobile POS: product grid stacks vertically, cart is body-level fixed overlay */
  #content.pos-content{overflow-y:auto;display:block}
  #pos-layout{flex-direction:column;height:auto}
  /* Cart panel: hide from document flow, show as fixed overlay */
  #pos-right-portal{
    position:fixed !important;
    bottom:0;left:0;right:0;
    width:100% !important;min-width:unset !important;
    height:90vh;
    border-radius:20px 20px 0 0;
    border:none !important;
    box-shadow:0 -8px 40px rgba(0,0,0,.22);
    z-index:10080;
    transform:translateY(110%);
    transition:transform .32s cubic-bezier(.4,0,.2,1)
  }
  #pos-right-portal.cart-open{transform:translateY(0) !important}
  #product-grid{gap:8px;padding:10px 12px 90px}
  #product-grid.layout-large{grid-template-columns:repeat(2,1fr)}
  #product-grid.layout-medium{grid-template-columns:repeat(3,1fr)}
  #product-grid.layout-small{grid-template-columns:repeat(4,1fr)}
  #cart-fab{display:none;position:fixed;bottom:20px;right:16px;width:60px;height:60px;border-radius:50%;background:var(--accent);color:#fff;border:none;align-items:center;justify-content:center;font-size:22px;box-shadow:0 4px 20px rgba(8,145,178,.5);cursor:pointer;z-index:10000;transition:transform .2s}
  #cart-fab.visible{display:flex}
  #cart-fab:active{transform:scale(.92)}
  #cart-fab-badge{position:absolute;top:-4px;right:-4px;background:var(--red);color:#fff;border-radius:50%;width:20px;height:20px;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;border:2px solid var(--card)}
  .modal,.modal-lg{max-width:100%;width:100%;margin:0;border-radius:16px 16px 0 0;max-height:92vh;position:fixed;bottom:0;left:0}
  .modal-overlay{align-items:flex-end}
  .filter-row{flex-direction:column;align-items:stretch}
  .filter-row .search-box{max-width:100% !important}
  .filter-row select{width:100%}
  .chart-wrap{height:180px}
  .mb-16{margin-bottom:10px}
}

@media(max-width:380px){
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .stat-value{font-size:17px !important}
}

/* ─── LOCK SCREEN ─── */
#lock-screen{position:fixed;inset:0;background:var(--sidebar);z-index:99999;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:0}
#lock-screen.hidden{display:none}
.lock-logo{font-family:var(--head);font-size:36px;font-weight:800;color:#fff;letter-spacing:2px;margin-bottom:8px}
.lock-logo span{color:var(--accent2)}
.lock-store{font-size:14px;color:#94a3b8;margin-bottom:40px;font-family:var(--mono)}
.lock-card{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);border-radius:20px;padding:32px 28px;width:min(360px,90vw);backdrop-filter:blur(20px)}
.lock-role-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:24px}
.lock-role-btn{padding:12px;border-radius:12px;border:1.5px solid rgba(255,255,255,.15);background:transparent;color:#94a3b8;cursor:pointer;font-family:var(--head);font-size:15px;font-weight:700;letter-spacing:.5px;transition:all .2s;display:flex;flex-direction:column;align-items:center;gap:6px}
.lock-role-btn i{font-size:22px}
.lock-role-btn.active{border-color:var(--accent2);background:rgba(6,182,212,.15);color:var(--accent2)}
.lock-pin-label{font-size:12px;color:#94a3b8;font-weight:600;letter-spacing:.8px;text-transform:uppercase;margin-bottom:10px;display:block}
.lock-pin-dots{display:flex;gap:10px;justify-content:center;margin-bottom:20px}
.lock-pin-dot{width:14px;height:14px;border-radius:50%;border:2px solid rgba(255,255,255,.2);transition:all .2s;background:transparent}
.lock-pin-dot.filled{background:var(--accent2);border-color:var(--accent2);transform:scale(1.1)}
.lock-numpad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.lock-key{height:52px;border-radius:12px;border:1.5px solid rgba(255,255,255,.1);background:rgba(255,255,255,.05);color:#fff;font-size:20px;font-weight:700;cursor:pointer;transition:all .15s;display:flex;align-items:center;justify-content:center;font-family:var(--mono)}
.lock-key:hover{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.2)}
.lock-key:active{transform:scale(.94);background:rgba(8,145,178,.3)}
.lock-key.del{font-size:16px;color:#94a3b8}
.lock-key.enter{background:var(--accent);border-color:var(--accent);grid-column:span 1}
.lock-key.enter:hover{background:#0e7490}
.lock-error{color:#ef4444;font-size:12px;text-align:center;margin-top:10px;min-height:18px;font-weight:600}
.lock-offline-badge{position:absolute;top:16px;right:16px;background:rgba(245,158,11,.15);border:1px solid rgba(245,158,11,.3);border-radius:20px;padding:4px 12px;font-size:11px;font-weight:600;color:#f59e0b;display:flex;align-items:center;gap:5px}
.lock-sync-badge{position:absolute;top:16px;right:16px;background:rgba(16,185,129,.15);border:1px solid rgba(16,185,129,.3);border-radius:20px;padding:4px 12px;font-size:11px;font-weight:600;color:#10b981;display:flex;align-items:center;gap:5px}

/* ─── ROLE BADGE & ONLINE INDICATOR ─── */
.role-pill{display:flex;align-items:center;gap:5px;padding:4px 10px;border-radius:20px;font-size:11px;font-weight:700;font-family:var(--head);letter-spacing:.5px}
.role-pill.admin{background:rgba(139,92,246,.2);color:#a78bfa;border:1px solid rgba(139,92,246,.3)}
.role-pill.employee{background:rgba(6,182,212,.15);color:var(--accent2);border:1px solid rgba(6,182,212,.3)}
.online-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.online-dot.online{background:#10b981;box-shadow:0 0 6px rgba(16,185,129,.6)}
.online-dot.offline{background:#ef4444}
#status-bar{display:flex;align-items:center;gap:8px;padding:6px 16px;background:rgba(0,0,0,.15);font-size:10px;color:#64748b;border-top:1px solid var(--sidebar-border);flex-shrink:0}

/* ─── MICRO-INTERACTIONS ─── */
@keyframes slideUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes shake{0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.6}}
.animate-slide-up{animation:slideUp .3s ease forwards}
.animate-fade{animation:fadeIn .2s ease}
.shake{animation:shake .4s ease}
.invisible{visibility:hidden;pointer-events:none}

/* ─── DARK MODE TOGGLE ─── */
.dark-toggle{background:none;border:none;cursor:pointer;width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--muted);transition:all .15s;font-size:16px}
.dark-toggle:hover{background:var(--sidebar-light);color:#fff}

/* ─── SYNC STATUS ─── */
.sync-indicator{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--muted);font-family:var(--mono)}
.sync-pulse{animation:pulse 1.5s infinite}


/* ─── POS UI compatibility fixes ─── */
/* Some markup classes differ from the original stylesheet. Keep both names working. */
.pos-layout-btns{
  display:flex;
  gap:3px;
  background:var(--light);
  border:1px solid var(--border);
  border-radius:8px;
  padding:3px;
}
.pos-cat-bar{
  display:flex;
  gap:6px;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  padding:10px 14px 6px;
  background:var(--card);
  border-bottom:1px solid var(--border);
  flex-shrink:0;
}
.pos-cat-bar::-webkit-scrollbar{display:none}
.pos-cat-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 14px;
  border-radius:20px;
  border:1.5px solid var(--border);
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  white-space:nowrap;
  transition:all .18s;
  background:var(--card);
  color:var(--muted);
  font-family:var(--head);
  letter-spacing:.3px;
}
.pos-cat-btn i{font-size:11px}
.pos-cat-btn:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-glow)}
.pos-cat-btn.active{background:var(--accent);color:#fff;border-color:var(--accent);box-shadow:0 2px 10px rgba(8,145,178,.35)}
.pos-cat-btn .cat-count{
  background:rgba(15,23,42,.06);
  border-radius:10px;
  padding:0 6px;
  font-size:10px;
  line-height:1.6;
}
.pos-cat-btn.active .cat-count{background:rgba(255,255,255,.3);color:#fff}
.prod-stock-badge{
  display:inline-flex;
  align-items:center;
  align-self:flex-start;
  padding:3px 8px;
  border-radius:999px;
  background:var(--light);
  border:1px solid var(--border);
  color:var(--muted);
  font-size:10px;
  font-weight:700;
  font-family:var(--mono);
  margin-top:6px;
}
#product-grid.layout-list{
  grid-template-columns:1fr;
  gap:8px;
}
.prod-list-item{
  flex-direction:row;
  align-items:center;
  padding:10px 12px;
  gap:10px;
}
.prod-list-item .prod-img-wrap{
  width:44px !important;
  height:44px !important;
  aspect-ratio:auto;
  border-radius:10px;
  overflow:hidden;
}
.prod-list-item .prod-qty-badge{
  min-width:18px;
  height:18px;
  font-size:10px;
  top:-4px;
  right:-4px;
}
.cart-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:var(--accent-glow);
  color:var(--accent);
  font-size:11px;
  font-weight:800;
  font-family:var(--mono);
}
.cust-selector-wrap{position:relative}
.cust-selected{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  background:var(--card);
  border:1.5px solid var(--border2);
  border-radius:8px;
  cursor:pointer;
}
.cust-selected:hover{border-color:var(--accent)}
.cart-discount-row{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:10px 14px;
  border-top:1px solid var(--border);
  flex-shrink:0;
  background:var(--card);
}
.cart-pay-section{
  padding:10px 14px 14px;
  border-top:1px solid var(--border);
  display:flex;
  flex-direction:column;
  gap:8px;
  flex-shrink:0;
  background:var(--card);
}
.checkout-btn{
  position:sticky;
  bottom:0;
  z-index:2;
  margin:0 14px 14px;
  border:none;
  border-radius:12px;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  color:#fff;
  padding:13px 16px;
  font-size:15px;
  font-weight:800;
  font-family:var(--head);
  letter-spacing:.5px;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(8,145,178,.25);
}
.checkout-btn:hover{filter:brightness(.97)}
.checkout-btn:active{transform:translateY(1px)}
#cart-fab{display:none}
@media(max-width:640px){
  .cart-discount-row{padding:8px 12px}
  .cart-pay-section{padding:10px 12px 12px}
  .checkout-btn{margin:0 12px 12px}
}

/* Dark-mode polish (Round 3) */
body.dark .cart-item{box-shadow:none}
body.dark .cart-item-del:hover{background:rgba(239,68,68,.15);color:#fecaca}
body.dark .cust-dropdown{box-shadow:0 10px 30px rgba(0,0,0,.55)}
body.dark .change-display{background:rgba(16,185,129,.12);border-color:rgba(16,185,129,.35);color:#a7f3d0}
body.dark .peek-in-cart-badge{background:rgba(16,185,129,.12);border-color:rgba(16,185,129,.35);color:#a7f3d0}


/* Round 4 POS fixes */
#pos-left{padding:10px;gap:10px}
.pos-cat-bar{border:1px solid var(--border);border-radius:14px;background:var(--card)}
.pos-cat-bar{padding:10px 12px}
#product-grid{padding:4px 0 12px;gap:12px}
#product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
#product-grid.layout-small{grid-template-columns:repeat(auto-fill,minmax(118px,1fr))}
#product-grid.layout-list{grid-template-columns:1fr}
#product-grid.layout-large .prod-card{min-height:220px}
#product-grid.layout-large .prod-img-wrap{aspect-ratio:16/10}
#product-grid.layout-small .prod-card{min-height:156px}
#product-grid.layout-small .prod-img-wrap{aspect-ratio:1/1;min-height:88px}
#product-grid.layout-small .prod-stock-badge{margin-top:4px;font-size:9px;padding:2px 6px}
#product-grid.layout-small .prod-name{font-size:10px}
#product-grid.layout-list .prod-card{padding:10px 12px;border-radius:12px}
#pos-right-portal{width:420px;min-width:420px;border-left:none;border-radius:16px;margin:10px 10px 10px 0;height:calc(100% - 20px)}
#pos-right{background:var(--card);border:1px solid var(--border);border-radius:16px}
.cart-header{padding:12px 14px;flex-direction:row;align-items:center;justify-content:space-between;border-radius:16px 16px 0 0}
.cart-cust-search{padding:0 14px 10px;background:var(--card);border-bottom:1px solid var(--border);flex-shrink:0}
.cust-dropdown{top:calc(100% + 6px);max-height:260px;z-index:25}
.cart-warning{display:flex;align-items:flex-start;gap:8px;padding:10px 14px;background:#fff7ed;border-top:1px solid #fed7aa;border-bottom:1px solid #fed7aa;color:#9a3412;font-size:12px;font-weight:600;flex-shrink:0}
.cart-warning.hidden{display:none}
body.dark .cart-warning{background:rgba(245,158,11,.12);border-color:rgba(245,158,11,.35);color:#fde68a}
.cart-items{padding:10px 14px 14px;min-height:180px}
.cart-item{align-items:flex-start;grid-template-columns:none}
.cart-item-info{padding-top:1px}
.cart-item-del{cursor:pointer;pointer-events:auto}
.checkout-btn{position:sticky;bottom:12px}
.cart-close-btn{display:none}
@media (max-width:1200px){#pos-right-portal{width:390px;min-width:390px}}
@media (max-width:900px){#pos-left{padding:0}.pos-cat-bar{border-left:none;border-right:none;border-radius:0}#pos-right-portal{width:100%;min-width:0;margin:0;height:auto;border-radius:0} .cart-close-btn{display:flex}}


/* Round 5 POS polish */
#content.pos-content{height:calc(100dvh - 108px);min-height:640px}
#pos-layout{height:100%;min-height:0;gap:12px}
#pos-right{display:grid;grid-template-areas:"header" "customer" "warning" "items" "discount" "totals" "payment" "checkout";grid-template-rows:auto auto auto minmax(260px,1fr) auto auto auto auto;height:100%;min-height:0}
.cart-header{grid-area:header}
.cart-cust-search{grid-area:customer}
#credit-customer-warning{grid-area:warning}
.cart-items{grid-area:items;min-height:0;height:100%;padding:10px 14px 12px}
.cart-discount-row{grid-area:discount;padding:8px 14px}
.cart-totals{grid-area:totals;padding:8px 14px}
.cart-pay-section{grid-area:payment;padding:8px 14px 10px}
.checkout-btn{grid-area:checkout;position:sticky;bottom:0;margin:0 14px 14px}
.checkout-btn.is-disabled,.checkout-btn:disabled{opacity:.72;cursor:not-allowed;box-shadow:none;filter:saturate(.75)}
#pos-left{padding:12px;gap:10px;min-width:0}
.pos-cat-bar,.pos-products-head{border:1px solid var(--border);border-radius:16px;background:var(--card)}
.pos-products-head{padding:10px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.pos-products-copy{display:flex;align-items:baseline;gap:8px;font-size:12px;color:var(--muted);flex-wrap:wrap}
.pos-products-copy strong{font-size:18px;color:var(--text);font-family:var(--head)}
#product-grid{padding:0 0 16px;gap:12px;align-content:start}
#product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}
#product-grid.layout-small{grid-template-columns:repeat(auto-fill,minmax(128px,1fr))}
#product-grid.layout-large .prod-card,#product-grid.layout-small .prod-card{min-height:0;display:flex}
#product-grid.layout-large .prod-img-wrap{aspect-ratio:5/3;min-height:140px}
#product-grid.layout-small .prod-img-wrap{aspect-ratio:1/1;min-height:92px}
#product-grid.layout-small .prod-card{border-radius:14px}
.prod-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#86a0b3;padding:14px;text-align:center;width:100%;height:100%;background:linear-gradient(135deg,#f7fbff,#e7f1f8)}
.prod-placeholder-icon{width:54px;height:54px;border-radius:18px;background:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 22px rgba(15,23,42,.08);font-size:22px;color:var(--accent)}
#product-grid.layout-small .prod-placeholder-icon{width:42px;height:42px;border-radius:14px;font-size:18px}
.prod-placeholder-cat{font-size:11px;font-weight:700;letter-spacing:.2px}
.prod-info{padding:10px 11px 12px;gap:6px}
.prod-topline{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}
.prod-mini-cat,.prod-mini-sku{display:inline-flex;align-items:center;padding:2px 7px;border-radius:999px;background:var(--light);border:1px solid var(--border);font-size:10px;font-weight:700;color:var(--muted)}
.prod-mini-sku{font-family:var(--mono)}
.prod-price-row{display:flex;align-items:flex-end;justify-content:space-between;gap:8px;margin-top:auto}
.prod-in-cart-pill{font-size:10px;font-weight:800;color:var(--accent);background:var(--accent-glow);padding:3px 8px;border-radius:999px;white-space:nowrap}
#product-grid.layout-small .prod-topline{gap:4px}
#product-grid.layout-small .prod-mini-cat,#product-grid.layout-small .prod-mini-sku{font-size:9px;padding:2px 6px}
#product-grid.layout-small .prod-price-row{flex-direction:column;align-items:flex-start;gap:4px}
#product-grid.layout-small .prod-stock-badge{font-size:9px;padding:2px 6px;margin-top:0}
.prod-list-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px}
.prod-list-main{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.prod-list-copy{min-width:0}
.prod-list-title{font-size:13px;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.prod-list-meta{font-size:11px;color:var(--muted);margin-top:2px}
.prod-list-side{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex-shrink:0}
.cust-selected{padding:10px 12px;gap:10px}
.cust-selected-copy{min-width:0;flex:1}
.cust-selected-sub{font-size:11px;color:var(--muted)}
.cust-chip{display:inline-flex;align-items:center;padding:3px 8px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}
.cust-chip.neutral{background:var(--light);color:var(--muted)}
.cust-chip.debt{background:rgba(239,68,68,.12);color:var(--red)}
.cust-chip.credit{background:rgba(16,185,129,.12);color:var(--green)}
.cust-selected-clear{border:none;background:transparent;color:var(--muted);cursor:pointer}
.cust-drop-item.active{background:var(--accent-glow)}
.cart-empty{padding:20px 12px}
.cart-item{display:grid;grid-template-columns:42px minmax(0,1fr) auto auto auto;align-items:center;gap:8px;padding:10px}
.cart-item-info{min-width:0}
.cart-item-total{min-width:68px}
.cart-qty{display:inline-flex;align-items:center;gap:6px;background:var(--light);padding:4px;border-radius:999px}
.qty-btn{width:26px;height:26px;border-radius:999px;border:none;background:var(--card);box-shadow:0 1px 3px rgba(0,0,0,.06)}
.qty-input{width:56px;text-align:center;border:none;background:transparent}
.total-row.grand{font-size:18px}
.pay-methods{gap:6px}
body.dark .prod-placeholder{background:linear-gradient(135deg,rgba(255,255,255,.05),rgba(255,255,255,.03));color:#8ba3b8}
body.dark .prod-placeholder-icon{background:rgba(15,23,42,.8);box-shadow:none}
body.dark .cust-chip.neutral{background:rgba(255,255,255,.06)}
@media (max-width:1200px){
  #content.pos-content{height:calc(100dvh - 104px)}
  #product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(186px,1fr))}
  #pos-right-portal{width:380px;min-width:380px}
}
@media (max-width:900px){
  #content.pos-content{height:auto;min-height:0}
  #pos-layout{flex-direction:column;height:auto;gap:0}
  #pos-left{padding:0}
  .pos-cat-bar,.pos-products-head{border-left:none;border-right:none;border-radius:0}
  #product-grid{padding:0 12px 80px}
  #product-grid.layout-large{grid-template-columns:repeat(2,minmax(0,1fr))}
  #product-grid.layout-small{grid-template-columns:repeat(3,minmax(0,1fr))}
  #pos-right-portal{width:100%;min-width:0;margin:0;height:auto;border-radius:0}
  #pos-right{display:flex;flex-direction:column;border-radius:20px 20px 0 0}
  .cart-close-btn{display:flex}
}
@media (max-width:640px){
  #product-grid.layout-small{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cart-item{grid-template-columns:36px minmax(0,1fr);grid-auto-rows:auto}
  .cart-qty,.cart-item-total,.cart-item-del{grid-column:2 / span 1}
  .cart-qty{justify-self:start}
  .cart-item-total,.cart-item-del{justify-self:end}
}

/* Round 6 pre-production cart + payment density */
#pos-right{grid-template-rows:auto auto auto minmax(320px,1fr) auto auto auto auto}
.cart-discount-row{display:grid;grid-template-columns:minmax(110px,132px) 1fr;gap:8px;align-items:start}
.cart-discount-row > div:first-child{display:flex;gap:6px;align-items:center}
#sale-note{height:54px !important;min-height:54px;max-height:72px;line-height:1.35;overflow:auto}
.cart-totals{padding:8px 14px 6px}
.total-row{margin-bottom:2px}
.total-row.grand{margin-top:6px;padding-top:6px}
.cart-pay-section{display:flex;flex-direction:column;gap:6px;padding:6px 14px 8px}
.pay-methods{gap:5px}
.pay-method{padding:7px 4px;font-size:10px}
.pay-method i{font-size:14px}
#cash-tendered-row,#partial-cash-row{display:grid;gap:4px}
#cash-tendered-row label,#partial-cash-row label{font-size:9px !important}
#cash-tendered,#partial-cash-input{padding:7px 10px !important;font-size:13px !important}
#change-preview,#partial-credit-preview{margin-top:0 !important}
.checkout-btn{padding:12px 14px;font-size:14px}
@media (max-width:900px){
  #pos-right-portal{height:100dvh !important;max-height:100dvh}
  #pos-right{display:grid !important;grid-template-areas:"header" "customer" "warning" "items" "discount" "totals" "payment" "checkout";grid-template-rows:auto auto auto minmax(220px,1fr) auto auto auto auto;height:100%;min-height:0}
  .cart-header{padding:10px 12px}
  .cart-cust-search{padding:0 12px 8px}
  .cart-items{padding:8px 12px 10px}
  .cart-discount-row{grid-template-columns:96px 1fr;padding:8px 12px}
  #sale-note{height:48px !important;min-height:48px;max-height:60px;font-size:11px !important}
  .cart-totals{padding:8px 12px 6px}
  .cart-pay-section{padding:6px 12px 8px}
  .checkout-btn{margin:0 12px 12px}
}
@media (max-width:560px){
  .cart-discount-row{grid-template-columns:88px 1fr;gap:6px}
  #disc-val{font-size:11px !important;padding:5px 6px !important}
  #cash-tendered,#partial-cash-input{font-size:12px !important;padding:7px 8px !important}
  .pay-method{padding:6px 4px;font-size:9px}
  .pay-method i{font-size:13px}
}


/* Round 9 pre-production reliability + Urdu */
#pos-right-portal{width:min(460px,34vw);min-width:430px}
#pos-right{grid-template-areas:"header" "customer" "warning" "items" "footer";grid-template-rows:auto auto auto minmax(0,1fr) auto}
.cart-bottom-stack{grid-area:footer;position:sticky;bottom:0;display:grid;gap:0;background:var(--card);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom,0)}
.cart-items{min-height:0;height:100%;padding:10px 14px 10px}
.cart-discount-row{padding:8px 14px 6px;grid-template-columns:minmax(102px,116px) 1fr}
#sale-note{height:42px !important;min-height:42px;max-height:58px;font-size:11px}
.cart-totals{padding:8px 14px 4px}
.cart-pay-section{padding:6px 14px 8px}
.pay-methods{grid-template-columns:repeat(3,minmax(0,1fr))}
.pay-method{padding:8px 4px;font-size:10px}
#cash-tendered,#partial-cash-input{padding:8px 10px !important}
.checkout-btn{margin:0 14px 14px;bottom:0}
body.lang-urdu{font-family:'Noto Nastaliq Urdu','Noto Sans Arabic','Segoe UI',Tahoma,var(--font)}
body.lang-urdu input,body.lang-urdu textarea,body.lang-urdu select{font-family:'Noto Nastaliq Urdu','Noto Sans Arabic','Segoe UI',Tahoma,var(--font)}
body.lang-urdu .cust-selected-name,body.lang-urdu .cust-drop-name,body.lang-urdu .prod-name,body.lang-urdu .prod-list-title{letter-spacing:0}
@media (max-width:1200px){
  #pos-right-portal{width:400px;min-width:400px}
}
@media (max-width:900px){
  #pos-right-portal{width:100% !important;min-width:0 !important}
  #pos-right{grid-template-areas:"header" "customer" "warning" "items" "footer" !important;grid-template-rows:auto auto auto minmax(0,1fr) auto !important}
  .cart-bottom-stack{padding-bottom:max(10px,env(safe-area-inset-bottom,0))}
  .cart-items{padding:8px 12px 8px}
  .cart-discount-row{grid-template-columns:92px 1fr;padding:8px 12px 6px}
  .cart-totals{padding:8px 12px 4px}
  .cart-pay-section{padding:6px 12px 8px}
  .checkout-btn{margin:0 12px 12px}
}
@media (max-width:560px){
  .cart-discount-row{grid-template-columns:88px 1fr}
  .pay-method{font-size:9px;padding:7px 4px}
}


/* Round 10 cart stability + measured quantity decimals */
#pos-right-portal{width:min(500px,36vw);min-width:440px}
#pos-right{display:flex !important;flex-direction:column !important;height:100%;min-height:0;overflow:hidden}
.cart-header,.cart-cust-search,#credit-customer-warning,.cart-bottom-stack{flex-shrink:0}
.cart-items{flex:1 1 auto;min-height:220px;height:auto !important;overflow-y:auto}
.cart-bottom-stack{position:static !important;display:block !important;align-self:stretch;width:100%;min-width:0;background:var(--card);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom,0)}
.cart-discount-row,.cart-pay-section,.checkout-btn,.pay-methods{width:100%;box-sizing:border-box}
.cart-discount-row{display:grid;grid-template-columns:minmax(98px,112px) 1fr;gap:8px;align-items:start}
#sale-note{height:40px !important;min-height:40px;max-height:56px}
.pay-methods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.pay-method{min-width:0}
.checkout-btn{position:static !important;display:flex;align-items:center;justify-content:center;gap:8px;margin:0 14px 14px}
@media (max-width:1200px){
  #pos-right-portal{width:420px;min-width:420px}
}
@media (max-width:900px){
  #pos-right-portal{width:100% !important;min-width:0 !important;height:100dvh !important;max-height:100dvh;display:flex;flex-direction:column}
  #pos-right{height:100%;min-height:0;border-radius:20px 20px 0 0}
  .cart-items{min-height:180px;padding:8px 12px 8px}
  .cart-bottom-stack{padding-bottom:max(10px,env(safe-area-inset-bottom,0))}
  .cart-discount-row{grid-template-columns:88px 1fr;padding:8px 12px 6px}
  .cart-totals{padding:8px 12px 4px}
  .cart-pay-section{padding:6px 12px 8px}
  .checkout-btn{margin:0 12px 12px}
}
@media (max-width:560px){
  .cart-items{min-height:160px}
  .pay-method{font-size:9px;padding:7px 4px}
  #cash-tendered,#partial-cash-input{font-size:12px !important;padding:7px 8px !important}
}


/* Round 11 POS layout polish */
#pos-layout{gap:14px;padding:12px}
#pos-left{padding:0;gap:12px}
#pos-right-portal{margin:0;width:min(470px,35vw);min-width:430px;height:auto;border-radius:18px}
#pos-right{border-radius:18px;overflow:hidden}
.pos-cat-bar,.pos-products-head{border-radius:18px}
.pos-cat-bar{padding:10px 12px 8px}
.pos-products-head{padding:10px 14px}
#product-grid{padding:0 0 6px;gap:14px}
#product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(232px,1fr))}
#product-grid.layout-small{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
#product-grid.layout-large .prod-card{display:grid;grid-template-rows:minmax(132px,148px) auto;border-radius:16px;min-height:0}
#product-grid.layout-large .prod-img-wrap{aspect-ratio:auto;min-height:132px;max-height:148px}
#product-grid.layout-large .prod-info{padding:10px 12px 12px;gap:6px;min-height:118px}
#product-grid.layout-large .prod-name{font-size:15px;line-height:1.24;min-height:38px;-webkit-line-clamp:2}
#product-grid.layout-large .prod-stock-badge{margin-top:0;font-size:10px;padding:3px 8px}
#product-grid.layout-large .prod-price{font-size:15px}
#product-grid.layout-large .prod-price-row{align-items:center;gap:10px;margin-top:auto}
#product-grid.layout-large .prod-placeholder{padding:12px 10px;gap:10px}
#product-grid.layout-large .prod-placeholder-cat{display:none}
#product-grid.layout-small .prod-card{display:grid;grid-template-rows:minmax(102px,112px) auto}
#product-grid.layout-small .prod-img-wrap{min-height:102px}
#product-grid.layout-small .prod-info{padding:8px 9px 9px;gap:5px}
#product-grid.layout-small .prod-name{font-size:11px;min-height:28px}
#product-grid.layout-small .prod-placeholder-cat{display:none}
.prod-stock-pin{position:absolute;left:9px;top:9px;width:12px;height:12px;border-radius:999px;border:2px solid rgba(255,255,255,.92);box-shadow:0 3px 10px rgba(15,23,42,.25);z-index:4}
.stock-dot-ok,.prod-stock-pin.stock-dot-ok{background:#10b981}
.stock-dot-low,.prod-stock-pin.stock-dot-low{background:#f59e0b}
.stock-dot-out,.prod-stock-pin.stock-dot-out{background:#ef4444}
.prod-stock-badge .prod-stock-dot{width:8px;height:8px;margin-right:6px;box-shadow:0 0 0 2px rgba(15,23,42,.06)}
.prod-topline{row-gap:4px}
.prod-in-cart-pill{padding:3px 7px}
body.dark .prod-stock-pin{border-color:rgba(15,23,42,.92)}
body.dark .prod-stock-badge .prod-stock-dot{box-shadow:0 0 0 2px rgba(255,255,255,.06)}
@media (max-width:1400px){
  #product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(214px,1fr))}
}
@media (max-width:1200px){
  #pos-layout{gap:12px;padding:10px}
  #pos-right-portal{width:410px;min-width:410px}
  #product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(198px,1fr))}
  #product-grid.layout-small{grid-template-columns:repeat(auto-fill,minmax(138px,1fr))}
}
@media (max-width:900px){
  #pos-layout{padding:0;gap:0}
  #pos-left{padding:0;gap:0}
  #product-grid{padding:0 12px 84px;gap:12px}
  #product-grid.layout-large{grid-template-columns:repeat(2,minmax(0,1fr))}
  #product-grid.layout-small{grid-template-columns:repeat(3,minmax(0,1fr))}
  #product-grid.layout-large .prod-img-wrap{min-height:112px;max-height:none}
  #product-grid.layout-large .prod-info{min-height:108px}
}
@media (max-width:640px){
  #product-grid.layout-small{grid-template-columns:repeat(2,minmax(0,1fr))}
  #product-grid.layout-large .prod-name{font-size:13px;min-height:34px}
  #product-grid.layout-large .prod-info{padding:9px 10px 10px}
}

/* Round 12 POS desktop rebuild */
#content.pos-content{
  height:calc(100dvh - 92px);
  min-height:680px;
}
#pos-layout{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) clamp(390px,31vw,460px);
  gap:16px !important;
  padding:16px !important;
  align-items:stretch;
  min-height:0;
}
#pos-left{
  display:grid;
  grid-template-rows:auto auto auto minmax(0,1fr);
  gap:14px !important;
  min-height:0;
}
#pos-right-portal{
  width:auto !important;
  min-width:0 !important;
  max-width:none !important;
  border-radius:20px;
  border:1px solid var(--border);
  background:var(--card);
  box-shadow:0 14px 32px rgba(15,23,42,.18);
  overflow:hidden;
}
#pos-right{
  display:grid !important;
  grid-template-rows:auto auto auto minmax(0,1fr) auto;
  height:100%;
  min-height:0;
  background:var(--card);
}
.pos-cat-bar,
.pos-products-head{
  margin:0 !important;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--card);
}
.pos-layout-btns{display:flex;gap:8px;flex-shrink:0}
.pos-layout-btns .layout-btn{width:42px;height:42px;border-radius:12px;border:1px solid var(--border);background:var(--light)}
.pos-layout-btns .layout-btn.active{background:var(--accent-glow);border-color:rgba(8,145,178,.45)}
.pos-cat-bar{padding:12px 14px 10px !important;gap:10px;display:flex;overflow:auto}
.pos-cat-btn{min-height:44px;padding:0 14px;border-radius:999px;display:inline-flex;align-items:center;gap:8px;border:1px solid var(--border);background:var(--light);font-size:13px;font-weight:700;white-space:nowrap}
.pos-cat-btn.active{background:var(--accent);color:#fff;border-color:transparent;box-shadow:0 10px 22px rgba(8,145,178,.26)}
.pos-products-head{padding:12px 16px !important}
.pos-products-copy{font-size:14px}
.pos-products-copy strong{font-size:19px}
#product-grid{
  padding:0 2px 4px !important;
  gap:14px !important;
  min-height:0;
  overflow:auto;
  align-content:start;
}
#product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(220px,1fr)) !important}
#product-grid.layout-small{grid-template-columns:repeat(auto-fill,minmax(152px,1fr)) !important}
#product-grid.layout-list{display:flex;flex-direction:column}
#product-grid.layout-large .prod-card,
#product-grid.layout-small .prod-card{
  display:flex !important;
  flex-direction:column;
  min-height:0 !important;
  height:auto;
  border-radius:18px;
  overflow:hidden;
}
#product-grid.layout-large .prod-img-wrap,
#product-grid.layout-small .prod-img-wrap{
  position:relative;
  flex:0 0 auto;
  aspect-ratio:auto;
  min-height:112px !important;
  max-height:none !important;
  background:linear-gradient(180deg,#eef4f9,#d9e6f1);
}
#product-grid.layout-large .prod-img-wrap{height:118px}
#product-grid.layout-small .prod-img-wrap{height:92px}
#product-grid.layout-large .prod-info,
#product-grid.layout-small .prod-info{
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1 1 auto;
  min-height:0 !important;
  padding:12px 12px 13px !important;
  background:var(--card);
}
#product-grid.layout-large .prod-name,
#product-grid.layout-small .prod-name{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  overflow:hidden;
  color:var(--text);
  font-weight:800;
}
#product-grid.layout-large .prod-name{font-size:15px;line-height:1.26;-webkit-line-clamp:2;min-height:38px}
#product-grid.layout-small .prod-name{font-size:12px;line-height:1.28;-webkit-line-clamp:2;min-height:31px}
#product-grid.layout-large .prod-topline,
#product-grid.layout-small .prod-topline{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}
#product-grid.layout-large .prod-mini-cat,
#product-grid.layout-large .prod-mini-sku,
#product-grid.layout-small .prod-mini-cat,
#product-grid.layout-small .prod-mini-sku{
  display:inline-flex;
  align-items:center;
  max-width:100%;
  padding:3px 8px;
  border-radius:999px;
  background:var(--light);
  border:1px solid var(--border);
  font-size:10px;
  font-weight:700;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#product-grid.layout-large .prod-stock-badge,
#product-grid.layout-small .prod-stock-badge{
  display:flex;
  align-items:center;
  gap:0;
  width:max-content;
  max-width:100%;
  margin:0;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--light);
  font-size:11px;
  font-weight:700;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#product-grid.layout-small .prod-stock-badge{font-size:10px;padding:3px 7px}
.prod-stock-badge .prod-stock-dot{width:8px;height:8px;margin-right:6px}
#product-grid.layout-large .prod-price-row,
#product-grid.layout-small .prod-price-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:8px;
  margin-top:auto;
}
#product-grid.layout-large .prod-price,
#product-grid.layout-small .prod-price{
  font-size:15px;
  font-weight:900;
  line-height:1;
  color:var(--accent);
}
#product-grid.layout-small .prod-price{font-size:14px}
#product-grid.layout-large .prod-in-cart-pill,
#product-grid.layout-small .prod-in-cart-pill{
  flex-shrink:0;
  font-size:10px;
  font-weight:800;
  padding:4px 8px;
  border-radius:999px;
  background:var(--accent-glow);
  color:var(--accent);
}
.prod-stock-pin{left:12px !important;top:12px !important;width:14px !important;height:14px !important;border-width:2px !important}
.prod-qty-badge{top:10px !important;right:10px !important;min-width:24px;height:24px;font-size:11px}
.prod-placeholder{
  display:flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  height:100%;
  padding:10px;
  color:#7e97aa;
  background:transparent;
}
.prod-placeholder-icon{
  width:54px !important;
  height:54px !important;
  border-radius:18px !important;
  background:rgba(15,23,42,.75) !important;
  color:var(--accent) !important;
  box-shadow:none !important;
}
#product-grid.layout-small .prod-placeholder-icon{width:44px !important;height:44px !important;border-radius:14px !important;font-size:18px}
.prod-placeholder-cat{display:none !important}
.prod-list-item{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  padding:14px 16px !important;
  border-radius:16px;
  align-items:center;
}
.prod-list-main{gap:12px}
.prod-list-item .prod-img-wrap{width:62px;height:62px;border-radius:14px}
.prod-list-title{font-size:14px;font-weight:800}
.prod-list-meta{font-size:12px}
.cart-header{padding:14px 16px 12px !important;border-radius:0 !important}
.cart-cust-search{padding:0 16px 12px !important}
#credit-customer-warning{margin:0 16px 12px;border-radius:14px}
.cart-items{
  padding:10px 16px 14px !important;
  min-height:0 !important;
  overflow:auto;
}
.cart-item{
  display:grid !important;
  grid-template-columns:48px minmax(0,1fr) auto auto auto !important;
  gap:10px;
  align-items:center;
  padding:12px !important;
  border-radius:16px;
  margin-bottom:10px;
}
.cart-item-thumb{width:48px;height:48px;border-radius:12px}
.cart-item-name{font-size:14px;font-weight:800;line-height:1.25}
.cart-item-price{font-size:12px}
.cart-item-total{min-width:78px;text-align:right;font-size:15px;font-weight:900}
.cart-item-del{width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:999px}
.cart-bottom-stack{
  display:grid !important;
  gap:0;
  padding:0;
  border-top:1px solid var(--border);
  background:var(--card);
}
.cart-discount-row{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:8px;
  padding:12px 16px 10px !important;
}
.cart-discount-row > div:first-child{display:grid !important;grid-template-columns:110px minmax(0,1fr);gap:8px;align-items:center}
.cart-discount-row > div:last-child{width:100%}
#disc-type,
#disc-val,
#sale-note,
#cash-tendered,
#partial-cash-input{
  width:100%;
  min-width:0;
  border-radius:12px !important;
  border:1px solid var(--border2) !important;
  background:var(--light) !important;
  color:var(--text);
}
#disc-type{height:42px;padding:0 10px !important}
#disc-val{height:42px !important;padding:0 12px !important}
#sale-note{height:44px !important;min-height:44px !important;max-height:60px !important;padding:11px 12px !important;resize:none}
.cart-totals{padding:8px 16px 10px !important}
.total-row{font-size:14px}
.total-row.grand{font-size:18px;padding-top:10px;margin-top:6px}
.cart-pay-section{display:grid !important;gap:10px;padding:10px 16px 12px !important}
.pay-methods{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px !important}
.pay-method{
  min-height:56px;
  padding:10px 8px !important;
  border-radius:14px;
  border:1px solid var(--border2);
  background:var(--light);
  font-size:11px !important;
  font-weight:800;
}
.pay-method i{font-size:16px !important}
#cash-tendered-row,
#partial-cash-row{display:grid;gap:6px}
#cash-tendered-row label,
#partial-cash-row label{font-size:10px !important}
#cash-tendered,
#partial-cash-input{height:44px;padding:0 12px !important;font-size:14px !important}
.checkout-btn{
  margin:0 16px 16px !important;
  min-height:52px;
  border-radius:14px;
  font-size:15px;
  font-weight:900;
}
body.dark #pos-right-portal{box-shadow:0 14px 34px rgba(2,6,23,.46)}
body.dark #product-grid.layout-large .prod-img-wrap,
body.dark #product-grid.layout-small .prod-img-wrap{background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.03))}
body.dark #disc-type,
body.dark #disc-val,
body.dark #sale-note,
body.dark #cash-tendered,
body.dark #partial-cash-input,
body.dark .pay-method{background:rgba(255,255,255,.03) !important}
@media (max-width:1360px){
  #pos-layout{grid-template-columns:minmax(0,1fr) 410px;gap:14px !important;padding:14px !important}
  #product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(198px,1fr)) !important}
}
@media (max-width:1120px){
  #pos-layout{grid-template-columns:minmax(0,1fr) 390px;gap:12px !important;padding:12px !important}
  #product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(184px,1fr)) !important}
  #product-grid.layout-small{grid-template-columns:repeat(auto-fill,minmax(140px,1fr)) !important}
  .cart-item{grid-template-columns:42px minmax(0,1fr) auto auto auto !important}
}
@media (max-width:900px){
  #content.pos-content{height:auto;min-height:0}
  #pos-layout{display:flex !important;flex-direction:column;gap:0 !important;padding:0 !important}
  #pos-left{display:flex;flex-direction:column;gap:0 !important}
  .pos-cat-bar,.pos-products-head{border-left:none;border-right:none;border-radius:0}
  #product-grid{padding:12px 12px 92px !important;gap:12px !important}
  #product-grid.layout-large{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  #product-grid.layout-small{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
  #pos-right-portal{width:100%;border-radius:20px 20px 0 0;border-left:none;border-right:none;border-bottom:none}
  #pos-right{min-height:100dvh;border-radius:20px 20px 0 0}
  .cart-items{padding:8px 12px 10px !important}
  .cart-discount-row,.cart-totals,.cart-pay-section{padding-left:12px !important;padding-right:12px !important}
  .checkout-btn{margin:0 12px 12px !important}
}
@media (max-width:640px){
  #product-grid.layout-small{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  #product-grid.layout-large .prod-img-wrap{height:104px}
  #product-grid.layout-large .prod-info{padding:10px !important;gap:7px}
  #product-grid.layout-large .prod-name{font-size:13px;min-height:34px}
  .cart-item{grid-template-columns:40px minmax(0,1fr) auto auto !important;grid-template-areas:'thumb info total del' 'thumb qty qty qty';align-items:start}
  .cart-item-thumb{grid-area:thumb;width:40px;height:40px}
  .cart-item-info{grid-area:info}
  .cart-item-total{grid-area:total}
  .cart-item-del{grid-area:del;justify-self:end}
  .cart-qty{grid-area:qty;justify-self:start;margin-top:6px}
  .cart-discount-row > div:first-child{grid-template-columns:96px minmax(0,1fr)}
}

/* ===== ROUND 13 FINAL POS DESKTOP FIX ===== */
#pos-layout{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 430px !important;
  gap:14px !important;
  padding:14px !important;
  align-items:stretch !important;
}
#pos-left{
  display:grid !important;
  grid-template-rows:auto auto auto minmax(0,1fr) !important;
  gap:12px !important;
  min-height:0;
}
#pos-right-portal{
  width:430px !important;
  min-width:430px !important;
  max-width:430px !important;
  margin:0 !important;
  border-radius:18px !important;
  overflow:hidden !important;
  border:1px solid var(--border) !important;
}
#pos-right{
  display:flex !important;
  flex-direction:column !important;
  height:100% !important;
  min-height:0 !important;
  background:var(--card) !important;
}

.pos-cat-bar,.pos-products-head{
  border-radius:16px !important;
  border:1px solid var(--border) !important;
  background:var(--card) !important;
}
.pos-layout-btns{display:flex !important;gap:8px !important}
.pos-layout-btns .layout-btn{width:40px !important;height:40px !important}
.pos-cat-bar{padding:12px 14px !important;display:flex !important;gap:8px !important;overflow:auto !important}
.pos-products-head{padding:12px 14px !important}

#product-grid{
  padding:0 !important;
  gap:12px !important;
  align-content:start !important;
  min-height:0 !important;
  overflow:auto !important;
}
#product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(250px,1fr)) !important}
#product-grid.layout-small{grid-template-columns:repeat(auto-fill,minmax(150px,1fr)) !important}
#product-grid.layout-list{display:flex !important;flex-direction:column !important}

/* Large view: information-first cards */
#product-grid.layout-large .info-priority-card{
  display:flex !important;
  flex-direction:column !important;
  justify-content:space-between !important;
  gap:10px !important;
  min-height:188px !important;
  padding:14px !important;
  border-radius:18px !important;
  overflow:hidden !important;
  background:var(--card) !important;
}
#product-grid.layout-large .info-priority-top{
  display:grid !important;
  grid-template-columns:72px minmax(0,1fr) !important;
  gap:12px !important;
  align-items:start !important;
}
#product-grid.layout-large .info-priority-thumb{
  position:relative;
  width:72px;
  height:72px;
  border-radius:16px;
  overflow:hidden;
  background:linear-gradient(180deg,#eef4f9,#d9e6f1);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
#product-grid.layout-large .info-priority-thumb img{
  width:100%;height:100%;object-fit:cover;display:block;
}
#product-grid.layout-large .info-priority-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
#product-grid.layout-large .info-priority-card .prod-topline{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:6px !important;
  justify-content:flex-start !important;
}
#product-grid.layout-large .info-priority-card .prod-name{
  font-size:16px !important;
  font-weight:800 !important;
  line-height:1.28 !important;
  min-height:auto !important;
  max-height:none !important;
  display:block !important;
  overflow:hidden !important;
}
#product-grid.layout-large .info-priority-card .prod-subline{
  font-size:12px;
  color:var(--muted);
  line-height:1.35;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#product-grid.layout-large .info-priority-bottom{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:auto;
}
#product-grid.layout-large .info-priority-card .prod-stock-badge{
  display:inline-flex !important;
  align-items:center !important;
  width:fit-content !important;
  max-width:100% !important;
  padding:5px 10px !important;
  border-radius:999px !important;
  border:1px solid var(--border) !important;
  background:var(--light) !important;
  font-size:11px !important;
  font-weight:700 !important;
  color:var(--muted) !important;
}
#product-grid.layout-large .info-priority-card .prod-price-row{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
}
#product-grid.layout-large .info-priority-card .prod-price{
  font-size:24px !important;
  line-height:1 !important;
  font-weight:900 !important;
  color:var(--accent) !important;
}
#product-grid.layout-large .info-priority-card .prod-in-cart-pill{
  flex-shrink:0;
  padding:5px 10px !important;
  border-radius:999px !important;
  font-size:10px !important;
  font-weight:800 !important;
  background:var(--accent-glow) !important;
  color:var(--accent) !important;
}
#product-grid.layout-large .info-priority-card .prod-stock-pin{
  left:8px !important;
  top:8px !important;
  width:14px !important;
  height:14px !important;
}
#product-grid.layout-large .info-priority-card .prod-qty-badge{
  top:6px !important;
  right:6px !important;
}
#product-grid.layout-large .info-priority-card .prod-placeholder{
  padding:0 !important;
  gap:0 !important;
  background:transparent !important;
}
#product-grid.layout-large .info-priority-card .prod-placeholder-icon{
  width:42px !important;
  height:42px !important;
  border-radius:14px !important;
  font-size:18px !important;
}

/* Small cards stay compact but info visible */
#product-grid.layout-small .compact-card{
  display:flex !important;
  flex-direction:column !important;
  min-height:0 !important;
  border-radius:16px !important;
}
#product-grid.layout-small .compact-card .prod-img-wrap{
  height:86px !important;
  min-height:86px !important;
}
#product-grid.layout-small .compact-card .prod-info{
  padding:8px 9px 10px !important;
  gap:6px !important;
}
#product-grid.layout-small .compact-card .prod-name{
  font-size:12px !important;
  min-height:30px !important;
}
#product-grid.layout-small .compact-card .prod-price{
  font-size:15px !important;
}

.prod-stock-pin{
  position:absolute !important;
  left:10px !important;
  top:10px !important;
  width:14px !important;
  height:14px !important;
  border-radius:999px !important;
  border:2px solid rgba(255,255,255,.92) !important;
  box-shadow:0 2px 8px rgba(0,0,0,.22) !important;
  z-index:4 !important;
}
.prod-stock-badge .prod-stock-dot{width:8px !important;height:8px !important;margin-right:6px !important}

/* Cart: stable flex layout */
.cart-header{padding:14px 16px 12px !important;border-bottom:1px solid var(--border) !important;background:var(--card) !important}
.cart-cust-search{padding:12px 16px 10px !important;flex-shrink:0 !important}
#credit-customer-warning{margin:0 16px 10px !important;flex-shrink:0 !important}
.cart-items{
  flex:1 1 auto !important;
  min-height:220px !important;
  overflow:auto !important;
  padding:8px 16px 12px !important;
}
.cart-item{
  display:grid !important;
  grid-template-columns:48px minmax(0,1fr) auto auto auto !important;
  gap:10px !important;
  align-items:center !important;
  padding:12px !important;
  margin-bottom:10px !important;
  border-radius:16px !important;
}
.cart-item-info{min-width:0}
.cart-item-name{font-size:14px !important;line-height:1.25 !important}
.cart-item-total{min-width:72px !important;text-align:right !important;font-size:15px !important}
.cart-qty{display:flex !important;align-items:center !important;gap:8px !important}
.cart-bottom-stack{
  flex-shrink:0 !important;
  display:block !important;
  width:100% !important;
  border-top:1px solid var(--border) !important;
  background:var(--card) !important;
}
.cart-discount-row{
  display:grid !important;
  grid-template-columns:96px minmax(0,1fr) minmax(0,1.1fr) !important;
  gap:8px !important;
  padding:12px 16px 10px !important;
  align-items:start !important;
}
.cart-discount-row > div:first-child{display:contents !important}
#disc-type,#disc-val,#sale-note,#cash-tendered,#partial-cash-input{
  width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  background:var(--light) !important;
  color:var(--text) !important;
  border:1px solid var(--border2) !important;
  border-radius:12px !important;
}
#disc-type{height:42px !important;padding:0 10px !important}
#disc-val,#cash-tendered,#partial-cash-input{height:42px !important;padding:0 12px !important}
#sale-note{height:42px !important;min-height:42px !important;max-height:42px !important;padding:11px 12px !important;resize:none !important}
.cart-totals{padding:8px 16px 10px !important}
.cart-pay-section{display:grid !important;gap:10px !important;padding:10px 16px 12px !important}
.pay-methods{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:8px !important}
.pay-method{
  min-width:0 !important;
  min-height:56px !important;
  padding:10px 8px !important;
  border-radius:14px !important;
  font-size:11px !important;
}
.checkout-btn{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  margin:0 16px 16px !important;
  min-height:52px !important;
  border-radius:14px !important;
}

body.dark .prod-stock-pin{border-color:rgba(15,23,42,.94) !important}
body.dark #disc-type,
body.dark #disc-val,
body.dark #sale-note,
body.dark #cash-tendered,
body.dark #partial-cash-input,
body.dark .pay-method{background:rgba(255,255,255,.03) !important}

@media (max-width:1280px){
  #pos-layout{grid-template-columns:minmax(0,1fr) 400px !important;padding:12px !important;gap:12px !important}
  #pos-right-portal{width:400px !important;min-width:400px !important;max-width:400px !important}
  #product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(220px,1fr)) !important}
}
@media (max-width:900px){
  #pos-layout{display:flex !important;flex-direction:column !important;padding:0 !important;gap:0 !important}
  #pos-left{display:flex !important;flex-direction:column !important;gap:0 !important}
  .pos-cat-bar,.pos-products-head{border-left:none !important;border-right:none !important;border-radius:0 !important}
  #product-grid{padding:12px !important;gap:12px !important}
  #product-grid.layout-large{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  #product-grid.layout-small{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
  #product-grid.layout-large .info-priority-card{padding:10px !important;min-height:168px !important}
  #product-grid.layout-large .info-priority-top{grid-template-columns:58px minmax(0,1fr) !important;gap:10px !important}
  #product-grid.layout-large .info-priority-thumb{width:58px !important;height:58px !important;border-radius:14px !important}
  #product-grid.layout-large .info-priority-card .prod-name{font-size:13px !important}
  #product-grid.layout-large .info-priority-card .prod-price{font-size:19px !important}
  #pos-right-portal{width:100% !important;min-width:0 !important;max-width:none !important;border-radius:20px 20px 0 0 !important;border-left:none !important;border-right:none !important;border-bottom:none !important}
  #pos-right{min-height:100dvh !important;border-radius:20px 20px 0 0 !important}
  .cart-discount-row{grid-template-columns:92px minmax(0,1fr) !important;padding:10px 12px 8px !important}
  .cart-discount-row > div:last-child{grid-column:1 / -1 !important}
  .cart-items{padding:8px 12px 10px !important;min-height:180px !important}
  .cart-totals,.cart-pay-section{padding-left:12px !important;padding-right:12px !important}
  .checkout-btn{margin:0 12px 12px !important}
}
@media (max-width:640px){
  #product-grid.layout-small{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  .cart-item{grid-template-columns:40px minmax(0,1fr) auto auto !important;grid-template-areas:'thumb info total del' 'thumb qty qty qty' !important;align-items:start !important}
  .cart-item-thumb{grid-area:thumb;width:40px !important;height:40px !important}
  .cart-item-info{grid-area:info}
  .cart-item-total{grid-area:total}
  .cart-item-del{grid-area:del;justify-self:end}
  .cart-qty{grid-area:qty;margin-top:6px !important}
}


/* --- Round 14 POS polish: info-first cards + repaired cart --- */
.pos-products-head{display:none !important}
#pos-layout{
  grid-template-columns:minmax(0,1fr) 430px !important;
  gap:18px !important;
  padding:16px !important;
  align-items:start !important;
}
#pos-left{min-width:0 !important; display:flex !important; flex-direction:column !important; gap:14px !important}
#pos-right-portal{width:430px !important;min-width:430px !important;max-width:430px !important}
#pos-right{display:flex !important;flex-direction:column !important;min-height:calc(100vh - 32px) !important;height:auto !important}
#product-grid{margin-top:0 !important;gap:14px !important}
#product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(240px,1fr)) !important}
#product-grid.layout-large .info-priority-card{
  display:flex !important;
  flex-direction:column !important;
  gap:10px !important;
  min-height:164px !important;
  padding:12px !important;
  border-radius:18px !important;
  overflow:hidden !important;
}
#product-grid.layout-large .info-priority-top{
  display:grid !important;
  grid-template-columns:56px minmax(0,1fr) !important;
  gap:10px !important;
  align-items:start !important;
}
#product-grid.layout-large .info-priority-thumb{
  width:56px !important;
  height:56px !important;
  border-radius:14px !important;
  background:linear-gradient(180deg,#eef4f9,#d9e6f1) !important;
}
#product-grid.layout-large .info-priority-card .prod-placeholder{display:flex !important;align-items:center !important;justify-content:center !important}
#product-grid.layout-large .info-priority-card .prod-placeholder-cat{display:none !important}
#product-grid.layout-large .info-priority-card .prod-placeholder-icon{
  width:34px !important;
  height:34px !important;
  border-radius:12px !important;
  font-size:15px !important;
}
#product-grid.layout-large .info-priority-card .prod-topline{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:6px !important;
  margin-bottom:2px !important;
}
#product-grid.layout-large .info-priority-card .prod-name{
  display:-webkit-box !important;
  -webkit-line-clamp:2 !important;
  -webkit-box-orient:vertical !important;
  overflow:hidden !important;
  font-size:15px !important;
  line-height:1.28 !important;
  font-weight:800 !important;
  min-height:38px !important;
  color:var(--text) !important;
}
#product-grid.layout-large .info-priority-card .prod-subline{
  white-space:normal !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  display:block !important;
  font-size:11px !important;
  line-height:1.35 !important;
  max-height:30px !important;
}
#product-grid.layout-large .info-priority-bottom{
  margin-top:auto !important;
  display:grid !important;
  gap:8px !important;
}
#product-grid.layout-large .info-priority-card .prod-price-row{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
}
#product-grid.layout-large .info-priority-card .prod-price{
  font-size:22px !important;
  line-height:1 !important;
  font-weight:900 !important;
  color:var(--accent) !important;
}
#product-grid.layout-large .info-priority-card .prod-stock-badge{
  width:max-content !important;
  max-width:100% !important;
  font-size:11px !important;
  padding:5px 9px !important;
}
#product-grid.layout-large .info-priority-card .prod-in-cart-pill{
  font-size:10px !important;
  padding:4px 8px !important;
}
#product-grid.layout-large .info-priority-card .prod-stock-pin{
  width:13px !important;height:13px !important;left:7px !important;top:7px !important;
}

.cart-header{padding:14px 18px 12px !important}
.cart-cust-search{padding:12px 18px 10px !important}
#credit-customer-warning{margin:0 18px 10px !important}
.cart-items{
  flex:1 1 auto !important;
  min-height:260px !important;
  padding:10px 18px 12px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:10px !important;
}
.cart-item{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:12px !important;
  margin:0 !important;
  border-radius:16px !important;
}
.cart-item-main{
  display:grid !important;
  grid-template-columns:46px minmax(0,1fr) !important;
  gap:12px !important;
  align-items:center !important;
  flex:1 1 auto !important;
  min-width:0 !important;
}
.cart-item-thumb{width:46px !important;height:46px !important;border-radius:12px !important;flex-shrink:0 !important}
.cart-item-info{min-width:0 !important;display:flex !important;flex-direction:column !important;gap:3px !important}
.cart-item-name{
  font-size:14px !important;
  line-height:1.25 !important;
  font-weight:800 !important;
  display:-webkit-box !important;
  -webkit-line-clamp:2 !important;
  -webkit-box-orient:vertical !important;
  overflow:hidden !important;
}
.cart-item-price{font-size:12px !important;line-height:1.3 !important}
.cart-item-controls{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-shrink:0 !important;
}
.cart-qty{
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
  padding:0 !important;
}
.cart-qty .qty-btn{width:28px !important;height:28px !important;border-radius:999px !important}
.cart-qty .qty-input{width:52px !important;height:30px !important;text-align:center !important;padding:0 4px !important}
.cart-item-total{min-width:76px !important;text-align:right !important;font-size:15px !important;font-weight:900 !important}
.cart-item-del{
  width:30px !important;height:30px !important;border-radius:999px !important;
  border:none !important;background:transparent !important;flex-shrink:0 !important;
}
.cart-bottom-stack{border-top:1px solid var(--border) !important;background:var(--card) !important}
.cart-discount-row{padding:12px 18px 10px !important;grid-template-columns:92px minmax(0,1fr) minmax(0,1.15fr) !important;gap:10px !important}
.cart-totals{padding:8px 18px 10px !important}
.cart-pay-section{padding:10px 18px 10px !important;display:grid !important;gap:10px !important}
.pay-methods{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:10px !important}
.pay-method{min-height:54px !important;padding:10px 8px !important;border-radius:14px !important;display:flex !important;flex-direction:column !important;justify-content:center !important;align-items:center !important;gap:4px !important}
.checkout-btn{
  width:calc(100% - 36px) !important;
  margin:0 18px 18px !important;
  min-height:50px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  text-align:center !important;
  border-radius:14px !important;
}
.checkout-btn i{margin:0 !important}

@media (max-width:1280px){
  #pos-layout{grid-template-columns:minmax(0,1fr) 410px !important;gap:14px !important;padding:12px !important}
  #pos-right-portal{width:410px !important;min-width:410px !important;max-width:410px !important}
  #product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(220px,1fr)) !important}
}
@media (max-width:980px){
  #pos-layout{display:flex !important;flex-direction:column !important;padding:0 !important;gap:0 !important}
  #pos-right-portal{width:100% !important;min-width:0 !important;max-width:none !important}
  #pos-right{min-height:0 !important}
  #product-grid{padding:12px !important}
  #product-grid.layout-large{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  .cart-items{min-height:220px !important;padding:8px 12px 10px !important}
  .cart-discount-row{grid-template-columns:92px minmax(0,1fr) !important;padding:10px 12px 8px !important}
  .cart-discount-row > div:last-child{grid-column:1 / -1 !important}
  .cart-totals,.cart-pay-section{padding-left:12px !important;padding-right:12px !important}
  .checkout-btn{width:calc(100% - 24px) !important;margin:0 12px 12px !important}
}
@media (max-width:640px){
  #product-grid.layout-large{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  #product-grid.layout-large .info-priority-card{min-height:152px !important;padding:10px !important}
  #product-grid.layout-large .info-priority-top{grid-template-columns:48px minmax(0,1fr) !important;gap:8px !important}
  #product-grid.layout-large .info-priority-thumb{width:48px !important;height:48px !important}
  #product-grid.layout-large .info-priority-card .prod-name{font-size:13px !important;min-height:34px !important}
  #product-grid.layout-large .info-priority-card .prod-price{font-size:18px !important}
  .cart-item{flex-direction:column !important;align-items:stretch !important}
  .cart-item-controls{justify-content:space-between !important;width:100% !important}
  .cart-item-total{min-width:64px !important}
}


/* Round 15 FINAL POS desktop/cart fit fix */
#content.pos-content{height:calc(100dvh - 56px) !important;min-height:0 !important;}
#pos-layout{height:100% !important;min-height:0 !important;gap:16px !important;padding:12px 14px !important;box-sizing:border-box !important;align-items:stretch !important;}
#pos-left{padding:0 !important;gap:12px !important;min-width:0 !important;}
#product-grid{padding:0 0 10px !important;align-content:start !important;}
#product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(250px,1fr)) !important;gap:12px !important;}
#product-grid.layout-large .info-priority-card{display:grid !important;grid-template-rows:auto auto !important;min-height:156px !important;padding:12px !important;border-radius:16px !important;gap:0 !important;}
#product-grid.layout-large .info-priority-top{display:grid !important;grid-template-columns:56px minmax(0,1fr) !important;gap:12px !important;align-items:start !important;}
#product-grid.layout-large .info-priority-thumb{width:56px !important;height:56px !important;border-radius:14px !important;overflow:hidden !important;background:var(--light) !important;display:flex !important;align-items:center !important;justify-content:center !important;position:relative !important;flex-shrink:0 !important;}
#product-grid.layout-large .info-priority-thumb img{width:100% !important;height:100% !important;object-fit:cover !important;display:block !important;}
#product-grid.layout-large .info-priority-card .prod-placeholder{width:100% !important;height:100% !important;padding:0 !important;gap:0 !important;background:transparent !important;display:flex !important;align-items:center !important;justify-content:center !important;}
#product-grid.layout-large .info-priority-card .prod-placeholder-cat{display:none !important;}
#product-grid.layout-large .info-priority-card .prod-placeholder-icon{width:36px !important;height:36px !important;border-radius:12px !important;font-size:16px !important;box-shadow:none !important;background:rgba(15,23,42,.12) !important;}
#product-grid.layout-large .info-priority-copy{min-width:0 !important;display:flex !important;flex-direction:column !important;gap:5px !important;}
#product-grid.layout-large .info-priority-card .prod-topline{display:flex !important;justify-content:flex-start !important;gap:6px !important;flex-wrap:wrap !important;}
#product-grid.layout-large .info-priority-card .prod-name{font-size:15px !important;line-height:1.25 !important;display:-webkit-box !important;-webkit-line-clamp:2 !important;-webkit-box-orient:vertical !important;overflow:hidden !important;min-height:auto !important;margin:0 !important;}
#product-grid.layout-large .info-priority-card .prod-subline{font-size:11px !important;color:var(--muted) !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;display:block !important;}
#product-grid.layout-large .info-priority-bottom{display:grid !important;gap:8px !important;margin-top:10px !important;padding-top:10px !important;border-top:1px solid var(--border) !important;}
#product-grid.layout-large .info-priority-card .prod-stock-badge{display:inline-flex !important;align-items:center !important;gap:6px !important;font-size:11px !important;line-height:1.2 !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
#product-grid.layout-large .info-priority-card .prod-price-row{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:8px !important;margin-top:0 !important;}
#product-grid.layout-large .info-priority-card .prod-price{font-size:20px !important;line-height:1 !important;margin:0 !important;}
#product-grid.layout-large .info-priority-card .prod-stock-pin{top:6px !important;left:6px !important;width:10px !important;height:10px !important;box-shadow:0 0 0 2px var(--card) !important;}

#pos-right-portal{width:400px !important;min-width:400px !important;max-width:400px !important;margin:0 !important;height:100% !important;border-radius:18px !important;background:transparent !important;border-left:none !important;box-shadow:none !important;}
#pos-right{display:flex !important;flex-direction:column !important;height:100% !important;min-height:0 !important;background:var(--card) !important;border:1px solid var(--border) !important;border-radius:18px !important;overflow:hidden !important;}
.cart-header,.cart-cust-search,#credit-customer-warning{flex-shrink:0 !important;}
.cart-header{padding:12px 16px 10px !important;display:flex !important;align-items:center !important;justify-content:space-between !important;flex-direction:row !important;}
.cart-cust-search{padding:0 16px 10px !important;border-bottom:1px solid var(--border) !important;}
.cart-items{flex:1 1 auto !important;min-height:0 !important;height:auto !important;overflow-y:auto !important;padding:10px 16px 10px !important;}
.cart-item{display:grid !important;grid-template-columns:46px minmax(0,1fr) !important;gap:10px !important;align-items:start !important;padding:12px !important;border-radius:16px !important;margin-bottom:10px !important;}
.cart-item-main{display:contents !important;}
.cart-item-thumb{width:46px !important;height:46px !important;border-radius:12px !important;flex-shrink:0 !important;}
.cart-item-body{min-width:0 !important;display:grid !important;grid-template-rows:auto auto !important;gap:8px !important;}
.cart-item-top{display:grid !important;grid-template-columns:minmax(0,1fr) auto auto !important;gap:8px !important;align-items:start !important;}
.cart-item-info{min-width:0 !important;}
.cart-item-name{font-size:14px !important;font-weight:800 !important;line-height:1.25 !important;display:-webkit-box !important;-webkit-line-clamp:2 !important;-webkit-box-orient:vertical !important;overflow:hidden !important;word-break:break-word !important;}
.cart-item-price{font-size:12px !important;line-height:1.3 !important;margin-top:4px !important;}
.cart-item-controls{display:flex !important;align-items:center !important;justify-content:flex-start !important;gap:12px !important;width:100% !important;}
.cart-qty{display:inline-flex !important;align-items:center !important;gap:6px !important;background:var(--light) !important;border:1px solid var(--border) !important;border-radius:999px !important;padding:4px !important;}
.qty-btn{width:28px !important;height:28px !important;border-radius:999px !important;}
.qty-input{width:58px !important;border:none !important;background:transparent !important;padding:0 !important;}
.cart-item-total{min-width:74px !important;text-align:right !important;font-size:15px !important;font-weight:900 !important;align-self:center !important;}
.cart-item-del{width:28px !important;height:28px !important;border-radius:999px !important;justify-self:end !important;}
.cart-bottom-stack{flex-shrink:0 !important;position:static !important;display:block !important;background:var(--card) !important;border-top:1px solid var(--border) !important;padding-bottom:max(8px,env(safe-area-inset-bottom,0)) !important;}
.cart-discount-row{display:grid !important;grid-template-columns:92px minmax(0,1fr) minmax(0,1fr) !important;gap:8px !important;align-items:center !important;padding:10px 16px 8px !important;border-top:none !important;}
.cart-discount-row > div:first-child{display:block !important;}
.cart-discount-row > div:last-child{width:100% !important;}
.cart-discount-row select,.cart-discount-row input,.cart-discount-row textarea{width:100% !important;box-sizing:border-box !important;}
.cart-discount-row select,.cart-discount-row input{height:42px !important;}
.cart-discount-row textarea{height:42px !important;min-height:42px !important;max-height:42px !important;}
.cart-totals{padding:8px 16px 6px !important;background:var(--card) !important;border-top:1px solid var(--border) !important;}
.total-row{margin-bottom:2px !important;}
.total-row.grand{font-size:17px !important;margin-top:6px !important;padding-top:8px !important;}
.cart-pay-section{padding:8px 16px 8px !important;display:grid !important;gap:8px !important;border-top:1px solid var(--border) !important;background:var(--card) !important;}
.pay-methods{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:8px !important;}
.pay-method{min-height:52px !important;padding:8px 6px !important;border-radius:14px !important;justify-content:center !important;gap:4px !important;font-size:11px !important;}
.pay-method i{font-size:15px !important;}
#cash-tendered-row,#partial-cash-row{display:grid !important;gap:4px !important;}
#cash-tendered-row label,#partial-cash-row label{display:block !important;margin:0 !important;font-size:10px !important;line-height:1.2 !important;}
#cash-tendered,#partial-cash-input{height:42px !important;padding:8px 10px !important;font-size:14px !important;}
.checkout-btn{position:static !important;display:flex !important;align-items:center !important;justify-content:center !important;gap:8px !important;width:calc(100% - 32px) !important;height:48px !important;min-height:48px !important;margin:8px 16px 10px !important;padding:0 16px !important;border-radius:14px !important;align-self:center !important;text-align:center !important;}
.checkout-btn i{margin:0 !important;}

@media (max-width:1280px){
  #product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(228px,1fr)) !important;}
  #pos-right-portal{width:380px !important;min-width:380px !important;max-width:380px !important;}
}
@media (max-width:900px){
  #content.pos-content{height:auto !important;}
  #pos-layout{padding:0 !important;gap:0 !important;flex-direction:column !important;}
  #pos-left{padding:0 !important;}
  #product-grid.layout-large{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  #pos-right-portal{width:100% !important;min-width:0 !important;max-width:none !important;height:auto !important;border-radius:0 !important;}
  #pos-right{border-radius:20px 20px 0 0 !important;}
  .cart-items{min-height:200px !important;}
  .cart-discount-row{grid-template-columns:92px minmax(0,1fr) !important;}
  .cart-discount-row > div:last-child{grid-column:1 / -1 !important;}
}


/* === Round 16 cart / customer control fixes === */
#cash-tendered-row[hidden],
#partial-cash-row[hidden]{display:none !important;}

.cust-selector-wrap{position:relative;}
.cust-selector-row{position:relative;display:block;}
.cust-selected{padding-right:58px !important;}
.cust-add-btn{position:absolute;right:10px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;min-width:34px;padding:0;border:1px solid var(--border2);border-radius:10px;background:var(--accent);color:#fff;font-weight:700;cursor:pointer;box-shadow:none;z-index:3;transition:background .15s ease,border-color .15s ease,color .15s ease;}
.cust-add-btn i{color:#fff;font-size:13px;line-height:1;}
.cust-add-btn:hover,.cust-add-btn:focus{transform:translateY(-50%);background:var(--accent);border-color:var(--accent);color:#fff;}
.cust-add-btn.icon-only span{display:none !important;}

.cart-discount-row{display:grid !important;grid-template-columns:92px minmax(0,1fr) minmax(0,1.1fr) !important;gap:10px !important;align-items:center !important;padding:10px 16px 8px !important;}
.cart-discount-row > *{min-width:0;}
.cart-inline-input{width:100% !important;box-sizing:border-box !important;height:44px !important;padding:0 12px !important;border:1px solid var(--border2) !important;border-radius:14px !important;background:var(--card2) !important;color:var(--text) !important;font-size:13px !important;}
.cart-note-input{height:44px !important;min-height:44px !important;max-height:44px !important;padding-top:11px !important;resize:none !important;}

.cart-item{display:grid !important;grid-template-columns:52px minmax(0,1fr) !important;gap:12px !important;align-items:flex-start !important;padding:14px !important;}
.cart-item-thumb{width:52px !important;height:52px !important;border-radius:14px !important;display:flex;align-items:center;justify-content:center;overflow:hidden;background:var(--card2);border:1px solid var(--border2);}
.cart-item-thumb img{width:100%;height:100%;object-fit:cover;}
.cart-item-body{min-width:0;display:grid;gap:10px;}
.cart-item-top{display:grid !important;grid-template-columns:minmax(0,1fr) auto !important;gap:10px !important;align-items:start !important;}
.cart-item-info{min-width:0;}
.cart-item-name{font-size:15px !important;line-height:1.25 !important;white-space:normal !important;word-break:break-word !important;}
.cart-item-price{margin-top:4px !important;font-size:12px !important;line-height:1.2 !important;}
.cart-item-side{display:flex;align-items:flex-start;gap:10px;}
.cart-item-total{white-space:nowrap !important;font-size:15px !important;align-self:center;}
.cart-item-del{align-self:center;}
.cart-item-controls{justify-content:flex-start !important;}
.cart-qty{min-width:122px;justify-content:space-between;}

@media (max-width: 980px){
  .cust-add-btn{right:10px;top:50%;width:34px;height:34px;min-width:34px;}
}
@media (max-width: 640px){
  .cart-discount-row{grid-template-columns:88px minmax(0,1fr) !important;gap:8px !important;padding:10px 12px 8px !important;}
  .cart-note-input{grid-column:1 / -1;}
  .cart-item{grid-template-columns:46px minmax(0,1fr) !important;gap:10px !important;padding:12px !important;}
  .cart-item-thumb{width:46px !important;height:46px !important;}
  .cart-item-top{grid-template-columns:minmax(0,1fr) auto !important;}
  .cart-item-side{gap:8px;}
  .cart-item-total{font-size:14px !important;}
}


/* === Round 18 mobile stability patch === */
@media (max-width: 900px){
  #topbar-actions{gap:4px !important;flex-wrap:nowrap !important;overflow:visible !important;scrollbar-width:none;flex-shrink:1;min-width:0;}
  #topbar-actions::-webkit-scrollbar{display:none;}
  #topbar-actions .topbar-btn{padding:7px 8px !important;font-size:12px !important;white-space:nowrap !important;flex:0 0 auto !important;}
  body{overflow:hidden;}
  #main{min-height:0;overflow:hidden;}
  #content{overflow-y:auto !important;-webkit-overflow-scrolling:touch;}
  #content.pos-content{display:block !important;height:auto !important;min-height:0 !important;overflow-y:auto !important;padding:0 0 88px !important;}
  #pos-layout{display:flex !important;flex-direction:column !important;height:auto !important;min-height:100% !important;gap:0 !important;padding:0 !important;}
  #pos-left{display:flex !important;flex-direction:column !important;min-height:0 !important;overflow:visible !important;}
  .pos-layout-btns{flex:0 0 auto;}
  .pos-layout-btns .layout-btn{width:40px !important;height:40px !important;}
  .pos-cat-bar{padding:10px 12px !important;gap:8px !important;overflow-x:auto !important;}
  #product-grid{padding:12px 12px 96px !important;overflow:visible !important;align-content:start !important;gap:10px !important;}
  #product-grid.layout-large,
  #product-grid.layout-small{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  #product-grid.layout-list{display:flex !important;flex-direction:column !important;gap:10px !important;}

  #product-grid.layout-large .info-priority-card,
  #product-grid.layout-small .compact-card{
    min-height:0 !important;
    padding:10px !important;
    border-radius:18px !important;
    overflow:hidden !important;
  }
  #product-grid.layout-large .info-priority-top{grid-template-columns:48px minmax(0,1fr) !important;gap:10px !important;}
  #product-grid.layout-large .info-priority-thumb,
  #product-grid.layout-small .compact-card .prod-img-wrap{height:48px !important;min-height:48px !important;width:48px !important;border-radius:14px !important;aspect-ratio:auto !important;}
  #product-grid.layout-small .compact-card{display:grid !important;grid-template-columns:48px minmax(0,1fr) !important;gap:10px !important;align-items:start !important;}
  #product-grid.layout-small .compact-card .prod-info{padding:0 !important;gap:6px !important;min-width:0 !important;}
  #product-grid.layout-small .compact-card .prod-name,
  #product-grid.layout-large .info-priority-card .prod-name{font-size:13px !important;line-height:1.25 !important;min-height:0 !important;display:-webkit-box !important;-webkit-line-clamp:2 !important;-webkit-box-orient:vertical !important;overflow:hidden !important;}
  #product-grid.layout-small .compact-card .prod-stock-badge,
  #product-grid.layout-large .info-priority-card .prod-stock-badge{font-size:10px !important;max-width:100% !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
  #product-grid.layout-small .compact-card .prod-price,
  #product-grid.layout-large .info-priority-card .prod-price{font-size:18px !important;}
  #product-grid.layout-small .compact-card .prod-price-row,
  #product-grid.layout-large .info-priority-card .prod-price-row{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:8px !important;}

  #pos-right-portal{
    position:fixed !important;
    inset:auto 0 0 0 !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:min(88dvh,760px) !important;
    z-index:10020 !important;
    transform:translateY(calc(100% + 24px)) !important;
    transition:transform .28s ease !important;
    pointer-events:none !important;
    border-radius:22px 22px 0 0 !important;
    margin:0 !important;
    box-shadow:0 -10px 36px rgba(0,0,0,.24) !important;
    background:transparent !important;
  }
  #pos-right-portal.cart-open{transform:translateY(0) !important;pointer-events:auto !important;}
  #pos-right{height:100% !important;border-radius:22px 22px 0 0 !important;border:1px solid var(--border) !important;border-bottom:none !important;overflow:hidden !important;background:var(--card) !important;}
  .cart-header{padding:12px 14px 10px !important;}
  .cart-cust-search{padding:0 14px 10px !important;}
  .cart-items{min-height:0 !important;overflow-y:auto !important;padding:8px 14px 10px !important;}
  .cart-item{grid-template-columns:46px minmax(0,1fr) !important;gap:10px !important;padding:12px !important;}
  .cart-item-thumb{width:46px !important;height:46px !important;}
  .cart-bottom-stack{padding-bottom:calc(8px + env(safe-area-inset-bottom, 0px)) !important;}
  .cart-discount-row{grid-template-columns:86px minmax(0,1fr) !important;gap:8px !important;padding:10px 14px 8px !important;}
  .cart-note-input{grid-column:1 / -1 !important;}
  .cart-totals,.cart-pay-section{padding-left:14px !important;padding-right:14px !important;}
  .pay-methods{gap:8px !important;}
  .checkout-btn{width:calc(100% - 28px) !important;margin:8px 14px 10px !important;position:static !important;}
  #cart-fab{display:flex !important;position:fixed !important;right:16px !important;bottom:calc(16px + env(safe-area-inset-bottom,0px)) !important;z-index:10030 !important;}
}

@media (max-width: 640px){
  #topbar{padding:0 10px !important;gap:8px !important;}
  #topbar h2{font-size:16px !important;min-width:0;}
  #role-badge{display:none !important;}
  #topbar-actions{display:flex !important;gap:4px !important;overflow:visible !important;max-width:none;scrollbar-width:none;flex-shrink:1;min-width:0;}
  #topbar-actions::-webkit-scrollbar{display:none;}
  .topbar-btn{padding:7px 8px !important;font-size:12px !important;white-space:nowrap !important;}
  #product-grid{padding-left:10px !important;padding-right:10px !important;gap:8px !important;}
  #product-grid.layout-large,
  #product-grid.layout-small{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  #product-grid.layout-small .compact-card,
  #product-grid.layout-large .info-priority-card{padding:9px !important;}
  #product-grid.layout-small .compact-card .prod-mini-cat,
  #product-grid.layout-small .compact-card .prod-mini-sku,
  #product-grid.layout-large .info-priority-card .prod-mini-cat,
  #product-grid.layout-large .info-priority-card .prod-mini-sku{max-width:88px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
}

/* ===== Round 20: POS product layout refresh ===== */
.pos-layout-btns{display:flex;gap:8px;align-items:center;flex-shrink:0;}
.pos-layout-btns .layout-btn{
  display:inline-flex !important;
  align-items:center !important;
  gap:8px !important;
  min-height:42px !important;
  padding:0 12px !important;
  border-radius:12px !important;
}
.pos-layout-btns .layout-btn span{font-size:12px;font-weight:700;letter-spacing:.01em;}

#product-grid{
  gap:14px !important;
  align-content:start !important;
}
#product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(248px,1fr)) !important;}
#product-grid.layout-list{grid-template-columns:minmax(0,1fr) !important;gap:12px !important;}

.prod-card.card-pro,
.prod-card.list-pro{
  border:1px solid var(--border) !important;
  background:linear-gradient(180deg, color-mix(in srgb, var(--card) 96%, white 4%), var(--card)) !important;
  box-shadow:0 10px 22px rgba(15,23,42,.06) !important;
  border-radius:18px !important;
  overflow:hidden !important;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease !important;
}
.prod-card.card-pro:hover,
.prod-card.list-pro:hover{
  transform:translateY(-1px) !important;
  box-shadow:0 14px 28px rgba(15,23,42,.1) !important;
  border-color:color-mix(in srgb, var(--accent) 26%, var(--border)) !important;
}
.prod-card.card-pro.in-cart,
.prod-card.list-pro.in-cart{
  border-color:color-mix(in srgb, var(--accent) 36%, var(--border)) !important;
  box-shadow:0 14px 28px rgba(8,145,178,.12) !important;
}

.prod-card.card-pro{
  display:grid !important;
  grid-template-rows:auto auto !important;
  min-height:184px !important;
  padding:14px !important;
  gap:14px !important;
}
.card-pro-head{
  display:grid !important;
  grid-template-columns:72px minmax(0,1fr) !important;
  align-items:start !important;
  gap:12px !important;
}
.card-pro-thumb{
  width:72px !important;
  height:72px !important;
  min-height:72px !important;
  border-radius:16px !important;
  overflow:hidden !important;
  background:var(--light) !important;
}
.card-pro-thumb img{width:100% !important;height:100% !important;object-fit:cover !important;display:block !important;}
.card-pro-copy{display:flex !important;flex-direction:column !important;gap:7px !important;min-width:0 !important;}
.card-pro-foot{
  display:grid !important;
  gap:10px !important;
  margin-top:auto !important;
  padding-top:12px !important;
  border-top:1px solid color-mix(in srgb, var(--border) 86%, transparent) !important;
}
.card-pro .prod-topline,
.list-pro .prod-topline{display:flex !important;flex-wrap:wrap !important;gap:6px !important;align-items:center !important;}
.card-pro .prod-name,
.list-pro .prod-name{
  font-size:15px !important;
  line-height:1.28 !important;
  margin:0 !important;
  min-height:0 !important;
  display:-webkit-box !important;
  -webkit-line-clamp:2 !important;
  -webkit-box-orient:vertical !important;
  overflow:hidden !important;
}
.card-pro .prod-subline,
.list-pro .prod-subline{font-size:11px !important;color:var(--muted) !important;line-height:1.35 !important;}
.card-pro .prod-price-row,
.list-pro .prod-price-row{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:10px !important;}
.card-pro .prod-price,
.list-pro .prod-price{font-size:22px !important;line-height:1 !important;font-weight:800 !important;}
.card-pro .prod-stock-badge,
.list-pro .prod-stock-badge{
  display:inline-flex !important;
  align-items:center !important;
  gap:7px !important;
  min-width:0 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  font-size:11px !important;
}
.card-pro-cta{
  width:34px;
  height:34px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:color-mix(in srgb, var(--accent) 12%, transparent);
  color:var(--accent);
  border:1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  flex-shrink:0;
}

.prod-card.list-pro{
  display:grid !important;
  grid-template-columns:68px minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:14px !important;
  padding:12px 14px !important;
  min-height:96px !important;
}
.list-pro-thumb{
  width:68px !important;
  height:68px !important;
  min-height:68px !important;
  border-radius:16px !important;
  overflow:hidden !important;
  background:var(--light) !important;
}
.list-pro-thumb img{width:100% !important;height:100% !important;object-fit:cover !important;display:block !important;}
.list-pro-copy{display:flex !important;flex-direction:column !important;gap:6px !important;min-width:0 !important;}
.list-pro-side{display:flex !important;flex-direction:column !important;align-items:flex-end !important;justify-content:center !important;gap:10px !important;min-width:128px !important;}
.list-pro .prod-price{white-space:nowrap !important;}
.list-pro .prod-in-cart-pill.ghost{
  background:transparent !important;
  border:1px dashed var(--border2) !important;
  color:var(--muted) !important;
}

.prod-card.card-pro .prod-mini-cat,
.prod-card.card-pro .prod-mini-sku,
.prod-card.list-pro .prod-mini-cat,
.prod-card.list-pro .prod-mini-sku{
  max-width:120px !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}

body.dark .prod-card.card-pro,
body.dark .prod-card.list-pro{
  box-shadow:0 10px 22px rgba(0,0,0,.24) !important;
  background:linear-gradient(180deg, color-mix(in srgb, var(--card) 94%, white 6%), var(--card)) !important;
}

@media (max-width: 1024px){
  #product-grid.layout-large{grid-template-columns:repeat(auto-fill,minmax(216px,1fr)) !important;}
  .pos-layout-btns .layout-btn{padding:0 10px !important;}
}

@media (max-width: 768px){
  .pos-layout-btns{width:100%;justify-content:flex-end;}
  .pos-layout-btns .layout-btn span{display:none;}
  #product-grid.layout-large{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:10px !important;}
  .prod-card.card-pro{padding:12px !important;gap:12px !important;min-height:170px !important;}
  .card-pro-head{grid-template-columns:56px minmax(0,1fr) !important;gap:10px !important;}
  .card-pro-thumb{width:56px !important;height:56px !important;min-height:56px !important;border-radius:14px !important;}
  .card-pro .prod-name{font-size:13px !important;}
  .card-pro .prod-price{font-size:18px !important;}
  .card-pro-foot{padding-top:10px !important;gap:8px !important;}

  #product-grid.layout-list{gap:10px !important;}
  .prod-card.list-pro{
    grid-template-columns:56px minmax(0,1fr) !important;
    align-items:start !important;
    gap:10px !important;
    padding:11px 12px !important;
  }
  .list-pro-thumb{width:56px !important;height:56px !important;min-height:56px !important;border-radius:14px !important;}
  .list-pro-side{
    grid-column:2 / 3 !important;
    width:100% !important;
    min-width:0 !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    margin-top:2px !important;
  }
  .list-pro .prod-name{font-size:13px !important;}
  .list-pro .prod-price{font-size:18px !important;}
}

@media (max-width: 480px){
  #product-grid.layout-large{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  .prod-card.card-pro{padding:10px !important;min-height:156px !important;gap:10px !important;border-radius:16px !important;}
  .card-pro-head{grid-template-columns:48px minmax(0,1fr) !important;gap:8px !important;}
  .card-pro-thumb{width:48px !important;height:48px !important;min-height:48px !important;border-radius:12px !important;}
  .card-pro .prod-name,
  .list-pro .prod-name{font-size:12.5px !important;}
  .card-pro .prod-price,
  .list-pro .prod-price{font-size:17px !important;}
  .card-pro .prod-stock-badge,
  .list-pro .prod-stock-badge{font-size:10px !important;}
  .prod-card.list-pro{padding:10px !important;border-radius:16px !important;}
}


/* ─── Round 21 POS cleanup: no product images, cleaner cards, stable mobile cart ─── */
#product-grid.layout-large{
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr)) !important;
  gap:14px !important;
  align-content:start;
}
#product-grid.layout-list{
  grid-template-columns:1fr !important;
  gap:10px !important;
  align-content:start;
}
#product-grid{
  padding:14px 14px 110px !important;
  overflow-y:auto !important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.pos-layout-btns{
  display:flex;
  align-items:center;
  gap:8px;
  padding:4px;
  background:var(--light);
  border:1px solid var(--border);
  border-radius:16px;
}
.pos-layout-btns .layout-btn{
  width:auto !important;
  min-width:120px;
  height:42px !important;
  padding:0 14px !important;
  border-radius:12px !important;
  font-weight:700;
  gap:8px;
}
.pos-layout-btns .layout-btn span{
  display:inline !important;
  font-size:13px;
}
.prod-card{
  border-radius:20px !important;
  border:1px solid rgba(148,163,184,.22) !important;
  padding:16px !important;
  gap:0 !important;
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.98)) !important;
  box-shadow:0 10px 24px rgba(15,23,42,.06) !important;
  text-align:left;
}
.prod-card:hover{
  transform:translateY(-2px);
  border-color:rgba(8,145,178,.35) !important;
  box-shadow:0 16px 32px rgba(8,145,178,.12) !important;
}
.prod-card.stock-out{
  opacity:.7;
}
.prod-card.stock-out .prod-price{
  color:var(--muted) !important;
}
.prod-icon-tile{
  width:52px;
  height:52px;
  border-radius:16px;
  background:linear-gradient(135deg,rgba(8,145,178,.14),rgba(6,182,212,.10));
  color:var(--accent);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  flex-shrink:0;
}
.card-pro{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:176px;
}
.card-pro-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.card-pro-meta,
.list-pro-top{
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.prod-mini-cat,
.prod-mini-sku{
  display:inline-flex;
  align-items:center;
  padding:5px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.02em;
}
.prod-mini-cat{
  background:rgba(8,145,178,.10);
  color:var(--accent);
}
.prod-mini-sku{
  background:rgba(148,163,184,.12);
  color:var(--muted);
  font-family:var(--mono);
}
.card-pro .prod-name{
  font-size:17px !important;
  line-height:1.3;
  min-height:44px;
  margin-bottom:8px;
}
.card-pro .prod-subline,
.list-pro .prod-subline{
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}
.card-pro-footer{
  margin-top:14px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
}
.prod-price{
  font-size:20px !important;
  font-weight:800 !important;
  letter-spacing:-.02em;
}
.prod-unit-line{
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
  font-family:var(--mono);
}
.prod-in-cart-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(8,145,178,.12);
  color:var(--accent);
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}
.prod-in-cart-pill.ghost{
  background:rgba(15,23,42,.06);
  color:var(--text);
}
.list-pro{
  position:relative;
  display:grid !important;
  grid-template-columns:52px minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  min-height:0;
}
.list-pro .prod-name{
  font-size:15px !important;
  line-height:1.25;
  -webkit-line-clamp:2;
  margin:4px 0;
}
.list-pro-side{
  text-align:right;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
}
.list-pro .prod-price{
  font-size:18px !important;
}
.prod-qty-badge{
  top:12px !important;
  right:12px !important;
  min-width:26px !important;
  height:26px !important;
  border-width:2px !important;
  border-color:#fff !important;
  z-index:3;
}
.cart-item-icon{
  width:100%;
  height:100%;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,rgba(8,145,178,.16),rgba(6,182,212,.08));
  color:var(--accent);
}
.cart-badge{
  min-width:24px;
  padding:2px 8px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-family:var(--mono);
  font-weight:800;
}
#pos-right-portal{
  width:min(430px,34vw) !important;
  min-width:390px !important;
  max-width:430px !important;
}
#cart-fab{
  width:62px !important;
  height:62px !important;
  border-radius:18px !important;
}
#cart-fab-badge{
  min-width:22px !important;
  width:auto !important;
  padding:0 5px !important;
}
body.modal-open #cart-fab{
  bottom:96px !important;
}
body.dark .prod-card{
  background:linear-gradient(180deg,rgba(15,23,42,.96),rgba(15,23,42,.9)) !important;
  border-color:rgba(148,163,184,.18) !important;
  box-shadow:0 14px 28px rgba(2,6,23,.44) !important;
}
body.dark .prod-mini-sku{background:rgba(148,163,184,.16);color:#cbd5e1}
body.dark .prod-in-cart-pill.ghost{background:rgba(148,163,184,.16);color:#e2e8f0}
@media (max-width: 900px){
  #content.pos-content{
    min-height:0;
  }
  #pos-layout{
    height:100%;
    min-height:0;
  }
  #pos-left{
    min-height:0;
  }
  #product-grid.layout-large{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }
  #product-grid{
    padding:12px 12px 132px !important;
  }
  .pos-layout-btns{
    flex:1;
  }
  .pos-layout-btns .layout-btn{
    min-width:0;
    flex:1;
    height:40px !important;
    padding:0 10px !important;
  }
  .card-pro{
    min-height:160px;
    padding:14px !important;
  }
  .card-pro .prod-name{
    font-size:15px !important;
    min-height:40px;
  }
  .prod-icon-tile{
    width:46px;
    height:46px;
    border-radius:14px;
    font-size:18px;
  }
  .list-pro{
    grid-template-columns:44px minmax(0,1fr);
    gap:10px;
  }
  .list-pro-side{
    grid-column:2;
    display:grid;
    grid-template-columns:auto auto;
    gap:8px 12px;
    align-items:center;
    justify-content:space-between;
    width:100%;
    text-align:left;
    margin-top:6px;
  }
  .list-pro .prod-price{
    order:1;
  }
  .list-pro .prod-unit-line{
    order:2;
    text-align:right;
  }
  .list-pro .prod-in-cart-pill{
    order:3;
    grid-column:1 / -1;
    width:100%;
  }
  #pos-right-portal{
    position:fixed !important;
    inset:auto 0 0 0 !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:92dvh !important;
    max-height:92dvh !important;
    border-radius:22px 22px 0 0 !important;
    transform:translateY(calc(100% + 24px)) !important;
    transition:transform .24s ease !important;
    z-index:10080 !important;
    background:var(--card) !important;
    border:none !important;
    box-shadow:0 -20px 40px rgba(15,23,42,.22) !important;
    pointer-events:none !important;
  }
  #pos-right-portal.cart-open{
    transform:translateY(0) !important;
    pointer-events:auto !important;
  }
  body.mobile-cart-open{
    overflow:hidden;
  }
  #cart-fab{
    display:flex !important;
    position:fixed !important;
    right:16px !important;
    bottom:calc(16px + env(safe-area-inset-bottom,0px)) !important;
    z-index:10030 !important;
  }
  .modal-footer{
    padding-bottom:calc(14px + env(safe-area-inset-bottom,0px)) !important;
  }
}

body:not(.pos-view) #cart-fab{display:none !important;}


/* Round 23 mobile fixes */
@media (max-width: 900px){
  #content.pos-content{
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch !important;
    overscroll-behavior-y:contain;
  }
  body.modal-open #cart-fab{
    display:none !important;
  }
}

/* --- Round 25 mobile POS scroll repair --- */
@media (max-width: 900px){
  #content.pos-content{
    display:block !important;
    overflow:hidden !important;
    height:calc(100dvh - 56px) !important;
    min-height:0 !important;
    padding:0 !important;
  }
  #pos-layout{
    display:flex !important;
    flex-direction:column !important;
    height:100% !important;
    min-height:0 !important;
    gap:0 !important;
    padding:0 !important;
  }
  #pos-left{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    -webkit-overflow-scrolling:touch !important;
    overscroll-behavior-y:contain !important;
    padding:12px 12px 104px !important;
    gap:12px !important;
  }
  .pos-cat-bar{
    position:sticky !important;
    top:76px !important;
    z-index:19 !important;
  }
  #product-grid{
    flex:0 0 auto !important;
    height:auto !important;
    min-height:0 !important;
    overflow:visible !important;
    padding:0 0 8px !important;
    align-content:start !important;
    touch-action:pan-y !important;
  }
  #product-grid *,
  .prod-card,
  .card-pro,
  .list-pro,
  .prod-card *,
  .card-pro *,
  .list-pro *{
    touch-action:pan-y !important;
  }
}

/* ===== Round 29 — desktop POS layout polish ===== */
@media (min-width: 901px){
  #product-grid.layout-list{
    display:block !important;
    padding:14px 14px 88px !important;
  }
  .desktop-list-shell{
    display:flex;
    flex-direction:column;
    gap:10px;
  }
  .desktop-list-header{
    display:grid;
    grid-template-columns:72px minmax(0,1.65fr) minmax(150px,.95fr) minmax(96px,.55fr) minmax(118px,.62fr);
    align-items:center;
    gap:14px;
    padding:0 14px 4px;
    color:#7b8aa5;
    text-transform:uppercase;
    font-size:10px;
    letter-spacing:.18em;
    font-weight:800;
  }
  .desktop-list-header span:last-child,
  .list-action-col{justify-self:end;}

  .prod-card.list-pro{
    display:grid !important;
    grid-template-columns:72px minmax(0,1.65fr) minmax(150px,.95fr) minmax(96px,.55fr) minmax(118px,.62fr);
    align-items:center;
    gap:14px;
    min-height:0 !important;
    padding:10px 14px !important;
    border-radius:14px !important;
    box-shadow:none !important;
    background:#fff !important;
    border:1px solid rgba(217,226,240,.95) !important;
  }
  .prod-card.list-pro:hover{
    transform:translateY(-1px) !important;
    box-shadow:0 12px 24px rgba(37,99,235,.08) !important;
    border-color:rgba(59,130,246,.28) !important;
  }
  .prod-card.list-pro .prod-qty-badge{display:none !important;}
  .list-cat-col{display:flex;align-items:center;}
  .prod-card.list-pro .prod-icon-tile{
    width:40px !important;
    height:40px !important;
    border-radius:10px !important;
    background:linear-gradient(180deg,#f6f8fc,#eef3fb) !important;
    color:#7d91b0 !important;
    border:1px solid rgba(221,229,242,.95);
    font-size:14px !important;
  }
  .prod-card.list-pro.in-cart .prod-icon-tile{
    color:#2563eb !important;
    border-color:rgba(59,130,246,.24);
    background:linear-gradient(180deg,#f5f9ff,#edf5ff) !important;
  }
  .prod-card.list-pro.stock-out{
    opacity:.6 !important;
    filter:saturate(.76);
  }
  .prod-card.list-pro .prod-name{
    font-size:17px !important;
    line-height:1.2 !important;
    min-height:0 !important;
    margin:0 0 4px !important;
    -webkit-line-clamp:1 !important;
  }
  .prod-card.list-pro .prod-subline{
    font-size:11px !important;
    color:#7d8aa3 !important;
    font-family:var(--mono);
    letter-spacing:.01em;
  }
  .list-status-col,
  .list-price-col,
  .list-action-col{display:flex;align-items:center;}
  .list-price-col{
    font-family:var(--mono);
    font-weight:800;
    font-size:15px;
    color:#111827;
  }
  .desktop-stock-pill{
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-size:12px;
    color:#0f172a;
    white-space:nowrap;
  }
  .desktop-stock-dot{
    width:7px;
    height:7px;
    border-radius:999px;
    background:#22c55e;
    box-shadow:0 0 0 3px rgba(34,197,94,.12);
  }
  .desktop-stock-pill strong{font-weight:800;}
  .desktop-stock-pill em{
    font-style:normal;
    color:#94a3b8;
    font-size:11px;
  }
  .desktop-stock-pill.tone-low .desktop-stock-dot{
    background:#a16207;
    box-shadow:0 0 0 3px rgba(245,158,11,.14);
  }
  .desktop-stock-pill.tone-out .desktop-stock-dot{
    background:#94a3b8;
    box-shadow:0 0 0 3px rgba(148,163,184,.16);
  }
  .desktop-stock-pill.tone-out{color:#94a3b8;}
  .desktop-stock-pill.tone-high .desktop-stock-dot{
    background:#22c55e;
    box-shadow:0 0 0 3px rgba(34,197,94,.12);
  }
  .desktop-action-chip{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-width:104px;
    min-height:34px;
    padding:0 14px;
    border-radius:10px;
    background:#edf4ff;
    color:#1d4ed8;
    font-size:11px;
    letter-spacing:.08em;
    text-transform:uppercase;
    font-weight:800;
  }
  .desktop-action-chip.added{
    background:#2563eb;
    color:#fff;
  }
  .desktop-action-chip.sold{
    background:#f3f4f6;
    color:#9ca3af;
  }
  .desktop-action-chip i{font-size:10px;}

  #product-grid.layout-large{
    grid-template-columns:repeat(auto-fill,minmax(228px,1fr)) !important;
    gap:14px !important;
    align-content:start;
    padding:14px 14px 88px !important;
  }
  .prod-card.card-pro{
    min-height:174px !important;
    border-radius:16px !important;
    border:1px solid rgba(228,234,244,.96) !important;
    background:#fff !important;
    box-shadow:none !important;
    padding:14px 14px 12px !important;
    gap:0 !important;
  }
  .prod-card.card-pro:hover{
    transform:translateY(-2px) !important;
    box-shadow:0 16px 26px rgba(37,99,235,.08) !important;
    border-color:rgba(59,130,246,.22) !important;
  }
  .prod-card.card-pro .prod-qty-badge{display:none !important;}
  .desktop-card-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    margin-bottom:16px;
  }
  .desktop-status-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:21px;
    padding:0 8px;
    border-radius:999px;
    font-size:9px;
    letter-spacing:.11em;
    text-transform:uppercase;
    font-weight:800;
  }
  .desktop-status-pill.tone-ok,
  .desktop-status-pill.tone-high{
    background:#86efac;
    color:#166534;
  }
  .desktop-status-pill.tone-low{
    background:#b45309;
    color:#fff;
  }
  .desktop-status-pill.tone-out{
    background:#e5e7eb;
    color:#6b7280;
  }
  .desktop-card-price{
    font-family:var(--mono);
    color:#2563eb;
    font-size:16px;
    font-weight:800;
    letter-spacing:-.04em;
    white-space:nowrap;
  }
  .card-pro .prod-name{
    font-size:16px !important;
    line-height:1.28 !important;
    min-height:42px !important;
    margin:0 0 8px !important;
    -webkit-line-clamp:2 !important;
  }
  .desktop-card-meta{
    display:flex;
    align-items:center;
    gap:6px;
    color:#7d8aa3;
    font-family:var(--mono);
    font-size:11px;
    line-height:1.3;
  }
  .desktop-card-meta i{
    font-size:10px;
    opacity:.85;
  }
  .desktop-card-bottom{
    margin-top:auto;
    padding-top:18px;
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px;
  }
  .desktop-card-caption{
    display:block;
    margin-bottom:4px;
    font-size:10px;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:#64748b;
    font-weight:800;
  }
  .desktop-card-stockblock strong{
    font-size:15px;
    color:#0f172a;
    font-weight:900;
  }
  .desktop-card-cart-btn{
    width:34px;
    height:34px;
    border-radius:12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#dbeafe;
    color:#2563eb;
    box-shadow:inset 0 0 0 1px rgba(59,130,246,.08);
  }
  .desktop-card-cart-btn.added{
    background:#2563eb;
    color:#fff;
  }
  .desktop-card-cart-btn.sold{
    background:#e5e7eb;
    color:#9ca3af;
  }
}
@media (max-width: 900px){
  #product-grid.layout-list{
    display:block !important;
  }
  .desktop-list-shell{
    display:flex;
    flex-direction:column;
    gap:10px;
  }
  .desktop-list-header{display:none !important;}
  .prod-card.list-pro{
    display:grid !important;
    grid-template-columns:44px minmax(0,1fr) !important;
    gap:10px !important;
    align-items:start !important;
  }
  .prod-card.list-pro .prod-qty-badge{display:flex !important;}
  .list-cat-col{grid-row:1 / span 3;}
  .list-status-col,
  .list-price-col,
  .list-action-col{
    grid-column:2;
  }
  .list-status-col{margin-top:4px;}
  .list-price-col{
    font-family:var(--mono);
    font-size:17px;
    font-weight:800;
    color:var(--accent);
    margin-top:4px;
  }
  .list-action-col{margin-top:8px;}
  .desktop-action-chip{
    min-height:34px;
    padding:0 12px;
    border-radius:10px;
    display:inline-flex;
    align-items:center;
    gap:7px;
    background:rgba(8,145,178,.12);
    color:var(--accent);
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.06em;
  }
  .desktop-action-chip.added{background:var(--accent);color:#fff;}
  .desktop-action-chip.sold{background:#eef2f7;color:#94a3b8;}
  .desktop-stock-pill{
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-size:11px;
    color:var(--text);
  }
  .desktop-stock-dot{width:7px;height:7px;border-radius:999px;background:#22c55e;}
  .desktop-stock-pill em{font-style:normal;color:var(--muted);font-size:10px;}
  .desktop-stock-pill.tone-low .desktop-stock-dot{background:#f59e0b;}
  .desktop-stock-pill.tone-out .desktop-stock-dot{background:#94a3b8;}

  .desktop-card-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
    margin-bottom:12px;
  }
  .desktop-status-pill{
    display:inline-flex;
    align-items:center;
    min-height:20px;
    padding:0 8px;
    border-radius:999px;
    font-size:9px;
    text-transform:uppercase;
    letter-spacing:.08em;
    font-weight:800;
  }
  .desktop-status-pill.tone-ok,
  .desktop-status-pill.tone-high{background:#86efac;color:#166534;}
  .desktop-status-pill.tone-low{background:#f59e0b;color:#fff;}
  .desktop-status-pill.tone-out{background:#e5e7eb;color:#6b7280;}
  .desktop-card-price{font-family:var(--mono);font-size:17px;font-weight:800;color:var(--accent);white-space:nowrap;}
  .desktop-card-meta{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:11px;font-family:var(--mono);margin-bottom:0;}
  .desktop-card-bottom{margin-top:auto;display:flex;align-items:flex-end;justify-content:space-between;gap:10px;padding-top:14px;}
  .desktop-card-caption{display:block;margin-bottom:3px;font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:800;}
  .desktop-card-stockblock strong{font-size:15px;}
  .desktop-card-cart-btn{width:34px;height:34px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:rgba(8,145,178,.12);color:var(--accent);}
  .desktop-card-cart-btn.added{background:var(--accent);color:#fff;}
  .desktop-card-cart-btn.sold{background:#eef2f7;color:#94a3b8;}
}

/* ===== Round 30 — desktop POS cards/list aligned to approved reference ===== */
@media (min-width: 901px){
  #product-grid.layout-list{
    display:block !important;
    padding:12px 12px 88px !important;
  }
  #product-grid.layout-list .desktop-list-shell{
    display:flex !important;
    flex-direction:column !important;
    gap:10px !important;
    width:100% !important;
  }
  #product-grid.layout-list .desktop-list-header{
    display:grid !important;
    grid-template-columns:56px minmax(280px,1.9fr) minmax(180px,1.05fr) minmax(110px,.6fr) minmax(132px,.75fr) !important;
    gap:18px !important;
    align-items:center !important;
    padding:0 12px 4px !important;
    color:#8391a8 !important;
    font-size:10px !important;
    font-weight:800 !important;
    letter-spacing:.14em !important;
    text-transform:uppercase !important;
  }
  #product-grid.layout-list .desktop-list-header span:last-child,
  #product-grid.layout-list .list-action-col{justify-self:end !important;}

  #product-grid.layout-list .prod-card.list-pro{
    display:grid !important;
    grid-template-columns:56px minmax(280px,1.9fr) minmax(180px,1.05fr) minmax(110px,.6fr) minmax(132px,.75fr) !important;
    gap:18px !important;
    align-items:center !important;
    width:100% !important;
    min-height:0 !important;
    padding:10px 12px !important;
    border-radius:10px !important;
    background:#ffffff !important;
    border:1px solid #d9e3f2 !important;
    box-shadow:none !important;
    box-sizing:border-box !important;
    overflow:visible !important;
  }
  #product-grid.layout-list .prod-card.list-pro:hover{
    transform:none !important;
    border-color:#c7d4ea !important;
    box-shadow:0 10px 20px rgba(37,99,235,.05) !important;
  }
  #product-grid.layout-list .prod-card.list-pro .prod-qty-badge{
    display:none !important;
  }
  #product-grid.layout-list .list-cat-col,
  #product-grid.layout-list .list-pro-main,
  #product-grid.layout-list .list-status-col,
  #product-grid.layout-list .list-price-col,
  #product-grid.layout-list .list-action-col{
    min-width:0 !important;
  }
  #product-grid.layout-list .list-cat-col{display:flex !important;align-items:center !important;}
  #product-grid.layout-list .prod-icon-tile{
    width:36px !important;
    height:36px !important;
    border-radius:10px !important;
    border:1px solid #d9e3f2 !important;
    background:#f3f6fc !important;
    color:#7e92b0 !important;
    font-size:13px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
  }
  #product-grid.layout-list .prod-name{
    margin:0 0 3px !important;
    min-height:0 !important;
    font-size:15px !important;
    line-height:1.2 !important;
    font-weight:800 !important;
    color:#0f172a !important;
    -webkit-line-clamp:1 !important;
  }
  #product-grid.layout-list .prod-subline{
    font-size:10px !important;
    line-height:1.35 !important;
    color:#7f8ca4 !important;
    font-family:var(--mono) !important;
    letter-spacing:.01em !important;
  }
  #product-grid.layout-list .list-status-col{display:flex !important;align-items:center !important;}
  #product-grid.layout-list .desktop-stock-pill{
    display:inline-flex !important;
    align-items:center !important;
    gap:8px !important;
    font-size:12px !important;
    color:#0f172a !important;
    white-space:nowrap !important;
  }
  #product-grid.layout-list .desktop-stock-pill strong{
    font-weight:800 !important;
  }
  #product-grid.layout-list .desktop-stock-pill em{
    font-style:normal !important;
    color:#94a3b8 !important;
    font-size:11px !important;
  }
  #product-grid.layout-list .desktop-stock-dot{
    width:7px !important;
    height:7px !important;
    border-radius:999px !important;
    background:#22c55e !important;
    box-shadow:0 0 0 3px rgba(34,197,94,.12) !important;
  }
  #product-grid.layout-list .desktop-stock-pill.tone-low .desktop-stock-dot{
    background:#a16207 !important;
    box-shadow:0 0 0 3px rgba(245,158,11,.14) !important;
  }
  #product-grid.layout-list .desktop-stock-pill.tone-out .desktop-stock-dot{
    background:#9ca3af !important;
    box-shadow:0 0 0 3px rgba(148,163,184,.14) !important;
  }
  #product-grid.layout-list .desktop-stock-pill.tone-out{
    color:#94a3b8 !important;
  }
  #product-grid.layout-list .list-price-col{
    justify-self:end !important;
    font-family:var(--mono) !important;
    font-size:15px !important;
    font-weight:800 !important;
    color:#111827 !important;
    white-space:nowrap !important;
  }
  #product-grid.layout-list .list-action-col{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
  }
  #product-grid.layout-list .desktop-action-chip{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:7px !important;
    min-width:116px !important;
    min-height:32px !important;
    padding:0 12px !important;
    border-radius:9px !important;
    background:#edf4ff !important;
    color:#1d4ed8 !important;
    font-size:10px !important;
    font-weight:800 !important;
    letter-spacing:.08em !important;
    text-transform:uppercase !important;
    white-space:nowrap !important;
  }
  #product-grid.layout-list .desktop-action-chip.added{
    background:#2563eb !important;
    color:#fff !important;
  }
  #product-grid.layout-list .desktop-action-chip.sold{
    background:#f3f4f6 !important;
    color:#9ca3af !important;
  }

  #product-grid.layout-large{
    grid-template-columns:repeat(auto-fill,minmax(228px,1fr)) !important;
    gap:14px !important;
    padding:14px 12px 88px !important;
  }
  #product-grid.layout-large .prod-card.card-pro{
    min-height:170px !important;
    padding:14px 14px 12px !important;
    border-radius:16px !important;
    border:1px solid #e4eaf4 !important;
    background:#fff !important;
    box-shadow:none !important;
    overflow:hidden !important;
    gap:0 !important;
  }
  #product-grid.layout-large .prod-card.card-pro:hover{
    transform:translateY(-2px) !important;
    border-color:#d3dff0 !important;
    box-shadow:0 14px 26px rgba(37,99,235,.07) !important;
  }
  #product-grid.layout-large .prod-card.card-pro .prod-qty-badge{
    display:none !important;
  }
  #product-grid.layout-large .desktop-card-head{
    display:flex !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    gap:12px !important;
    margin-bottom:16px !important;
  }
  #product-grid.layout-large .desktop-status-pill{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:21px !important;
    padding:0 8px !important;
    border-radius:999px !important;
    font-size:9px !important;
    letter-spacing:.1em !important;
    text-transform:uppercase !important;
    font-weight:800 !important;
  }
  #product-grid.layout-large .desktop-card-price{
    font-family:var(--mono) !important;
    color:#2563eb !important;
    font-size:16px !important;
    font-weight:800 !important;
    white-space:nowrap !important;
  }
  #product-grid.layout-large .card-pro .prod-name{
    font-size:15px !important;
    line-height:1.28 !important;
    min-height:42px !important;
    margin:0 0 8px !important;
    -webkit-line-clamp:2 !important;
  }
  #product-grid.layout-large .desktop-card-meta{
    display:flex !important;
    align-items:center !important;
    gap:6px !important;
    color:#7d8aa3 !important;
    font-family:var(--mono) !important;
    font-size:11px !important;
    line-height:1.3 !important;
  }
  #product-grid.layout-large .desktop-card-bottom{
    margin-top:auto !important;
    padding-top:18px !important;
    display:flex !important;
    align-items:flex-end !important;
    justify-content:space-between !important;
    gap:12px !important;
  }
  #product-grid.layout-large .desktop-card-caption{
    display:block !important;
    margin-bottom:4px !important;
    font-size:10px !important;
    text-transform:uppercase !important;
    letter-spacing:.08em !important;
    color:#64748b !important;
    font-weight:800 !important;
  }
  #product-grid.layout-large .desktop-card-stockblock strong{
    display:block !important;
    font-size:14px !important;
    color:#0f172a !important;
    font-weight:900 !important;
  }
  #product-grid.layout-large .desktop-card-cart-btn{
    width:36px !important;
    height:36px !important;
    border-radius:12px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    background:#dbeafe !important;
    color:#2563eb !important;
    box-shadow:inset 0 0 0 1px rgba(59,130,246,.08) !important;
  }
  #product-grid.layout-large .desktop-card-cart-btn.added{
    background:#2563eb !important;
    color:#fff !important;
  }
  #product-grid.layout-large .desktop-card-cart-btn.sold{
    background:#e5e7eb !important;
    color:#9ca3af !important;
  }
}


/* ===== Round 31 — desktop POS feedback and stock clarity ===== */
@media (min-width: 901px){
  .prod-card{
    transform:translateZ(0);
    transition:border-color .18s ease, box-shadow .18s ease, transform .16s ease, background-color .18s ease;
  }
  .prod-card:active{
    transform:scale(.992);
  }
  .prod-card.in-cart{
    border-color:rgba(37,99,235,.36) !important;
    box-shadow:0 14px 28px rgba(37,99,235,.10) !important;
  }
  .prod-card.just-added{
    animation:posAddedPulse .38s ease;
  }
  @keyframes posAddedPulse{
    0%{transform:translateY(0) scale(1); box-shadow:0 0 0 rgba(37,99,235,0)}
    45%{transform:translateY(-2px) scale(1.01); box-shadow:0 0 0 6px rgba(37,99,235,.10)}
    100%{transform:translateY(0) scale(1); box-shadow:0 14px 28px rgba(37,99,235,.10)}
  }

  #product-grid.layout-large .prod-card.card-pro{
    padding:16px 16px 14px !important;
  }
  #product-grid.layout-large .card-pro .prod-name,
  #product-grid.layout-list .prod-name{
    padding-right:8px;
    word-break:break-word;
    overflow-wrap:anywhere;
  }
  #product-grid.layout-large .desktop-card-meta,
  #product-grid.layout-list .prod-subline,
  #product-grid.layout-list .desktop-available-line{
    padding-right:8px;
  }
  #product-grid.layout-list .list-status-col{
    min-width:180px !important;
  }
  #product-grid.layout-list .desktop-stock-wrap{
    display:flex;
    flex-direction:column;
    gap:4px;
    min-width:0;
  }
  #product-grid.layout-list .desktop-available-line{
    display:block;
    color:#7b8aa5;
    font-size:10px;
    font-weight:700;
    letter-spacing:.02em;
    text-transform:uppercase;
    white-space:normal;
  }
  #product-grid.layout-list .desktop-stock-pill.tone-low{
    color:#8a4b00 !important;
  }
  #product-grid.layout-list .desktop-stock-pill.tone-low em,
  #product-grid.layout-list .desktop-stock-pill.tone-low strong{
    color:#8a4b00 !important;
  }
  #product-grid.layout-list .desktop-stock-pill.tone-out em,
  #product-grid.layout-list .desktop-stock-pill.tone-out strong{
    color:#94a3b8 !important;
  }
  #product-grid.layout-list .desktop-action-chip.added{
    background:linear-gradient(180deg,#2563eb,#1d4ed8) !important;
    box-shadow:0 8px 18px rgba(37,99,235,.18);
  }
  #product-grid.layout-large .desktop-status-pill.tone-low{
    background:#f59e0b !important;
    color:#fff !important;
  }
  #product-grid.layout-large .desktop-card-stockblock{
    display:flex;
    flex-direction:column;
    gap:3px;
    min-width:0;
  }
  #product-grid.layout-large .desktop-card-stockblock.tone-low strong,
  #product-grid.layout-large .desktop-card-stockblock.tone-low .desktop-card-inline-stock{
    color:#9a5b06 !important;
  }
  #product-grid.layout-large .desktop-card-stockblock.tone-out strong,
  #product-grid.layout-large .desktop-card-stockblock.tone-out .desktop-card-inline-stock{
    color:#94a3b8 !important;
  }
  #product-grid.layout-large .desktop-card-inline-stock{
    display:block;
    font-size:11px;
    font-weight:700;
    color:#64748b;
  }
  #product-grid.layout-large .desktop-card-cart-btn.added{
    box-shadow:0 8px 18px rgba(37,99,235,.22) !important;
  }
}

/* ===== Round 32 — desktop card overflow fix ===== */
@media (min-width: 901px){
  #product-grid.layout-large .prod-card.card-pro{
    min-height:212px !important;
    padding:16px 16px 18px !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
  }
  #product-grid.layout-large .card-pro .prod-name{
    min-height:48px !important;
    max-height:calc(1.28em * 2) !important;
    overflow:hidden !important;
  }
  #product-grid.layout-large .desktop-card-meta{
    margin-bottom:0 !important;
  }
  #product-grid.layout-large .desktop-card-bottom{
    margin-top:16px !important;
    padding-top:16px !important;
    align-items:center !important;
  }
  #product-grid.layout-large .desktop-card-stockblock{
    padding-right:8px !important;
  }
  #product-grid.layout-large .desktop-card-cart-btn{
    flex:0 0 38px !important;
    width:38px !important;
    height:38px !important;
    align-self:flex-end !important;
  }
}

body.mobile-cart-open #cart-fab,


/* Round 53 mobile POS simplification */
.mobile-card-size-btns{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}
.mobile-card-size-btns .layout-btn{
  min-width:34px;
  padding:8px 10px !important;
  font-size:13px;
  font-weight:800;
}
.mobile-card-size-btns .layout-btn span{display:block !important;}

.pos-product-drawer-icon{
  width:48px;
  height:48px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
}
.pos-product-drawer-icon.tone-ok{background:#10b981;}
.pos-product-drawer-icon.tone-low{background:#f59e0b;}
.pos-product-drawer-icon.tone-out{background:#ef4444;}
.pos-product-drawer-actions{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.pos-product-drawer-actions .btn{width:100%;justify-content:center;}

@media (max-width:900px){
  #product-grid.layout-mobile-2{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:10px !important;}
  #product-grid.layout-mobile-3{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:8px !important;}
  #product-grid.layout-mobile-4{grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:7px !important;}

  .prod-card.mobile-simple-card{
    position:relative;
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    min-height:108px !important;
    padding:10px !important;
    gap:8px !important;
    border-radius:16px !important;
    border:1px solid var(--border) !important;
    background:var(--card) !important;
    box-shadow:0 8px 18px rgba(15,23,42,.06) !important;
    text-align:left;
  }
  .prod-card.mobile-simple-card .prod-qty-badge{
    top:8px !important;
    right:8px !important;
    min-width:22px !important;
    height:22px !important;
    font-size:11px !important;
  }
  .mobile-stock-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:24px;
    padding:4px 8px;
    border-radius:999px;
    font-size:10px;
    font-weight:800;
    line-height:1.1;
    color:#fff;
    max-width:100%;
  }
  .mobile-stock-pill.tone-ok{background:#10b981;}
  .mobile-stock-pill.tone-low{background:#f59e0b;}
  .mobile-stock-pill.tone-out{background:#ef4444;}
  .mobile-simple-name{
    width:100%;
    font-size:14px;
    font-weight:800;
    line-height:1.25;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    word-break:break-word;
    min-height:34px;
  }
  .mobile-simple-price{
    font-size:16px;
    font-weight:900;
    line-height:1.1;
    color:var(--text);
  }

  #product-grid.layout-mobile-3 .prod-card.mobile-simple-card{
    min-height:94px !important;
    padding:8px !important;
    gap:6px !important;
    border-radius:14px !important;
  }
  #product-grid.layout-mobile-3 .mobile-stock-pill{padding:3px 6px;font-size:9px;min-height:21px;}
  #product-grid.layout-mobile-3 .mobile-simple-name{font-size:12px;min-height:30px;}
  #product-grid.layout-mobile-3 .mobile-simple-price{font-size:13px;}

  #product-grid.layout-mobile-4 .prod-card.mobile-simple-card{
    min-height:80px !important;
    padding:7px !important;
    gap:5px !important;
    border-radius:12px !important;
  }
  #product-grid.layout-mobile-4 .mobile-stock-pill{padding:2px 5px;font-size:8px;min-height:18px;}
  #product-grid.layout-mobile-4 .mobile-simple-name{font-size:11px;line-height:1.2;min-height:26px;}
  #product-grid.layout-mobile-4 .mobile-simple-price{font-size:12px;}

  .cart-items{padding:8px 10px 10px !important;}
  .cart-item{
    grid-template-columns:40px minmax(0,1fr) !important;
    gap:8px !important;
    padding:9px !important;
    border-radius:14px !important;
    margin-bottom:8px !important;
  }
  .cart-item-thumb{
    width:40px !important;
    height:40px !important;
    border-radius:12px !important;
  }
  .cart-item-body{gap:6px !important;}
  .cart-item-top{gap:6px !important;}
  .cart-item-name{
    font-size:13px !important;
    line-height:1.2 !important;
    min-height:0 !important;
  }
  .cart-item-price{
    margin-top:2px !important;
    font-size:11px !important;
  }
  .cart-item-total{
    font-size:13px !important;
    min-width:60px !important;
  }
  .cart-item-del{
    width:24px !important;
    height:24px !important;
  }
  .cart-item-controls{gap:8px !important;}
  .cart-qty{
    min-width:104px !important;
    padding:2px 3px !important;
    gap:4px !important;
  }
  .cart-qty .qty-btn{
    width:24px !important;
    height:24px !important;
  }
  .cart-qty .qty-input{
    width:42px !important;
    height:24px !important;
    font-size:11px !important;
  }
  .pos-product-drawer-actions{grid-template-columns:repeat(2,minmax(0,1fr));}
  .pos-product-drawer-actions .btn:last-child{grid-column:1 / -1;}
}


/* Round 53.1 mobile POS follow-up fixes */
.drawer-stock-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  line-height:1.15;
  color:#fff;
  white-space:nowrap;
}
.drawer-stock-chip.tone-ok{background:#10b981;}
.drawer-stock-chip.tone-low{background:#f59e0b;}
.drawer-stock-chip.tone-out{background:#ef4444;}
.pos-product-drawer-section-tight{margin-bottom:16px !important;}
.pos-product-drawer-editor{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:10px;
}
.pos-product-qty-wrap{
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 44px;
  gap:8px;
  align-items:center;
}
.pos-product-qty-btn{
  width:44px;
  height:44px;
  border:none;
  border-radius:14px;
  background:var(--light);
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:14px;
}
.pos-product-qty-btn:disabled{opacity:.5;cursor:not-allowed;}
.pos-product-qty-input{
  width:100%;
  height:44px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--card);
  color:var(--text);
  text-align:center;
  font-family:var(--mono);
  font-size:16px;
  font-weight:800;
}
.pos-product-add-btn{
  width:100%;
  justify-content:center;
  min-height:44px;
}
.pos-product-in-cart-note{
  margin-top:8px;
  font-size:12px;
  color:var(--muted);
}
.pos-product-in-cart-note strong{
  color:var(--text);
  font-family:var(--mono);
}
body.dark .drawer-stock-chip.tone-low{color:#1f2937;}
body.dark .prod-card.mobile-simple-card{
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02)) !important;
  border-color:rgba(255,255,255,.1) !important;
  box-shadow:none !important;
}
body.dark .prod-card.mobile-simple-card.in-cart{
  border-color:rgba(103,232,249,.6) !important;
  box-shadow:0 0 0 1px rgba(103,232,249,.28) !important;
}
body.dark .mobile-simple-name{color:#f8fafc !important;}
body.dark .mobile-simple-price{color:#67e8f9 !important;}
body.dark .mobile-stock-pill.tone-low{color:#1f2937;}

@media (max-width:900px){
  #detail-drawer{
    top:auto !important;
    right:0 !important;
    left:0 !important;
    bottom:0 !important;
    width:100% !important;
    max-width:100% !important;
    max-height:88dvh !important;
    border-radius:22px 22px 0 0 !important;
    box-shadow:0 -12px 38px rgba(15,23,42,.22) !important;
    transform:translateY(100%) !important;
  }
  #detail-drawer.open{transform:translateY(0) !important;}
  #detail-drawer .drawer-header{
    padding:14px 14px 10px !important;
    border-bottom:1px solid var(--border) !important;
  }
  #detail-drawer .drawer-header::before{
    content:'';
    display:block;
    width:42px;
    height:5px;
    border-radius:999px;
    background:var(--border2);
    margin:0 auto 12px;
  }
  #detail-drawer .drawer-header-top{margin-bottom:10px !important;}
  #detail-drawer .drawer-title{
    font-size:19px !important;
    line-height:1.2 !important;
    padding-right:8px;
  }
  #detail-drawer .drawer-subtitle:empty{display:none;}
  #detail-drawer .drawer-hero{
    padding:12px 14px !important;
    margin-top:0 !important;
    border-radius:16px !important;
    align-items:center !important;
  }
  #detail-drawer .drawer-main-val{
    font-size:24px !important;
    line-height:1.04 !important;
    color:var(--accent) !important;
  }
  #detail-drawer .drawer-sub-val{
    margin-top:6px !important;
    display:block !important;
    -webkit-line-clamp:unset !important;
    overflow:visible !important;
  }
  #detail-drawer .drawer-body{
    padding:14px 14px 18px !important;
  }

  #product-grid.layout-mobile-2{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:10px !important;}
  #product-grid.layout-mobile-3{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:8px !important;}
  #product-grid.layout-mobile-4{grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:7px !important;}

  .prod-card.mobile-simple-card{
    min-height:112px !important;
    padding:10px !important;
    gap:8px !important;
    justify-content:flex-start !important;
    align-items:stretch !important;
  }
  .mobile-simple-main{
    min-width:0;
    display:grid;
    gap:7px;
  }
  .mobile-simple-bottom{
    margin-top:auto;
    display:flex;
    align-items:flex-end;
    justify-content:flex-start;
  }
  .mobile-simple-name{
    width:100%;
    color:var(--text) !important;
  }
  .mobile-simple-price{
    font-family:var(--mono);
    font-size:16px;
    font-weight:900;
    line-height:1.05;
    color:var(--accent) !important;
    letter-spacing:-.02em;
  }
  .mobile-stock-pill{
    margin-top:0 !important;
    align-self:flex-start;
    font-size:10px;
    min-height:24px;
  }

  #product-grid.layout-mobile-3 .prod-card.mobile-simple-card{
    min-height:98px !important;
    padding:8px !important;
  }
  #product-grid.layout-mobile-3 .mobile-simple-main{gap:5px;}
  #product-grid.layout-mobile-3 .mobile-simple-name{font-size:12px !important;min-height:30px !important;}
  #product-grid.layout-mobile-3 .mobile-simple-price{font-size:13px !important;}
  #product-grid.layout-mobile-3 .mobile-stock-pill{font-size:9px !important;min-height:21px !important;}

  #product-grid.layout-mobile-4 .prod-card.mobile-simple-card{
    min-height:84px !important;
    padding:7px !important;
  }
  #product-grid.layout-mobile-4 .mobile-simple-main{gap:4px;}
  #product-grid.layout-mobile-4 .mobile-simple-name{font-size:11px !important;min-height:26px !important;}
  #product-grid.layout-mobile-4 .mobile-simple-price{font-size:11px !important;}
  #product-grid.layout-mobile-4 .mobile-stock-pill{font-size:8px !important;min-height:18px !important;padding:2px 5px !important;}

  .cart-items{
    padding:6px 10px 8px !important;
    min-height:0 !important;
  }
  .cart-item{
    grid-template-columns:36px minmax(0,1fr) !important;
    gap:8px !important;
    align-items:start !important;
    padding:8px 9px !important;
    border-radius:13px !important;
    margin-bottom:7px !important;
  }
  .cart-item-thumb{
    width:36px !important;
    height:36px !important;
    border-radius:10px !important;
  }
  .cart-item-body{
    gap:5px !important;
  }
  .cart-item-top{
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:6px !important;
    align-items:start !important;
  }
  .cart-item-info{min-width:0 !important;}
  .cart-item-name{
    font-size:12.5px !important;
    font-weight:800 !important;
    line-height:1.18 !important;
  }
  .cart-item-price{
    margin-top:2px !important;
    font-size:10px !important;
    line-height:1.2 !important;
  }
  .cart-item-side{
    display:flex !important;
    align-items:center !important;
    gap:6px !important;
  }
  .cart-item-total{
    min-width:56px !important;
    font-size:13px !important;
    line-height:1.1 !important;
  }
  .cart-item-del{
    width:22px !important;
    height:22px !important;
  }
  .cart-item-controls{
    gap:7px !important;
  }
  .cart-qty{
    min-width:96px !important;
    padding:2px !important;
    gap:4px !important;
  }
  .cart-qty .qty-btn{
    width:22px !important;
    height:22px !important;
    font-size:12px !important;
  }
  .cart-qty .qty-input{
    width:38px !important;
    height:22px !important;
    font-size:10px !important;
  }
}

@media (max-width:560px){
  .cart-item{
    grid-template-columns:34px minmax(0,1fr) !important;
    padding:7px 8px !important;
    gap:7px !important;
  }
  .cart-item-thumb{
    width:34px !important;
    height:34px !important;
  }
  .cart-item-name{font-size:12px !important;}
  .cart-item-total{font-size:12px !important;min-width:52px !important;}
  .cart-item-del{width:20px !important;height:20px !important;}
  .cart-qty{
    min-width:90px !important;
  }
  .cart-qty .qty-btn{
    width:20px !important;
    height:20px !important;
  }
  .cart-qty .qty-input{
    width:34px !important;
    height:20px !important;
    font-size:10px !important;
  }
}

/* Round 53 v3 targeted fixes */
.compact-mobile-drawer .drawer-section-no-title{margin-bottom:12px !important;}
.compact-mobile-drawer .pos-product-drawer-editor{gap:10px !important;align-items:center !important;}
.compact-mobile-drawer .drawer-section-title{margin-bottom:8px !important;}
.compact-mobile-drawer .drawer-row{padding-block:7px !important;}
.compact-mobile-drawer .pos-product-add-btn{min-height:44px !important;}
.compact-mobile-drawer .pos-product-in-cart-note{margin-top:8px !important;}


@media (max-width: 900px){
  .prod-card.mobile-simple-card{
    min-height:106px !important;
    padding:9px !important;
    justify-content:space-between !important;
    background:color-mix(in srgb, var(--card) 92%, var(--bg)) !important;
    border-color:var(--border2) !important;
  }
  .mobile-simple-main{gap:6px !important;}
  .mobile-simple-name{
    color:var(--text) !important;
    font-size:13px !important;
    line-height:1.22 !important;
    min-height:32px !important;
  }
  .mobile-simple-price{
    color:var(--accent) !important;
    font-size:15px !important;
    font-weight:900 !important;
    letter-spacing:-0.01em !important;
  }
  .mobile-simple-bottom{
    align-items:flex-end !important;
    justify-content:flex-start !important;
    margin-top:auto !important;
    padding-top:2px !important;
  }
  .mobile-stock-pill{
    margin-top:0 !important;
    font-size:10px !important;
    min-height:22px !important;
    align-self:flex-end !important;
  }
  #product-grid.layout-mobile-3 .prod-card.mobile-simple-card{min-height:92px !important;padding:8px !important;}
  #product-grid.layout-mobile-3 .mobile-simple-name{font-size:11.5px !important;min-height:28px !important;}
  #product-grid.layout-mobile-3 .mobile-simple-price{font-size:12.5px !important;}
  #product-grid.layout-mobile-4 .prod-card.mobile-simple-card{min-height:80px !important;padding:6px !important;}
  #product-grid.layout-mobile-4 .mobile-simple-name{font-size:10.5px !important;min-height:24px !important;}
  #product-grid.layout-mobile-4 .mobile-simple-price{font-size:11px !important;}

  .cart-items{padding:6px 10px 8px !important;}
  .cart-item{
    grid-template-columns:34px minmax(0,1fr) !important;
    gap:7px !important;
    padding:7px 8px !important;
    margin-bottom:6px !important;
    border-radius:12px !important;
  }
  .cart-item-thumb{width:34px !important;height:34px !important;border-radius:9px !important;}
  .cart-item-body{gap:4px !important;}
  .cart-item-top{gap:5px !important;align-items:start !important;}
  .cart-item-name{font-size:12px !important;line-height:1.15 !important;-webkit-line-clamp:2 !important;}
  .cart-item-price{font-size:10px !important;line-height:1.1 !important;margin-top:1px !important;}
  .cart-item-side{gap:5px !important;align-items:flex-start !important;}
  .cart-item-total{font-size:12px !important;min-width:50px !important;line-height:1.05 !important;}
  .cart-item-del{width:20px !important;height:20px !important;}
  .cart-item-controls{gap:6px !important;}
  .cart-qty{min-width:84px !important;padding:1px !important;gap:3px !important;}
  .cart-qty .qty-btn{width:20px !important;height:20px !important;font-size:11px !important;}
  .cart-qty .qty-input{width:32px !important;height:20px !important;font-size:10px !important;}
}

body.dark .prod-card.mobile-simple-card{
  background:color-mix(in srgb, var(--card) 96%, #0f172a) !important;
  border-color:rgba(148,163,184,.22) !important;
}
body.dark .prod-card.mobile-simple-card .mobile-simple-name{color:#f8fafc !important;}
body.dark .prod-card.mobile-simple-card .mobile-simple-price{color:#67e8f9 !important;}
body.dark .prod-card.mobile-simple-card .mobile-stock-pill.tone-low{color:#1f2937 !important;}
body.dark .prod-card.mobile-simple-card .mobile-stock-pill.tone-ok{box-shadow:0 0 0 1px rgba(255,255,255,.06) inset;}


/* Round 53 v4 fixes */
body.detail-drawer-open #cart-fab,
@media (max-width:900px){
  #drawer-overlay{z-index:10050 !important;}
  #detail-drawer{z-index:10060 !important;max-height:calc(100dvh - 56px) !important;}
  #detail-drawer .drawer-body{padding:12px 14px 14px !important;}
  .compact-mobile-drawer .pos-product-drawer-editor{gap:8px !important;align-items:center !important;}
  .compact-mobile-drawer .pos-product-qty-wrap{margin-bottom:0 !important;}
  .compact-mobile-drawer .pos-product-add-btn{min-height:42px !important;}
  .compact-mobile-drawer .pos-product-drawer-details{margin-top:6px !important;}
  .compact-mobile-drawer .drawer-row{padding-block:5px !important;}
  .compact-mobile-drawer .drawer-row-label,
  .compact-mobile-drawer .drawer-row-value{font-size:12px !important;line-height:1.2 !important;}

  .cart-items{padding:6px 10px 8px !important;}
  .cart-item{grid-template-columns:32px minmax(0,1fr) !important;gap:7px !important;padding:6px 8px !important;margin-bottom:6px !important;border-radius:11px !important;}
  .cart-item-thumb{width:32px !important;height:32px !important;border-radius:9px !important;}
  .cart-item-body{gap:3px !important;}
  .cart-item-top{gap:0 !important;}
  .cart-item-name{font-size:12px !important;line-height:1.1 !important;display:block !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
  .cart-item-price{font-size:10px !important;line-height:1.05 !important;margin-top:1px !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
  .cart-item-controls{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:6px !important;}
  .cart-item-side{display:inline-flex !important;align-items:center !important;gap:5px !important;flex-shrink:0 !important;}
  .cart-item-total{min-width:auto !important;font-size:12px !important;line-height:1 !important;}
  .cart-item-del{width:20px !important;height:20px !important;}
  .cart-qty{min-width:80px !important;padding:1px 2px !important;gap:3px !important;}
  .cart-qty .qty-btn{width:19px !important;height:19px !important;font-size:11px !important;}
  .cart-qty .qty-input{width:30px !important;height:19px !important;font-size:10px !important;}
}
@media (max-width:560px){
  .cart-item{grid-template-columns:30px minmax(0,1fr) !important;padding:6px 7px !important;gap:6px !important;}
  .cart-item-thumb{width:30px !important;height:30px !important;}
  .cart-item-total{font-size:11px !important;}
  .cart-qty{min-width:76px !important;}
  .cart-qty .qty-input{width:28px !important;}
}


/* Round 53 v5 fixes */
.modal-product{max-width:860px !important;}
body.detail-drawer-open #cart-fab,
@media (max-width:900px){
  body.detail-drawer-open #cart-fab{
    bottom:calc(84dvh + 10px) !important;
    right:14px !important;
    z-index:10070 !important;
    transform:scale(.94);
  }
  #detail-drawer .drawer-body{padding:10px 14px 14px !important;}
  .compact-mobile-drawer .pos-product-drawer-details{margin-top:2px !important;}
  .compact-mobile-drawer .drawer-row{padding-block:4px !important;}
  .compact-mobile-drawer .pos-product-add-btn{min-height:40px !important;}
  .cart-items{padding:5px 9px 7px !important;}
  .cart-item{grid-template-columns:30px minmax(0,1fr) !important;gap:6px !important;padding:5px 7px !important;margin-bottom:5px !important;border-radius:10px !important;}
  .cart-item-thumb{width:30px !important;height:30px !important;border-radius:8px !important;}
  .cart-item-body{gap:2px !important;}
  .cart-item-top{display:grid !important;grid-template-columns:minmax(0,1fr) auto !important;gap:4px !important;align-items:start !important;}
  .cart-item-name{font-size:11.5px !important;line-height:1.1 !important;display:-webkit-box !important;-webkit-line-clamp:2 !important;-webkit-box-orient:vertical !important;white-space:normal !important;overflow:hidden !important;text-overflow:ellipsis !important;}
  .cart-item-price{font-size:10px !important;line-height:1.08 !important;margin-top:0 !important;white-space:normal !important;overflow:hidden !important;text-overflow:ellipsis !important;}
  .cart-item-controls{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:5px !important;margin-top:1px !important;}
  .cart-item-side{display:inline-flex !important;align-items:center !important;gap:4px !important;flex-shrink:0 !important;}
  .cart-item-total{font-size:11px !important;line-height:1 !important;min-width:auto !important;}
  .cart-item-del{width:18px !important;height:18px !important;}
  .cart-qty{min-width:74px !important;padding:1px 2px !important;gap:2px !important;}
  .cart-qty .qty-btn{width:18px !important;height:18px !important;font-size:10px !important;}
  .cart-qty .qty-input{width:26px !important;height:18px !important;font-size:10px !important;padding:0 2px !important;}
}
@media (max-width:560px){
  body.detail-drawer-open #cart-fab{bottom:calc(82dvh + 8px) !important;}
  .cart-item{grid-template-columns:28px minmax(0,1fr) !important;padding:5px 6px !important;gap:5px !important;}
  .cart-item-thumb{width:28px !important;height:28px !important;}
  .cart-item-total{font-size:10.5px !important;}
  .cart-qty{min-width:70px !important;}
  .cart-qty .qty-input{width:24px !important;}
}


/* Round 53 v6 mobile POS fixes */
@media (max-width:900px){
  body.detail-drawer-open #cart-fab{
    bottom:calc(84dvh + 14px) !important;
  }
  .cart-items{padding:4px 8px 6px !important;}
  .cart-item{grid-template-columns:28px minmax(0,1fr) !important;gap:5px !important;padding:4px 6px !important;margin-bottom:4px !important;border-radius:10px !important;}
  .cart-item-thumb{width:28px !important;height:28px !important;border-radius:8px !important;}
  .cart-item-body{gap:1px !important;}
  .cart-item-top{gap:3px !important;align-items:center !important;}
  .cart-item-name{font-size:11px !important;line-height:1.08 !important;-webkit-line-clamp:2 !important;}
  .cart-item-price{font-size:9.5px !important;line-height:1.05 !important;margin-top:0 !important;}
  .cart-item-controls{gap:4px !important;margin-top:0 !important;}
  .cart-item-side{gap:3px !important;}
  .cart-item-total{font-size:10.5px !important;}
  .cart-item-del{width:18px !important;height:18px !important;}
  .cart-qty{min-width:68px !important;padding:1px !important;gap:2px !important;}
  .cart-qty .qty-btn{width:17px !important;height:17px !important;font-size:10px !important;}
  .cart-qty .qty-input{width:22px !important;height:17px !important;font-size:9.5px !important;padding:0 1px !important;}
}
@media (max-width:560px){
  .cart-item{grid-template-columns:26px minmax(0,1fr) !important;padding:4px 5px !important;gap:4px !important;}
  .cart-item-thumb{width:26px !important;height:26px !important;}
  .cart-item-total{font-size:10px !important;}
  .cart-qty{min-width:64px !important;}
  .cart-qty .qty-input{width:20px !important;}
}


.invoice-link-trigger{
  border:none;
  background:transparent;
  padding:0;
  color:var(--accent);
  cursor:pointer;
  font:inherit;
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:2px;
}
.invoice-link-trigger:hover{color:var(--accent2);}
.mobile-stock-pill.tone-service,
.drawer-stock-chip.tone-service,
.pos-product-drawer-icon.tone-service{
  background:rgba(8,145,178,.12) !important;
  color:var(--accent2) !important;
  border-color:rgba(8,145,178,.24) !important;
}
.service-price-wrap{width:100%;}
.service-price-wrap .pos-product-qty-input{width:100%;min-width:0;}
@media (max-width: 900px){
  .cart-qty{
    display:inline-flex !important;
    align-items:center !important;
    gap:6px !important;
    padding:2px 0 !important;
  }
  .cart-qty .qty-btn{
    width:28px !important;
    height:28px !important;
    font-size:14px !important;
    border-radius:9px !important;
  }
  .cart-qty .qty-input{
    min-width:52px !important;
    height:30px !important;
    font-size:13px !important;
    border-radius:9px !important;
    text-align:center !important;
  }
}
@media (max-width: 640px){
  .cart-item-controls{
    gap:8px !important;
    align-items:center !important;
  }
  .cart-qty .qty-btn{
    width:30px !important;
    height:30px !important;
    font-size:15px !important;
  }
  .cart-qty .qty-input{
    min-width:56px !important;
    height:32px !important;
    font-size:13px !important;
  }
}

.service-price-input-shell{
  display:grid;
  gap:6px;
  width:100%;
}
.service-price-input-label{
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}
.service-price-wrap .pos-product-qty-input{
  width:100%;
  min-width:0;
  height:54px !important;
  border-radius:16px !important;
  padding:0 16px !important;
  text-align:left !important;
  font-size:20px !important;
}

.cart-item-price{
  display:flex;
  flex-wrap:wrap;
  gap:4px 8px;
  align-items:center;
}
.cart-item-unit-price{
  font-weight:800;
  color:var(--accent2);
}
.cart-item-sku{
  font-family:var(--mono);
  color:var(--muted);
}
.cart-item-control{min-width:0;}
.cart-service-price-box{display:grid;gap:4px;}
.cart-service-price-label{
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}
.cart-service-price-input{
  width:100%;
  min-width:0;
  height:36px;
  padding:0 10px !important;
  border-radius:12px !important;
  border:1px solid var(--border) !important;
  background:var(--card) !important;
  color:var(--accent2) !important;
  text-align:right !important;
  font-size:14px !important;
  font-weight:800 !important;
}

@media (max-width: 900px){
  .compact-mobile-drawer .service-price-wrap .pos-product-qty-input{
    height:58px !important;
    font-size:21px !important;
    padding:0 18px !important;
  }

  .cart-items{padding:8px 10px 10px !important;}
  .cart-item{
    display:grid !important;
    grid-template-columns:38px minmax(0,1fr) !important;
    gap:10px !important;
    align-items:start !important;
    padding:8px 10px !important;
    margin-bottom:8px !important;
    border-radius:14px !important;
  }
  .cart-item-thumb{
    width:38px !important;
    height:38px !important;
    border-radius:11px !important;
  }
  .cart-item-body{
    min-width:0 !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 118px !important;
    gap:10px !important;
    align-items:start !important;
  }
  .cart-item-info{
    min-width:0 !important;
    display:flex !important;
    flex-direction:column !important;
    gap:3px !important;
  }
  .cart-item-name{
    font-size:12.5px !important;
    line-height:1.18 !important;
    display:-webkit-box !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
    white-space:normal !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  .cart-item-price{
    margin-top:0 !important;
    font-size:10.5px !important;
    line-height:1.15 !important;
    gap:3px 6px !important;
  }
  .cart-item-unit-price{font-size:10.5px !important;}
  .cart-item-sku{font-size:9.5px !important;}
  .cart-item-side{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-areas:'control del' 'total del' !important;
    gap:6px 6px !important;
    align-items:start !important;
    min-width:0 !important;
  }
  .cart-item-del{
    grid-area:del !important;
    width:24px !important;
    height:24px !important;
    border-radius:999px !important;
    align-self:start !important;
    justify-self:end !important;
    background:transparent !important;
  }
  .cart-item-control{grid-area:control !important;}
  .cart-item-total{
    grid-area:total !important;
    min-width:0 !important;
    text-align:left !important;
    font-size:12px !important;
    line-height:1.1 !important;
    font-weight:900 !important;
  }
  .cart-qty{
    width:100% !important;
    min-width:0 !important;
    display:grid !important;
    grid-template-columns:32px minmax(0,1fr) 32px !important;
    align-items:center !important;
    gap:4px !important;
    padding:3px !important;
    background:var(--light) !important;
    border:1px solid var(--border) !important;
    border-radius:12px !important;
  }
  .cart-qty .qty-btn{
    width:32px !important;
    height:32px !important;
    font-size:15px !important;
    border-radius:10px !important;
  }
  .cart-qty .qty-input{
    width:100% !important;
    min-width:0 !important;
    height:32px !important;
    padding:0 4px !important;
    border:none !important;
    background:transparent !important;
    font-size:13px !important;
    text-align:center !important;
  }
  .cart-service-price-label{font-size:9px !important;}
  .cart-service-price-input{
    height:34px !important;
    font-size:13px !important;
    border-radius:12px !important;
  }
}

@media (max-width: 480px){
  .cart-item-body{grid-template-columns:minmax(0,1fr) 110px !important;gap:8px !important;}
  .cart-item{padding:7px 9px !important;gap:8px !important;}
  .cart-item-thumb{width:34px !important;height:34px !important;border-radius:10px !important;}
  .cart-item-name{font-size:12px !important;}
  .cart-item-price{font-size:10px !important;}
  .cart-item-unit-price{font-size:10px !important;}
  .cart-item-sku{font-size:9px !important;}
  .cart-item-total{font-size:11.5px !important;}
  .cart-qty{grid-template-columns:30px minmax(0,1fr) 30px !important;}
  .cart-qty .qty-btn{width:30px !important;height:30px !important;}
  .cart-qty .qty-input{height:30px !important;font-size:12.5px !important;}
}

/* Round 53 v16 mobile POS/cart polish */
.pos-layout-btns .layout-visual-btn{
  width:42px !important;
  height:42px !important;
  padding:0 !important;
}
.layout-visual{
  width:20px;
  height:20px;
  display:grid;
  gap:2px;
}
.layout-visual i{
  display:block;
  border-radius:2px;
  background:currentColor;
  opacity:.9;
}
.layout-visual.cols-2{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr)}
.layout-visual.cols-3{grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,1fr)}
.layout-visual.cols-4{grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(2,1fr)}
.layout-visual-btn span{display:block}

.service-price-input-shell{width:100% !important}
.service-price-wrap{
  display:block !important;
  width:100% !important;
}
.service-price-wrap .pos-product-qty-input,
.pos-service-price-input{
  width:100% !important;
  min-width:0 !important;
}

.cart-service-price-prefix{
  font-size:12px;
  font-weight:800;
  color:var(--muted);
  letter-spacing:.03em;
}

@media (max-width: 900px){
  .compact-mobile-drawer .service-price-input-shell{
    width:100% !important;
    gap:8px !important;
  }
  .compact-mobile-drawer .service-price-wrap{
    width:100% !important;
    display:block !important;
  }
  .compact-mobile-drawer .service-price-wrap .pos-product-qty-input,
  .compact-mobile-drawer .pos-service-price-input{
    height:64px !important;
    font-size:24px !important;
    padding:0 18px !important;
    border-radius:18px !important;
    width:100% !important;
  }

  .cart-items{padding:8px 10px 10px !important;}
  .cart-item{
    display:grid !important;
    grid-template-columns:42px minmax(0,1fr) 124px !important;
    gap:10px !important;
    align-items:start !important;
    padding:10px !important;
    margin-bottom:8px !important;
    border-radius:14px !important;
  }
  .cart-item-thumb{
    width:42px !important;
    height:42px !important;
    border-radius:12px !important;
  }
  .cart-item-info{
    min-width:0 !important;
    display:flex !important;
    flex-direction:column !important;
    gap:3px !important;
    padding-top:1px !important;
  }
  .cart-item-name{
    font-size:13px !important;
    line-height:1.18 !important;
    font-weight:800 !important;
    display:-webkit-box !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
    overflow:hidden !important;
  }
  .cart-item-price{
    display:block !important;
    margin-top:0 !important;
    font-size:10.5px !important;
    line-height:1.15 !important;
  }
  .cart-item-unit-price{
    display:block !important;
    font-size:10.5px !important;
    font-weight:800 !important;
    color:var(--accent2) !important;
  }
  .cart-item-sku{
    display:block !important;
    margin-top:1px !important;
    font-size:9.5px !important;
    line-height:1.1 !important;
    color:var(--muted) !important;
    font-family:var(--mono) !important;
  }
  .cart-item-side{
    min-width:0 !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 24px !important;
    grid-template-areas:'control del' 'total del' !important;
    gap:6px 6px !important;
    align-items:start !important;
  }
  .cart-item-control{grid-area:control !important;min-width:0 !important;}
  .cart-item-del{
    grid-area:del !important;
    width:24px !important;
    height:24px !important;
    border-radius:999px !important;
    justify-self:end !important;
    align-self:start !important;
    background:transparent !important;
  }
  .cart-item-total{
    grid-area:total !important;
    min-width:0 !important;
    justify-self:end !important;
    text-align:right !important;
    font-size:12px !important;
    line-height:1.1 !important;
    font-weight:900 !important;
  }
  .cart-qty{
    width:100% !important;
    min-width:0 !important;
    display:grid !important;
    grid-template-columns:34px minmax(0,1fr) 34px !important;
    gap:4px !important;
    align-items:center !important;
    padding:3px !important;
    border-radius:12px !important;
    border:1px solid var(--border) !important;
    background:var(--light) !important;
  }
  .cart-qty .qty-btn{
    width:34px !important;
    height:34px !important;
    border-radius:10px !important;
    font-size:16px !important;
    font-weight:800 !important;
  }
  .cart-qty .qty-input{
    width:100% !important;
    min-width:0 !important;
    height:34px !important;
    padding:0 4px !important;
    border:none !important;
    background:transparent !important;
    text-align:center !important;
    font-size:13px !important;
    font-weight:800 !important;
  }
  .cart-service-price-box{
    display:grid !important;
    grid-template-columns:28px minmax(0,1fr) !important;
    align-items:center !important;
    gap:6px !important;
    min-height:40px !important;
    padding:0 10px !important;
    border-radius:12px !important;
    border:1px solid var(--border) !important;
    background:var(--light) !important;
  }
  .cart-service-price-input{
    width:100% !important;
    min-width:0 !important;
    height:38px !important;
    padding:0 !important;
    border:none !important;
    background:transparent !important;
    text-align:right !important;
    font-size:14px !important;
    font-weight:800 !important;
    color:var(--accent2) !important;
  }
}

@media (max-width: 480px){
  .cart-item{
    grid-template-columns:38px minmax(0,1fr) 114px !important;
    gap:8px !important;
    padding:8px !important;
  }
  .cart-item-thumb{width:38px !important;height:38px !important;border-radius:11px !important;}
  .cart-item-name{font-size:12.5px !important;}
  .cart-item-unit-price{font-size:10px !important;}
  .cart-item-sku{font-size:9px !important;}
  .cart-item-total{font-size:11.5px !important;}
  .cart-qty{grid-template-columns:32px minmax(0,1fr) 32px !important;}
  .cart-qty .qty-btn{width:32px !important;height:32px !important;}
  .cart-qty .qty-input{height:32px !important;font-size:12.5px !important;}
}

/* Round 53 v17 visibility + cart control sizing */
.pos-layout-btns .layout-visual-btn{
  width:48px !important;
  height:44px !important;
  padding:0 !important;
  border-radius:12px !important;
  background:var(--card) !important;
  border:1px solid var(--border2) !important;
  color:var(--muted) !important;
}
.pos-layout-btns .layout-visual-btn:hover{
  color:var(--accent) !important;
  border-color:rgba(8,145,178,.35) !important;
}
.pos-layout-btns .layout-visual-btn.active{
  color:var(--accent) !important;
  background:var(--accent-glow) !important;
  border-color:rgba(8,145,178,.55) !important;
  box-shadow:0 0 0 1px rgba(8,145,178,.08), 0 6px 16px rgba(8,145,178,.12) !important;
}
.layout-visual{
  width:24px !important;
  height:18px !important;
  display:grid !important;
  gap:3px !important;
}
.layout-visual i{
  display:block !important;
  min-width:0 !important;
  min-height:0 !important;
  border-radius:3px !important;
  box-shadow:inset 0 0 0 1.6px currentColor !important;
  background:currentColor !important;
  opacity:.24 !important;
}
.pos-layout-btns .layout-visual-btn.active .layout-visual i{opacity:.42 !important;}

@media (max-width: 900px){
  .cart-item{
    grid-template-columns:42px minmax(0,1fr) 142px !important;
    gap:10px !important;
  }
  .cart-item-side{
    grid-template-columns:minmax(0,1fr) 26px !important;
    gap:7px 7px !important;
  }
  .cart-item-del{
    width:26px !important;
    height:26px !important;
  }
  .cart-qty{
    grid-template-columns:38px minmax(60px,1fr) 38px !important;
    min-height:42px !important;
    padding:3px 4px !important;
    gap:5px !important;
  }
  .cart-qty .qty-btn{
    width:38px !important;
    height:36px !important;
    font-size:17px !important;
  }
  .cart-qty .qty-input{
    min-width:60px !important;
    height:36px !important;
    font-size:13.5px !important;
    padding:0 6px !important;
  }
  .cart-service-price-box{
    grid-template-columns:30px minmax(76px,1fr) !important;
    min-height:42px !important;
    padding:0 12px !important;
    gap:7px !important;
  }
  .cart-service-price-input{
    min-width:76px !important;
    height:40px !important;
    font-size:15px !important;
    padding:0 2px !important;
  }
}

@media (max-width: 480px){
  .cart-item{
    grid-template-columns:38px minmax(0,1fr) 132px !important;
    gap:8px !important;
  }
  .cart-qty{
    grid-template-columns:36px minmax(54px,1fr) 36px !important;
    min-height:40px !important;
  }
  .cart-qty .qty-btn{
    width:36px !important;
    height:34px !important;
  }
  .cart-qty .qty-input{
    min-width:54px !important;
    height:34px !important;
    font-size:13px !important;
  }
  .cart-service-price-box{
    grid-template-columns:28px minmax(68px,1fr) !important;
    min-height:40px !important;
  }
  .cart-service-price-input{
    min-width:68px !important;
    height:38px !important;
    font-size:14.5px !important;
  }
}


/* Round 53 v18 final mobile cart + visual buttons */
.pos-layout-btns .layout-visual-btn{display:inline-flex !important;align-items:center !important;justify-content:center !important;}
.layout-visual{display:flex !important;align-items:center !important;justify-content:center !important;width:24px !important;height:18px !important;}
.layout-visual-svg{display:block !important;width:24px !important;height:18px !important;overflow:visible;}
.layout-visual-svg rect{fill:currentColor !important;fill-opacity:.22 !important;stroke:currentColor !important;stroke-width:1.35 !important;}
.pos-layout-btns .layout-visual-btn.active .layout-visual-svg rect{fill-opacity:.42 !important;}

@media (max-width: 900px){
  .compact-mobile-drawer .service-price-wrap,
  .compact-mobile-drawer .service-price-input-shell{width:100% !important;}
  .compact-mobile-drawer .service-price-wrap .pos-product-qty-input,
  .compact-mobile-drawer .pos-service-price-input{
    width:100% !important;
    min-width:100% !important;
    height:68px !important;
    font-size:26px !important;
    padding:0 20px !important;
    border-radius:18px !important;
  }

  .cart-item{
    grid-template-columns:42px minmax(0,1fr) 152px !important;
    align-items:start !important;
  }
  .cart-item-side{
    position:relative !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    gap:7px !important;
    padding-right:30px !important;
    min-width:0 !important;
  }
  .cart-item-control{width:100% !important;align-self:stretch !important;}
  .cart-item-del{
    position:absolute !important;
    top:2px !important;
    right:0 !important;
    width:26px !important;
    height:26px !important;
  }
  .cart-item-total{
    width:100% !important;
    padding-right:2px !important;
    text-align:right !important;
  }
  .cart-qty{
    width:100% !important;
    grid-template-columns:38px minmax(74px,1fr) 38px !important;
    min-height:42px !important;
    align-items:center !important;
  }
  .cart-qty .qty-btn{width:38px !important;height:36px !important;}
  .cart-qty .qty-input{
    min-width:74px !important;
    width:100% !important;
    height:36px !important;
    padding:0 8px !important;
  }
  .cart-service-price-box{
    width:100% !important;
    display:grid !important;
    grid-template-columns:30px minmax(92px,1fr) !important;
    align-items:center !important;
    min-height:42px !important;
  }
  .cart-service-price-input{
    min-width:92px !important;
    width:100% !important;
    height:40px !important;
    padding:0 4px !important;
  }
}

@media (max-width: 480px){
  .cart-item{grid-template-columns:38px minmax(0,1fr) 142px !important;}
  .cart-item-side{padding-right:28px !important;}
  .cart-qty{grid-template-columns:36px minmax(66px,1fr) 36px !important;min-height:40px !important;}
  .cart-qty .qty-input{min-width:66px !important;height:34px !important;}
  .cart-service-price-box{grid-template-columns:28px minmax(82px,1fr) !important;min-height:40px !important;}
  .cart-service-price-input{min-width:82px !important;height:38px !important;}
}


/* Round 53 v19 drawer/error/search/cart/mobile polish */
.toast{box-shadow:0 14px 36px rgba(15,23,42,.22) !important;}
/* v61 — toasts must always sit above every modal overlay (max elevated = 10200) */
#toast-container{z-index:10400 !important;}


.pos-layout-btns .layout-visual-btn{display:inline-flex !important;align-items:center !important;justify-content:center !important;}
.layout-visual-grid{
  width:24px !important;
  height:18px !important;
  display:grid !important;
  gap:3px !important;
}
.layout-visual-grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr)) !important;grid-template-rows:repeat(2,minmax(0,1fr)) !important;}
.layout-visual-grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr)) !important;grid-template-rows:repeat(2,minmax(0,1fr)) !important;}
.layout-visual-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr)) !important;grid-template-rows:repeat(2,minmax(0,1fr)) !important;}
.layout-visual-grid span{
  display:block !important;
  min-width:0 !important;
  min-height:0 !important;
  border-radius:3px !important;
  background:currentColor !important;
  opacity:.30 !important;
  box-shadow:inset 0 0 0 1.2px currentColor !important;
}
.pos-layout-btns .layout-visual-btn.active .layout-visual-grid span{opacity:.56 !important;}

@media (max-width: 900px){
  .compact-mobile-drawer .service-price-wrap,
  .compact-mobile-drawer .service-price-input-shell{width:100% !important;display:block !important;}
  .compact-mobile-drawer .service-price-wrap .pos-product-qty-input,
  .compact-mobile-drawer .pos-service-price-input{
    width:100% !important;
    min-width:100% !important;
    height:72px !important;
    font-size:28px !important;
    font-weight:800 !important;
    padding:0 22px !important;
    border-radius:20px !important;
  }

  .cart-item{grid-template-columns:42px minmax(0,1fr) 152px !important;align-items:center !important;}
  .cart-item-info{justify-content:center !important;min-height:44px !important;}
  .cart-item-side{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 28px !important;
    grid-template-areas:'control del' 'total del' !important;
    gap:7px 8px !important;
    align-items:center !important;
    min-width:0 !important;
    padding-right:0 !important;
    position:static !important;
  }
  .cart-item-control{grid-area:control !important;width:100% !important;align-self:center !important;}
  .cart-item-del{
    grid-area:del !important;
    position:static !important;
    width:26px !important;
    height:26px !important;
    align-self:start !important;
    justify-self:end !important;
  }
  .cart-item-total{
    grid-area:total !important;
    width:100% !important;
    min-width:0 !important;
    text-align:right !important;
    justify-self:end !important;
    padding-right:2px !important;
  }
  .cart-qty{
    width:100% !important;
    grid-template-columns:40px minmax(78px,1fr) 40px !important;
    min-height:44px !important;
    padding:4px !important;
    gap:5px !important;
    border-radius:13px !important;
    align-items:center !important;
  }
  .cart-qty .qty-btn{
    width:40px !important;
    height:36px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    font-size:18px !important;
    line-height:1 !important;
  }
  .cart-qty .qty-input{
    width:100% !important;
    min-width:78px !important;
    height:36px !important;
    padding:0 8px !important;
    display:block !important;
    text-align:center !important;
    font-size:14px !important;
    font-weight:800 !important;
    line-height:36px !important;
  }
  .cart-service-price-box{
    width:100% !important;
    display:grid !important;
    grid-template-columns:32px minmax(96px,1fr) !important;
    align-items:center !important;
    min-height:44px !important;
    padding:0 12px !important;
    gap:8px !important;
    border-radius:13px !important;
  }
  .cart-service-price-prefix{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    align-self:center !important;
    height:100% !important;
    font-size:12px !important;
    line-height:1 !important;
  }
  .cart-service-price-input{
    width:100% !important;
    min-width:96px !important;
    height:40px !important;
    padding:0 4px !important;
    display:block !important;
    text-align:right !important;
    font-size:16px !important;
    font-weight:800 !important;
    line-height:40px !important;
  }
}
@media (max-width: 480px){
  .cart-item{grid-template-columns:38px minmax(0,1fr) 144px !important;}
  .cart-qty{grid-template-columns:38px minmax(70px,1fr) 38px !important;min-height:42px !important;}
  .cart-qty .qty-btn{width:38px !important;height:34px !important;}
  .cart-qty .qty-input{min-width:70px !important;height:34px !important;line-height:34px !important;}
  .cart-service-price-box{grid-template-columns:30px minmax(88px,1fr) !important;min-height:42px !important;}
  .cart-service-price-input{min-width:88px !important;height:38px !important;line-height:38px !important;}
}

/* Round 53 v20 latest-mobile-controls */
.layout-visual,
.layout-visual-svg{display:block !important; width:24px !important; height:18px !important;}
.layout-visual-svg rect{
  fill:currentColor !important;
  fill-opacity:.22 !important;
  stroke:currentColor !important;
  stroke-width:1.25 !important;
}
.pos-layout-btns .layout-visual-btn.active .layout-visual-svg rect{fill-opacity:.5 !important;}

@media (max-width: 900px){
  .pos-layout-btns{
    flex:1 1 auto !important;
    gap:6px !important;
    padding:3px !important;
    border-radius:14px !important;
  }
  .pos-layout-btns .layout-visual-btn{
    width:42px !important;
    min-width:42px !important;
    height:38px !important;
    border-radius:11px !important;
  }
  .pos-cat-bar{
    padding:8px 10px 7px !important;
    gap:6px !important;
  }
  .pos-cat-btn{
    min-height:36px !important;
    padding:0 11px !important;
    gap:6px !important;
    font-size:12px !important;
    border-radius:999px !important;
  }
  .pos-cat-btn i{font-size:11px !important;}
  .pos-cat-btn .cat-count{font-size:9px !important; padding:0 5px !important;}
  .pos-toolbar.is-searching + .pos-cat-bar.is-searching{display:none !important;}
  #product-grid{padding-top:8px !important;}

  .cart-item{
    grid-template-columns:38px minmax(0,1fr) 148px !important;
    align-items:center !important;
    gap:8px !important;
  }
  .cart-item-thumb{
    width:38px !important;
    height:38px !important;
    border-radius:11px !important;
  }
  .cart-item-body,
  .cart-item-info{min-height:0 !important;}
  .cart-item-info{justify-content:flex-start !important; gap:2px !important;}
  .cart-item-name{font-size:12.5px !important; line-height:1.16 !important;}
  .cart-item-price{font-size:10.5px !important; line-height:1.12 !important; gap:2px 6px !important;}
  .cart-item-side{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 24px !important;
    grid-template-areas:'control del' 'total del' !important;
    align-items:center !important;
    gap:6px 6px !important;
  }
  .cart-item-control{grid-area:control !important; width:100% !important;}
  .cart-item-del{
    grid-area:del !important;
    width:24px !important;
    height:24px !important;
    align-self:start !important;
    justify-self:end !important;
  }
  .cart-item-total{
    grid-area:total !important;
    justify-self:end !important;
    text-align:right !important;
    font-size:12px !important;
    line-height:1.05 !important;
    min-width:0 !important;
  }
  .cart-qty{
    width:100% !important;
    display:grid !important;
    grid-template-columns:34px minmax(84px,1fr) 34px !important;
    min-height:40px !important;
    padding:3px !important;
    gap:4px !important;
    border-radius:12px !important;
    align-items:center !important;
  }
  .cart-qty .qty-btn{
    width:34px !important;
    height:34px !important;
    border-radius:10px !important;
    font-size:16px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    line-height:1 !important;
  }
  .cart-qty .qty-input{
    width:100% !important;
    min-width:84px !important;
    height:34px !important;
    padding:0 8px !important;
    border:none !important;
    background:transparent !important;
    text-align:center !important;
    font-size:13px !important;
    font-weight:800 !important;
    line-height:normal !important;
  }
  .cart-service-price-box{
    width:100% !important;
    display:grid !important;
    grid-template-columns:30px minmax(98px,1fr) !important;
    align-items:center !important;
    min-height:40px !important;
    gap:6px !important;
    padding:0 10px !important;
    border-radius:12px !important;
    background:var(--light) !important;
    border:1px solid var(--border) !important;
  }
  .cart-service-price-prefix{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    font-size:12px !important;
    font-weight:800 !important;
    line-height:1 !important;
    height:34px !important;
  }
  .cart-service-price-input{
    width:100% !important;
    min-width:98px !important;
    height:34px !important;
    padding:0 6px !important;
    border:none !important;
    background:transparent !important;
    text-align:center !important;
    font-size:15px !important;
    font-weight:800 !important;
    line-height:normal !important;
    color:var(--accent2) !important;
  }

  .compact-mobile-drawer .service-price-wrap .pos-product-qty-input,
  .compact-mobile-drawer .pos-service-price-input{
    height:76px !important;
    font-size:30px !important;
    padding:0 24px !important;
    border-radius:22px !important;
  }
}

@media (max-width: 480px){
  .pos-layout-btns .layout-visual-btn{width:40px !important; min-width:40px !important; height:36px !important;}
  .pos-cat-bar{padding:7px 8px 6px !important;}
  .pos-cat-btn{min-height:34px !important;padding:0 10px !important;font-size:11.5px !important;}
  .cart-item{grid-template-columns:36px minmax(0,1fr) 142px !important; gap:7px !important;}
  .cart-item-thumb{width:36px !important;height:36px !important;}
  .cart-qty{grid-template-columns:32px minmax(78px,1fr) 32px !important; min-height:38px !important;}
  .cart-qty .qty-btn{width:32px !important;height:32px !important;}
  .cart-qty .qty-input{min-width:78px !important;height:32px !important;font-size:12.5px !important;}
  .cart-service-price-box{grid-template-columns:28px minmax(90px,1fr) !important; min-height:38px !important;}
  .cart-service-price-input{min-width:90px !important;height:32px !important;font-size:14px !important;}
}


/* Round 53 v21 mobile POS/cart corrections */
.layout-visual.layout-visual-grid{
  display:grid !important;
  align-items:stretch !important;
  justify-items:stretch !important;
  width:24px !important;
  height:18px !important;
  gap:3px !important;
}
.layout-visual.layout-visual-grid span{
  display:block !important;
  border-radius:2.5px !important;
  background:rgba(100,116,139,.24) !important;
  box-shadow:inset 0 0 0 1.4px rgba(100,116,139,.8) !important;
}
.pos-layout-btns .layout-visual-btn.active .layout-visual.layout-visual-grid span{
  background:rgba(8,145,178,.22) !important;
  box-shadow:inset 0 0 0 1.5px rgba(8,145,178,.95) !important;
}
.pos-layout-btns .layout-visual-btn{color:#64748b !important;}
.pos-layout-btns .layout-visual-btn.active{color:var(--accent2) !important;}

@media (max-width: 900px){
  .pos-layout-btns{
    flex:0 0 auto !important;
    padding:4px !important;
    gap:4px !important;
    background:var(--card) !important;
    border:1px solid var(--border) !important;
    border-radius:14px !important;
    box-shadow:var(--shadow-sm) !important;
  }
  .pos-layout-btns .layout-visual-btn{
    width:38px !important;
    min-width:38px !important;
    height:36px !important;
    border-radius:10px !important;
  }
  .pos-cat-bar{
    position:sticky !important;
    top:70px !important;
    z-index:19 !important;
    padding:8px 10px 6px !important;
    margin-top:0 !important;
    background:var(--bg) !important;
  }
  .pos-toolbar.is-searching + .pos-cat-bar.is-searching{display:flex !important;}

  .cart-item{
    grid-template-columns:38px minmax(0,1fr) 132px !important;
    align-items:start !important;
    gap:10px !important;
  }
  .cart-item-side{
    display:grid !important;
    grid-template-rows:auto auto !important;
    grid-template-columns:1fr !important;
    gap:6px !important;
    align-items:start !important;
    justify-items:stretch !important;
    min-width:0 !important;
  }
  .cart-item-side-top{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 24px !important;
    gap:6px !important;
    align-items:center !important;
  }
  .cart-item-total{
    text-align:left !important;
    line-height:1.1 !important;
    align-self:center !important;
  }
  .cart-item-del{
    justify-self:end !important;
    align-self:center !important;
    width:24px !important;
    height:24px !important;
  }
  .cart-item-control{width:100% !important; min-width:0 !important;}
  .cart-qty{
    width:100% !important;
    grid-template-columns:34px minmax(78px,1fr) 34px !important;
    min-height:40px !important;
    align-items:center !important;
  }
  .cart-qty .qty-btn{
    width:34px !important;
    height:34px !important;
    align-self:center !important;
  }
  .cart-qty .qty-input{
    min-width:78px !important;
    width:100% !important;
    height:34px !important;
    line-height:34px !important;
    align-self:center !important;
  }
  .cart-service-price-box{
    display:grid !important;
    grid-template-columns:32px minmax(92px,1fr) !important;
    align-items:center !important;
    gap:6px !important;
    width:100% !important;
    min-height:40px !important;
    padding:3px 8px !important;
    background:var(--light) !important;
    border:1px solid var(--border) !important;
    border-radius:12px !important;
  }
  .cart-service-price-prefix{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:34px !important;
    font-size:12px !important;
    font-weight:800 !important;
    color:var(--muted) !important;
  }
  .cart-service-price-input{
    min-width:92px !important;
    width:100% !important;
    height:34px !important;
    line-height:34px !important;
    text-align:right !important;
    padding:0 10px !important;
    border-radius:10px !important;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
    align-self:center !important;
  }
}

@media (max-width: 480px){
  .pos-layout-btns .layout-visual-btn{width:36px !important; min-width:36px !important; height:34px !important;}
  .pos-cat-bar{top:68px !important; padding:7px 8px 6px !important;}
  .cart-item{grid-template-columns:36px minmax(0,1fr) 126px !important; gap:8px !important;}
  .cart-item-side-top{grid-template-columns:minmax(0,1fr) 22px !important;}
  .cart-item-del{width:22px !important; height:22px !important;}
  .cart-qty{grid-template-columns:32px minmax(72px,1fr) 32px !important; min-height:38px !important;}
  .cart-qty .qty-btn{width:32px !important; height:32px !important;}
  .cart-qty .qty-input{min-width:72px !important; height:32px !important; line-height:32px !important;}
  .cart-service-price-box{grid-template-columns:28px minmax(86px,1fr) !important; min-height:38px !important;}
  .cart-service-price-input{min-width:86px !important; height:32px !important; line-height:32px !important; font-size:13px !important;}
}

/* Round 53 v22 final mobile POS/cart fixes */
.pos-layout-btns .layout-visual-icon{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:24px !important;
  height:18px !important;
}
.pos-layout-btns .layout-visual-icon .layout-visual-svg{
  display:block !important;
  width:24px !important;
  height:18px !important;
  overflow:visible !important;
}
.pos-layout-btns .layout-visual-icon .layout-visual-svg rect{
  fill:rgba(100,116,139,.26) !important;
  stroke:rgba(100,116,139,.94) !important;
  stroke-width:1.15 !important;
}
.pos-layout-btns .layout-visual-btn.active .layout-visual-icon .layout-visual-svg rect{
  fill:rgba(8,145,178,.28) !important;
  stroke:rgba(8,145,178,.98) !important;
}

@media (max-width: 900px){
  .pos-layout-btns{
    display:flex !important;
    align-items:center !important;
    gap:4px !important;
    padding:4px !important;
    border-radius:14px !important;
    background:var(--card) !important;
    border:1px solid var(--border) !important;
    box-shadow:var(--shadow-sm) !important;
  }
  .pos-layout-btns .layout-visual-btn{
    width:40px !important;
    min-width:40px !important;
    height:36px !important;
    border-radius:10px !important;
  }
  .pos-toolbar.is-searching + .pos-cat-bar.is-searching{display:none !important;}

  .cart-item{
    display:grid !important;
    grid-template-columns:40px minmax(0,1fr) 136px !important;
    gap:10px !important;
    align-items:start !important;
    padding:12px 11px !important;
  }
  .cart-item-thumb{
    width:40px !important;
    height:40px !important;
    align-self:start !important;
  }
  .cart-item-info{
    min-width:0 !important;
    padding-top:1px !important;
  }
  .cart-item-name{
    font-size:14px !important;
    line-height:1.22 !important;
    margin-bottom:4px !important;
  }
  .cart-item-price{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:6px !important;
    align-items:center !important;
    line-height:1.15 !important;
  }
  .cart-item-unit-price{
    font-size:12px !important;
    font-weight:800 !important;
  }
  .cart-item-sku{
    font-size:11px !important;
    line-height:1.15 !important;
    margin-top:4px !important;
  }
  .cart-item-side{
    width:136px !important;
    min-width:136px !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:7px !important;
    margin-left:auto !important;
    padding-right:0 !important;
  }
  .cart-item-side-top{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    min-width:0 !important;
  }
  .cart-item-total{
    flex:1 1 auto !important;
    min-width:0 !important;
    text-align:left !important;
    font-size:14px !important;
    line-height:1.1 !important;
    white-space:nowrap !important;
  }
  .cart-item-del{
    flex:0 0 24px !important;
    width:24px !important;
    height:24px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    align-self:center !important;
  }
  .cart-item-control{
    width:100% !important;
    min-width:0 !important;
    margin-top:0 !important;
  }
  .cart-qty{
    display:grid !important;
    grid-template-columns:36px minmax(0,1fr) 36px !important;
    align-items:center !important;
    width:100% !important;
    min-height:42px !important;
    padding:4px !important;
    gap:4px !important;
    border-radius:14px !important;
    background:var(--light) !important;
    border:1px solid var(--border) !important;
  }
  .cart-qty .qty-btn{
    width:36px !important;
    height:34px !important;
    min-width:36px !important;
    min-height:34px !important;
    border-radius:10px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    align-self:center !important;
    font-size:18px !important;
    line-height:1 !important;
  }
  .cart-qty .qty-input{
    width:100% !important;
    min-width:0 !important;
    height:34px !important;
    line-height:34px !important;
    align-self:center !important;
    border:none !important;
    background:transparent !important;
    box-shadow:none !important;
    text-align:center !important;
    font-size:14px !important;
    font-weight:800 !important;
    padding:0 4px !important;
  }
  .cart-service-price-box{
    display:grid !important;
    grid-template-columns:32px minmax(0,1fr) !important;
    align-items:center !important;
    width:100% !important;
    min-height:42px !important;
    padding:4px 8px !important;
    gap:4px !important;
    border-radius:14px !important;
    background:var(--light) !important;
    border:1px solid var(--border) !important;
  }
  .cart-service-price-prefix{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:32px !important;
    min-height:34px !important;
    font-size:12px !important;
    font-weight:800 !important;
    line-height:1 !important;
    color:var(--muted) !important;
  }
  .cart-service-price-input{
    width:100% !important;
    min-width:0 !important;
    height:34px !important;
    line-height:34px !important;
    border:none !important;
    background:transparent !important;
    box-shadow:none !important;
    text-align:right !important;
    font-size:16px !important;
    font-weight:800 !important;
    padding:0 6px !important;
  }
}

@media (max-width: 560px){
  .cart-item{grid-template-columns:38px minmax(0,1fr) 132px !important;gap:9px !important;}
  .cart-item-thumb{width:38px !important;height:38px !important;}
  .cart-item-side{width:132px !important;min-width:132px !important;}
  .cart-item-total{font-size:13.5px !important;}
  .cart-qty{grid-template-columns:34px minmax(0,1fr) 34px !important;min-height:40px !important;}
  .cart-qty .qty-btn{width:34px !important;height:32px !important;min-width:34px !important;min-height:32px !important;}
  .cart-qty .qty-input{height:32px !important;line-height:32px !important;font-size:13px !important;}
  .cart-service-price-box{grid-template-columns:30px minmax(0,1fr) !important;min-height:40px !important;}
  .cart-service-price-prefix{width:30px !important;min-height:32px !important;}
  .cart-service-price-input{height:32px !important;line-height:32px !important;font-size:15px !important;}
}

@media (max-width: 420px){
  .pos-layout-btns .layout-visual-btn{width:36px !important;min-width:36px !important;height:34px !important;}
  .cart-item{grid-template-columns:36px minmax(0,1fr) 126px !important;gap:8px !important;padding:11px 10px !important;}
  .cart-item-thumb{width:36px !important;height:36px !important;}
  .cart-item-side{width:126px !important;min-width:126px !important;gap:6px !important;}
  .cart-item-del{flex-basis:22px !important;width:22px !important;height:22px !important;}
  .cart-qty{grid-template-columns:32px minmax(0,1fr) 32px !important;min-height:38px !important;}
  .cart-qty .qty-btn{width:32px !important;height:30px !important;min-width:32px !important;min-height:30px !important;font-size:17px !important;}
  .cart-qty .qty-input{height:30px !important;line-height:30px !important;font-size:12.5px !important;}
  .cart-service-price-box{grid-template-columns:28px minmax(0,1fr) !important;min-height:38px !important;padding:4px 7px !important;}
  .cart-service-price-prefix{width:28px !important;min-height:30px !important;font-size:11.5px !important;}
  .cart-service-price-input{height:30px !important;line-height:30px !important;font-size:14px !important;padding:0 4px !important;}
}

/* ═══════════════════════════════════════════════
   FEATURE PACK: POS New Feature Styles
   ═══════════════════════════════════════════════ */

/* ── Held cart button in POS topbar ──────────── */
.pos-held-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 16px;
  transition: color .15s, background .15s, border-color .15s;
}
.pos-held-btn:hover { color: var(--amber); border-color: var(--amber); }
.pos-held-btn.has-held { color: var(--amber); border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.07); }
.held-cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  width: 18px; height: 18px;
  background: var(--amber);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--card);
}

/* ── Cart hold button (pause icon in cart header) */
.cart-hold-btn { color: var(--amber) !important; }
.cart-hold-btn:hover { background: rgba(245,158,11,.1) !important; }

/* ── Held carts panel ────────────────────────── */
.held-carts-panel {
  position: fixed;
  top: calc(60px + env(safe-area-inset-top,0px));
  right: 12px;
  width: min(360px, calc(100vw - 24px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 10110;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: heldPanelIn .18s cubic-bezier(.4,0,.2,1);
}
@keyframes heldPanelIn {
  from { opacity:0; transform: translateY(-8px) scale(.97); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}
.held-carts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
}
.held-carts-body { overflow-y: auto; max-height: 320px; }
.held-cart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.held-cart-row:last-child { border-bottom: none; }
.held-cart-info { flex: 1; min-width: 0; }
.held-cart-label { font-size: 13px; font-weight: 700; color: var(--text); }
.held-cart-meta  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.held-cart-time  { font-size: 10px; color: var(--muted); margin-top: 2px; }
.held-cart-actions { display: flex; gap: 6px; flex-shrink: 0; }
.held-carts-footer { padding: 12px; border-top: 1px solid var(--border); }

/* ── Discount presets ────────────────────────── */
.cart-discount-row { display: flex !important; flex-direction: column !important; gap: 6px !important; padding: 10px 14px 8px !important; }
.cart-discount-row > * { min-width: 0; }
.disc-presets { display: flex !important; gap: 5px; }
.disc-preset-btn {
  flex: 1;
  padding: 5px 4px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--light);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.disc-preset-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(8,145,178,.06); }
.disc-preset-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.disc-inputs-row { display: flex !important; gap: 6px; flex-wrap: nowrap; align-items: center; }
.disc-inputs-row .cart-inline-input { flex: 1; min-width: 0; }

/* ── Cash denomination quick-fill ────────────── */
.cash-denom-row {
  display: flex;
  gap: 5px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.cash-denom-btn {
  flex: 1;
  min-width: 44px;
  padding: 5px 4px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--light);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.cash-denom-btn:hover { border-color: var(--green); color: var(--green); background: rgba(16,185,129,.07); }
.cash-denom-btn:active { transform: scale(.95); }
.cash-denom-exact { background: var(--light); color: var(--accent); border-color: rgba(8,145,178,.3); }
.cash-denom-exact:hover { background: rgba(8,145,178,.08); }

/* ── Customer last-purchase chip ─────────────── */
.cust-chip.last-visit {
  background: rgba(99,102,241,.1);
  color: #6366f1;
  border: 1px solid rgba(99,102,241,.2);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
body.dark .cust-chip.last-visit {
  background: rgba(129,140,248,.12);
  color: #a5b4fc;
  border-color: rgba(129,140,248,.25);
}

/* ── POS mobile bottom nav spacing ──────────── */
@media (max-width: 900px) {
  /* Ensure POS cart FAB doesn't overlap bottom nav */
  #cart-fab { bottom: 72px !important; }
}


/* Round 54 mobile polish */
.cust-selected{
  gap:10px !important;
}
.cust-selected-copy{display:flex;flex-direction:column;gap:4px;min-width:0;}
.cust-selected-head,.cust-selected-subrow{display:flex;align-items:center;gap:6px;min-width:0;}
.cust-selected-name{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cust-selected-subrow{justify-content:flex-start;}
.cust-selected-sub{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cust-selected-actions{display:flex;align-items:center;gap:5px;flex:0 0 auto;margin-left:auto;}
.cust-chip{font-size:9px !important;padding:2px 7px !important;max-width:100%;}
.cust-chip.last-visit{font-size:9px !important;padding:2px 6px !important;}

@media (max-width: 900px) {
  .cust-selector-row{display:block;}
  .cust-selected{
    min-height:52px !important;
    padding:8px 52px 8px 10px !important;
    border-radius:12px !important;
    align-items:center !important;
  }
  .cust-drop-avatar{width:34px !important;height:34px !important;font-size:13px !important;}
  .cust-selected-copy{gap:3px !important;}
  .cust-selected-name{font-size:13px !important;}
  .cust-selected-sub{font-size:10px !important;}
  .cust-selected-head,.cust-selected-subrow{flex-wrap:nowrap !important;overflow:hidden;}
  .cust-selected-subrow .cust-chip.last-visit{margin-left:auto;flex:0 0 auto;}
  .cust-selected-clear{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;padding:0 !important;}
  .cust-add-btn{right:8px !important;width:30px !important;height:30px !important;min-width:30px !important;border-radius:9px !important;}

  .mobile-card-size-btns{
    display:grid !important;
    grid-template-columns:repeat(3, 32px) !important;
    gap:3px !important;
    padding:3px !important;
    border-radius:12px !important;
  }
  .mobile-card-size-btns .layout-btn,
  .mobile-card-size-btns .layout-visual-btn{
    width:32px !important;
    min-width:32px !important;
    height:32px !important;
    padding:0 !important;
    border-radius:9px !important;
  }
  .mobile-card-size-btns .layout-visual-icon{width:14px !important;height:14px !important;}
  .pos-held-btn{
    width:32px !important;
    height:32px !important;
    border-radius:9px !important;
    font-size:14px !important;
  }
  .held-cart-badge{top:-5px !important;right:-5px !important;width:16px !important;height:16px !important;font-size:9px !important;}
}


/* Round 55 follow-up fixes */
@media (max-width: 900px){
  .mobile-card-size-btns,
  .pos-layout-btns.mobile-card-size-btns{
    display:grid !important;
    grid-template-columns:repeat(3, 30px) !important;
    gap:4px !important;
    padding:0 !important;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
    border-radius:0 !important;
    flex:0 0 auto !important;
  }
  .mobile-card-size-btns .layout-btn,
  .mobile-card-size-btns .layout-visual-btn,
  .pos-layout-btns.mobile-card-size-btns .layout-btn,
  .pos-layout-btns.mobile-card-size-btns .layout-visual-btn{
    width:30px !important;
    min-width:30px !important;
    height:30px !important;
    padding:0 !important;
    border-radius:10px !important;
    border:1px solid var(--border) !important;
    background:var(--light) !important;
    box-shadow:none !important;
  }
  .mobile-card-size-btns .layout-visual-icon{width:14px !important;height:14px !important;}
  .pos-held-btn{
    width:30px !important;
    height:30px !important;
    min-width:30px !important;
    border-radius:10px !important;
    background:var(--light) !important;
  }
  .cust-selected{
    min-height:46px !important;
    padding:6px 48px 6px 8px !important;
    gap:8px !important;
  }
  .cust-drop-avatar{width:30px !important;height:30px !important;font-size:12px !important;}
  .cust-selected-copy{gap:2px !important;}
  .cust-selected-head,.cust-selected-subrow{gap:5px !important;}
  .cust-selected-name{font-size:12px !important;line-height:1.1 !important;}
  .cust-selected-sub{font-size:9.5px !important;line-height:1.05 !important;}
  .cust-chip.last-visit{font-size:8px !important;padding:1px 5px !important;}
  .cust-selected-clear{width:22px !important;height:22px !important;}
  .cust-add-btn{right:7px !important;width:28px !important;height:28px !important;min-width:28px !important;}
}

.cart-discount-row{
  display:block !important;
  padding:10px 14px 8px !important;
}
.disc-inputs-row{display:grid !important;grid-template-columns:minmax(112px, .9fr) minmax(0,1fr) minmax(0,1.15fr) !important;gap:8px !important;align-items:center !important;}
@media (max-width: 640px){
  .disc-inputs-row{grid-template-columns:92px minmax(0,1fr) !important;}
  .disc-inputs-row .cart-note-input{grid-column:1 / -1 !important;}
}


/* Round 56 mobile follow-up */
@media (max-width: 900px){
  .mobile-card-size-btns,
  .pos-layout-btns.mobile-card-size-btns{
    display:grid !important;
    grid-template-columns:repeat(3, 28px) !important;
    gap:4px !important;
    padding:0 !important;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
    border-radius:0 !important;
    flex:0 0 auto !important;
  }
  .mobile-card-size-btns .layout-btn,
  .mobile-card-size-btns .layout-visual-btn,
  .pos-layout-btns.mobile-card-size-btns .layout-btn,
  .pos-layout-btns.mobile-card-size-btns .layout-visual-btn{
    width:28px !important;
    min-width:28px !important;
    height:28px !important;
    padding:0 !important;
    border:none !important;
    border-radius:10px !important;
    background:rgba(148,163,184,.18) !important;
    box-shadow:inset 0 0 0 1px rgba(148,163,184,.08) !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
  }
  .mobile-card-size-btns .layout-visual-btn.active,
  .pos-layout-btns.mobile-card-size-btns .layout-visual-btn.active{
    background:rgba(8,145,178,.16) !important;
    box-shadow:inset 0 0 0 1px rgba(8,145,178,.28) !important;
  }
  .mobile-card-size-btns .layout-visual-icon{
    width:15px !important;
    height:15px !important;
    display:grid !important;
    align-items:center !important;
    justify-content:center !important;
  }
  .mobile-card-size-btns .layout-visual-grid{
    width:15px !important;
    height:15px !important;
    gap:2px !important;
    transform:rotate(90deg);
  }
  .mobile-card-size-btns .layout-visual-grid span{
    border-radius:2px !important;
    background:currentColor !important;
    opacity:.42 !important;
    box-shadow:none !important;
  }
  .mobile-card-size-btns .layout-visual-btn.active .layout-visual-grid span{
    opacity:.82 !important;
  }
  .pos-held-btn{
    width:30px !important;
    height:30px !important;
    min-width:30px !important;
    border:none !important;
    border-radius:10px !important;
    background:rgba(148,163,184,.18) !important;
    box-shadow:inset 0 0 0 1px rgba(148,163,184,.08) !important;
  }
}

.cart-discount-row{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:0 !important;
  padding:10px 14px 8px !important;
}
.disc-inputs-row{
  display:grid !important;
  grid-template-columns:minmax(92px,.88fr) minmax(92px,.86fr) minmax(0,1.22fr) !important;
  gap:8px !important;
  align-items:center !important;
}
.disc-inputs-row > *{
  min-width:0 !important;
}
.disc-inputs-row .cart-inline-input{
  width:100% !important;
  min-width:0 !important;
}
.disc-inputs-row .cart-note-input{
  resize:none !important;
  height:42px !important;
  min-height:42px !important;
  max-height:42px !important;
}
@media (max-width: 900px){
  .cart-discount-row{
    padding:10px 14px 8px !important;
  }
  .disc-inputs-row{
    grid-template-columns:minmax(86px,.82fr) minmax(82px,.78fr) minmax(0,1.2fr) !important;
    gap:8px !important;
  }
}


/* Round 57 targeted polish */

@media (max-width: 900px){
  .mobile-card-size-btns,
  .pos-layout-btns.mobile-card-size-btns{
    display:grid !important;
    grid-template-columns:repeat(3, 30px) !important;
    gap:5px !important;
    align-items:center !important;
    justify-content:end !important;
    padding:0 !important;
    margin:0 !important;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
    overflow:visible !important;
  }
  .mobile-card-size-btns .layout-btn,
  .mobile-card-size-btns .layout-visual-btn,
  .pos-layout-btns.mobile-card-size-btns .layout-btn,
  .pos-layout-btns.mobile-card-size-btns .layout-visual-btn{
    width:30px !important;
    min-width:30px !important;
    height:30px !important;
    padding:0 !important;
    border:none !important;
    border-radius:11px !important;
    background:rgba(148,163,184,.18) !important;
    box-shadow:inset 0 0 0 1px rgba(148,163,184,.12) !important;
    color:#64748b !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
  }
  .mobile-card-size-btns .layout-visual-btn.active,
  .pos-layout-btns.mobile-card-size-btns .layout-visual-btn.active{
    background:rgba(8,145,178,.16) !important;
    box-shadow:inset 0 0 0 1px rgba(8,145,178,.28) !important;
    color:var(--accent2) !important;
  }
  .mobile-card-size-btns .layout-visual-icon,
  .pos-layout-btns.mobile-card-size-btns .layout-visual-icon{
    width:16px !important;
    height:16px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
  }
  .mobile-card-size-btns .layout-visual-rotated,
  .pos-layout-btns.mobile-card-size-btns .layout-visual-rotated{
    transform:rotate(90deg) !important;
    transform-origin:center center !important;
  }
  .mobile-card-size-btns .layout-visual-svg,
  .pos-layout-btns.mobile-card-size-btns .layout-visual-svg{
    width:16px !important;
    height:16px !important;
    display:block !important;
    overflow:visible !important;
  }
  .mobile-card-size-btns .layout-visual-svg rect,
  .pos-layout-btns.mobile-card-size-btns .layout-visual-svg rect{
    fill:currentColor !important;
    fill-opacity:.42 !important;
    stroke:none !important;
  }
  .mobile-card-size-btns .layout-visual-btn.active .layout-visual-svg rect,
  .pos-layout-btns.mobile-card-size-btns .layout-visual-btn.active .layout-visual-svg rect{
    fill-opacity:.9 !important;
  }

  .cart-discount-row{
    display:block !important;
    padding:10px 12px 8px !important;
  }
  .disc-inputs-row{
    display:grid !important;
    grid-template-columns:minmax(90px,100px) minmax(78px,92px) minmax(0,1fr) !important;
    gap:8px !important;
    align-items:center !important;
  }
  .disc-inputs-row .cart-note-input{
    grid-column:auto !important;
    height:40px !important;
    min-height:40px !important;
    max-height:40px !important;
    resize:none !important;
  }
  #disc-type,
  #disc-val,
  #sale-note{
    width:100% !important;
    min-width:0 !important;
    font-size:13px !important;
  }
}
@media (max-width: 380px){
  .disc-inputs-row{
    grid-template-columns:84px 72px minmax(0,1fr) !important;
    gap:6px !important;
  }
  #disc-type,
  #disc-val,
  #sale-note{font-size:12px !important;}
}


/* Round 59 discount row + search clear hit area */
@media (max-width: 900px){
  .cart-discount-row{
    display:block !important;
    padding:10px 16px 8px !important;
  }
  .disc-inputs-row{
    display:grid !important;
    grid-template-columns:92px 82px minmax(0,1fr) !important;
    gap:8px !important;
    align-items:center !important;
  }
  .disc-inputs-row > *{min-width:0 !important;}
  .disc-inputs-row .cart-note-input{grid-column:auto !important;}
  #disc-type,#disc-val,#sale-note{width:100% !important;}
  #sale-note{
    height:42px !important;
    min-height:42px !important;
    max-height:42px !important;
    resize:none !important;
  }

}
@media (max-width: 380px){
  .disc-inputs-row{
    grid-template-columns:88px 72px minmax(0,1fr) !important;
    gap:6px !important;
  }
}

/* Round 60 exact mobile fixes */
@media (max-width: 900px){
  /* Keep the last POS cards fully above the bottom nav */
  #product-grid{
    padding-bottom:calc(176px + env(safe-area-inset-bottom, 0px)) !important;
    scroll-padding-bottom:calc(176px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Restore the original side-by-side mobile cart row while keeping presets inside the dropdown */
  .cart-discount-row{
    display:grid !important;
    grid-template-columns:92px 84px minmax(0,1fr) !important;
    gap:8px !important;
    align-items:center !important;
    padding:10px 14px 8px !important;
  }
  .cart-discount-row > .disc-inputs-row{
    display:contents !important;
  }
  .cart-discount-row > .disc-inputs-row > *{
    min-width:0 !important;
    width:100% !important;
  }
  .cart-discount-row > .disc-inputs-row > .cart-note-input{
    grid-column:auto !important;
  }
  #disc-type,
  #disc-val,
  #sale-note{
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }
  #sale-note{
    height:42px !important;
    min-height:42px !important;
    max-height:42px !important;
    resize:none !important;
  }

  /* Make the clear affordance much harder to miss */
}

@media (max-width: 380px){
  .cart-discount-row{
    grid-template-columns:88px 78px minmax(0,1fr) !important;
    gap:6px !important;
    padding:10px 12px 8px !important;
  }
}


/* Round 61 restore original mobile side-by-side discount row */
@media (max-width: 900px){
  .cart-bottom-stack .cart-discount-row{
    display:grid !important;
    grid-template-columns:minmax(84px,92px) minmax(64px,74px) minmax(0,1fr) !important;
    gap:8px !important;
    align-items:center !important;
    padding:10px 12px 8px !important;
  }
  .cart-bottom-stack .cart-discount-row > *{
    min-width:0 !important;
    width:100% !important;
    box-sizing:border-box !important;
  }
  .cart-bottom-stack .cart-discount-row #disc-type,
  .cart-bottom-stack .cart-discount-row #disc-val{
    height:40px !important;
  }
  .cart-bottom-stack .cart-discount-row #sale-note{
    height:40px !important;
    min-height:40px !important;
    max-height:40px !important;
    resize:none !important;
  }
}
@media (max-width: 380px){
  .cart-bottom-stack .cart-discount-row{
    grid-template-columns:80px 60px minmax(0,1fr) !important;
    gap:6px !important;
    padding:10px 10px 8px !important;
  }
  .cart-bottom-stack .cart-discount-row #disc-type,
  .cart-bottom-stack .cart-discount-row #disc-val,
  .cart-bottom-stack .cart-discount-row #sale-note{
    font-size:12px !important;
  }
}


/* Round 62 equal-width mobile discount row */
@media (max-width: 900px){
  .cart-bottom-stack .cart-discount-row{
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
    gap:8px !important;
    align-items:center !important;
    padding:10px 12px 8px !important;
  }
  .cart-bottom-stack .cart-discount-row > *{
    min-width:0 !important;
    width:100% !important;
    box-sizing:border-box !important;
    grid-column:auto !important;
  }
  .cart-bottom-stack .cart-discount-row #disc-type,
  .cart-bottom-stack .cart-discount-row #disc-val,
  .cart-bottom-stack .cart-discount-row #sale-note{
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    grid-column:auto !important;
  }
  .cart-bottom-stack .cart-discount-row #disc-type,
  .cart-bottom-stack .cart-discount-row #disc-val{
    height:40px !important;
  }
  .cart-bottom-stack .cart-discount-row #sale-note{
    height:40px !important;
    min-height:40px !important;
    max-height:40px !important;
    resize:none !important;
  }
}
@media (max-width: 380px){
  .cart-bottom-stack .cart-discount-row{
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
    gap:6px !important;
    padding:10px 10px 8px !important;
  }
  .cart-bottom-stack .cart-discount-row #disc-type,
  .cart-bottom-stack .cart-discount-row #disc-val,
  .cart-bottom-stack .cart-discount-row #sale-note{
    font-size:12px !important;
  }
}


/* ═══════════════════════════════════════════════════════════
   BazaarMint v2.6 — POS search UI polish
═══════════════════════════════════════════════════════════ */





@media (max-width: 900px) {
}

/* ─── Refined POS search bar & layout resizer (polish pass) ─── */

/* Layout/card resizer polish */
.pos-layout-btns {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.pos-layout-btns .layout-btn,
.pos-layout-btns .layout-visual-btn {
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  transition: all .15s ease !important;
  color: var(--muted) !important;
}
.pos-layout-btns .layout-btn:hover,
.pos-layout-btns .layout-visual-btn:hover {
  background: var(--card) !important;
  color: var(--accent) !important;
}
.pos-layout-btns .layout-btn.active,
.pos-layout-btns .layout-visual-btn.active {
  background: var(--card) !important;
  border-color: rgba(8,145,178,0.25) !important;
  color: var(--accent) !important;
  box-shadow: 0 1px 3px rgba(15,23,42,0.08), 0 0 0 2px rgba(8,145,178,0.08) !important;
}
body.dark .pos-layout-btns {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

/* Held cart button in topbar (next to Scanner) */

/* ═════════════ POS desktop card + list redesign (v2) ═════════════ */
@media(min-width:901px){
  #product-grid{
    gap: 14px !important;
  }
  #product-grid.layout-large{
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  }
  .prod-card.card-pro{
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    padding: 16px !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 12px rgba(15,23,42,.04) !important;
    transition: transform .2s cubic-bezier(.4,0,.2,1), box-shadow .2s, border-color .2s !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 196px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .prod-card.card-pro::before{
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--accent), rgba(8,145,178,0.2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    z-index: 2;
  }
  .prod-card.card-pro.stock-ok::before   { background: linear-gradient(90deg,#10b981,#34d399); }
  .prod-card.card-pro.stock-low::before  { background: linear-gradient(90deg,#f59e0b,#fbbf24); }
  .prod-card.card-pro.stock-out::before  { background: linear-gradient(90deg,#ef4444,#f87171); }
  .prod-card.card-pro.stock-high::before { background: linear-gradient(90deg,#3b82f6,#60a5fa); }
  .prod-card.card-pro.stock-service::before { background: linear-gradient(90deg,#8b5cf6,#a78bfa); }
  .prod-card.card-pro:hover{
    transform: translateY(-4px) !important;
    box-shadow: 0 14px 32px rgba(8,145,178,.16), 0 4px 10px rgba(15,23,42,.06) !important;
    border-color: rgba(8,145,178,.35) !important;
  }
  .prod-card.card-pro:hover::before{ transform: scaleX(1); }
  .prod-card.card-pro.in-cart{
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px var(--accent), 0 10px 24px rgba(8,145,178,.24) !important;
  }
  .prod-card.card-pro.in-cart::before{ transform: scaleX(1); }

  .prod-card.card-pro .desktop-card-head{
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
  }
  .prod-card.card-pro .desktop-status-pill{
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
  }
  .prod-card.card-pro .desktop-status-pill.tone-ok      { background: rgba(16,185,129,.14); color: #059669; }
  .prod-card.card-pro .desktop-status-pill.tone-high    { background: rgba(59,130,246,.14); color: #2563eb; }
  .prod-card.card-pro .desktop-status-pill.tone-low     { background: rgba(245,158,11,.16); color: #c2410c; }
  .prod-card.card-pro .desktop-status-pill.tone-out     { background: rgba(239,68,68,.15); color: #dc2626; }
  .prod-card.card-pro .desktop-status-pill.tone-service { background: rgba(139,92,246,.14); color: #7c3aed; }
  body.dark .prod-card.card-pro .desktop-status-pill.tone-ok    { background: rgba(16,185,129,.2); color: #34d399; }
  body.dark .prod-card.card-pro .desktop-status-pill.tone-high  { background: rgba(59,130,246,.2); color: #60a5fa; }
  body.dark .prod-card.card-pro .desktop-status-pill.tone-low   { background: rgba(245,158,11,.22); color: #fbbf24; }
  body.dark .prod-card.card-pro .desktop-status-pill.tone-out   { background: rgba(239,68,68,.22); color: #f87171; }

  .prod-card.card-pro .desktop-card-price{
    font-family: var(--mono) !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--text) !important;
    letter-spacing: -.02em;
    white-space: nowrap;
  }
  .prod-card.card-pro .prod-name{
    font-family: var(--head) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: var(--text) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    letter-spacing: .005em;
    margin: 0 !important;
  }
  .prod-card.card-pro .desktop-card-meta{
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-size: 11px !important;
    color: var(--muted) !important;
    font-family: var(--mono) !important;
    padding: 4px 8px;
    background: var(--light);
    border-radius: 6px;
    align-self: flex-start;
    max-width: 100%;
  }
  .prod-card.card-pro .desktop-card-meta i{
    font-size: 11px;
    color: var(--accent);
  }
  .prod-card.card-pro .desktop-card-meta span{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.dark .prod-card.card-pro .desktop-card-meta{
    background: rgba(255,255,255,.05);
  }

  .prod-card.card-pro .desktop-card-bottom{
    margin-top: auto !important;
    padding-top: 12px !important;
    border-top: 1px solid var(--border);
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .prod-card.card-pro .desktop-card-stockblock{
    display: flex; flex-direction: column; gap: 2px;
    min-width: 0;
  }
  .prod-card.card-pro .desktop-card-caption{
    font-size: 9.5px !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    line-height: 1;
  }
  .prod-card.card-pro .desktop-card-stockblock strong{
    font-size: 15px !important;
    font-weight: 800 !important;
    font-family: var(--mono);
    color: var(--text);
    line-height: 1.15;
  }
  .prod-card.card-pro.stock-ok   .desktop-card-stockblock strong { color: #059669; }
  .prod-card.card-pro.stock-low  .desktop-card-stockblock strong { color: #d97706; }
  .prod-card.card-pro.stock-out  .desktop-card-stockblock strong { color: #dc2626; }
  .prod-card.card-pro.stock-high .desktop-card-stockblock strong { color: #2563eb; }
  body.dark .prod-card.card-pro.stock-ok   .desktop-card-stockblock strong { color: #34d399; }
  body.dark .prod-card.card-pro.stock-low  .desktop-card-stockblock strong { color: #fbbf24; }
  body.dark .prod-card.card-pro.stock-out  .desktop-card-stockblock strong { color: #f87171; }
  body.dark .prod-card.card-pro.stock-high .desktop-card-stockblock strong { color: #60a5fa; }
  .prod-card.card-pro .desktop-card-inline-stock{ display: none; }

  .prod-card.card-pro .desktop-card-cart-btn{
    width: 40px !important; height: 40px !important;
    border-radius: 12px !important;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(8,145,178,.1) !important;
    color: var(--accent) !important;
    font-size: 15px !important;
    transition: all .18s ease;
    flex-shrink: 0;
  }
  .prod-card.card-pro:hover .desktop-card-cart-btn{
    background: var(--accent) !important;
    color: #fff !important;
    transform: scale(1.05);
  }
  .prod-card.card-pro .desktop-card-cart-btn.added{
    background: var(--accent) !important; color: #fff !important;
  }
  .prod-card.card-pro .desktop-card-cart-btn.sold{
    background: var(--light) !important; color: #94a3b8 !important;
  }

  /* Qty badge refinement */
  .prod-card.card-pro .prod-qty-badge{
    position: absolute !important;
    top: 12px !important; right: 12px !important;
    min-width: 26px; height: 26px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 12px !important;
    font-weight: 800;
    font-family: var(--mono);
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 8px;
    box-shadow: 0 4px 10px rgba(8,145,178,.35);
    border: 2px solid var(--card);
    z-index: 3;
  }

  /* ─── List layout redesign ─── */
  #product-grid.layout-list{
    grid-template-columns: 1fr !important;
    display: grid !important;
    gap: 6px !important;
  }
  #product-grid.layout-list .prod-card.card-pro{
    padding: 10px 14px !important;
    min-height: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
  }
  #product-grid.layout-list .prod-card.card-pro::before{
    top: 0; bottom: 0; height: auto; width: 3px; right: auto;
    transform: scaleY(0);
    transform-origin: top;
  }
  #product-grid.layout-list .prod-card.card-pro:hover::before,
  #product-grid.layout-list .prod-card.card-pro.in-cart::before{ transform: scaleY(1); }
  #product-grid.layout-list .prod-card.card-pro:hover{
    transform: translateX(2px) !important;
  }
  #product-grid.layout-list .desktop-card-head{
    order: 3;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
  #product-grid.layout-list .prod-name{
    flex: 1;
    min-height: 0 !important;
    -webkit-line-clamp: 1 !important;
    font-size: 14px !important;
    margin: 0 !important;
    order: 1;
  }
  #product-grid.layout-list .desktop-card-meta{
    order: 2;
    flex: 0 0 auto;
    font-size: 10px !important;
    padding: 3px 6px;
    max-width: 140px;
  }
  #product-grid.layout-list .desktop-card-bottom{
    order: 4;
    border: none;
    padding: 0;
    margin: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
  #product-grid.layout-list .desktop-card-stockblock{
    align-items: flex-end;
    text-align: right;
  }
  #product-grid.layout-list .desktop-card-caption{ display: none; }
  #product-grid.layout-list .desktop-card-stockblock strong{
    font-size: 12px !important;
  }
  #product-grid.layout-list .desktop-card-cart-btn{
    width: 32px !important; height: 32px !important;
    font-size: 12px !important;
  }
  #product-grid.layout-list .desktop-card-price{
    font-size: 16px !important;
  }
  #product-grid.layout-list .prod-qty-badge{
    top: 50% !important; transform: translateY(-50%);
    right: 56px !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   FINAL PATCH — UI overhaul v2
═══════════════════════════════════════════════════════════ */

/* ── POS toolbar — uses standard toolbar-search + card-mode-toggle ── */
.pos-toolbar{
  background:var(--card) !important;
  border-bottom:1px solid var(--border) !important;
  flex-shrink:0;
  padding:10px 14px !important;
  margin:-12px -14px 0 !important;
  border-radius:0 !important;
}
.pos-toolbar .toolbar-row{margin:0}
.pos-toolbar .toolbar-search-group{gap:8px}
.pos-toolbar .toolbar-search{min-width:0;flex:1}
.pos-toolbar .toolbar-search input{height:38px}

/* ── Category chips (POS product topbar) ── */
.pos-products-topbar{
  display:flex;
  align-items:center;
  padding:6px 14px;
  background:var(--bg);
  flex-shrink:0;
  gap:8px;
  border-bottom:1px solid var(--border);
}
.pos-cat-scroll{
  display:flex;
  gap:6px;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  flex:1;
}
.pos-cat-scroll::-webkit-scrollbar{display:none}
.pos-cat-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:5px 12px;
  border-radius:20px;
  border:1.5px solid var(--border);
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  white-space:nowrap;
  transition:all .18s ease;
  background:var(--card);
  color:var(--muted);
  font-family:var(--head);
  letter-spacing:.3px;
  flex-shrink:0;
}
.pos-cat-chip i{font-size:11px}
.pos-cat-chip:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-glow)}
.pos-cat-chip.active{background:var(--accent);color:#fff;border-color:var(--accent);box-shadow:0 2px 10px rgba(8,145,178,.3)}
.pos-cat-chip .cat-count{
  background:rgba(255,255,255,.2);
  border-radius:10px;
  padding:0 5px;
  font-size:10px;
  margin-left:2px;
}
.pos-cat-chip.active .cat-count{background:rgba(255,255,255,.3);color:#fff}
.pos-cat-bar{display:none !important}

/* ── Custom select dropdown (replaces native <select>) ── */
.custom-select-wrap{
  position:relative;
  flex-shrink:0;
}
.custom-select-trigger{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:6px !important;
  cursor:pointer !important;
  text-align:left !important;
  font-size:13px !important;
  font-weight:600 !important;
  white-space:nowrap !important;
  padding:6px 10px !important;
  min-width:0 !important;
  border:none;
  background:none;
  color:var(--text);
}
.csel-label{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  min-width:0;
}
.custom-select-arrow{
  font-size:9px;
  color:var(--muted);
  flex-shrink:0;
  transition:transform .2s ease;
}
.custom-select-wrap:has(.custom-select-menu.open) .custom-select-arrow{
  transform:rotate(180deg);
}
.custom-select-menu{
  display:none;
  position:absolute;
  top:calc(100% + 4px);
  left:0;
  right:auto;
  min-width:160px;
  max-width:min(320px, calc(100vw - 24px));
  background:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:0 8px 28px rgba(0,0,0,.14);
  z-index:200;
  padding:6px;
  animation:customSelectFadeIn .15s ease;
  max-height:260px;
  overflow-y:auto;
  scrollbar-width:thin;
}
.custom-select-menu.open{display:block}
@keyframes customSelectFadeIn{
  from{opacity:0;transform:translateY(4px)}
  to{opacity:1;transform:translateY(0)}
}
.custom-select-option{
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border:none;
  background:none;
  font-size:13px;
  font-weight:500;
  color:var(--text);
  cursor:pointer;
  border-radius:8px;
  transition:background .12s ease;
  text-align:left;
  white-space:nowrap;
}
.custom-select-option span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  min-width:0;
}
.custom-select-option i{
  width:14px;
  text-align:center;
  font-size:12px;
  color:var(--muted);
  flex-shrink:0;
}
.custom-select-option:hover{background:var(--light)}
.custom-select-option.active{
  background:var(--accent-glow);
  color:var(--accent);
  font-weight:700;
}
.custom-select-option.active i{color:var(--accent)}

body.dark .custom-select-menu{
  background:var(--card);
  border-color:rgba(255,255,255,.1);
  box-shadow:0 8px 28px rgba(0,0,0,.4);
}
body.dark .custom-select-option:hover{background:rgba(255,255,255,.06)}

/* Direction overrides */
.custom-select-menu.csel-dir-down{top:calc(100% + 4px);bottom:auto}
.custom-select-menu.csel-dir-up{bottom:calc(100% + 4px);top:auto}

/* Search input inside dropdown */
.csel-search-wrap{
  padding:4px 4px 2px;
  position:sticky;
  top:0;
  background:var(--card);
  z-index:1;
}
.csel-search{
  width:100%;
  padding:7px 10px;
  border:1.5px solid var(--border);
  border-radius:8px;
  background:var(--light);
  color:var(--text);
  font-size:12px;
  outline:none;
  transition:border-color .15s ease;
}
.csel-search:focus{
  border-color:var(--accent);
  background:var(--card);
}
body.dark .csel-search{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
}
body.dark .csel-search:focus{
  border-color:var(--accent);
  background:rgba(255,255,255,.08);
}

/* ── Toolbar dropdowns — all in one row ── */
.toolbar-actions{
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
  flex-shrink:0;
}
.toolbar-actions .custom-select-wrap{flex-shrink:0}
.toolbar-row-sort{
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
  flex-wrap:nowrap !important;
  transition:max-height .25s ease, opacity .25s ease, padding .25s ease;
  max-height:60px;
}
.toolbar-row-sort.sort-hidden{
  max-height:0 !important;
  opacity:0;
  padding-top:0 !important;
  padding-bottom:0 !important;
  overflow:hidden;
  pointer-events:none;
}
.toolbar-row-sort .custom-select-wrap{flex-shrink:1;min-width:0}
.toolbar-sort-label{
  flex-shrink:0;
  white-space:nowrap;
}
.toolbar-row-sort .csel-label{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* ── Topbar / sort-select context ── */
.list-sort-select.custom-select-trigger,
.custom-select-trigger.list-sort-select{
  padding:6px 10px !important;
  font-size:12px !important;
  font-weight:600 !important;
  border:1.5px solid var(--border);
  border-radius:8px;
  background:var(--card);
  color:var(--text);
  min-height:30px;
  height:auto;
  max-width:180px;
}

/* Category manager items */
.prod-cat-mgr{display:flex;flex-direction:column;gap:6px}
.prod-cat-mgr-item{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border:1px solid var(--border);border-radius:10px;gap:10px}
.prod-cat-mgr-item:hover{border-color:var(--accent);background:var(--light)}

/* Kebab menu in topbar */
.topbar-kebab-wrap{position:relative;flex-shrink:0}
.topbar-kebab-wrap .topbar-kebab-menu{
  display:none;position:absolute;right:0;top:100%;margin-top:4px;
  min-width:200px;background:var(--card);border:1px solid var(--border);
  border-radius:10px;box-shadow:0 6px 20px rgba(0,0,0,.12);z-index:300;
  overflow:hidden;
}
.topbar-kebab-wrap .topbar-kebab-menu.open{display:block}
.topbar-kebab-menu button{
  width:100%;display:flex;align-items:center;gap:8px;padding:10px 14px;
  border:none;background:none;font-size:13px;color:var(--text);cursor:pointer;text-align:left;
}
.topbar-kebab-menu button:hover{background:var(--light)}
body.dark .topbar-kebab-menu{border-color:rgba(255,255,255,.1);box-shadow:0 8px 28px rgba(0,0,0,.4)}
.kebab-date-filter{display:flex;align-items:center;gap:8px;padding:8px 14px;border-bottom:1px solid var(--border)}
.kebab-date-label{font-size:12px;color:var(--muted);font-weight:600;min-width:36px}
.kebab-date-input{flex:1;padding:6px 8px;border:1px solid var(--border);border-radius:8px;background:var(--bg);color:var(--text);font-size:13px;font-family:inherit}
.kebab-date-input:focus{outline:none;border-color:var(--accent)}

/* Prevent topbar overflow */
#topbar-actions{overflow:visible !important}
.topbar-kebab-btn{width:36px;height:36px;display:inline-flex !important;align-items:center;justify-content:center;padding:0 !important;border-radius:10px !important;flex-shrink:0}

/* ── Form-context custom selects (inside modals/drawers) ── */
.form-group .custom-select-wrap{width:100%}
.form-group .custom-select-trigger{
  width:100%;
  padding:8px 12px !important;
  border:1.5px solid var(--border);
  border-radius:10px;
  background:var(--bg);
  color:var(--text);
  font-size:13px !important;
  font-weight:500 !important;
  min-height:40px;
  cursor:pointer;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.form-group .custom-select-trigger:hover{border-color:var(--accent)}
.form-group .custom-select-menu{
  min-width:100%;
  left:0; right:0;
}

/* ── Return / modal inline selects ── */
.ret-select.custom-select-trigger{
  width:100%;
  padding:8px 12px !important;
  border:1.5px solid var(--border);
  border-radius:10px;
  background:var(--bg);
  color:var(--text);
  font-size:13px !important;
  font-weight:500 !important;
  min-height:38px;
}

/* ── Note field always visible in discount row ── */
#sale-note-toggle{display:none !important}
#sale-note-wrap{display:block !important}
.cart-discount-row{
  display:grid !important;
  grid-template-columns:minmax(92px,112px) minmax(0,1fr) minmax(0,1.2fr) !important;
  gap:8px !important;
  align-items:center !important;
  padding:10px 16px 8px !important;
}
.cart-discount-row > *{min-width:0 !important}
.cart-note-input{
  resize:none !important;
  height:42px !important;
  min-height:42px !important;
  max-height:42px !important;
}

/* ── Cash denomination row removed ── */
.cash-denom-row{display:none !important}

/* ── Toolbar search clear button ── */
.toolbar-search{position:relative}
.toolbar-search input{padding-right:32px !important}
.modal-body .toolbar-search,.drawer-body .toolbar-search{min-width:0;flex:none}
.toolbar-search-clear{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  background:none; border:none; color:var(--muted); cursor:pointer;
  font-size:13px; padding:4px; line-height:1; display:none; z-index:2;
  width:22px; height:22px; align-items:center; justify-content:center;
}
.toolbar-search.has-value .toolbar-search-clear{display:flex}

/* ── Cart customer dropdown search ── */
.cust-drop-search{position:relative}
.cust-drop-search i.fa-magnifying-glass{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--muted);font-size:12px;pointer-events:none}
.cust-drop-search input{width:100%;padding:8px 32px 8px 30px;border:1px solid var(--border);border-radius:8px;font-size:13px;background:var(--light);color:var(--text)}
.cust-drop-search input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 2px var(--accent-glow)}
.cust-drop-search-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:none;border:none;color:var(--muted);cursor:pointer;font-size:12px;padding:2px;line-height:1;display:none;width:20px;height:20px;align-items:center;justify-content:center}
.cust-drop-search input:not(:placeholder-shown) ~ .cust-drop-search-clear{display:flex}

/* ── Mobile overrides ── */
@media (max-width:900px){
  .pos-toolbar{padding:8px 10px !important;position:sticky;top:0;z-index:30;margin:0 !important;}
  .pos-products-topbar{
    padding:6px 10px !important;
  }
  .pos-cat-chip{
    padding:4px 10px !important;
    font-size:11px !important;
  }
  .cart-discount-row{
    grid-template-columns:minmax(82px,92px) minmax(0,1fr) minmax(0,1fr) !important;
    gap:6px !important;
    padding:8px 12px 6px !important;
  }
  .cart-note-input{
    height:38px !important;
    min-height:38px !important;
    max-height:38px !important;
    font-size:12px !important;
  }
}
@media (max-width:640px){
  .custom-select-option span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
@media (max-width:380px){
  .cart-discount-row{
    grid-template-columns:80px minmax(0,1fr) minmax(0,1fr) !important;
    gap:5px !important;
    padding:8px 10px 6px !important;
  }
}
