/* OmniPay web till — the counter screen. Brand navy + gold (core/tokens.css),
   big touch targets, one screen: menu on the left, the order on the right.
   Below 900px the order folds into a drawer behind the "View order" bar. */

@font-face { font-family: "Inter"; src: url("/static/core/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/static/core/fonts/poppins-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/static/core/fonts/poppins-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --navy: #00224a; --navy-700: #0d3565; --navy-100: #dbe4f0; --navy-50: #eef3f9;
  --gold: #f1b527; --gold-600: #d99f12; --gold-50: #fef8e9;
  --ink: #0e1b2c; --ink-2: #3c4b5e; --ink-3: #5d6b7e; --ink-4: #8593a5;
  --line: #e3e8ef; --line-2: #cfd7e1;
  --bg: #eef1f6; --surface: #fff; --well: #f4f6fa;
  --pos: #0e7a55; --pos-bg: #e7f6ef; --neg: #b3151a; --neg-bg: #fdecec; --warn: #8a6100; --warn-bg: #fdf3d8;
  --cash: #31bb95; --eco: #1565c0; --inn: #00224a;
  --r-sm: 10px; --r: 14px; --r-lg: 20px;
  --shadow: 0 1px 2px rgba(14,27,44,.06), 0 4px 14px rgba(14,27,44,.06);
  --lift: 0 18px 50px rgba(0,20,48,.22);
  --head: "Poppins", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 15px/1.4 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, input:focus-visible { outline: 3px solid #1565c0; outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.err { color: var(--neg); min-height: 1.3em; margin: 6px 0 0; font-weight: 600; font-size: 14px; }
.link { color: var(--navy); font-weight: 600; text-decoration: underline; margin-top: 12px; }
h1, h2 { font-family: var(--head); letter-spacing: -.01em; margin: 0; }

/* ---------- buttons ---------- */
.btn { min-height: 54px; padding: 0 22px; border-radius: var(--r); font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .1s, background .15s, opacity .15s; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.navy { background: var(--navy); color: #fff; }
.btn.navy:hover:not(:disabled) { background: var(--navy-700); }
.btn.gold { background: var(--gold); color: var(--navy); font-family: var(--head); font-size: 18px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }
.btn.gold:active:not(:disabled) { background: var(--gold-600); }
.btn.ghost { background: var(--well); color: var(--ink-2); border: 1px solid var(--line); }
.btn.green { background: var(--cash); color: #fff; }
.btn.grow { flex: 1; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: var(--well); }
.icon-btn.x { font-size: 18px; color: var(--ink-3); flex: none; }

/* ---------- sign-in + cashier gates ---------- */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 20% -10%, #0d3565 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #1b4a85 0%, transparent 55%), var(--navy); }
.gate-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 26px; padding: 34px 28px 26px; text-align: center; box-shadow: var(--lift); }
.gate-card.wide { max-width: 640px; }
.gate-card h1 { font-size: 24px; }
.gate-card > .muted { margin: 6px 0 0; }
.gate-mark { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px; background: var(--gold); color: var(--navy); display: grid; place-items: center; }
.dots { display: flex; gap: 12px; justify-content: center; margin: 24px 0 4px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); transition: background .12s, border-color .12s, transform .12s; }
.dots i.on { background: var(--navy); border-color: var(--navy); transform: scale(1.08); }
.dots.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.pad button { height: 64px; border-radius: var(--r); background: var(--well); font: 600 24px var(--head); color: var(--ink); transition: background .1s, transform .08s; }
.pad button:active { background: var(--navy-100); transform: scale(.97); }
.pad button.fn { font: 600 15px "Inter", sans-serif; color: var(--ink-3); }
.staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 22px; }
.staff button { padding: 18px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: grid; justify-items: center; gap: 10px; font-weight: 600;
  transition: border-color .15s, box-shadow .15s; }
.staff button:hover { border-color: var(--navy); box-shadow: var(--shadow); }
.avatar { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font: 700 19px var(--head); color: #fff; }
.pin { max-width: 320px; margin: 4px auto 0; }

/* ---------- till layout ---------- */
.till { height: 100%; display: flex; flex-direction: column; }
.bar { height: 68px; flex: none; display: flex; align-items: center; gap: 18px; padding: 0 18px; background: var(--navy); color: #fff; }
.shop { display: flex; align-items: center; gap: 12px; min-width: 0; }
.shop-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--gold); color: var(--navy); display: grid; place-items: center; font: 700 18px var(--head); flex: none; }
.shop-name { font: 700 17px var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-sub { font-size: 13px; color: rgba(255,255,255,.72); display: flex; gap: 8px; align-items: center; }
.test { background: var(--gold); color: var(--navy); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 2px 7px; border-radius: 99px; }
.search { flex: 1; max-width: 460px; margin-left: auto; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 12px;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); transition: background .15s; }
.search:focus-within { background: #fff; color: var(--ink-3); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: #fff; font-size: 15px; }
.search:focus-within input { color: var(--ink); }
.search input::placeholder { color: rgba(255,255,255,.6); }
.search:focus-within input::placeholder { color: var(--ink-4); }
.bar-r { display: flex; align-items: center; gap: 6px; position: relative; }
.bar-r .icon-btn { color: #fff; }
.bar-r .icon-btn:hover { background: rgba(255,255,255,.12); }
.clock { font: 600 15px var(--head); color: rgba(255,255,255,.85); font-variant-numeric: tabular-nums; padding: 0 6px; }
.pop { position: absolute; right: 0; top: 54px; z-index: 30; min-width: 220px; background: var(--surface); color: var(--ink); border-radius: var(--r); box-shadow: var(--lift); padding: 6px; display: grid; }
.pop button { text-align: left; padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.pop button:hover { background: var(--well); }
.pop button.danger { color: var(--neg); }

.body { flex: 1; min-height: 0; display: flex; }
.menu { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cats { flex: none; display: flex; gap: 8px; padding: 14px 16px 10px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; height: 44px; padding: 0 18px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; color: var(--ink-2);
  display: flex; align-items: center; gap: 8px; transition: background .15s, color .15s; }
.cats button b { font-weight: 600; font-size: 12px; color: var(--ink-4); }
.cats button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.cats button.on b { color: rgba(255,255,255,.65); }
.grid { flex: 1; overflow-y: auto; padding: 4px 16px 110px; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; align-content: start; grid-auto-rows: max-content; }
.tile { position: relative; background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); text-align: left; display: flex; flex-direction: column;
  transition: transform .1s, box-shadow .15s; }
.tile:hover { box-shadow: 0 6px 22px rgba(14,27,44,.12); }
.tile:active { transform: scale(.97); }
.tile .ph { flex: none; aspect-ratio: 4 / 3; background: var(--well) center / cover no-repeat; display: grid; place-items: center; font: 700 30px var(--head); color: var(--ink-4); }
.tile .tx { padding: 10px 12px 12px; display: grid; gap: 4px; }
.tile .nm { font-weight: 650; font-size: 15px; line-height: 1.25; min-height: 2.5em; }
.tile .pr { font: 700 16px var(--head); color: var(--navy); }
.tile .tag { position: absolute; top: 8px; left: 8px; background: var(--gold); color: var(--navy); font-size: 11px; font-weight: 800; letter-spacing: .03em; padding: 3px 8px; border-radius: 99px; }
.tile .cnt { position: absolute; top: 8px; right: 8px; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 99px; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px;
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.tile.out { opacity: .45; }
.empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--ink-3); }

/* ---------- the order panel ---------- */
.order { width: 400px; flex: none; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.types { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin: 14px 14px 0; padding: 4px; background: var(--well); border-radius: var(--r); }
.types button { height: 48px; border-radius: 11px; font-weight: 650; font-size: 14px; color: var(--ink-2); display: grid; place-items: center; line-height: 1.1; }
.types button small { display: block; font-size: 11px; font-weight: 600; color: var(--ink-4); }
.types button.on { background: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(0,34,74,.3); }
.types button.on small { color: rgba(255,255,255,.7); }
.ref { display: flex; align-items: center; gap: 10px; margin: 10px 14px 0; padding: 0 14px; height: 46px; border: 1px solid var(--line-2); border-radius: 12px; }
.ref span { font-size: 13px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.ref input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 15px; font-weight: 600; }
.ref:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-50); }
.lines { flex: 1; overflow-y: auto; padding: 8px 14px; }
.lines .none { height: 100%; min-height: 160px; display: grid; place-content: center; text-align: center; color: var(--ink-4); gap: 8px; }
.lines .none svg { margin: 0 auto; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); animation: flash .6s; }
@keyframes flash { from { background: var(--gold-50); } to { background: transparent; } }
.line .nm { font-weight: 650; }
.line .lt { font: 700 15px var(--head); text-align: right; }
.line ul { grid-column: 1 / -1; margin: 0; padding: 0; list-style: none; display: grid; gap: 1px; }
.line li { font-size: 13px; color: var(--ink-3); display: flex; justify-content: space-between; }
.line li::before { content: "+"; color: var(--ink-4); margin-right: 6px; }
.line li span { flex: 1; }
.line .ctl { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.line .ctl .edit { margin-left: auto; font-size: 13px; font-weight: 650; color: var(--navy); padding: 6px 8px; border-radius: 8px; }
.line .ctl .edit:hover { background: var(--navy-50); }
.qty { display: flex; align-items: center; background: var(--well); border-radius: 12px; }
.qty button { width: 40px; height: 40px; border-radius: 12px; font-size: 22px; font-weight: 600; color: var(--navy); display: grid; place-items: center; }
.qty button:active { background: var(--navy-100); }
.qty b { min-width: 30px; text-align: center; font: 700 16px var(--head); }
.sum { flex: none; border-top: 1px solid var(--line); padding: 12px 14px 14px; }
.sum .row { display: flex; justify-content: space-between; padding: 2px 0; font-size: 14px; }
.sum .total { font: 700 26px var(--head); color: var(--ink); padding: 6px 0 10px; }
.acts { display: grid; grid-template-columns: 1fr 2.4fr; gap: 10px; }
.acts .gold { min-height: 60px; }

.peek { position: fixed; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); height: 62px; z-index: 20; border-radius: 99px; background: var(--navy); color: #fff;
  display: flex; align-items: center; gap: 12px; padding: 0 10px 0 10px; box-shadow: var(--lift); font-weight: 650; }
.peek-n { min-width: 42px; height: 42px; border-radius: 99px; background: var(--gold); color: var(--navy); display: grid; place-items: center; font: 700 17px var(--head); }
.peek b { margin-left: auto; font: 700 19px var(--head); padding-right: 14px; }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(8,18,36,.55); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 620px; max-height: calc(100vh - 40px); background: var(--surface); border-radius: 24px; box-shadow: var(--lift); display: flex; flex-direction: column; overflow: hidden;
  animation: rise .2s cubic-bezier(.2,.8,.3,1); }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 14px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.sheet-head > div { flex: 1; min-width: 0; }
.sheet-head h2 { font-size: 21px; }
.sheet-head p { margin: 2px 0 0; }
.sheet-head img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--well); flex: none; }
.sheet-body { overflow-y: auto; padding: 6px 18px 18px; }
.sheet-foot { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.sheet-foot .qty button { width: 50px; height: 54px; }

.grp { padding-top: 16px; }
.grp-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.grp-h h3 { margin: 0; font: 650 16px var(--head); }
.grp-h .rule { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--well); color: var(--ink-3); }
.grp-h .rule.req { background: var(--warn-bg); color: var(--warn); }
.grp-h .rule.ok { background: var(--pos-bg); color: var(--pos); }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.opt { min-height: 58px; padding: 10px 12px; border-radius: var(--r-sm); border: 2px solid var(--line); text-align: left; display: flex; align-items: center; gap: 10px;
  transition: border-color .12s, background .12s; }
.opt i { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-style: normal; font-size: 13px; color: #fff; }
.opt.multi i { border-radius: 7px; }
.opt span { flex: 1; font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.opt small { font-weight: 700; font-size: 13px; color: var(--navy); white-space: nowrap; }
.opt.on { border-color: var(--navy); background: var(--navy-50); }
.opt.on i { background: var(--navy); border-color: var(--navy); }
.opt.on i::after { content: "✓"; }
.opt:disabled { opacity: .4; }

/* payment */
.sheet.pay { max-width: 560px; }
.tenders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 18px 4px; }
.tenders button { height: 64px; border-radius: var(--r); border: 2px solid var(--line); font-weight: 700; font-size: 15px; display: grid; place-items: center; gap: 0; line-height: 1.15; }
.tenders button small { font-size: 11.5px; font-weight: 600; color: var(--ink-4); }
.tenders button.on[data-t="cash"] { border-color: var(--cash); background: #e6f7f0; color: var(--pos); }
.tenders button.on[data-t="ecocash"] { border-color: var(--eco); background: #e8f1fb; color: var(--eco); }
.tenders button.on[data-t="innbucks"] { border-color: var(--inn); background: var(--navy-50); color: var(--inn); }
.tendered { text-align: center; padding: 16px 0 6px; }
.tendered .k { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.tendered .v { font: 700 44px var(--head); font-variant-numeric: tabular-nums; }
.tendered .s { font-weight: 700; font-size: 16px; }
.tendered .s.owe { color: var(--neg); }
.tendered .s.chg { color: var(--pos); }
.notes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.notes button { height: 50px; border-radius: 12px; background: var(--pos-bg); color: var(--pos); font: 700 16px var(--head); }
.notes button.exact { background: var(--navy-50); color: var(--navy); }
.cashpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cashpad button { height: 56px; border-radius: 12px; background: var(--well); font: 600 22px var(--head); }
.cashpad button:active { background: var(--navy-100); }
.paybtn { width: 100%; margin-top: 12px; min-height: 60px; font-size: 18px; }
.info { text-align: center; padding: 22px 8px 6px; }
.info .big { font: 700 34px var(--head); margin: 6px 0; }
.info ol { text-align: left; max-width: 360px; margin: 14px auto 0; padding-left: 22px; color: var(--ink-2); line-height: 1.7; }
.qr { width: 220px; height: 220px; margin: 8px auto 0; display: block; image-rendering: pixelated; }
.wait { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--ink-3); margin-top: 12px; font-weight: 600; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--navy); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* done */
.sheet.done { max-width: 440px; text-align: center; padding: 32px 26px 24px; }
.done-tick { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: var(--pos-bg); color: var(--pos); font-size: 38px; font-weight: 700; display: grid; place-items: center;
  animation: pop .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.done-k { margin: 14px 0 0; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.done-no { font: 700 76px/1 var(--head); color: var(--navy); margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.done-no.word { font-size: 34px; line-height: 1.2; }
.done-change { font: 700 22px var(--head); color: var(--pos); margin: 8px 0 0; min-height: 1em; }
.done-acts { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 20px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 80; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600;
  box-shadow: var(--lift); max-width: calc(100vw - 32px); animation: rise .2s; }
.toast.bad { background: var(--neg); }

/* ---------- narrow screens: the order becomes a drawer ---------- */
@media (max-width: 900px) {
  .bar { gap: 10px; padding: 0 12px; }
  .clock { display: none; }
  .shop-name { max-width: 40vw; }
  .search { max-width: none; }
  .order { position: fixed; inset: auto 0 0 0; width: auto; height: min(88vh, 760px); z-index: 40; border-radius: 22px 22px 0 0; border: 0; box-shadow: var(--lift);
    transform: translateY(105%); transition: transform .25s cubic-bezier(.2,.8,.3,1); }
  .order.open { transform: none; }
  .order::before { content: ""; width: 44px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 10px auto 0; flex: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding: 4px 12px 110px; gap: 10px; }
  .cats { padding: 12px 12px 8px; }
}
@media (max-width: 560px) {
  /* A phone keeps the shop's mark and gives the width to search. */
  .shop-sub, .shop-name { display: none; }
  .search { height: 40px; }
  .opts { grid-template-columns: 1fr 1fr; }
  .modal { padding: 0; place-items: end stretch; }
  .sheet { max-height: 94vh; border-radius: 22px 22px 0 0; }
  .done-no { font-size: 64px; }
}
