/* The till: lock screen, selling screen, payment and receipt. */

/* ---------------------------------------------------------------- lock */

.lock { height: 100%; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr); gap: 14px; padding: 14px; }
.lock-left { display: flex; flex-direction: column; gap: 28px; padding: 26px 26px; overflow: auto; }
.lock-right {
  display: flex; flex-direction: column; justify-content: center; padding: 32px;
  border-radius: var(--r-xl); background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur); box-shadow: var(--shadow-lg);
}
.lock-pad { width: min(340px, 100%); margin: 0 auto; }
.lock-clock .time { font-size: 92px; font-weight: 200; letter-spacing: -0.05em; line-height: 1; }
.lock-clock .date { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.lock-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.lock-person {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px;
  border: 1px solid var(--glass-border); border-radius: var(--r-lg); background: var(--surface-2);
  backdrop-filter: var(--blur);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s; min-width: 0;
}
.lock-person:hover { background: var(--surface); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.lock-person[aria-pressed='true'] { background: var(--surface-inverse); color: var(--ink-inverse); border-color: var(--surface-inverse); }
.lock-person[aria-pressed='true'] .role { color: inherit; opacity: 0.7; }
.lock-person .name { font-weight: 650; max-width: 100%; }
.lock-person .role { font-size: 12px; color: var(--ink-3); }
@media (max-width: 820px) {
  .lock { grid-template-columns: 1fr; overflow: auto; padding: 10px; }
  .lock-left { padding: 12px 8px; }
  .lock-clock .time { font-size: 56px; }
  body { overflow: auto; }
}

/* ---------------------------------------------------------------- shell */

.pos {
  height: 100%; display: grid; gap: 12px; padding: 12px;
  grid-template-columns: var(--rail) minmax(0, 1fr) minmax(360px, 410px);
}
/* The rail: a frosted column of round buttons; the current one is black. */
.rail {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; min-height: 0; overflow: auto;
  border-radius: var(--r-xl); background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur); box-shadow: var(--shadow);
}
.rail .logo-mark { margin-bottom: 14px; width: 46px; height: 46px; }
.rail-btn {
  position: relative; width: 64px; padding: 9px 0 7px; border: 0; border-radius: 22px;
  background: transparent; color: var(--ink-2);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; transition: background 0.15s, color 0.15s;
}
.rail-btn:hover { background: var(--surface); color: var(--ink); }
.rail-btn[aria-current='page'] { background: var(--surface-inverse); color: var(--ink-inverse); }
.rail-btn[aria-current='page'] .icon { color: var(--brand); }
.rail-btn .badge { position: absolute; top: 2px; right: 6px; height: 18px; padding: 0 5px; font-size: 10.5px; background: var(--brand); color: var(--on-brand); }
.rail .spacer { flex: 1; }

.pos-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pos-top { display: flex; align-items: center; gap: 12px; padding: 8px 6px 14px; }
.pos-hello { flex: 0 1 260px; min-width: 0; }
.pos-hello .t { font-size: 24px; font-weight: 400; letter-spacing: -0.035em; line-height: 1.2; }
.pos-hello .d { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.pos-search { flex: 1 1 420px; max-width: 560px; margin-left: auto; }
.pos-search .input { height: 50px; border-radius: 999px; background: var(--surface); padding-right: 64px; box-shadow: var(--shadow-sm); }
.pos-search .input:focus { background: var(--surface-hover); }
.pos-search > .icon { left: 18px; }
.pos-search > .input { padding-left: 48px; }
.pos-search .kbd { position: absolute; right: 16px; }
.cashier-chip {
  display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; height: 50px;
  border: 1px solid var(--glass-border); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm);
}
.cashier-chip:hover { background: var(--surface-hover); }
.cashier-chip .name { font-weight: 650; font-size: 13.5px; line-height: 1.2; white-space: nowrap; }
.cashier-chip .meta { font-size: 11.5px; color: var(--ink-3); line-height: 1.2; }
.cashier-chip .avatar { width: 38px; height: 38px; font-size: 12.5px; }

/* Category cards: icon, name, item count. The chosen one is filled. */
.cats { display: flex; gap: 10px; padding: 2px 6px 16px; overflow-x: auto; scrollbar-width: none; flex: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; display: flex; align-items: center; gap: 10px; min-width: 150px; max-width: 220px;
  padding: 6px 18px 6px 6px; border: 1px solid var(--glass-border); border-radius: 999px;
  background: var(--surface-2); color: var(--ink); text-align: left; box-shadow: var(--shadow-xs);
  transition: background 0.15s, box-shadow 0.15s, color 0.15s;
}
.cat:hover { background: var(--surface); box-shadow: var(--shadow-sm); }
.cat-icon {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-hover); color: var(--ink);
}
.cat-icon .icon { width: 19px; height: 19px; }
.cat-text { display: flex; flex-direction: column; min-width: 0; }
.cat-name { font-weight: 650; font-size: 13.5px; line-height: 1.25; }
.cat-count { font-size: 12px; color: var(--ink-3); }
.cat[aria-pressed='true'] { background: var(--surface-inverse); border-color: var(--surface-inverse); color: var(--ink-inverse); box-shadow: var(--shadow-sm); }
.cat[aria-pressed='true'] .cat-icon { background: var(--brand); color: var(--on-brand); }
.cat[aria-pressed='true'] .cat-count { color: inherit; opacity: 0.7; }

.grid-wrap { flex: 1; min-height: 0; overflow: auto; padding: 2px 6px 12px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 16px; }
.product {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 8px 8px 12px;
  border: 1px solid var(--glass-border); border-radius: 24px; background: var(--surface-2);
  text-align: left; box-shadow: var(--shadow-xs);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.product:hover { background: var(--surface); box-shadow: var(--shadow); transform: translateY(-2px); }
.product:active { transform: scale(0.985); }
.product.out { opacity: 0.62; }
.product.selected { background: var(--surface); box-shadow: 0 0 0 2px var(--brand) inset, var(--shadow-sm); }
.product .thumb-wrap { position: relative; }
.product .thumb { width: 100%; aspect-ratio: 4 / 3; border-radius: 18px; object-fit: cover; background: var(--surface-3); display: block; }
.product .stock-tag {
  position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px);
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 650;
  background: rgba(255, 255, 255, 0.85); color: #3d3a34; box-shadow: var(--shadow-xs); backdrop-filter: blur(6px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product .stock-tag.warn { background: #fdf1d8; color: #8a5300; }
.product .stock-tag.bad { background: #fbe7e7; color: #a52a2a; }
.product .info { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; min-width: 0; }
.product .cat-label { font-size: 11.5px; font-weight: 550; color: var(--ink-3); }
.product .name { font-weight: 650; font-size: 14px; line-height: 1.3; min-height: 2.6em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product .foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 2px 0 4px; margin-top: auto; }
.product .price { font-weight: 650; font-size: 16px; letter-spacing: -0.01em; }
.product .per { font-weight: 500; font-size: 12px; color: var(--ink-3); }
.product .add {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-hover); color: var(--ink); border: 1px solid var(--glass-border); transition: background 0.15s, color 0.15s, transform 0.15s;
}
.product:hover .add, .product.selected .add { background: var(--surface-inverse); color: var(--brand); border-color: var(--surface-inverse); transform: rotate(90deg); }
.product .in-cart {
  position: absolute; top: 8px; right: 8px; min-width: 30px; height: 26px; padding: 0 8px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 12.5px; box-shadow: var(--shadow-sm);
}
.product .in-cart .icon { width: 14px; height: 14px; }

.thumb.mono {
  display: grid; place-items: center; font-weight: 800; font-size: 26px; letter-spacing: 0.02em;
}
.thumb.mono[data-tint='0'] { background: #fdeee6; color: #b53f08; }
.thumb.mono[data-tint='1'] { background: #e5effb; color: #1c5cab; }
.thumb.mono[data-tint='2'] { background: #e3f5ee; color: #10714f; }
.thumb.mono[data-tint='3'] { background: #fdf1d8; color: #8a5300; }
.thumb.mono[data-tint='4'] { background: #fbe9f1; color: #a8325e; }
.thumb.mono[data-tint='5'] { background: #ece9fb; color: #4a3aa7; }
.thumb.mono[data-tint='6'] { background: #e6f4e6; color: #136f13; }
.thumb.mono[data-tint='7'] { background: #fbe7e7; color: #a52a2a; }
:root[data-theme='dark'] .thumb.mono[data-tint='0'] { background: #3b2216; color: #ffab7f; }
:root[data-theme='dark'] .thumb.mono[data-tint='1'] { background: #16273d; color: #8cbcf5; }
:root[data-theme='dark'] .thumb.mono[data-tint='2'] { background: #11302a; color: #6fd6b0; }
:root[data-theme='dark'] .thumb.mono[data-tint='3'] { background: #33270f; color: #f2c263; }
:root[data-theme='dark'] .thumb.mono[data-tint='4'] { background: #3a1b29; color: #f4a1c1; }
:root[data-theme='dark'] .thumb.mono[data-tint='5'] { background: #221d42; color: #b3a9f5; }
:root[data-theme='dark'] .thumb.mono[data-tint='6'] { background: #16301a; color: #7fd77f; }
:root[data-theme='dark'] .thumb.mono[data-tint='7'] { background: #3a1a1a; color: #f5a0a0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .thumb.mono[data-tint='0'] { background: #3b2216; color: #ffab7f; }
  :root:not([data-theme='light']) .thumb.mono[data-tint='1'] { background: #16273d; color: #8cbcf5; }
  :root:not([data-theme='light']) .thumb.mono[data-tint='2'] { background: #11302a; color: #6fd6b0; }
  :root:not([data-theme='light']) .thumb.mono[data-tint='3'] { background: #33270f; color: #f2c263; }
  :root:not([data-theme='light']) .thumb.mono[data-tint='4'] { background: #3a1b29; color: #f4a1c1; }
  :root:not([data-theme='light']) .thumb.mono[data-tint='5'] { background: #221d42; color: #b3a9f5; }
  :root:not([data-theme='light']) .thumb.mono[data-tint='6'] { background: #16301a; color: #7fd77f; }
  :root:not([data-theme='light']) .thumb.mono[data-tint='7'] { background: #3a1a1a; color: #f5a0a0; }
}


/* ---------------------------------------------------------------- cart */

/* The cart: a dark frosted card (light text), like the task card in the design. */
.cart {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  border-radius: var(--r-xl); border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: var(--shadow-lg);
  backdrop-filter: var(--blur);
}
.cart-head { display: flex; align-items: center; gap: 10px; padding: 20px 20px 14px; }
.cart-head h2 { font-size: 22px; font-weight: 400; letter-spacing: -0.02em; }
.cart-head .sub { margin-top: 1px; }
.cart-customer {
  margin: 0 20px 10px; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px dashed var(--border-strong); border-radius: 999px; color: var(--ink-2);
  background: transparent; text-align: left; font-weight: 500;
}
.cart-customer:hover { background: var(--surface-2); }
.cart-customer.set { border-style: solid; border-color: transparent; background: var(--surface-3); color: var(--ink); }
.cart-customer.set > .icon:first-child { color: var(--brand-ink); }
.cart-lines { flex: 1; min-height: 0; overflow: auto; padding: 2px 12px; }
.line {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 6px 12px; align-items: center;
  padding: 10px 8px; border-bottom: 1px solid var(--border);
}
.line:last-child { border-bottom: 0; }
.line .l-thumb {
  grid-row: span 2; align-self: start; width: 48px; height: 48px; border-radius: 14px;
  object-fit: cover; font-size: 15px; background: var(--surface-3);
}
.line .l-name { font-weight: 650; font-size: 13.5px; cursor: pointer; }
.line .l-name:hover { color: var(--brand-ink); }
.line .l-meta { font-size: 12.5px; color: var(--ink-3); }
.line .l-total { font-weight: 750; text-align: right; }
.line > .btn { justify-self: start; }
.line .l-disc { font-size: 12px; color: var(--good); font-weight: 600; text-align: right; }
.stepper { justify-self: start; display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; background: var(--surface-3); }
.stepper button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; }
.stepper button:hover { background: var(--surface-hover); }
.stepper .q { min-width: 38px; text-align: center; font-weight: 700; font-size: 14px; border: 0; background: transparent; }
.cart-empty { flex: 1; display: grid; place-items: center; padding: 24px; }
.cart-sum { padding: 12px 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.sum-card {
  display: flex; flex-direction: column; gap: 8px; padding: 14px 18px;
  border-radius: 22px; background: var(--surface-2); border: 1px solid var(--border);
}
.sum-row { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 13.5px; }
.sum-row.total {
  color: var(--ink); font-size: 26px; font-weight: 300; letter-spacing: -0.03em; align-items: baseline;
  margin-top: 4px; padding-top: 10px; border-top: 1.5px dashed var(--border-strong);
}
.cart-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.cart-actions .btn { height: 44px; padding: 0 8px; font-size: 13px; }
.btn.charge {
  --btn-bg: var(--brand); --btn-ink: var(--on-brand); --btn-border: var(--brand);
  margin-top: 2px; height: 60px; font-size: 18px; justify-content: space-between; padding: 0 24px;
  box-shadow: 0 10px 28px var(--brand-glow);
}
.btn.charge:hover { background: var(--brand-hover); }
.charge:disabled { box-shadow: none; }

/* Mobile: the cart becomes a sheet over the products. */
.cart-toggle { display: none; }
.pos-back { display: none; flex: none; width: 42px; height: 42px; background: var(--surface); }
@media (max-width: 1100px) {
  .pos { grid-template-columns: var(--rail) minmax(0, 1fr) minmax(320px, 360px); }
  .products { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .pos-hello { display: none; }
}
@media (max-width: 860px) {
  :root { --rail: 0px; }
  .pos { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; padding: 0; gap: 0; }
  .rail {
    position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 30; height: 64px; overflow: visible;
    flex-direction: row; justify-content: space-around; padding: 4px 8px; border-radius: 999px;
    background: var(--surface-solid);
  }
  /* Every button shares the width, so they all fit however many there are. */
  .rail { gap: 2px; padding: 4px 6px; }
  .rail-btn { flex: 1 1 0; width: auto; min-width: 0; padding: 8px 0 6px; font-size: 10.5px; border-radius: 999px; }
  .rail .logo-mark, .rail .spacer, .rail .rail-extra { display: none; }
  .pos-main { padding-bottom: 146px; }
  .pos-top { padding: 12px 12px 8px; flex-wrap: wrap; gap: 8px; }
  .pos-top .cashier-chip { margin-left: auto; height: 42px; min-width: 0; padding: 3px 12px 3px 3px; }
  .pos-top .cashier-chip .avatar { width: 34px; height: 34px; }
  .pos-top .cashier-chip .name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .pos-top .cashier-chip .meta { display: none; }
  .pos-hello { display: none; }
  .pos-search { order: 3; flex: 1 1 100%; max-width: none; margin-left: 0; }
  .pos-back { display: grid; }
  .cats { padding: 2px 12px 10px; gap: 8px; }
  .cat { min-width: 0; padding: 8px 12px 8px 8px; }
  .cat-icon { width: 32px; height: 32px; border-radius: 10px; }
  .grid-wrap { padding: 4px 12px 16px; }
  .products { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .cart {
    position: fixed; inset: auto 8px 80px 8px; z-index: 25; max-height: calc(100% - 136px);
    border-radius: 26px; box-shadow: var(--shadow-lg);
    transform: translateY(calc(100% - 64px)); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .cart.open { transform: none; }
  .cart-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    height: 64px; padding: 0 20px; border: 0; background: transparent; font-weight: 700; flex: none;
  }
  .cart.open .cart-toggle .icon { transform: rotate(180deg); }
}

/* ---------------------------------------------------------------- overlays */

.gate {
  position: absolute; inset: 0; z-index: 10; display: grid; justify-items: center; align-items: start; padding: 16px; overflow: auto;
  background: color-mix(in srgb, var(--bg) 35%, transparent); backdrop-filter: blur(10px);
}
.gate .card { background: var(--glass-strong); backdrop-filter: var(--blur); }
/* Centred when it fits; when it doesn't, it scrolls from the top. */
.gate .card { width: min(440px, 100%); margin-block: auto; padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.gate-exits { justify-content: center; flex-wrap: wrap; gap: 4px; }
.pos-main { position: relative; }
/* On a phone the cart and the menu are fixed along the bottom. Until the shift
   is open neither is any use, so the gate takes the whole screen, above them. */
@media (max-width: 860px) {
  .gate { position: fixed; z-index: 40; padding: 10px; }
  .gate .card { padding: 18px; gap: 10px; }
  .gate .sub { font-size: 13px; }
  .gate .amount-display { padding: 8px 14px; }
  .gate .amount-display .value { font-size: 26px; }
  .gate .keypad button { height: 50px; font-size: 20px; }
}

.amount-display {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--glass-border);
}
.amount-display .value { font-size: 34px; font-weight: 300; letter-spacing: -0.03em; }
.amount-display .caption { color: var(--ink-3); font-size: 13px; font-weight: 600; }

/* ---------------------------------------------------------------- payment */

.pay { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); min-height: 0; }
.pay-left { padding: 22px; background: var(--surface-2); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 16px; }
.pay-left .due { font-weight: 300; }
.pay-right { padding: 22px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.due-label { font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.due { font-size: 48px; font-weight: 300; letter-spacing: -0.045em; line-height: 1.1; }
.pay-lines { display: flex; flex-direction: column; gap: 8px; }
.pay-line { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--glass-border); }
.pay-status { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.pay-status .big { font-size: 22px; font-weight: 800; }
.methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.method {
  display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 14px;
  border: 1px solid var(--glass-border); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 13.5px;
  transition: background 0.15s, color 0.15s;
}
.method:hover { background: var(--surface-hover); }
.method[aria-pressed='true'] { border-color: var(--surface-inverse); background: var(--surface-inverse); color: var(--ink-inverse); }
.method[aria-pressed='true'] .icon { color: var(--brand); }
.method .icon { width: 18px; height: 18px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick .btn { flex: 1 0 auto; }
@media (max-width: 760px) {
  .pay { grid-template-columns: 1fr; }
  .pay-left { border-right: 0; border-bottom: 1px solid var(--border); }
  .due { font-size: 32px; }
}

/* ---------------------------------------------------------------- receipt */

.receipt {
  width: 320px; max-width: 100%; margin: 0 auto; padding: 20px 18px 24px;
  background: #fff; color: #111; border-radius: 6px;
  font: 13px/1.45 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  box-shadow: var(--shadow); position: relative;
}
.receipt::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px;
  background: radial-gradient(circle at 5px -1px, transparent 6px, #fff 6.5px) repeat-x;
  background-size: 10px 8px;
}
.receipt .c { text-align: center; }
.receipt .b { font-weight: 700; }
.receipt .biz { font-size: 16px; font-weight: 800; font-family: var(--font); }
.receipt .rule { border-top: 1px dashed #999; margin: 10px 0; }
.receipt .rr { display: flex; justify-content: space-between; gap: 8px; }
.receipt .rr > :last-child { text-align: right; white-space: nowrap; }
.receipt .rr.wrap > :last-child { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.receipt .item { margin-bottom: 6px; }
.receipt .total { font-size: 16px; font-weight: 800; }
.receipt .note { font-size: 11.5px; color: #555; }
.receipt-wrap { padding: 20px; background: var(--tint); border-radius: var(--r-lg); max-height: 58vh; overflow: auto; }

/* The printer a receipt comes out of after a sale (receipt.js). The machine
   stays dark in both themes, so its colours are its own. */
.printer-body { overflow: hidden; }
.printer { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; }
.printer-machine {
  flex: none; position: relative; z-index: 1; padding: 12px 12px 26px; border-radius: 24px;
  background: #2b2925; color: #f5f1e9;
  box-shadow: 0 20px 36px -20px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(0, 0, 0, 0.55);
}
.printer-screen {
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 12px;
  background: #141311; box-shadow: inset 0 0 24px 4px rgba(0, 0, 0, 0.5);
}
.printer-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: #cdc7bc; font-size: 13.5px; }
.printer-row > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.printer-row > .num { flex: none; color: #f5f1e9; font-weight: 700; }
.printer-row.big > .num { font-size: 26px; font-weight: 800; }
.printer-status { display: flex; align-items: center; gap: 8px; min-height: 18px; color: #a39d92; font-size: 12.5px; font-weight: 600; }
.printer-status .icon { display: none; width: 16px; height: 16px; color: #5fd38d; }
.printer-spinner { flex: none; width: 14px; height: 14px; border: 2px solid #5b574f; border-top-color: #f5f1e9; border-radius: 50%; }
.printer[data-stage='complete'] .printer-spinner { display: none; }
.printer[data-stage='complete'] .printer-status { color: #f5f1e9; }
.printer[data-stage='complete'] .printer-status .icon { display: block; }
.printer-slot { position: absolute; left: 24px; right: 24px; bottom: 10px; height: 8px; border-radius: 4px; background: #0b0a09; box-shadow: inset 0 1px 3px #000; }
/* The paper is clipped here, so it seems to come out of the slot. Only the
   paper scrolls, so the machine and the buttons stay in view on small screens. */
.printer-output { flex: 1 1 auto; min-height: 120px; position: relative; z-index: 2; margin-top: -14px; padding: 0 12px 16px; overflow: hidden auto; scrollbar-width: thin; }
.printer-output .receipt { border-radius: 0 0 6px 6px; }

.pay-to {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: var(--r-lg); background: var(--surface-inverse); color: var(--ink-inverse);
}
.pay-to .sub, .pay-to .muted { color: inherit; opacity: 0.72; }
.pay-to-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); }
.pay-to-number { font-size: 24px; font-weight: 500; letter-spacing: 0.02em; line-height: 1.2; }

.fp-btn { margin-top: 14px; gap: 10px; }
.fp-btn .icon { width: 22px; height: 22px; }
.fp-sim { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* Camera scanning */
.pos-search .camera-btn { position: absolute; right: 7px; width: 38px; height: 38px; background: var(--surface-inverse); color: var(--brand); }
.pos-search .camera-btn:hover { background: var(--surface-inverse); }
.scanner-modal .modal-body { padding-top: 4px; }
.scanner-frame { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #000; aspect-ratio: 4 / 3; max-width: 100%; }
.scanner-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner-guide {
  position: absolute; left: 12%; right: 12%; top: 30%; bottom: 30%; border-radius: 14px;
  border: 3px solid rgba(255, 255, 255, 0.9); box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35);
}
.scanner-guide::after {
  content: ''; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px;
  background: var(--brand); box-shadow: 0 0 12px var(--brand); animation: scanline 1.6s ease-in-out infinite;
}
@keyframes scanline { 0%, 100% { transform: translateY(-34px); } 50% { transform: translateY(34px); } }
@media (prefers-reduced-motion: reduce) { .scanner-guide::after { animation: none; } }
.scanner-status { display: flex; align-items: center; gap: 8px; min-height: 22px; font-weight: 600; color: var(--ink-2); }
.scanner-status.bad { color: var(--bad); }
.scanner-modal .btn[aria-pressed='true'] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
