/* ---------------------------------------------------------------- fonts */
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/pos/fonts/plex-ar-400.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB,
    U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F,
    U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42,
    U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B,
    U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77,
    U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9,
    U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/pos/fonts/plex-ar-500.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB,
    U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F,
    U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42,
    U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B,
    U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77,
    U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9,
    U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/pos/fonts/plex-ar-600.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB,
    U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F,
    U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42,
    U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B,
    U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77,
    U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9,
    U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/pos/fonts/plex-ar-700.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB,
    U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F,
    U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42,
    U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B,
    U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77,
    U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9,
    U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/pos/fonts/plex-lat-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/pos/fonts/plex-lat-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/pos/fonts/plex-lat-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/pos/fonts/plex-lat-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}

/* --------------------------------------------------------------- tokens */
:root {
  --ink: #f2f6fd;
  --ink-2: #e9f0fb;
  --panel: #ffffff;
  --panel-2: #f7f9ff;
  --card: #ffffff;
  --card-hover: #eef3ff;
  --line: #d8e2f4;
  --line-soft: #e7edfa;
  --text: #101b33;
  --muted: #5a6b88;
  --faint: #8a97b0;
  --brass: #2563eb;
  --brass-2: #1d4ed8;
  --brass-ink: #ffffff;
  --mint: #0f9d76;
  --clay: #d9534f;
  --sky: #3b82f6;
  --radius: 12px;
  --font: 'IBM Plex Sans Arabic', 'Segoe UI', 'Noto Naskh Arabic', Tahoma, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  /* IBM Plex Sans Arabic reads thin at till distance on a 15px body; 500 is the
     weight the Arabic cut was designed for and the file is already bundled. */
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
  background: var(--ink);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

button:disabled {
  cursor: not-allowed;
}

h1,
h2,
h3,
p {
  margin: 0;
}

svg {
  width: 20px;
  height: 20px;
  flex: none;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

::selection {
  background: var(--brass);
  color: var(--brass-ink);
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.muted {
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

/* scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: #c3d3ee transparent;
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-thumb {
  background: #c3d3ee;
  border-radius: 8px;
}

/* -------------------------------------------------------------- shared */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--brass);
  border: 1px solid #c9d8f2;
  background: #eef3ff;
  border-radius: 9px;
}

.mark svg {
  width: 21px;
  height: 21px;
}

.brand-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-tag {
  font-size: 10.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
  white-space: nowrap;
}

.brand-lg .mark {
  width: 40px;
  height: 40px;
}
.brand-lg .brand-name {
  font-size: 17px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.08s ease;
  white-space: nowrap;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--brass);
  color: var(--brass-ink);
  border-color: var(--brass);
}

.btn.primary:hover:not(:disabled) {
  background: var(--brass-2);
  border-color: var(--brass-2);
}

.btn.primary:disabled {
  background: #dbe7ff;
  border-color: #dbe7ff;
  color: #7f97c4;
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn.ghost:hover:not(:disabled) {
  background: var(--panel-2);
  border-color: #c7d6f2;
}

.btn.ghost:disabled {
  color: var(--faint);
  border-color: var(--line-soft);
}

.btn-lg {
  height: 52px;
  font-size: 15px;
}

.btn.danger {
  border-color: #f0c3bb;
  color: var(--clay);
  background: rgba(217, 83, 79, 0.06);
}

.text-btn {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 0;
}

.text-btn:hover {
  color: var(--text);
}

.text-btn.danger:hover {
  color: var(--clay);
}

.field {
  display: grid;
  gap: 6px;
}

.field > span {
  font-size: 12.5px;
  color: var(--muted);
}

.field input,
.field select {
  height: 48px;
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.14s ease;
}

.field input::placeholder {
  color: var(--faint);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--brass);
}

.money-input {
  position: relative;
  display: flex;
  align-items: center;
}

.money-input input {
  padding-inline-end: 52px;
}

.money-input .suffix {
  position: absolute;
  inset-inline-end: 14px;
  font-size: 12px;
  color: var(--faint);
  pointer-events: none;
}

.form-error {
  font-size: 12.5px;
  color: var(--clay);
  background: rgba(217, 83, 79, 0.08);
  border: 1px solid rgba(217, 83, 79, 0.25);
  border-radius: 8px;
  padding: 9px 12px;
}

/* --------------------------------------------------------------- login */
.login {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  height: 100dvh;
  overflow: hidden;
}

.login-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px;
  background: var(--ink);
  border-inline-end: 1px solid var(--line);
  overflow: hidden;
}

.login-art::after {
  content: '';
  position: absolute;
  inset-inline-start: 48px;
  bottom: 116px;
  width: 1px;
  height: 72px;
  background: var(--brass);
  opacity: 0.5;
}

.login-art-main {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.ghost-number {
  font-size: clamp(96px, 13vw, 190px);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.045em;
  color: transparent;
  -webkit-text-stroke: 1px #cbb887;
  margin-bottom: 26px;
  user-select: none;
}

.login-art h1 {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.1;
  font-weight: 700;
  max-width: 13ch;
}

.login-art-sub {
  margin-top: 16px;
  max-width: 38ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.login-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

.login-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.login-strip span::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--brass);
  border-radius: 1px;
}

.login-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  background: var(--ink-2);
}

.login-panel form {
  width: 100%;
  max-width: 372px;
  margin-inline: auto;
}

.login-panel h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 6px 0 8px;
}

.login-sub {
  font-size: 13.5px;
  line-height: 1.65;
  margin-bottom: 26px;
}

.login-panel .field {
  margin-bottom: 14px;
}

.login-panel .btn {
  width: 100%;
}

.login-panel .btn.primary {
  margin-top: 6px;
}

.login-panel .btn.ghost {
  margin-top: 10px;
  height: 42px;
  font-size: 12.5px;
}

.login-lang {
  position: absolute;
  top: 22px;
  inset-inline-end: 26px;
}

.login-foot {
  position: absolute;
  bottom: 22px;
  inset-inline: 0;
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  padding: 0 24px;
}

/* ---------------------------------------------------------------- gate */
.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--ink);
}

.gate-card {
  width: min(430px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  display: grid;
  gap: 13px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.gate-rule {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}

.gate-card h2 {
  font-size: 24px;
  font-weight: 700;
}

.gate-card > .muted {
  font-size: 12.5px;
  margin-bottom: 4px;
}

.gate-card .btn {
  width: 100%;
}

/* --------------------------------------------------------------- shell */
.shell {
  height: 100dvh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: 8px;
  min-width: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.chip:hover {
  border-color: #c7d6f2;
  background: var(--panel-2);
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.chip-dot.live {
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(15, 157, 118, 0.12);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(15, 157, 118, 0.1);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(15, 157, 118, 0.04);
  }
}

.chip-time {
  color: var(--muted);
  font-size: 11.5px;
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 7px;
}

/* Sync state: amber while sales wait for the network, red when the server
   refused one and a manager has to look. Hidden when there is nothing to say. */
.chip.sync-chip[hidden] {
  display: none;
}

.chip.warn {
  background: #fff8e8;
  border-color: #f0cf8a;
  color: #8a5a00;
}

.chip.warn .chip-dot {
  background: #d99a00;
}

.chip.danger {
  background: #fbe9e5;
  border-color: #e8b4a9;
  color: #b03a2e;
}

.chip.danger .chip-dot {
  background: #c0392b;
}

/* The idle state is a real button, not decoration: a cashier who thinks a sale
   is stuck can press it and get an honest answer instead of waiting. */
.chip.sync-chip.ok {
  background: var(--panel);
  border-color: var(--line);
  color: var(--muted);
}

.chip.sync-chip.ok .chip-dot {
  background: var(--mint);
}

.chip.sync-chip:active:not([hidden]) {
  transform: scale(0.98);
}

.receipt-offline {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid #f0cf8a;
  border-radius: 8px;
  background: #fff8e8;
  color: #8a5a00;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  transition: background 0.14s ease, color 0.14s ease;
}

.icon-btn:hover {
  background: var(--panel-2);
  color: var(--text);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.badge {
  position: absolute;
  top: 3px;
  inset-inline-end: 3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brass);
  color: var(--brass-ink);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.lang-btn {
  height: 32px;
  min-width: 38px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  transition: border-color 0.14s ease, color 0.14s ease;
}

.lang-btn:hover {
  border-color: var(--brass);
  color: var(--brass-2);
}

.user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 8px;
  min-width: 0;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eef3ff;
  border: 1px solid #c9d8f2;
  color: var(--brass-2);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  flex: none;
}

.user-text {
  display: grid;
  line-height: 1.25;
  min-width: 0;
}

.user-text strong {
  font-size: 12.5px;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-text small {
  font-size: 10.5px;
  color: var(--faint);
}

/* ------------------------------------------------------------ workspace */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 396px;
  min-height: 0;
  background: var(--ink);
}

.catalog {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px 22px 0;
}

.catalog-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Paid add-ons: menu and price-list pickers sit beside the search field. */
.scope-pickers {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scope-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.scope-pick select {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: inherit;
  outline: none;
  max-width: 160px;
}

.scope-pick select:disabled {
  opacity: 0.55;
}

@media (max-width: 980px) {
  .catalog-head {
    flex-wrap: wrap;
  }
  .scope-pickers {
    order: 3;
    width: 100%;
  }
  .scope-pick {
    flex: 1;
  }
}

.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.14s ease;
}

.search:focus-within {
  border-color: #c9d8f2;
}

.search svg {
  width: 18px;
  height: 18px;
  color: var(--faint);
}

.search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 14px;
}

.search input::placeholder {
  color: var(--faint);
}

.search input::-webkit-search-cancel-button {
  filter: invert(0.6);
}

.search kbd {
  font-family: inherit;
  font-size: 10px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

.catalog-count {
  font-size: 11.5px;
  color: var(--faint);
  white-space: nowrap;
}

/* The menu sections live in a rail on the side: an icon per section at rest,
 * the full name once the cashier expands it. Chips above the grid pushed the
 * products down and turned into a horizontal scroll on a 15" till. */
.catalog-body {
  display: flex;
  gap: 14px;
  flex: 1;
  min-height: 0;
  padding-top: 12px;
}

.cat-rail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 88px;
  flex: 0 0 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 18px;
  scrollbar-width: none;
  transition: width 0.18s ease;
}

.cat-rail::-webkit-scrollbar {
  display: none;
}

.cat-rail.expanded {
  width: 190px;
}

.cat-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px dashed var(--line);
  border-radius: 13px;
  background: transparent;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
}

.cat-toggle:hover {
  border-color: #c7d6f2;
  color: var(--text);
}

.cat-toggle svg {
  width: 15px;
  height: 15px;
  transition: transform 0.18s ease;
}

.cat-rail.expanded .cat-toggle {
  justify-content: flex-start;
  padding: 0 12px;
}

.cat-rail.expanded .cat-toggle svg {
  transform: rotate(180deg);
}

.cat-toggle-label {
  display: none;
}

.cat-rail.expanded .cat-toggle-label {
  display: inline;
}

.cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 64px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  transition: all 0.14s ease;
}

.cat-chip .cat-ico {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.cat-chip .cat-ico svg {
  width: 21px;
  height: 21px;
}

.cat-chip .cat-name {
  display: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.cat-rail.expanded .cat-chip {
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px;
  text-align: start;
}

.cat-rail.expanded .cat-chip .cat-name {
  display: block;
}

.cat-chip:hover {
  border-color: #c7d6f2;
  color: var(--text);
}

.cat-chip.active {
  background: rgba(37, 99, 235, 0.12);
  border-color: #2563eb;
  color: var(--brass-2);
  font-weight: 600;
}

@media (max-width: 1100px) {
  .cat-rail {
    width: 72px;
  }
  .cat-rail.expanded {
    width: 168px;
  }
}

.product-grid {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  /* Rows are sized by their tallest tile, so a tile with a photo grows to fit
     the photo plus its name and price instead of clipping them. `auto` alone
     can settle on the smallest tile in a scrolling grid. */
  grid-auto-rows: max-content;
  gap: 10px;
  align-content: start;
  padding-bottom: 22px;
  padding-inline-end: 2px;
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  /* The photo is the point of the card: it fills the width as a square (capped
     so a wide grid does not grow huge), and the name and the price share the
     small strip under it. */
  min-height: 0;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: start;
  overflow: hidden;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.08s ease;
}

.product::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent, var(--brass));
  opacity: 0.85;
  z-index: 3;
}

.product:hover:not(:disabled) {
  background: var(--card);
  border-color: #c7d6f2;
}

.product:active:not(:disabled) {
  transform: scale(0.985);
}

.product:disabled {
  opacity: 0.45;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Photo on top, text underneath — never over the picture.
   4:3 so the card stays short. The whole photo is shown (`contain`), never
   cropped: the frame stays the same and the empty sides keep the panel tone. */
.product-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  max-height: 120px;
  flex: 0 0 auto;
  object-fit: contain;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel-2);
  transition: transform 0.35s ease;
}

/* The whole photo stays visible: no hover zoom, so nothing is ever cropped. */
.product.has-image:hover .product-cover {
  transform: none;
}

/* No photo: a soft tint of the category colour with the product initial, so the
   card keeps the same shape and the name/price stay aligned with the rest. */
.product-cover-blank {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-cover-blank::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent, var(--brass));
  opacity: 0.1;
}

.product-cover-blank span {
  position: relative;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent, var(--brass));
  opacity: 0.6;
}

.product-body {
  display: flex;
  flex-direction: column;
  /* `flex-basis: auto`, not 0: with 0 the column's intrinsic height collapses
     to the image alone and the name/price get clipped inside the tile. */
  flex: 1 1 auto;
  min-width: 0;
  /* The name and the price sit right on top of each other: the photo is the
     big element, this strip is only the label. */
  justify-content: flex-end;
  gap: 2px;
  padding: 4px 10px 6px;
}

.product-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}

.product-price {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--brass-2);
  font-variant-numeric: tabular-nums;
}

.product-price small {
  font-size: 10px;
  font-weight: 400;
  color: var(--faint);
  margin-inline-start: 3px;
}

.product-add {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #c7d6f2;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  transition: all 0.14s ease;
}

.product:hover .product-add {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--brass-ink);
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--faint);
  text-align: center;
  padding: 30px;
}

.empty-state strong {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.empty-state span {
  font-size: 12px;
}

/* --------------------------------------------------------------- ticket */
.ticket {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border-inline-start: 1px solid var(--line);
}

.ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px 8px;
}

.ticket-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticket-title h2 {
  font-size: 16px;
  font-weight: 600;
}

.order-no {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
  font-variant-numeric: tabular-nums;
}

.ticket-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ticket-head-actions .tool-btn {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 10px;
  max-width: 150px;
}

.tool-btn.compact {
  border-style: solid;
  border-color: var(--line);
  background: var(--panel-2);
}

.tool-btn.compact svg {
  width: 14px;
  height: 14px;
}

.tool-btn.icon-only {
  flex: 0 0 38px;
  width: 38px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.tool-dots {
  display: block;
  margin-top: -6px;
  letter-spacing: 1px;
}

.order-meta {
  display: grid;
  gap: 8px;
  padding: 0 18px 10px;
}

.seg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 3px;
  background: var(--ink-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}

.seg button {
  height: 32px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.14s ease;
}

.seg button:hover {
  color: var(--text);
}

.seg button.active {
  background: var(--panel-2);
  color: var(--brass-2);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line);
}

.table-btn {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed #c7d6f2;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12.5px;
  transition: all 0.14s ease;
}

.table-btn:hover {
  border-color: var(--brass);
  color: var(--brass-2);
}

.table-btn svg {
  width: 16px;
  height: 16px;
}

.lines {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 18px 8px;
}

.line {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.line-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.line-name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

.line-sub {
  font-size: 11px;
  color: var(--faint);
  margin-top: 2px;
}

.line-remove {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--faint);
  display: grid;
  place-items: center;
  flex: none;
}

.line-remove:hover {
  color: var(--clay);
  background: rgba(217, 83, 79, 0.1);
}

.line-remove svg {
  width: 15px;
  height: 15px;
}

.line-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--ink-2);
}

.stepper button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 15px;
  transition: background 0.12s ease, color 0.12s ease;
}

.stepper button:hover:not(:disabled) {
  background: var(--panel-2);
  color: var(--text);
}

.stepper button:disabled {
  color: #8a97b0;
}

.stepper .qty {
  min-width: 32px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.line-total {
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cart-empty {
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  color: var(--faint);
  padding: 20px;
}

.cart-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px dashed #c7d6f2;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.cart-empty-icon svg {
  width: 22px;
  height: 22px;
}

.cart-empty strong {
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 600;
}

.cart-empty span {
  font-size: 12px;
  max-width: 22ch;
}

.ticket-foot {
  border-top: 1px solid var(--line);
  padding: 14px 18px 18px;
  background: var(--panel);
}

.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  margin-bottom: 6px;
}

.total-row > span:first-child {
  color: var(--muted);
}

.total-row.muted > span:first-child {
  color: var(--faint);
}

.total-row.grand {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
}

.total-row.grand > span:first-child {
  color: var(--text);
}

.grand-value {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--brass-2);
}

.grand-value .num {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.grand-value small {
  font-size: 11px;
  color: var(--faint);
  font-weight: 400;
}

.ticket-actions {
  display: grid;
  grid-template-columns: 1fr 1.9fr;
  gap: 8px;
  margin-top: 14px;
}

.ticket-actions .btn {
  height: 52px;
}

.pay-btn {
  justify-content: space-between;
  padding-inline: 16px;
}

.pay-amount {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

.pay-amount small {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.75;
}

.hold-btn svg {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------- modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(4, 8, 6, 0.74);
  animation: fade 0.14s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.modal {
  width: min(540px, 100%);
  max-height: calc(100dvh - 44px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  animation: rise 0.18s ease;
}

@keyframes rise {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
}

.modal.wide {
  width: min(720px, 100%);
}

.modal.narrow {
  width: min(440px, 100%);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 14px;
  background: var(--panel);
  border-bottom: 1px solid transparent;
}

.modal-head h3 {
  font-size: 18px;
  font-weight: 700;
}

.modal-head p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
}

.modal-close:hover {
  background: var(--panel-2);
  color: var(--text);
}

.modal-close svg {
  width: 17px;
  height: 17px;
}

.modal-body {
  padding: 6px 22px 22px;
  display: grid;
  gap: 14px;
}

.modal-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 0 22px 22px;
}

.modal-foot .btn {
  min-width: 120px;
}

/* ------------------------------------------------------------- payment */
.pay-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--ink-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}

.pay-total-label {
  font-size: 12px;
  color: var(--muted);
}

.pay-total-value {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: var(--brass-2);
}

.pay-total-value strong {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pay-total-value small {
  font-size: 12px;
  color: var(--faint);
}

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

.method {
  height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11.5px;
  transition: all 0.14s ease;
}

.method svg {
  width: 19px;
  height: 19px;
}

.method:hover {
  border-color: #c7d6f2;
  color: var(--text);
}

.method.active {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  color: var(--brass-2);
}

.tender {
  display: grid;
  gap: 8px;
}

.quick {
  display: flex;
  gap: 6px;
}

.quick button {
  flex: 1;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transition: all 0.12s ease;
}

.quick button:hover {
  border-color: var(--brass);
  color: var(--brass-2);
}

.change-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13px;
  padding: 2px 2px 0;
}

.change-row strong {
  font-size: 17px;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}

.change-row strong.due {
  color: var(--clay);
}

details.tax {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

details.tax summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

details.tax summary::-webkit-details-marker {
  display: none;
}

details.tax summary::before {
  content: '+';
  color: var(--brass);
  font-size: 15px;
  line-height: 1;
}

details.tax[open] summary::before {
  content: '−';
}

.tax-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.split-row {
  display: grid;
  grid-template-columns: 1fr 108px 32px;
  gap: 6px;
  align-items: center;
}

.split-row select,
.split-row input {
  height: 40px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12.5px;
  min-width: 0;
}

.split-row input {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.split-row .remove {
  height: 32px;
  border-radius: 7px;
  color: var(--faint);
  display: grid;
  place-items: center;
}

.split-row .remove:hover {
  color: var(--clay);
  background: rgba(217, 83, 79, 0.1);
}

.split-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.split-remaining {
  font-size: 12px;
  color: var(--muted);
}

.split-remaining strong {
  color: var(--brass-2);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- receipt */
.receipt-wrap {
  display: grid;
  gap: 14px;
}

.receipt {
  width: 306px;
  margin: 0 auto;
  background: #ffffff;
  color: #171512;
  padding: 18px 16px 16px;
  border-radius: 3px;
  font-size: 11.5px;
  line-height: 1.55;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.receipt .r-logo {
  display: block;
  max-width: 128px;
  max-height: 54px;
  margin: 0 auto 8px;
  object-fit: contain;
}

.receipt .r-head {
  text-align: center;
  font-size: 10px;
  color: #4a463c;
  margin-top: 4px;
  white-space: pre-line;
}

.receipt .r-brand {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.receipt .r-meta {
  text-align: center;
  font-size: 10px;
  color: #5c574c;
  margin-top: 2px;
}

.receipt .r-doc {
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  margin: 7px 0 3px;
}

.receipt .r-num {
  text-align: center;
  font-size: 10.5px;
  color: #5c574c;
  font-variant-numeric: tabular-nums;
}

.receipt .r-rule {
  border-top: 1px dashed #c7bfab;
  margin: 10px 0;
}

.receipt .r-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.receipt .r-row span:first-child {
  color: #4c473d;
}

.receipt .r-line {
  margin-bottom: 6px;
}

.receipt .r-line-name {
  font-weight: 600;
}

.receipt .r-line-alt {
  display: block;
  font-weight: 400;
  font-size: 10px;
  color: #5c574c;
  direction: ltr;
  text-align: start;
}

.receipt .r-line-sub {
  display: flex;
  justify-content: space-between;
  color: #5c574c;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.receipt .r-grand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid #171512;
  margin-top: 8px;
  padding-top: 6px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.receipt .r-pay {
  margin-top: 8px;
  font-size: 10.5px;
  color: #4c473d;
}

.receipt .r-qr {
  display: block;
  width: 108px;
  height: 108px;
  margin: 10px auto 6px;
  background: #fff;
}

.receipt .r-note {
  text-align: center;
  font-size: 9.5px;
  color: #6b6557;
  margin-top: 6px;
}

.receipt .r-thanks {
  text-align: center;
  font-size: 10.5px;
  color: #4c473d;
  margin-top: 4px;
}

.receipt .r-uuid {
  text-align: center;
  font-size: 8px;
  color: #8a8374;
  margin-top: 4px;
  word-break: break-all;
  direction: ltr;
}

/* Document banner and structured blocks.
   "Simplified tax invoice" is a legal statement, so it is boxed and centred
   instead of being another line of small print. */
.receipt .r-banner {
  margin: 10px 0 8px;
  padding: 8px 10px;
  border: 1.5px solid #171512;
  border-radius: 4px;
  text-align: center;
  background: #f7f5ef;
}

.receipt .r-banner strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.3;
}

.receipt .r-banner span {
  display: block;
  font-size: 8.5px;
  letter-spacing: 1.1px;
  color: #5c574c;
  margin-top: 2px;
}

.receipt .r-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 10px;
  border: 1px solid #e2ddd0;
  border-radius: 4px;
  padding: 7px 9px;
  margin-bottom: 8px;
}

.receipt .r-meta-item span {
  display: block;
  font-size: 8.5px;
  color: #7a7365;
}

.receipt .r-meta-item strong {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
}

.receipt .r-meta-item.wide {
  grid-column: 1 / -1;
}

.receipt .r-items-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #171512;
  padding-bottom: 3px;
  margin-bottom: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #4c473d;
}

.receipt .r-total-box {
  border: 1px solid #e2ddd0;
  border-radius: 4px;
  padding: 7px 9px;
  margin-top: 8px;
  background: #fbfaf6;
}

.receipt .r-qr-wrap {
  display: grid;
  justify-items: center;
  gap: 2px;
  margin-top: 10px;
}

.receipt .r-qr-wrap span {
  font-size: 8.5px;
  color: #7a7365;
}

.receipt-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Post-payment notice: a confirmation, not the invoice. */
.pay-success {
  text-align: center;
  padding: 8px 4px 2px;
}
.pay-success-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  background: #16a34a;
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.24);
}
.pay-success-amount {
  display: block;
  font-size: 30px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.pay-success p {
  margin: 0 auto 14px;
  max-width: 36ch;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}
.pay-success-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  font-size: 12.5px;
}
.pay-success-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ------------------------------------------------------- refund picker */
.refund-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: var(--panel-2);
}

.refund-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12.5px;
}

.refund-all {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
}

.refund-lines {
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow-y: auto;
}

.refund-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--panel);
}

.refund-check {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.refund-check > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.refund-check strong {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.refund-check small {
  font-size: 10.5px;
  color: var(--faint);
}

.refund-qty {
  width: 78px;
  flex: 0 0 auto;
  text-align: center;
}

.refund-qty:disabled {
  opacity: 0.45;
}

.refund-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
}

.refund-total strong {
  color: var(--brass-2);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- lists */
.list {
  display: grid;
  gap: 7px;
  max-height: 58dvh;
  overflow-y: auto;
  padding-inline-end: 2px;
}

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 13px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  text-align: start;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.list-row:hover {
  border-color: #9db8ea;
  background: var(--card);
}

.list-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
}

.list-sub {
  font-size: 11px;
  color: var(--faint);
  margin-top: 3px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.list-amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--brass-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pill {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}

.pill.held {
  border-color: #bfd2f5;
  color: var(--brass-2);
  background: rgba(37, 99, 235, 0.08);
}

.pill.credit {
  border-color: #f0c3bb;
  color: var(--clay);
}

.list-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.mini-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

.mini-btn:hover {
  border-color: var(--brass);
  color: var(--brass-2);
}

.mini-btn.danger:hover {
  border-color: #e8b4a9;
  color: var(--clay);
}

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

.table-cell {
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.14s ease;
}

.table-cell strong {
  font-size: 13px;
  font-weight: 600;
}

.table-cell small {
  font-size: 10px;
  color: var(--faint);
}

.table-cell:hover {
  border-color: #9db8ea;
}

.table-cell.occupied {
  border-color: rgba(217, 83, 79, 0.35);
  background: rgba(217, 83, 79, 0.06);
}

.table-cell.occupied small {
  color: #b5544a;
}

.table-cell.selected {
  border-color: var(--brass);
  background: rgba(37, 99, 235, 0.1);
}

.table-cell.selected strong {
  color: var(--brass-2);
}

/* --------------------------------------------------------------- shift */
.kv {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  background: var(--ink-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
}

.kv-row span:first-child {
  color: var(--muted);
}

.kv-row strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.movement-form {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
}

.movement-form .field input {
  height: 42px;
}

.movement-form .reason {
  grid-column: 1 / -1;
}

.variance {
  border: 1px solid rgba(217, 83, 79, 0.3);
  background: rgba(217, 83, 79, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: #a83a2c;
  display: grid;
  gap: 4px;
}

.variance .kv-row span:first-child {
  color: #b5544a;
}

/* --------------------------------------------------------------- toast */
.toast-root {
  position: fixed;
  inset-inline: 0;
  bottom: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  padding: 0 16px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(440px, 100%);
  padding: 10px 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.18s ease;
}

.toast.success {
  border-color: #c7d6f2;
}
.toast.success::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
}

.toast.error {
  border-color: #f0c3bb;
}
.toast.error::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clay);
}

@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

/* --------------------------------------------------------------- print */
#print-root {
  display: none;
}

@media print {
  @page {
    size: 80mm auto;
    margin: 0;
  }

  body {
    background: #fff;
  }

  body > *:not(#print-root) {
    display: none !important;
  }

  #print-root {
    display: block !important;
  }

  #print-root .receipt {
    width: 80mm;
    margin: 0;
    padding: 4mm;
    border-radius: 0;
    box-shadow: none;
    font-size: 10.5pt;
  }

  #print-root .receipt .r-qr {
    width: 30mm;
    height: 30mm;
  }
}

/* ---------------------------------------------------------- responsive */
@media (max-width: 1200px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 356px;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  }
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
  .user-text {
    display: none;
  }
  .login-art {
    padding: 34px;
  }
}

@media (max-width: 820px) {
  .shell {
    grid-template-rows: 58px minmax(0, 1fr);
  }
  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .ticket {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
    max-height: 46dvh;
  }
  .lines {
    min-height: 60px;
  }
  .catalog {
    padding: 12px 14px 0;
  }
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .brand-tag,
  .catalog-count,
  .search kbd {
    display: none;
  }
  .topbar-meta {
    margin-inline-start: 0;
  }
  .chip {
    padding: 0 9px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-art {
    display: none;
  }
}

@media (max-width: 560px) {
  .brand-name {
    display: none;
  }
  .methods {
    grid-template-columns: repeat(2, 1fr);
  }
  .tables-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .tax-fields {
    grid-template-columns: 1fr;
  }
  .modal {
    border-radius: 14px;
  }
  .modal-backdrop {
    padding: 12px;
  }
  .ticket-actions {
    grid-template-columns: 1fr 1.6fr;
  }
  .receipt {
    width: 100%;
    max-width: 306px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------- service floor additions */
.shell:has(#offline-banner:not([hidden])) {
  grid-template-rows: 36px 64px minmax(0, 1fr);
}

.offline-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  background: #fbe9e5;
  border-bottom: 1px solid #e8b4a9;
  color: #b03a2e;
  font-size: 12px;
  font-weight: 500;
}

.offline-banner[hidden] {
  display: none;
}

.ticket-tools {
  display: flex;
  gap: 7px;
  padding: 0 16px 10px;
}

.tool-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 10px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}

.tool-btn:hover {
  border-color: #9db8ea;
  color: var(--text);
}

.tool-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.tool-btn.has-customer {
  border-style: solid;
  border-color: #9db8ea;
  background: var(--panel-2);
  color: var(--text);
}

.tool-btn.has-discount {
  border-style: solid;
  border-color: #bfd2f5;
  background: rgba(37, 99, 235, 0.08);
  color: var(--brass-2);
}

.tool-btn[hidden] {
  display: none;
}

/* ----------------------------------------------------------- item picker */
.picker {
  display: grid;
  gap: 14px;
}

.pick-group {
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}

.pick-group.invalid {
  border-color: #e8b4a9;
}

.pick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 13px;
}

.pick-head .req {
  font-style: normal;
  font-size: 10px;
  color: var(--brass-2);
  border: 1px solid #bfd2f5;
  border-radius: 999px;
  padding: 1px 6px;
  margin-inline-start: 6px;
}

.pick-hint {
  font-size: 11px;
  color: var(--faint);
  white-space: nowrap;
}

.pick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pick-option {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 12.5px;
}

.pick-option:hover {
  border-color: #9db8ea;
}

.pick-option.active {
  border-color: var(--brass);
  background: rgba(37, 99, 235, 0.12);
  color: var(--brass-2);
}

.pick-price {
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.pick-option.active .pick-price {
  color: var(--brass-2);
}

.pick-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.pick-total small {
  display: block;
  font-size: 10px;
  color: var(--faint);
  margin-bottom: 2px;
}

.pick-total strong {
  font-size: 18px;
  color: var(--brass-2);
  font-variant-numeric: tabular-nums;
}

.pick-total strong small {
  display: inline;
  font-size: 10px;
  color: var(--faint);
}

/* -------------------------------------------------------------- customer */
.cust-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  margin-bottom: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}

.cust-current small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 11px;
}

.cust-current[hidden] {
  display: none;
}

.search.compact {
  margin-bottom: 10px;
  height: 42px;
}

.list-empty {
  padding: 22px 12px;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.list-row.static {
  cursor: default;
}

/* -------------------------------------------------------------- discount */
#disc-mode {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 12px;
}

.quick-row {
  display: flex;
  gap: 8px;
  margin: 12px 0 4px;
}

.quick-btn {
  flex: 1;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  transition: border-color 0.14s ease, color 0.14s ease;
}

.quick-btn:hover {
  border-color: var(--brass);
  color: var(--brass-2);
}

.muted.small {
  font-size: 11px;
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

/* --------------------------------------------------------------- reports */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.kpi {
  padding: 11px 13px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  min-width: 0;
}

.kpi span {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.kpi.big strong {
  font-size: 19px;
  color: var(--brass-2);
}

.rep-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

.rep-col h4 {
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.rep-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
}

.rep-row:last-child {
  border-bottom: 0;
}

.rep-row .num {
  font-weight: 600;
  color: var(--brass-2);
  font-variant-numeric: tabular-nums;
}

.rep-meta {
  color: var(--faint);
  font-size: 11px;
}

/* ----------------------------------------------------------------- admin */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
}

.tabs button:hover {
  background: var(--panel-2);
  color: var(--text);
}

.tabs button.active {
  background: var(--brass);
  color: var(--brass-ink);
  font-weight: 600;
}

.admin-section {
  margin-bottom: 18px;
}

.admin-section h4 {
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.admin-list {
  display: grid;
  gap: 7px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 130px auto;
  gap: 9px;
  align-items: end;
  padding: 9px 11px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}

.admin-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-name strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-name small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 10.5px;
}

.mini-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mini-field span {
  font-size: 10px;
  color: var(--faint);
}

.mini-field input,
.mini-field select {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 12.5px;
}

.btn.sm {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.mod-card {
  padding: 10px 12px;
  margin-bottom: 7px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}

.mod-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 12.5px;
}

.mod-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mod-chip {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10.5px;
}

.check-list {
  display: grid;
  gap: 6px;
  max-height: 200px;
  margin-bottom: 12px;
  overflow: auto;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 12.5px;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--brass);
}

.field textarea {
  width: 100%;
  padding: 9px 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  resize: vertical;
}

.field textarea:focus {
  outline: none;
  border-color: #c9d8f2;
}

@media (max-width: 720px) {
  .admin-row {
    grid-template-columns: 1fr 1fr;
  }

  .rep-cols {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .ticket-tools {
    padding-inline: 12px;
  }
}

/* ============================================================ side rail === */
.shell-body {
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.rail {
  flex: 0 0 auto;
  width: 158px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 9px;
  background: var(--ink-2);
  border-inline-end: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.16s ease;
}

.rail.collapsed {
  width: 72px;
}

.rail-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-align: start;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.rail-btn:hover {
  background: var(--panel);
  color: var(--text);
}

.rail-btn.active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.32);
  color: var(--brass-2);
}

.rail-btn svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.rail-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail.collapsed .rail-label {
  display: none;
}

.rail.collapsed .rail-btn {
  justify-content: center;
  padding: 0;
}

.rail-sep {
  height: 1px;
  margin: 7px 6px;
  background: var(--line);
}

.rail-toggle {
  margin-top: auto;
  color: var(--faint);
}

.rail-badge {
  position: absolute;
  inset-inline-end: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brass);
  color: var(--brass-ink);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.rail.collapsed .rail-badge {
  inset-inline-end: 3px;
  top: 4px;
}

.screen-host {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.screen-host > .workspace {
  flex: 1;
  min-height: 0;
}

.screen {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 26px 30px;
  background: var(--ink);
}

.screen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.screen-head h2 {
  margin: 3px 0 5px;
  font-size: 25px;
  font-weight: 700;
  color: var(--text);
}

.screen-head .muted {
  font-size: 13px;
  max-width: 620px;
}

.screen-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* tenant identity in the top bar */
.topbar-tenant {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-inline-start: 14px;
  border-inline-start: 1px solid var(--line);
  line-height: 1.25;
}

.topbar-tenant strong {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 230px;
}

.topbar-tenant small {
  font-size: 10.5px;
  color: var(--brass);
  letter-spacing: 0.06em;
}

/* delivery channel */
.delivery-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.delivery-picker-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.delivery-picker select {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink-2);
  color: var(--text);
  padding: 0 9px;
  font-size: 13px;
}

/* tables screen */
.tables-screen-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
}

.table-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-height: 132px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  text-align: start;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.14s ease, background 0.14s ease;
}

.table-card:hover {
  transform: translateY(-2px);
  border-color: #c7d6f2;
  background: var(--panel-2);
}

.table-card.occupied {
  border-color: rgba(217, 83, 79, 0.55);
  background: rgba(217, 83, 79, 0.08);
}

.table-card.selected {
  border-color: var(--brass);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4) inset;
}

.table-card .tc-name {
  font-size: 20px;
  font-weight: 700;
}

.table-card .tc-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.table-card .tc-state {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--mint);
}

.table-card.occupied .tc-state {
  color: var(--clay);
}

.table-card .tc-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.table-card .tc-total {
  font-size: 13px;
  color: var(--brass-2);
  font-weight: 600;
}

.tables-screen-empty {
  grid-column: 1 / -1;
  padding: 50px 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

/* printers screen */
.printers-pane {
  display: grid;
  gap: 16px;
}

.printers-pane .admin-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.printers-pane .admin-section h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--brass-2);
  letter-spacing: 0.02em;
}

.printers-pane .mod-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ink-2);
  padding: 14px;
  margin-top: 12px;
}

.discovery-results {
  margin-bottom: 16px;
  padding: 15px 17px;
  border: 1px solid rgba(15, 157, 118, 0.4);
  border-radius: 14px;
  background: rgba(15, 157, 118, 0.06);
}

.discovery-results h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--mint);
}

.discovery-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.discovery-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.discovery-chip:hover {
  border-color: var(--mint);
}

.discovery-chip small {
  color: var(--muted);
  font-size: 10.5px;
}

.discovery-note {
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--faint);
}

.discovery-count {
  margin-inline-start: 6px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 500;
}

.seg.sm {
  width: 268px;
  flex: 0 0 auto;
}

.seg.sm button {
  height: 30px;
  font-size: 11.5px;
}

.section-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--ink-2);
  font-size: 12px;
}

.section-check input {
  accent-color: var(--brass);
}

@media (max-width: 1100px) {
  /* The rail is icon-first on a narrow till, but the cashier can still open the
     full names with the toggle; the choice is saved per device. The tenant name
     and store code stay on screen at every width, only tighter. */
  .topbar-tenant { padding-inline-start: 10px; }
  .topbar-tenant strong { max-width: 140px; font-size: 12px; }
  .topbar-tenant small { font-size: 9.5px; }
  .brand-tag { display: none; }
}

@media (max-width: 820px) {
  .shell-body { flex-direction: column; }
  .rail {
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 7px 8px;
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
  }
  .rail .rail-btn { min-height: 42px; min-width: 48px; }
  .rail-sep, .rail-toggle { display: none; }
  .screen { padding: 16px; }
  .screen-head { flex-direction: column; }
}

/* ---------------------------------------------------- category bar ---- */
.cat-bar { flex: 0 0 auto; padding: 12px 2px 2px; }
/* One row that scrolls, never a second row: a menu with thirty categories must
   not push the product grid down. */
.cat-bar .cat-list {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scroll-behavior: smooth;
  padding-bottom: 6px;
}
.cat-bar .cat-list::-webkit-scrollbar { height: 6px; }
.cat-bar .cat-list::-webkit-scrollbar-thumb {
  background: #c7d6f2;
  border-radius: 999px;
}
.cat-bar .cat-list::-webkit-scrollbar-track { background: transparent; }
.cat-bar .cat-chip { flex-direction: row; min-height: 38px; padding: 6px 13px; border-radius: 999px; font-size: 12.5px; white-space: nowrap; }
.cat-bar .cat-chip .cat-name { display: block; }
.cat-bar .cat-chip .cat-ico { width: 20px; height: 20px; }
.cat-bar .cat-chip .cat-ico svg { width: 17px; height: 17px; }
.cat-bar .cat-chip.active { background: var(--brass); border-color: var(--brass); color: #fff; }
.cat-bar .cat-chip.active .cat-ico { color: #fff; }

/* The brand tile is the sky-blue anchor of the top bar. */
.mark { background: var(--brass); border-color: var(--brass); color: #fff; }

/* ------------------------------------------------------------ till PIN */
/* The PIN pad is the front door: a shared till should ask for four digits and
   nothing else. The email form is folded behind the manager link below it. */
.login-panel { overflow-y: auto; }
.pin-form { padding-bottom: 8px; }
.pin-form .eyebrow { margin-bottom: 6px; }
.pin-form h2 { font-size: 21px; margin: 0 0 16px; }
.pin-store-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 372px;
  margin: 0 auto 16px;
  padding: 9px 13px;
  border-radius: 12px;
  background: var(--blue-soft, #eff6ff);
  color: var(--muted);
  font-size: 12px;
}
.pin-store-chip strong { color: var(--navy, #0b1f3a); letter-spacing: 0.04em; }
.pin-link {
  margin-inline-start: auto;
  border: 0;
  background: transparent;
  color: var(--brass);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.login-manager-toggle {
  display: block;
  width: 100%;
  max-width: 372px;
  margin: 14px auto 4px;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 8px;
}
.login-manager-toggle:hover { color: var(--ink); }
.pin-display {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 6px 0 14px;
}
.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.pin-dot.on {
  background: var(--brass);
  border-color: var(--brass);
}
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 300px;
  margin: 0 auto 10px;
}
.pin-pad button {
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.1s ease, transform 0.06s ease;
}
.pin-pad button:active { transform: scale(0.96); }
.pin-pad button:hover { background: var(--card-hover); }
.pin-pad button.pin-soft {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--panel-2);
}
.pin-pad.shake { animation: pin-shake 0.28s ease; }
@keyframes pin-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ---------------------------------------------------- receipt order no. */
.receipt .r-order {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  margin: 4px 0 8px;
  letter-spacing: 0.5px;
}
.receipt .r-order span {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6a6457;
  margin-top: 4px;
}

/* ------------------------------------------------------ payment editor */
.pay-edit-row {
  display: grid;
  grid-template-columns: 1fr 120px 34px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.pay-edit-row select,
.pay-edit-row input {
  height: 40px;
}
.pay-edit-row .icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--clay);
  cursor: pointer;
}
.pay-edit-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  margin: 10px 0 14px;
  font-size: 13px;
}
.pay-edit-total strong { font-size: 16px; }
.pay-edit-total.bad strong { color: var(--clay); }
.pay-edit-total.ok strong { color: var(--mint); }

/* -------------------------------------------------------- Z report */
.z-report { font-size: 13px; }
.z-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--panel);
}
.z-section h4 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.z-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
}
.z-row.total {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 8px;
  font-weight: 700;
  font-size: 15px;
}
.z-row .neg { color: var(--clay); }
.z-row .pos { color: var(--mint); }
.z-empty { color: var(--faint); font-size: 12px; }
.z-items .z-row span:first-child { max-width: 60%; }
.z-items .z-row span:last-child { text-align: end; }
.z-report-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------ support ---- */
.icon-badge {
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}
.support-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  max-height: 46vh;
  overflow-y: auto;
  background: var(--paper, #f6f9ff);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.support-msg { display: flex; flex-direction: column; gap: 3px; max-width: 80%; }
.support-msg.out { align-self: flex-end; align-items: flex-end; }
.support-msg.in { align-self: flex-start; align-items: flex-start; }
.support-bubble {
  padding: 9px 12px;
  border-radius: 13px;
  font-size: 12.5px;
  line-height: 1.8;
  background: #fff;
  border: 1px solid var(--line);
  /* `--ink` is the page canvas, not a text colour: using it here painted white
     text on a white bubble, so support replies were invisible. */
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.support-msg.out .support-bubble {
  background: var(--brass);
  border-color: var(--brass);
  color: #fff;
  border-end-end-radius: 4px;
}
.support-msg.in .support-bubble { border-end-start-radius: 4px; }
.support-meta { font-size: 10px; color: var(--faint); padding: 0 4px; }
.support-composer { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.support-composer textarea {
  flex: 1;
  resize: vertical;
  min-height: 44px;
  max-height: 120px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 13px;
  background: #fff;
}
.support-composer textarea:focus { outline: 2px solid var(--brass-soft, #dbeafe); border-color: var(--brass); }


/* --------------------------------------------------------------- OTA ---- */
.ota-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 12.5px;
}
.ota-banner strong { letter-spacing: 0.03em; }
.ota-dismiss {
  border: 0;
  background: transparent;
  color: #1e3a8a;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 6px;
}
.ota-dismiss:hover { background: rgba(30, 58, 138, 0.1); }


/* ------------------------------------------- order and item notes ---- */
/* The note is an instruction, not a product: it sits between the line and
   its stepper, and it is repeated on the receipt and kitchen ticket. */
.line-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.line-note-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--faint);
  font-size: 13px;
  display: grid;
  place-items: center;
  flex: none;
}
.line-note-btn:hover { color: var(--amber); background: rgba(230, 168, 62, 0.12); }
.line-note-btn.has-note { color: var(--amber); }
.line-note {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--amber);
  line-height: 1.4;
  word-break: break-word;
}
.order-note-banner {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(230, 168, 62, 0.12);
  border: 1px solid rgba(230, 168, 62, 0.3);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}
.order-note-icon { color: var(--amber); flex: none; }
.tool-btn.has-note { color: var(--amber); border-color: rgba(230, 168, 62, 0.45); }

/* ------------------------------------------------------- deposit ---- */
.deposit-box {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--ink-2);
}
.deposit-hint { margin: 6px 0 0; font-size: 11px; color: var(--faint); line-height: 1.45; }
.deposit-collect { margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--mint); }

/* ------------------------------------------------ receipt additions ---- */
.receipt .r-line-note {
  font-size: 10px;
  color: #8a6d1f;
  margin-top: 1px;
  line-height: 1.35;
}
.receipt .r-order-note {
  margin-top: 6px;
  padding: 4px 6px;
  border: 1px dashed #c9b98a;
  border-radius: 4px;
  font-size: 10.5px;
  color: #5d4a12;
  line-height: 1.4;
}
.receipt .r-deposit {
  font-size: 10.5px;
  color: #5d4a12;
  border-top: 1px dashed #d8cba6;
  margin-top: 3px;
  padding-top: 3px;
}

/* --------------------------------------------------- report range ---- */
.rep-range {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 10px 0 4px;
  flex-wrap: wrap;
}
.rep-range .field { margin: 0; min-width: 150px; }
.rep-range input[type='date'] { direction: ltr; }

/* ------------------------------------------------- receipt polish ---- */
/* A thermal receipt is read at arm's length across a counter. The hierarchy
   below is deliberately blunt: brand, document type, number, then money. */
.receipt {
  border-top: 4px solid #171512;
  padding-top: 14px;
}
.receipt .r-brand {
  font-size: 16px;
  letter-spacing: 0.2px;
}
.receipt .r-doc {
  display: inline-block;
  margin: 8px auto 2px;
  padding: 2px 12px;
  border: 1px solid #171512;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.4px;
}
.receipt .r-num {
  font-size: 11px;
  font-weight: 600;
  color: #171512;
}
.receipt .r-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  margin-bottom: 8px;
  border-radius: 4px;
  background: #171512;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.receipt .r-order span { font-weight: 400; font-size: 9.5px; opacity: 0.8; }
.receipt .r-line-name { font-size: 11.5px; }
.receipt .r-line-sub { font-size: 10.5px; }
.receipt .r-row { font-size: 11px; padding: 1px 0; }
.receipt .r-grand {
  border-top: 2px solid #171512;
  margin-top: 10px;
  padding-top: 8px;
  font-size: 16px;
}
.receipt .r-pay {
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px dashed #c7bfab;
  font-size: 10.5px;
}
.receipt .r-qr {
  width: 116px;
  height: 116px;
  margin: 12px auto 6px;
  padding: 4px;
  border: 1px solid #e2dbc9;
  border-radius: 4px;
}
.receipt .r-thanks {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #c7bfab;
  font-weight: 600;
}
