/* ===== 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:190px minmax(0,1fr) 400px;grid-template-rows:76px minmax(0,1fr) 74px;
  grid-template-areas:"top top top" "side main cart" "foot 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:54px;height:54px;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:31px;line-height:1;font-weight:800;letter-spacing:-.5px;white-space:nowrap}
.sx-brand small{display:block;color:#d8ebe6;font-size:17px;font-weight:700;margin-top:3px}
.sx-search{flex:1;min-width:140px;max-width:560px;display:flex;align-items:center;gap:10px;height:50px;padding:0 8px 0 16px;border-radius:26px;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:28px;line-height:1.05;font-weight:800;letter-spacing:.2px}
.sx-when small{color:#e3ecff;font-size:15px;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:46px;height:46px;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:19px;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)}
/* sidebar */
.sx-side{grid-area:side;display:flex;flex-direction:column;gap:6px;padding:12px 10px;background:linear-gradient(180deg,#0b2927,#071f1e);color:#fff;min-height:0}
.sx-cats{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:4px;scrollbar-width:thin;scrollbar-color:#4b8178 transparent}
.sx-cat{display:flex;align-items:center;gap:12px;width:100%;text-align:left;border:0;border-radius:14px;padding:10px 12px;min-height:50px;background:transparent;color:#e8f4f1;font-size:15px;line-height:1.15}
.sx-cat span.e{font-size:23px;width:30px;text-align:center;flex:none;filter:saturate(.9)}
.sx-cat:hover{background:rgba(255,255,255,.09)}
.sx-cat.on{background:linear-gradient(180deg,#0f766e,#0b5f58);box-shadow:inset 0 1px 0 rgba(255,255,255,.4),0 4px 10px rgba(0,0,0,.3);color:#fff}
.sx-stat{flex:none;background:rgba(255,255,255,.08);border-radius:14px;padding:10px 12px;display:grid;gap:8px;font-size:13px;font-weight:700}
.sx-stat div{display:flex;align-items:center;gap:8px;line-height:1.2}
.sx-dot{width:12px;height:12px;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:12px;padding:14px 16px;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(176px,1fr));grid-auto-rows:max-content;gap:14px;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:10px 10px 12px;border-radius:18px;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/.82;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:15.5px;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:23px;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:9px;bottom:48px;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 */
.sx-cart{grid-area:cart;display:flex;flex-direction:column;min-height:0;margin:14px 16px 12px 0;border-radius:22px;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:12px;padding:12px 16px;color:#fff;background:linear-gradient(180deg,#0f766e,#0b2927)}
.sx-cart-h b{font-size:28px;font-weight:800}
.sx-badge{margin-left:auto;min-width:34px;height:34px;padding:0 8px;border-radius:17px;background:#ef3340;font-weight:800;font-size:17px;display:grid;place-items:center;box-shadow:0 2px 6px rgba(0,0,0,.3)}
.sx-lines{flex:1;min-height:0;overflow:auto;padding:4px 16px}
.sx-line{display:grid;grid-template-columns:50px 1fr auto auto;gap:10px;align-items:center;padding:11px 0;border-bottom:1px solid #e0eeea}
.sx-line.flash{animation:sxf .8s}
@keyframes sxf{from{background:#d8ebe6}to{background:transparent}}
.sx-line img{width:50px;height:56px;object-fit:contain}
.sx-line .nm{font-size:15.5px;font-weight:600;line-height:1.2;min-width:0}
.sx-line .pr{display:block;font-size:19px;font-weight:800;color:#0f766e;margin-top:2px}
.sx-line .pr small{font-size:11.5px;color:#66817c}
.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:36px;border:0;background:transparent;color:#0f766e;display:grid;place-items:center}
.sx-q button:hover{background:#d8ebe6}
.sx-q .qv{width:auto;min-width:38px;padding:0 6px;font-size:17px;color:var(--ink)}
.sx-del{width:38px;height:38px;border:0;background:transparent;border-radius:10px;color:#173b37;display:grid;place-items:center}
.sx-del:hover{background:#fee2e2;color:#b91c1c}
.sx-cempty{height:100%;display:grid;place-content:center;text-align:center;gap:6px;color:#66817c;padding:20px}
.sx-cempty b{font-size:18px;color:#365f59}
.sx-sum{flex:none;padding:8px 16px 0;border-top:2px solid #d8ebe6;background:linear-gradient(180deg,#f2f8f6,#e8f4f1)}
.sx-sum>div{display:flex;justify-content:space-between;font-size:16.5px;font-weight:700;padding:4px 0}
.sx-sum .tot{font-size:36px;font-weight:800;color:#102b29;align-items:baseline;padding:2px 0 8px}
.sx-sum .tot b{color:#0f766e}
.sx-pm{flex:none;display:grid;grid-template-columns:repeat(3,1fr);gap:9px;padding:0 14px 10px;background:#e8f4f1}
.sx-pm button{height:54px;border:0;border-radius:12px;color:#fff;font-size:18px;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 14px 14px;height:64px;border:0;border-radius:16px;color:#fff;font-size:26px;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:38px;height:38px;border-radius:50%;background:#fff;color:#0e8a3a;display:grid;place-items:center}
/* footer */
.sx-foot{grid-area:foot;display:grid;grid-template-columns:repeat(5,1fr);gap:16px;padding:10px 24px 14px;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:20px;background:linear-gradient(180deg,#fff,#edf7f4);font-size:22px;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:38px;height:38px;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:76px minmax(0,1fr) 350px}
  .sx-cat{justify-content:center;padding:10px 4px}.sx-cat span:not(.e){display:none}
  .sx-stat div span:last-child{display:none}
  .sx-when b{font-size:22px}.sx-brand b{font-size:25px}.sx-brand small{font-size:14px}
  .sx-foot{gap:10px;padding:8px 14px 12px}.sx-foot button{font-size:17px;gap:8px;border-radius:16px}
  .sx-pay{font-size:22px;margin:0 10px 10px;height:58px}.sx-sum .tot{font-size:30px}
  .sx-cart{margin:12px 12px 10px 0}.sx-cart-h b{font-size:24px}
  .sx-pm{padding:0 10px 8px;gap:6px}.sx-pm button{font-size:15px;gap:5px;height:48px}.sx-pm button svg{width:20px;height:20px}
  .sx-lines{padding:2px 10px}.sx-sum{padding:6px 12px 0}
  .sx-line{grid-template-columns:40px 1fr auto auto;gap:6px}.sx-line img{width:40px;height:46px}
  .sx-q button{width:28px}.sx-q .qv{min-width:30px;font-size:15px}.sx-del{width:30px}
  .sx-line .nm{font-size:14px}.sx-line .pr{font-size:17px}
}
@media (max-width:980px){
  .sx{grid-template-columns:minmax(0,1fr) 320px;grid-template-areas:"top top" "main cart" "foot foot"}
  .sx-side{display:none}
  .sx-who div,.sx-when small{display:none}.sx-top{gap:12px;padding:0 12px}
  .sx-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
}
@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" "main" "cart" "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-main{padding:10px}.sx-grid{max-height:none;overflow:visible;grid-template-columns:repeat(2,1fr)}
  .sx-cart{margin:0 10px 10px}.sx-lines{max-height:36vh}
  .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;right:auto;top:88px;left:50%;transform:translateX(-50%);width:max-content;max-width:min(520px,92vw)}

.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}}
