/* ============================================================
   Kappino Traditional POS (2026-10-31) — design ref:
   "Italian Restaurant POS Screen / Kappino POS.dc.html".

   A second face of the SAME till. Nothing here is a copy of the Modern POS:
   the ticket lines, the menu grid, the order-type toggle, the search box, the
   full-screen button and every modal are the Modern POS's own elements,
   re-laid out while `.view[data-view="pos"]` carries `.posd-trad` (set by
   pos-design.js). pos-traditional.js adds only what the design has and the
   Modern POS does not: the top bar, the numpad, the action grid, the course
   headers and the Held page (all `.pt-el`).

   Every rule is scoped to `.posd-trad`, so the Modern POS cannot be touched
   by this file. This file loads after responsive.css so it wins its ties.
   ============================================================ */

/* Traditional-only elements never show on the Modern POS. */
.view[data-view="pos"]:not(.posd-trad) .pt-el { display: none !important; }
.pt-el[hidden] { display: none !important; }

.view[data-view="pos"].posd-trad {
  --pt-bg: #f4efe6;
  --pt-paper: #faf7f1;
  --pt-ink: #1d1a16;
  --pt-ink-2: #5e5447;
  --pt-muted: #7a6f61;
  --pt-faint: #9b8f7e;
  --pt-line: #e3dccf;
  --pt-line-soft: #f0ebe2;
  --pt-accent: #8a3b2a;
  --pt-accent-dk: #73301f;
  --pt-accent-soft: #f6e3dc;
  --pt-accent-tint: #faf4ef;
  --pt-serif: 'Cormorant Garamond', Georgia, serif;
  --pt-sans: 'Manrope', 'Plus Jakarta Sans', system-ui, sans-serif;
  --pt-ticket-w: clamp(320px, 30vw, 440px);
  font-family: var(--pt-sans);
  color: var(--pt-ink);
}
.posd-trad button { font-family: inherit; }

/* The Modern header is replaced by the Traditional top bar; its live controls
   (search, order type, schedule tray, fiscal badge, full screen) are moved into
   that bar by pos-traditional.js and moved back when the design changes. */
.view[data-view="pos"].posd-trad > .pos-topbar { display: none; }

/* ---------- top bar ---------- */
.posd-trad .pt-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px;
  padding: 10px 14px; margin-bottom: 12px;
  background: #fff; border: 1px solid var(--pt-line); border-radius: 14px;
}
.posd-trad .pt-views,
.posd-trad .pt-sides {
  display: flex; height: 40px; flex: none;
  border: 1px solid var(--pt-line); border-radius: 10px; overflow: hidden; background: #fff;
}
.posd-trad .pt-views button {
  height: 100%; padding: 0 18px; border: 0; background: #fff; color: var(--pt-ink-2);
  font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.posd-trad .pt-views button[aria-pressed="true"] { background: var(--pt-accent-soft); color: var(--pt-accent); }
.posd-trad .pt-sides button {
  width: 40px; height: 100%; border: 0; background: #fff; color: var(--pt-ink-2);
  font-size: 14px; font-weight: 800; cursor: pointer;
}
.posd-trad .pt-sides button[aria-pressed="true"] { background: var(--pt-ink); color: #fff; }

/* The order-type toggle (#posTypeSeg), restyled in place. */
.posd-trad .pt-bar #posTypeSeg {
  display: flex; flex-wrap: nowrap; height: 40px; padding: 3px; gap: 2px;
  background: var(--pt-bg); border: 1px solid var(--pt-line); border-radius: 10px; box-shadow: none;
}
.posd-trad .pt-bar #posTypeSeg .seg {
  height: 100%; padding: 0 14px; border: 0; border-radius: 7px; box-shadow: none;
  background: transparent; color: var(--pt-ink-2); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.posd-trad .pt-bar #posTypeSeg .seg.active { background: var(--pt-ink); color: #fff; }

.posd-trad .pt-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; max-width: 320px; padding: 0 14px;
  border: 0; border-radius: 17px; background: var(--pt-accent-soft); color: var(--pt-accent);
  font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.posd-trad .pt-chip span { overflow: hidden; text-overflow: ellipsis; }
.posd-trad .pt-chip .pt-caret { font-size: 10px; flex: none; }
.posd-trad .pt-chip.pt-chip-empty { background: #fff; border: 1.5px dashed var(--pt-accent); }
.posd-trad .pt-spacer { flex: 1 1 0; }

.posd-trad .pt-bar .pos-search {
  flex: 1 1 160px; min-width: 120px; max-width: 300px; height: 42px; margin: 0;
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: var(--pt-bg); border: 1px solid var(--pt-line); border-radius: 10px; box-shadow: none;
}
.posd-trad .pt-bar .pos-search svg { position: static; transform: none; color: var(--pt-faint); flex: none; }
.posd-trad .pt-bar .pos-search input {
  border: 0; outline: 0; background: transparent; width: 100%; height: 100%;
  font: 500 15px var(--pt-sans); color: var(--pt-ink); box-shadow: none; padding: 0;
}
.posd-trad .pt-bar .pos-fs-btn { height: 40px; border-radius: 10px; border: 1px solid var(--pt-line); color: var(--pt-ink); }
.posd-trad .pt-bar .pos-fs-label { display: inline; }
/* With the app sidebar open the bar is ~1100px wide: the full-screen button
   goes icon-only (its tooltip and aria-label keep the words) and the search
   gives way first, so the bar stays on one row. */
@media (max-width: 1599px) { body:not(.pos-fullscreen) .posd-trad .pt-bar .pos-fs-label { display: none; } }
.posd-trad .pt-chip { max-width: 240px; }
body.pos-fullscreen .posd-trad .pt-bar .pos-fs-btn { background: var(--pt-ink); border-color: var(--pt-ink); color: #fff; }
.posd-trad .pt-bar #posSchedTray:empty,
.posd-trad .pt-bar #posFiscalBadge:empty { display: none; }

/* Compact bar for the ~1000px a tablet or a laptop with the sidebar leaves. */
@media (max-width: 1365px) {
  .posd-trad .pt-bar { gap: 8px; padding: 10px 12px; }
  .posd-trad .pt-views button { padding: 0 12px; }
  .posd-trad .pt-bar #posTypeSeg .seg { padding: 0 10px; }
  .posd-trad .pt-bar .pos-search { flex-basis: 140px; }
  .posd-trad .pt-chip { max-width: 200px; }
}

/* The view is a column one screen tall and the two panels take what the bar
   leaves, so a bar that wraps on a narrow window never pushes Send and
   Payment below the fold. 112px is the Modern wrap's 188px offset less its
   own header row, so a one-row bar gives the panels exactly the Modern height.
   Phones and very short screens scroll the page instead, as the Modern POS
   does; full screen keeps its own height rule. */
@media (min-width: 561px) and (min-height: 481px) {
  .view[data-view="pos"].posd-trad.active { display: flex; flex-direction: column; height: calc(var(--screen-h) - 112px); }
  body.pos-fullscreen .view[data-view="pos"].posd-trad.active { height: calc(var(--screen-h) - 32px); }
  .view[data-view="pos"].posd-trad .pos-wrap { flex: 1 1 0; height: auto; min-height: 0; }
  .view[data-view="pos"].posd-trad .pt-bar { flex: none; }
}

/* ---------- the two columns ---------- */
.view[data-view="pos"].posd-trad .pos-wrap {
  grid-template-columns: var(--pt-ticket-w) minmax(0, 1fr);
  gap: 0;
  background: var(--pt-bg);
  border: 1px solid var(--pt-line); border-radius: 14px; overflow: hidden;
}
.view[data-view="pos"].posd-trad.pt-side-r .pos-wrap { grid-template-columns: minmax(0, 1fr) var(--pt-ticket-w); }
.view[data-view="pos"].posd-trad .pos-right { order: 0; }
.view[data-view="pos"].posd-trad .pos-left,
.view[data-view="pos"].posd-trad .pt-held { order: 1; }
.view[data-view="pos"].posd-trad.pt-side-r .pos-right { order: 2; }
.view[data-view="pos"].posd-trad.pt-view-held .pos-left { display: none; }

/* ---------- menu (right / left) ---------- */
.view[data-view="pos"].posd-trad .pos-left {
  background: transparent; border: 0; border-radius: 0; padding: 12px 12px 0; box-shadow: none;
}
.view[data-view="pos"].posd-trad .cat-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 0 2px; margin: 0 0 12px; border: 0;
  scrollbar-width: none;
}
.view[data-view="pos"].posd-trad .cat-row::-webkit-scrollbar { height: 0; }
.view[data-view="pos"].posd-trad .cat {
  flex: 1 0 auto; min-width: 110px; height: 52px; padding: 0 20px;
  border-radius: 8px; border: 2px solid var(--pt-cat, #e8e1d4); background: var(--pt-cat, #e8e1d4);
  color: var(--pt-ink); font-size: 15px; font-weight: 700; white-space: nowrap; transition: border-color .15s;
}
.view[data-view="pos"].posd-trad .cat:hover { border-color: var(--pt-ink-2); background: var(--pt-cat, #e8e1d4); }
.view[data-view="pos"].posd-trad .cat.active { border-color: var(--pt-ink); color: var(--pt-ink); background: var(--pt-cat, #e8e1d4); }

/* Category colours (assigned in order by pos-traditional.js), shared by the
   tile and the stripe under each product of that category. */
.posd-trad [data-pt-c="0"] { --pt-cat: #e8b4a0; }
.posd-trad [data-pt-c="1"] { --pt-cat: #f2a0b0; }
.posd-trad [data-pt-c="2"] { --pt-cat: #f0d070; }
.posd-trad [data-pt-c="3"] { --pt-cat: #f0c080; }
.posd-trad [data-pt-c="4"] { --pt-cat: #d8a890; }
.posd-trad [data-pt-c="5"] { --pt-cat: #d0b0e0; }
.posd-trad [data-pt-c="6"] { --pt-cat: #a8d8b8; }
.posd-trad [data-pt-c="7"] { --pt-cat: #b4cfe6; }
.posd-trad [data-pt-c="all"] { --pt-cat: #e8e1d4; }

.view[data-view="pos"].posd-trad .menu-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding-bottom: 16px;
}
.view[data-view="pos"].posd-trad .menu-item {
  padding: 0; gap: 0; overflow: hidden; border-radius: 10px;
  border: 2px solid var(--pt-line); background: #fff; color: var(--pt-ink); box-shadow: none;
}
.view[data-view="pos"].posd-trad .menu-item:hover { border-color: var(--pt-accent); transform: none; box-shadow: none; }
.view[data-view="pos"].posd-trad .menu-item[data-pt-qty] { border-color: var(--pt-accent); }
.view[data-view="pos"].posd-trad .mi-img {
  width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0;
  background-color: var(--pt-cat, var(--pt-bg)); color: rgba(29, 26, 22, .45); font-size: 40px;
}
.view[data-view="pos"].posd-trad .mi-name {
  padding: 10px 12px 0; font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--pt-ink);
}
.view[data-view="pos"].posd-trad .mi-price {
  padding: 4px 12px 12px; margin-top: auto; font-size: 14px; font-weight: 800; color: var(--pt-accent);
}
.view[data-view="pos"].posd-trad .mi-vat-note { display: none; }
.view[data-view="pos"].posd-trad .menu-item::after {
  content: ''; display: block; height: 6px; width: 100%; flex: none; background: var(--pt-cat, var(--pt-line));
}
.view[data-view="pos"].posd-trad .menu-item[data-pt-qty]::before {
  content: attr(data-pt-qty);
  position: absolute; top: 8px; right: 8px; z-index: 2;
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; border: 2px solid #fff;
  background: var(--pt-ink); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center;
}
.view[data-view="pos"].posd-trad .mi-options-badge { top: 8px; left: 8px; right: auto; }
.view[data-view="pos"].posd-trad .mi-tag { top: 38px; left: 8px; }

/* ---------- held orders page ---------- */
.posd-trad .pt-held {
  display: none; flex-direction: column; min-width: 0; min-height: 0; padding: 16px 16px 0;
}
.posd-trad.pt-view-held .pt-held { display: flex; }
.posd-trad .pt-held-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.posd-trad .pt-held-head h2 { margin: 0; font: 600 28px/1 var(--pt-serif); color: var(--pt-ink); }
.posd-trad .pt-held-head span { font-size: 13px; color: var(--pt-muted); }
.posd-trad .pt-held-list { flex: 1; overflow: auto; min-height: 0; padding-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.posd-trad .pt-held-row {
  display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; padding: 16px 20px;
  background: #fff; border: 1px solid var(--pt-line); border-radius: 12px;
}
.posd-trad .pt-held-who { flex: 0 0 150px; min-width: 0; }
.posd-trad .pt-held-ref { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--pt-accent); }
.posd-trad .pt-held-name { font: 600 22px/1.1 var(--pt-serif); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.posd-trad .pt-held-time { font-size: 12px; color: var(--pt-muted); margin-top: 4px; }
.posd-trad .pt-held-sum { flex: 1 1 200px; min-width: 0; font-size: 14px; line-height: 1.5; }
.posd-trad .pt-held-sum small { display: block; font-size: 12px; color: var(--pt-muted); margin-top: 2px; }
.posd-trad .pt-held-total { font-size: 18px; font-weight: 800; }
.posd-trad .pt-held-btns { display: flex; gap: 8px; margin-left: auto; }
.posd-trad .pt-held-btns button {
  height: 42px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--pt-line);
  background: #fff; color: var(--pt-muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.posd-trad .pt-held-btns .pt-resume { border: 0; background: var(--pt-accent); color: #fff; font-weight: 700; padding: 0 18px; }
.posd-trad .pt-held-btns .pt-resume:hover { background: var(--pt-accent-dk); }
.posd-trad .pt-empty {
  flex: 1; display: grid; place-items: center; text-align: center; color: var(--pt-faint); font-size: 14px; padding: 40px;
}
.posd-trad .pt-empty-t { font: italic 500 26px var(--pt-serif); color: var(--pt-muted); margin-bottom: 6px; }

/* ---------- ticket ---------- */
.view[data-view="pos"].posd-trad .pos-right {
  background: #fff; border: 0; border-radius: 0; padding: 0; gap: 0; box-shadow: none;
  border-right: 1px solid var(--pt-line);
}
.view[data-view="pos"].posd-trad.pt-side-r .pos-right { border-right: 0; border-left: 1px solid var(--pt-line); }
.view[data-view="pos"].posd-trad .ticket-head { padding: 10px 18px 9px; border-bottom: 1px solid var(--pt-line); }
.view[data-view="pos"].posd-trad .ticket-title { font: 600 19px/1.2 var(--pt-serif); letter-spacing: 0; }
.view[data-view="pos"].posd-trad .ticket-sub { font-size: 12px; color: var(--pt-muted); }
.view[data-view="pos"].posd-trad .th-held { display: none; }
.view[data-view="pos"].posd-trad .pos-edit-banner { margin: 8px 12px 0; }

.view[data-view="pos"].posd-trad .pos-right-body { padding: 0; gap: 0; }
/* Table and customer live in the top bar and the Customer button; the chair
   picker (seat of a dine-in line) stays here. */
.view[data-view="pos"].posd-trad .otf-pill { display: none; }
.view[data-view="pos"].posd-trad .ot-fields:not([hidden]) { padding: 8px 18px 0; gap: 0; }
.view[data-view="pos"].posd-trad .ot-fields .otf-pills:not(:has(.otf-chair:not([hidden]))) { display: none; }
.view[data-view="pos"].posd-trad .otf-chair { width: 100%; }

.view[data-view="pos"].posd-trad .pos-cart-empty { padding: 40px; gap: 0; }
.view[data-view="pos"].posd-trad .pos-cart-empty > * { display: none; }
.view[data-view="pos"].posd-trad .pos-cart-empty .pt-el { display: block; }

.view[data-view="pos"].posd-trad .pos-right-body .ticket { gap: 0; display: flex; flex-direction: column; }
.view[data-view="pos"].posd-trad .ticket li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  column-gap: 8px; row-gap: 2px; align-items: start;
  margin: 0; padding: 14px 18px 14px 10px;
  border: 0; border-left: 4px solid transparent; border-bottom: 1px solid var(--pt-line-soft);
  border-radius: 0; background: #fff; box-shadow: none; cursor: pointer;
  opacity: 1; transform: none;
}
.view[data-view="pos"].posd-trad .ticket li:hover { box-shadow: none; background: var(--pt-paper); }
.view[data-view="pos"].posd-trad .ticket li.pt-focus { border-left-color: var(--pt-accent); background: var(--pt-accent-tint); }
.view[data-view="pos"].posd-trad .ticket li::before {
  content: attr(data-pt-qty); grid-column: 1; grid-row: 1 / span 4;
  font-size: 13px; color: var(--pt-muted); padding-top: 2px; font-variant-numeric: tabular-nums;
}
.view[data-view="pos"].posd-trad .ticket li.tk-sent::before { content: '✓ ' attr(data-pt-qty); color: #4d7c3a; white-space: nowrap; }
.view[data-view="pos"].posd-trad .ticket li.tk-sent { opacity: 1; }
.view[data-view="pos"].posd-trad .ticket li.tk-sent .tk-name { color: var(--pt-ink-2); }
.view[data-view="pos"].posd-trad .tk-thumb { display: none; }
.view[data-view="pos"].posd-trad .tk-info,
.view[data-view="pos"].posd-trad .tk-head,
.view[data-view="pos"].posd-trad .tk-line-actions { display: contents; }
.view[data-view="pos"].posd-trad .tk-name {
  grid-column: 2; grid-row: 1; font-size: 15px; font-weight: 600; letter-spacing: 0;
  white-space: normal; color: var(--pt-ink);
}
.view[data-view="pos"].posd-trad .tk-price {
  grid-column: 3; grid-row: 1; font-size: 15px; font-weight: 700; text-align: right; color: var(--pt-ink);
}
.view[data-view="pos"].posd-trad .tk-meta { grid-column: 2 / 4; grid-row: 2; flex-wrap: wrap; gap: 4px 8px; }
.view[data-view="pos"].posd-trad .tk-meta[hidden] { display: none; }
.view[data-view="pos"].posd-trad .tk-mod {
  flex-wrap: wrap; font: italic 500 14px var(--pt-serif); color: var(--pt-muted); overflow: visible;
}
.view[data-view="pos"].posd-trad .tk-chip { border: 0; padding: 0; background: none; color: inherit; line-height: 1.35; }
.view[data-view="pos"].posd-trad .tk-chip + .tk-chip-sep { display: inline; }
.view[data-view="pos"].posd-trad .tk-vat,
.view[data-view="pos"].posd-trad .tk-adj { font-size: 11px; color: var(--pt-muted); }
.view[data-view="pos"].posd-trad .tk-adj:not([hidden]) {
  font-size: 11px; font-weight: 700; color: var(--pt-accent); padding: 1px 7px; border-radius: 4px; background: var(--pt-accent-soft);
}
.view[data-view="pos"].posd-trad .tk-portions { grid-column: 2 / 4; grid-row: 3; margin: 2px 0 0; }
.view[data-view="pos"].posd-trad .tk-portion { font-size: 12px; color: var(--pt-accent); line-height: 1.4; }
/* The Modern line controls give way to the Traditional ones (.pt-ctl). */
.view[data-view="pos"].posd-trad .ticket .tk-ctl,
.view[data-view="pos"].posd-trad .ticket .tk-del,
.view[data-view="pos"].posd-trad .ticket .tk-prio { display: none; }

.posd-trad .pt-ctl { grid-column: 2 / 4; grid-row: 4; display: none; gap: 6px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.posd-trad .ticket li.pt-focus .pt-ctl { display: flex; }
.posd-trad .pt-ctl select,
.posd-trad .pt-ctl button {
  height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--pt-line); background: #fff;
  font: 700 12px var(--pt-sans); color: var(--pt-ink-2); cursor: pointer; outline: 0;
}
.posd-trad .pt-ctl select.pt-on { border-color: var(--pt-accent); background: var(--pt-accent-soft); color: var(--pt-accent); }
.posd-trad .pt-ctl .pt-step { width: 32px; padding: 0; font-size: 16px; }
.posd-trad .pt-ctl .pt-rm { color: var(--pt-accent); margin-left: auto; }

.posd-trad .ticket > .pt-chead {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px 6px;
  background: var(--pt-paper); border-bottom: 1px solid var(--pt-line-soft);
}
.posd-trad .pt-chead b {
  width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--pt-accent); color: #fff;
  font-size: 11px; font-weight: 800; display: grid; place-items: center;
}
.posd-trad .pt-chead.pt-none b { background: var(--pt-line); color: var(--pt-ink-2); }
.posd-trad .pt-chead span { font: 600 16px var(--pt-serif); white-space: nowrap; }
.posd-trad .pt-chead small { font-size: 11px; color: var(--pt-muted); }

/* totals */
.view[data-view="pos"].posd-trad .pos-right-foot { border-top: 1px solid var(--pt-line); padding: 12px 18px 16px; }
.view[data-view="pos"].posd-trad .totals { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; border: 0; background: none; }
.view[data-view="pos"].posd-trad .tot-row { font-size: 13px; color: var(--pt-muted); padding: 0; border: 0; }
.view[data-view="pos"].posd-trad .tot-row.total { font-size: 20px; font-weight: 800; color: var(--pt-ink); margin-top: 2px; padding: 0; border: 0; }
.view[data-view="pos"].posd-trad .tot-row.vat-line { font-size: 12px; }
/* Modern's own actions are replaced by the action grid (which drives them). */
.view[data-view="pos"].posd-trad .pay-actions { display: none; }

/* numpad */
.posd-trad .pt-pad-hint {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 0 0; font-size: 12px; color: var(--pt-muted);
}
.posd-trad .pt-pad-hint b { color: var(--pt-ink); font-weight: 700; }
.posd-trad .pt-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding-top: 8px; }
.posd-trad .pt-pad button {
  height: 48px; border-radius: 8px; border: 1px solid var(--pt-line); background: #fff;
  color: var(--pt-ink); font-size: 17px; font-weight: 600; cursor: pointer; touch-action: manipulation;
}
.posd-trad .pt-pad button:active { background: var(--pt-bg); }
.posd-trad .pt-pad .pt-mode { background: var(--pt-bg); color: var(--pt-muted); font-size: 13px; }
.posd-trad .pt-pad .pt-mode[aria-pressed="true"] { background: var(--pt-ink); color: #fff; }
.posd-trad .pt-pad .pt-mode:disabled { opacity: .45; cursor: not-allowed; }

/* action grid + Send / Payment */
.posd-trad .pt-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 6px; padding-top: 10px; }
.posd-trad .pt-acts button {
  height: 44px; min-width: 0; padding: 0 6px; border-radius: 8px; border: 1px solid var(--pt-line); background: #fff;
  color: var(--pt-ink); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.posd-trad .pt-acts .pt-clear { color: var(--pt-accent); }
.posd-trad .pt-acts .pt-cust.pt-on { border-color: var(--pt-accent); background: var(--pt-accent-soft); color: var(--pt-accent); }
.posd-trad .pt-go { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-top: 6px; }
.posd-trad .pt-go button {
  height: 60px; border-radius: 10px; font-size: 17px; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; padding: 0 16px; min-width: 0;
}
.posd-trad .pt-go span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.posd-trad .pt-go small { font-size: 12px; font-weight: 600; opacity: .9; white-space: nowrap; }
.posd-trad .pt-send { border: 0; background: var(--pt-accent); color: #fff; font-weight: 800; }
.posd-trad .pt-send:hover { background: var(--pt-accent-dk); }
.posd-trad .pt-pay { border: 1px solid var(--pt-line); background: #fff; color: var(--pt-ink); font-weight: 700; }
.posd-trad .pt-pay:hover { border-color: var(--pt-ink); }
.posd-trad .pt-go button:disabled { opacity: .55; cursor: not-allowed; }

/* the ticket header on a narrow screen + the "View order" bar */
.posd-trad .pt-tback,
.posd-trad .pt-orderbar { display: none; }

/* Shorter screens: the keys shrink, then fold behind a Keypad button so the
   order lines keep room. Full screen frees the app bar, so it folds later.
   Measured on a real till (2026-10-31): 791px of height with the app bar
   left the order list 119px with the keys open — too little to work in. */
@media (max-height: 960px) {
  .posd-trad .pt-pad button { height: 40px; }
  .posd-trad .pt-go button { height: 52px; }
}
.posd-trad .pt-padtoggle { display: none; }
@media (max-height: 880px) {
  body:not(.pos-fullscreen) .posd-trad:not(.pt-pad-open) .pt-pad,
  body:not(.pos-fullscreen) .posd-trad:not(.pt-pad-open) .pt-pad-hint { display: none; }
  body:not(.pos-fullscreen) .posd-trad .pt-padtoggle { display: block; }
}
@media (max-height: 700px) {
  .posd-trad:not(.pt-pad-open) .pt-pad,
  .posd-trad:not(.pt-pad-open) .pt-pad-hint { display: none; }
  .posd-trad .pt-padtoggle { display: block; }
}
.posd-trad .pt-padtoggle[aria-pressed="true"] { background: var(--pt-ink); color: #fff; border-color: var(--pt-ink); }

/* ---------- narrow: the ticket becomes a full-screen sheet ---------- */
@media (max-width: 900px) {
  .view[data-view="pos"].posd-trad .pos-wrap,
  .view[data-view="pos"].posd-trad.pt-side-r .pos-wrap { grid-template-columns: minmax(0, 1fr); }
  .view[data-view="pos"].posd-trad .pos-right {
    position: fixed; inset: 0; z-index: 90; max-height: none; border-radius: 0; box-shadow: none;
    display: none; border: 0;
  }
  .view[data-view="pos"].posd-trad.pt-ticket-open .pos-right { display: flex; flex-direction: column; }
  .posd-trad .pt-tback {
    display: flex; align-items: center; justify-content: space-between; flex: none;
    padding: 12px 18px; border-bottom: 1px solid var(--pt-line);
  }
  .posd-trad .pt-tback span { font: 600 20px var(--pt-serif); }
  .posd-trad .pt-tback button {
    height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--pt-line); background: #fff; font-size: 13px; font-weight: 600;
  }
  .view[data-view="pos"].posd-trad .pos-left .menu-grid { padding-bottom: 84px; }
  .posd-trad.pt-has-lines:not(.pt-ticket-open):not(.pt-view-held) .pt-orderbar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 70;
    height: 56px; border-radius: 14px; border: 0; background: var(--pt-ink); color: #fff;
    align-items: center; justify-content: space-between; padding: 0 18px; font-size: 15px; font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25); cursor: pointer;
  }
  .posd-trad .pt-orderbar small { opacity: .7; font-weight: 600; font-size: 15px; }
  .posd-trad .pt-orderbar b { font-size: 17px; }
  .posd-trad .pt-bar .pos-fs-label { display: none; }
  /* The page scrolls; the phone toast offset of the Modern sheet is not needed. */
  .view[data-view="pos"].posd-trad { padding-bottom: 0; }
}
@media (max-width: 560px) {
  .view[data-view="pos"].posd-trad .pos-wrap { height: auto; min-height: 0; }
  .view[data-view="pos"].posd-trad .pos-left { height: auto; overflow: visible; }
  .posd-trad .pt-bar { gap: 8px; }
  .posd-trad .pt-bar .pos-search { order: 9; flex-basis: 100%; max-width: none; }
  .posd-trad .pt-sides { display: none; }
  .view[data-view="pos"].posd-trad .menu-grid { grid-template-columns: repeat(auto-fill, minmax(min(132px, 100%), 1fr)); }
  body:has(.view[data-view="pos"].posd-trad.active) .toast-container { bottom: 84px; }
}

/* ============================================================
   POS design picker (first run) and Settings → POS Design
   ============================================================ */
.posd-overlay {
  position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px;
  background: rgba(20, 24, 31, .55); animation: kfade .15s ease;
}
.posd-card {
  width: min(860px, 100%); max-height: 94vh; overflow: auto; background: #fff; border-radius: 20px;
  box-shadow: 0 30px 80px rgba(20, 24, 31, .35); padding: 26px 26px 22px;
}
.posd-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink, #1B1F27); }
.posd-sub { font-size: 14px; color: var(--ink-2, #4b5160); margin-top: 6px; line-height: 1.5; }
.posd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 20px; }
.posd-opt {
  display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 14px; cursor: pointer;
  border: 2px solid var(--line, #E4E6EA); border-radius: 16px; background: #fff; color: inherit; font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.posd-opt:hover:not(:disabled) { border-color: var(--blue, #2D6FD6); box-shadow: 0 10px 24px rgba(20, 24, 31, .08); }
.posd-opt.posd-current { border-color: var(--blue, #2D6FD6); }
.posd-opt:disabled { cursor: default; }
.posd-name { font-size: 16px; font-weight: 800; color: var(--ink, #1B1F27); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.posd-badge { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px; background: #E9F1FD; color: var(--blue, #2D6FD6); }
.posd-thumb {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; display: block;
  border-radius: 10px; border: 1px solid var(--line, #E4E6EA); background: #f4f5f7;
}
.posd-desc { font-size: 13px; color: var(--ink-2, #4b5160); line-height: 1.5; }
.posd-use {
  align-self: flex-start; display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 10px; border: 0;
  background: var(--grad-primary, #2D6FD6); color: #fff; font-size: 13.5px; font-weight: 700; pointer-events: none;
}
.posd-opt.posd-current .posd-use { background: #E9F1FD; color: var(--blue, #2D6FD6); }
.posd-opt:disabled .posd-use { display: none; }
.posd-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.posd-note { font-size: 12.5px; color: var(--ink-3, #6b7280); line-height: 1.45; max-width: 520px; }
.posd-later { height: 40px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--line-strong, #E4E6EA); background: #fff; font-weight: 700; cursor: pointer; }
.posd-busy { opacity: .6; pointer-events: none; }
@media (max-width: 560px) { .posd-card { padding: 20px 16px 16px; } .posd-title { font-size: 19px; } }
