/* Layar kasir — melengkapi _ui/ui.css (token warna sama, terang/gelap). Dioptimalkan untuk tablet sentuh. */
html, body { overscroll-behavior: none; }
.no-scrollbar { scrollbar-width: none; } .no-scrollbar::-webkit-scrollbar { display: none; }
.btn { justify-content: center; height: 2.75rem; border-radius: .75rem; font-size: .9rem; touch-action: manipulation; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-ghost { background: var(--surface-2); border-color: transparent; }
.btn-good { background: var(--good); border-color: var(--good); color: #fff; }
.btn-danger { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.input { height: 2.6rem; border-radius: .7rem; font-size: .9rem; }
textarea.input { height: auto; padding: .6rem .7rem; }
.icon-btn { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: .7rem; flex-shrink: 0; }
.badge-dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* tab visit purpose & kategori */
.tab { height: 2.25rem; padding: 0 .9rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--ink-2);
  background: var(--surface-2); white-space: nowrap; border: 1px solid transparent; touch-action: manipulation; }
.tab.on { background: var(--brand); color: #fff; }
.chip { height: 2.1rem; padding: 0 .8rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.chip.on { background: var(--ink); color: var(--page); border-color: var(--ink); }
.chip-btn { display: flex; align-items: center; gap: .4rem; height: 2.6rem; padding: 0 .8rem; border-radius: .7rem;
  background: var(--surface-2); font-size: .85rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-btn.set { background: var(--brand-soft); color: var(--brand-ink); }

/* kartu menu */
.mcard { position: relative; display: flex; flex-direction: column; text-align: left; border-radius: .9rem; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); min-height: 112px; transition: transform .08s, box-shadow .15s; touch-action: manipulation; }
.mcard:active { transform: scale(.97); }
.mcard:hover { box-shadow: 0 4px 14px rgba(0,0,0,.07); }
.mcard .ph { width: 100%; height: 64px; display: grid; place-items: center; font-weight: 800; font-size: 1.25rem; letter-spacing: .04em; }
.mcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.mcard .bd { width: 100%; padding: .5rem .6rem .6rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.mcard .nm { font-size: .82rem; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard .pr { margin-top: auto; font-size: .82rem; font-weight: 700; color: var(--brand-ink); }
.mcard .qty { position: absolute; top: 6px; right: 6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  background: var(--ink); color: var(--page); font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.mcard.sold { opacity: .45; pointer-events: none; }
.mcard.sold::after { content: 'HABIS'; position: absolute; top: 22px; left: 0; right: 0; text-align: center; font-weight: 800; color: #fff; letter-spacing: .1em; }

/* panel pesanan */
.order-panel { width: 400px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); }
@media (max-width: 1023px) {
  .order-panel { position: fixed; inset: 0; z-index: 40; width: auto; border: 0; transform: translateY(100%); transition: transform .2s ease; }
  .order-panel.open { transform: none; }
}
.stepper { display: flex; align-items: center; height: 2.6rem; border-radius: .7rem; background: var(--surface-2); overflow: hidden; }
.stepper button { width: 2.4rem; height: 100%; font-size: 1.15rem; font-weight: 700; color: var(--ink-2); touch-action: manipulation; }
.stepper button:active { background: var(--line); }
.stepper span { min-width: 1.8rem; text-align: center; font-weight: 700; font-size: .9rem; }
.stepper.sm { height: 2rem; } .stepper.sm button { width: 2rem; font-size: 1rem; }
.line { display: grid; grid-template-columns: 1fr auto; gap: .15rem .5rem; padding: .55rem .5rem; border-radius: .7rem; }
.line + .line { border-top: 1px solid var(--line); }
.line.new { background: var(--brand-soft); border-top-color: transparent; margin-bottom: 2px; }
.line .nm { font-size: .85rem; font-weight: 600; }
.line .sub { font-size: .75rem; color: var(--muted); }
.line.void .nm, .line.void .amt { text-decoration: line-through; color: var(--muted); }
.batch-h { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .6rem .5rem .2rem; }
.st { font-size: .62rem; font-weight: 700; padding: .05rem .4rem; border-radius: 999px; }
.st-13 { background: var(--warn-bg); color: var(--warn); } .st-34 { background: var(--good-bg); color: var(--good); }
.st-14 { background: var(--surface-2); color: var(--ink-2); } .st-19 { background: var(--bad-bg); color: var(--bad); }
.tot { display: flex; justify-content: space-between; color: var(--ink-2); }
.tot.grand { color: var(--ink); font-size: 1.15rem; font-weight: 800; padding-top: .3rem; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,10,8,.5); backdrop-filter: blur(2px); }
.modal-box { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface);
  border-radius: 1.25rem; box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: pop .16s ease-out; }
.modal-box.wide { max-width: 980px; } .modal-box.mid { max-width: 760px; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.mh { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.mh h3 { font-weight: 700; font-size: 1.05rem; flex: 1; }
.mb { padding: 1.25rem; } .mf { padding: 1rem 1.25rem; border-top: 1px solid var(--line); display: flex; gap: .5rem; justify-content: flex-end; position: sticky; bottom: 0; background: var(--surface); }

/* meja */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .6rem; }
.tcell { aspect-ratio: 1.15; border-radius: 1rem; border: 2px solid var(--line); background: var(--surface); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .15rem; touch-action: manipulation; }
.tcell .tn { font-size: 1.3rem; font-weight: 800; }
.tcell .ti { font-size: .7rem; color: var(--muted); }
.tcell.busy { border-color: var(--brand); background: var(--brand-soft); }
.tcell.busy .ti { color: var(--brand-ink); font-weight: 600; }
.tcell.cur { outline: 3px solid var(--ink); outline-offset: 2px; }

/* PIN */
.pin-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); }
.pin-dot.on { background: var(--brand); border-color: var(--brand); }
.pin-key { height: 3.6rem; border-radius: 1rem; background: var(--surface-2); font-size: 1.35rem; font-weight: 700; touch-action: manipulation; }
.pin-key:active { background: var(--line); }
.ucard { display: flex; align-items: center; gap: .6rem; padding: .6rem; border-radius: .9rem; border: 1px solid var(--line); text-align: left; min-height: 3.6rem; }
.ucard.on { border-color: var(--brand); background: var(--brand-soft); }
.avatar { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: #fff; flex-shrink: 0; }
.bcard { padding: .6rem; border-radius: .9rem; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; }
.bcard img { height: 38px; max-width: 100%; object-fit: contain; }
.bcard.on { border-color: var(--brand); background: var(--brand-soft); }

/* bayar */
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .pay-grid { grid-template-columns: 1fr; } }
.pm { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; border-radius: .8rem; border: 1px solid var(--line); font-weight: 600; font-size: .85rem; text-align: left; }
.pm.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.pm .ic { width: 1.9rem; height: 1.9rem; border-radius: .55rem; display: grid; place-items: center; font-size: .65rem; font-weight: 800; color: #fff; flex-shrink: 0; }
.amount-big { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.keypad button { height: 3.1rem; border-radius: .8rem; background: var(--surface-2); font-size: 1.2rem; font-weight: 700; }
.keypad button:active { background: var(--line); }
.quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.quick button { flex: 1 1 30%; height: 2.6rem; border-radius: .7rem; border: 1px solid var(--line); font-weight: 700; font-size: .85rem; }

/* QRIS */
.qr-wrap { position: relative; width: min(320px, 78vw); aspect-ratio: 1; margin: 0 auto; padding: 18px; border-radius: 1.5rem; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 18px 40px -12px rgba(217,72,15,.35); }
.qr-wrap svg { width: 100%; height: 100%; display: block; }
.qr-scan { position: absolute; left: 18px; right: 18px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--brand), transparent);
  animation: scan 2.4s ease-in-out infinite; opacity: .7; }
@keyframes scan { 0%, 100% { top: 18px; } 50% { top: calc(100% - 21px); } }
.qr-badge { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px; background: var(--surface-2); font-size: .78rem; font-weight: 600; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217,72,15,.6); } 100% { box-shadow: 0 0 0 10px rgba(217,72,15,0); } }
.success-ring { width: 96px; height: 96px; border-radius: 50%; background: var(--good-bg); display: grid; place-items: center; margin: 0 auto; animation: pop .3s ease-out; }
.success-ring svg { width: 52px; height: 52px; color: var(--good); stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .15s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; padding: .7rem 1.1rem; border-radius: .8rem;
  background: var(--ink); color: var(--page); font-size: .85rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.toast.err { background: var(--bad); color: #fff; }
.list-row { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-radius: .8rem; border: 1px solid var(--line); text-align: left; width: 100%; }
.list-row:hover { background: var(--surface-2); }
.menu-list button { display: flex; width: 100%; align-items: center; gap: .6rem; padding: .7rem .8rem; border-radius: .7rem; font-size: .9rem; font-weight: 500; text-align: left; }
.menu-list button:hover { background: var(--surface-2); }
.opt { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .7rem; border-radius: .7rem; border: 1px solid var(--line); font-size: .85rem; }
.opt.on { border-color: var(--brand); background: var(--brand-soft); }
