/* Orbitrix POS — demo styles */
:root {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --ink: #0e1526;
  --ink-2: #4a5468;
  --muted: #8a93a6;
  --line: #e5e8f0;
  --line-2: #eef0f5;
  --brand: #5b4cf0;
  --brand-ink: #4436d8;
  --brand-soft: #eeecff;
  --cyan: #22d3ee;
  --good: #0f9d6b;
  --good-soft: #e3f6ee;
  --warn: #b86e00;
  --warn-soft: #fff3dc;
  --bad: #d92d4b;
  --bad-soft: #fde8ec;
  --night: #0b1020;
  --night-2: #151b31;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 21, 38, .06), 0 1px 1px rgba(14, 21, 38, .04);
  --shadow: 0 6px 24px -8px rgba(14, 21, 38, .16), 0 2px 6px rgba(14, 21, 38, .05);
  --shadow-lg: 0 30px 80px -20px rgba(14, 21, 38, .35), 0 10px 30px -10px rgba(14, 21, 38, .2);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --topbar-h: 60px;
  /* chart series (validated categorical order) */
  --s-cash: #2a78d6;
  --s-gcash: #eb6834;
  --s-maya: #1baf7a;
  --s-card: #eda100;
  --s-bar: #5b4cf0;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-feature-settings: "cv11", "ss01";
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { outline: none; }
a { color: inherit; text-decoration: none; }
.num, .money { font-variant-numeric: tabular-nums; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 22px; height: 22px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px;
  background: radial-gradient(1200px 120px at 30% -40px, rgba(91, 76, 240, .45), transparent 70%), var(--night);
  color: #e8ebf7;
  position: relative; z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.brand { display: flex; align-items: center; gap: 9px; flex: none; }
.brand-mark { width: 48px; height: 32px; object-fit: contain; }
.brand-text { font-size: 16px; letter-spacing: -.01em; }
.brand-text b { font-weight: 800; }
.brand-text span { color: #9aa3c7; font-weight: 600; }
.store-chip {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
  font-size: 12.5px; white-space: nowrap; min-width: 0;
}
.store-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }
.store-name { font-weight: 600; }
.store-loc { color: #9aa3c7; }
.view-switch {
  position: relative; display: flex; margin: 0 auto; padding: 4px; border-radius: 12px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08);
}
.vs-btn {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: #aab2d4;
  transition: color .2s var(--ease);
}
.vs-btn[aria-selected="true"] { color: #0b1020; }
.vs-indicator {
  position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 9px; background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  transition: transform .28s var(--ease), width .28s var(--ease);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; font-weight: 600; font-size: 13.5px;
  white-space: nowrap; transition: transform .12s var(--ease), background .15s, box-shadow .15s, border-color .15s, color .15s;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-ghost-dark { color: #c9cfea; border: 1px solid rgba(255, 255, 255, .12); }
.btn-ghost-dark:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.btn-cta {
  color: #0b1020; background: linear-gradient(135deg, #a5f3fc, #c4b5fd);
  box-shadow: 0 6px 20px -6px rgba(165, 243, 252, .55);
}
.btn-cta:hover { box-shadow: 0 8px 26px -6px rgba(196, 181, 253, .8); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(91, 76, 240, .7); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-dark { background: var(--night); color: #fff; }
.btn-dark:hover { background: var(--night-2); }
.btn-good { background: var(--good); color: #fff; box-shadow: 0 6px 16px -6px rgba(15, 157, 107, .7); }
.btn-good:hover { filter: brightness(1.05); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-soft { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.btn-soft:hover { border-color: #cfd4e2; background: #fff; }
.btn-line { border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.btn-line:hover { color: var(--ink); border-color: #cfd4e2; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; color: var(--ink-2);
  transition: background .15s, color .15s, transform .12s;
}
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }

main { height: calc(100% - var(--topbar-h)); position: relative; }
.view { position: absolute; inset: 0; display: none; }
.view.active { display: block; animation: viewIn .26s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Chips, pills, misc ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 13px; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { color: var(--ink); border-color: #cfd4e2; }
.chip.active { background: var(--night); color: #fff; border-color: var(--night); }
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.pill .i { width: 12px; height: 12px; }
.pill-good { background: var(--good-soft); color: var(--good); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-brand { background: var(--brand-soft); color: var(--brand-ink); }
.pill-mute { background: var(--line-2); color: var(--ink-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; color: #fff; flex: none;
}
.avatar.violet { background: linear-gradient(135deg, #7c6cf6, #5b4cf0); }
.avatar.teal { background: linear-gradient(135deg, #2bc4c4, #0e8fa8); }
.avatar.owner { background: linear-gradient(135deg, #f59e8b, #e0567a); }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line); background: #fff; font-size: 11px; color: var(--muted); font-weight: 600; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty .i { width: 34px; height: 34px; stroke-width: 1.5; color: #c3c9d8; margin-bottom: 8px; }

/* ---------- Cashier ---------- */
.pos { display: grid; grid-template-columns: 1fr 400px; height: 100%; }
.catalog { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.catalog-head { display: flex; gap: 10px; padding: 16px 16px 10px; }
.search {
  flex: 1; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91, 76, 240, .12); }
.search .i { color: var(--muted); }
.search input { flex: 1; border: 0; background: transparent; font-size: 15px; min-width: 0; height: 100%; }
.search input::placeholder { color: #a1a9ba; }
.scan-btn { height: 48px; border-radius: 12px; }
.chips { display: flex; gap: 8px; padding: 0 16px 12px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.grid-wrap { flex: 1; overflow-y: auto; padding: 2px 16px 24px; min-height: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile {
  position: relative; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; min-height: 124px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm);
  transition: transform .1s var(--ease), box-shadow .15s, border-color .15s; touch-action: manipulation;
}
.tile:hover { border-color: #d3d8e6; box-shadow: var(--shadow); }
.tile:active, .tile.press { transform: scale(.965); }
.tile .t-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.tile .t-ico .i { width: 16px; height: 16px; }
.tile .t-name { font-weight: 600; font-size: 13.5px; line-height: 1.25; letter-spacing: -.005em; }
.tile .t-meta { font-size: 11.5px; color: var(--muted); }
.tile .t-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.tile .t-price { font-weight: 700; font-size: 15px; }
.tile .t-stock { font-size: 11px; color: var(--muted); font-weight: 600; }
.tile .t-stock.low { color: var(--warn); }
.tile .t-stock.out { color: var(--bad); }
.tile .t-qty {
  position: absolute; top: 10px; right: 10px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--brand);
  color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 4px 10px -2px rgba(91, 76, 240, .6);
  animation: pop .22s var(--ease);
}
.tile.out { opacity: .5; }
.tile .sc-tag { position: absolute; top: 12px; right: 12px; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.tile.in-cart .sc-tag { display: none; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.cat-otc { background: #e8f0fe; color: #2a62c9; }
.cat-maint { background: #fde9ef; color: #c3305a; }
.cat-rx { background: #fff1de; color: #b86e00; }
.cat-vit { background: #e3f6ee; color: #0f8a5f; }
.cat-care { background: #e6f6fb; color: #0e7ea3; }
.cat-snack { background: #f2ecff; color: #6a4ad8; }

.cart {
  display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--line); min-height: 0; height: 100%;
}
.cart-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.cashier-pill { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 12px; min-width: 0; transition: background .15s; }
.cashier-pill:hover { background: var(--line-2); }
.cashier-pill .cp-name { font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.cashier-pill .cp-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.cart-head .spacer { flex: 1; }
.cart-head { gap: 4px; }
.cashier-pill .cp-text { text-align: left; min-width: 0; overflow: hidden; }
.cashier-pill .cp-name, .cashier-pill .cp-sub { display: block; overflow: hidden; text-overflow: ellipsis; }
.cashier-pill .cp-sub .i { vertical-align: -2px; }
@media (max-width: 1180px) { .cart-head .es-label { display: none; } .cart-head .btn-sm { padding: 0 9px; } }
.cart-title { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 4px; }
.cart-title h3 { margin: 0; font-size: 15px; }
.cart-lines { flex: 1; overflow-y: auto; padding: 4px 8px; min-height: 0; }
.line {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; padding: 10px 8px; border-radius: 10px; align-items: center;
}
.line.new { animation: lineIn .16s var(--ease); }
.mobile-only { display: none; }
.line + .line { border-top: 1px solid var(--line-2); }
.line.bump { animation: bump .22s var(--ease); }
@keyframes lineIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes bump { 0% { background: var(--brand-soft); } 100% { background: transparent; } }
.line .l-name { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.line .l-sub { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.line .l-amt { font-weight: 700; text-align: right; font-size: 14px; }
.line .l-amt s { display: block; color: var(--muted); font-weight: 500; font-size: 11.5px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 34px; height: 32px; display: grid; place-items: center; color: var(--ink-2); }
.qty button:hover { background: var(--line-2); color: var(--ink); }
.qty button:active { background: var(--brand-soft); }
.qty input { width: 40px; height: 32px; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-weight: 700; font-size: 13.5px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.line .l-ctrl { display: flex; align-items: center; gap: 6px; }
.line .l-del { width: 32px; height: 32px; color: var(--muted); }
.line .l-del:hover { color: var(--bad); background: var(--bad-soft); }
.cart-empty { height: 100%; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 24px; }
.cart-empty .ce-art { width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px dashed #d4d9e5; }
.cart-empty .ce-art .i { width: 30px; height: 30px; stroke-width: 1.6; color: #aab2c5; }
.cart-empty b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.cart-foot { border-top: 1px solid var(--line); padding: 12px 14px 14px; background: var(--surface-2); }
.disc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.disc-btn { height: 42px; justify-content: flex-start; padding: 0 12px; }
.disc-applied {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; margin-bottom: 12px;
  background: linear-gradient(135deg, #f1efff, #ecfbff); border: 1px solid #dcd7ff; animation: lineIn .18s var(--ease);
}
.disc-applied .da-ico { width: 32px; height: 32px; border-radius: 9px; background: #fff; display: grid; place-items: center; color: var(--brand); box-shadow: var(--shadow-sm); }
.disc-applied .da-t { font-weight: 700; font-size: 13px; }
.disc-applied .da-s { font-size: 11.5px; color: var(--ink-2); }
.disc-applied .icon-btn { margin-left: auto; width: 30px; height: 30px; }
.sums { display: grid; gap: 5px; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.sums .row { display: flex; justify-content: space-between; gap: 12px; }
.sums .row b { color: var(--ink); font-weight: 600; }
.sums .row.disc b { color: var(--good); }
.total-row { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 0 12px; }
.total-row span { font-weight: 600; color: var(--ink-2); }
.total-row strong { font-size: 30px; letter-spacing: -.02em; font-weight: 800; }
.pay-row { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.pay-row .btn-lg { font-size: 16px; }
.charge-btn { background: linear-gradient(135deg, #5b4cf0, #7a5cf6); color: #fff; box-shadow: 0 10px 24px -10px rgba(91, 76, 240, .9); }
.charge-btn:hover { filter: brightness(1.06); }
.mobile-cartbar { display: none; }

/* ---------- Modal / sheet ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(9, 13, 28, .5); backdrop-filter: blur(3px); animation: fade .16s ease; }
.modal {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden; animation: modalIn .2s var(--ease);
}
.modal.lg { width: min(860px, 100%); }
.modal.md { width: min(680px, 100%); }
.modal.sm { width: min(440px, 100%); }
.modal-wrap.closing .modal { animation: modalOut .14s ease forwards; }
.modal-wrap.closing .modal-backdrop { animation: fade .14s ease reverse forwards; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes modalOut { to { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.modal-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.modal-foot .grow { flex: 1; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.input, .select, .textarea {
  height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14.5px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: 72px; padding: 10px 12px; resize: none; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91, 76, 240, .12); }
.input.err { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(217, 45, 75, .1); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; padding: 4px; background: var(--line-2); border-radius: 12px; gap: 4px; margin-bottom: 16px; }
.seg button { flex: 1; height: 38px; border-radius: 9px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 7px; transition: background .15s, color .15s, box-shadow .15s; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.reason-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.reason-chips .chip { height: 32px; font-size: 12.5px; }
.reason-chips .chip.active { background: var(--brand-soft); color: var(--brand-ink); border-color: #c9c2ff; }
.breakdown { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.breakdown .row { display: flex; justify-content: space-between; padding: 9px 14px; font-size: 13.5px; }
.breakdown .row + .row { border-top: 1px solid var(--line-2); }
.breakdown .row.sub { color: var(--ink-2); }
.breakdown .row.neg b { color: var(--good); }
.breakdown .row.total { background: var(--surface-2); font-weight: 700; font-size: 15px; }
.note { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.note .i { width: 16px; height: 16px; margin-top: 1px; color: var(--brand); }
.note.warn { background: var(--warn-soft); border-color: #f6dca8; color: #7a4b00; }
.note.warn .i { color: var(--warn); }
.linkish { color: var(--brand-ink); font-weight: 600; font-size: 12.5px; }
.linkish:hover { text-decoration: underline; }

/* Payment */
.pay { display: grid; grid-template-columns: 180px 1fr; min-height: 440px; }
.pay-methods { padding: 14px; border-right: 1px solid var(--line); background: var(--surface-2); display: grid; gap: 6px; align-content: start; }
.pm {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 12px; border-radius: 12px; font-weight: 600; color: var(--ink-2);
  border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.pm:hover { background: #fff; color: var(--ink); }
.pm.active { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.pm .pm-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.pm .pm-ico .i { width: 16px; height: 16px; }
.m-cash { background: var(--s-cash); }
.m-gcash { background: var(--s-gcash); }
.m-maya { background: var(--s-maya); }
.m-card { background: var(--s-card); }
.m-split { background: var(--night); }
.pay-panel { padding: 18px 20px; display: flex; flex-direction: column; }
.due { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.due span { font-weight: 600; color: var(--ink-2); }
.due strong { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.tender-display {
  display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 16px; border-radius: 14px; border: 2px solid var(--brand);
  box-shadow: 0 0 0 4px rgba(91, 76, 240, .1); margin-bottom: 10px;
}
.tender-display span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tender-display input { border: 0; text-align: right; font-size: 28px; font-weight: 800; width: 60%; letter-spacing: -.02em; background: transparent; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.quick .btn { height: 44px; padding: 0 6px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.keypad button { height: 48px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 18px; font-weight: 700; transition: background .1s, transform .08s; display: grid; place-items: center; }
.keypad button:hover { background: #fff; }
.keypad button:active { transform: scale(.95); background: var(--brand-soft); }
.change {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 14px; margin-bottom: 12px;
  background: var(--good-soft); color: var(--good); transition: background .2s, color .2s;
}
.change span { font-weight: 600; }
.change strong { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.change.short { background: var(--bad-soft); color: var(--bad); }
.pay-panel .btn-lg { margin-top: auto; }
.ewallet { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: center; margin-bottom: 16px; }
.qr { width: 170px; height: 170px; border-radius: 16px; padding: 12px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr .qr-badge { position: absolute; inset: 0; margin: auto; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; border: 3px solid #fff; }
.ewallet h4 { margin: 0 0 6px; font-size: 16px; }
.ewallet p { margin: 0 0 10px; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.card-term { display: grid; place-items: center; padding: 18px; border-radius: 16px; border: 1px dashed #cfd4e2; background: var(--surface-2); margin-bottom: 16px; text-align: center; }
.card-term .ct-ico { width: 64px; height: 64px; border-radius: 18px; background: var(--night); color: #fff; display: grid; place-items: center; margin-bottom: 10px; }
.card-term .ct-ico .i { width: 30px; height: 30px; }
.card-term b { display: block; margin-bottom: 2px; }
.processing { display: inline-flex; align-items: center; gap: 10px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.split-list { display: grid; gap: 6px; margin-bottom: 12px; }
.split-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; animation: lineIn .16s var(--ease); }
.split-item .pm-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.split-item .pm-ico .i { width: 14px; height: 14px; }
.split-item b { margin-left: auto; }
.split-add { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 12px; }
.split-add .btn { height: 42px; padding: 0 6px; font-size: 12.5px; }

/* Receipt */
.receipt-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 0; }
.receipt-stage { background: repeating-linear-gradient(45deg, #f1f3f8, #f1f3f8 10px, #eceff5 10px, #eceff5 20px); padding: 22px; display: grid; place-items: start center; max-height: calc(100vh - 140px); overflow-y: auto; }
.receipt {
  width: 320px; background: #fff; padding: 20px 18px 26px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 11.5px; color: #1a1f2e; line-height: 1.45;
  box-shadow: 0 10px 30px -12px rgba(14, 21, 38, .35); position: relative; animation: printOut .45s var(--ease);
  border-radius: 4px;
}
@keyframes printOut { from { transform: translateY(-18px); opacity: 0; } to { transform: none; opacity: 1; } }
.receipt .r-center { text-align: center; }
.receipt .r-store { font-size: 14px; font-weight: 800; letter-spacing: .02em; }
.receipt .r-demo { margin: 10px 0; padding: 6px 4px; border: 1.5px dashed #d92d4b; color: #d92d4b; text-align: center; font-weight: 800; font-size: 11px; letter-spacing: .03em; }
.receipt .r-hr { border-top: 1px dashed #b9bfcc; margin: 8px 0; }
.receipt .r-row { display: flex; justify-content: space-between; gap: 8px; }
.receipt .r-item { margin-bottom: 4px; }
.receipt .r-item .r-row span:first-child { padding-left: 10px; color: #5c6478; }
.receipt .r-total { font-size: 15px; font-weight: 800; }
.receipt .r-small { font-size: 10.5px; color: #5c6478; }
.receipt .r-sig { margin-top: 10px; }
.receipt .r-sig div { border-bottom: 1px solid #9aa1b2; height: 18px; margin-bottom: 2px; }
.receipt .r-void { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font-size: 44px; font-weight: 900; color: rgba(217, 45, 75, .22); border: 5px solid rgba(217, 45, 75, .22); padding: 2px 16px; border-radius: 10px; letter-spacing: .1em; pointer-events: none; }
.receipt-side { padding: 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.success-badge { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.success-badge .sb-ico { width: 44px; height: 44px; border-radius: 14px; background: var(--good); color: #fff; display: grid; place-items: center; animation: pop .35s var(--ease); }
.success-badge .sb-ico .i { width: 24px; height: 24px; stroke-width: 2.6; }
.success-badge b { font-size: 16px; display: block; }
.big-change { padding: 14px; border-radius: 14px; background: var(--good-soft); color: var(--good); }
.big-change span { font-size: 12.5px; font-weight: 600; }
.big-change strong { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.receipt-side .stack { display: grid; gap: 8px; margin-top: auto; }
.mini-stat { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.mini-stat b { color: var(--ink); }

/* Lists */
.list { display: grid; }
.list-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 6px; border-bottom: 1px solid var(--line-2); text-align: left; border-radius: 8px; transition: background .12s; width: 100%; }
button.list-row:hover { background: var(--surface-2); }
.list-row .lr-t { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-row .lr-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.list-row .lr-amt { font-weight: 700; text-align: right; }
.list-row .lr-amt small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.lr-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--line-2); color: var(--ink-2); }
.lr-ico .i { width: 16px; height: 16px; }
.lr-ico.good { background: var(--good-soft); color: var(--good); }
.lr-ico.bad { background: var(--bad-soft); color: var(--bad); }
.lr-ico.warn { background: var(--warn-soft); color: var(--warn); }
.lr-ico.brand { background: var(--brand-soft); color: var(--brand); }
.is-void .lr-amt { text-decoration: line-through; color: var(--muted); }

.pin { display: flex; gap: 10px; }
.pin input { width: 52px; height: 56px; text-align: center; font-size: 22px; font-weight: 800; border: 1px solid var(--line); border-radius: 12px; }
.pin input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91, 76, 240, .12); }
.pin.err input { border-color: var(--bad); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- Owner ---------- */
.owner { display: grid; grid-template-columns: 232px 1fr; height: 100%; }
.owner-nav { background: #fff; border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.on-who { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.on-who b { display: block; font-size: 13.5px; }
.on-who span { font-size: 11.5px; color: var(--muted); }
.on-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; }
.nav-btn { display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px; border-radius: 10px; font-weight: 600; color: var(--ink-2); transition: background .15s, color .15s; width: 100%; text-align: left; }
.nav-btn:hover { background: var(--surface-2); color: var(--ink); }
.nav-btn.active { background: var(--brand-soft); color: var(--brand-ink); }
.nav-btn .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.nav-btn.locked { color: var(--muted); }
.nav-btn.locked .i:last-child { margin-left: auto; width: 14px; height: 14px; }
.on-promo { margin-top: auto; padding: 14px; border-radius: 14px; background: radial-gradient(240px 120px at 0 0, rgba(91, 76, 240, .45), transparent), var(--night); color: #dfe3f5; font-size: 12.5px; line-height: 1.5; }
.on-promo b { color: #fff; display: block; font-size: 13.5px; margin-bottom: 4px; }
.on-promo .btn { margin-top: 10px; height: 36px; width: 100%; }
.owner-main { overflow-y: auto; padding: 22px 26px 40px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }
.live { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #10b981; position: relative; }
.live i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #10b981; animation: ping 1.6s infinite; }
@keyframes ping { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.kpis { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 18px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-h h3 { margin: 0; font-size: 14.5px; letter-spacing: -.005em; }
.card-h p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.kpi .k-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.kpi .k-val { font-size: 28px; font-weight: 800; letter-spacing: -.025em; margin: 8px 0 4px; }
.kpi .k-sub { font-size: 12px; color: var(--muted); }
.kpi.hero { background: radial-gradient(400px 200px at 100% 0, rgba(34, 211, 238, .28), transparent 60%), radial-gradient(400px 220px at 0 100%, rgba(91, 76, 240, .55), transparent 60%), var(--night); color: #fff; border-color: var(--night); }
.kpi.hero .k-label { color: #b8bfdc; }
.kpi.hero .k-val { font-size: 36px; }
.kpi.hero .k-sub { color: #9aa3c7; }
.kpi.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .0); } 15% { box-shadow: 0 0 0 6px rgba(16, 185, 129, .35); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.delta { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(52, 211, 153, .18); color: #6ee7b7; font-weight: 700; font-size: 11.5px; animation: lineIn .3s var(--ease); }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-bottom: 14px; }
.dash-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .bar { transition: opacity .15s; }
.chart .bar-grow { transform-box: fill-box; transform-origin: 50% 100%; animation: grow .5s var(--ease) both; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart:hover .bar.dim { opacity: .35; }
.tooltip { position: absolute; pointer-events: none; background: var(--night); color: #fff; font-size: 12px; padding: 8px 10px; border-radius: 10px; box-shadow: var(--shadow); white-space: nowrap; transform: translate(-50%, -100%); margin-top: -10px; opacity: 0; transition: opacity .1s; z-index: 5; }
.tooltip b { display: block; font-size: 13.5px; }
.tooltip.show { opacity: 1; }
.seg-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; margin-bottom: 16px; }
.seg-bar span { height: 100%; transition: flex-grow .5s var(--ease); border-radius: 3px; min-width: 3px; }
.legend-list { display: grid; gap: 2px; }
.legend-row { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.legend-row:last-child { border-bottom: 0; }
.legend-row .sw { width: 12px; height: 12px; border-radius: 4px; }
.legend-row .pct { color: var(--muted); font-size: 12px; width: 40px; text-align: right; }
.legend-row b { font-weight: 700; }
.rank { display: grid; gap: 10px; }
.rank-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; }
.rank-row .rr-n { font-weight: 700; color: var(--muted); font-size: 12.5px; }
.rank-row .rr-name { font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.rank-row .rr-name span { color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; }
.rank-row .rr-bar { height: 6px; border-radius: 3px; background: var(--line-2); margin-top: 6px; overflow: hidden; }
.rank-row .rr-bar i { display: block; height: 100%; border-radius: 3px; background: var(--s-bar); transform-origin: left; animation: growX .6s var(--ease) both; }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.rank-row .rr-amt { font-weight: 700; font-size: 13px; }
.stock-bar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; width: 100%; min-width: 60px; }
.stock-bar i { display: block; height: 100%; border-radius: 3px; background: #10b981; transition: width .5s var(--ease); }
.stock-bar i.low { background: #f59e0b; }
.stock-bar i.out { background: var(--bad); }
.table-wrap { overflow-x: auto; margin: 0 -18px -18px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.t td { padding: 11px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t .r { text-align: right; }
.t tbody tr { transition: background .12s; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover { background: var(--surface-2); }
.t tr.flash-row td { animation: rowFlash 2s var(--ease); }
@keyframes rowFlash { 0%, 30% { background: #e6fbf3; } 100% { background: transparent; } }
.t .name { font-weight: 600; }
.list-row.flash-new { animation: rowFlash 2.4s var(--ease); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { height: 40px; flex: 1 1 220px; box-shadow: none; }
.toolbar .search input { font-size: 14px; }
.cashier-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.cc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cc-head .avatar { width: 44px; height: 44px; border-radius: 13px; font-size: 15px; }
.cc-head b { font-size: 15.5px; display: block; }
.cc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.cc-stat { padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.cc-stat span { font-size: 11.5px; color: var(--muted); font-weight: 600; display: block; }
.cc-stat b { font-size: 17px; letter-spacing: -.01em; }
.cc-flags { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.flag { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.flag span { font-size: 11.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.flag b { display: block; font-size: 15px; margin-top: 2px; }
.flag small { color: var(--muted); font-size: 11.5px; }
.close-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.var-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 12.5px; }
.var-chip.ok { background: var(--good-soft); color: var(--good); }
.var-chip.short { background: var(--bad-soft); color: var(--bad); }
.var-chip.over { background: var(--warn-soft); color: var(--warn); }
.var-chip .i { width: 14px; height: 14px; }
.zread { display: grid; gap: 0; }
.zread .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.zread .row:last-child { border-bottom: 0; }
.zread .row.strong { font-weight: 700; font-size: 14px; }
.full-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.full-strip .chip .i { width: 14px; height: 14px; color: var(--muted); }
.owner-tabbar { display: none; }
.show-phone { display: none !important; }
.drawer-card { display: grid; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.drawer-card:last-child { border-bottom: 0; padding-bottom: 0; }
.dc-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dc-nums div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.dc-nums span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dc-nums b { font-size: 16px; }

/* Count modal */
.count-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.denom { display: grid; grid-template-columns: 74px 1fr auto; gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; }
.denom .dn { font-weight: 700; font-size: 13.5px; }
.denom .dn small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.denom .dv { text-align: right; font-weight: 600; font-size: 12.5px; color: var(--ink-2); min-width: 76px; }
.denom .qty input { width: 48px; }
.count-result { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; margin-top: 16px; }
.cr-box { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.cr-box span { font-size: 12px; color: var(--muted); font-weight: 600; }
.cr-box b { display: block; font-size: 20px; letter-spacing: -.02em; margin-top: 2px; }
.cr-box.ok { background: var(--good-soft); border-color: #bfe9d6; color: var(--good); }
.cr-box.short { background: var(--bad-soft); border-color: #f6c3cd; color: var(--bad); }
.cr-box.over { background: var(--warn-soft); border-color: #f6dca8; color: var(--warn); }
.cr-box.ok span, .cr-box.short span, .cr-box.over span { color: inherit; opacity: .85; }
.exp-break { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.exp-break b { color: var(--ink); }

/* Locked */
.locked-art { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 4px auto 14px; color: #fff; background: linear-gradient(135deg, #5b4cf0, #22d3ee); box-shadow: 0 14px 30px -12px rgba(91, 76, 240, .8); }
.locked-art .i { width: 28px; height: 28px; }
.locked-body { text-align: center; }
.locked-body h3 { margin: 0 0 6px; font-size: 18px; }
.locked-body p { margin: 0 auto 14px; color: var(--ink-2); max-width: 380px; line-height: 1.55; }
.locked-body ul { text-align: left; margin: 0 auto 6px; padding: 0; list-style: none; max-width: 360px; display: grid; gap: 8px; }
.locked-body li { display: flex; gap: 10px; font-size: 13px; color: var(--ink-2); }
.locked-body li .i { width: 16px; height: 16px; color: var(--good); margin-top: 1px; }

/* Toast */
#toast-root { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; background: var(--night); color: #fff; font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: toastIn .22s var(--ease); pointer-events: auto; }
.toast .i { color: #34d399; }
.toast.bad .i { color: #fb7185; }
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

#print-root { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .pos { grid-template-columns: 1fr 360px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .dash-grid-3 { grid-template-columns: 1fr 1fr; }
  .store-loc { display: none; }
}
@media (max-width: 1024px) {
  .hide-md { display: none; }
  .owner { grid-template-columns: 76px 1fr; }
  .owner-nav { padding: 14px 10px; align-items: center; }
  .owner-nav .on-who, .owner-nav .on-label, .owner-nav .on-promo, .nav-btn span, .nav-btn .badge, .nav-btn.locked .i:last-child { display: none; }
  .nav-btn { width: 52px; justify-content: center; padding: 0; }
  .dash-grid { grid-template-columns: 1fr; }
  .owner-main { padding: 18px 18px 40px; }
}
@media (max-width: 900px) {
  .store-chip { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
  .pos { grid-template-columns: 1fr 330px; }
  .cashier-cards { grid-template-columns: 1fr; }
  .receipt-wrap { grid-template-columns: 1fr; }
  .receipt-side { border-left: 0; border-top: 1px solid var(--line); }
  .receipt-stage { max-height: none; }
}
@media (max-width: 720px) {
  :root { --topbar-h: 56px; }
  .topbar { gap: 8px; padding: 0 10px; }
  .brand-text { display: none; }
  .brand-mark { width: 36px; height: 24px; }
  .hide-sm { display: none; }
  .vs-btn { padding: 8px 12px; }
  .topbar .btn { height: 36px; padding: 0 10px; }
  .pos { grid-template-columns: 1fr; }
  .catalog { padding-bottom: 76px; }
  .cart {
    position: fixed; left: 0; right: 0; bottom: 0; top: 64px; height: auto; z-index: 40; border-left: 0; border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg);
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(105%); transition: transform .26s var(--ease);
  }
  .cart.open { transform: none; }
  .mobile-only { display: inline-grid; }
  .cart-head .es-label { display: none; }
  .mobile-cartbar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; height: 60px; border-radius: 16px; padding: 0 8px 0 16px;
    align-items: center; gap: 12px; background: var(--night); color: #fff; box-shadow: var(--shadow-lg);
  }
  .mobile-cartbar .mc-count { font-size: 12px; color: #aab2d4; }
  .mobile-cartbar .mc-total { font-weight: 800; font-size: 18px; }
  .mobile-cartbar .btn { margin-left: auto; }
  .owner { grid-template-columns: 1fr; }
  .owner-nav { display: none; }
  .owner-main { padding: 16px 16px 96px; }
  .owner-tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .owner-tabbar button { display: grid; justify-items: center; gap: 3px; padding: 6px 0; font-size: 10.5px; font-weight: 600; color: var(--muted); border-radius: 10px; }
  .owner-tabbar button.active { color: var(--brand-ink); }
  .owner-tabbar button .i { width: 20px; height: 20px; }
  .page-head h1 { font-size: 21px; }
  .kpis { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .kpi.hero { grid-column: 1 / -1; }
  .kpis .kpi:not(.hero) { padding: 12px; }
  .kpis .kpi:not(.hero) .k-label .i { display: none; }
  .kpis .kpi:not(.hero) .k-label { font-size: 11.5px; }
  .kpis .kpi:not(.hero) .k-sub { display: none; }
  .kpi .k-val { font-size: 19px; margin: 4px 0 0; }
  .show-phone { display: grid !important; }
  .close-sum { grid-template-columns: 1fr 1fr; }
  .close-sum .kpi:first-child { grid-column: 1 / -1; }
  .kpi.hero .k-val { font-size: 34px; }
  .card { padding: 14px; border-radius: 14px; }
  .table-wrap { margin: 0 -14px -14px; }
  .t th, .t td { padding: 10px 14px; }
  .dash-grid-3 { grid-template-columns: 1fr; }
  .cc-stats, .cc-flags { gap: 8px; }
  .hide-phone { display: none; }
  .modal-wrap { padding: 0; place-items: end center; }
  .modal, .modal.lg, .modal.md, .modal.sm { width: 100%; max-height: calc(100vh - 30px); border-radius: 20px 20px 0 0; animation: sheetIn .24s var(--ease); }
  @keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .pay { grid-template-columns: 1fr; min-height: 0; }
  .pay-methods { grid-template-columns: repeat(5, 1fr); border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .pm { flex-direction: column; height: auto; padding: 8px 2px; gap: 4px; font-size: 11px; }
  .ewallet { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .count-grid { grid-template-columns: 1fr; }
  .count-result { grid-template-columns: 1fr 1fr; }
  .count-result .cr-box:last-child { grid-column: 1 / -1; }
  .field-row { grid-template-columns: 1fr; }
  .receipt { width: 100%; max-width: 320px; }
}
@media (max-width: 400px) {
  .vs-btn .i { display: none; }
  .topbar-actions .btn-ghost-dark { padding: 0 9px; }
  .cc-stats { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Print: only the receipt ---------- */
@media print {
  @page { size: 80mm auto; margin: 4mm; }
  body { background: #fff; overflow: visible; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  #print-root .receipt { box-shadow: none; width: 100%; padding: 0; animation: none; }
}
