/* MZ Adnova Tech - MZ Buffet POS live demo (pos-demo.html, js/pos-demo.js).
   The order screen is laid out at the iPad's size in points (1180 x 820) with
   the app's colors (Theme.swift) and sizes, then zoomed to fit the page by
   js/pos-demo.js. Narrower than 760px (a phone held upright) it switches to a
   stacked layout instead (.pd-compact). */

/* ---------------- Page around the demo ---------------- */
.pd-intro { padding-block: 56px 28px; }
.pd-intro h1 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); line-height: 1.08; margin-top: 10px; }
.pd-intro .hero-sub { margin-top: 14px; }
.pd-lead { margin-top: 10px; max-width: 46rem; }
.pd-stage { padding-bottom: 12px; }
.pd-below { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-top: 16px; }
.pd-note { font-size: 0.92rem; }
.pd-compact-note { margin-bottom: 14px; padding: 10px 14px; border-radius: var(--radius-ui); background: var(--well); font-size: 0.92rem; }
.pd-try-section { padding-top: 40px; }
.pd-noscript { padding: 24px; text-align: center; }

/* ---------------- The app ---------------- */
.pd {
  --pd-bg: #f6f4f1;
  --pd-surface: #fff;
  --pd-charcoal: #2a2c30;
  --pd-charcoal-pressed: #46494f;
  --pd-text: #1c1c21;
  --pd-text2: #707078;
  --pd-divider: rgba(0, 0, 0, 0.09);
  --pd-accent: #c7401f;
  --pd-success: #2e9e5c;
  --pd-orange: #e08600;
  --pd-side: #222327;
  --pd-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: var(--pd-text);
  line-height: 1.25;
  -webkit-tap-highlight-color: transparent;
}
/* Zero specificity, so every button's own rules below win. */
:where(.pd button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-user-select: none; user-select: none; }
:where(.pd button:disabled) { cursor: default; }
.pd button:focus-visible { outline: 3px solid #4c8dff; outline-offset: 2px; }
.pd h3, .pd h4, .pd p { margin: 0; }
.pd p { color: inherit; }
.pd-ic { width: 1em; height: 1em; flex: none; display: block; }
.pd-flex { flex: 1 1 auto; }

.pd-device {
  max-width: 1208px;
  margin-inline: auto;
  padding: 14px;
  border-radius: 34px;
  background: #0f1115;
  box-shadow: var(--shadow-deep);
  overflow: hidden;
}
.pd-screen {
  position: relative;
  width: 1180px;
  height: 820px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  border-radius: 20px;
  overflow: hidden;
  background: var(--pd-bg);
}
.pd:not(.is-ready) .pd-screen { visibility: hidden; }

/* ---- Sidebar ---- */
.pd-side {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 16px 10px 14px;
  background: var(--pd-side);
  color: #fff;
  min-height: 0;
}
.pd-clock { display: flex; flex-direction: column; align-items: center; margin-bottom: 10px; white-space: nowrap; }
.pd-time { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.pd-date { font-size: 12px; opacity: 0.7; margin-top: 2px; }
.pd-side-items { display: flex; flex-direction: column; gap: 2px; }
.pd-side-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 7px 2px 6px; border-radius: 12px;
  font-size: 13.5px; font-weight: 500; color: rgba(255, 255, 255, 0.92) !important;
}
.pd-side-btn .pd-ic { font-size: 23px; }
.pd-side-btn.is-on { background: #fff; color: var(--pd-text) !important; font-weight: 600; }
.pd-side-btn:not(.is-on):hover { background: rgba(255, 255, 255, 0.08); }
.pd-lang {
  margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; border-radius: 999px; background: rgba(255, 255, 255, 0.1) !important; color: rgba(255, 255, 255, 0.85) !important;
  font-size: 13px; font-weight: 600;
}
.pd-lang .pd-ic { font-size: 18px; }
.pd-manager {
  margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 11px 4px; border-radius: 12px; background: #fff !important; color: var(--pd-text) !important;
  font-size: 13px; font-weight: 600;
}
.pd-manager .pd-ic { font-size: 26px; }

/* ---- Order screen: ticket and menu ---- */
.pd-order {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: 372px minmax(0, 1fr);
  min-height: 0;
}
.pd-ticket {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 24px 22px 18px;
  border-right: 1px solid var(--pd-divider);
}
.pd-thead {
  display: flex; align-items: center; gap: 8px; min-height: 44px;
  padding-bottom: 18px; border-bottom: 1px solid var(--pd-divider);
  font-size: 17px; white-space: nowrap;
}
.pd-num { font-family: var(--pd-round); font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pd-where { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pd-where .pd-ic { font-size: 18px; }
.pd-tbl { font-weight: 700; }
.pd-gc { font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-more {
  height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--pd-surface) !important; border: 1px solid var(--pd-divider) !important;
  font-size: 15px; font-weight: 600;
}
.pd-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center;
}
.pd-empty .pd-ic { font-size: 40px; color: var(--pd-text2); opacity: 0.6; stroke-width: 1.4; }
.pd-empty b { font-size: 17px; font-weight: 600; }
.pd-empty span { font-size: 14px; color: var(--pd-text2); }
.pd-lines { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: none; }
.pd-lines::-webkit-scrollbar { display: none; }
.pd-line { display: flex; align-items: center; gap: 10px; padding: 12px 0; }
.pd-line + .pd-line { border-top: 1px solid var(--pd-divider); }
.pd-lname { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pd-lname b { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.pd-lname small { font-size: 13px; color: var(--pd-text2); }
.pd-lqty { font-family: var(--pd-round); font-size: 16px; font-weight: 700; color: var(--pd-text2); }
.pd-lprice { min-width: 72px; text-align: right; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-stepper {
  display: inline-flex; align-items: center; flex: none;
  border-radius: 999px; background: var(--pd-surface); border: 1px solid var(--pd-divider);
}
.pd-stepper button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; }
.pd-stepper button .pd-ic { font-size: 15px; stroke-width: 2.2; }
.pd-stepper span { min-width: 30px; text-align: center; font-family: var(--pd-round); font-size: 16px; font-weight: 700; }
.pd-round {
  width: 34px; height: 34px; display: grid; place-items: center; flex: none;
  border-radius: 999px; background: var(--pd-surface) !important; border: 1px solid var(--pd-divider) !important;
}
.pd-round .pd-ic { font-size: 15px; stroke-width: 2.2; }
.pd-totals { border-top: 1px solid var(--pd-divider); padding-top: 10px; display: flex; flex-direction: column; gap: 3px; }
.pd-trow { display: flex; justify-content: space-between; font-size: 14px; color: var(--pd-text2); font-variant-numeric: tabular-nums; }
.pd-ttotal, .pd-tbal { display: flex; justify-content: space-between; align-items: baseline; padding-top: 2px; font-weight: 700; }
.pd-ttotal span:first-child { font-size: 18px; }
.pd-ttotal span:last-child { font-family: var(--pd-round); font-size: 22px; font-variant-numeric: tabular-nums; }
.pd-tbal span:first-child { font-size: 16px; }
.pd-tbal span:last-child { font-family: var(--pd-round); font-size: 18px; }

.pd-menu { display: flex; flex-direction: column; min-height: 0; padding: 24px 22px 18px; }
.pd-menu-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pd-chips { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; flex: none; }
.pd-chips::-webkit-scrollbar { display: none; }
.pd-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 17px; flex: none;
  border-radius: 999px; background: var(--pd-surface) !important; border: 1px solid var(--pd-divider) !important;
  font-size: 16.5px; font-weight: 600; white-space: nowrap;
}
.pd-chip .pd-ic { font-size: 20px; }
.pd-chip.is-on { background: var(--pd-charcoal) !important; border-color: var(--pd-charcoal) !important; color: #fff !important; }
.pd-subs {
  display: inline-flex; align-self: flex-start; gap: 4px; margin-top: 12px; padding: 4px;
  border-radius: 999px; background: var(--pd-surface); border: 1px solid var(--pd-divider);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.pd-subs::-webkit-scrollbar { display: none; }
.pd-sub { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; font-size: 16px; font-weight: 500; white-space: nowrap; }
.pd-sub.is-on { background: var(--pd-charcoal) !important; color: #fff !important; font-weight: 600; }
.pd-nowtag { font-style: normal; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--pd-bg); color: var(--pd-text2); }
.pd-sub.is-on .pd-nowtag { background: rgba(255, 255, 255, 0.2); color: #fff; }
.pd-grid {
  flex: 1; min-height: 0; overflow-y: auto; margin-top: 16px; padding: 2px 2px 8px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; align-content: start;
  scrollbar-width: thin;
}
.pd-tile-wrap { position: relative; }
.pd-tile {
  width: 100%; display: flex; flex-direction: column; text-align: left;
  border-radius: 12px; overflow: hidden; background: var(--pd-surface) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.12s ease-out, opacity 0.12s ease-out;
}
.pd-tile:active { transform: scale(0.96); opacity: 0.85; }
.pd-tile.is-on { box-shadow: inset 0 0 0 2px var(--pd-charcoal), 0 3px 8px rgba(0, 0, 0, 0.05); }
.pd-photo { position: relative; height: 118px; display: grid; place-items: center; overflow: hidden; }
.pd-photo img { width: 100%; height: 100%; object-fit: contain; }
.pd-tile.is-on .pd-photo { margin: 2px 2px 0; height: 116px; }
.pd-art { width: 100%; height: 100%; display: grid; place-items: center; background: #f1efeb; color: var(--pd-charcoal); }
.pd-art .pd-ic { font-size: 50px; stroke-width: 1.5; }
.pd-badge {
  position: absolute; top: 8px; right: 8px; min-width: 28px; height: 28px; padding: 0 9px;
  display: grid; place-items: center; border-radius: 999px; background: var(--pd-charcoal); color: #fff;
  font-family: var(--pd-round); font-size: 15px; font-weight: 700;
}
.pd-tname { padding: 6px 14px 0; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-tname > span { display: inline; }
.pd-tprice {
  display: flex; align-items: center; gap: 4px; padding: 6px 14px 10px; min-height: 34px;
  font-family: var(--pd-round); font-size: 16px; font-weight: 700; color: var(--pd-accent); white-space: nowrap;
}
.pd-tprice.has-plus { padding-right: 48px; }
.pd-ic-sm { font-size: 13px; }
.pd-plus {
  position: absolute; right: 2px; bottom: 2px; width: 40px; height: 40px; display: grid; place-items: center;
}
.pd-plus .pd-ic { width: 28px; height: 28px; padding: 6.5px; border-radius: 999px; background: var(--pd-bg); stroke-width: 2.4; }

.pd-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.pd-act {
  height: 60px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 8px; background: var(--pd-surface) !important; border: 1px solid var(--pd-divider) !important;
  font-size: 16px; font-weight: 600; transition: transform 0.12s ease-out;
}
.pd-act .pd-ic { font-size: 19px; }
.pd-act:not(:disabled):active { transform: scale(0.97); }
.pd-act:disabled { opacity: 0.4; }
.pd-act-em { border: 1.5px solid var(--pd-charcoal) !important; }
.pd-act-pay { background: var(--pd-charcoal) !important; border-color: var(--pd-charcoal) !important; color: #fff !important; }
.pd-act-pay:disabled { opacity: 0.35; }
.pd-act-total { display: none; }

/* ---- Full pages: checkout and weight ---- */
.pd-page {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  padding: 24px;
}
.pd-cohead { display: flex; align-items: center; gap: 14px; }
.pd-backbtn {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border-radius: 999px; background: var(--pd-surface) !important; border: 1px solid var(--pd-divider) !important;
}
.pd-backbtn .pd-ic { font-size: 18px; stroke-width: 2.4; }
.pd-backbtn:disabled { opacity: 0.4; }
.pd-coicon { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 999px; background: var(--pd-surface); }
.pd-coicon .pd-ic { font-size: 24px; }
.pd-cotitle { flex: 1; min-width: 0; }
.pd-cotitle h3 { font-size: 26px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-cotitle p { margin-top: 3px; font-size: 15px; color: var(--pd-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-switch {
  display: inline-flex; gap: 4px; padding: 4px; flex: none;
  border-radius: 999px; background: var(--pd-surface); border: 1px solid var(--pd-divider);
}
.pd-switch button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 30px;
  border-radius: 999px; font-size: 17px; font-weight: 600; white-space: nowrap;
}
.pd-switch button .pd-ic { font-size: 20px; }
.pd-switch button.is-on { background: var(--pd-charcoal) !important; color: #fff !important; }
.pd-switch button:disabled { opacity: 0.45; }
.pd-switch-left { align-self: flex-start; }

.pd-cobody { flex: 1; display: flex; gap: 20px; min-height: 0; }
.pd-panel {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px;
  padding: 24px; border-radius: 11px; background: var(--pd-surface); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow-y: auto;
}
.pd-panel-title { font-size: 26px; font-weight: 700; }
.pd-tiles { display: flex; gap: 14px; }
.pd-amt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 9px; background: var(--pd-bg); }
.pd-amt span { font-size: 15px; font-weight: 600; color: var(--pd-text2); }
.pd-amt b { font-family: var(--pd-round); font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pd-amt small { font-size: 13px; color: var(--pd-text2); }
.pd-amt.is-dim b { color: rgba(112, 112, 120, 0.5); }
.pd-amt.is-ok b { color: var(--pd-success); }
.pd-amt.is-warn b { color: var(--pd-orange); }
.pd-amt-wide { flex: none; }
.pd-entry { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 9px; background: var(--pd-bg); }
.pd-entry > span { font-size: 15px; font-weight: 600; color: var(--pd-text2); }
.pd-entry small { font-size: 14px; color: var(--pd-text2); }
.pd-entry-val { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pd-entry-val i { font-style: normal; font-family: var(--pd-round); font-size: 44px; font-weight: 600; color: var(--pd-text2); }
.pd-entry-val i.pd-unit { font-size: 30px; }
.pd-entry-val b { font-family: var(--pd-round); font-size: 64px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.pd-entry-val b.is-dim { color: rgba(112, 112, 120, 0.5); }
.pd-quick { display: flex; gap: 10px; }
.pd-quick button {
  flex: 1; min-width: 0; height: 52px; border-radius: 999px;
  background: var(--pd-surface) !important; border: 1px solid var(--pd-divider) !important;
  font-family: var(--pd-round); font-size: 17px; font-weight: 600; white-space: nowrap;
}
.pd-quick button:active { filter: brightness(0.9); transform: scale(0.97); }
.pd-big {
  display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 0 24px; flex: none;
  border-radius: 9px; background: var(--pd-charcoal) !important; color: #fff !important;
  font-size: 20px; font-weight: 600; transition: transform 0.12s ease-out;
}
.pd-big .pd-ic { font-size: 23px; }
.pd-big span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-big em { margin-left: auto; font-style: normal; font-variant-numeric: tabular-nums; }
.pd-big:not(:disabled):active { transform: scale(0.97); background: var(--pd-charcoal-pressed) !important; }
.pd-big:disabled { opacity: 0.35; }
.pd-textbtn { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-size: 16px; font-weight: 600; color: var(--pd-text) !important; }
.pd-textbtn .pd-ic { font-size: 16px; stroke-width: 2.4; }

.pd-keypad {
  width: clamp(340px, 40%, 480px); flex: none; display: flex; flex-direction: column; gap: 12px;
  padding: 24px; border-radius: 11px; background: var(--pd-surface); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.pd-keys { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 12px; min-height: 0; }
.pd-key {
  display: grid; place-items: center; min-height: 56px; border-radius: 8px; background: var(--pd-bg) !important;
  font-family: var(--pd-round); font-size: 34px; font-weight: 600;
}
.pd-key .pd-ic { font-size: 28px; stroke-width: 1.6; }
.pd-key:active { filter: brightness(0.85); transform: scale(0.97); }
.pd-key-clear { height: 56px; font-family: inherit; font-size: 18px; }

.pd-chipsline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pd-chipsline > b { font-size: 13px; color: var(--pd-text2); }
.pd-paidchip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: 999px; background: rgba(46, 158, 92, 0.1); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.pd-ok { color: var(--pd-success); font-size: 16px; }

.pd-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pd-steps li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--pd-text2); }
.pd-steps b {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 999px;
  background: var(--pd-charcoal); color: #fff; font-size: 13px;
}
.pd-spin {
  width: 20px; height: 20px; flex: none; border-radius: 999px;
  border: 2.5px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: pd-spin 0.8s linear infinite;
}
.pd-spin-dark { display: inline-block; vertical-align: -4px; margin-right: 8px; border-color: rgba(0, 0, 0, 0.15); border-top-color: var(--pd-charcoal); }
@keyframes pd-spin { to { transform: rotate(360deg); } }

.pd-reader {
  width: clamp(340px, 40%, 480px); flex: none; display: flex; flex-direction: column; gap: 16px;
  padding: 24px; border-radius: 11px; background: var(--pd-surface); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.pd-reader h4 { font-size: 15px; font-weight: 600; color: var(--pd-text2); }
.pd-reader-row { display: flex; align-items: center; gap: 14px; }
.pd-reader-row b { display: block; font-size: 17px; }
.pd-reader-row span { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--pd-success); font-weight: 600; }
.pd-reader-dev { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--pd-charcoal); color: #fff; }
.pd-reader-dev .pd-ic { font-size: 24px; }
.pd-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--pd-success); }
.pd-reader-pad {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; border-radius: 12px; background: var(--pd-bg); text-align: center;
}
.pd-reader-pad p { font-size: 15px; color: var(--pd-text2); max-width: 18rem; }
.pd-reader-wave { font-size: 76px; color: rgba(112, 112, 120, 0.35); stroke-width: 1.4; }
.pd-reader-pad.is-live .pd-reader-wave { color: var(--pd-success); animation: pd-pulse 1.4s ease-in-out infinite; }
@keyframes pd-pulse { 50% { transform: scale(1.08); opacity: 0.6; } }
.pd-tapbtn { width: 100%; min-height: 60px; justify-content: center; }

.pd-done {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 32px; border-radius: 11px; background: var(--pd-surface); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); text-align: center;
}
.pd-done-check { font-size: 60px; color: var(--pd-success); }
.pd-done h3 { font-size: 30px; font-weight: 700; }
.pd-done > p { font-size: 16px; color: var(--pd-text2); }
.pd-bigbox {
  width: min(480px, 100%); display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 20px; border-radius: 11px; background: rgba(46, 158, 92, 0.08);
}
.pd-bigbox > span { font-size: 17px; font-weight: 600; color: var(--pd-text2); }
.pd-bigbox strong { font-family: var(--pd-round); font-size: 76px; font-weight: 700; line-height: 1; color: var(--pd-success); font-variant-numeric: tabular-nums; }
.pd-cardline { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-size: 18px; font-weight: 600; }
.pd-cardline .pd-ic { font-size: 20px; }
.pd-bigbox small { font-size: 15px; color: var(--pd-text2); font-weight: 500; }
.pd-figs { display: flex; gap: 32px; }
.pd-figs span { display: block; font-size: 14px; color: var(--pd-text2); }
.pd-figs b { font-family: var(--pd-round); font-size: 22px; }
.pd-also { font-size: 15px; color: var(--pd-text2); }
.pd-receipt-choices { display: flex; gap: 14px; margin-top: 4px; }
.pd-receipt-choices .pd-big { min-height: 64px; width: 280px; justify-content: center; }
.pd-outline {
  width: 220px; min-height: 64px; border-radius: 9px; background: var(--pd-bg) !important;
  border: 1.5px solid var(--pd-divider) !important; font-size: 20px; font-weight: 600;
}
.pd-outline:disabled, .pd-receipt-choices .pd-big:disabled { opacity: 0.35; }
.pd-printing { display: inline-flex; align-items: center; gap: 8px; min-height: 22px; font-size: 15px; color: var(--pd-text2); }

.pd-tips {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 32px; border-radius: 11px; background: var(--pd-surface); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); text-align: center;
}
.pd-tips h3 { font-size: 34px; font-weight: 700; }
.pd-tips > p { font-size: 18px; color: var(--pd-text2); }
.pd-tipgrid { width: 100%; max-width: 820px; margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pd-tiptile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px;
  border-radius: 12px; background: var(--pd-surface) !important; border: 1.5px solid var(--pd-divider) !important;
}
.pd-tiptile b { font-family: var(--pd-round); font-size: 30px; font-weight: 700; }
.pd-tiptile span { font-size: 18px; font-weight: 600; }
.pd-tiptile small { font-size: 14px; color: var(--pd-text2); }
.pd-tiptile.is-quiet { background: var(--pd-bg) !important; }
.pd-tiptile:active { transform: scale(0.97); }
.pd-tiphint { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 17px; font-weight: 500; color: var(--pd-text2); }
.pd-tiphint .pd-ic { font-size: 20px; }

.pd-wtotal { display: flex; align-items: baseline; justify-content: space-between; }
.pd-wtotal span { font-size: 20px; font-weight: 700; }
.pd-wtotal b { font-family: var(--pd-round); font-size: 30px; font-weight: 700; }

/* ---- Toast and sheets ---- */
.pd-toast {
  position: absolute; left: calc(104px + 372px + (100% - 476px) / 2); bottom: 96px; transform: translateX(-50%); z-index: 5;
  display: inline-flex; align-items: center; gap: 8px; max-width: 640px; min-height: 38px; padding: 8px 16px;
  border-radius: 999px; background: var(--pd-success); color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); animation: pd-rise 0.2s ease-out;
}
.pd-toast.is-info { left: calc(104px + (100% - 104px) / 2); background: var(--pd-charcoal); text-align: center; border-radius: 18px; }
.pd-toast-ic { font-size: 18px; color: rgba(255, 255, 255, 0.3); }
@keyframes pd-rise { from { opacity: 0; transform: translate(-50%, 8px); } }

.pd-modal {
  position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(0, 0, 0, 0.35); animation: pd-fade 0.15s ease-out;
}
@keyframes pd-fade { from { opacity: 0; } }
.pd-sheet {
  width: 460px; max-width: 100%; max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
  padding: 18px 22px 22px; border-radius: 16px; background: var(--pd-surface); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.pd-sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.pd-sheet-head h3 { font-size: 19px; font-weight: 700; text-align: center; }
.pd-sheet-head .pd-textbtn { align-self: center; color: var(--pd-text2) !important; }
.pd-sheet-label { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--pd-text2); }
.pd-addons { display: flex; flex-direction: column; border-radius: 12px; background: var(--pd-bg); overflow: hidden; }
.pd-addon { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; font-size: 17px; text-align: left; }
.pd-addon + .pd-addon { border-top: 1px solid var(--pd-divider) !important; }
.pd-addon em { margin-left: auto; font-style: normal; font-size: 15px; color: var(--pd-text2); }
.pd-checkbox {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 7px;
  border: 1.5px solid rgba(0, 0, 0, 0.25); background: #fff; color: #fff;
}
.pd-checkbox .pd-ic { font-size: 16px; stroke-width: 3; }
.pd-addon.is-on .pd-checkbox { background: var(--pd-charcoal); border-color: var(--pd-charcoal); }
.pd-qtyrow { display: flex; align-items: center; justify-content: space-between; font-size: 17px; font-weight: 600; }
.pd-stepper-lg button { width: 44px; height: 44px; }
.pd-stepper-lg button:disabled { opacity: 0.3; }
.pd-sheet .pd-big { min-height: 60px; margin-top: 4px; }
.pd-sheet-receipt { width: 420px; }
.pd-sheet-note { font-size: 14px; color: var(--pd-text2) !important; text-align: center; }
.pd-paper {
  max-height: 440px; overflow-y: auto; padding: 20px 18px; border-radius: 4px;
  background: #fff; border: 1px solid var(--pd-divider); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13px; line-height: 1.5; color: #111;
}
.pd-r { display: flex; justify-content: space-between; gap: 12px; }
.pd-r span:last-child { white-space: nowrap; }
.pd-rc { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pd-rstore { font-size: 16px; }
.pd-rorder { margin-top: 10px; font-size: 15px; }
.pd-rind { padding-left: 3ch; }
.pd-rtotal { font-weight: 700; font-size: 15px; }

/* ---------------- AIO POS (data-app="aio") ----------------
   A light sidebar, a header bar across the ticket and menu (OrderHeaderBar),
   the categories in a list down the side (CategoryBar), three cards a row,
   and the large add-on sheet with sections (AddOnSheet). */
.pd[data-app="aio"] .pd-side { background: var(--pd-bg); color: var(--pd-text); border-right: 1px solid var(--pd-divider); }
.pd[data-app="aio"] .pd-side-btn { color: var(--pd-text) !important; }
.pd[data-app="aio"] .pd-side-btn.is-on { background: var(--pd-charcoal); color: #fff !important; }
.pd[data-app="aio"] .pd-side-btn:not(.is-on):hover { background: rgba(0, 0, 0, 0.05); }
.pd[data-app="aio"] .pd-lang { background: rgba(0, 0, 0, 0.06) !important; color: var(--pd-text) !important; }
.pd[data-app="aio"] .pd-manager { background: var(--pd-charcoal) !important; color: #fff !important; }
.pd[data-app="aio"] .pd-order { grid-template-columns: 340px 164px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.pd-topbar { display: none; }
.pd[data-app="aio"] .pd-topbar {
  grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center; gap: 12px; min-height: 84px;
  padding: 18px 22px 16px; border-bottom: 1px solid var(--pd-divider);
}
.pd-tb-ticket { width: 296px; flex: none; display: flex; align-items: center; gap: 8px; font-size: 18px; white-space: nowrap; }
.pd-tb-ticket .pd-num { font-size: 22px; }
.pd-more-dark {
  height: 40px; padding: 0 22px; border-radius: 999px; background: var(--pd-charcoal) !important; color: #fff !important;
  font-size: 16px; font-weight: 600;
}
.pd-fulfill { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pd-fbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; min-width: 124px; padding: 0 16px;
  border-radius: 8px; background: var(--pd-surface) !important; border: 1px solid var(--pd-divider) !important;
  font-size: 15px; font-weight: 600; white-space: nowrap;
}
.pd-fbtn .pd-ic { font-size: 18px; }
.pd-fbtn.is-on { background: var(--pd-charcoal) !important; border-color: var(--pd-charcoal) !important; color: #fff !important; }
.pd-customer { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 260px; text-align: left; font-size: 14px; }
.pd-cline { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.pd-cline > span, .pd-cline > b { overflow: hidden; text-overflow: ellipsis; }
.pd-cline .pd-ic { font-size: 14px; color: var(--pd-text2); }
.pd-cline em { font-style: normal; color: var(--pd-text2); font-variant-numeric: tabular-nums; }
.pd-cremove { width: 28px; height: 28px; flex: none; display: grid; place-items: center; margin-right: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.06) !important; }
.pd-cremove .pd-ic { font-size: 14px; stroke-width: 2.4; }
.pd[data-app="aio"] .pd-ticket { grid-column: 1; grid-row: 2; padding-top: 6px; }
.pd-cats { display: none; }
.pd[data-app="aio"] .pd-cats {
  grid-column: 2; grid-row: 2; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; scrollbar-width: none;
  padding: 14px 12px; border-right: 1px solid var(--pd-divider);
}
.pd-cats::-webkit-scrollbar { display: none; }
.pd-cat {
  display: flex; align-items: center; gap: 8px; min-height: 46px; margin: 4px 0; padding: 8px; flex: none;
  border-radius: 8px; text-align: left; font-size: 16px; font-weight: 600; line-height: 1.15;
}
.pd-cat + .pd-cat { position: relative; }
.pd-cat + .pd-cat::before { content: ""; position: absolute; left: 0; right: 0; top: -5px; border-top: 1px solid var(--pd-divider); }
.pd-cat .pd-ic { font-size: 19px; }
.pd-cat.is-on { background: var(--pd-charcoal) !important; color: #fff !important; }
.pd-cat.is-on::before, .pd-cat.is-on + .pd-cat::before { border-color: transparent; }
.pd[data-app="aio"] .pd-menu { grid-column: 3; grid-row: 2; padding-top: 22px; }
.pd[data-app="aio"] .pd-grid { margin-top: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pd-lnote { font-style: italic; }

.pd-sheet-wide { width: 860px; height: 100%; padding: 0; gap: 0; overflow: hidden; }
.pd-sheet-wide .pd-sheet-head { padding: 14px 22px; border-bottom: 1px solid var(--pd-divider); }
.pd-sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px 24px; }
.pd-sheet-foot { padding: 14px 24px 18px; border-top: 1px solid var(--pd-divider); }
.pd-sheet-foot .pd-big { width: 100%; min-height: 60px; font-size: 19px; }
.pd-sheet-item { display: flex; align-items: center; gap: 14px; }
.pd-sheet-item img, .pd-sheet-item .pd-art { width: 52px; height: 52px; flex: none; border-radius: 10px; object-fit: cover; }
.pd-sheet-item .pd-art .pd-ic { font-size: 28px; }
.pd-sheet-item b { font-size: 22px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-sheet-item em { margin-left: auto; font-style: normal; font-family: var(--pd-round); font-size: 20px; font-weight: 700; color: var(--pd-accent); }
.pd-sec { margin-top: 24px; }
.pd-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; font-weight: 600; }
.pd-sec-head > span:first-child { color: var(--pd-text2); }
.pd-sec-head .is-note { color: var(--pd-accent); }
.pd-sec-head .is-missing { color: #d6302b; }
.pd-opts { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pd-opt { position: relative; display: flex; align-items: stretch; border-radius: 8px; background: var(--pd-bg); box-shadow: inset 0 0 0 2px transparent; }
.pd-opt.is-on { box-shadow: inset 0 0 0 2px var(--pd-charcoal); }
.pd-opt.is-dim { opacity: 0.4; }
.pd-opt-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 78px; padding: 5px 14px 5px 5px; text-align: left; }
.pd-opt-main:not(:has(img)) { padding-left: 14px; }
.pd-opt-main img { width: 68px; height: 68px; flex: none; border-radius: 5px; object-fit: cover; }
.pd-opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pd-opt-text b { font-size: 16px; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pd-opt-text small { font-size: 12.5px; color: var(--pd-accent); }
.pd-opt-main em { flex: none; font-style: normal; font-family: var(--pd-round); font-size: 15px; font-weight: 600; color: var(--pd-text2); }
.pd-opt-main em.is-paid { color: var(--pd-accent); }
.pd-opt-minus { width: 44px; flex: none; display: grid; place-items: center; margin-right: 4px; color: var(--pd-text2) !important; }
.pd-opt-minus .pd-ic { font-size: 24px; }
.pd-opt-badge {
  position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center;
  border-radius: 999px; background: var(--pd-charcoal); color: #fff; font-family: var(--pd-round); font-size: 11px; font-weight: 700;
}
.pd-opt-badge .pd-ic { font-size: 10px; stroke-width: 3.5; }
.pd-input {
  width: 100%; height: 52px; margin-top: 10px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent;
  background: var(--pd-bg); color: var(--pd-text); font: inherit; font-size: 16px;
}
.pd-input:focus { outline: none; border-color: var(--pd-charcoal); background: #fff; }
.pd-qtyrow-box { margin-top: 24px; height: 62px; padding: 0 8px 0 16px; border-radius: 8px; background: var(--pd-bg); }
.pd-field { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; color: var(--pd-text2); }
.pd-field .pd-input { margin-top: 6px; color: var(--pd-text); font-weight: 400; }
.pd-center { justify-content: center; }
.pd-rwrap { overflow-wrap: anywhere; }

/* ---- More (OrderOptionsSheet): square buttons, three to a row ---- */
.pd-sheet-more { width: 540px; gap: 18px; padding: 24px; }
.pd-more-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pd-more-head h3 { font-size: 22px; font-weight: 700; }
.pd-xbtn { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 999px; background: var(--pd-bg) !important; color: var(--pd-text2) !important; }
.pd-xbtn .pd-ic { font-size: 15px; stroke-width: 2.6; }
.pd-mo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pd-mo {
  position: relative; aspect-ratio: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 10px; border-radius: 14px; background: var(--pd-bg) !important; text-align: center;
}
.pd-mo:not(:disabled):active { transform: scale(0.97); filter: brightness(0.95); }
.pd-mo:disabled { opacity: 0.45; }
.pd-mo-ic { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 999px; background: var(--pd-surface); }
.pd-mo-ic .pd-ic { font-size: 22px; stroke-width: 2; }
.pd-mo b { font-size: 15px; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pd-mo em { max-width: 100%; font-style: normal; font-family: var(--pd-round); font-size: 14px; font-weight: 600; color: var(--pd-accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-mo-lock { position: absolute; top: 10px; right: 10px; color: var(--pd-text2); }
.pd-mo-lock .pd-ic { font-size: 13px; stroke-width: 2.4; }
.pd-mo-note { font-size: 14px; color: var(--pd-text2); }
.pd-compact .pd-sheet-more { padding: 18px 16px; }
.pd-compact .pd-mo-grid { gap: 8px; }
.pd-compact .pd-mo-ic { width: 40px; height: 40px; }
.pd-compact .pd-mo b { font-size: 13px; }

/* ---- Over the menu: Custom Item, Discount, Service Charge, Split Check ----
   The app opens these over the menu and its buttons, with the ticket beside. */
.pd-menu.is-over .pd-menu-body { min-height: 0; }
.pd[data-app="aio"] .pd-menu.is-over { grid-column: 2 / -1; }
.pd-over { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 18px; }
.pd-over .pd-cotitle h3 { font-size: 24px; }
.pd-over .pd-cotitle p.is-ok { color: var(--pd-success); font-weight: 600; }
.pd-coicon-sq { border-radius: 12px; color: var(--pd-accent); }
.pd-over .pd-cobody { gap: 16px; }
.pd-over .pd-panel { padding: 20px; gap: 16px; }
.pd-over .pd-keypad { width: clamp(230px, 38%, 360px); padding: 18px; }
.pd-over .pd-entry { padding: 16px 18px; }
.pd-over .pd-entry-val b { font-size: 56px; }
.pd-over .pd-entry-val i { font-size: 38px; }
.pd-over .pd-big { min-height: 64px; font-size: 18px; padding: 0 20px; }
.pd-input-lg { height: 60px; font-size: 20px; font-weight: 600; }
.pd-switch-full { display: flex; width: 100%; }
.pd-switch-full button { flex: 1; min-width: 0; height: 44px; padding: 0 10px; font-size: 15px; }
.pd-over .pd-quick button { height: 44px; font-size: 16px; }
.pd-quick button.is-on { background: var(--pd-charcoal) !important; border-color: var(--pd-charcoal) !important; color: #fff !important; }
.pd-quick button:disabled { opacity: 0.35; }
.pd-adjsum { display: flex; flex-direction: column; gap: 6px; }
.pd-adjsum .pd-trow { font-size: 15px; }
.pd-trow.is-hi { color: var(--pd-accent); font-weight: 600; }
.pd-adjsum .pd-ttotal span:last-child { font-size: 26px; }
.pd-adjbtns { display: flex; gap: 12px; }
.pd-adjbtns .pd-big { flex: 1; min-width: 0; }
.pd-removebtn {
  width: 84px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 9px; background: var(--pd-surface) !important; border: 1px solid var(--pd-divider) !important;
  color: #d6302b !important; font-size: 13px; font-weight: 600;
}
.pd-removebtn .pd-ic { font-size: 20px; }

/* ---- The ticket, split: a card a check ---- */
.pd-checks { display: flex; flex-direction: column; gap: 10px; padding: 10px 0; }
.pd-check { padding: 8px 12px 6px; border-radius: 10px; background: var(--pd-bg); box-shadow: inset 0 0 0 1.5px transparent; }
.pd-check.is-sel { box-shadow: inset 0 0 0 2px var(--pd-charcoal); }
.pd-check.is-paid { opacity: 0.7; }
.pd-check .pd-line { padding: 8px 0; }
.pd-check-head { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.pd-check-head > b { font-size: 15px; }
.pd-check-name { font-size: 15px; font-weight: 700; padding: 4px 0; }
.pd-check-total { font-family: var(--pd-round); font-size: 16px; font-variant-numeric: tabular-nums; }
.pd-check-count { font-style: normal; font-size: 13px; font-weight: 600; color: var(--pd-text2); }
.pd-cprint { width: 30px; height: 30px; }
.pd-cprint .pd-ic { font-size: 14px; }
.pd-cbadge { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--pd-charcoal); color: #fff; white-space: nowrap; }
.pd-cbadge.is-paid { background: var(--pd-success); }
.pd-cbadge.is-part { background: var(--pd-orange); }
.pd-cdisc { padding: 2px 0 6px; color: var(--pd-accent); font-weight: 600; }
.pd-check-empty { width: 100%; padding: 8px 0 10px; text-align: left; font-size: 13.5px; color: var(--pd-text2) !important; }
.pd-check-row { padding-top: 4px; padding-bottom: 4px; }
.pd-loose { background: rgba(224, 134, 0, 0.08); }

/* While splitting: the items not on a check yet */
.pd-assign { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; }
.pd-assign-hint { font-size: 14px; font-weight: 600; color: var(--pd-text2); }
.pd-aline {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left;
  border-radius: 10px; background: var(--pd-bg) !important;
}
.pd-aline > .pd-ic { font-size: 20px; color: var(--pd-text2); }
.pd-aline .pd-lprice { min-width: 0; }
.pd-restbtn {
  min-height: 48px; padding: 0 16px; border-radius: 9px; font-size: 15px; font-weight: 600;
  background: var(--pd-surface) !important; border: 1.5px solid var(--pd-charcoal) !important;
}
.pd-ok-lg { font-size: 40px; opacity: 1 !important; }

/* The split editor's checks */
.pd-spctl { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--pd-text2); }
.pd-donebtn {
  height: 44px; padding: 0 22px; border-radius: 999px; font-size: 16px; font-weight: 600;
  background: var(--pd-charcoal) !important; color: #fff !important;
}
.pd-donebtn:disabled { opacity: 0.35; }
.pd-spgrid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-content: start; padding: 2px; }
.pd-spcard { display: flex; flex-direction: column; border-radius: 11px; background: var(--pd-surface); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05), inset 0 0 0 1.5px transparent; overflow: hidden; }
.pd-spcard.is-sel { box-shadow: inset 0 0 0 2px var(--pd-charcoal); }
.pd-spcard.is-paid { opacity: 0.6; }
.pd-spcard-head { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: baseline; padding: 12px 14px 8px; text-align: left; }
.pd-spcard-head b { font-size: 16px; }
.pd-spcard-head small { grid-column: 1; font-size: 13px; color: var(--pd-text2); }
.pd-spcard-head strong { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-family: var(--pd-round); font-size: 18px; font-variant-numeric: tabular-nums; }
.pd-spcard-head .pd-cbadge { justify-self: start; }
.pd-spitems { display: flex; flex-direction: column; padding: 0 8px 8px; }
.pd-spitem { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 6px; text-align: left; font-size: 14.5px; border-top: 1px solid var(--pd-divider) !important; }
.pd-spitem > span:not(.pd-lqty) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-spitem em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--pd-text2); }
.pd-spitem .pd-ic { font-size: 20px; color: var(--pd-text2); }
.pd-spitem .pd-lqty { font-size: 14px; }
.pd-spempty { padding: 14px 8px; text-align: left; font-size: 13.5px; color: var(--pd-text2) !important; }

/* AIO POS: the order note and loyalty member over the totals */
.pd-chips2 { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.pd-chip2 { display: flex; align-items: center; gap: 4px; min-height: 40px; padding-left: 12px; border-radius: 10px; background: var(--pd-bg); }
.pd-chip2-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 0; text-align: left; font-size: 14.5px; }
.pd-chip2-main > span, .pd-chip2-main > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-chip2-main > em { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 600; color: var(--pd-text2); white-space: nowrap; }
.pd-chip2-main .pd-ic { font-size: 17px; flex: none; color: var(--pd-text2); }
.pd-chip2-main .pd-star { color: var(--pd-success); }
.pd-chip2-x { width: 36px; height: 36px; flex: none; display: grid; place-items: center; color: var(--pd-text2) !important; }
.pd-chip2-x .pd-ic { font-size: 13px; stroke-width: 2.6; }
.pd-ready { display: inline-flex !important; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--pd-success); color: #fff !important; }
.pd-ready .pd-ic { font-size: 13px !important; color: #fff !important; }

/* ---- The sheets More opens ---- */
.pd-center-col { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.pd-q { font-size: 19px; font-weight: 700; }
.pd-bigstep { display: flex; align-items: center; gap: 28px; margin: 10px 0; }
.pd-bigstep > button {
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 999px;
  background: var(--pd-bg) !important; border: 1px solid var(--pd-divider) !important;
}
.pd-bigstep > button .pd-ic { font-size: 22px; stroke-width: 2.4; }
.pd-bigstep > button:disabled { opacity: 0.3; }
.pd-bigstep div { display: flex; flex-direction: column; align-items: center; min-width: 70px; }
.pd-bigstep b { font-family: var(--pd-round); font-size: 52px; line-height: 1; font-variant-numeric: tabular-nums; }
.pd-bigstep span { font-size: 14px; font-weight: 600; color: var(--pd-text2); }
.pd-evamt { font-family: var(--pd-round); font-size: 40px; color: var(--pd-success); font-variant-numeric: tabular-nums; }
.pd-warnnote { font-size: 14px; font-weight: 600; color: var(--pd-orange) !important; }
.pd-sheet-alert { width: 380px; gap: 12px; text-align: center; }
.pd-sheet-alert h3 { font-size: 19px; font-weight: 700; }
.pd-sheet-alert p { font-size: 14.5px; color: var(--pd-text2); }
.pd-sheet-alert .pd-input { margin-top: 0; text-align: left; }
.pd-alertbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.pd-alertbtns button { height: 50px; border-radius: 10px; font-size: 16px; font-weight: 600; background: var(--pd-bg) !important; }
.pd-alertbtns .is-danger { background: #d6302b !important; color: #fff !important; }
.pd-alertbtns .is-primary { background: var(--pd-charcoal) !important; color: #fff !important; }
.pd-sheet-pay { width: 640px; gap: 14px; }
.pd-pcintro { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pd-pcintro p, .pd-pcintro-p { font-size: 14.5px; color: var(--pd-text2); }
.pd-pcintro .pd-textbtn { flex: none; font-size: 15px; }
.pd-pcgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pd-pctile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 12px 14px; text-align: left;
  border-radius: 12px; background: var(--pd-bg) !important; box-shadow: inset 0 0 0 1.5px transparent;
}
.pd-pctile.is-on { box-shadow: inset 0 0 0 2px var(--pd-charcoal); background: var(--pd-surface) !important; }
.pd-pctile:disabled { opacity: 0.55; }
.pd-pctop { display: flex; align-items: center; gap: 8px; width: 100%; }
.pd-pctop b { font-size: 16px; }
.pd-pctop > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--pd-text2); }
.pd-pcmark { margin-left: auto; font-size: 20px; color: var(--pd-charcoal); }
.pd-pcring { margin-left: auto; width: 18px; height: 18px; flex: none; border-radius: 999px; border: 1.5px solid rgba(0, 0, 0, 0.25); }
.pd-pctile small { font-size: 13px; color: var(--pd-text2); }
.pd-pctile strong { font-family: var(--pd-round); font-size: 20px; font-variant-numeric: tabular-nums; }
.pd-why { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--pd-orange); }
.pd-tblgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pd-tbtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 62px;
  border-radius: 10px; background: var(--pd-bg) !important; border: 1px solid var(--pd-divider) !important;
}
.pd-tbtn b { font-size: 17px; }
.pd-tbtn small { font-size: 12px; color: var(--pd-text2); }
.pd-tbtn.is-on { background: var(--pd-charcoal) !important; border-color: var(--pd-charcoal) !important; color: #fff !important; opacity: 1; }
.pd-tbtn.is-on small { color: rgba(255, 255, 255, 0.7); }
.pd-tbtn.is-busy { opacity: 0.5; }
.pd-mresults { display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.pd-mlist { display: flex; flex-direction: column; border-radius: 12px; background: var(--pd-bg); overflow: hidden; }
.pd-mrow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-align: left; }
.pd-mrow + .pd-mrow { border-top: 1px solid var(--pd-divider) !important; }
.pd-avatar { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 999px; background: var(--pd-charcoal); color: #fff; font-size: 14px; font-weight: 700; }
.pd-mtext { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pd-mtext b { font-size: 16px; }
.pd-mtext small, .pd-mpts small { font-size: 13px; color: var(--pd-text2); }
.pd-mpts { display: flex; flex-direction: column; align-items: flex-end; }
.pd-mpts b { font-size: 15px; color: var(--pd-success); }
.pd-earned { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; color: var(--pd-success) !important; }
.pd-earned .pd-ic { font-size: 18px; }

/* On a phone */
.pd-compact .pd-over { gap: 14px; }
.pd-compact .pd-over .pd-cohead { flex-wrap: wrap; }
.pd-compact .pd-over .pd-keypad { width: auto; }
.pd-compact .pd-over .pd-cotitle { flex-basis: calc(100% - 60px); }
.pd-compact .pd-over .pd-cotitle h3 { font-size: 21px; }
.pd-compact .pd-donebtn { margin-left: auto; }
.pd-compact .pd-spgrid { overflow: visible; grid-template-columns: 1fr; }
.pd-compact .pd-sheet-pay, .pd-compact .pd-sheet-more { width: 100%; }
.pd-compact .pd-pcgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pd-compact .pd-tblgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pd-compact .pd-bigstep { gap: 18px; }

/* ---------------- Phone layout ---------------- */
@media (max-width: 760px) {
  .pd-stage .container { padding-inline: 12px; }
}
.pd-compact .pd-device { padding: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.pd-compact .pd-screen {
  width: auto; height: auto; display: block; overflow: visible; border-radius: 18px;
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-card);
}
.pd-compact .pd-side { display: none; }
.pd-compact .pd-order { display: flex; flex-direction: column; }
.pd-compact .pd-menu { display: contents; }
/* Menu first, then the ticket under it, with Save, Print and Pay kept in view. */
.pd-compact .pd-menu-body { order: 1; padding: 14px 14px 18px; }
.pd-compact .pd-ticket { order: 2; padding: 16px 14px 14px; border-right: 0; border-top: 1px solid var(--pd-divider); }
.pd-compact .pd-thead { padding-bottom: 12px; }
.pd-compact .pd-empty { padding: 18px 12px; }
.pd-compact .pd-lines { overflow: visible; }
.pd-compact .pd-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -14px; padding-inline: 14px; }
.pd-compact .pd-chips::-webkit-scrollbar { display: none; }
.pd-compact .pd-chip { height: 44px; padding: 0 16px; font-size: 15px; }
.pd-compact .pd-sub { height: 36px; padding: 0 14px; font-size: 14px; }
.pd-compact .pd-grid { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pd-compact .pd-photo { height: 80px; }
.pd-compact .pd-tile.is-on .pd-photo { height: 78px; }
.pd-compact .pd-art .pd-ic { font-size: 38px; }
.pd-compact .pd-tname {
  font-size: 13.5px; line-height: 1.2; padding: 5px 9px 0; min-height: calc(2.4em + 5px); white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.pd-compact .pd-tprice { font-size: 14px; padding: 2px 9px 8px; min-height: 30px; }
.pd-compact .pd-tprice.has-plus { padding-right: 36px; }
.pd-compact .pd-plus { width: 34px; height: 34px; }
.pd-compact .pd-plus .pd-ic { width: 24px; height: 24px; padding: 5.5px; }
.pd-compact .pd-badge { top: 5px; right: 5px; min-width: 24px; height: 24px; font-size: 13px; padding: 0 7px; }
.pd-compact .pd-actions {
  order: 3; position: sticky; bottom: 0; z-index: 3; margin: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  grid-template-columns: 1fr 1fr 1.7fr; background: var(--pd-bg); border-top: 1px solid var(--pd-divider);
  border-radius: 0 0 18px 18px;
}
.pd-compact .pd-act { height: 52px; font-size: 15px; }
.pd-compact .pd-act-total { display: inline; font-variant-numeric: tabular-nums; }
.pd-compact .pd-act-pay { justify-content: space-between; padding: 0 14px; }

.pd-compact .pd-page { padding: 14px; gap: 14px; }
.pd-compact .pd-cohead { flex-wrap: wrap; gap: 10px; }
.pd-compact .pd-coicon { display: none; }
.pd-compact .pd-cotitle h3 { font-size: 21px; }
.pd-compact .pd-cotitle p { font-size: 13px; }
.pd-compact .pd-switch { width: 100%; }
.pd-compact .pd-switch button { flex: 1; height: 42px; padding: 0 12px; font-size: 15px; }
.pd-compact .pd-cobody { flex-direction: column; gap: 14px; }
.pd-compact .pd-panel { padding: 16px; gap: 14px; overflow: visible; }
.pd-compact .pd-tiles { flex-direction: column; gap: 10px; }
.pd-compact .pd-amt b { font-size: 30px; }
.pd-compact .pd-entry { padding: 14px; }
.pd-compact .pd-entry-val i { font-size: 30px; }
.pd-compact .pd-entry-val b { font-size: 44px; }
.pd-compact .pd-quick { flex-wrap: wrap; }
.pd-compact .pd-quick button { flex: 1 1 28%; height: 44px; font-size: 15px; }
.pd-compact .pd-big { min-height: 58px; font-size: 17px; padding: 0 18px; }
.pd-compact .pd-keypad, .pd-compact .pd-reader { width: auto; padding: 16px; }
.pd-compact .pd-keys { grid-auto-rows: 52px; gap: 8px; }
.pd-compact .pd-key { min-height: 52px; font-size: 26px; }
.pd-compact .pd-key-clear { height: 48px; }
.pd-compact .pd-reader-pad { padding: 18px; }
.pd-compact .pd-done, .pd-compact .pd-tips { padding: 20px 16px; overflow: visible; }
.pd-compact .pd-done h3 { font-size: 24px; }
.pd-compact .pd-bigbox strong { font-size: 52px; }
.pd-compact .pd-receipt-choices { flex-direction: column; width: 100%; }
.pd-compact .pd-receipt-choices .pd-big, .pd-compact .pd-outline { width: 100%; min-height: 54px; font-size: 17px; }
.pd-compact .pd-tips h3 { font-size: 26px; }
.pd-compact .pd-tipgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pd-compact .pd-tiptile { padding: 14px 8px; }
.pd-compact .pd-tiptile b { font-size: 24px; }
.pd-compact .pd-tiptile span { font-size: 15px; }
.pd-compact .pd-tiphint { font-size: 14px; }
.pd-compact .pd-toast, .pd-compact .pd-toast.is-info { position: fixed; left: 50%; bottom: 84px; max-width: calc(100vw - 32px); }
.pd-compact .pd-modal { position: fixed; z-index: 1000; padding: 16px; }
.pd-compact .pd-paper { max-height: 50vh; }

@media (prefers-reduced-motion: reduce) {
  .pd *, .pd *::before, .pd *::after { animation: none !important; transition: none !important; }
}

/* AIO POS on a phone: the header and categories on top, then the menu, the ticket and the buttons. */
.pd-compact[data-app="aio"] .pd-topbar { order: 0; flex-wrap: wrap; gap: 10px; min-height: 0; padding: 12px 14px; }
.pd-compact[data-app="aio"] .pd-tb-ticket { width: 100%; font-size: 16px; }
.pd-compact[data-app="aio"] .pd-tb-ticket .pd-num { font-size: 19px; }
.pd-compact[data-app="aio"] .pd-more-dark { height: 36px; padding: 0 16px; font-size: 15px; }
.pd-compact[data-app="aio"] .pd-fulfill { width: 100%; flex-wrap: wrap; }
.pd-compact[data-app="aio"] .pd-fbtn { flex: 1; min-width: 0; height: 40px; }
.pd-compact[data-app="aio"] .pd-customer { flex: 1 1 calc(100% - 40px); max-width: none; }
.pd-compact[data-app="aio"] .pd-cats {
  order: 1; flex-direction: row; gap: 8px; overflow-x: auto; overflow-y: visible; padding: 12px 14px 0; border-right: 0;
}
.pd-compact[data-app="aio"] .pd-cat { margin: 0; min-height: 40px; padding: 0 14px; border-radius: 999px; white-space: nowrap; font-size: 15px; background: var(--pd-surface) !important; border: 1px solid var(--pd-divider) !important; }
.pd-compact[data-app="aio"] .pd-cat.is-on { background: var(--pd-charcoal) !important; border-color: var(--pd-charcoal) !important; }
.pd-compact[data-app="aio"] .pd-cat + .pd-cat::before { content: none; }
.pd-compact[data-app="aio"] .pd-menu-body { order: 2; }
.pd-compact[data-app="aio"] .pd-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.pd-compact[data-app="aio"] .pd-ticket { order: 3; padding-top: 6px; }
.pd-compact[data-app="aio"] .pd-actions { order: 4; }
.pd-compact .pd-sheet-wide { width: 100%; height: 100%; }
.pd-compact .pd-sheet-body { padding: 14px 14px 18px; }
.pd-compact .pd-sheet-foot { padding: 10px 14px 14px; }
.pd-compact .pd-sheet-item b { font-size: 18px; }
.pd-compact .pd-opts { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.pd-compact .pd-opt-main { min-height: 64px; gap: 8px; padding-right: 8px; }
.pd-compact .pd-opt-main img { width: 54px; height: 54px; }
.pd-compact .pd-opt-text b { font-size: 14px; }
.pd-compact .pd-opt-main em { font-size: 13px; }
.pd-compact .pd-opt-minus { width: 34px; }
