/* =========================================================
   HITTONIC — POS หน้าร้าน · pos.css (ออกแบบสำหรับแท็บเล็ต แนวนอน/แนวตั้ง)
   ========================================================= */
:root {
  --bg: #0b0b0c; --bg-2: #111114; --card: #17171b; --card-2: #1e1e24; --line: #2a2a31; --line-2: #3a3a43;
  --text: #f4f4f5; --muted: #9a9aa6; --red: #e10a2f; --red-2: #b8061f; --red-soft: rgba(225,10,47,.14);
  --green: #22c55e; --yellow: #f5b50b; --blue: #3b82f6;
  --head: "Chakra Petch", "IBM Plex Sans Thai", sans-serif;
  --font: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --cart-w: 390px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
input, textarea { user-select: text; -webkit-user-select: text; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i { width: 17px; height: 17px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
button, a, input, select, textarea { touch-action: manipulation; font: inherit; }
button { cursor: pointer; }
input, select, textarea { color: var(--text); background: #0e0e11; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 11px 13px; width: 100%; font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); }
label { display: block; font-size: 13.5px; font-weight: 600; margin: 14px 0 6px; color: #d4d4d8; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 15px; border: 0; border-radius: 12px;
  padding: 12px 18px; text-decoration: none; white-space: nowrap; color: var(--text); transition: transform .08s, background .15s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:not(:disabled):hover { background: var(--red-2); }
.btn-ghost { background: rgba(255,255,255,.06); border: 1.5px solid var(--line-2); }
.btn-white { background: #fff; color: #111; }
.btn-green { background: #16a34a; color: #fff; }
.btn-lg { padding: 15px 20px; font-size: 17px; }
.btn-block { width: 100%; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 14px; padding: 6px 4px; }
.link-btn:hover { color: #fff; }

/* login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at 50% 0%, rgba(225,10,47,.25), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px 24px; }
.login-logo { width: 160px; height: auto; margin: 0 auto 14px; display: block; }
.login-card h1 { font-family: var(--head); font-size: 26px; text-align: center; }
.login-card > p { text-align: center; margin: 4px 0 8px; }
.login-card .btn { margin-top: 20px; }

/* layout */
.app { height: 100%; display: flex; flex-direction: column; }
.ph { flex: none; height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 14px; background: #000; border-bottom: 1px solid var(--line); }
.ph-brand { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-weight: 700; font-size: 19px; letter-spacing: 1px; flex: none; }
.ph-brand img { width: 44px; height: auto; }
.ph-brand em { color: var(--red); font-style: normal; }
.ph-brand small { font-family: var(--font); font-size: 11.5px; background: var(--red); padding: 2px 8px; border-radius: 999px; letter-spacing: 0; }
.ph-search { flex: 1; min-width: 0; max-width: 620px; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1.5px solid var(--line-2); border-radius: 14px; padding: 0 6px 0 12px; margin: 0; }
.ph-search:focus-within { border-color: var(--red); }
.ph-search svg { color: var(--muted); }
.ph-search input { border: 0; background: transparent; padding: 11px 4px; }
.ph-search input::-webkit-search-cancel-button { display: none; }
.ph-search button { border: 0; background: var(--card-2); color: var(--muted); width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.ph-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.ph-btn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--card-2); color: #fff; display: grid; place-items: center; }
.ph-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--red); color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; animation: blink 2s infinite; }
.ph-chip b { background: #fff; color: var(--red); border-radius: 999px; padding: 0 7px; font-size: 12.5px; }
@keyframes blink { 50% { box-shadow: 0 0 0 6px rgba(225,10,47,.25); } }
.net { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.net i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.net.off i { background: var(--yellow); box-shadow: 0 0 0 3px rgba(245,181,11,.2); }
.net.off { color: var(--yellow); }

.pbody { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr var(--cart-w); }
.catalog { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.cats { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 12px 14px 8px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; border: 1.5px solid var(--line-2); background: transparent; color: #d4d4d8; font-size: 14.5px; font-weight: 600; padding: 9px 15px; border-radius: 999px; }
.cats button em { font-style: normal; color: var(--muted); margin-left: 5px; font-weight: 500; font-size: 13px; }
.cats button.on { background: var(--red); border-color: var(--red); color: #fff; }
.cats button.on em { color: #ffd0d8; }
.grid { flex: 1; overflow-y: auto; padding: 6px 14px 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; grid-auto-rows: max-content; -webkit-overflow-scrolling: touch; }
.grid-more { flex: none; text-align: center; font-size: 13px; margin: 0; padding: 0 0 10px; }
.tile { position: relative; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; text-align: left; color: var(--text); padding: 0; transition: border-color .12s, transform .08s; }
.tile:active { transform: scale(.97); border-color: var(--red); }
.tile-img { aspect-ratio: 1; background: #fff; display: grid; place-items: center; position: relative; }
.tile-img img { width: 100%; height: 100%; object-fit: contain; }
.tile-ph { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--head); font-size: 26px; font-weight: 700; color: rgba(255,255,255,.85); }
.tile-body { padding: 8px 10px 10px; display: grid; gap: 2px; }
.tile-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tile-price { font-family: var(--head); font-weight: 700; font-size: 17px; }
.tile-stock { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: #d4d4d8; white-space: nowrap; }
.tile-stock.low { background: rgba(245,181,11,.18); color: #fcd34d; }
.tile-stock.out { background: var(--red-soft); color: #ff8fa3; }
.tile-qty { position: absolute; top: 8px; right: 8px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 12px; border: 1.5px dashed var(--line-2); border-radius: 16px; }

/* cart */
.cart { min-height: 0; display: flex; flex-direction: column; background: var(--bg-2); border-left: 1px solid var(--line); }
.cart-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; }
.cart-head h2 { font-family: var(--head); font-size: 20px; flex: 1; }
.cart-head h2 span { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 500; }
.cart-back { display: none; width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--card-2); color: #fff; place-items: center; }
.cart-list { flex: 1; overflow-y: auto; padding: 0 12px; -webkit-overflow-scrolling: touch; }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.cart-empty svg { width: 46px; height: 46px; color: #3a3a43; margin: 0 auto 8px; display: block; }
.ci { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.ci-img { width: 46px; height: 46px; border-radius: 10px; background: #fff; overflow: hidden; display: grid; place-items: center; }
.ci-img img { width: 100%; height: 100%; object-fit: contain; }
.ci-img .tile-ph { font-size: 15px; }
.ci-mid { min-width: 0; }
.ci-name { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-price { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 2px 0; text-decoration: underline dotted; text-underline-offset: 3px; }
.ci-price.edited { color: #fcd34d; }
.ci-right { display: grid; justify-items: end; gap: 4px; }
.ci-total { font-family: var(--head); font-weight: 700; font-size: 16px; }
.stepper { display: inline-flex; align-items: center; background: var(--card-2); border-radius: 10px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; border: 0; background: transparent; color: #fff; display: grid; place-items: center; }
.stepper button:active { background: var(--line-2); }
.stepper svg { width: 16px; height: 16px; }
.stepper b { min-width: 30px; text-align: center; font-size: 15px; }
.cart-foot { flex: none; padding: 12px 14px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: grid; gap: 6px; background: #0d0d10; }
.tot-row { display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: #d4d4d8; border: 0; background: none; padding: 2px 2px; }
.tot-row b { font-family: var(--head); font-size: 17px; color: #fff; }
.tot-disc span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: underline dotted; text-underline-offset: 3px; }
.tot-disc b { color: #fcd34d; }
.btn-pay { justify-content: space-between; padding: 16px 20px; font-size: 18px; border-radius: 16px; margin-top: 4px; }
.btn-pay b { font-family: var(--head); font-size: 26px; }

.cartbar { display: none; }

/* แท็บเล็ตแนวตั้ง / มือถือ: บิลเป็นแผ่นเลื่อนขึ้น */
@media (max-width: 899px) {
  .ph { gap: 10px; padding: 0 10px; }
  .ph-brand span, .net span, .ph-chip span { display: none; }
  .pbody { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); padding-bottom: 90px; }
  .cart { position: fixed; inset: 0; z-index: 60; transform: translateY(100%); transition: transform .25s ease; border-left: 0; }
  body.cart-open .cart { transform: none; }
  .cart-back { display: grid; }
  .cartbar { position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 50; display: flex; align-items: center; gap: 10px;
    background: var(--red); color: #fff; border: 0; border-radius: 16px; padding: 14px 16px; font-size: 15px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
  .cartbar b { font-family: var(--head); font-size: 22px; }
  .cartbar em { margin-left: auto; font-style: normal; font-weight: 600; font-size: 14px; }
  .cartbar.empty { background: var(--card-2); }
}

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.72); display: flex; align-items: flex-end; justify-content: center; }
.modal-box { position: relative; width: 100%; max-width: 520px; max-height: 94vh; max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + var(--safe-b)); animation: up .2s ease-out; }
.modal-wide { max-width: 760px; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@media (min-width: 640px) { .modal { align-items: center; padding: 16px; } .modal-box { border-radius: 22px; } }
.modal-box h3 { font-family: var(--head); font-size: 21px; margin-bottom: 4px; padding-right: 40px; }
.mclose { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--card-2); color: #fff; display: grid; place-items: center; z-index: 2; }
.modal-actions { display: flex; gap: 8px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

/* pay */
.pay-amt { text-align: center; margin: 6px 0 14px; }
.pay-amt small { color: var(--muted); }
.pay-amt b { display: block; font-family: var(--head); font-size: 46px; line-height: 1.1; }
.pay-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay-tabs button { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border-radius: 14px; border: 1.5px solid var(--line-2); background: transparent; color: #d4d4d8; font-weight: 600; font-size: 14px; }
.pay-tabs button svg { width: 26px; height: 26px; }
.pay-tabs button.on { border-color: var(--red); background: var(--red-soft); color: #fff; box-shadow: 0 0 0 1px var(--red) inset; }
.cash-in { font-family: var(--head); font-size: 30px; text-align: right; padding: 10px 14px; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.quick button { padding: 13px 4px; border-radius: 12px; border: 0; background: var(--card-2); color: #fff; font-family: var(--head); font-weight: 700; font-size: 18px; }
.quick button:active { background: var(--line-2); }
.quick .q-exact { background: rgba(34,197,94,.16); color: #86efac; font-family: var(--font); font-size: 15px; }
.change { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #0e0e11; }
.change b { font-family: var(--head); font-size: 28px; color: var(--green); }
.change.neg b { color: var(--red); }
.qr-box { text-align: center; background: #fff; color: #111; border-radius: 18px; padding: 16px; margin-top: 12px; }
.qr-box img { width: 240px; height: 240px; margin: 0 auto; image-rendering: pixelated; display: block; }
.qr-box b { display: block; font-family: var(--head); font-size: 24px; }
.qr-box small { color: #52525b; }
.pp-head { display: flex; align-items: center; justify-content: center; gap: 8px; background: #113566; color: #fff; border-radius: 10px; padding: 6px; font-weight: 700; margin-bottom: 8px; }
.note-box { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #0e0e11; color: #d4d4d8; font-size: 14px; }

/* numpad / editor */
.big-in { font-family: var(--head); font-size: 28px; text-align: right; }
.seg { display: flex; gap: 4px; background: #0e0e11; padding: 4px; border-radius: 12px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 9px; border-radius: 9px; font-weight: 600; }
.seg button.on { background: var(--card-2); color: #fff; }

/* receipt */
.rc-done { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rc-done i { width: 40px; height: 40px; border-radius: 50%; background: var(--green); display: grid; place-items: center; flex: none; }
.rc-done i svg { color: #fff; stroke-width: 3; }
.rc-done b { font-size: 18px; display: block; }
.rc-wrap { background: #e9e9ee; border-radius: 14px; padding: 14px; max-height: 52vh; overflow-y: auto; }
.rc-wrap canvas, .rc-wrap img { display: block; width: 100%; max-width: 300px; margin: 0 auto; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.rc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.rc-actions .btn-red { grid-column: 1 / -1; }

/* menu / lists */
.menu-list { display: grid; gap: 6px; margin-top: 10px; }
.menu-list button, .menu-list a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: transparent; color: #fff; text-decoration: none; font-weight: 600; text-align: left; }
.menu-list svg { color: var(--red); }
.menu-list em { margin-left: auto; font-style: normal; background: var(--red); border-radius: 999px; padding: 0 8px; font-size: 12.5px; }
.menu-list .danger { color: #ff8fa3; }
.bill-list { display: grid; gap: 6px; margin-top: 10px; }
.bill { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; border-radius: 14px; background: #0e0e11; border: 1.5px solid transparent; text-align: left; color: #fff; }
.bill:hover { border-color: var(--line-2); }
.bill small { color: var(--muted); font-size: 12.5px; }
.bill b { font-family: var(--head); font-size: 17px; text-align: right; }
.bill.void { opacity: .55; }
.bill.void b { text-decoration: line-through; }
.sum-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.sum-row div { background: #0e0e11; border-radius: 12px; padding: 10px; }
.sum-row small { display: block; color: var(--muted); font-size: 12px; }
.sum-row b { font-family: var(--head); font-size: 19px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); margin: 0; font-weight: 500; font-size: 15px; color: #fff; }
.opt small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.switch { appearance: none; -webkit-appearance: none; width: 50px !important; height: 30px; padding: 0 !important; border-radius: 999px; background: #3a3a43; border: 0 !important; position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(20px); }
.warn-box { display: flex; gap: 10px; background: rgba(245,181,11,.12); color: #fcd34d; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-top: 10px; }
.warn-box svg { flex: none; }

/* toast / loading */
.toast { position: fixed; left: 50%; top: 76px; transform: translate(-50%, -10px); width: max-content; max-width: calc(100vw - 32px); background: #fff; color: #18181b; padding: 12px 18px; border-radius: 12px;
  font-size: 15px; font-weight: 600; z-index: 300; opacity: 0; pointer-events: none; transition: all .2s; box-shadow: 0 10px 30px rgba(0,0,0,.5); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--red); color: #fff; }
.toast.success { background: #16a34a; color: #fff; }
.loading { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 250; }
.spinner { width: 40px; height: 40px; border: 4px solid #3a3a43; border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* กะ */
.shift-chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid rgba(34,197,94,.45); background: rgba(34,197,94,.12); color: #86efac; padding: 8px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.shift-chip svg { width: 17px; height: 17px; }
.shift-chip.off { border-color: rgba(225,10,47,.6); background: var(--red-soft); color: #ff8fa3; animation: blink 2s infinite; }
.shift-chip.stale { border-color: rgba(245,181,11,.6); background: rgba(245,181,11,.12); color: #fcd34d; }
@media (max-width: 899px) { .shift-chip span { max-width: 74px; overflow: hidden; text-overflow: ellipsis; } }
.clock-big { text-align: center; margin: 4px 0 6px; }
.clock-big b { display: block; font-family: var(--head); font-size: 54px; line-height: 1.05; }
.clock-big small { color: var(--muted); }
.kv { display: grid; gap: 6px; margin-top: 10px; }
.kv div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; background: #0e0e11; border-radius: 12px; font-size: 14.5px; }
.kv b { font-family: var(--head); font-size: 17px; }
.kv .hl { background: rgba(34,197,94,.12); }
.kv .hl b { color: #86efac; font-size: 22px; }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.act-grid button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: transparent; color: #fff; text-align: left; font-weight: 600; }
.act-grid button svg { color: var(--red); width: 24px; height: 24px; }
.act-grid button small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.act-grid .wide { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: center; background: var(--red); border-color: var(--red); }
.act-grid .wide svg { color: #fff; }
.chips2 { display: flex; flex-wrap: wrap; gap: 6px; }
.chips2 button { border: 1.5px solid var(--line-2); background: transparent; color: #d4d4d8; padding: 9px 13px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.chips2 button.on { border-color: var(--red); background: var(--red-soft); color: #fff; }
.denoms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.denoms label { margin: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); text-align: center; }
.denoms input { text-align: center; padding: 9px 4px; font-family: var(--head); font-size: 18px; }
.diff { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: #0e0e11; font-weight: 600; }
.diff b { font-family: var(--head); font-size: 26px; }
.diff.ok b { color: var(--green); } .diff.over b { color: var(--yellow); } .diff.short b { color: #ff8fa3; }
.ld-list { display: grid; gap: 6px; margin-top: 10px; }
.ld { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #0e0e11; font-size: 14px; }
.ld small { display: block; color: var(--muted); font-size: 12px; }
.ld b { font-family: var(--head); white-space: nowrap; }
.ld .in { color: #86efac; } .ld .out { color: #ff8fa3; }
.ld.void { opacity: .45; text-decoration: line-through; }
.job-list { display: grid; gap: 6px; max-height: 40vh; overflow-y: auto; margin-top: 8px; }
.job { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; padding: 11px 13px; border-radius: 12px; border: 1.5px solid var(--line-2); background: transparent; color: #fff; }
.job.on { border-color: var(--red); background: var(--red-soft); }
.job small { color: var(--muted); font-size: 12.5px; }
.job b { font-family: var(--head); text-align: right; }
.photo-pick { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.photo-pick img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
a.ph-btn { text-decoration: none; }

/* ติดตั้งเป็นแอป */
.menu-list .hl { border-color: var(--red); background: var(--red-soft); }
.steps-ol { margin: 12px 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.55; }
.steps-ol b { color: #fff; }

/* เพิ่ม / แก้ไขสินค้าที่หน้าร้าน */
.tile-new { border-style: dashed; border-color: var(--line-2); background: transparent; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 14px 10px; min-height: 100%; color: var(--muted); }
.tile-new svg { width: 40px; height: 40px; padding: 8px; border-radius: 999px; background: var(--red-soft); color: var(--red); stroke: currentColor; fill: none; stroke-width: 2.4; }
.tile-new b { color: #fff; font-size: 15px; }
.tile-new small { font-size: 12px; line-height: 1.45; }
.empty-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.choice { display: grid; gap: 10px; margin-top: 12px; }
.choice button { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; align-items: center; text-align: left; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line-2); background: rgba(255,255,255,.04); color: #fff; }
.choice button:active { border-color: var(--red); }
.choice svg { grid-row: span 2; width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--red-soft); color: var(--red); stroke: currentColor; fill: none; stroke-width: 2.2; }
.choice b { font-size: 16px; }
.choice small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qp-top { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: start; margin-top: 8px; }
.qp-photo { margin: 0; position: relative; aspect-ratio: 1; border-radius: 16px; border: 1.5px dashed var(--line-2); background: #fff; overflow: hidden; display: grid; place-items: center; cursor: pointer; }
.qp-photo img { width: 100%; height: 100%; object-fit: contain; }
.qp-photo span { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 5px; font-size: 12px; background: rgba(0,0,0,.65); color: #fff; }
.qp-photo span:only-child { inset: 0; flex-direction: column; background: var(--card-2); color: var(--muted); font-size: 13px; }
.qp-photo span svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.qp-photo span:only-child svg { width: 30px; height: 30px; }
@media (max-width: 520px) { .row-2 { grid-template-columns: 1fr; gap: 0; } .qp-top { grid-template-columns: 92px 1fr; } }
#el-prod { color: #ff8fa3; text-decoration: underline; padding: 0; font-size: inherit; }
.bt-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1.5px solid var(--line-2); font-size: 14px; }
.bt-box span { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #52525b; display: inline-block; flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
#pr-mode button { white-space: nowrap; font-size: 14px; padding: 9px 4px; }
.ph-install { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--red); background: var(--red-soft); color: #fff; font-weight: 700; white-space: nowrap; }
.ph-install svg { color: var(--red); }
@media (max-width: 900px) { .ph-install span { display: none; } .ph-install { padding: 0 11px; } }
.menu-list em.off { background: #3a3a43; }
#pr-mode { flex-wrap: wrap; } #pr-mode button { flex: 1 1 18%; }
/* ชุดเซ็ต / ราคาก่อนลด */
.tile-kit { position: absolute; left: 8px; top: 8px; background: #111; color: #fcd34d; border: 1px solid #fcd34d; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.tile-price s { margin-left: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.ci-kit { font-size: 11.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
/* ตัวเลือกสินค้า (สี/ขนาด) */
.tile-opt { top: auto; bottom: 8px; color: #93c5fd; border-color: #93c5fd; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
.opt-grid button { display: grid; gap: 2px; text-align: left; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: rgba(255,255,255,.04); color: #fff; font: inherit; cursor: pointer; }
.opt-grid button b { font-size: 16px; }
.opt-grid button small { color: var(--muted); font-size: 12.5px; }
.opt-grid button:active { border-color: var(--red); background: rgba(225,10,47,.15); }
.opt-grid button.out { opacity: .55; }
.modal-box.nudge { animation: nudge .35s ease; }
@keyframes nudge { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
/* v16: โปรลดราคาที่หน้าร้าน */
.tile-promo { font-style: normal; color: #e10a2f; }
.ci-promo { display: inline-block; font-size: 11.5px; font-weight: 700; color: #fff; background: #e10a2f; border-radius: 6px; padding: 0 6px; margin: 2px 0; }
/* ปรับตำแหน่งพิมพ์ (โหมดคอม) */
.pr-cal-row { display: grid; grid-template-columns: 70px auto 1fr auto; align-items: center; gap: 8px; margin: 6px 0; }
.pr-cal-row b { text-align: center; font-size: 15px; }
.pr-cal-row span { font-size: 14px; color: var(--muted, #71717a); }
/* พักบิล (v33) */
.cart-head-acts { display: inline-flex; gap: 14px; align-items: center; }
.hold-chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #f59e0b; background: rgba(245,158,11,.12); color: #fbbf24; padding: 7px 12px; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.hold-chip svg { width: 16px; height: 16px; }
.hold-chip b { background: #f59e0b; color: #111; border-radius: 999px; padding: 0 7px; font-size: 12.5px; }
@media (max-width: 760px) { .hold-chip span { display: none; } }
.hold-list { display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; margin-top: 8px; }
.hold-item { border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px; background: rgba(255,255,255,.03); }
.hold-top { display: flex; justify-content: space-between; gap: 10px; }
.hold-top span { font-weight: 700; color: #fff; }
.hold-item p { margin: 6px 0 8px; font-size: 13.5px; color: #c4c4cc; }
.hold-acts { display: flex; justify-content: space-between; gap: 8px; }
.rc-actions #rc-save { grid-column: auto; }
.hold-acts .btn-row { display: inline-flex; gap: 6px; }
