/* ===== Sell (POS) screen — supermarket touch layout ===== */
.sx{--b1:#0b2927;--b2:#0f766e;--b3:#115e59;--navy:#0b2927;--sky:#e8f4f1;--sky2:#d8ebe6;--ink:#102b29;--ok:#17a34a;
  height:100vh;height:100dvh;display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,var(--cart-width,44%));grid-template-rows:64px minmax(0,1fr) 58px;
  grid-template-areas:"top top" "main cart" "foot foot";background:linear-gradient(160deg,#e8f4f1,#d8ebe6);color:var(--ink);overflow:hidden}
.sx button{font-weight:700}
/* header */
.sx-top{grid-area:top;display:flex;align-items:center;gap:22px;padding:0 20px;color:#fff;background:linear-gradient(90deg,var(--b1),var(--b2) 70%,#0b5f58);box-shadow:0 3px 12px rgba(11,41,39,.30);z-index:3}
.sx-brand{display:flex;align-items:center;gap:12px;min-width:0}
.sx-logo{width:44px;height:44px;border-radius:14px;background:linear-gradient(180deg,#0f766e,#0b5f58);display:grid;place-items:center;box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 4px 10px rgba(0,0,0,.25);flex:none}
.sx-brand b{display:block;font-size:26px;line-height:1;font-weight:800;letter-spacing:-.5px;white-space:nowrap}
.sx-brand small{display:block;color:#d8ebe6;font-size:14px;font-weight:700;margin-top:3px}
.sx-search{flex:1;min-width:140px;max-width:560px;display:flex;align-items:center;gap:10px;height:44px;padding:0 8px 0 16px;border-radius:24px;background:linear-gradient(180deg,#fff,#e8f4f1);box-shadow:inset 0 -2px 4px rgba(11,75,68,.12),0 2px 8px rgba(0,0,0,.2);color:var(--b2)}
.sx-search input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-size:17px;font-weight:600;color:var(--ink)}
.sx-search input::placeholder{color:#66817c;font-weight:500}
.sx-search:focus-within{box-shadow:0 0 0 3px rgba(255,255,255,.55),0 2px 8px rgba(0,0,0,.2)}
.sx-icon{width:36px;height:36px;border-radius:50%;border:0;background:transparent;color:var(--b2);display:grid;place-items:center}
.sx-icon:hover{background:rgba(15,118,110,.12)}
.sx-when{padding-left:22px;border-left:2px solid rgba(255,255,255,.3);white-space:nowrap}
.sx-when b{display:block;font-size:22px;line-height:1.05;font-weight:800;letter-spacing:.2px}
.sx-when small{color:#e3ecff;font-size:13px;font-weight:600}
.sx-who{display:flex;align-items:center;gap:10px;padding-left:20px;border-left:2px solid rgba(255,255,255,.3);white-space:nowrap}
.sx-who .av{width:40px;height:40px;background:transparent;border:3px solid #fff;font-size:20px}
.sx-who small{display:block;color:#e3ecff;font-size:15px;font-weight:600;line-height:1.1}
.sx-who b{display:block;font-size:17px;line-height:1.15}
.sx-gear{width:48px;height:48px;border-radius:12px;border:0;background:transparent;color:#fff;display:grid;place-items:center;margin-left:auto;flex:none}
.sx-gear:hover{background:rgba(255,255,255,.16)}
/* status strip (bottom of the product area) */
.sx-stat{flex:none;display:flex;flex-wrap:wrap;gap:6px 18px;align-items:center;padding:6px 12px;border-radius:12px;background:rgba(11,41,39,.07);font-size:13px;font-weight:700;color:#365f59}
.sx-stat div{display:flex;align-items:center;gap:7px;line-height:1.2}
.sx-dot{width:11px;height:11px;border-radius:50%;background:#22d36b;box-shadow:0 0 0 3px rgba(34,211,107,.25);flex:none}
.sx-dot.off{background:#ffb020;box-shadow:0 0 0 3px rgba(255,176,32,.25)}
/* center */
.sx-main{grid-area:main;display:flex;flex-direction:column;gap:10px;padding:12px 16px 8px 4px;min-width:0;min-height:0}
.sx-chips{display:flex;gap:10px;flex:none;position:relative;overflow-x:auto;padding:2px 2px 6px;scrollbar-width:none}
.sx-chips::-webkit-scrollbar{display:none}
.sx-chip{display:flex;align-items:center;gap:9px;height:52px;padding:0 20px;border-radius:26px;border:1px solid #c8dfda;background:linear-gradient(180deg,#fff,#edf7f4);box-shadow:0 3px 6px rgba(11,75,68,.10);font-size:17px;white-space:nowrap;color:var(--ink);flex:none}
.sx-chip .e{font-size:22px}
.sx-chip.on{background:linear-gradient(180deg,#16877d,#0b5f58);border-color:#0b5f58;color:#fff;box-shadow:0 4px 10px rgba(15,118,110,.28)}
.sx-more{position:relative}
.sx-pop{position:fixed;z-index:20;background:#fff;border-radius:16px;box-shadow:0 16px 40px rgba(11,41,39,.28);padding:8px;display:grid;gap:2px;min-width:220px;max-height:60vh;overflow:auto}
.sx-pop button{border:0;background:transparent;text-align:left;padding:11px 14px;border-radius:10px;font-size:16px;display:flex;gap:10px;align-items:center}
.sx-pop button:hover{background:var(--sky)}
.sx-grid{flex:1;min-height:0;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(138px,1fr));grid-auto-rows:max-content;gap:10px;padding:2px 4px 10px 2px;align-content:start}
.sx-tile{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:2px;padding:8px 8px 10px;border-radius:14px;border:1px solid #cfe3de;background:linear-gradient(180deg,#fff,#f0f8f6);box-shadow:0 4px 10px rgba(11,75,68,.10);transition:transform .1s,box-shadow .1s}
.sx-tile:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(11,75,68,.18);border-color:#7bbab0}
.sx-tile:active{transform:scale(.98)}
.sx-tile:focus-visible,.sx-cat:focus-visible,.sx-chip:focus-visible,.sx-foot button:focus-visible,.sx-pm button:focus-visible,.sx-pay:focus-visible{outline:3px solid #ffb020;outline-offset:2px}
.sx-n{position:absolute;top:9px;left:9px;width:30px;height:30px;border-radius:50%;background:linear-gradient(180deg,#0f766e,#0b5f58);color:#fff;font-style:normal;font-weight:800;font-size:15px;display:grid;place-items:center;box-shadow:0 2px 5px rgba(15,118,110,.35);z-index:1}
.sx-img{width:100%;aspect-ratio:1/.72;display:grid;place-items:center;margin-top:2px}
.sx-img img{max-width:88%;max-height:100%;object-fit:contain;filter:drop-shadow(0 5px 5px rgba(15,23,42,.22))}
.sx-name{font-size:14px;font-weight:600;line-height:1.2;min-height:2.4em;display:flex;align-items:center;justify-content:center;color:#173b37}
.sx-price{font-size:19px;font-weight:800;color:#0f766e;letter-spacing:-.3px}
.sx-price small{font-size:12px;color:#66817c;font-weight:700}
.sx-flag{position:absolute;top:10px;right:10px;font-size:11px;font-weight:800;padding:3px 8px;border-radius:99px;background:#fff1d6;color:#a35a00;border:1px solid #ffd592}
.sx-flag.out{background:#fee2e2;color:#b91c1c;border-color:#fecaca}
.sx-tile.is-out .sx-img,.sx-tile.is-out .sx-name{opacity:.45}
.sx-cam{position:absolute;right:7px;top:36px;width:32px;height:32px;border-radius:50%;background:#fff;border:1px solid #c4ddd7;color:#0f766e;display:none;place-items:center;box-shadow:0 2px 6px rgba(0,0,0,.18)}
.sx-tile:hover .sx-cam,.sx-tile:focus-visible .sx-cam{display:grid}
.sx-empty{grid-column:1/-1;text-align:center;color:#66817c;padding:50px 10px;font-size:17px}
/* cart = the sale ticket: the most important part of the screen */
.sx-cart{grid-area:cart;position:relative;display:flex;flex-direction:column;min-height:0;margin:10px 6px 8px 12px;border-radius:20px;border:3px solid var(--navy);background:#fff;overflow:hidden;box-shadow:0 8px 22px rgba(11,41,39,.22)}
.sx-cart-h{flex:none;display:flex;align-items:center;gap:10px;padding:6px 14px;color:#fff;background:linear-gradient(180deg,#0f766e,#0b2927)}
.sx-cart-h b{display:block;font-size:20px;font-weight:800;line-height:1.1}
.sx-cart-h small{display:block;color:#cfe6e1;font-size:13px;font-weight:600}
.sx-badge{margin-left:auto;min-width:32px;height:32px;padding:0 8px;border-radius:16px;background:#ef3340;font-weight:800;font-size:16px;display:grid;place-items:center;box-shadow:0 2px 6px rgba(0,0,0,.3)}
.sx-thead,.sx-line{display:grid;grid-template-columns:22px 40px minmax(0,1fr) auto 92px 30px;gap:8px;align-items:center}
.sx-thead{flex:none;padding:4px 12px;background:#e8f4f1;border-bottom:2px solid #c8dfda;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#4a6e68}
.sx-thead .r{text-align:right}
.sx-thead span:nth-child(4){min-width:104px;text-align:center}
.sx-lines{flex:1;min-height:0;overflow:auto;padding:0 12px;background:#fff}
.sx-li{border-bottom:1px solid #e0eeea}
.sx-li:nth-child(even){background:#f8fcfb}
.sx-li.flash{animation:sxf 1s}
@keyframes sxf{from{background:#bfe6dc}to{background:transparent}}
.sx-line{padding:7px 0}
.sx-line .ix{font-size:14px;font-weight:800;color:#7a9a94;text-align:center}
.sx-line img{width:40px;height:44px;object-fit:contain}
.sx-line .nm{min-width:0;display:flex;flex-direction:column;gap:2px}
.sx-line .nm b{font-size:17px;font-weight:700;line-height:1.2;color:#102b29}
.sx-line .pr{font-size:13px;font-weight:600;color:#5b7c76}
.sx-line .amt{text-align:right;display:flex;flex-direction:column;align-items:flex-end;line-height:1.15}
.sx-line .amt b{font-size:19px;font-weight:800;color:#0b2927}
.sx-line .amt s{font-size:13px;color:#8aa39e}
.sx-q{display:flex;align-items:center;border-radius:12px;border:1px solid #c8dfda;background:linear-gradient(180deg,#fff,#edf7f4);overflow:hidden}
.sx-q button{width:34px;height:38px;border:0;background:transparent;color:#0f766e;display:grid;place-items:center}
.sx-q button:hover{background:#d8ebe6}
.sx-q .qv{width:auto;min-width:40px;padding:0 6px;font-size:19px;color:var(--ink)}
.sx-del{width:30px;height:36px;border:0;background:transparent;border-radius:10px;color:#7a9a94;display:grid;place-items:center}
.sx-del:hover{background:#fee2e2;color:#b91c1c}
.sx-bnote{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-2px 0 7px 70px;padding:3px 9px;border-radius:9px;font-size:12.5px;font-weight:600}
.sx-bnote.on{background:#e3f7ea;color:#14633a;border:1px solid #b7e6c9}
.sx-bnote.off{background:#f1f5f9;color:#475569;border:1px dashed #cbd5e1}
.sx-bnote.hint{background:#eef4ff;color:#27408b;border:1px solid #cfdcff}
.sx-bnote button{flex:none;border:1px solid currentColor;background:#fff;color:inherit;border-radius:8px;padding:1px 9px;font-size:12px}
.sx-cempty{height:100%;display:grid;place-content:center;justify-items:center;text-align:center;gap:6px;color:#7a9a94;padding:20px}
.sx-cempty b{font-size:22px;color:#365f59}
.sx-sum{flex:none;padding:4px 16px 0;border-top:2px solid #d8ebe6;background:linear-gradient(180deg,#f2f8f6,#e8f4f1)}
.sx-sum>div{display:flex;justify-content:space-between;font-size:15px;font-weight:700;padding:1px 0}
.sx-sum .sx-dsc{color:#15803d}
.sx-sum .tot{font-size:42px;font-weight:800;color:#102b29;align-items:baseline;padding:0 0 4px;line-height:1.05}
.sx-sum .tot span{font-size:20px;letter-spacing:.04em}
.sx-sum .tot b{color:#0f766e}
.sx-pm{flex:none;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:0 12px 8px;background:#e8f4f1}
.sx-pm button{height:42px;border:0;border-radius:11px;color:#fff;font-size:16px;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 3px 7px rgba(0,0,0,.22);opacity:.88}
.sx-pm .cash{background:linear-gradient(180deg,#ffb23a,#f08a00)}
.sx-pm .card{background:linear-gradient(180deg,#16877d,#1349c4)}
.sx-pm .ewallet{background:linear-gradient(180deg,#8f6bff,#6a3de0)}
.sx-pm button.on{opacity:1;outline:4px solid rgba(11,41,39,.45);outline-offset:-1px;transform:translateY(-1px)}
.sx-pay{flex:none;margin:0 12px 10px;height:54px;border:0;border-radius:14px;color:#fff;font-size:24px;display:flex;align-items:center;justify-content:center;gap:12px;background:linear-gradient(180deg,#26b857,#0e8a3a);box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 5px 12px rgba(14,138,58,.4)}
.sx-pay:disabled,.sx-foot button:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
.sx-pay .ck{width:32px;height:32px;border-radius:50%;background:#fff;color:#0e8a3a;display:grid;place-items:center}
/* expiration alert + bundle tags (on product tiles, cart lines, product list) */
.exp-flag{display:inline-block;width:fit-content;font-size:12px;font-weight:800;line-height:1.2;padding:2px 8px;border-radius:99px;border:1px solid transparent;white-space:nowrap}
.exp-expired{background:#dc2626;color:#fff;border-color:#991b1b;animation:expPulse 1.6s ease-in-out infinite}
.exp-today{background:#fee2e2;color:#b91c1c;border-color:#fca5a5}
.exp-urgent{background:#ffedd5;color:#c2410c;border-color:#fdba74}
.exp-soon{background:#fef9c3;color:#854d0e;border-color:#fde68a}
@keyframes expPulse{50%{box-shadow:0 0 0 4px rgba(220,38,38,.25)}}
.sx-exp{margin-top:5px;font-size:12.5px}
.sx-tile.is-exp-expired{border:2px solid #dc2626;background:linear-gradient(180deg,#fff5f5,#fee2e2)}
.sx-tile.is-exp-today,.sx-tile.is-exp-urgent{border:2px solid #f97316;background:linear-gradient(180deg,#fffaf5,#ffedd5)}
.sx-tile.is-exp-soon{border:2px solid #facc15}
.sx-bun{margin-top:4px;font-size:12px;font-weight:800;color:#14633a;background:#e3f7ea;border:1px solid #b7e6c9;border-radius:99px;padding:2px 8px}
.bundle-box{margin-top:14px;padding:12px;border:1px dashed #b7e6c9;border-radius:12px;background:#f3fbf6}
.bundle-box .row3{margin-top:6px}
.err-text{color:#b91c1c;font-weight:600}
/* footer */
.sx-foot{grid-area:foot;display:grid;grid-template-columns:repeat(5,1fr);gap:12px;padding:7px 14px 8px;background:linear-gradient(180deg,#e8f4f1,#d8ebe6);border-top:1px solid #c8dfda}
.sx-foot button{position:relative;display:flex;align-items:center;justify-content:center;gap:12px;border:1px solid #c8dfda;border-radius:14px;background:linear-gradient(180deg,#fff,#edf7f4);font-size:19px;color:var(--ink);box-shadow:0 4px 9px rgba(11,75,68,.12)}
.sx-foot button:not(:disabled):hover{border-color:#7bbab0;background:#fff}
.sx-foot .ico{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;color:#fff;background:#0f766e;flex:none}
.sx-foot .cnt{position:absolute;top:6px;right:12px;min-width:24px;height:24px;border-radius:12px;background:#ef3340;color:#fff;font-size:13px;display:grid;place-items:center;padding:0 6px}
/* menu modal */
.sx-menu{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:14px}
.sx-menu button{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid #c8dfda;border-radius:14px;background:linear-gradient(180deg,#fff,#f0f8f6);font-size:16px;text-align:left}
.sx-menu button:hover{border-color:#7bbab0;background:#fff}
.sx-menu .danger{color:#b91c1c}
/* tablets */
@media (max-width:1280px){
  .sx{grid-template-columns:minmax(0,1fr) minmax(340px,var(--cart-width,46%))}
  .sx-when b{font-size:22px}.sx-brand b{font-size:25px}.sx-brand small{font-size:14px}
  .sx-foot{gap:8px;padding:6px 10px 7px}.sx-foot button{font-size:16px;gap:8px;border-radius:12px}
  .sx-pay{font-size:21px;margin:0 10px 8px;height:50px}.sx-sum .tot{font-size:36px}
  .sx-thead,.sx-line{grid-template-columns:20px 34px minmax(0,1fr) auto 84px 28px;gap:6px}
  .sx-line img{width:34px;height:38px}.sx-line .nm b{font-size:15.5px}.sx-line .amt b{font-size:17px}
  .sx-q button{width:30px;height:36px}.sx-q .qv{min-width:32px;font-size:16px}
  .sx-bnote{margin-left:56px}
  .sx-pm{padding:0 10px 6px;gap:6px}.sx-pm button{font-size:15px;gap:5px;height:40px}.sx-pm button svg{width:20px;height:20px}
}
@media (max-width:980px){
  .sx{grid-template-columns:minmax(0,1fr) minmax(320px,var(--cart-width,52%))}
  .sx-who div,.sx-when small{display:none}.sx-top{gap:12px;padding:0 12px}
  .sx-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}
  .sx-thead span:nth-child(2),.sx-line img{display:none}
  .sx-thead,.sx-line{grid-template-columns:20px minmax(0,1fr) auto 80px 28px}
  .sx-thead span:nth-child(4){min-width:96px}.sx-bnote{margin-left:26px}
}
@media (max-width:700px){
  .sx{height:auto;min-height:100dvh;overflow:visible;grid-template-columns:minmax(0,1fr);grid-template-rows:64px auto auto auto;grid-template-areas:"top" "cart" "main" "foot"}
  .sx-top{position:sticky;top:0}.sx-brand div,.sx-when,.sx-who{display:none}.sx-logo{width:44px;height:44px}.sx-search{height:46px}.sx-gear{margin-left:0}
  .sx-cart{margin:10px}.sx-lines{max-height:44vh}.sx-sum .tot{font-size:34px}
  .sx-main{padding:4px 10px 10px}.sx-grid{max-height:none;overflow:visible;grid-template-columns:repeat(2,1fr)}
  .sx-foot{grid-template-columns:repeat(2,1fr);padding:10px;gap:8px}.sx-foot button{height:56px;font-size:16px}
}
@media (prefers-reduced-motion:reduce){.sx *{animation:none!important;transition:none!important}}
@media print{.sx{display:none}}
/* product photo editor + table thumbnails */
.photo-row{display:flex;gap:16px;align-items:center;margin:12px 0 4px;padding:12px;border:1px dashed #c8dfda;border-radius:14px;background:#f2f8f6}
.photo-box{width:104px;height:104px;border-radius:14px;background:#fff;border:1px solid #cfe3de;display:grid;place-items:center;flex:none;overflow:hidden}
.photo-box img{max-width:92%;max-height:92%;object-fit:contain}
.photo-btns{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 6px}
.thumb{width:46px;height:46px;border-radius:10px;border:1px solid var(--line);background:#fff;padding:2px;display:grid;place-items:center}
.thumb:hover{border-color:var(--pri)}
.thumb img{max-width:100%;max-height:100%;object-fit:contain}
/* fit the category chips on one row; keep notifications clear of the bottom bar */
.sx-chips{gap:8px}
.sx-chip{height:50px;padding:0 15px;font-size:16px;gap:7px}
.sx-chip .e{font-size:20px}
body:has(.sx) .toasts{bottom:auto;left:auto;right:14px;top:72px;transform:none;width:max-content;max-width:min(430px,46vw)}

.sx>*{min-width:0}
@media (max-width:700px){html,body{overflow-x:hidden}.sx-pm button{font-size:14px;gap:4px;padding:0 4px}.sx-pm button svg{width:18px;height:18px}.sx-chip{height:44px;font-size:15px}}

/* Resizable right-side Current Sale panel */
.sx-cart-resize{position:absolute;z-index:5;left:-5px;top:0;bottom:0;width:10px;cursor:col-resize;touch-action:none}
.sx-cart-resize:after{content:"";position:absolute;left:3px;top:45%;height:54px;width:4px;border-radius:8px;background:#72aaa0;opacity:.65}
.sx-cart-resize:hover:after{background:#0f766e;opacity:1}
body.sx-resizing{cursor:col-resize!important;user-select:none!important}
@media(max-width:700px){.sx-cart-resize{display:none}}

/* Customer-facing sale view mirrors the cashier Current Sale panel. */
.customer-screen{padding:18px;background:linear-gradient(160deg,#e8f4f1,#d8ebe6);color:#102b29}
.customer-head{max-width:none;margin:0 0 14px;padding:14px 20px;border-radius:16px;background:linear-gradient(90deg,#0b2927,#0f766e);box-shadow:0 3px 12px rgba(11,41,39,.2)}
.customer-head h1{font-size:clamp(20px,2.2vw,28px);line-height:1.15}
.customer-head p{font-size:13px;margin-top:4px}
.customer-layout{max-width:none;margin:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,320px);gap:14px;align-items:stretch}
.customer-screen .customer-card{width:auto;min-width:0;padding:0;border:3px solid #0b2927;border-radius:18px;overflow:hidden;box-shadow:0 8px 22px rgba(11,41,39,.16)}
.customer-sale-head{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;color:#fff;background:linear-gradient(180deg,#0f766e,#0b2927)}
.customer-sale-head h2{margin:0;color:#fff;font-size:19px}
.customer-sale-head small{font-size:12px;color:#cfe6e1}
.customer-sale-count{min-width:30px;height:30px;padding:0 8px;display:grid;place-items:center;border-radius:20px;background:#ef3340;color:#fff;font-weight:800}
.customer-sale-columns{display:grid;grid-template-columns:22px 42px minmax(0,1fr) 60px 92px;gap:8px;padding:6px 12px;background:#e8f4f1;color:#4a6e68;border-bottom:2px solid #c8dfda;font-size:11px;font-weight:800;text-transform:uppercase}
.customer-screen .customer-items{display:flex;flex-direction:column;max-height:calc(100vh - 205px);overflow:auto;padding:0 12px;background:#fff}
.customer-screen .customer-item{display:grid;grid-template-columns:22px 42px minmax(0,1fr) 60px 92px;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid #e0eeea}
.customer-screen .c-index{font-size:13px;font-weight:800;color:#7a9a94;text-align:center}
.customer-screen .c-product-img{width:42px;height:44px;object-fit:contain}
.customer-screen .c-product-info{min-width:0;display:flex;flex-direction:column;gap:2px}
.customer-screen .c-product-info b{font-size:14px;line-height:1.2;overflow-wrap:anywhere;color:#102b29}
.customer-screen .c-product-info small{font-size:11px;color:#5b7c76}
.customer-screen .customer-item .qty{font-size:12px;text-align:center;white-space:nowrap;color:#365f59}
.customer-screen .customer-item strong{font-size:14px;grid-column:auto;grid-row:auto;text-align:right;color:#0b2927;white-space:nowrap}
.customer-screen .customer-summary{display:flex;flex-direction:column;align-items:stretch;padding:0 14px 12px;background:#fff}
.customer-screen .customer-summary h2{margin:0 -14px 8px;padding:12px 14px;background:#e8f4f1;color:#173b37;font-size:17px}
.customer-screen .customer-summary .r-row{display:flex;justify-content:space-between;gap:8px;padding:8px 0;font-size:13px}
.customer-screen .customer-total{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:8px;padding:14px;background:#e8f4f1;border-radius:12px;color:#102b29}
.customer-screen .customer-total span{font-size:13px;font-weight:800}
.customer-screen .customer-total strong{font-size:clamp(22px,2.4vw,32px);color:#0f766e}
.customer-screen .customer-welcome{font-size:12px;line-height:1.4;margin:10px 0 0;color:#5b7c76}
.customer-screen .customer-pay{margin-top:10px;padding:10px;border-radius:12px;background:#f2f8f6}
.customer-screen .customer-change strong{font-size:22px}
.customer-screen .customer-empty{padding:35px 12px;text-align:center;color:#66817c}
@media(max-width:850px){
 .customer-screen{padding:10px}.customer-layout{grid-template-columns:minmax(0,1fr)}.customer-screen .customer-items{max-height:42vh}
 .customer-screen .customer-summary{display:flex}.customer-screen .customer-sale-columns,.customer-screen .customer-item{grid-template-columns:18px 36px minmax(0,1fr) 48px 78px;gap:5px}
 .customer-screen .c-product-img{width:36px;height:38px}.customer-screen .customer-item strong{font-size:12px}
}

/* Customer display: portrait/vertical composition at every viewport size. */
.customer-screen{min-height:100vh;padding:16px;}
.customer-screen .customer-head{max-width:900px;margin:0 auto 14px;}
.customer-screen .customer-layout{width:100%;max-width:900px;margin:0 auto;display:flex!important;flex-direction:column!important;align-items:stretch;gap:14px;}
.customer-screen .customer-sale,.customer-screen .customer-summary{width:100%;min-width:0;}
.customer-screen .customer-items{max-height:56vh;overflow-y:auto;}
.customer-screen .customer-sale-columns,
.customer-screen .customer-item{grid-template-columns:28px 52px minmax(0,1fr) 64px minmax(82px,110px)!important;gap:8px;}
.customer-screen .customer-item{padding:10px 0;}
.customer-screen .c-product-img{width:48px;height:50px;object-fit:contain;display:block;background:#f7faf9;border-radius:8px;}
.customer-screen .customer-item .qty{grid-column:4!important;grid-row:1!important;text-align:center!important;white-space:nowrap;}
.customer-screen .customer-item strong{grid-column:5!important;grid-row:1!important;text-align:right!important;white-space:nowrap;}
.customer-screen .c-product-info{overflow:hidden;}
.customer-screen .c-product-info b{overflow-wrap:anywhere;}
.customer-screen .customer-summary{position:static!important;display:flex!important;flex-direction:column;}
@media(max-width:520px){
 .customer-screen{padding:8px;}
 .customer-screen .customer-head{padding:12px;}
 .customer-screen .customer-sale-columns,.customer-screen .customer-item{grid-template-columns:20px 40px minmax(0,1fr) 48px 76px!important;gap:5px;}
 .customer-screen .c-product-img{width:38px;height:40px;}
 .customer-screen .customer-item{padding:9px 0;}
 .customer-screen .customer-item .qty{font-size:12px;}
 .customer-screen .customer-item strong{font-size:12px;}
 .customer-screen .customer-sale-columns{font-size:9px;padding:6px 8px;}
 .customer-screen .customer-items{max-height:52vh;padding:0 8px;}
}


/* Touch-friendly floating numeric keypad for Sell (POS). */
.sx{position:relative}
.sx-numpad{position:fixed;z-index:25;left:14px;bottom:78px;width:216px;padding:9px;border:1px solid #a8cec5;border-radius:15px;background:rgba(255,255,255,.97);box-shadow:0 10px 28px rgba(11,41,39,.28);backdrop-filter:blur(8px)}
.sx-numpad-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 2px 8px;color:#0b2927;font-size:14px}
.sx-numpad-head button{border:0;border-radius:8px;background:#e8f4f1;color:#0b5f58;padding:6px 10px;font-weight:800}
.sx-numpad-keys{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.sx-numpad-keys button{min-height:48px;border:1px solid #c8dfda;border-radius:10px;background:linear-gradient(180deg,#fff,#edf7f4);color:#102b29;font-size:21px;font-weight:800;box-shadow:0 2px 4px rgba(11,75,68,.10);touch-action:manipulation}
.sx-numpad-keys button:active{transform:scale(.96);background:#d8ebe6}
.sx-numpad-keys button.utility{background:#e8f4f1;color:#0f766e}
.sx-numpad-keys button.enter{background:linear-gradient(180deg,#16877d,#0b5f58);color:#fff;font-size:16px}
.sx-numpad.is-hidden{width:auto;padding:7px}
.sx-numpad.is-hidden .sx-numpad-keys{display:none}
.sx-numpad.is-hidden .sx-numpad-head{padding:0}
@media(max-width:700px){
 .sx-numpad{left:8px;bottom:68px;width:190px}
 .sx-numpad-keys button{min-height:44px}
}

/* Shared floating touch keypad for POS and Products */
.sx-numpad{position:fixed;z-index:80;left:14px;top:auto;bottom:78px;width:224px;min-width:190px;min-height:210px;height:auto;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);padding:9px 9px 15px;border:1px solid var(--line,#a8cec5);border-radius:15px;background:var(--surface,#fff);color:var(--ink,#102b29);box-shadow:0 10px 28px rgba(0,0,0,.28);backdrop-filter:blur(10px);resize:none;overflow:auto;touch-action:pan-y}
.sx-numpad-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 2px 8px;color:var(--ink,#0b2927);font-size:14px;cursor:move;touch-action:none;user-select:none}
.sx-numpad-head b{display:flex;align-items:center;gap:6px}
.sx-numpad-head button{width:30px;height:30px;border:0;border-radius:8px;background:var(--t-sub,#e8f4f1);color:var(--ink,#0b5f58);font-size:22px;line-height:1;cursor:pointer}
.sx-numpad-keys{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.sx-numpad-keys button{min-height:48px;border:1px solid var(--line,#c8dfda);border-radius:10px;background:var(--t-input,#fff);color:var(--ink,#102b29);font-size:21px;font-weight:800;box-shadow:0 2px 4px rgba(0,0,0,.10);touch-action:manipulation}
.sx-numpad-keys button:active{transform:scale(.96);background:var(--t-hover,#d8ebe6)}
.sx-numpad-keys button.utility{background:var(--t-sub,#e8f4f1);color:var(--t-pri-text,#0f766e)}
.sx-numpad-keys button.enter{background:var(--pri,#0b5f58);color:#fff;font-size:16px}
.sx-numpad-resize{position:absolute;right:2px;bottom:2px;width:22px;height:22px;cursor:nwse-resize;touch-action:none}
.sx-numpad-resize:after{content:"";position:absolute;right:4px;bottom:4px;width:11px;height:11px;border-right:3px solid var(--muted,#66817c);border-bottom:3px solid var(--muted,#66817c);border-radius:1px}
.sx-numpad-launch{width:40px;height:40px;min-width:40px;border:1px solid var(--line,#c8dfda);border-radius:12px;background:var(--surface,#fff);color:var(--t-pri-text,#0f766e);display:inline-grid;place-items:center;box-shadow:0 2px 7px rgba(0,0,0,.12);cursor:pointer;flex:none}
.sx-numpad-launch:hover{filter:brightness(.96);transform:translateY(-1px)}
body.theme-dark .sx-numpad{background:#182433;color:#e8eef6;border-color:#34465a;box-shadow:0 12px 32px rgba(0,0,0,.55)}
body.theme-dark .sx-numpad-head{color:#f1f5f9}
body.theme-dark .sx-numpad-head button{background:#26384b;color:#e8eef6}
body.theme-dark .sx-numpad-keys button{background:#243448;border-color:#40536a;color:#f1f5f9}
body.theme-dark .sx-numpad-keys button.utility{background:#31465c;color:#70c9c0}
body.theme-dark .sx-numpad-keys button.enter{background:#087f75;color:#fff}
body.theme-dark .sx-numpad-launch{background:#243448;border-color:#40536a;color:#70c9c0}
@media(max-width:700px){.sx-numpad{left:8px;bottom:68px;width:205px}.sx-numpad-keys button{min-height:46px}}
