/* POS-UMKM — tema terakota, diambil dari warna background Menara Kudus */
:root {
  --bg: #f7f1ec;
  --surface: #ffffff;
  --surface-2: #fbf7f3;
  --ink: #2a1a12;
  --ink-2: #6b5548;
  --ink-3: #9a8577;
  --line: #eadfd6;
  --line-2: #dccbbd;
  --terra: #c2502a;
  --terra-d: #9e3d1d;
  --orange: #e8692f;
  --tint: #fbe9df;
  --brown: #3a190b;
  --brown-2: #2a1107;
  --ok: #2f7d4f; --ok-bg: #e6f4ec;
  --warn: #a8670a; --warn-bg: #fdf1dc;
  --err: #b42318; --err-bg: #fde8e6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(58, 25, 11, .06), 0 4px 16px rgba(58, 25, 11, .06);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 15px; color: var(--ink); background: var(--bg); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--terra-d); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 18px; } h3 { font-size: 15px; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--ink-2); } .small { font-size: 13px; } .center { text-align: center; }
.right { text-align: right; } .nowrap { white-space: nowrap; } .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; } .hide { display: none !important; }

/* ---------- shell */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 236px; flex: none; color: #f6e6dc; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, rgba(42,17,7,.97) 0%, rgba(42,17,7,.92) 55%, rgba(42,17,7,.55) 100%), url(bg.jpg) 70% 100% / cover no-repeat, var(--brown-2);
}
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px 14px; }
.logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--orange), var(--terra-d)); letter-spacing: .02em; flex: none; }
.logo-lg { width: 64px; height: 64px; font-size: 24px; border-radius: 16px; }
.brand-name { font-weight: 800; font-size: 16px; color: #fff; }
.brand-sub { font-size: 12px; color: #d9b8a5; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; overflow-y: auto; flex: 1; }
.side nav a, .side-out { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #f0dccf; font-weight: 500; font-size: 14px; }
.side nav a:hover, .side-out:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.side nav a.on { background: var(--terra); color: #fff; }
.side-out { margin: 8px 10px 16px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top h1 { font-size: 19px; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-r { display: flex; align-items: center; gap: 10px; }
.who { display: flex; flex-direction: column; line-height: 1.15; font-size: 13px; text-align: right; }
.who small { color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.chip-ok { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.chip-warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.chip-err { background: var(--err-bg); border-color: transparent; color: var(--err); }
.branch-sw select { padding: 6px 30px 6px 10px; font-size: 13px; font-weight: 600; min-height: 34px; }
.content { padding: 24px; max-width: 1280px; width: 100%; }
.only-m { display: none !important; }
.icon-btn { border: 0; background: none; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--ink); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }
.scrim { display: none; }

/* ---------- elements */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .grid > .stat + .card { margin-top: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h2 { margin: 0; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .lbl { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.stat .val { font-size: 24px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.stat.hl { background: linear-gradient(135deg, var(--terra), var(--terra-d)); color: #fff; border: 0; }
.stat.hl .lbl, .stat.hl .sub { color: #f9d9c8; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
label > input, label > select, label > textarea { margin-top: 5px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; min-height: 44px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--terra); box-shadow: 0 0 0 3px rgba(194,80,42,.15); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b5548' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 500; color: var(--ink); }
label.check input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--terra); }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { margin: 0; }
.inline-form input, .inline-form select { width: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 14px; padding: 10px 16px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--terra); border-color: var(--terra); color: #fff; }
.btn-primary:hover { background: var(--terra-d); }
.btn-dark { background: var(--brown); border-color: var(--brown); color: #fff; }
.btn-dark:hover { background: var(--brown-2); }
.btn-danger { background: #fff; border-color: #f0c2bd; color: var(--err); }
.btn-danger:hover { background: var(--err-bg); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn-lg { min-height: 54px; font-size: 16px; padding: 14px 20px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; font-weight: 500; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-err { background: var(--err-bg); color: var(--err); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.b-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.b-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.b-err { background: var(--err-bg); color: var(--err); border-color: transparent; }

.tbl-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
tfoot td { font-weight: 800; border-top: 2px solid var(--line-2); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--terra-d); border-color: var(--terra); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-bottom: 16px; }
.seg a { flex: 1; text-align: center; padding: 8px; border-radius: 8px; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.seg a.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.seg a:hover { text-decoration: none; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters label { margin: 0; }
.filters input, .filters select { width: auto; min-width: 140px; }
.list-bars .bar { height: 8px; border-radius: 4px; background: var(--tint); overflow: hidden; margin-top: 4px; }
.list-bars .bar i { display: block; height: 100%; background: var(--terra); }

/* ---------- modal */
.modal { position: fixed; inset: 0; background: rgba(42,17,7,.45); display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-box.wide { max-width: 760px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-h h2 { margin: 0; }
.modal-b { padding: 20px; }

/* ---------- login */
.login-body { background: var(--brown-2); }
.login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.login-art { background: url(bg.jpg) center / cover no-repeat, var(--brown-2); position: relative; display: flex; align-items: flex-start; padding: 48px; }
.login-art-txt { color: #fff; max-width: 320px; }
.login-art-txt h2 { font-size: 34px; font-weight: 800; margin: 18px 0 6px; letter-spacing: -.02em; }
.login-art-txt p { color: #f2d3c2; font-size: 16px; margin: 0; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--bg); }
.login-card { width: 100%; max-width: 380px; }
.login-card.install { max-width: 480px; }
.login-card h1 { font-size: 26px; margin-bottom: 4px; }
.login-card h3 { margin-top: 22px; color: var(--terra-d); }
.login-head { margin-bottom: 20px; }
.login-head p { margin: 0; color: var(--ink-2); }
.pin-input { text-align: center; font-size: 26px; letter-spacing: .5em; font-weight: 700; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.keypad button { min-height: 58px; font: inherit; font-size: 22px; font-weight: 700; border: 1px solid var(--line-2); background: #fff; border-radius: 12px; cursor: pointer; color: var(--ink); }
.keypad button:active { background: var(--tint); }
.checks { list-style: none; padding: 0; margin: 0 0 16px; font-size: 13px; }
.checks li { padding: 3px 0; }
.checks .ok { color: var(--ok); } .checks .no { color: var(--err); font-weight: 700; }

/* ---------- POS */
.pos-body .content { max-width: none; padding: 0; }
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: calc(100vh - 59px); }
.pos-left { display: flex; flex-direction: column; min-width: 0; padding: 16px; gap: 12px; overflow: hidden; }
.pos-search { position: relative; }
.pos-search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.pos-search input { padding-left: 44px; min-height: 52px; font-size: 17px; border-radius: 12px; }
.pos-results { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); z-index: 30; max-height: 360px; overflow: auto; }
.pos-results button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: #fff; font: inherit; text-align: left; cursor: pointer; border-bottom: 1px solid var(--line); }
.pos-results button:hover, .pos-results button.act { background: var(--tint); }
.pos-results small { color: var(--ink-3); display: block; }
.pos-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; flex: none; }
.pos-tabs button { flex: none; border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.pos-tabs button.on { background: var(--brown); color: #fff; border-color: var(--brown); }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; overflow-y: auto; align-content: start; flex: 1; padding-bottom: 8px; }
.tile { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 92px; box-shadow: var(--shadow); color: var(--ink); }
.tile:hover { border-color: var(--terra); }
.tile:active { transform: scale(.98); }
.tile b { font-size: 14px; font-weight: 600; line-height: 1.25; }
.tile .p { margin-top: auto; font-weight: 800; color: var(--terra-d); font-size: 15px; }
.tile .s { font-size: 12px; color: var(--ink-3); }
.tile.ppob { background: linear-gradient(160deg, #fff 0%, var(--tint) 100%); }
.tile.ppob .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--terra); color: #fff; }
.tile.low .s { color: var(--err); font-weight: 600; }

.pos-right { background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cart-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cart-h h2 { margin: 0; font-size: 16px; }
.cart { flex: 1; overflow-y: auto; padding: 4px 16px; }
.cart-empty { color: var(--ink-3); text-align: center; padding: 48px 12px; font-size: 14px; }
.ci { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px dashed var(--line-2); }
.ci-name { font-weight: 600; font-size: 14px; }
.ci-sub { font-size: 12px; color: var(--ink-3); }
.ci-tot { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.qty { justify-self: start; display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.qty button { width: 36px; height: 34px; border: 0; background: var(--surface-2); font-size: 18px; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.qty input { width: 48px; min-height: 34px; border: 0; border-radius: 0; text-align: center; padding: 0; font-weight: 700; }
.ci-act { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.ci .del { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 6px; border-radius: 8px; }
.ci .del:hover { color: var(--err); background: var(--err-bg); }
.cart-f { border-top: 1px solid var(--line); padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--surface-2); }
.sumrow { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }
.sumrow.total { font-size: 22px; font-weight: 800; color: var(--ink); margin: 6px 0 12px; }
.paybtn { width: 100%; min-height: 60px; font-size: 18px; border-radius: 14px; }
.cash-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 14px; }
.cash-quick button { min-height: 48px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.cash-quick button:active { background: var(--tint); }
.pay-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.pay-methods button { min-height: 44px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.pay-methods button.on { background: var(--brown); color: #fff; border-color: var(--brown); }
.change { text-align: center; padding: 14px; background: var(--ok-bg); border-radius: 12px; color: var(--ok); margin-bottom: 14px; }
.change b { display: block; font-size: 28px; }
.change.minus { background: var(--err-bg); color: var(--err); }
.big-input { font-size: 26px; font-weight: 800; text-align: right; min-height: 60px; }
.ppob-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 14px; }
.ppob-cats button { border: 1px solid var(--line-2); border-radius: 12px; background: #fff; padding: 12px 8px; font: inherit; font-weight: 700; cursor: pointer; font-size: 14px; }
.ppob-cats button.on { background: var(--terra); color: #fff; border-color: var(--terra); }
.ppob-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; margin-bottom: 14px; }
.ppob-prods button { border: 1px solid var(--line-2); border-radius: 12px; background: #fff; padding: 10px 12px; font: inherit; text-align: left; cursor: pointer; }
.ppob-prods button b { display: block; font-size: 13.5px; }
.ppob-prods button span { color: var(--terra-d); font-weight: 800; }
.ppob-prods button.on { border-color: var(--terra); box-shadow: 0 0 0 2px var(--terra) inset; background: var(--tint); }
.ppob-confirm { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.ppob-confirm .no { font-size: 24px; font-weight: 800; letter-spacing: .04em; }
.ppob-status { text-align: center; padding: 18px; border-radius: 12px; margin-bottom: 14px; font-weight: 600; }
.ppob-status.pending { background: var(--warn-bg); color: var(--warn); }
.ppob-status.success { background: var(--ok-bg); color: var(--ok); }
.ppob-status.failed { background: var(--err-bg); color: var(--err); }
.ppob-status .sn { font-family: ui-monospace, Menlo, monospace; font-size: 18px; margin-top: 6px; color: var(--ink); word-break: break-all; }
.spin { width: 22px; height: 22px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: sp 0.8s linear infinite; vertical-align: middle; }
@keyframes sp { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--brown); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 200; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--err); }

/* ---------- receipt (58mm) */
.receipt-page { background: #eee; }
.receipt { width: 58mm; margin: 16px auto; background: #fff; padding: 4mm 3mm; font-family: ui-monospace, 'Courier New', monospace; font-size: 11px; line-height: 1.35; color: #000; }
.receipt .c { text-align: center; } .receipt .r { text-align: right; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 4px 0; }
.receipt table { font-size: 11px; } .receipt td { padding: 1px 0; border: 0; } .receipt tbody tr:hover td { background: none; }
.receipt .b { font-weight: 700; } .receipt .big { font-size: 13px; }
.receipt-actions { width: 58mm; margin: 0 auto 24px; display: flex; flex-direction: column; gap: 8px; }
@media print {
  @page { size: 58mm auto; margin: 0; }
  body, .receipt-page { background: #fff; }
  .receipt { margin: 0; width: 58mm; padding: 2mm; }
  .receipt-actions { display: none; }
}

/* ---------- responsive */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pos { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 860px) {
  .only-m { display: inline-grid !important; }
  .login-head .only-m { display: grid !important; margin-bottom: 12px; }
  .side { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; }
  .top { padding: 10px 14px; }
  .who, .branch-sw + .chip { display: none; }
  .content { padding: 14px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-body { background: var(--bg); }
  .pos { grid-template-columns: 1fr; height: auto; }
  .pos-left { overflow: visible; }
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); overflow: visible; }
  .pos-right { position: sticky; bottom: 0; border-left: 0; border-top: 1px solid var(--line); max-height: 60vh; box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
  .pos-right .cart { max-height: 30vh; }
  .cart-empty { padding: 14px 12px; }
  .cart-f { padding-top: 10px; }
  .sumrow.total { font-size: 19px; margin: 2px 0 8px; }
  .paybtn { min-height: 52px; }
  .grid2 { grid-template-columns: 1fr; }
  .tbl-wrap { margin: 0 -14px; padding: 0 14px; }
  .card { padding: 16px; }
  .top-r .chip-ok, .top-r .chip-warn { font-size: 11.5px; padding: 4px 8px; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: 1fr 1fr; } .stat .val { font-size: 20px; } .branch-sw select { max-width: 120px; } }
