:root {
  --ink: #061922;
  --muted: #5c7072;
  --line: #cfdbd8;
  --panel: #ffffff;
  --soft: #f4f8f7;
  --brand: #0f7668;
  --brand-strong: #0b665a;
  --gold: #f4c430;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --warning: #946200;
  --warn-bg: #fff7e6;
  --warn-line: #f2bc61;
  --shadow: 0 18px 50px rgba(11, 47, 43, 0.11);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f7fbfa 0%, #eef5f3 100%);
  color: var(--ink);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 18px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
select {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 16px;
  color: var(--ink);
}

input:focus,
select:focus {
  outline: 3px solid rgba(15, 118, 104, 0.18);
  border-color: var(--brand);
}

label {
  display: grid;
  gap: 8px;
  color: #476061;
}

.field-hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.btn {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 20px;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.08s ease, box-shadow 0.12s ease;
}

.btn:active,
.payment-btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 3px solid rgba(15, 118, 104, 0.2);
  outline-offset: 2px;
}

.btn.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.btn.primary:hover {
  background: var(--brand-strong);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn.ghost {
  background: #f9fcfb;
}

.btn.small {
  min-height: 42px;
  padding: 0 14px;
}

.btn.full {
  width: 100%;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(620px, 100%);
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-row strong {
  display: block;
  font-size: 28px;
  line-height: 1.05;
}

.brand-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.login-update-notice {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--warn-line);
  border-radius: 8px;
  background: var(--warn-bg);
  color: #6f4a00;
}

.login-update-notice[hidden] {
  display: none;
}

.login-update-notice strong {
  font-size: 18px;
}

.login-update-notice span {
  line-height: 1.35;
}

.mark {
  width: 64px;
  height: 64px;
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(11, 47, 43, 0.14);
}

.lang-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.lang-row.compact {
  width: 180px;
}

.lang-btn {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #476061;
}

.lang-btn.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(9, 31, 30, 0.08);
}

.password-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  color: var(--muted);
  font-size: 16px;
}

.remember-row input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--brand);
  padding: 0;
}

.store-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.store-code-row:has([hidden]) {
  grid-template-columns: 1fr;
}

input.locked {
  border-color: #b7c7df;
  background: #edf4ff;
  color: #12304d;
}

.error {
  margin: 0;
  color: var(--danger);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 25, 34, 0.46);
}

.modal-card {
  width: min(460px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.classic-payment-modal-card {
  width: min(1080px, 100%);
  gap: 16px;
}

.classic-payment-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 180px) minmax(180px, 240px);
  gap: 14px;
  align-items: stretch;
}

.classic-payment-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.classic-payment-back {
  min-height: 70px;
  font-size: 22px;
  font-weight: 900;
  align-self: stretch;
}

.classic-payment-due,
.classic-payment-change {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 8px;
}

.classic-payment-due {
  background: #063f35;
  color: #fff;
  box-shadow: 0 14px 28px rgba(6, 63, 53, 0.18);
}

.classic-payment-due span,
.classic-payment-change span {
  font-size: 15px;
  color: inherit;
  opacity: 0.78;
}

.classic-payment-due strong {
  font-size: 34px;
  line-height: 1;
}

.classic-payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.classic-payment-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 14px;
  align-items: stretch;
}

.classic-payment-entry-panel {
  display: grid;
  gap: 12px;
}

.classic-payment-split,
.classic-payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.classic-payment-paid {
  padding: 12px;
  border: 1px solid #cfe0dc;
  border-radius: 8px;
  background: #f8fbfa;
}

.classic-payment-paid.active {
  border-color: #0d7f6f;
  background: #eaf7f4;
  box-shadow: 0 0 0 3px rgba(13, 127, 111, 0.12);
}

.classic-payment-methods .payment-btn,
.classic-payment-paid input,
.classic-payment-note input {
  min-height: 60px;
  font-size: 22px;
}

.classic-payment-paid,
.classic-payment-print,
.classic-payment-note {
  display: grid;
  gap: 8px;
}

.classic-payment-print select {
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
}

.classic-payment-paid input {
  font-weight: 800;
  text-align: right;
}

.classic-payment-quick {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.classic-payment-quick .btn {
  min-height: 54px;
  font-size: 19px;
  font-weight: 800;
}

.classic-payment-keypad {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cfe0dc;
  border-radius: 8px;
  background: #f4faf8;
}

.classic-payment-keypad-head {
  display: grid;
  gap: 3px;
}

.classic-payment-keypad-head strong {
  font-size: 19px;
}

.classic-payment-keypad-head small {
  color: var(--muted);
  line-height: 1.35;
}

.classic-payment-pad-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.classic-payment-pad-grid button {
  min-height: 58px;
  border: 1px solid #c8d8d5;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 23px;
  font-weight: 900;
  cursor: pointer;
}

.classic-payment-pad-grid button:hover:not(:disabled),
.classic-payment-pad-grid button:focus-visible {
  border-color: #0d7f6f;
  box-shadow: 0 0 0 3px rgba(13, 127, 111, 0.12);
}

.classic-payment-pad-grid button[data-classic-payment-pad="clear"],
.classic-payment-pad-grid button[data-classic-payment-pad="back"] {
  font-size: 18px;
}

.classic-payment-pad-grid button[data-classic-payment-pad="exact"] {
  color: #075448;
  background: #eaf7f4;
}

.classic-payment-pad-grid button[data-classic-payment-pad="submit"] {
  grid-column: span 1;
  color: #fff;
  background: #0d7f6f;
  border-color: #0d7f6f;
  font-size: 18px;
}

.classic-payment-change {
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid #b7d8d0;
  background: #eef8f5;
  color: #063f35;
}

.classic-payment-change.payment-warning {
  border-color: #e9bf73;
  background: #fff7e6;
  color: #7a4b00;
}

.classic-payment-change strong {
  font-size: 30px;
  line-height: 1;
}

.classic-payment-status {
  margin: 0;
  padding: 13px 16px;
  border: 1px solid #b7d8d0;
  border-radius: 8px;
  background: #eef8f5;
  color: #063f35;
  font-size: 18px;
  font-weight: 800;
}

.classic-payment-status.payment-warning {
  border-color: #e9bf73;
  background: #fff7e6;
  color: #7a4b00;
}

.classic-payment-status.payment-error {
  border-color: #efb0a8;
  background: #fff1ef;
  color: #b21d13;
}

.classic-payment-status.payment-ready {
  border-color: #8ecfc1;
  background: #e8f7f2;
  color: #064c40;
}

.classic-payment-modal-card .modal-actions .btn {
  min-height: 58px;
  font-size: 22px;
  font-weight: 800;
}

@media (max-width: 680px) {
  .classic-payment-header,
  .classic-payment-workspace,
  .classic-payment-modal-card .modal-actions {
    grid-template-columns: 1fr;
  }

  .classic-payment-methods,
  .classic-payment-quick,
  .classic-payment-split,
  .classic-payment-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cashier-shell {
  min-height: 100vh;
  padding: 24px;
}

.cashier-header,
.register-strip,
.update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1600px;
  margin: 0 auto 18px;
}

.header-actions,
.sync-state {
  display: flex;
  align-items: center;
  gap: 12px;
}

.version-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fcfb;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.print-channel-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef4fa;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.print-channel-chip[data-print-channel="local"] {
  border-color: #9fc4df;
  background: #e8f1fb;
  color: #153e75;
}

.print-channel-chip[data-print-channel="browser"] {
  border-color: #e1b14a;
  background: #fff7df;
  color: #7a4d00;
}

.print-channel-chip[data-print-channel="preview"] {
  border-color: #b9cbe0;
  background: #f8fbff;
  color: #153e75;
}

.print-channel-chip[data-print-channel="manual"] {
  border-color: #d4d9df;
  background: #f4f6f8;
  color: #6b7280;
}

.status-bar {
  max-width: 1600px;
  margin: 0 auto 18px;
  padding: 14px 16px;
  border: 1px solid #a5d6c9;
  border-radius: 8px;
  background: #e9f8f3;
  color: #065f46;
}

.status-bar.error {
  border-color: #f2b8b5;
  background: #fff1f0;
  color: var(--danger);
}

.update-banner {
  align-items: center;
  justify-content: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--warn-line);
  border-radius: 8px;
  background: var(--warn-bg);
}

.version-update-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  color: #6f4a00;
}

.version-update-banner strong {
  margin-right: 4px;
}

.version-update-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.update-preflight-text {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcfb;
}

.update-preflight-text.ok {
  border-color: #a5d6c9;
  background: #e9f8f3;
  color: #065f46;
}

.update-preflight-text.warn {
  border-color: var(--warn-line);
  background: var(--warn-bg);
  color: #6f4a00;
}

.update-preflight-text.error {
  border-color: #f2b8b5;
  background: #fff1f0;
  color: var(--danger);
}

.register-strip {
  display: grid;
  grid-template-columns: auto minmax(220px, 360px) auto minmax(240px, 1fr);
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.store-code-display {
  min-height: 56px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid #b7d8ce;
  border-radius: 999px;
  padding: 8px 18px;
  background: #e9f8f3;
  color: #075e54;
  white-space: nowrap;
}

.store-code-display span,
.store-code-display strong {
  display: block;
  line-height: 1.05;
}

.store-code-display span {
  color: #47706b;
  font-size: 12px;
}

.store-code-display strong {
  font-size: 20px;
  font-weight: 800;
}

.register-strip label:has(#storeCodeDisplayInput) {
  display: none;
}

.sync-state {
  justify-content: flex-end;
  color: var(--muted);
  font-size: 16px;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #b7d8ce;
  border-radius: 999px;
  background: #e9f8f3;
  color: #075e54;
  font-weight: 700;
}

.sync-pill.sync-checking,
.sync-pill.sync-updating,
.sync-pill.sync-stale {
  border-color: #f2bc61;
  background: #fff7e6;
  color: #7a4b00;
}

.sync-pill.sync-offline {
  border-color: #f2b8b5;
  background: #fff1f0;
  color: var(--danger);
}

.cashier-grid {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 430px);
  gap: 20px;
  align-items: start;
}

.sale-panel,
.checkout-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.sale-panel {
  padding: 20px;
}

.checkout-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 20px;
  position: sticky;
  top: 16px;
}

.checkout-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkout-panel h2 {
  margin: 0;
  font-size: 28px;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef4f2;
  color: #405a59;
  font-weight: 700;
  font-size: 16px;
}

.member-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfa;
}

.member-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 8px;
}

.member-search-row input,
.member-search-row .btn {
  min-height: 50px;
}

.member-info {
  min-height: 44px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px dashed #b7c9c6;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.member-info strong {
  color: var(--ink);
}

.member-info .member-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
}

.member-info .member-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf8f5;
  color: #075e54;
}

.member-info .quiet {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.member-pick {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
}

.summary-box {
  display: grid;
  gap: 10px;
}

.summary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.today-summary,
.recent-orders {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #bdd8d0;
  border-radius: 8px;
  background: #f7fcfa;
}

.today-summary h3,
.recent-orders h3 {
  margin: 0;
  font-size: 18px;
}

.recent-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.recent-order strong,
.recent-order span {
  display: block;
}

.recent-order span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.recent-order-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.recent-order-actions .btn {
  min-height: 40px;
  padding: 0 12px;
}

.summary-grid,
.refund-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.summary-item,
.refund-item {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-item span,
.refund-item span {
  color: var(--muted);
  font-size: 14px;
}

.summary-item strong,
.refund-item strong {
  font-size: 22px;
}

.summary-methods {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 15px;
}

.summary-methods div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.discount-row {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 10px;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 56px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.segment {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #476061;
  font-weight: 800;
}

.segment.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(9, 31, 30, 0.08);
}

.payment-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.payment-btn {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.08s ease, box-shadow 0.12s ease;
}

.payment-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 104, 0.18);
}

.native-payment-select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.scan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  margin-bottom: 16px;
}

#productSearch {
  min-height: 76px;
  font-size: 24px;
  font-weight: 700;
}

#searchBtn {
  min-height: 76px;
  font-size: 22px;
  font-weight: 700;
}

.search-results {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  max-height: 320px;
  overflow: auto;
}

.result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 96px;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.result-item strong:first-child {
  font-size: 19px;
  line-height: 1.25;
}

.result-item:hover {
  border-color: #9bc8be;
  background: #f1faf7;
}

.result-item > strong {
  text-align: right;
}

.result-item strong,
.cart-name strong {
  display: block;
}

.result-item span,
.cart-name span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.cart-table {
  max-height: calc(100vh - 300px);
  overflow-x: hidden;
  overflow-y: auto;
}

.cart-table table {
  min-width: 0;
  table-layout: fixed;
}

.cart-table th,
.cart-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.cashier-cart-table th:nth-child(1),
.cashier-cart-table td:nth-child(1) {
  width: 37%;
}

.cashier-cart-table th:nth-child(2),
.cashier-cart-table td:nth-child(2) {
  width: 23%;
}

.cashier-cart-table th:nth-child(3),
.cashier-cart-table td:nth-child(3) {
  width: 16%;
  white-space: nowrap;
  overflow-wrap: normal;
}

.cashier-cart-table th:nth-child(4),
.cashier-cart-table td:nth-child(4) {
  width: 17%;
  white-space: nowrap;
  overflow-wrap: normal;
}

.cashier-cart-table th:nth-child(5),
.cashier-cart-table td:nth-child(5) {
  width: 7%;
  text-align: center;
}

.stock-warning {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #f2b8b5;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 700;
}

.cart-row-negative {
  background: #fffafa;
}

.cart-row-recent td {
  background: #fff8db;
}

.cart-row-recent .cart-line-number {
  background: var(--gold);
  color: #00191c;
}

.stock-negative {
  color: var(--danger);
  font-weight: 700;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef4f2;
  color: #526867;
}

tr:last-child td {
  border-bottom: 0;
}

.cart-table table {
  min-width: 0;
  table-layout: fixed;
}

.cart-qty {
  display: grid;
  grid-template-columns: 38px minmax(58px, 1fr) 38px;
  gap: 6px;
  align-items: center;
  max-width: 178px;
}

.cart-qty input {
  min-height: 44px;
  padding: 0 8px;
  text-align: center;
}

.cart-qty button,
.remove-btn {
  min-height: 44px;
  padding: 0 10px;
}

.remove-btn {
  min-width: 46px;
  border-color: #f2b8b5;
  background: #fff7f6;
  color: var(--danger);
  font-size: 22px;
  font-weight: 900;
}

.total-line,
.change-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 18px;
}

.total-line strong,
.change-line strong {
  color: var(--ink);
}

.due-box {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 10px;
  background: #edf8f5;
}

.due-box span {
  color: var(--muted);
}

.due-box strong {
  font-size: 46px;
  line-height: 1.05;
}

.points-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #bdd8d0;
  border-radius: 8px;
  background: #f4fbf8;
}

.points-box input {
  min-height: 48px;
}

.points-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.points-meta strong {
  color: var(--ink);
}

.points-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.quick-cash {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.quick-cash .btn {
  min-height: 48px;
  padding: 0 8px;
  font-weight: 700;
  min-width: 0;
  white-space: nowrap;
}

.checkout-actions {
  display: grid;
  gap: 10px;
}

.checkout-actions {
  margin: 0 -4px -4px;
  padding: 10px 4px 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), #fff 28%);
}

.last-sale-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #b7d8ce;
  border-radius: 8px;
  background: #f2fbf8;
}

.last-sale-label,
.last-sale-box strong,
.last-sale-box span {
  display: block;
}

.last-sale-label {
  color: #47706b;
  font-size: 13px;
  font-weight: 700;
}

.last-sale-box strong {
  margin-top: 2px;
  color: #083f3a;
  overflow-wrap: anywhere;
}

.last-sale-box #lastSaleMeta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.hold-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf8f5;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
}

.held-orders-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.held-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.held-order strong,
.held-order span {
  display: block;
}

.held-order span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.held-order-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.held-order-actions .btn {
  min-height: 40px;
  padding: 0 12px;
}

.refund-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #bdd8d0;
  border-radius: 8px;
  background: #f8fbfa;
}

.refund-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 8px;
}

.refund-order-box {
  display: grid;
  gap: 10px;
}

.refund-order-card {
  display: grid;
  gap: 10px;
}

.refund-lines {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.refund-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.refund-line strong,
.refund-line span {
  display: block;
}

.refund-line span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.refund-line input {
  min-height: 44px;
  padding: 0 8px;
  text-align: center;
}

.refund-controls {
  display: grid;
  gap: 10px;
}

.refund-approval {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #f5c26b;
  border-radius: 8px;
  background: #fff7e6;
}

.refund-approval strong {
  font-size: 16px;
}

.refund-controls-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkout {
  min-height: 68px;
  font-size: 22px;
  font-weight: 700;
}

.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

/* v1.0.179 cashier notices: keep empty-cart prompts inside the order blank area. */
.empty.order-inline-notice {
  width: min(520px, calc(100% - 40px));
  margin: 18px auto;
  padding: 18px 20px;
  border: 2px solid #d59b23;
  border-radius: 10px;
  background: #fff8df;
  color: #6f4a00;
  box-shadow: 0 14px 32px rgba(21, 62, 117, 0.12);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.empty.order-inline-notice.error {
  border-color: #f2b8b5;
  background: #fff1f0;
  color: #b42318;
}

.product-notice-bar {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid #b9cbe0;
  border-radius: 8px;
  background: #e8f1fb;
  color: #153e75;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.product-notice-bar[hidden] {
  display: none !important;
}

.product-notice-bar.error {
  border-color: #f2b8b5;
  background: #fff1f0;
  color: #b42318;
}

@media (min-width: 1051px) {
  .order-panel .empty.order-inline-notice {
    margin-top: 32px;
    font-size: 28px;
  }
}

@media (min-width: 1051px) {
  body:has(#appScreen:not([hidden])) {
    overflow: hidden;
  }
}

.cashier-shell {
  padding: 16px 20px 24px;
}

.cashier-header {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.cashier-header .mark {
  width: 58px;
  height: 58px;
  border-radius: 9px;
}

.cashier-header .brand-row strong {
  font-size: 26px;
}

.cashier-header .brand-row span {
  margin-top: 2px;
  font-size: 17px;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-actions .btn {
  min-height: 48px;
  padding: 0 16px;
}

.header-actions .lang-row.compact {
  width: 162px;
}

.register-strip {
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
}

.register-strip input,
.register-strip select,
.register-strip .btn {
  min-height: 50px;
}

.cashier-grid {
  grid-template-columns: minmax(650px, 1fr) minmax(420px, 470px);
  gap: 16px;
}

.sale-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.scan-row {
  position: sticky;
  top: 10px;
  z-index: 4;
  margin: -4px -4px 0;
  padding: 10px;
  border: 1px solid #d6e1df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(9, 31, 30, 0.1);
}

#productSearch,
#searchBtn {
  min-height: 72px;
}

#productSearch {
  border-width: 2px;
  font-size: 25px;
}

#searchBtn {
  font-size: 23px;
}

.search-results {
  max-height: min(36vh, 360px);
  margin-bottom: 0;
}

.result-item {
  grid-template-columns: minmax(0, 1fr) 132px 112px;
  min-height: 76px;
  padding: 12px;
}

.result-price {
  color: #083f3a;
  font-size: 22px;
  white-space: nowrap;
}

.result-item .btn {
  min-height: 52px;
  font-weight: 800;
}

.cart-table {
  max-height: calc(100vh - 238px);
  border-radius: 8px;
}

th,
td {
  padding: 12px;
}

.cart-name strong {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.2;
}

.cart-line-number {
  min-width: 30px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #eef4f2;
  color: #476061;
  font-size: 15px;
  font-weight: 800;
}

.cashier-cart-table td:nth-child(3),
.cashier-cart-table td:nth-child(4) {
  text-align: right;
  font-weight: 700;
}

.cart-qty {
  grid-template-columns: 48px minmax(64px, 1fr) 48px;
  max-width: 196px;
}

.cart-qty input {
  min-height: 50px;
  font-size: 20px;
  font-weight: 800;
}

.cart-qty button,
.remove-btn {
  min-height: 50px;
  font-weight: 800;
}

.checkout-panel {
  gap: 12px;
  padding: 16px;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
}

.checkout-heading {
  order: 0;
}

.due-box {
  order: 1;
  padding: 16px;
  border: 1px solid #0b665a;
  background: #082f2c;
  color: #fff;
  box-shadow: 0 10px 28px rgba(8, 47, 44, 0.18);
}

.due-box span {
  color: #bdebe3;
}

.due-box strong {
  color: #fff;
  font-size: 54px;
  word-break: break-word;
}

.payment-buttons {
  order: 2;
  padding: 8px;
  border: 1px solid #d6e1df;
  border-radius: 10px;
  background: #f8fbfa;
}

.payment-btn {
  min-height: 66px;
  font-size: 20px;
}

.paid-control {
  order: 3;
}

.paid-control > span,
.note-control > span,
#discountControl > span {
  font-size: 15px;
  font-weight: 700;
}

.paid-control input {
  min-height: 68px;
  font-size: 28px;
  font-weight: 800;
}

.quick-cash {
  order: 4;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-cash .btn {
  min-height: 54px;
  font-size: 15px;
}

.change-line {
  order: 5;
  min-height: 44px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #d6e1df;
  border-radius: 8px;
  background: #f8fbfa;
}

.change-line strong {
  font-size: 26px;
  color: #075e54;
}

.checkout-actions {
  order: 6;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.last-sale-box {
  order: 7;
}

.checkout {
  min-height: 78px;
  font-size: 26px;
  box-shadow: 0 12px 24px rgba(15, 118, 104, 0.18);
}

.checkout-actions .btn:not(.checkout) {
  min-height: 48px;
}

.checkout-panel.checkout-empty .total-line,
.checkout-panel.checkout-empty #discountControl,
.checkout-panel.checkout-empty .points-box,
.checkout-panel.checkout-empty .payment-buttons,
.checkout-panel.checkout-empty .paid-control,
.checkout-panel.checkout-empty .quick-cash,
.checkout-panel.checkout-empty .change-line,
.checkout-panel.checkout-empty .note-control,
.checkout-panel.checkout-empty .checkout {
  display: none;
}

.checkout-panel.checkout-empty .due-box {
  min-height: 96px;
}

.checkout-panel.checkout-empty .checkout-actions {
  border-top: 0;
  padding-top: 0;
}

.total-line {
  order: 8;
}

#discountControl {
  order: 9;
}

.points-box {
  order: 10;
}

.member-box {
  order: 11;
}

.summary-box {
  order: 12;
}

.summary-actions .btn {
  min-height: 42px;
  padding: 0 10px;
  font-size: 15px;
  background: #fbfdfc;
}

.note-control {
  order: 13;
}

@media (min-width: 1051px) {
  .cashier-shell {
    height: 100vh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    gap: 10px;
    padding: 12px 14px;
  }

  .cashier-header,
  .register-strip,
  .status-bar,
  .update-banner,
  .cashier-grid {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .cashier-grid {
    min-height: 0;
    grid-template-columns: minmax(620px, 1fr) minmax(390px, 440px);
    align-items: stretch;
  }

  .sale-panel,
  .checkout-panel {
    min-height: 0;
  }

  .sale-panel {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .scan-row {
    top: 0;
  }

  .search-results {
    max-height: min(28vh, 280px);
  }

  .cart-table {
    min-height: 0;
    max-height: none;
  }

  .checkout-panel {
    position: static;
    max-height: none;
    overflow: auto;
    scrollbar-gutter: stable;
  }

  .checkout-actions {
    position: static;
    bottom: auto;
    z-index: auto;
    border-top: 1px solid var(--line);
    box-shadow: none;
  }

  .checkout-panel::-webkit-scrollbar,
  .cart-table::-webkit-scrollbar,
  .search-results::-webkit-scrollbar {
    width: 10px;
  }

  .checkout-panel::-webkit-scrollbar-thumb,
  .cart-table::-webkit-scrollbar-thumb,
  .search-results::-webkit-scrollbar-thumb {
    border: 2px solid #f8fbfa;
    border-radius: 999px;
    background: #b7cac6;
  }
}

@media (max-width: 1050px) {
  .cashier-grid {
    grid-template-columns: 1fr;
  }

  .sale-panel {
    order: 0;
  }

  .checkout-panel {
    order: 1;
    position: static;
    max-height: none;
  }

  .register-strip {
    grid-template-columns: 1fr;
  }

  .store-code-display {
    width: 100%;
    border-radius: 10px;
  }

  .sync-state {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .cashier-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .cashier-shell {
    padding: 14px;
  }

  .brand-row strong {
    font-size: 24px;
  }

  .mark {
    width: 56px;
    height: 56px;
  }

  .scan-row,
  .password-row,
  .store-code-row,
  .modal-actions {
    grid-template-columns: 1fr;
  }

  #productSearch,
  #searchBtn {
    min-height: 64px;
    font-size: 20px;
  }

  .result-item {
    grid-template-columns: 1fr;
  }

  .result-item > strong {
    text-align: left;
  }

  .quick-cash {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-actions {
    grid-template-columns: 1fr;
  }

  .recent-order {
    grid-template-columns: 1fr;
  }

  .recent-order-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .discount-row,
  .refund-controls-row,
  .payment-buttons {
    grid-template-columns: 1fr;
  }

  .points-meta {
    grid-template-columns: 1fr;
  }

  .member-search-row {
    grid-template-columns: 1fr;
  }

  .last-sale-box {
    grid-template-columns: 1fr;
  }

  .cart-table {
    max-height: none;
    overflow: visible;
    border: 0;
  }

  .cashier-cart-table,
  .cashier-cart-table thead,
  .cashier-cart-table tbody,
  .cashier-cart-table tr,
  .cashier-cart-table td {
    display: block;
  }

  .cashier-cart-table thead {
    display: none;
  }

  .cashier-cart-table tr {
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
  }

  .cashier-cart-table td {
    width: 100% !important;
    border-bottom: 0;
    padding: 6px 0;
    text-align: left !important;
  }

  .cart-qty {
    max-width: none;
  }

  .lang-row.compact {
    width: 100%;
  }
}

.touch-register-layout {
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 0.9fr) minmax(300px, 0.65fr);
  grid-template-areas: "order products checkout";
  gap: 14px;
  align-items: stretch;
}

.touch-register-layout .order-panel {
  grid-area: order;
}

.touch-register-layout .product-panel {
  grid-area: products;
}

.touch-register-layout .checkout-panel {
  grid-area: checkout;
}

.order-panel,
.product-panel,
.checkout-panel {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.order-panel,
.product-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
}

.panel-caption {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.order-heading,
.product-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.order-heading h2,
.product-panel-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
}

.order-panel .cart-table {
  min-height: 0;
  max-height: none;
}

.order-panel .cashier-cart-table {
  min-width: 0;
}

.order-total-stack {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.order-total-stack .total-line strong {
  font-size: 20px;
}

.order-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.order-actions .btn {
  min-width: 0;
  min-height: 50px;
  padding: 0 10px;
}

.btn.warn {
  border-color: #f2bc61;
  background: #fff7e6;
  color: #7a4b00;
}

.product-panel {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.product-panel .scan-row {
  position: static;
  top: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.product-panel #productSearch,
.product-panel #searchBtn {
  min-height: 72px;
}

.product-filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.product-filter-row:empty {
  display: none;
}

.product-filter-btn {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-filter-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.product-card-grid {
  min-height: 0;
  max-height: none;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  align-content: start;
  overflow: auto;
}

.product-card-grid .result-item {
  min-height: 150px;
  grid-template-columns: 1fr;
  align-content: space-between;
  gap: 8px;
  padding: 12px;
}

.product-card-grid .result-item > div {
  min-width: 0;
}

.product-card-grid .result-item strong:first-child {
  font-size: 18px;
  line-height: 1.18;
}

.product-card-grid .result-item > .result-price {
  text-align: left;
  font-size: 27px;
  color: #06443d;
}

.product-card-grid .result-item .btn {
  min-height: 48px;
}

.product-panel .cart-table,
#productPanelStockWarning {
  display: none !important;
}

.checkout-panel {
  position: static;
  max-height: none;
  overflow: auto;
}

.checkout-panel > .total-line,
.checkout-panel .hold-actions,
#checkoutHeldOrdersListMirror,
#checkoutRefundMirror,
#checkoutRefundPanelMirror,
#checkoutClearCartMirror,
.checkout-legacy-discount,
.checkout-points-mirror {
  display: none !important;
}

.checkout-panel.checkout-empty .payment-buttons,
.checkout-panel.checkout-empty .paid-control,
.checkout-panel.checkout-empty .change-line,
.checkout-panel.checkout-empty .note-control,
.checkout-panel.checkout-empty .checkout,
.checkout-panel.checkout-empty .due-box,
.checkout-panel.checkout-empty .checkout-actions {
  display: grid;
}

.checkout-panel.checkout-empty .checkout {
  display: block;
}

.checkout-panel.checkout-empty .due-box {
  min-height: auto;
}

.checkout-panel .due-box {
  padding: 18px;
  background: #073f39;
}

.checkout-panel .due-box strong {
  font-size: 52px;
}

.checkout-panel .checkout-actions {
  padding-top: 8px;
}

.checkout-panel .checkout {
  min-height: 76px;
  font-size: 28px;
}

@media (max-width: 1280px) {
  .touch-register-layout {
    grid-template-columns: minmax(330px, 0.95fr) minmax(330px, 0.9fr) minmax(290px, 0.65fr);
  }

  .order-panel,
  .product-panel {
    padding: 14px;
  }

  .product-panel #productSearch,
  .product-panel #searchBtn {
    min-height: 64px;
  }

  .checkout-panel .due-box strong {
    font-size: 44px;
  }

  .checkout-panel .checkout {
    min-height: 68px;
    font-size: 24px;
  }
}

@media (max-width: 900px) {
  .touch-register-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "order"
      "products"
      "checkout";
  }

  .order-actions,
  .product-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1051px) {
  body {
    font-size: 17px;
  }

  .cashier-shell {
    padding: 8px 10px;
    gap: 8px;
  }

  .cashier-header {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) auto;
    gap: 12px;
    min-height: 72px;
    padding: 8px 10px;
  }

  .cashier-header .brand-row {
    min-width: 0;
  }

  .cashier-header .brand-row > div {
    min-width: 0;
  }

  .cashier-header .mark {
    width: 48px;
    height: 48px;
    border-radius: 8px;
  }

  .cashier-header .brand-row strong {
    font-size: 24px;
  }

  .cashier-header .brand-row span {
    max-width: min(760px, 46vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
  }

  .header-actions {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .header-actions .btn {
    min-height: 42px;
    padding: 0 12px;
    font-size: 16px;
  }

  .header-actions .lang-row.compact {
    width: 132px;
  }

  .header-actions .lang-btn {
    min-height: 34px;
  }

  .version-chip {
    min-height: 36px;
    padding: 0 11px;
    font-size: 14px;
  }

  .register-strip {
    grid-template-columns: auto minmax(260px, 540px) 110px minmax(260px, 1fr);
    gap: 14px;
    min-height: 70px;
    padding: 10px 12px;
  }

  .register-strip label {
    gap: 4px;
  }

  .register-strip input,
  .register-strip select,
  .register-strip .btn {
    min-height: 44px;
  }

  .store-code-display {
    min-height: 48px;
    padding: 5px 16px;
  }

  .touch-register-layout {
    gap: 12px;
    grid-template-columns: minmax(520px, 0.95fr) minmax(720px, 1.25fr) minmax(330px, 0.55fr);
  }

  .order-panel,
  .product-panel,
  .checkout-panel {
    border-radius: 8px;
  }

  .order-panel,
  .product-panel {
    gap: 10px;
    padding: 12px;
  }

  .checkout-panel {
    gap: 10px;
    padding: 12px;
  }

  .order-heading h2,
  .product-panel-heading h2,
  .checkout-panel h2 {
    font-size: 24px;
  }

  .panel-caption {
    margin-top: 2px;
    font-size: 13px;
  }

  .cart-count {
    min-height: 32px;
    padding: 0 10px;
    font-size: 14px;
  }

  .product-panel #productSearch,
  .product-panel #searchBtn {
    min-height: 58px;
  }

  .product-panel #productSearch {
    font-size: 22px;
  }

  .product-panel #searchBtn {
    font-size: 20px;
  }

  .scan-row {
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: 10px;
  }

  .product-filter-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .product-filter-btn {
    min-height: 44px;
    padding: 0 8px;
    font-size: 16px;
  }

  .product-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
  }

  .product-card-grid .result-item {
    min-width: 0;
    min-height: 136px;
    gap: 6px;
    padding: 10px;
  }

  .product-card-grid .result-item strong:first-child,
  .product-card-grid .result-item span {
    overflow: hidden;
  }

  .product-card-grid .result-item strong:first-child {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 17px;
  }

  .product-card-grid .result-item span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    line-height: 1.3;
  }

  .product-card-grid .result-item > .result-price {
    font-size: 24px;
  }

  .order-total-stack {
    gap: 6px;
    padding-top: 8px;
  }

  .order-actions .btn {
    min-height: 44px;
  }

  .discount-row {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .segmented-control {
    min-height: 46px;
  }

  .segment {
    min-height: 36px;
  }

  .checkout-panel .due-box {
    padding: 12px;
  }

  .checkout-panel .due-box strong {
    font-size: 42px;
  }

  .payment-btn {
    min-height: 54px;
    font-size: 18px;
  }

  .paid-control input {
    min-height: 58px;
    font-size: 25px;
  }

  .quick-cash {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-cash .btn {
    min-height: 46px;
  }

  .checkout-panel .checkout {
    min-height: 66px;
    font-size: 24px;
  }
}

@media (min-width: 1700px) {
  .touch-register-layout {
    grid-template-columns: minmax(560px, 0.95fr) minmax(780px, 1.3fr) minmax(340px, 0.55fr);
  }

  .product-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }
}

@media (max-width: 1500px) and (min-width: 1051px) {
  .cashier-header {
    grid-template-columns: minmax(320px, 1fr) auto;
  }

  .header-actions .btn {
    padding: 0 10px;
    font-size: 15px;
  }

  .touch-register-layout {
    grid-template-columns: minmax(430px, 0.95fr) minmax(520px, 1.1fr) minmax(300px, 0.62fr);
  }

  .product-filter-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (min-width: 1051px) {
  body:has(#appScreen:not([hidden])) {
    background: #d2d2d2;
  }

  .cashier-shell {
    padding: 8px;
    gap: 6px;
    background: #d2d2d2;
  }

  .cashier-header,
  .register-strip,
  .order-panel,
  .product-panel,
  .checkout-panel {
    border-color: #bcbcbc;
    border-radius: 2px;
    box-shadow: none;
  }

  .cashier-header {
    min-height: 58px;
    padding: 6px 8px;
    background: #efefef;
  }

  .cashier-header .mark {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    box-shadow: none;
  }

  .cashier-header .brand-row strong {
    font-size: 20px;
  }

  .cashier-header .brand-row span {
    max-width: min(720px, 45vw);
    font-size: 14px;
  }

  .header-actions .btn,
  .lang-row,
  .version-chip,
  .register-strip input,
  .register-strip select,
  .register-strip .btn,
  .product-filter-btn,
  .payment-btn,
  .quick-cash .btn,
  .checkout-actions .btn,
  .order-actions .btn {
    border-radius: 2px;
    box-shadow: none;
  }

  .header-actions .btn {
    min-height: 38px;
    background: #f7f7f7;
  }

  .register-strip {
    min-height: 54px;
    padding: 6px 8px;
    background: #efefef;
  }

  .store-code-display {
    min-height: 40px;
    border-radius: 2px;
    background: #f7f7f7;
  }

  .touch-register-layout {
    grid-template-columns: minmax(460px, 34%) minmax(0, 66%);
    grid-template-rows: minmax(0, 1fr) 184px;
    grid-template-areas:
      "order products"
      "order checkout";
    gap: 8px;
    min-height: 0;
  }

  .order-panel {
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    gap: 8px;
    padding: 14px 18px 10px;
    background: #f8fafb;
  }

  .order-heading h2 {
    font-size: 20px;
  }

  .order-heading .panel-caption {
    display: none;
  }

  .order-panel .cart-table {
    border: 0;
    border-top: 2px dashed #7f8c8d;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    background: transparent;
  }

  .order-panel .cashier-cart-table th {
    background: transparent;
    color: #111;
    font-size: 16px;
  }

  .order-panel .cashier-cart-table td {
    background: transparent;
  }

  .order-total-stack {
    gap: 4px;
    padding: 10px 14px;
    border-top: 1px solid #e0e0e0;
  }

  .order-total-stack .total-line span {
    color: #000;
    font-weight: 800;
  }

  .order-total-stack .total-line strong {
    color: #000;
    font-size: 20px;
  }

  .order-total-stack #taxLine + label,
  .order-total-stack #discountControl {
    margin-top: 2px;
  }

  .order-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 0 -18px -10px;
  }

  .order-actions .btn {
    min-height: 64px;
    border-color: #c9c9c9;
    background: #f2f2f2;
    font-size: 18px;
    font-weight: 800;
  }

  .product-panel {
    grid-template-columns: 160px minmax(0, 1fr);
    grid-template-rows: 60px minmax(0, 1fr);
    grid-template-areas:
      "filters search"
      "filters products";
    gap: 8px;
    padding: 8px;
    background: #c9c9c9;
  }

  .product-panel-heading {
    display: none;
  }

  .product-panel .scan-row {
    grid-area: search;
    grid-template-columns: minmax(0, 1fr) 130px;
    gap: 8px;
  }

  .product-panel #productSearch,
  .product-panel #searchBtn {
    min-height: 60px;
    border-radius: 2px;
  }

  .product-panel #productSearch {
    border-width: 1px;
    font-size: 20px;
  }

  .product-panel #searchBtn {
    font-size: 18px;
  }

  .product-filter-row {
    grid-area: filters;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 4px;
    overflow: auto;
  }

  .product-filter-btn {
    min-height: 72px;
    border-color: #c2c2c2;
    background: #f7f7f7;
    color: #111;
    font-size: 20px;
  }

  .product-filter-btn.active {
    border-color: #1f8fdb;
    background: #238ee3;
    color: #fff;
  }

  .product-card-grid {
    grid-area: products;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 8px;
    padding-right: 2px;
  }

  .product-card-grid .result-item {
    min-height: 150px;
    border-radius: 0;
    border-color: #d4d4d4;
    background: #fff;
    cursor: pointer;
  }

  .product-card-grid .result-item:hover,
  .product-card-grid .result-item:focus-visible {
    outline: 3px solid rgba(35, 142, 227, 0.28);
    border-color: #238ee3;
    background: #fff;
  }

  .product-card-grid .result-item strong:first-child {
    font-size: 20px;
    font-weight: 800;
  }

  .product-card-grid .result-item > .result-price {
    color: #f04438;
    font-size: 22px;
    font-weight: 800;
  }

  .checkout-panel {
    grid-area: checkout;
    display: grid;
    grid-template-columns: 180px 1fr 1fr 1fr 1fr;
    grid-template-rows: 76px 92px;
    grid-template-areas:
      "due payments paid quick checkout"
      "due payments change quick checkout";
    gap: 6px;
    padding: 8px;
    overflow: hidden;
    background: #c9c9c9;
  }

  .checkout-panel .checkout-heading,
  .checkout-panel .summary-box,
  .checkout-panel .member-box,
  .checkout-panel .note-control,
  #syncPendingBtn {
    display: none !important;
  }

  .checkout-panel .due-box {
    grid-area: due;
    min-height: 0;
    border-color: #bcbcbc;
    border-radius: 0;
    background: #f8fafb;
    color: #000;
    box-shadow: none;
  }

  .checkout-panel .due-box span {
    color: #000;
    font-weight: 800;
  }

  .checkout-panel .due-box strong {
    color: #e00000;
    font-size: 30px;
  }

  .payment-buttons {
    grid-area: payments;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .payment-btn {
    min-height: 0;
    border-color: #c2c2c2;
    background: #f7f7f7;
    font-size: 18px;
  }

  .paid-control {
    grid-area: paid;
    gap: 4px;
  }

  .paid-control input {
    min-height: 48px;
    border-radius: 0;
    font-size: 22px;
  }

  .quick-cash {
    grid-area: quick;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .quick-cash .btn {
    min-height: 0;
    border-color: #c2c2c2;
    background: #f7f7f7;
    font-size: 15px;
  }

  .change-line {
    grid-area: change;
    min-height: 0;
    border-radius: 0;
    background: #f8fafb;
  }

  .checkout-panel .checkout-actions {
    grid-area: checkout;
    display: grid;
    padding: 0;
    border: 0;
  }

  .checkout-panel .checkout {
    min-height: 0;
    border-radius: 0;
    background: #f7f7f7;
    border-color: #c2c2c2;
    color: #000;
    font-size: 22px;
    box-shadow: none;
  }
}

@media (max-width: 1400px) and (min-width: 1051px) {
  .touch-register-layout {
    grid-template-columns: minmax(390px, 34%) minmax(0, 66%);
  }

  .product-panel {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .product-filter-btn {
    min-height: 62px;
    font-size: 17px;
  }

  .product-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  }

  .checkout-panel {
    grid-template-columns: 150px 1fr 1fr 1fr;
    grid-template-areas:
      "due payments paid checkout"
      "due quick change checkout";
  }
}

.classic-top-actions,
.classic-function-pad {
  display: none;
}

@media (min-width: 1051px) {
  body:has(#appScreen:not([hidden])) {
    overflow: hidden;
    background: #c4c4c4;
  }

  .cashier-shell {
    height: 100vh;
    min-height: 100vh;
    padding: 8px;
    gap: 0;
    background: #c4c4c4;
  }

  .cashier-header,
  .register-strip,
  #versionUpdateBanner {
    display: none !important;
  }

  #statusBar:not([hidden]) {
    position: fixed;
    z-index: 60;
    top: 240px;
    right: auto;
    left: 34px;
    width: min(380px, calc(34.5vw - 64px));
    max-width: 380px;
    margin: 0;
    padding: 16px 18px;
    border-radius: 4px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
  }

  .touch-register-layout {
    display: grid;
    height: calc(100vh - 16px);
    max-width: none;
    margin: 0;
    grid-template-columns: minmax(500px, 34.5%) minmax(720px, 1fr);
    grid-template-rows: 116px minmax(0, 1fr) 190px;
    grid-template-areas:
      "order classicTop"
      "order products"
      "order classicPad";
    gap: 6px;
    align-items: stretch;
  }

  .classic-top-actions {
    grid-area: classicTop;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    min-height: 0;
  }

  .touch-register-layout .order-panel {
    grid-area: order;
  }

  .touch-register-layout .product-panel {
    grid-area: products;
  }

  .touch-register-layout .checkout-panel {
    grid-area: classicPad;
  }

  .classic-nav-btn,
  .classic-key {
    min-width: 0;
    border: 5px solid #c9c9c9;
    border-radius: 0;
    background: #f4f4f4;
    color: #050505;
    font: inherit;
    font-size: 24px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: none;
  }

  .classic-nav-btn:hover,
  .classic-key:hover {
    background: #fff;
  }

  .classic-nav-btn:focus-visible,
  .classic-key:focus-visible {
    outline: 4px solid rgba(31, 143, 219, 0.42);
    outline-offset: -4px;
  }

  .order-panel {
    grid-area: order;
    display: grid;
    grid-template-rows: 112px minmax(0, 1fr) auto auto;
    gap: 0;
    min-height: 0;
    padding: 0 28px;
    border: 5px solid #c9c9c9;
    border-radius: 0;
    background: #f6f8fa;
    box-shadow: none;
    overflow: hidden;
  }

  .order-heading {
    display: grid;
    align-content: start;
    justify-content: stretch;
    padding: 12px 0 0;
  }

  .order-heading h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.1;
    font-weight: 500;
  }

  .order-heading .panel-caption {
    display: none;
  }

  #cartCountText {
    justify-self: center;
    min-height: 0;
    margin-top: 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #000;
    font-size: 22px;
    font-weight: 700;
  }

  .order-panel .cart-table {
    min-height: 0;
    border: 0;
    border-top: 2px dashed #717a80;
    border-bottom: 1px solid #e5e5e5;
    border-radius: 0;
    background: transparent;
    overflow: auto;
  }

  .order-panel .cashier-cart-table {
    min-width: 0;
    table-layout: fixed;
  }

  .order-panel .cashier-cart-table th {
    height: 46px;
    padding: 8px;
    border-bottom: 0;
    background: transparent;
    color: #000;
    font-size: 18px;
    font-weight: 800;
  }

  .order-panel .cashier-cart-table th:first-child {
    width: 46%;
  }

  .order-panel .cashier-cart-table th:nth-child(2) {
    width: 24%;
  }

  .order-panel .cashier-cart-table th:last-child,
  .order-panel .cashier-cart-table td:last-child {
    width: 42px;
  }

  .order-panel .cashier-cart-table td {
    padding: 9px 8px;
    border-bottom-color: #eeeeee;
    background: transparent;
    color: #000;
    font-size: 18px;
  }

  .order-panel .cart-name strong {
    font-size: 18px;
    line-height: 1.12;
  }

  .order-panel .cart-name span {
    font-size: 13px;
  }

  .order-panel .cart-qty {
    grid-template-columns: 36px minmax(42px, 58px) 36px;
    gap: 4px;
  }

  .order-panel .cart-qty .btn,
  .order-panel .cart-qty input,
  .order-panel .remove-btn {
    min-height: 34px;
    border-radius: 0;
    font-size: 17px;
    font-weight: 800;
  }

  .order-total-stack {
    gap: 4px;
    padding: 16px 18px 18px;
    border-top: 1px solid #eeeeee;
    background: #f6f8fa;
  }

  .order-total-stack .total-line {
    min-height: 30px;
  }

  .order-total-stack .total-line span {
    color: #000;
    font-size: 21px;
    font-weight: 900;
  }

  .order-total-stack .total-line strong {
    color: #000;
    font-size: 22px;
    font-weight: 900;
  }

  .order-total-stack .total-line:last-of-type span,
  .order-total-stack .total-line:last-of-type strong {
    color: #ff0000;
  }

  .order-total-stack #discountControl {
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    margin-top: 4px;
  }

  .order-total-stack #discountControl > span:first-child {
    color: #000;
    font-size: 21px;
    font-weight: 900;
  }

  .discount-row .segment,
  #discountInput {
    border-radius: 0;
  }

  .order-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0 -28px;
  }

  .order-actions .btn {
    min-height: 104px;
    border: 5px solid #d0d0d0;
    border-radius: 0;
    background: #f4f4f4;
    color: #050505;
    font-size: 24px;
    font-weight: 900;
  }

  #toggleRefundBtn {
    display: none !important;
  }

  .product-panel {
    grid-area: products;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 84px;
    grid-template-areas:
      "filters products"
      "search search";
    gap: 6px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #c4c4c4;
    box-shadow: none;
    overflow: hidden;
  }

  .product-panel-heading,
  .product-panel .cart-table,
  #productPanelStockWarning {
    display: none !important;
  }

  .product-filter-row {
    grid-area: filters;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 6px;
    min-height: 0;
    overflow: auto;
  }

  .product-filter-btn {
    min-height: 84px;
    border: 5px solid #c9c9c9;
    border-radius: 0;
    background: #f4f4f4;
    color: #000;
    font-size: 24px;
    font-weight: 900;
  }

  .product-filter-btn.active {
    border-color: #c9c9c9;
    background: #238ee3;
    color: #fff;
  }

  .product-card-grid {
    grid-area: products;
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    grid-auto-rows: 178px;
    align-content: start;
    gap: 6px;
    min-height: 0;
    max-height: none;
    overflow: auto;
    padding: 0;
  }

  .product-card-grid .empty {
    grid-column: 1 / -1;
    min-height: 178px;
    border: 5px solid #c9c9c9;
    border-radius: 0;
    background: #f7f7f7;
  }

  .product-card-grid .result-item {
    position: relative;
    display: block;
    min-height: 0;
    height: 178px;
    padding: 82px 10px 12px;
    border: 5px solid #c9c9c9;
    border-radius: 0;
    background: #fff;
    color: #000;
    cursor: pointer;
    box-shadow: none;
    overflow: hidden;
  }

  .product-card-grid .result-item::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 10px;
    width: 78px;
    height: 58px;
    background:
      repeating-linear-gradient(90deg, #cfcfcf 0 5px, transparent 5px 9px),
      #f1f1f1;
  }

  .product-card-grid .result-item:hover,
  .product-card-grid .result-item:focus-visible {
    outline: 4px solid #238ee3;
    outline-offset: -8px;
    border-color: #c9c9c9;
    background: #fff;
  }

  .product-card-grid .result-item > div {
    display: block;
    min-width: 0;
  }

  .product-card-grid .result-item strong:first-child {
    display: block;
    color: #000;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product-card-grid .result-item span {
    display: none;
  }

  .product-card-grid .result-item > .result-price {
    position: absolute;
    top: 16px;
    left: 98px;
    color: #ff3b30;
    font-size: 23px;
    font-weight: 500;
    line-height: 1;
    text-align: left;
  }

  .product-panel .scan-row {
    grid-area: search;
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 6px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .product-panel .scan-row::before {
    content: "编码搜索";
    display: grid;
    place-items: center;
    min-height: 84px;
    border: 5px solid #c9c9c9;
    background: #238ee3;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
  }

  .product-panel #productSearch {
    min-height: 84px;
    border: 5px solid #c9c9c9;
    border-radius: 0;
    background: #fff;
    color: #000;
    font-size: 26px;
    font-weight: 700;
  }

  .product-panel #searchBtn {
    display: none;
  }

  .checkout-panel {
    grid-area: classicPad;
    display: block;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #c4c4c4;
    box-shadow: none;
    overflow: hidden;
  }

  .checkout-panel > :not(.classic-function-pad) {
    display: none !important;
  }

  .classic-function-pad {
    display: grid;
    height: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 6px;
  }

  #classicCodeSearchBtn {
    display: none;
  }

  .classic-key {
    min-height: 0;
    font-size: 24px;
  }

  .classic-key-blue {
    background: #238ee3;
    color: #fff;
  }

  .classic-key-arrow {
    background: #9f9f9f;
    color: #fff;
    font-size: 44px;
  }

  #classicPrevPageBtn {
    grid-column: 2;
  }

  #classicNextPageBtn {
    grid-column: 5;
  }
}

@media (max-width: 1500px) and (min-width: 1051px) {
  .touch-register-layout {
    grid-template-columns: minmax(460px, 36%) minmax(620px, 1fr);
  }

  .classic-nav-btn,
  .classic-key,
  .product-filter-btn {
    font-size: 21px;
  }

  .product-panel {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .product-card-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    grid-auto-rows: 164px;
  }

  .product-card-grid .result-item {
    height: 164px;
  }
}

@media (min-width: 1051px) {
  body:has(#appScreen:not([hidden])) {
    overflow: hidden;
    background: #dfe7e5;
  }

  .cashier-shell {
    height: 100vh;
    min-height: 100vh;
    padding: 12px;
    gap: 12px;
    background: #dfe7e5;
  }

  .cashier-header {
    display: grid !important;
    min-height: 74px;
    padding: 10px 14px;
    border: 1px solid #c3cfcc;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: none;
  }

  .cashier-header .mark {
    width: 54px;
    height: 54px;
    border-radius: 10px;
  }

  .cashier-header .brand-row strong {
    font-size: 30px;
    line-height: 1;
  }

  .cashier-header .brand-row span {
    max-width: min(780px, 48vw);
    color: #3c5552;
    font-size: 16px;
  }

  #syncBtn,
  #verifyCloudLinkBtn,
  #testPrintBtn,
  .register-strip,
  .classic-top-actions,
  .classic-function-pad,
  #versionUpdateBanner {
    display: none !important;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .btn,
  .lang-row,
  .version-chip {
    min-height: 50px;
    border-radius: 6px;
    box-shadow: none;
  }

  .touch-register-layout {
    display: grid;
    height: calc(100vh - 110px);
    max-width: none;
    margin: 0;
    grid-template-columns: minmax(500px, 36%) minmax(540px, 1fr) minmax(360px, 24%);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "order products checkout";
    gap: 14px;
    align-items: stretch;
  }

  .touch-register-layout .order-panel {
    grid-area: order;
  }

  .touch-register-layout .product-panel {
    grid-area: products;
  }

  .touch-register-layout .checkout-panel {
    grid-area: checkout;
  }

  .order-panel,
  .product-panel,
  .checkout-panel {
    border: 1px solid #c3cfcc;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: none;
  }

  .order-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 12px;
    min-height: 0;
    padding: 18px;
    overflow: hidden;
  }

  .order-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
  }

  .order-heading h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
  }

  .order-heading .panel-caption {
    display: block;
    max-width: 360px;
    margin-top: 6px;
    color: #48615e;
    font-size: 16px;
  }

  #cartCountText {
    justify-self: auto;
    min-height: 52px;
    margin: 0;
    padding: 0 16px;
    border-radius: 999px;
    background: #eef5f2;
    color: #38524f;
    font-size: 18px;
    font-weight: 900;
    white-space: nowrap;
  }

  .order-panel .cart-table {
    min-height: 0;
    border: 1px solid #cbd8d4;
    border-radius: 6px;
    background: #ffffff;
    overflow: auto;
  }

  .order-panel .cashier-cart-table {
    min-width: 0;
    table-layout: fixed;
  }

  .order-panel .cashier-cart-table th {
    height: 50px;
    padding: 10px 12px;
    border-bottom: 1px solid #d8e2df;
    background: #eff5f3;
    color: #405a57;
    font-size: 18px;
    font-weight: 900;
  }

  .order-panel .cashier-cart-table th:first-child {
    width: 42%;
  }

  .order-panel .cashier-cart-table th:nth-child(2) {
    width: 25%;
  }

  .order-panel .cashier-cart-table th:last-child,
  .order-panel .cashier-cart-table td:last-child {
    width: 42px;
  }

  .order-panel .cashier-cart-table td {
    padding: 12px;
    border-bottom: 1px solid #edf2f0;
    background: #ffffff;
    color: #00151b;
    font-size: 18px;
  }

  .order-panel .cart-name strong {
    font-size: 18px;
    line-height: 1.12;
  }

  .order-panel .cart-name span {
    color: #58706d;
    font-size: 13px;
  }

  .order-panel .cart-qty {
    grid-template-columns: 40px minmax(44px, 60px) 40px;
    gap: 6px;
  }

  .order-panel .cart-qty .btn,
  .order-panel .cart-qty input,
  .order-panel .remove-btn {
    min-height: 40px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 900;
  }

  .order-total-stack {
    gap: 8px;
    padding: 12px 0 0;
    border-top: 1px solid #d8e2df;
    background: transparent;
  }

  .order-total-stack .total-line span,
  .order-total-stack .total-line strong {
    color: #00151b;
    font-size: 20px;
    font-weight: 900;
  }

  .order-total-stack .total-line:last-of-type span,
  .order-total-stack .total-line:last-of-type strong {
    color: #b91612;
  }

  .order-total-stack #discountControl {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    margin-top: 0;
  }

  .order-total-stack #discountControl > span:first-child {
    color: #00151b;
    font-size: 18px;
    font-weight: 900;
  }

  .discount-row .segment,
  #discountInput {
    border-radius: 6px;
  }

  .order-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
  }

  .order-actions .btn {
    min-height: 64px;
    border: 1px solid #cbd8d4;
    border-radius: 6px;
    background: #f8fbfa;
    color: #00151b;
    font-size: 18px;
    font-weight: 900;
  }

  #toggleRefundBtn {
    display: block !important;
  }

  .product-panel {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 18px;
    overflow: hidden;
  }

  .product-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
  }

  .product-panel-heading h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
  }

  .product-panel-heading .panel-caption {
    display: block;
    margin-top: 6px;
    color: #48615e;
    font-size: 16px;
  }

  .product-panel .scan-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    grid-area: auto;
    gap: 10px;
    min-height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .product-panel .scan-row::before {
    display: none;
  }

  .product-panel #productSearch,
  .product-panel #searchBtn {
    min-height: 70px;
    border-radius: 6px;
  }

  .product-panel #productSearch {
    display: block;
    border: 3px solid #0f7668;
    background: #ffffff;
    color: #00151b;
    font-size: 28px;
    font-weight: 800;
  }

  .product-panel #searchBtn {
    display: block;
    font-size: 22px;
    font-weight: 900;
  }

  .product-filter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    min-height: auto;
    overflow: visible;
  }

  .product-filter-btn {
    min-height: 60px;
    border: 1px solid #cbd8d4;
    border-radius: 6px;
    background: #f8fbfa;
    color: #00151b;
    font-size: 18px;
    font-weight: 900;
  }

  .product-filter-btn.active {
    border-color: #0f7668;
    background: #0f7668;
    color: #ffffff;
  }

  .product-card-grid {
    display: grid;
    grid-area: auto;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    grid-auto-rows: 154px;
    align-content: start;
    gap: 10px;
    min-height: 0;
    max-height: none;
    overflow: auto;
    padding: 0 2px 0 0;
  }

  .product-card-grid .empty {
    grid-column: 1 / -1;
    min-height: 154px;
    border: 1px solid #cbd8d4;
    border-radius: 6px;
    background: #f8fbfa;
  }

  .product-card-grid .result-item {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 154px;
    min-height: 0;
    padding: 14px;
    border: 1px solid #cbd8d4;
    border-radius: 6px;
    background: #ffffff;
    color: #00151b;
    cursor: pointer;
    box-shadow: none;
    overflow: hidden;
  }

  .product-card-grid .result-item::before {
    display: none;
  }

  .product-card-grid .result-item:hover,
  .product-card-grid .result-item:focus-visible {
    outline: 4px solid rgba(15, 118, 104, 0.18);
    outline-offset: -4px;
    border-color: #0f7668;
    background: #f8fffd;
  }

  .product-card-grid .result-item > div {
    display: grid;
    gap: 6px;
    min-width: 0;
  }

  .product-card-grid .result-item strong:first-child {
    display: block;
    color: #00151b;
    font-size: 19px;
    font-weight: 900;
    line-height: 1.16;
    overflow: hidden;
  }

  .product-card-grid .result-item span {
    display: block;
    color: #58706d;
    font-size: 14px;
    line-height: 1.3;
  }

  .product-card-grid .result-item > .result-price {
    position: static;
    color: #06443d;
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    text-align: left;
  }

  .product-panel .cart-table,
  #productPanelStockWarning {
    display: none !important;
  }

  .checkout-panel {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: 0;
    padding: 18px;
    overflow: auto;
  }

  .checkout-panel > :not(.classic-function-pad) {
    display: grid !important;
  }

  .checkout-panel .checkout-heading {
    display: flex !important;
  }

  .checkout-panel .checkout-heading h2 {
    font-size: 34px;
    font-weight: 900;
  }

  .checkout-panel .summary-box,
  .checkout-panel > .total-line,
  .checkout-legacy-discount,
  .checkout-points-mirror,
  #checkoutHeldOrdersListMirror,
  #checkoutRefundPanelMirror,
  .checkout-panel .note-control {
    display: none !important;
  }

  .checkout-panel .member-box {
    display: grid !important;
    gap: 8px;
    padding: 10px;
    border-radius: 6px;
  }

  .member-search-row {
    grid-template-columns: minmax(0, 1fr) 82px;
  }

  .checkout-panel .due-box {
    min-height: 160px;
    padding: 22px;
    border: 0;
    border-radius: 6px;
    background: #073f39;
    color: #ffffff;
  }

  .checkout-panel .due-box span {
    color: #b7d8ce;
    font-size: 19px;
    font-weight: 800;
  }

  .checkout-panel .due-box strong {
    color: #ffffff;
    font-size: clamp(46px, 4.8vw, 72px);
    line-height: 1;
  }

  .payment-buttons {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .payment-btn {
    min-height: 62px;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 900;
  }

  .paid-control {
    display: grid !important;
    gap: 8px;
  }

  .paid-control span,
  .change-line span {
    color: #3d5653;
    font-size: 18px;
    font-weight: 800;
  }

  .paid-control input {
    min-height: 76px;
    border-radius: 6px;
    text-align: right;
    font-size: 32px;
    font-weight: 900;
  }

  .quick-cash {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .quick-cash .btn {
    min-height: 56px;
    border-radius: 6px;
    background: #f8fbfa;
    font-size: 18px;
    font-weight: 900;
  }

  .change-line {
    display: flex !important;
    min-height: 52px;
    border-radius: 6px;
    background: #f8fbfa;
  }

  .change-line strong {
    color: #06443d;
    font-size: 22px;
  }

  .checkout-panel .checkout-actions {
    display: grid !important;
    gap: 10px;
    padding: 0;
    border: 0;
  }

  .checkout-panel .checkout {
    display: block !important;
    min-height: 84px;
    border-radius: 6px;
    background: #0f7668;
    color: #ffffff;
    font-size: 30px;
    font-weight: 900;
  }

  .checkout-panel .hold-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #checkoutRefundMirror,
  #syncPendingBtn,
  #checkoutClearCartMirror {
    display: block !important;
    min-height: 54px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 900;
  }
}

/* v1.0.121 ergonomic cashier layout: simple, wide, high-frequency checkout */
@media (min-width: 1051px) {
  body:has(#appScreen:not([hidden])) {
    overflow: hidden;
    background: #dfe7e4;
  }

  .cashier-shell {
    height: 100vh;
    min-height: 100vh;
    padding: 10px;
    gap: 10px;
    background: #dfe7e4;
  }

  .cashier-header {
    min-height: 68px;
    padding: 8px 12px;
    border: 1px solid #b9cac6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  .cashier-header .brand-row {
    gap: 10px;
  }

  .cashier-header .mark {
    width: 52px;
    height: 52px;
    border-radius: 10px;
  }

  .cashier-header .brand-row strong {
    font-size: 28px;
    line-height: 1;
  }

  .cashier-header .brand-row span {
    max-width: min(820px, 50vw);
    color: #3c5552;
    font-size: 16px;
    line-height: 1.25;
  }

  .header-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .header-actions .btn,
  .header-actions .lang-row,
  .version-chip {
    min-height: 46px;
    border-radius: 8px;
    font-size: 18px;
    box-shadow: none;
  }

  #syncBtn,
  #verifyCloudLinkBtn,
  #testPrintBtn,
  .register-strip,
  #versionUpdateBanner {
    display: none !important;
  }

  .classic-function-pad {
    display: none !important;
  }

  .touch-register-layout {
    display: grid;
    height: calc(100vh - 88px);
    max-width: none;
    margin: 0;
    grid-template-columns: minmax(460px, 31%) minmax(620px, 1fr) minmax(340px, 22%);
    grid-template-rows: 64px minmax(0, 1fr);
    grid-template-areas:
      "order quick quick"
      "order products checkout";
    gap: 10px;
    align-items: stretch;
  }

  .touch-register-layout .order-panel {
    grid-area: order;
  }

  .touch-register-layout .product-panel {
    grid-area: products;
  }

  .touch-register-layout .checkout-panel {
    grid-area: checkout;
  }

  .classic-top-actions {
    grid-area: quick;
    display: grid !important;
    grid-template-columns: 1.05fr 1.25fr 1fr 1.35fr 1fr;
    gap: 8px;
    min-height: 0;
  }

  .classic-nav-btn {
    min-height: 64px;
    border: 1px solid #b9cac6;
    border-radius: 8px;
    background: #ffffff;
    color: #00151b;
    font-size: 21px;
    font-weight: 900;
    box-shadow: none;
  }

  .classic-nav-btn:hover,
  .classic-nav-btn:focus-visible {
    border-color: #0f7668;
    background: #effaf6;
    outline: none;
  }

  #classicPayBtn {
    border-color: #0f7668;
    background: #0f7668;
    color: #ffffff;
  }

  .order-panel,
  .product-panel,
  .checkout-panel {
    min-height: 0;
    border: 1px solid #b9cac6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  .order-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 18px;
    overflow: hidden;
  }

  .order-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 0 0 8px;
    border-bottom: 2px dashed #aabbb7;
  }

  .order-heading h2,
  .product-panel-heading h2,
  .checkout-panel .checkout-heading h2 {
    margin: 0;
    color: #00151b;
    font-size: 31px;
    font-weight: 900;
    line-height: 1;
  }

  .order-heading .panel-caption,
  .product-panel-heading .panel-caption {
    max-width: 420px;
    margin-top: 6px;
    color: #4d6663;
    font-size: 15px;
  }

  #cartCountText,
  .checkout-cart-count {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: #eff5f3;
    color: #36534f;
    font-size: 17px;
    font-weight: 900;
    white-space: nowrap;
  }

  .order-panel .cart-table {
    min-height: 0;
    border: 1px solid #ccd9d5;
    border-radius: 8px;
    background: #ffffff;
    overflow: auto;
  }

  .order-panel .cashier-cart-table {
    min-width: 0;
    table-layout: fixed;
  }

  .order-panel .cashier-cart-table th {
    height: 46px;
    padding: 8px 10px;
    border-bottom: 1px solid #d5e0dd;
    background: #edf4f1;
    color: #405a57;
    font-size: 17px;
    font-weight: 900;
  }

  .order-panel .cashier-cart-table th:first-child {
    width: 43%;
  }

  .order-panel .cashier-cart-table th:nth-child(2) {
    width: 24%;
  }

  .order-panel .cashier-cart-table th:nth-child(3),
  .order-panel .cashier-cart-table td:nth-child(3) {
    display: none;
  }

  .order-panel .cashier-cart-table th:last-child,
  .order-panel .cashier-cart-table td:last-child {
    width: 42px;
  }

  .order-panel .cashier-cart-table td {
    padding: 10px;
    border-bottom: 1px solid #edf2f0;
    background: #ffffff;
    color: #00151b;
    font-size: 18px;
    vertical-align: middle;
  }

  .order-panel .cart-name strong {
    font-size: 18px;
    line-height: 1.12;
  }

  .order-panel .cart-name span {
    color: #58706d;
    font-size: 13px;
  }

  .order-panel .cart-qty {
    grid-template-columns: 38px minmax(42px, 58px) 38px;
    gap: 5px;
  }

  .order-panel .cart-qty .btn,
  .order-panel .cart-qty input,
  .order-panel .remove-btn {
    min-height: 38px;
    border-radius: 6px;
    font-size: 17px;
    font-weight: 900;
  }

  .order-total-stack {
    gap: 6px;
    padding: 10px 0 0;
    border-top: 1px solid #d5e0dd;
    background: transparent;
  }

  .order-total-stack .total-line span,
  .order-total-stack .total-line strong {
    color: #00151b;
    font-size: 19px;
    font-weight: 900;
  }

  .order-total-stack .total-line:last-of-type span,
  .order-total-stack .total-line:last-of-type strong {
    color: #b91612;
    font-size: 27px;
  }

  .order-total-stack #discountControl {
    grid-template-columns: 66px minmax(0, 1fr);
    align-items: center;
    margin-top: 0;
  }

  .order-total-stack #discountControl > span:first-child {
    color: #00151b;
    font-size: 17px;
    font-weight: 900;
  }

  .order-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
  }

  .order-actions .btn {
    min-height: 60px;
    border: 1px solid #c7d6d2;
    border-radius: 8px;
    background: #f8fbfa;
    color: #00151b;
    font-size: 18px;
    font-weight: 900;
  }

  #toggleRefundBtn {
    display: block !important;
    border-color: #f0b44b;
    color: #855200;
  }

  .product-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    grid-template-areas: none;
    gap: 10px;
    padding: 18px;
    overflow: hidden;
  }

  .product-panel-heading {
    display: flex !important;
    grid-column: 1 / -1;
    grid-area: auto !important;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 2px;
  }

  .product-panel .scan-row {
    display: grid;
    grid-column: 1 / -1;
    grid-area: auto !important;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 10px;
    min-height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .product-panel .scan-row::before {
    display: none;
  }

  .product-panel #productSearch,
  .product-panel #searchBtn {
    min-height: 66px;
    border-radius: 8px;
  }

  .product-panel #productSearch {
    display: block;
    border: 3px solid #0f7668;
    background: #ffffff;
    color: #00151b;
    font-size: 27px;
    font-weight: 900;
  }

  .product-panel #searchBtn {
    display: block;
    font-size: 22px;
    font-weight: 900;
  }

  .product-filter-row {
    display: grid;
    grid-column: 1 / -1;
    grid-area: auto !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    min-height: auto;
    overflow: hidden;
  }

  .product-filter-btn {
    min-height: 54px;
    overflow: hidden;
    border: 1px solid #c7d6d2;
    border-radius: 8px;
    background: #f8fbfa;
    color: #00151b;
    font-size: 18px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-filter-btn.active {
    border-color: #0f7668;
    background: #0f7668;
    color: #ffffff;
  }

  .product-card-grid {
    display: grid;
    grid-column: 1 / -1;
    grid-area: auto !important;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-auto-rows: 132px;
    align-content: start;
    gap: 10px;
    min-height: 0;
    max-height: none;
    overflow: auto;
    padding: 0 2px 0 0;
  }

  .product-card-grid .empty {
    grid-column: 1 / -1;
    min-height: 132px;
    border: 1px solid #ccd9d5;
    border-radius: 8px;
    background: #f8fbfa;
  }

  .product-card-grid .result-item {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 132px;
    min-height: 0;
    padding: 13px;
    border: 1px solid #ccd9d5;
    border-radius: 8px;
    background: #ffffff;
    color: #00151b;
    cursor: pointer;
    box-shadow: none;
    overflow: hidden;
  }

  .product-card-grid .result-item::before {
    display: none !important;
    content: none !important;
  }

  .product-card-grid .result-item:hover,
  .product-card-grid .result-item:focus-visible {
    outline: 4px solid rgba(15, 118, 104, 0.18);
    outline-offset: -4px;
    border-color: #0f7668;
    background: #f8fffd;
  }

  .product-card-grid .result-item > div {
    display: grid;
    gap: 5px;
    min-width: 0;
  }

  .product-card-grid .result-item strong:first-child {
    display: -webkit-box;
    color: #00151b;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.14;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .product-card-grid .result-item span {
    display: block;
    overflow: hidden;
    color: #58706d;
    font-size: 13px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-card-grid .result-item > .result-price {
    position: static;
    color: #06443d;
    font-size: 27px;
    font-weight: 900;
    line-height: 1;
    text-align: left;
  }

  .product-panel .cart-table,
  #productPanelStockWarning {
    display: none !important;
  }

  .checkout-panel {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 18px;
    overflow: auto;
  }

  .checkout-panel > :not(.classic-function-pad) {
    display: block !important;
  }

  .checkout-panel .checkout-heading {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
  }

  .checkout-panel .summary-box,
  .checkout-panel > .total-line,
  .checkout-legacy-discount,
  .checkout-points-mirror,
  #checkoutHeldOrdersListMirror,
  #checkoutRefundPanelMirror,
  .checkout-panel .note-control,
  #lastSaleBox {
    display: none !important;
  }

  .checkout-panel .member-box {
    display: grid !important;
    gap: 8px;
    padding: 10px;
    border: 1px solid #d5e0dd;
    border-radius: 8px;
    background: #f8fbfa;
  }

  .member-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 7px;
  }

  .member-search-row input,
  .member-search-row .btn {
    min-height: 44px;
    border-radius: 6px;
  }

  .checkout-panel .due-box {
    display: grid !important;
    min-height: 140px;
    padding: 20px;
    border: 0;
    border-radius: 8px;
    background: #073f39;
    color: #ffffff;
  }

  .checkout-panel .due-box span {
    color: #b7d8ce;
    font-size: 18px;
    font-weight: 800;
  }

  .checkout-panel .due-box strong {
    color: #ffffff;
    font-size: clamp(42px, 4vw, 64px);
    line-height: 1;
  }

  .payment-buttons {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .payment-btn {
    min-height: 58px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 900;
  }

  .paid-control {
    display: grid !important;
    gap: 7px;
  }

  .paid-control span,
  .change-line span {
    color: #3d5653;
    font-size: 17px;
    font-weight: 800;
  }

  .paid-control input {
    min-height: 66px;
    border-radius: 8px;
    text-align: right;
    font-size: 30px;
    font-weight: 900;
  }

  .quick-cash {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .quick-cash .btn {
    min-height: 50px;
    border-radius: 8px;
    background: #f8fbfa;
    font-size: 17px;
    font-weight: 900;
  }

  .change-line {
    display: flex !important;
    min-height: 46px;
    border-radius: 8px;
    background: #f8fbfa;
  }

  .change-line strong {
    color: #06443d;
    font-size: 22px;
  }

  .checkout-panel .checkout-actions {
    display: grid !important;
    gap: 8px;
    padding: 0;
    border: 0;
  }

  .checkout-panel .checkout {
    display: block !important;
    min-height: 78px;
    border-radius: 8px;
    background: #0f7668;
    color: #ffffff;
    font-size: 29px;
    font-weight: 900;
  }

  .checkout-panel .hold-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .checkout-panel .hold-actions .btn,
  #checkoutRefundMirror,
  #syncPendingBtn,
  #checkoutClearCartMirror {
    display: block !important;
    min-height: 50px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 900;
  }
}

/* v1.0.122 classic register: left receipt, right product pad, bottom function keys */
@media (min-width: 1051px) {
  body:has(#appScreen:not([hidden])) {
    overflow: hidden;
    background: #c8c8c8;
  }

  .cashier-shell {
    height: 100vh;
    min-height: 100vh;
    padding: 10px;
    gap: 0;
    background: #c8c8c8;
  }

  .cashier-header,
  .register-strip,
  #versionUpdateBanner {
    display: none !important;
  }

  .touch-register-layout {
    display: grid;
    height: calc(100vh - 20px);
    max-width: min(1600px, calc(100vw - 20px));
    margin: 0 auto;
    grid-template-columns: minmax(470px, 36%) minmax(760px, 1fr);
    grid-template-rows: 76px minmax(0, 1fr) 174px;
    grid-template-areas:
      "order quick"
      "order products"
      "order checkout";
    gap: 8px;
    align-items: stretch;
    background: #c8c8c8;
  }

  .touch-register-layout .order-panel {
    grid-area: order;
  }

  .touch-register-layout .product-panel {
    grid-area: products;
  }

  .touch-register-layout .checkout-panel {
    grid-area: checkout;
  }

  .classic-top-actions {
    grid-area: quick;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
  }

  .classic-nav-btn {
    min-height: 76px;
    border: 0;
    border-radius: 0;
    background: #f2f2f2;
    color: #000000;
    font-size: 24px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px #d6d6d6;
  }

  .classic-nav-btn:hover,
  .classic-nav-btn:focus-visible {
    background: #ffffff;
    outline: 3px solid #2998e5;
    outline-offset: -3px;
  }

  #classicPayBtn {
    background: #f2f2f2;
    color: #000000;
  }

  .order-panel {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto 82px;
    gap: 12px;
    min-height: 0;
    padding: 20px 24px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #f6f8fa;
    color: #000000;
    box-shadow: inset 0 0 0 1px #d6d6d6;
  }

  .order-panel::after {
    position: absolute;
    right: 0;
    bottom: 84px;
    left: 0;
    height: 18px;
    background:
      linear-gradient(135deg, transparent 75%, #c8c8c8 75%) 0 0 / 18px 18px,
      linear-gradient(225deg, transparent 75%, #c8c8c8 75%) 0 0 / 18px 18px;
    content: "";
    pointer-events: none;
  }

  .order-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 0 12px;
    border-bottom: 2px dashed #8b98a3;
  }

  .order-heading h2 {
    margin: 0;
    color: #000000;
    font-size: 25px;
    font-weight: 500;
    line-height: 1.1;
  }

  .order-heading .panel-caption {
    display: none;
  }

  #cartCountText {
    justify-self: start;
    min-height: auto;
    padding: 0 0 0 44px;
    border-radius: 0;
    background: transparent;
    color: #000000;
    font-size: 18px;
    font-weight: 700;
  }

  .order-panel .cart-table {
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: auto;
  }

  .order-panel .cashier-cart-table {
    min-width: 0;
    table-layout: fixed;
  }

  .order-panel .cashier-cart-table th {
    height: 42px;
    padding: 8px 10px;
    border-bottom: 0;
    background: transparent;
    color: #000000;
    font-size: 18px;
    font-weight: 900;
  }

  .order-panel .cashier-cart-table th:first-child {
    width: 46%;
  }

  .order-panel .cashier-cart-table th:nth-child(2) {
    width: 24%;
  }

  .order-panel .cashier-cart-table th:nth-child(3),
  .order-panel .cashier-cart-table td:nth-child(3) {
    display: none;
  }

  .order-panel .cashier-cart-table th:last-child,
  .order-panel .cashier-cart-table td:last-child {
    width: 42px;
  }

  .order-panel .cashier-cart-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e8ecef;
    background: transparent;
    color: #000000;
    font-size: 18px;
  }

  .order-panel .cart-name strong {
    color: #000000;
    font-size: 18px;
    line-height: 1.12;
  }

  .order-panel .cart-name span {
    color: #47515a;
    font-size: 13px;
  }

  .order-panel .cart-qty {
    grid-template-columns: 36px minmax(42px, 56px) 36px;
    gap: 4px;
  }

  .order-panel .cart-qty .btn,
  .order-panel .cart-qty input,
  .order-panel .remove-btn {
    min-height: 36px;
    border-radius: 0;
    font-size: 17px;
    font-weight: 900;
  }

  .order-total-stack {
    gap: 8px;
    padding: 18px 12px 0;
    border-top: 1px solid #eef1f3;
    background: transparent;
  }

  .order-total-stack .total-line span,
  .order-total-stack .total-line strong {
    color: #000000;
    font-size: 23px;
    font-weight: 900;
  }

  .order-total-stack .total-line:last-of-type span,
  .order-total-stack .total-line:last-of-type strong {
    color: #ff1f1f;
  }

  .order-total-stack #discountControl {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
  }

  .order-total-stack #discountControl > span:first-child {
    color: #000000;
    font-size: 20px;
    font-weight: 900;
  }

  .discount-row .segment,
  #discountInput {
    min-height: 52px;
    border-radius: 0;
    font-size: 20px;
    font-weight: 900;
  }

  .order-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0 -24px -20px;
    padding: 0;
    background: #d9d9d9;
  }

  .order-actions .btn,
  #toggleRefundBtn {
    display: block !important;
    min-height: 82px;
    border: 0;
    border-radius: 0;
    background: #f0f0f0;
    color: #000000;
    font-size: 22px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px #d0d0d0;
  }

  #toggleRefundBtn {
    display: none !important;
  }

  .product-panel {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "filters results";
    gap: 8px;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #c8c8c8;
    box-shadow: none;
  }

  .product-panel-heading,
  .product-panel .scan-row,
  .product-panel .cart-table,
  #productPanelStockWarning {
    display: none !important;
  }

  .product-filter-row {
    grid-area: filters !important;
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 82px;
    align-content: start;
    gap: 8px;
    min-height: 0;
    overflow: hidden;
  }

  .product-filter-btn {
    min-height: 82px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #f2f2f2;
    color: #000000;
    font-size: 21px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px #d6d6d6;
  }

  .product-filter-btn.active {
    background: #2998e5;
    color: #ffffff;
  }

  .product-card-grid {
    grid-area: results !important;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(168px, 1fr);
    align-content: start;
    gap: 8px;
    min-height: 0;
    max-height: none;
    overflow: auto;
    padding: 0;
  }

  .product-card-grid .empty {
    grid-column: 1 / -1;
    min-height: 180px;
    border: 0;
    border-radius: 0;
    background: #eeeeee;
    color: #000000;
  }

  .product-card-grid .result-item {
    position: relative;
    display: grid;
    grid-template-rows: 62px minmax(0, 1fr) auto;
    height: auto;
    min-height: 168px;
    padding: 12px;
    border: 0;
    border-radius: 0;
    background: #f7f7f7;
    color: #000000;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px #d6d6d6;
    overflow: hidden;
  }

  .product-card-grid .result-item::before {
    display: block !important;
    width: 68px;
    height: 42px;
    background:
      repeating-linear-gradient(
        90deg,
        #b8b8b8 0 4px,
        transparent 4px 8px,
        #b8b8b8 8px 11px,
        transparent 11px 15px
      );
    content: "";
  }

  .product-card-grid .result-item:hover,
  .product-card-grid .result-item:focus-visible {
    outline: 4px solid #2998e5;
    outline-offset: -4px;
    background: #ffffff;
  }

  .product-card-grid .result-item > div {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
  }

  .product-card-grid .result-item strong:first-child {
    display: -webkit-box;
    color: #000000;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.16;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .product-card-grid .result-item span {
    display: none;
  }

  .product-card-grid .result-item > .result-price {
    position: absolute;
    top: 20px;
    left: 94px;
    color: #ff3c3c;
    font-size: 19px;
    font-weight: 500;
    text-align: left;
  }

  .checkout-panel {
    grid-area: checkout;
    display: block;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #c8c8c8;
    box-shadow: none;
  }

  .checkout-panel > :not(.classic-function-pad) {
    display: none !important;
  }

  .classic-function-pad {
    display: grid !important;
    width: 100%;
    height: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 6px;
  }

  .classic-key {
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: #f2f2f2;
    color: #000000;
    font-size: 21px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px #d6d6d6;
  }

  .classic-key-blue {
    background: #2998e5;
    color: #ffffff;
  }

  .classic-key-arrow {
    background: #9d9d9d;
    color: #ffffff;
    font-size: 40px;
  }
}

/* v1.0.123 classic register polish: stop overlap and keep totals visible */
@media (min-width: 1051px) {
  .order-panel {
    grid-template-rows: auto minmax(180px, 1fr) auto auto 82px;
    grid-template-areas:
      "orderHead"
      "orderCart"
      "orderWarn"
      "orderTotals"
      "orderActions";
  }

  .order-heading {
    grid-area: orderHead;
  }

  .order-panel .cart-table {
    grid-area: orderCart;
  }

  #stockWarning {
    grid-area: orderWarn;
    max-height: 78px;
    margin: 0;
    overflow: hidden;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 17px;
    line-height: 1.2;
  }

  .order-total-stack {
    grid-area: orderTotals;
    gap: 6px;
    padding: 10px 12px 18px;
    overflow: hidden;
  }

  .order-actions {
    grid-area: orderActions;
  }

  .order-panel::after {
    bottom: 82px;
    z-index: 1;
    height: 16px;
  }

  .order-panel .cashier-cart-table th:first-child {
    width: 47%;
  }

  .order-panel .cashier-cart-table th:nth-child(2) {
    width: 25%;
  }

  .order-panel .cashier-cart-table th:nth-child(4),
  .order-panel .cashier-cart-table td:nth-child(4) {
    width: 21%;
    text-align: right;
    white-space: nowrap;
  }

  .order-panel .cashier-cart-table th:last-child,
  .order-panel .cashier-cart-table td:last-child {
    width: 44px;
  }

  .order-panel .cashier-cart-table td {
    padding: 8px 8px;
    font-size: 16px;
  }

  .order-panel .cart-name strong {
    font-size: 17px;
    line-height: 1.12;
  }

  .order-panel .cart-name span {
    font-size: 12px;
  }

  .order-panel .cart-qty {
    grid-template-columns: 34px minmax(38px, 46px) 34px;
    gap: 4px;
  }

  .order-panel .cart-qty .btn,
  .order-panel .cart-qty input,
  .order-panel .remove-btn {
    min-height: 34px;
    font-size: 16px;
  }

  .order-total-stack .total-line span,
  .order-total-stack .total-line strong,
  .order-total-stack .total-line:last-of-type span,
  .order-total-stack .total-line:last-of-type strong {
    color: #000000;
    font-size: 22px;
    line-height: 1.15;
  }

  #taxLine span,
  #taxLine strong {
    color: #c71919 !important;
  }

  .discount-row .segment,
  #discountInput {
    min-height: 46px;
    font-size: 18px;
  }

  .product-card-grid .result-item {
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 12px 12px 14px;
  }

  .product-card-grid .result-item::before {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 58px;
    height: 36px;
  }

  .product-card-grid .result-item > div {
    margin-top: 58px;
    padding-right: 2px;
  }

  .product-card-grid .result-item strong:first-child {
    display: -webkit-box;
    font-size: 20px;
    line-height: 1.15;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .product-card-grid .result-item > .result-price {
    top: 17px;
    right: 14px;
    left: auto;
    max-width: calc(100% - 92px);
    color: #ff3434;
    font-size: 18px;
    line-height: 1.05;
    text-align: right;
    white-space: nowrap;
  }
}

/* v1.0.124 classic register fixes: cart rows and product tiles must never collide. */
@media (min-width: 1051px) {
  .order-panel .cart-table {
    padding: 0;
    overflow-x: hidden;
  }

  .order-panel .cashier-cart-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .order-panel .cashier-cart-table thead,
  .order-panel .cashier-cart-table tbody {
    display: block;
    width: 100%;
  }

  .order-panel .cashier-cart-table thead tr,
  .order-panel .cashier-cart-table tbody tr {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 112px 122px 38px;
    gap: 8px;
    align-items: center;
  }

  .order-panel .cashier-cart-table thead tr {
    min-height: 40px;
    padding: 0 10px;
    border-bottom: 1px solid #dce2e5;
  }

  .order-panel .cashier-cart-table tbody tr {
    min-height: 84px;
    padding: 10px;
    border-bottom: 1px solid #e8ecef;
    background: transparent;
  }

  .order-panel .cashier-cart-table th,
  .order-panel .cashier-cart-table td {
    display: block;
    width: auto !important;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .order-panel .cashier-cart-table th:nth-child(3),
  .order-panel .cashier-cart-table td:nth-child(3) {
    display: none !important;
  }

  .order-panel .cashier-cart-table th:nth-child(4),
  .order-panel .cashier-cart-table td:nth-child(4) {
    text-align: right;
  }

  .order-panel .cashier-cart-table td:nth-child(4) {
    justify-self: end;
    align-self: center;
    color: #000000;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
  }

  .order-panel .cashier-cart-table th:last-child,
  .order-panel .cashier-cart-table td:last-child {
    justify-self: end;
  }

  .order-panel .cart-name {
    display: grid;
    gap: 6px;
    min-width: 0;
  }

  .order-panel .cart-name strong {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    color: #000000;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.08;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .order-panel .cart-name span:not(.cart-line-number) {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: #47515a;
    font-size: 12px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .order-panel .cart-line-number {
    display: inline-grid;
    width: 34px;
    height: 28px;
    margin-right: 10px;
    place-items: center;
    border-radius: 8px;
    background: #fac92e;
    color: #0a2732;
    font-size: 14px;
    font-weight: 900;
    vertical-align: top;
  }

  .order-panel .cart-qty {
    display: grid;
    width: 112px;
    grid-template-columns: 30px 38px 30px;
    gap: 7px;
    justify-content: center;
  }

  .order-panel .cart-qty .btn,
  .order-panel .cart-qty input {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 0;
    border-radius: 0;
    font-size: 16px;
    font-weight: 900;
    text-align: center;
  }

  .order-panel .remove-btn {
    width: 36px;
    min-width: 0;
    min-height: 34px;
    padding: 0;
    border-radius: 0;
    font-size: 16px;
  }

  .order-total-stack {
    padding: 10px 16px 16px;
  }

  .order-total-stack .total-line span,
  .order-total-stack .total-line strong,
  .order-total-stack .total-line:last-of-type span,
  .order-total-stack .total-line:last-of-type strong {
    font-size: 21px;
  }

  .discount-row .segment,
  #discountInput {
    min-height: 42px;
  }

  .product-card-grid {
    grid-auto-rows: minmax(164px, 1fr);
  }

  .product-card-grid .result-item {
    min-height: 164px;
    padding: 12px 14px;
  }

  .product-card-grid .result-item::before {
    top: 14px;
    left: 14px;
    width: 54px;
    height: 34px;
  }

  .product-card-grid .result-item > div {
    margin-top: 72px;
  }

  .product-card-grid .result-item strong:first-child {
    font-size: 19px;
    line-height: 1.14;
    -webkit-line-clamp: 3;
  }

  .product-card-grid .result-item > .result-price {
    top: 18px;
    right: 14px;
    max-width: calc(100% - 86px);
    font-size: 17px;
  }
}

/* v1.0.125 classic register cleanup: clean bottom command bar. */
@media (min-width: 1051px) {
  .order-panel::after {
    display: none !important;
    content: none;
  }

  .order-actions {
    align-self: stretch;
    margin: 0;
    padding: 8px 0 0;
    border-top: 2px solid #c8c8c8;
    background: #d9d9d9;
    gap: 6px;
  }

  .order-actions .btn,
  #toggleRefundBtn {
    min-height: 78px;
    border: 1px solid #c8c8c8;
    border-radius: 0;
    background: #f4f4f4;
    color: #000000;
    font-size: 21px;
    font-weight: 900;
    box-shadow: none;
  }

  .order-actions .btn:disabled {
    background: #eeeeee;
    color: #707070;
    opacity: 1;
  }

  .order-actions .btn:hover:not(:disabled),
  .order-actions .btn:focus-visible {
    background: #ffffff;
  }

  .held-count {
    min-width: 28px;
    height: 28px;
    margin-left: 8px;
    border-radius: 999px;
    background: #e8f6f1;
    color: #0f7668;
    font-size: 14px;
    font-weight: 900;
  }
}

/* v1.0.126 classic register color pass: warmer BZTill palette, less harsh gray/blue. */
@media (min-width: 1051px) {
  body {
    background: #dfe9e6;
  }

  .cashier-shell {
    background: #dfe9e6;
  }

  .cashier-grid {
    background: #d4ddda;
  }

  .order-panel {
    background: #fbfdfc;
    color: #061922;
  }

  .order-heading::after {
    border-bottom-color: #8ea29d;
  }

  .order-panel .cart-table,
  .order-panel .cashier-cart-table tbody tr,
  .order-total-stack {
    background: #fbfdfc;
  }

  .order-panel .cashier-cart-table thead tr,
  .order-panel .cashier-cart-table tbody tr,
  .order-total-stack {
    border-color: #d7e1de;
  }

  .order-panel .cart-line-number {
    background: #f4c430;
    color: #062c27;
  }

  .order-panel .cart-row-recent {
    background: #fff8dc !important;
  }

  .order-panel .remove-btn {
    border-color: #f1b8b2;
    background: #fff4f2;
    color: #a91b13;
  }

  #stockWarning {
    border-color: #f1b8b2;
    background: #fff4f2;
    color: #a91b13;
  }

  .order-total-stack .total-line span,
  .order-total-stack .total-line strong,
  .order-total-stack .total-line:last-of-type span,
  .order-total-stack .total-line:last-of-type strong {
    color: #061922;
  }

  #taxLine span,
  #taxLine strong {
    color: #b42318 !important;
  }

  .discount-row .segment,
  #discountInput {
    border-color: #c9d8d4;
    background: #ffffff;
  }

  .order-actions {
    border-top-color: #bfd0cb;
    background: #dfe8e5;
  }

  .order-actions .btn,
  #toggleRefundBtn {
    border-color: #c6d3d0;
    background: #f7faf9;
    color: #061922;
  }

  .order-actions .btn:hover:not(:disabled),
  .order-actions .btn:focus-visible {
    background: #ffffff;
    outline: 3px solid rgba(15, 118, 104, 0.18);
    outline-offset: -3px;
  }

  .order-actions .btn:disabled {
    background: #eef3f1;
    color: #70827d;
  }

  .product-panel,
  .checkout-panel {
    background: #d3ddda;
  }

  .classic-top-actions .btn {
    border-color: #c6d3d0;
    background: #f8fbfa;
    color: #061922;
  }

  .classic-top-actions .btn.primary,
  .classic-key-blue,
  .product-filter-btn.active {
    border-color: #0f7668;
    background: #0f7668;
    color: #ffffff;
  }

  .classic-top-actions .btn:hover:not(:disabled),
  .classic-key:hover,
  .product-filter-btn:hover {
    background: #ffffff;
  }

  .classic-top-actions .btn.primary:hover,
  .classic-key-blue:hover,
  .product-filter-btn.active:hover {
    background: #0b665a;
    color: #ffffff;
  }

  .product-filter-btn,
  .classic-key {
    border: 1px solid #c6d3d0;
    background: #f7faf9;
    color: #061922;
    box-shadow: none;
  }

  .classic-key-arrow {
    background: #8b9995;
    color: #ffffff;
  }

  .classic-key-arrow:hover {
    background: #748480;
  }

  .product-card-grid .result-item {
    background: #fbfdfc;
    box-shadow: inset 0 0 0 1px #c8d5d2;
  }

  .product-card-grid .result-item:hover,
  .product-card-grid .result-item:focus-visible {
    outline-color: #0f7668;
    background: #ffffff;
  }

  .product-card-grid .result-item::before {
    background:
      repeating-linear-gradient(
        90deg,
        #a9bbb6 0 4px,
        transparent 4px 8px,
        #a9bbb6 8px 11px,
        transparent 11px 15px
      );
  }

  .product-card-grid .result-item strong:first-child {
    color: #061922;
  }

  .product-card-grid .result-item > .result-price {
    color: #b42318;
  }

  .held-count {
    background: #e7f6f2;
    color: #0f7668;
  }
}

/* v1.0.127 classic register stronger color contrast: visible BZTill till palette. */
@media (min-width: 1051px) {
  body,
  .cashier-shell {
    background: #e8f3ef !important;
  }

  .cashier-grid.touch-register-layout {
    background: #bfcfca !important;
  }

  .order-panel {
    background: #fbfdf9 !important;
    border-right: 4px solid #aebfba;
  }

  .product-panel,
  .checkout-panel {
    background: #c9d8d4 !important;
  }

  .classic-top-actions {
    background: #bfcfca !important;
    gap: 8px !important;
  }

  .classic-nav-btn {
    border: 2px solid #aebfba !important;
    background: #fffefa !important;
    color: #001a17 !important;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.06);
  }

  .classic-nav-btn:hover,
  .classic-nav-btn:focus-visible {
    border-color: #0b665a !important;
    background: #ffffff !important;
  }

  #classicPayBtn {
    border-color: #0a675d !important;
    background: #0a675d !important;
    color: #ffffff !important;
  }

  #classicPayBtn:hover,
  #classicPayBtn:focus-visible {
    background: #075348 !important;
  }

  #classicOnlineOrdersBtn {
    border-color: #e0aa36 !important;
    background: #fff0bf !important;
    color: #6d4100 !important;
  }

  #classicBackBtn {
    border-color: #91a39e !important;
    background: #f2f6f4 !important;
  }

  .order-panel .cashier-cart-table thead tr {
    background: #eaf3ef !important;
    border-color: #b5c8c2 !important;
  }

  .order-panel .cashier-cart-table tbody tr {
    background: #fffdf7 !important;
  }

  .order-panel .cart-row-recent {
    background: #fff3cd !important;
  }

  .order-heading::after {
    border-bottom-color: #899c97 !important;
  }

  .order-panel .cart-line-number {
    background: #f3c431 !important;
    color: #073e36 !important;
  }

  .order-total-stack {
    background: #fbfdf9 !important;
    border-color: #d8e3df !important;
  }

  .order-total-stack .total-line strong {
    color: #000000 !important;
  }

  #taxLine span,
  #taxLine strong {
    color: #c1121f !important;
  }

  .discount-row .segment {
    background: #eef5f2 !important;
    border-color: #bed0ca !important;
    color: #08251f !important;
  }

  .discount-row .segment.active {
    background: #0a675d !important;
    border-color: #0a675d !important;
    color: #ffffff !important;
  }

  #discountInput {
    background: #fffefa !important;
    border-color: #bed0ca !important;
  }

  .order-actions {
    background: #bfcfca !important;
    border-top: 4px solid #aabdb7 !important;
  }

  .order-actions .btn {
    background: #fffefa !important;
    border-color: #aebfba !important;
    color: #001a17 !important;
  }

  .order-actions .btn:hover:not(:disabled),
  .order-actions .btn:focus-visible {
    border-color: #0a675d !important;
    background: #ffffff !important;
  }

  .order-actions #toggleHeldOrdersBtn {
    background: #f2fbf7 !important;
    color: #001a17 !important;
  }

  #toggleRefundBtn {
    border-color: #e0aa36 !important;
    background: #fff0bf !important;
    color: #6d4100 !important;
  }

  .product-filter-row {
    gap: 8px !important;
  }

  .product-filter-btn {
    border: 2px solid #aebfba !important;
    background: #fffefa !important;
    color: #001a17 !important;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.05);
  }

  .product-filter-btn.active {
    border-color: #0a675d !important;
    background: #0a675d !important;
    color: #ffffff !important;
    box-shadow: inset 8px 0 0 #f3c431;
  }

  .product-filter-btn:hover,
  .product-filter-btn:focus-visible {
    border-color: #0a675d !important;
  }

  .product-card-grid .result-item {
    background: #fffefa !important;
    border: 2px solid #b3c3be !important;
    box-shadow: inset 0 5px 0 #f3c431 !important;
  }

  .product-card-grid .result-item:hover,
  .product-card-grid .result-item:focus-visible,
  .product-card-grid .result-item.selected {
    background: #fff7d6 !important;
    border-color: #269688 !important;
    outline: 3px solid #269688 !important;
    outline-offset: -3px;
  }

  .product-card-grid .result-item strong:first-child {
    color: #001a17 !important;
  }

  .product-card-grid .result-item > .result-price {
    color: #ff2f2f !important;
  }

  .classic-function-pad {
    background: #bfcfca !important;
    gap: 8px !important;
  }

  .classic-key {
    border: 2px solid #aebfba !important;
    background: #fffefa !important;
    color: #001a17 !important;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.06);
  }

  .classic-key:hover,
  .classic-key:focus-visible {
    border-color: #0a675d !important;
    background: #ffffff !important;
  }

  .classic-key-blue {
    border-color: #0a675d !important;
    background: #0a675d !important;
    color: #ffffff !important;
  }

  .classic-key-blue:hover,
  .classic-key-blue:focus-visible {
    background: #075348 !important;
    color: #ffffff !important;
  }

  .classic-key-arrow {
    border-color: #64736f !important;
    background: #7f8d89 !important;
    color: #ffffff !important;
  }

  .classic-key-arrow:hover,
  .classic-key-arrow:focus-visible {
    background: #64736f !important;
  }

  .checkout-panel .due-box,
  .checkout-panel .amount-due-box {
    background: #073e36 !important;
    color: #ffffff !important;
  }

  .payment-btn.active,
  #saveSaleBtn,
  #completeSaleBtn {
    background: #0a675d !important;
    border-color: #0a675d !important;
    color: #ffffff !important;
  }
}

/* v1.0.128 classic register: keep amount due visible on the left receipt. */
@media (min-width: 1051px) {
  .order-total-stack {
    gap: 7px !important;
  }

  .order-due-line {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 2px solid #d5dfdb;
  }

  .order-total-stack .order-due-line span,
  .order-total-stack .order-due-line strong {
    color: #c1121f !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    line-height: 1.05;
  }

  .order-total-stack .order-due-line strong {
    text-align: right;
    white-space: nowrap;
  }
}

/* v1.0.129 classic register: wider screen use, no cart/price collisions. */
@media (min-width: 1051px) {
  .touch-register-layout {
    width: calc(100vw - 20px) !important;
    max-width: none !important;
    grid-template-columns: minmax(540px, 37vw) minmax(720px, 1fr) !important;
  }

  .order-panel::after {
    display: none !important;
    content: none !important;
  }

  .order-panel {
    padding-right: 22px !important;
    padding-left: 22px !important;
  }

  .order-panel .cashier-cart-table thead tr,
  .order-panel .cashier-cart-table tbody tr {
    grid-template-columns: minmax(0, 1fr) 138px 142px 44px !important;
    column-gap: 12px !important;
  }

  .order-panel .cashier-cart-table tbody tr {
    min-height: 92px !important;
    padding: 10px 12px !important;
  }

  .order-panel .cashier-cart-table th:nth-child(3),
  .order-panel .cashier-cart-table td:nth-child(3) {
    display: none !important;
  }

  .order-panel .cashier-cart-table th:nth-child(4),
  .order-panel .cashier-cart-table td:nth-child(4) {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    justify-self: stretch !important;
    overflow: hidden !important;
    text-align: right !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .order-panel .cashier-cart-table td:nth-child(4) {
    font-size: 19px !important;
    line-height: 1 !important;
  }

  .order-panel .cashier-cart-table th:last-child,
  .order-panel .cashier-cart-table td:last-child {
    width: auto !important;
    justify-self: end !important;
  }

  .order-panel .cart-name strong {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    max-width: 100%;
  }

  .order-panel .cart-product-name {
    display: -webkit-box !important;
    min-width: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow-wrap: anywhere;
  }

  .order-panel .cart-line-number {
    width: 42px !important;
    height: 32px !important;
    margin-right: 0 !important;
  }

  .order-panel .cart-qty {
    width: 138px !important;
    grid-template-columns: 38px 48px 38px !important;
    gap: 7px !important;
    justify-content: center !important;
  }

  .order-panel .cart-qty .btn,
  .order-panel .cart-qty input {
    min-height: 38px !important;
    font-size: 18px !important;
  }

  .order-panel .remove-btn {
    width: 42px !important;
    min-height: 38px !important;
  }

  .product-card-grid {
    grid-template-columns: repeat(3, minmax(230px, 1fr)) !important;
    grid-auto-rows: 184px !important;
    gap: 10px !important;
  }

  .product-card-grid .result-item {
    height: 184px !important;
    min-height: 184px !important;
    padding: 12px 14px !important;
    border-width: 3px !important;
    overflow: hidden !important;
  }

  .product-card-grid .result-item::before {
    top: 14px !important;
    left: 14px !important;
    width: 70px !important;
    height: 48px !important;
  }

  .product-card-grid .result-item > div {
    margin-top: 68px !important;
    padding-right: 0 !important;
  }

  .product-card-grid .result-item strong:first-child {
    display: -webkit-box !important;
    max-height: 68px;
    overflow: hidden !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.12 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2 !important;
    overflow-wrap: anywhere;
  }

  .product-card-grid .result-item > .result-price {
    top: 16px !important;
    right: 16px !important;
    left: auto !important;
    max-width: calc(100% - 112px) !important;
    overflow: hidden !important;
    color: #d71920 !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-align: right !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .classic-function-pad {
    gap: 10px !important;
  }

  .classic-key,
  .classic-nav-btn,
  .order-actions .btn {
    border-width: 3px !important;
  }
}

/* v1.0.130 classic register: fit common shop screens with browser/taskbar visible. */
@media (min-width: 1051px) and (max-height: 900px) {
  .cashier-shell {
    min-height: 100vh !important;
    padding: 6px !important;
  }

  .touch-register-layout {
    width: calc(100vw - 12px) !important;
    height: calc(100vh - 12px) !important;
    grid-template-columns: minmax(500px, 36vw) minmax(680px, 1fr) !important;
    grid-template-rows: 64px minmax(0, 1fr) 142px !important;
    gap: 6px !important;
  }

  .classic-nav-btn {
    min-height: 64px !important;
    font-size: 22px !important;
  }

  .order-panel {
    grid-template-rows: auto minmax(110px, 1fr) auto auto 70px !important;
    gap: 8px !important;
    padding: 14px 18px !important;
  }

  .order-heading {
    gap: 5px !important;
    padding-bottom: 8px !important;
  }

  .order-heading h2 {
    font-size: 24px !important;
  }

  #cartCountText {
    font-size: 17px !important;
  }

  .order-panel .cashier-cart-table thead tr {
    min-height: 36px !important;
  }

  .order-panel .cashier-cart-table tbody tr {
    min-height: 80px !important;
    padding: 8px 10px !important;
  }

  .order-panel .cashier-cart-table thead tr,
  .order-panel .cashier-cart-table tbody tr {
    grid-template-columns: minmax(0, 1fr) 126px 126px 40px !important;
    column-gap: 9px !important;
  }

  .order-panel .cart-name strong {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
  }

  .order-panel .cart-product-name {
    -webkit-line-clamp: 2;
  }

  .order-panel .cart-line-number {
    width: 36px !important;
    height: 30px !important;
  }

  .order-panel .cart-qty {
    width: 126px !important;
    grid-template-columns: 34px 44px 34px !important;
    gap: 6px !important;
  }

  .order-panel .cart-qty .btn,
  .order-panel .cart-qty input,
  .order-panel .remove-btn {
    min-height: 34px !important;
    font-size: 17px !important;
  }

  .order-panel .cashier-cart-table td:nth-child(4) {
    font-size: 18px !important;
  }

  #stockWarning {
    max-height: 56px !important;
    padding: 8px 10px !important;
    font-size: 15px !important;
  }

  .order-total-stack {
    gap: 4px !important;
    padding: 8px 12px 10px !important;
  }

  .order-total-stack .total-line {
    min-height: 24px !important;
  }

  .order-total-stack .total-line span,
  .order-total-stack .total-line strong {
    font-size: 19px !important;
  }

  .order-total-stack .order-due-line span,
  .order-total-stack .order-due-line strong {
    font-size: 24px !important;
  }

  .discount-row .segment,
  #discountInput {
    min-height: 38px !important;
    font-size: 17px !important;
  }

  .order-actions {
    margin: 0 -18px -14px !important;
  }

  .order-actions .btn {
    min-height: 70px !important;
    font-size: 22px !important;
  }

  .product-panel {
    grid-template-columns: 132px minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) 68px !important;
    gap: 6px !important;
  }

  .product-filter-btn {
    min-height: 66px !important;
    font-size: 21px !important;
  }

  .product-card-grid {
    grid-template-columns: repeat(3, minmax(210px, 1fr)) !important;
    grid-auto-rows: 156px !important;
    gap: 8px !important;
  }

  .product-card-grid .result-item {
    height: 156px !important;
    min-height: 156px !important;
    padding: 10px 12px !important;
  }

  .product-card-grid .result-item::before {
    top: 12px !important;
    left: 12px !important;
    width: 62px !important;
    height: 40px !important;
  }

  .product-card-grid .result-item > div {
    margin-top: 56px !important;
  }

  .product-card-grid .result-item strong:first-child {
    font-size: 21px !important;
    line-height: 1.1 !important;
  }

  .product-card-grid .result-item > .result-price {
    top: 13px !important;
    right: 13px !important;
    max-width: calc(100% - 96px) !important;
    font-size: 20px !important;
  }

  .product-panel .scan-row {
    grid-template-columns: 160px minmax(0, 1fr) !important;
  }

  .product-panel .scan-row input,
  .product-panel .scan-row .btn {
    min-height: 62px !important;
    font-size: 22px !important;
  }

  .classic-function-pad {
    gap: 6px !important;
  }

  .classic-key {
    min-height: 64px !important;
    font-size: 22px !important;
  }
}

/* v1.0.131 scanner focus guard: keep the classic UI simple, but leave a real input for barcode scanners. */
@media (min-width: 1051px) {
  .product-panel {
    position: relative;
  }

  .product-panel .scan-row {
    position: absolute !important;
    top: 0 !important;
    left: -10000px !important;
    display: block !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .product-panel .scan-row::before {
    display: none !important;
    content: none !important;
  }

  .product-panel #productSearch {
    display: block !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
  }

  .product-panel #searchBtn {
    display: none !important;
  }
}

/* v1.0.134 classic register hardening: stop row/button/price collisions. */
@media (min-width: 1051px) {
  .order-panel,
  .product-panel,
  .checkout-panel,
  .classic-top-actions,
  .classic-function-pad {
    box-sizing: border-box;
  }

  .order-panel .cashier-cart-table thead tr,
  .order-panel .cashier-cart-table tbody tr {
    grid-template-columns: minmax(230px, 1fr) 136px 136px 44px !important;
    column-gap: 12px !important;
  }

  .order-panel .cashier-cart-table td:nth-child(2),
  .order-panel .cashier-cart-table td:nth-child(4),
  .order-panel .cashier-cart-table td:last-child {
    overflow: hidden !important;
  }

  .order-panel .cashier-cart-table th:nth-child(4),
  .order-panel .cashier-cart-table td:nth-child(4) {
    justify-self: end !important;
    width: 136px !important;
    max-width: 136px !important;
    padding-left: 8px !important;
    text-align: right !important;
  }

  .order-panel .cart-name strong {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .order-panel .cart-product-name {
    max-width: 100% !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
    text-overflow: ellipsis !important;
  }

  .order-panel .cart-name span:not(.cart-line-number) {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .order-panel .cart-qty {
    justify-self: center !important;
    width: 136px !important;
    max-width: 136px !important;
    grid-template-columns: 38px 48px 38px !important;
    gap: 6px !important;
  }

  .order-panel .cart-qty .btn,
  .order-panel .cart-qty input,
  .order-panel .remove-btn {
    box-sizing: border-box !important;
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
  }

  .order-panel .remove-btn {
    width: 42px !important;
    max-width: 42px !important;
  }

  .product-card-grid .result-item {
    grid-template-rows: 56px minmax(0, 1fr) !important;
    padding: 12px 14px !important;
  }

  .product-card-grid .result-item::before {
    top: 14px !important;
    left: 14px !important;
    width: 64px !important;
    height: 40px !important;
  }

  .product-card-grid .result-item > .result-price {
    top: 16px !important;
    right: 14px !important;
    left: auto !important;
    max-width: calc(100% - 96px) !important;
    overflow: hidden !important;
    font-size: 20px !important;
    line-height: 1 !important;
    text-align: right !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .product-card-grid .result-item > div {
    margin-top: 58px !important;
    padding-right: 0 !important;
  }

  .product-card-grid .result-item strong:first-child {
    max-height: 58px !important;
    overflow: hidden !important;
    font-size: 22px !important;
    line-height: 1.1 !important;
    -webkit-line-clamp: 2 !important;
  }
}

@media (min-width: 1051px) and (max-height: 900px) {
  .order-panel .cashier-cart-table thead tr,
  .order-panel .cashier-cart-table tbody tr {
    grid-template-columns: minmax(210px, 1fr) 126px 126px 40px !important;
    column-gap: 9px !important;
  }

  .order-panel .cashier-cart-table th:nth-child(4),
  .order-panel .cashier-cart-table td:nth-child(4) {
    width: 126px !important;
    max-width: 126px !important;
  }

  .order-panel .cart-qty {
    width: 126px !important;
    max-width: 126px !important;
    grid-template-columns: 34px 44px 34px !important;
    gap: 6px !important;
  }

  .product-card-grid .result-item {
    padding: 10px 12px !important;
  }

  .product-card-grid .result-item::before {
    top: 12px !important;
    left: 12px !important;
    width: 58px !important;
    height: 36px !important;
  }

  .product-card-grid .result-item > .result-price {
    top: 13px !important;
    right: 12px !important;
    max-width: calc(100% - 86px) !important;
    font-size: 18px !important;
  }

  .product-card-grid .result-item > div {
    margin-top: 50px !important;
  }

  .product-card-grid .result-item strong:first-child {
    font-size: 20px !important;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  #printReceipt,
  #printReceipt * {
    visibility: visible;
  }

  #printReceipt {
    position: fixed;
    inset: 0 auto auto 0;
    width: 72mm;
    padding: 0;
    background: #fff;
    color: #000;
  }
}

.practice-banner {
  max-width: 1600px;
  margin: 0 auto 18px;
  padding: 12px 16px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fff7ed;
  color: #92400e;
  font-weight: 700;
}

.practice-toggle.active,
.classic-practice-btn.active {
  border-color: #f59e0b !important;
  background: #fff7ed !important;
  color: #92400e !important;
}

body.practice-mode .cashier-shell {
  outline: 4px solid rgba(245, 158, 11, 0.28);
  outline-offset: -4px;
}

@media (min-width: 1051px) {
  .classic-top-actions {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  #practiceModeBanner:not([hidden]) {
    position: fixed;
    z-index: 72;
    right: 16px;
    bottom: 16px;
    width: min(460px, calc(100vw - 32px));
    max-width: none;
    margin: 0;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.16);
  }
}

/* v1.0.156 classic register fit guard: never let cart totals or product prices clip on shop screens. */
@media (min-width: 1051px) {
  body:has(#appScreen:not([hidden])),
  .cashier-shell,
  .cashier-grid.touch-register-layout {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .cashier-grid.touch-register-layout,
  .touch-register-layout .order-panel,
  .touch-register-layout .product-panel,
  .touch-register-layout .checkout-panel,
  .classic-top-actions,
  .classic-function-pad,
  .product-card-grid,
  .product-card-grid .result-item,
  .order-panel .cart-table,
  .order-panel .cashier-cart-table,
  .order-panel .cashier-cart-table thead,
  .order-panel .cashier-cart-table tbody,
  .order-panel .cashier-cart-table tr,
  .order-panel .cashier-cart-table th,
  .order-panel .cashier-cart-table td {
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .touch-register-layout {
    width: calc(100vw - 12px) !important;
    grid-template-columns: minmax(450px, 35vw) minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  .order-panel {
    padding-right: 12px !important;
    padding-left: 12px !important;
  }

  .order-panel .cashier-cart-table thead tr,
  .order-panel .cashier-cart-table tbody tr {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 108px) minmax(96px, 112px) 34px !important;
    column-gap: 6px !important;
  }

  .order-panel .cashier-cart-table tbody tr {
    padding-right: 6px !important;
    padding-left: 6px !important;
  }

  .order-panel .cart-name,
  .order-panel .cart-name strong,
  .order-panel .cart-product-name {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .order-panel .cart-name strong {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  .order-panel .cart-line-number {
    width: 32px !important;
    height: 28px !important;
    margin-right: 0 !important;
  }

  .order-panel .cart-qty {
    width: 108px !important;
    max-width: 108px !important;
    grid-template-columns: 30px 38px 30px !important;
    gap: 5px !important;
    justify-self: center !important;
  }

  .order-panel .cart-qty .btn,
  .order-panel .cart-qty input,
  .order-panel .remove-btn {
    min-width: 0 !important;
    padding: 0 !important;
  }

  .order-panel .remove-btn {
    width: 34px !important;
    max-width: 34px !important;
  }

  .order-panel .cashier-cart-table th:nth-child(4),
  .order-panel .cashier-cart-table td:nth-child(4) {
    width: auto !important;
    max-width: none !important;
    justify-self: stretch !important;
    overflow: hidden !important;
    padding-left: 2px !important;
    text-align: right !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .order-panel .cashier-cart-table td:nth-child(4) {
    font-size: clamp(15px, 1.22vw, 18px) !important;
  }

  .product-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .product-card-grid .result-item {
    padding-right: 12px !important;
    padding-left: 12px !important;
  }

  .product-card-grid .result-item > .result-price {
    right: 12px !important;
    left: auto !important;
    max-width: calc(100% - 84px) !important;
    overflow: visible !important;
    font-size: clamp(16px, 1.25vw, 20px) !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  .product-card-grid .result-item > div {
    min-width: 0 !important;
  }

  .product-card-grid .result-item strong:first-child {
    overflow-wrap: anywhere !important;
  }
}

@media (min-width: 1051px) and (max-width: 1320px) {
  .touch-register-layout {
    grid-template-columns: minmax(420px, 34vw) minmax(0, 1fr) !important;
  }

  .order-panel {
    padding-right: 10px !important;
    padding-left: 10px !important;
  }

  .order-panel .cashier-cart-table thead tr,
  .order-panel .cashier-cart-table tbody tr {
    grid-template-columns: minmax(0, 1fr) 98px 100px 32px !important;
    column-gap: 5px !important;
  }

  .order-panel .cart-name strong {
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  .order-panel .cart-line-number {
    width: 28px !important;
  }

  .order-panel .cart-qty {
    width: 98px !important;
    max-width: 98px !important;
    grid-template-columns: 28px 34px 28px !important;
    gap: 4px !important;
  }

  .order-panel .cashier-cart-table td:nth-child(4) {
    font-size: 15px !important;
  }

  .product-card-grid .result-item > .result-price {
    max-width: calc(100% - 76px) !important;
    font-size: 16px !important;
  }
}

/* v1.0.157 classic product tiles: keep full price visible even on the right edge. */
@media (min-width: 1051px) {
  .product-card-grid {
    padding-right: 8px !important;
    scrollbar-gutter: stable !important;
  }

  .product-card-grid .result-item {
    position: relative !important;
    grid-template-rows: minmax(0, 1fr) !important;
    padding: 58px 12px 12px !important;
  }

  .product-card-grid .result-item::before {
    top: 14px !important;
    left: 12px !important;
    width: 54px !important;
    height: 34px !important;
  }

  .product-card-grid .result-item > .result-price {
    position: absolute !important;
    top: 16px !important;
    right: 12px !important;
    left: 72px !important;
    display: block !important;
    width: auto !important;
    max-width: none !important;
    overflow: hidden !important;
    color: #b42318 !important;
    font-size: clamp(15px, 1.05vw, 18px) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: right !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    z-index: 2;
  }

  .product-card-grid .result-item > div {
    margin-top: 0 !important;
    padding-right: 0 !important;
  }

  .product-card-grid .result-item strong:first-child {
    -webkit-line-clamp: 3 !important;
  }
}

@media (min-width: 1051px) and (max-width: 1320px) {
  .product-card-grid {
    padding-right: 10px !important;
  }

  .product-card-grid .result-item {
    padding-top: 56px !important;
  }

  .product-card-grid .result-item::before {
    width: 50px !important;
  }

  .product-card-grid .result-item > .result-price {
    left: 66px !important;
    font-size: 15px !important;
  }
}

/* v1.0.158 classic product tiles: fixed price/name zones so cards never crop the label. */
@media (min-width: 1051px) {
  .product-card-grid {
    grid-auto-rows: 152px !important;
    align-content: start !important;
    overflow-y: auto !important;
  }

  .product-card-grid .result-item {
    position: relative !important;
    display: block !important;
    height: 152px !important;
    min-height: 152px !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .product-card-grid .result-item > div {
    position: absolute !important;
    top: 58px !important;
    right: 12px !important;
    bottom: 10px !important;
    left: 12px !important;
    display: block !important;
    min-width: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .product-card-grid .result-item strong:first-child {
    display: -webkit-box !important;
    max-height: 84px !important;
    margin: 0 !important;
    overflow: hidden !important;
    font-size: clamp(18px, 1.25vw, 21px) !important;
    line-height: 1.12 !important;
    overflow-wrap: anywhere !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
  }

  .product-card-grid .result-item span {
    display: none !important;
  }
}

@media (min-width: 1051px) and (max-height: 850px) {
  .product-card-grid {
    grid-auto-rows: 138px !important;
  }

  .product-card-grid .result-item {
    height: 138px !important;
    min-height: 138px !important;
  }

  .product-card-grid .result-item > div {
    top: 52px !important;
    bottom: 8px !important;
  }

  .product-card-grid .result-item strong:first-child {
    max-height: 76px !important;
    font-size: clamp(17px, 1.15vw, 20px) !important;
    -webkit-line-clamp: 3 !important;
  }
}

/* v1.0.161 classic cashier: empty-cart actions should look unavailable. */
@media (min-width: 1051px) {
  .classic-nav-btn:disabled,
  .classic-key:disabled,
  #classicPayBtn:disabled,
  .order-actions .btn:disabled {
    background: #e6ebe9 !important;
    color: #7c8c88 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
    outline: 0 !important;
    box-shadow: inset 0 0 0 1px #cbd6d2 !important;
  }

  .classic-nav-btn:disabled:hover,
  .classic-nav-btn:disabled:focus-visible,
  .classic-key:disabled:hover,
  .classic-key:disabled:focus-visible,
  #classicPayBtn:disabled:hover,
  #classicPayBtn:disabled:focus-visible,
  .order-actions .btn:disabled:hover,
  .order-actions .btn:disabled:focus-visible {
    background: #e6ebe9 !important;
    color: #7c8c88 !important;
    border-color: #cbd6d2 !important;
    outline: 0 !important;
  }
}

/* v1.0.162 cashier payment screen: wider, fixed actions, clearer tender flow. */
@media (min-width: 1051px) {
  #classicPaymentModal {
    place-items: center;
    padding: 14px !important;
  }

  .classic-payment-modal-card {
    width: min(1360px, calc(100vw - 28px)) !important;
    min-height: min(760px, calc(100vh - 28px)) !important;
    max-height: calc(100vh - 28px) !important;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto auto auto;
    gap: 12px !important;
    padding: 18px !important;
    overflow: hidden;
    border-radius: 6px !important;
  }

  .classic-payment-header {
    grid-template-columns: minmax(280px, 1fr) 220px 300px !important;
    gap: 12px !important;
    align-items: stretch;
  }

  .classic-payment-header h2 {
    font-size: 38px !important;
    line-height: 1.05;
  }

  .classic-payment-header p {
    margin-top: 6px !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
  }

  .classic-payment-back {
    min-height: 82px !important;
    border: 2px solid #9fb2ad !important;
    border-radius: 4px !important;
    background: #fffefa !important;
    color: #001a17 !important;
    font-size: 28px !important;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.06);
  }

  .classic-payment-due {
    min-height: 82px;
    padding: 14px 20px !important;
    border-radius: 4px !important;
    background: #073e36 !important;
  }

  .classic-payment-due strong {
    font-size: 46px !important;
    letter-spacing: 0 !important;
  }

  .classic-payment-methods {
    gap: 12px !important;
  }

  .classic-payment-methods .payment-btn {
    min-height: 76px !important;
    border-radius: 4px !important;
    font-size: 30px !important;
    font-weight: 900 !important;
  }

  .classic-payment-workspace {
    min-height: 0;
    grid-template-columns: minmax(440px, 0.9fr) minmax(420px, 1.1fr) !important;
    gap: 14px !important;
    overflow: hidden;
  }

  .classic-payment-entry-panel {
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .classic-payment-split {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .classic-payment-paid {
    display: grid !important;
    grid-template-columns: 118px minmax(0, 1fr);
    align-items: center;
    gap: 12px !important;
    padding: 12px 14px !important;
    border-radius: 4px !important;
  }

  .classic-payment-paid span {
    font-size: 22px;
    font-weight: 900;
  }

  .classic-payment-paid input {
    min-height: 68px !important;
    font-size: 34px !important;
  }

  .classic-payment-quick {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-content: start;
    gap: 10px !important;
  }

  .classic-payment-quick .btn {
    min-height: 62px !important;
    border-radius: 4px !important;
    font-size: 21px !important;
  }

  .classic-payment-keypad {
    min-height: 0;
    padding: 14px !important;
    border-radius: 4px !important;
  }

  .classic-payment-keypad-head {
    grid-template-columns: auto 1fr;
    align-items: end;
    column-gap: 16px;
  }

  .classic-payment-keypad-head strong {
    font-size: 26px !important;
  }

  .classic-payment-keypad-head small {
    font-size: 16px !important;
  }

  .classic-payment-pad-grid {
    height: 100%;
    gap: 10px !important;
    grid-auto-rows: minmax(72px, 1fr);
  }

  .classic-payment-pad-grid button {
    min-height: 72px !important;
    border-radius: 4px !important;
    font-size: 34px !important;
  }

  .classic-payment-pad-grid button[data-classic-payment-pad="clear"],
  .classic-payment-pad-grid button[data-classic-payment-pad="back"] {
    font-size: 22px !important;
  }

  .classic-payment-pad-grid button[data-classic-payment-pad="submit"] {
    font-size: 24px !important;
  }

  .classic-payment-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .classic-payment-change {
    padding: 14px 18px !important;
    border-radius: 4px !important;
  }

  .classic-payment-change span {
    font-size: 18px !important;
    font-weight: 800;
  }

  .classic-payment-change strong {
    font-size: 36px !important;
  }

  .classic-payment-status {
    padding: 14px 18px !important;
    border-radius: 4px !important;
    font-size: 22px !important;
  }

  .classic-payment-print,
  .classic-payment-note {
    grid-template-columns: 140px minmax(0, 1fr);
    align-items: center;
    gap: 10px 14px !important;
  }

  .classic-payment-print .field-hint {
    grid-column: 2;
  }

  .classic-payment-print select,
  .classic-payment-note input {
    min-height: 56px !important;
    border-radius: 4px !important;
    font-size: 20px !important;
  }

  .classic-payment-modal-card .modal-actions {
    grid-template-columns: 240px minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  .classic-payment-modal-card .modal-actions .btn {
    min-height: 74px !important;
    border-radius: 4px !important;
    font-size: 28px !important;
  }

  #classicPaymentSubmitBtn {
    background: #0a675d !important;
    border-color: #0a675d !important;
    font-size: 34px !important;
  }
}

@media (min-width: 1051px) and (max-height: 850px) {
  .classic-payment-modal-card {
    min-height: calc(100vh - 24px) !important;
    gap: 9px !important;
    padding: 14px !important;
  }

  .classic-payment-header {
    grid-template-columns: minmax(260px, 1fr) 190px 260px !important;
  }

  .classic-payment-header h2 {
    font-size: 32px !important;
  }

  .classic-payment-header p {
    font-size: 16px !important;
  }

  .classic-payment-back,
  .classic-payment-due {
    min-height: 68px !important;
  }

  .classic-payment-due strong {
    font-size: 38px !important;
  }

  .classic-payment-methods .payment-btn {
    min-height: 62px !important;
    font-size: 26px !important;
  }

  .classic-payment-paid input {
    min-height: 56px !important;
    font-size: 28px !important;
  }

  .classic-payment-quick .btn,
  .classic-payment-pad-grid button {
    min-height: 54px !important;
  }

  .classic-payment-change strong {
    font-size: 30px !important;
  }

  .classic-payment-status {
    font-size: 19px !important;
  }

  .classic-payment-modal-card .modal-actions .btn {
    min-height: 62px !important;
    font-size: 24px !important;
  }
}

/* v1.0.163 cashier theme: navy blue + gold modern palette. */
:root {
  --ink: #071b1a;
  --muted: #52666f;
  --line: #c8d4e2;
  --panel: #ffffff;
  --soft: #eef4fa;
  --brand: #153e75;
  --brand-strong: #0f2f5d;
  --gold: #f4b942;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --warning: #7a4d00;
  --warn-bg: #fff0bf;
  --warn-line: #d59b23;
  --shadow: 0 18px 50px rgba(21, 62, 117, 0.14);
}

body {
  background: linear-gradient(180deg, #f7faff 0%, #e6edf5 100%);
}

input:focus,
select:focus {
  outline-color: rgba(31, 111, 178, 0.2);
  border-color: #1f6fb2;
}

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.sync-pill,
.version-chip,
.store-code-display {
  background: #e8f1fb;
  border-color: #b9cbe0;
  color: #153e75;
}

.update-banner,
.version-update-banner {
  background: var(--warn-bg);
  border-color: var(--warn-line);
  color: var(--warning);
}

@media (min-width: 1051px) {
  body:has(#appScreen:not([hidden])),
  .cashier-shell {
    background: #e6edf5 !important;
  }

  .cashier-grid.touch-register-layout {
    background: #cbd6e2 !important;
  }

  .touch-register-layout .order-panel {
    background: #ffffff !important;
    border-right: 4px solid #b6c5d5 !important;
  }

  .touch-register-layout .product-panel,
  .touch-register-layout .checkout-panel {
    background: #d6e0eb !important;
  }

  .classic-top-actions,
  .classic-function-pad,
  .order-actions {
    background: #cbd6e2 !important;
    gap: 8px !important;
  }

  .classic-nav-btn,
  .classic-key,
  .order-actions .btn {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    background: #ffffff !important;
    border-color: #b6c5d5 !important;
    color: #071b1a !important;
    box-shadow: inset 0 -4px 0 rgba(21, 62, 117, 0.08) !important;
  }

  .classic-nav-btn:hover:not(:disabled),
  .classic-nav-btn:focus-visible:not(:disabled),
  .classic-key:hover:not(:disabled),
  .classic-key:focus-visible:not(:disabled),
  .order-actions .btn:hover:not(:disabled),
  .order-actions .btn:focus-visible:not(:disabled) {
    background: #f8fbff !important;
    border-color: #1f6fb2 !important;
    outline: 3px solid rgba(31, 111, 178, 0.22) !important;
    outline-offset: -3px !important;
  }

  #classicPayBtn:not(:disabled),
  .classic-key-blue:not(:disabled),
  .payment-btn.active,
  #saveSaleBtn,
  #completeSaleBtn,
  #classicPaymentSubmitBtn {
    background: #153e75 !important;
    border-color: #0f2f5d !important;
    color: #ffffff !important;
  }

  #classicPayBtn:hover:not(:disabled),
  #classicPayBtn:focus-visible:not(:disabled),
  .classic-key-blue:hover:not(:disabled),
  .classic-key-blue:focus-visible:not(:disabled),
  #classicPaymentSubmitBtn:hover:not(:disabled),
  #classicPaymentSubmitBtn:focus-visible:not(:disabled) {
    background: #0f2f5d !important;
    border-color: #0b254a !important;
  }

  #classicOnlineOrdersBtn {
    background: #fff0bf !important;
    border-color: #d59b23 !important;
    color: #7a4d00 !important;
    box-shadow: inset 0 -4px 0 rgba(122, 77, 0, 0.08) !important;
  }

  #classicMemberBtn.member-selected {
    background: #eaf5ff !important;
    border-color: #1f6fb2 !important;
    color: #153e75 !important;
    box-shadow: inset 0 -4px 0 rgba(31, 111, 178, 0.12) !important;
  }

  .classic-member-summary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(150px, auto) 116px;
    gap: 10px;
    align-items: center;
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 2px solid #d59b23;
    border-radius: 4px;
    background: #fff7df;
    color: #061922;
  }

  .classic-member-summary[hidden] {
    display: none !important;
  }

  .classic-member-main,
  .classic-member-stats {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  .classic-member-main span,
  .classic-member-stats small {
    color: #526675;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.15;
  }

  .classic-member-main strong {
    overflow: hidden;
    color: #071b1a;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .classic-member-main small {
    overflow: hidden;
    color: #526675;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .classic-member-stats b {
    color: #153e75;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
  }

  #classicClearMemberBtn {
    height: 54px;
    min-width: 0;
    border: 2px solid #b6c5d5;
    border-radius: 4px;
    background: #ffffff;
    color: #071b1a;
    font-size: 18px;
    font-weight: 900;
  }

  #classicBackBtn {
    background: #f8fbff !important;
    border-color: #aebdcc !important;
  }

  .order-panel .cashier-cart-table thead tr {
    background: #e8f1fb !important;
    border-color: #b9cbe0 !important;
  }

  .order-panel .cashier-cart-table tbody tr {
    background: #ffffff !important;
  }

  .order-panel .cart-row-recent {
    background: #fff5d6 !important;
  }

  .order-heading::after {
    border-bottom-color: #8ea0b3 !important;
  }

  .order-panel .cart-line-number {
    background: #f4b942 !important;
    color: #0b1f34 !important;
  }

  .order-total-stack {
    background: #ffffff !important;
    border-color: #d8e2ec !important;
  }

  .order-total-stack .total-line strong {
    color: #071b1a !important;
  }

  #taxLine span,
  #taxLine strong {
    color: #b42318 !important;
  }

  .discount-row .segment {
    background: #eef4fa !important;
    border-color: #c8d4e2 !important;
    color: #071b1a !important;
  }

  .discount-row .segment.active {
    background: #153e75 !important;
    border-color: #153e75 !important;
    color: #ffffff !important;
  }

  #discountInput {
    background: #ffffff !important;
    border-color: #c8d4e2 !important;
  }

  #toggleRefundBtn {
    background: #fff0bf !important;
    border-color: #d59b23 !important;
    color: #7a4d00 !important;
  }

  .product-filter-row {
    gap: 8px !important;
  }

  .product-filter-btn {
    background: #ffffff !important;
    border: 2px solid #b6c5d5 !important;
    color: #071b1a !important;
    box-shadow: inset 0 -3px 0 rgba(21, 62, 117, 0.08) !important;
  }

  .product-filter-btn.active {
    background: #1f6fb2 !important;
    border-color: #1f6fb2 !important;
    color: #ffffff !important;
    box-shadow: inset 8px 0 0 #f4b942 !important;
  }

  .product-filter-btn:hover,
  .product-filter-btn:focus-visible {
    border-color: #1f6fb2 !important;
  }

  .product-card-grid .result-item {
    background: #ffffff !important;
    border: 2px solid #b9c8d8 !important;
    box-shadow: inset 0 6px 0 #f4b942 !important;
  }

  .product-card-grid .result-item:hover,
  .product-card-grid .result-item:focus-visible,
  .product-card-grid .result-item.selected {
    background: #f8fbff !important;
    border-color: #1f6fb2 !important;
    outline: 3px solid #1f6fb2 !important;
    outline-offset: -3px !important;
  }

  .product-card-grid .result-item strong:first-child {
    color: #071b1a !important;
  }

  .product-card-grid .result-item > .result-price {
    color: #b42318 !important;
  }

  .classic-key-arrow {
    background: #708397 !important;
    border-color: #596b7e !important;
    color: #ffffff !important;
  }

  .classic-key-arrow:hover:not(:disabled),
  .classic-key-arrow:focus-visible:not(:disabled) {
    background: #596b7e !important;
    border-color: #485a6c !important;
  }

  .checkout-panel .due-box,
  .checkout-panel .amount-due-box,
  .classic-payment-due {
    background: #0f2f5d !important;
    color: #ffffff !important;
  }

  .classic-nav-btn:disabled,
  .classic-key:disabled,
  #classicPayBtn:disabled,
  .order-actions .btn:disabled {
    background: #e4eaf0 !important;
    border-color: #c2ceda !important;
    color: #71808b !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
    outline: 0 !important;
    box-shadow: inset 0 0 0 1px #c2ceda !important;
  }

  .classic-nav-btn:disabled:hover,
  .classic-nav-btn:disabled:focus-visible,
  .classic-key:disabled:hover,
  .classic-key:disabled:focus-visible,
  #classicPayBtn:disabled:hover,
  #classicPayBtn:disabled:focus-visible,
  .order-actions .btn:disabled:hover,
  .order-actions .btn:disabled:focus-visible {
    background: #e4eaf0 !important;
    border-color: #c2ceda !important;
    color: #71808b !important;
    outline: 0 !important;
  }

  .classic-payment-modal-card {
    border-color: #b6c5d5 !important;
  }

  .classic-payment-paid.active {
    background: #fff8df !important;
    border-color: #d59b23 !important;
    box-shadow: inset 5px 0 0 #f4b942 !important;
  }

  .classic-payment-pad-grid button[data-classic-payment-pad="exact"],
  .classic-payment-pad-grid button[data-classic-payment-pad="submit"],
  #classicPaymentSubmitBtn {
    background: #153e75 !important;
    border-color: #0f2f5d !important;
    color: #ffffff !important;
  }

  .classic-payment-pad-grid button[data-classic-payment-pad="exact"]:hover:not(:disabled),
  .classic-payment-pad-grid button[data-classic-payment-pad="exact"]:focus-visible:not(:disabled),
  .classic-payment-pad-grid button[data-classic-payment-pad="submit"]:hover:not(:disabled),
  .classic-payment-pad-grid button[data-classic-payment-pad="submit"]:focus-visible:not(:disabled),
  #classicPaymentSubmitBtn:hover:not(:disabled),
  #classicPaymentSubmitBtn:focus-visible:not(:disabled) {
    background: #0f2f5d !important;
    border-color: #0b254a !important;
  }

  .classic-payment-status.payment-ready {
    background: #e8f1fb !important;
    border-color: #b9cbe0 !important;
    color: #153e75 !important;
  }
}

/* v1.0.166 classic register: put Code Search directly above Wholesale Price. */
@media (min-width: 1051px) {
  .classic-function-pad {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
  }

  .classic-function-pad .classic-key {
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 8px !important;
    font-size: clamp(18px, 1.45vw, 22px) !important;
    line-height: 1.1 !important;
  }

  #classicCodeSearchBtn {
    display: block !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  #classicPrevPageBtn {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  #classicNextPageBtn {
    grid-column: 5 !important;
    grid-row: 1 !important;
  }

  #classicWholesalePriceBtn {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  #classicSelectAllBtn {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  #classicQtyBtn {
    grid-column: 3 !important;
    grid-row: 2 !important;
  }

  #classicRepriceBtn {
    grid-column: 4 !important;
    grid-row: 2 !important;
  }

  #classicPromotionBtn {
    grid-column: 5 !important;
    grid-row: 2 !important;
  }

  #classicCommissionBtn {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }

  #classicCancelSaleBtn {
    grid-column: 2 !important;
    grid-row: 3 !important;
  }

  #classicGiftBtn {
    grid-column: 3 !important;
    grid-row: 3 !important;
  }

  #classicSpecBtn {
    grid-column: 4 !important;
    grid-row: 3 !important;
  }

  #classicItemNoteBtn {
    grid-column: 5 !important;
    grid-row: 3 !important;
  }
}

@media (min-width: 1051px) and (max-height: 900px) {
  .touch-register-layout {
    grid-template-rows: 64px minmax(0, 1fr) 172px !important;
  }
}

/* v1.0.167 cashier item note: quick note button on each cart line. */
.cart-row-actions {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 6px;
  align-items: center;
}

/* v1.0.169 classic cashier: fill the product pad and keep messages off the product tiles. */
@media (min-width: 1051px) {
  .order-panel::after {
    display: none !important;
    content: none !important;
  }

  .touch-register-layout .product-panel {
    grid-template-columns: clamp(150px, 10vw, 190px) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    min-height: 0 !important;
  }

  .product-card-grid {
    height: 100% !important;
    min-height: 0 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(164px, 1fr) !important;
    align-content: stretch !important;
    align-items: stretch !important;
    overflow-y: auto !important;
  }

  .product-card-grid .result-item {
    align-self: stretch !important;
    height: auto !important;
    min-height: 164px !important;
  }

  .product-card-grid .result-item > div {
    bottom: 14px !important;
  }

  .product-card-grid .result-item strong:first-child {
    max-height: none !important;
    -webkit-line-clamp: 3 !important;
  }

  .status-bar:not([hidden]) {
    position: fixed !important;
    z-index: 95 !important;
    right: 28px !important;
    bottom: 124px !important;
    left: auto !important;
    width: min(520px, calc(100vw - 56px)) !important;
    max-width: none !important;
    margin: 0 !important;
    border-width: 2px !important;
    box-shadow: 0 18px 42px rgba(15, 47, 93, 0.18) !important;
  }
}

@media (min-width: 1051px) and (max-height: 850px) {
  .product-card-grid {
    grid-auto-rows: minmax(148px, 1fr) !important;
  }

  .product-card-grid .result-item {
    min-height: 148px !important;
  }

  .status-bar:not([hidden]) {
    bottom: 112px !important;
  }
}

/* v1.0.170 classic cashier: category names should fit instead of showing ellipsis. */
@media (min-width: 1051px) {
  .product-filter-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    padding: 8px 10px !important;
    overflow: hidden !important;
    font-size: clamp(14px, 1.1vw, 21px) !important;
    line-height: 1.08 !important;
    text-align: center !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
}

@media (min-width: 1051px) and (max-width: 1360px) {
  .product-filter-btn {
    padding: 6px 8px !important;
    font-size: clamp(13px, 1.05vw, 18px) !important;
  }
}

/* v1.0.171 classic cashier: distribute category buttons evenly in the left rail. */
@media (min-width: 1051px) {
  .product-filter-row {
    height: 100% !important;
    min-height: 0 !important;
    align-content: stretch !important;
    grid-auto-rows: unset !important;
    grid-template-rows: repeat(var(--filter-count, 1), minmax(0, 1fr)) !important;
    overflow: hidden !important;
  }

  .product-filter-btn {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}

.cart-note-btn {
  min-height: 34px;
  border-color: #d59b23;
  background: #fff0bf;
  color: #6d4100;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  padding: 0 8px;
  white-space: nowrap;
}

.cart-note-btn.has-note {
  border-color: #153e75;
  background: #153e75;
  color: #ffffff;
}

.cart-item-note {
  display: block;
  margin-top: 4px;
  border: 1px solid #efd08a;
  border-radius: 4px;
  background: #fff8df;
  color: #6d4100;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  padding: 3px 6px;
}

@media (min-width: 1051px) {
  .order-panel .cashier-cart-table thead tr,
  .order-panel .cashier-cart-table tbody tr {
    grid-template-columns: minmax(0, 1fr) 136px 126px 102px !important;
  }

  .order-panel .cashier-cart-table th:nth-child(4),
  .order-panel .cashier-cart-table td:nth-child(4) {
    width: 126px !important;
    max-width: 126px !important;
  }

  .order-panel .cart-row-actions {
    width: 102px !important;
    grid-template-columns: 58px 38px !important;
  }

  .order-panel .cart-note-btn {
    width: 58px !important;
    min-height: 38px !important;
    border-radius: 0 !important;
    padding: 0 4px !important;
    font-size: 14px !important;
  }

  .order-panel .remove-btn {
    width: 38px !important;
    max-width: 38px !important;
  }

  .order-panel .cart-name .cart-item-note {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

@media (min-width: 1051px) and (max-width: 1320px) {
  .order-panel .cashier-cart-table thead tr,
  .order-panel .cashier-cart-table tbody tr {
    grid-template-columns: minmax(0, 1fr) 96px 86px 72px !important;
    column-gap: 5px !important;
  }

  .order-panel .cashier-cart-table th:nth-child(4),
  .order-panel .cashier-cart-table td:nth-child(4) {
    width: 86px !important;
    max-width: 86px !important;
  }

  .order-panel .cart-row-actions {
    width: 72px !important;
    grid-template-columns: 38px 30px !important;
    gap: 4px !important;
  }

  .order-panel .cart-note-btn {
    width: 38px !important;
    min-height: 34px !important;
    font-size: 12px !important;
    padding: 0 2px !important;
  }

  .order-panel .remove-btn {
    width: 30px !important;
    max-width: 30px !important;
  }
}

/* v1.0.172 cloud cashier fit: keep browser-height layouts from showing half product tiles. */
@media (min-width: 1051px) {
  #practiceModeBanner:not([hidden]) {
    display: none !important;
  }

  .touch-register-layout .product-panel {
    grid-template-areas: "filters products" !important;
  }

  .product-filter-row {
    grid-area: filters !important;
  }

  .product-card-grid {
    grid-area: products !important;
  }
}

@media (min-width: 1051px) and (max-height: 980px) {
  .cashier-shell {
    padding: 6px !important;
  }

  .touch-register-layout {
    width: calc(100vw - 12px) !important;
    height: calc(100vh - 12px) !important;
    gap: 6px !important;
    grid-template-rows: 96px minmax(0, 1fr) 168px !important;
  }

  .classic-nav-btn {
    min-height: 0 !important;
    font-size: clamp(20px, 1.75vw, 28px) !important;
  }

  .touch-register-layout .product-panel {
    min-height: 0 !important;
  }

  .product-card-grid {
    height: 100% !important;
    min-height: 0 !important;
    grid-auto-rows: calc((100% - 16px) / 3) !important;
    align-content: start !important;
    overflow-y: auto !important;
  }

  .product-card-grid .result-item {
    height: auto !important;
    min-height: 0 !important;
  }

  .product-card-grid .result-item > div {
    bottom: 10px !important;
  }

  .classic-function-pad .classic-key {
    min-height: 0 !important;
    font-size: clamp(18px, 1.55vw, 24px) !important;
  }
}

/* v1.0.173 checkout: dedicated payment station with order review + large keypad. */
.classic-payment-order-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.classic-payment-order-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px dashed #93a5b8;
}

.classic-payment-order-head strong {
  font-size: 26px;
  line-height: 1.1;
}

.classic-payment-order-head span {
  border-radius: 999px;
  background: #eef4fa;
  color: #153e75;
  font-size: 16px;
  font-weight: 900;
  padding: 8px 12px;
}

.classic-payment-order-list {
  min-height: 0;
  overflow-y: auto;
}

.classic-payment-order-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 132px;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #e3ebf3;
}

.classic-payment-order-name {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.classic-payment-order-name strong {
  overflow: hidden;
  color: #071b1a;
  font-size: 20px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classic-payment-order-name span {
  overflow: hidden;
  color: #52666f;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classic-payment-order-qty,
.classic-payment-order-line-total {
  color: #071b1a;
  font-size: 19px;
  font-weight: 900;
  text-align: right;
}

.classic-payment-order-totals {
  display: grid;
  gap: 8px;
  padding: 16px 18px 18px;
  border-top: 1px solid #d7e2ec;
  background: #f8fbff;
}

.classic-payment-order-totals > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: #52666f;
  font-size: 16px;
  font-weight: 800;
}

.classic-payment-order-totals strong {
  color: #071b1a;
  font-size: 20px;
  line-height: 1;
}

.classic-payment-order-total {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 2px solid #153e75;
  color: #b42318 !important;
  font-size: 22px !important;
}

.classic-payment-order-total strong {
  color: #b42318;
  font-size: 34px;
}

@media (min-width: 1051px) {
  #classicPaymentModal {
    place-items: stretch !important;
    padding: 10px !important;
  }

  .classic-payment-modal-card {
    width: calc(100vw - 20px) !important;
    height: calc(100vh - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(420px, 34%) minmax(0, 1fr) !important;
    grid-template-rows: 94px 86px minmax(0, 1fr) 86px auto 56px 56px auto 74px !important;
    grid-template-areas:
      "payHeader payHeader"
      "payReceipt payMethods"
      "payReceipt payWorkspace"
      "payReceipt paySummary"
      "payReceipt payStatus"
      "payReceipt payPrint"
      "payReceipt payNote"
      "payReceipt payError"
      "payReceipt payActions" !important;
    gap: 10px !important;
    padding: 10px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #d7e2ec !important;
  }

  .classic-payment-header {
    grid-area: payHeader;
    grid-template-columns: minmax(0, 1fr) 180px minmax(260px, 320px) !important;
    gap: 10px !important;
    min-height: 0 !important;
    padding: 14px 16px !important;
    border: 2px solid #153e75 !important;
    border-radius: 8px !important;
    background: #0f2f5d !important;
    color: #fff !important;
  }

  .classic-payment-header h2 {
    color: #fff !important;
    font-size: 34px !important;
    line-height: 1 !important;
  }

  .classic-payment-header p {
    max-width: 820px;
    color: #dbe8f5 !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
  }

  .classic-payment-back {
    min-height: 0 !important;
    border: 2px solid #5e86b8 !important;
    border-radius: 6px !important;
    background: #1f6fb2 !important;
    color: #fff !important;
    font-size: 26px !important;
    font-weight: 900 !important;
    box-shadow: none !important;
  }

  .classic-payment-due {
    min-height: 0 !important;
    padding: 10px 14px !important;
    border: 2px solid #f4b942 !important;
    border-radius: 6px !important;
    background: #071b1a !important;
    box-shadow: none !important;
  }

  .classic-payment-due strong {
    font-size: 38px !important;
  }

  .classic-payment-methods {
    grid-area: payMethods;
    gap: 10px !important;
  }

  .classic-payment-methods .payment-btn {
    min-height: 0 !important;
    border: 2px solid #aab8c7 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #071b1a !important;
    font-size: 28px !important;
    font-weight: 900 !important;
  }

  .classic-payment-methods .payment-btn.active {
    border-color: #f4b942 !important;
    background: #153e75 !important;
    color: #fff !important;
  }

  .classic-payment-order-panel {
    grid-area: payReceipt;
    border: 2px solid #aab8c7 !important;
    border-radius: 8px !important;
  }

  .classic-payment-workspace {
    grid-area: payWorkspace;
    min-height: 0 !important;
    grid-template-columns: minmax(330px, 0.82fr) minmax(390px, 1fr) !important;
    gap: 10px !important;
    overflow: hidden !important;
  }

  .classic-payment-entry-panel,
  .classic-payment-keypad {
    min-height: 0 !important;
    border: 2px solid #aab8c7 !important;
    border-radius: 8px !important;
    background: #f8fbff !important;
  }

  .classic-payment-entry-panel {
    grid-template-rows: auto minmax(0, 1fr) !important;
    padding: 10px !important;
  }

  .classic-payment-split {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .classic-payment-paid {
    grid-template-columns: 92px minmax(0, 1fr) !important;
    padding: 9px 10px !important;
    border: 2px solid #c8d4e2 !important;
    border-radius: 6px !important;
    background: #fff !important;
  }

  .classic-payment-paid.active {
    border-color: #153e75 !important;
    background: #edf5ff !important;
    box-shadow: inset 0 0 0 2px rgba(244, 185, 66, 0.52) !important;
  }

  .classic-payment-paid span {
    color: #153e75;
    font-size: 21px !important;
    font-weight: 900 !important;
  }

  .classic-payment-paid input {
    min-height: 56px !important;
    border-radius: 4px !important;
    font-size: 30px !important;
  }

  .classic-payment-quick {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-content: start !important;
    gap: 8px !important;
  }

  .classic-payment-quick .btn {
    min-height: 52px !important;
    border: 2px solid #aab8c7 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #071b1a !important;
    font-size: 18px !important;
    font-weight: 900 !important;
  }

  .classic-payment-keypad {
    padding: 10px !important;
    gap: 8px !important;
  }

  .classic-payment-keypad-head {
    grid-template-columns: 1fr;
    gap: 4px !important;
  }

  .classic-payment-keypad-head strong {
    color: #071b1a;
    font-size: 24px !important;
  }

  .classic-payment-keypad-head small {
    font-size: 15px !important;
  }

  .classic-payment-pad-grid {
    height: 100% !important;
    grid-auto-rows: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  .classic-payment-pad-grid button {
    min-height: 0 !important;
    border: 2px solid #aab8c7 !important;
    border-radius: 6px !important;
    color: #071b1a !important;
    font-size: 30px !important;
  }

  .classic-payment-pad-grid button[data-classic-payment-pad="clear"],
  .classic-payment-pad-grid button[data-classic-payment-pad="back"] {
    font-size: 20px !important;
  }

  .classic-payment-pad-grid button[data-classic-payment-pad="exact"] {
    border-color: #f4b942 !important;
    background: #fff5d6 !important;
    color: #7a4d00 !important;
  }

  .classic-payment-pad-grid button[data-classic-payment-pad="submit"] {
    border-color: #153e75 !important;
    background: #153e75 !important;
    color: #fff !important;
    font-size: 22px !important;
  }

  .classic-payment-summary-grid {
    grid-area: paySummary;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .classic-payment-change {
    min-height: 0 !important;
    padding: 10px 14px !important;
    border: 2px solid #aab8c7 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #071b1a !important;
  }

  .classic-payment-change strong {
    color: #153e75 !important;
    font-size: 30px !important;
  }

  .classic-payment-status {
    grid-area: payStatus;
    min-height: 0 !important;
    padding: 10px 14px !important;
    border-radius: 6px !important;
    font-size: 18px !important;
  }

  .classic-payment-print {
    grid-area: payPrint;
  }

  .classic-payment-note {
    grid-area: payNote;
  }

  .classic-payment-print,
  .classic-payment-note {
    grid-template-columns: 118px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px 12px !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  .classic-payment-print span,
  .classic-payment-note span {
    color: #153e75;
    font-size: 18px;
    font-weight: 900;
  }

  .classic-payment-print select,
  .classic-payment-note input {
    min-height: 46px !important;
    border: 2px solid #aab8c7 !important;
    border-radius: 6px !important;
    font-size: 18px !important;
  }

  .classic-payment-print .field-hint {
    display: block !important;
    grid-column: 1 / -1;
    min-height: 32px;
    padding: 7px 10px;
    border: 2px solid #aab8c7;
    border-radius: 6px;
    background: #eef5fc;
    color: #153e75;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
  }

  .classic-payment-modal-card > .error {
    grid-area: payError;
    margin: 0 !important;
  }

  .classic-payment-modal-card .modal-actions {
    grid-area: payActions;
    grid-template-columns: 220px minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .classic-payment-modal-card .modal-actions .btn {
    min-height: 0 !important;
    border-radius: 6px !important;
    font-size: 26px !important;
    font-weight: 900 !important;
  }

  #classicPaymentSubmitBtn {
    border-color: #153e75 !important;
    background: #153e75 !important;
    color: #fff !important;
    font-size: 32px !important;
  }
}

@media (min-width: 1051px) and (max-height: 850px) {
  .classic-payment-modal-card {
    grid-template-rows: 80px 68px minmax(0, 1fr) 70px auto 46px 46px auto 58px !important;
    gap: 8px !important;
    padding: 8px !important;
  }

  .classic-payment-header {
    padding: 10px 12px !important;
    grid-template-columns: minmax(0, 1fr) 150px 260px !important;
  }

  .classic-payment-header h2 {
    font-size: 28px !important;
  }

  .classic-payment-header p {
    font-size: 14px !important;
  }

  .classic-payment-back,
  .classic-payment-methods .payment-btn {
    font-size: 23px !important;
  }

  .classic-payment-due strong {
    font-size: 32px !important;
  }

  .classic-payment-workspace {
    grid-template-columns: minmax(280px, 0.78fr) minmax(340px, 1fr) !important;
  }

  .classic-payment-order-head {
    padding: 12px 14px !important;
  }

  .classic-payment-order-line {
    padding: 10px 14px !important;
    grid-template-columns: minmax(0, 1fr) 56px 110px !important;
  }

  .classic-payment-order-name strong {
    font-size: 17px !important;
  }

  .classic-payment-order-totals {
    padding: 12px 14px !important;
  }

  .classic-payment-order-total strong {
    font-size: 28px !important;
  }

  .classic-payment-paid input {
    min-height: 44px !important;
    font-size: 24px !important;
  }

  .classic-payment-quick .btn {
    min-height: 42px !important;
    font-size: 16px !important;
  }

  .classic-payment-keypad-head small {
    display: none !important;
  }

  .classic-payment-pad-grid button {
    font-size: 26px !important;
  }

  .classic-payment-change strong {
    font-size: 24px !important;
  }
}

/* v1.0.174 classic code search: large POS-style on-screen keyboard. */
.code-search-backdrop {
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(6, 25, 34, 0.28);
}

.code-search-modal {
  width: min(1030px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  display: grid;
  grid-template-rows: 42px 56px auto minmax(0, 1fr);
  gap: 10px;
  padding: 0 8px 8px;
  border: 2px solid #9aa2aa;
  border-radius: 10px;
  background: #f4f4f4;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.code-search-titlebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  min-width: 0;
  color: #050b12;
  font-size: 18px;
}

.code-search-close {
  width: 44px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #050b12;
  font-size: 32px;
  line-height: 1;
}

.code-search-input {
  min-height: 46px;
  border: 2px solid #d8e0e8;
  border-bottom: 4px solid #1f8cda;
  border-radius: 0;
  background: #fff;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0;
}

.code-search-input:focus {
  outline: none;
  border-color: #d8e0e8;
  border-bottom-color: #0b86dc;
}

.code-search-results {
  display: grid;
  gap: 7px;
  min-height: 0;
}

.code-search-results-head {
  color: #405660;
  font-size: 15px;
  font-weight: 800;
}

.code-search-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.code-search-result {
  min-width: 0;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 5px 10px;
  align-items: center;
  padding: 10px 12px;
  border: 2px solid #b9cbd3;
  border-radius: 6px;
  background: #fff;
  color: #061922;
  text-align: left;
}

.code-search-result strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 19px;
}

.code-search-result span {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #50636b;
  font-size: 15px;
  font-weight: 700;
}

.code-search-result b {
  color: #a91717;
  font-size: 20px;
}

.code-search-result:hover,
.code-search-result:focus-visible {
  outline: 3px solid rgba(31, 140, 218, 0.24);
  border-color: #1f8cda;
}

.code-search-no-results {
  padding: 12px 14px;
  border: 2px solid #f1b7b7;
  border-radius: 6px;
  background: #fff4f4;
  color: #b42318;
  font-size: 18px;
  font-weight: 800;
}

.code-search-keyboard {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-auto-rows: minmax(70px, 1fr);
  gap: 7px 13px;
  min-height: 0;
}

.code-key {
  min-width: 0;
  min-height: 0;
  border: 2px solid transparent;
  border-radius: 2px;
  background: #c9c9c9;
  color: #050b12;
  font-size: 24px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.code-key:hover,
.code-key:focus-visible {
  outline: 3px solid rgba(31, 140, 218, 0.22);
  border-color: #1f8cda;
}

.code-key:active {
  transform: translateY(1px);
}

.code-key-number,
.code-key-confirm,
.code-key-space {
  background: #a9d4f4;
}

.code-key-dark {
  background: #050505;
  color: #fff;
}

.code-key-dark.active {
  background: #153e75;
  color: #fff;
}

.code-key-confirm {
  grid-column: span 2;
  color: #050b12;
  font-size: 30px;
}

.code-key-space {
  grid-column: span 5;
}

@media (max-width: 820px), (max-height: 620px) {
  .code-search-modal {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    grid-template-rows: 38px 52px auto minmax(0, 1fr);
    padding: 0 6px 6px;
  }

  .code-search-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .code-search-result {
    min-height: 62px;
  }

  .code-search-result strong,
  .code-search-result b {
    font-size: 16px;
  }

  .code-search-results-head,
  .code-search-result span {
    font-size: 13px;
  }

  .code-search-keyboard {
    gap: 5px;
    grid-auto-rows: minmax(48px, 1fr);
  }

  .code-key {
    font-size: 18px;
  }

  .code-key-confirm {
    font-size: 22px;
  }
}

/* v1.0.196 cashier member lookup: touch-friendly modal for the classic POS screen. */
.member-lookup-backdrop {
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(4, 20, 32, 0.36);
}

.member-lookup-card {
  width: min(920px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto auto auto minmax(130px, 1fr) auto;
  gap: 14px;
  padding: 22px;
  border: 2px solid #aebdcc;
  border-radius: 14px;
  background: #f8fbfd;
  color: #061922;
  box-shadow: 0 24px 80px rgba(4, 16, 26, 0.34);
}

.member-lookup-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 14px;
  align-items: start;
}

.member-lookup-header h2 {
  margin: 0;
  color: #071824;
  font-size: 34px;
  line-height: 1.1;
}

.member-lookup-header p {
  margin: 8px 0 0;
  color: #526675;
  font-size: 18px;
  line-height: 1.35;
}

.member-lookup-close {
  width: 54px;
  height: 54px;
  border: 2px solid #c2cfda;
  border-radius: 10px;
  background: #fff;
  color: #071824;
  font-size: 34px;
  line-height: 1;
}

.member-lookup-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
}

.member-lookup-search input {
  width: 100%;
  min-height: 66px;
  border: 2px solid #b9c8d5;
  border-radius: 10px;
  background: #fff;
  color: #061922;
  font-size: 28px;
  font-weight: 800;
}

.member-lookup-search input:focus {
  outline: 4px solid rgba(22, 102, 194, 0.18);
  border-color: #18477c;
}

.member-lookup-search .btn {
  min-height: 66px;
  font-size: 24px;
  font-weight: 900;
}

.member-lookup-selected-card {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 2px solid #f0bd35;
  border-radius: 10px;
  background: #fff7df;
}

.member-lookup-selected-card span,
.member-lookup-selected-card small {
  color: #526675;
  font-size: 16px;
  font-weight: 700;
}

.member-lookup-selected-card strong {
  color: #061922;
  font-size: 24px;
}

.member-lookup-selected-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.member-lookup-selected-card b {
  color: #18477c;
  font-size: 17px;
}

.member-lookup-results {
  min-height: 0;
  overflow: auto;
}

.member-lookup-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.member-lookup-result {
  min-width: 0;
  min-height: 96px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 12px 14px;
  border: 2px solid #b9c8d5;
  border-radius: 10px;
  background: #fff;
  color: #061922;
  text-align: left;
}

.member-lookup-result:hover,
.member-lookup-result:focus-visible {
  outline: 4px solid rgba(24, 71, 124, 0.16);
  border-color: #18477c;
}

.member-lookup-result strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 22px;
}

.member-lookup-result span,
.member-lookup-result small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #526675;
  font-size: 16px;
  font-weight: 700;
}

.member-lookup-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 20px;
  border: 2px dashed #b9c8d5;
  border-radius: 12px;
  background: #fff;
  color: #526675;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
}

.member-lookup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.member-lookup-actions .btn {
  min-height: 58px;
  font-size: 22px;
  font-weight: 900;
}

@media (max-width: 760px) {
  .member-lookup-card {
    width: calc(100vw - 20px);
    padding: 14px;
  }

  .member-lookup-search,
  .member-lookup-result-grid,
  .member-lookup-actions {
    grid-template-columns: 1fr;
  }
}

/* v1.0.177 cashier item note: replace browser prompt with a large POS dialog. */
.item-note-backdrop {
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 25, 34, 0.36);
}

.item-note-modal-card {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 2px solid #c5d5da;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.item-note-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: start;
}

.item-note-header h2 {
  margin: 0;
  color: #061922;
  font-size: 34px;
  line-height: 1.05;
}

.item-note-header p {
  margin: 8px 0 0;
  color: #51666f;
  font-size: 18px;
}

.item-note-close {
  width: 54px;
  height: 54px;
  border: 2px solid #d0dde1;
  border-radius: 8px;
  background: #fff;
  color: #061922;
  font-size: 34px;
  line-height: 1;
}

.item-note-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 2px solid #d5e2e6;
  border-radius: 10px;
  background: #f4faf8;
}

.item-note-product strong,
.item-note-product b {
  color: #05291f;
  font-size: 24px;
}

.item-note-product span {
  display: block;
  margin-top: 6px;
  color: #4e626a;
  font-size: 17px;
}

.item-note-textbox {
  display: grid;
  gap: 8px;
  color: #344d56;
  font-size: 20px;
  font-weight: 800;
}

.item-note-textbox textarea {
  min-height: 150px;
  resize: vertical;
  padding: 16px;
  border: 2px solid #cbdadd;
  border-radius: 10px;
  background: #fff;
  color: #061922;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.35;
}

.item-note-textbox textarea:focus {
  outline: 4px solid rgba(13, 125, 105, 0.18);
  border-color: #0d7d69;
}

.item-note-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 12px;
}

.item-note-actions .btn {
  min-height: 62px;
  font-size: 24px;
  font-weight: 900;
}

@media (max-width: 720px) {
  .item-note-modal-card {
    width: calc(100vw - 16px);
    padding: 16px;
  }

  .item-note-header h2 {
    font-size: 28px;
  }

  .item-note-product {
    grid-template-columns: minmax(0, 1fr);
  }

  .item-note-actions {
    grid-template-columns: 1fr;
  }
}

/* v1.0.178 cashier confirm: replace browser confirm dialogs with POS-sized controls. */
.cashier-confirm-backdrop {
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 25, 34, 0.38);
}

.cashier-confirm-card {
  width: min(560px, calc(100vw - 32px));
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 2px solid #c5d5da;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.cashier-confirm-card h2 {
  margin: 0;
  color: #061922;
  font-size: 34px;
  line-height: 1.08;
}

.cashier-confirm-card p {
  margin: 0;
  color: #3d535c;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
}

.cashier-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
}

.cashier-confirm-actions .btn {
  min-height: 64px;
  font-size: 24px;
  font-weight: 900;
}

.btn.danger {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
}

.btn.danger:hover,
.btn.danger:focus-visible {
  background: #8f1c14;
  border-color: #8f1c14;
}

@media (max-width: 620px) {
  .cashier-confirm-card {
    width: calc(100vw - 16px);
    padding: 18px;
  }

  .cashier-confirm-card h2 {
    font-size: 28px;
  }

  .cashier-confirm-actions {
    grid-template-columns: 1fr;
  }
}

/* v1.0.180 payment page fit: keep due amount and keypad fully visible on cashier screens. */
@media (min-width: 1051px) {
  .classic-payment-modal-card {
    grid-template-rows: 112px 78px minmax(0, 1fr) 76px auto 52px 52px auto 76px !important;
  }

  .classic-payment-header {
    align-items: center !important;
    grid-template-columns: minmax(0, 1fr) 230px minmax(360px, 420px) !important;
  }

  .classic-payment-due {
    min-width: 0 !important;
    height: 100% !important;
    align-content: center !important;
    gap: 2px !important;
    overflow: hidden !important;
    padding: 8px 20px !important;
  }

  .classic-payment-due span {
    font-size: 18px !important;
    line-height: 1 !important;
  }

  .classic-payment-due strong {
    display: block !important;
    overflow: hidden !important;
    color: #fff !important;
    font-size: clamp(34px, 2.65vw, 48px) !important;
    line-height: 0.95 !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }

  .classic-payment-workspace {
    grid-template-columns: minmax(430px, 0.95fr) minmax(470px, 1fr) !important;
  }

  .classic-payment-entry-panel {
    overflow: hidden !important;
  }

  .classic-payment-paid {
    grid-template-columns: 112px minmax(170px, 1fr) !important;
    min-width: 0 !important;
  }

  .classic-payment-paid input {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 12px !important;
    font-size: clamp(24px, 1.9vw, 32px) !important;
  }

  .classic-payment-keypad {
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  .classic-payment-pad-grid {
    min-height: 0 !important;
    grid-template-rows: repeat(4, minmax(0, 1fr)) !important;
  }

  .classic-payment-pad-grid button {
    min-height: 0 !important;
  }
}

@media (min-width: 1051px) and (max-height: 850px) {
  .classic-payment-modal-card {
    grid-template-rows: 92px 68px minmax(0, 1fr) 66px auto 44px 44px auto 60px !important;
  }

  .classic-payment-header {
    grid-template-columns: minmax(0, 1fr) 190px minmax(300px, 340px) !important;
  }

  .classic-payment-due {
    padding: 7px 14px !important;
  }

  .classic-payment-due span {
    font-size: 15px !important;
  }

  .classic-payment-due strong {
    font-size: clamp(30px, 2.35vw, 40px) !important;
  }

  .classic-payment-workspace {
    grid-template-columns: minmax(350px, 0.9fr) minmax(390px, 1fr) !important;
  }

  .classic-payment-paid {
    grid-template-columns: 94px minmax(135px, 1fr) !important;
  }
}

/* v1.0.181 payment page polish: give the keypad real height and keep action text short. */
@media (min-width: 1051px) {
  .classic-payment-modal-card {
    grid-template-rows: 100px 72px minmax(360px, 1fr) 64px 48px 44px 44px 0 66px !important;
    gap: 8px !important;
  }

  .classic-payment-header {
    padding: 12px 16px !important;
  }

  .classic-payment-header h2 {
    font-size: 32px !important;
  }

  .classic-payment-header p {
    font-size: 15px !important;
  }

  .classic-payment-back {
    font-size: 28px !important;
  }

  .classic-payment-workspace {
    grid-template-columns: minmax(430px, 0.86fr) minmax(520px, 1fr) !important;
    align-items: stretch !important;
  }

  .classic-payment-keypad {
    display: grid !important;
    grid-template-rows: 42px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  .classic-payment-keypad-head {
    align-content: center !important;
  }

  .classic-payment-keypad-head strong {
    font-size: 28px !important;
    line-height: 1 !important;
  }

  .classic-payment-keypad-head small {
    display: none !important;
  }

  .classic-payment-pad-grid {
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(4, minmax(62px, 1fr)) !important;
    gap: 8px !important;
  }

  .classic-payment-pad-grid button {
    min-height: 0 !important;
    padding: 0 8px !important;
    font-size: clamp(24px, 2vw, 34px) !important;
    line-height: 1.05 !important;
  }

  .classic-payment-pad-grid button[data-classic-payment-pad="clear"],
  .classic-payment-pad-grid button[data-classic-payment-pad="back"],
  .classic-payment-pad-grid button[data-classic-payment-pad="exact"],
  .classic-payment-pad-grid button[data-classic-payment-pad="submit"] {
    font-size: clamp(20px, 1.65vw, 28px) !important;
    line-height: 1.05 !important;
  }

  .classic-payment-split {
    gap: 10px !important;
  }

  .classic-payment-paid {
    grid-template-columns: 112px minmax(190px, 1fr) !important;
    min-height: 92px !important;
    padding: 12px 14px !important;
  }

  .classic-payment-paid input {
    min-height: 58px !important;
    font-size: clamp(26px, 2vw, 34px) !important;
  }

  .classic-payment-quick {
    display: none !important;
  }

  .classic-payment-summary-grid {
    align-items: stretch !important;
  }

  .classic-payment-change {
    padding: 8px 14px !important;
  }

  .classic-payment-change strong {
    font-size: clamp(24px, 2vw, 32px) !important;
  }

  .classic-payment-status {
    display: flex !important;
    align-items: center !important;
    padding: 8px 14px !important;
    font-size: 18px !important;
  }

  .classic-payment-print select,
  .classic-payment-note input {
    min-height: 42px !important;
    font-size: 18px !important;
  }
}

@media (min-width: 1051px) and (max-height: 850px) {
  .classic-payment-modal-card {
    grid-template-rows: 78px 58px minmax(300px, 1fr) 54px 40px 38px 38px 0 54px !important;
    gap: 6px !important;
  }

  .classic-payment-header h2 {
    font-size: 26px !important;
  }

  .classic-payment-header p {
    font-size: 13px !important;
  }

  .classic-payment-back {
    font-size: 23px !important;
  }

  .classic-payment-workspace {
    grid-template-columns: minmax(340px, 0.82fr) minmax(400px, 1fr) !important;
  }

  .classic-payment-keypad {
    grid-template-rows: 32px minmax(0, 1fr) !important;
    padding: 8px !important;
    gap: 6px !important;
  }

  .classic-payment-keypad-head strong {
    font-size: 22px !important;
  }

  .classic-payment-pad-grid {
    grid-template-rows: repeat(4, minmax(46px, 1fr)) !important;
    gap: 6px !important;
  }

  .classic-payment-paid {
    min-height: 76px !important;
    grid-template-columns: 88px minmax(130px, 1fr) !important;
    padding: 8px 10px !important;
  }

  .classic-payment-paid input {
    min-height: 46px !important;
    font-size: 24px !important;
  }

  .classic-payment-change strong {
    font-size: 23px !important;
  }
}

/* v1.0.182 payment page safe height: keep the due total and final button fully visible. */
@media (min-width: 1051px) {
  .classic-payment-modal-card {
    grid-template-rows: 86px 66px minmax(330px, 1fr) 58px 40px 40px 40px 0 58px !important;
    gap: 6px !important;
    padding: 8px !important;
  }

  .classic-payment-header {
    align-items: center !important;
    padding: 8px 14px !important;
  }

  .classic-payment-header h2 {
    font-size: 30px !important;
    line-height: 1 !important;
  }

  .classic-payment-header p {
    margin-top: 5px !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
  }

  .classic-payment-back {
    min-height: 0 !important;
    font-size: 26px !important;
    line-height: 1 !important;
  }

  .classic-payment-due {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 6px 18px !important;
  }

  .classic-payment-due span {
    font-size: 16px !important;
    line-height: 1 !important;
  }

  .classic-payment-due strong {
    display: block !important;
    overflow: visible !important;
    font-size: clamp(30px, 2.35vw, 42px) !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  .classic-payment-methods .payment-btn {
    font-size: 28px !important;
  }

  .classic-payment-workspace {
    grid-template-columns: minmax(410px, 0.86fr) minmax(520px, 1fr) !important;
  }

  .classic-payment-paid {
    min-height: 82px !important;
    padding: 9px 12px !important;
  }

  .classic-payment-paid input {
    min-height: 50px !important;
  }

  .classic-payment-summary-grid {
    gap: 6px !important;
  }

  .classic-payment-change {
    padding: 6px 12px !important;
  }

  .classic-payment-change strong {
    font-size: clamp(22px, 1.8vw, 28px) !important;
  }

  .classic-payment-status {
    min-height: 0 !important;
    padding: 6px 12px !important;
    font-size: 17px !important;
    line-height: 1.15 !important;
  }

  .classic-payment-print,
  .classic-payment-note {
    grid-template-columns: 118px minmax(0, 1fr) !important;
    min-height: 0 !important;
  }

  .classic-payment-print select,
  .classic-payment-note input {
    min-height: 36px !important;
    font-size: 17px !important;
  }

  .classic-payment-modal-card .modal-actions {
    align-items: stretch !important;
    min-height: 0 !important;
  }

  .classic-payment-modal-card .modal-actions .btn {
    min-height: 0 !important;
    font-size: 28px !important;
    line-height: 1 !important;
  }

  #classicPaymentSubmitBtn {
    font-size: clamp(28px, 2.2vw, 36px) !important;
    line-height: 1 !important;
    padding: 0 12px !important;
  }
}

@media (min-width: 1051px) and (max-height: 850px) {
  .classic-payment-modal-card {
    grid-template-rows: 70px 54px minmax(285px, 1fr) 48px 34px 34px 34px 0 48px !important;
    gap: 5px !important;
    padding: 6px !important;
  }

  .classic-payment-header {
    grid-template-columns: minmax(0, 1fr) 180px minmax(270px, 320px) !important;
    padding: 6px 10px !important;
  }

  .classic-payment-header h2 {
    font-size: 24px !important;
  }

  .classic-payment-header p {
    font-size: 12px !important;
  }

  .classic-payment-back {
    font-size: 22px !important;
  }

  .classic-payment-due {
    padding: 4px 12px !important;
  }

  .classic-payment-due span {
    font-size: 13px !important;
  }

  .classic-payment-due strong {
    font-size: clamp(26px, 2.1vw, 34px) !important;
    line-height: 1.05 !important;
  }

  .classic-payment-methods .payment-btn {
    font-size: 23px !important;
  }

  .classic-payment-workspace {
    grid-template-columns: minmax(330px, 0.82fr) minmax(390px, 1fr) !important;
  }

  .classic-payment-keypad {
    grid-template-rows: 28px minmax(0, 1fr) !important;
    padding: 6px !important;
  }

  .classic-payment-keypad-head strong {
    font-size: 20px !important;
  }

  .classic-payment-pad-grid {
    grid-template-rows: repeat(4, minmax(42px, 1fr)) !important;
    gap: 5px !important;
  }

  .classic-payment-paid {
    min-height: 68px !important;
    padding: 6px 8px !important;
  }

  .classic-payment-paid input {
    min-height: 40px !important;
  }

  .classic-payment-status {
    font-size: 15px !important;
  }

  #classicPaymentSubmitBtn {
    font-size: 28px !important;
  }
}

/* v1.0.183 payment page: one-screen checkout with print and note on the same row. */
@media (min-width: 1051px) {
  #classicPaymentModal {
    padding: 6px !important;
  }

  .classic-payment-modal-card {
    width: calc(100vw - 12px) !important;
    height: calc(100vh - 12px) !important;
    max-height: calc(100vh - 12px) !important;
    grid-template-columns: minmax(420px, 34%) minmax(260px, 1fr) minmax(260px, 1fr) !important;
    grid-template-rows: 78px 58px minmax(300px, 1fr) 52px 36px 40px 0 54px !important;
    grid-template-areas:
      "payHeader payHeader payHeader"
      "payReceipt payMethods payMethods"
      "payReceipt payWorkspace payWorkspace"
      "payReceipt paySummary paySummary"
      "payReceipt payStatus payStatus"
      "payReceipt payPrint payNote"
      "payReceipt payError payError"
      "payReceipt payActions payActions" !important;
    gap: 7px !important;
    padding: 8px !important;
  }

  .classic-payment-header {
    grid-template-columns: minmax(0, 1fr) 210px minmax(290px, 380px) !important;
    padding: 8px 14px !important;
  }

  .classic-payment-header h2 {
    font-size: 28px !important;
  }

  .classic-payment-header p {
    margin-top: 4px !important;
    font-size: 13px !important;
  }

  .classic-payment-back {
    font-size: 24px !important;
  }

  .classic-payment-due {
    padding: 5px 14px !important;
  }

  .classic-payment-due strong {
    font-size: clamp(30px, 2.2vw, 40px) !important;
    line-height: 1 !important;
  }

  .classic-payment-methods .payment-btn {
    font-size: 26px !important;
  }

  .classic-payment-workspace {
    grid-template-columns: minmax(360px, 0.85fr) minmax(420px, 1fr) !important;
  }

  .classic-payment-entry-panel {
    padding: 8px !important;
  }

  .classic-payment-split {
    gap: 7px !important;
  }

  .classic-payment-paid {
    min-height: 0 !important;
    padding: 7px 9px !important;
  }

  .classic-payment-paid span {
    font-size: 20px !important;
  }

  .classic-payment-paid input {
    min-height: 46px !important;
    font-size: 26px !important;
  }

  .classic-payment-keypad {
    grid-template-rows: 28px minmax(0, 1fr) !important;
    gap: 6px !important;
    padding: 8px !important;
  }

  .classic-payment-keypad-head strong {
    font-size: 22px !important;
  }

  .classic-payment-pad-grid {
    gap: 6px !important;
    grid-template-rows: repeat(4, minmax(42px, 1fr)) !important;
  }

  .classic-payment-pad-grid button {
    font-size: clamp(24px, 1.8vw, 30px) !important;
  }

  .classic-payment-summary-grid {
    gap: 7px !important;
  }

  .classic-payment-change {
    padding: 6px 12px !important;
  }

  .classic-payment-change strong {
    font-size: clamp(23px, 1.8vw, 30px) !important;
  }

  .classic-payment-status {
    display: flex !important;
    align-items: center !important;
    padding: 5px 12px !important;
    font-size: 16px !important;
  }

  .classic-payment-print,
  .classic-payment-note {
    grid-template-columns: 98px minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  .classic-payment-print span,
  .classic-payment-note span {
    font-size: 16px !important;
  }

  .classic-payment-print select,
  .classic-payment-note input {
    min-height: 34px !important;
    padding: 0 10px !important;
    font-size: 16px !important;
  }

  .classic-payment-modal-card .modal-actions {
    grid-template-columns: 210px minmax(0, 1fr) !important;
    gap: 7px !important;
  }

  .classic-payment-modal-card .modal-actions .btn {
    font-size: 24px !important;
  }

  #classicPaymentSubmitBtn {
    font-size: clamp(26px, 2vw, 34px) !important;
  }
}

@media (min-width: 1051px) and (max-height: 850px) {
  .classic-payment-modal-card {
    grid-template-rows: 66px 50px minmax(260px, 1fr) 44px 30px 34px 0 44px !important;
    gap: 5px !important;
    padding: 6px !important;
  }

  .classic-payment-header {
    grid-template-columns: minmax(0, 1fr) 170px minmax(250px, 310px) !important;
    padding: 5px 10px !important;
  }

  .classic-payment-header h2 {
    font-size: 22px !important;
  }

  .classic-payment-header p {
    font-size: 12px !important;
  }

  .classic-payment-back {
    font-size: 21px !important;
  }

  .classic-payment-due strong {
    font-size: clamp(25px, 2vw, 32px) !important;
  }

  .classic-payment-methods .payment-btn {
    font-size: 22px !important;
  }

  .classic-payment-workspace {
    grid-template-columns: minmax(300px, 0.82fr) minmax(360px, 1fr) !important;
    gap: 6px !important;
  }

  .classic-payment-paid {
    grid-template-columns: 76px minmax(0, 1fr) !important;
    padding: 5px 7px !important;
  }

  .classic-payment-paid span {
    font-size: 18px !important;
  }

  .classic-payment-paid input {
    min-height: 36px !important;
    font-size: 22px !important;
  }

  .classic-payment-keypad {
    grid-template-rows: 22px minmax(0, 1fr) !important;
    gap: 4px !important;
    padding: 5px !important;
  }

  .classic-payment-keypad-head strong {
    font-size: 18px !important;
  }

  .classic-payment-pad-grid {
    gap: 4px !important;
    grid-template-rows: repeat(4, minmax(34px, 1fr)) !important;
  }

  .classic-payment-pad-grid button {
    font-size: 22px !important;
  }

  .classic-payment-pad-grid button[data-classic-payment-pad="clear"],
  .classic-payment-pad-grid button[data-classic-payment-pad="back"],
  .classic-payment-pad-grid button[data-classic-payment-pad="exact"],
  .classic-payment-pad-grid button[data-classic-payment-pad="submit"] {
    font-size: 18px !important;
  }

  .classic-payment-change {
    padding: 4px 10px !important;
  }

  .classic-payment-change strong {
    font-size: 22px !important;
  }

  .classic-payment-status {
    padding: 3px 10px !important;
    font-size: 14px !important;
  }

  .classic-payment-print,
  .classic-payment-note {
    grid-template-columns: 82px minmax(0, 1fr) !important;
  }

  .classic-payment-print span,
  .classic-payment-note span {
    font-size: 14px !important;
  }

  .classic-payment-print select,
  .classic-payment-note input {
    min-height: 30px !important;
    font-size: 14px !important;
  }

  .classic-payment-modal-card .modal-actions {
    grid-template-columns: 170px minmax(0, 1fr) !important;
  }

  .classic-payment-modal-card .modal-actions .btn,
  #classicPaymentSubmitBtn {
    font-size: 22px !important;
  }
}

/* v1.0.186 cashier notices: keep prompts in the working area instead of covering the top. */
@media (min-width: 1051px) {
  .touch-register-layout .product-panel {
    grid-template-areas:
      "filters products"
      "filters productNotice" !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
  }

  .touch-register-layout .product-filter-row {
    grid-row: 1 / -1 !important;
  }

  .touch-register-layout .product-card-grid {
    grid-area: products !important;
  }

  .touch-register-layout .product-notice-bar {
    grid-area: productNotice !important;
    margin-top: 6px;
    min-height: 54px;
    padding: 9px 14px;
    font-size: clamp(18px, 1.45vw, 24px);
    box-shadow: inset 6px 0 0 #f4b942;
  }

  .touch-register-layout .product-notice-bar[hidden] {
    display: none !important;
  }
}

/* v1.0.194 cashier print visibility: show the channel in the classic register row. */
@media (min-width: 1051px) {
  .classic-top-actions {
    grid-template-columns: 0.9fr 1.05fr 0.85fr 1.15fr 1fr 0.9fr 0.8fr !important;
  }

  .classic-top-actions .classic-print-channel-chip {
    min-height: 0;
    height: auto;
    justify-content: center;
    border-width: 2px;
    border-radius: 0;
    padding: 0 8px;
    font-size: clamp(14px, 1.05vw, 20px);
    line-height: 1.12;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    box-shadow: inset 0 -4px 0 rgba(21, 62, 117, 0.08);
  }

  .classic-top-actions .classic-print-channel-chip[data-print-channel="browser"] {
    border-color: #d59b23;
    background: #fff7df;
    color: #7a4d00;
  }

  .classic-top-actions .classic-print-channel-chip[data-print-channel="local"] {
    border-color: #1f6fb2;
    background: #e8f1fb;
    color: #153e75;
  }

  .classic-payment-print .field-hint[data-print-channel="browser"] {
    border-color: #d59b23;
    background: #fff7df;
    color: #7a4d00;
  }

  .classic-payment-print .field-hint[data-print-channel="local"] {
    border-color: #1f6fb2;
    background: #e8f1fb;
    color: #153e75;
  }

  .classic-payment-print .field-hint[data-print-channel="manual"] {
    border-color: #b8c0c8;
    background: #f4f6f8;
    color: #5f6b75;
  }
}

/* v1.0.200 classic cashier update notice: show update entry even when the header banner is hidden. */
@media (min-width: 1051px) {
  .classic-top-actions:has(.classic-update-btn:not([hidden])) {
    grid-template-columns: 0.82fr 1fr 0.78fr 1.08fr 0.86fr 0.98fr 0.78fr 0.72fr !important;
  }

  .classic-update-btn:not([hidden]) {
    display: block;
    border-color: #d59b23 !important;
    background: #fff3bf !important;
    color: #7a4d00 !important;
    box-shadow:
      inset 0 -5px 0 rgba(122, 77, 0, 0.1),
      0 0 0 2px rgba(213, 155, 35, 0.18) !important;
  }

  .classic-update-btn:hover:not(:disabled),
  .classic-update-btn:focus-visible:not(:disabled) {
    border-color: #b7791f !important;
    background: #ffe8a3 !important;
    color: #663c00 !important;
  }
}
