/* =====================================================================
   PART 1: BASE: fonts, colours, app shell, counter, orders, modals, forms
   ===================================================================== */

@font-face {
  font-family: 'Montserrat';
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/montserrat-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Great Vibes';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/great-vibes-latin-400-normal.woff2') format('woff2');
}

:root {
  --maroon: #5f0b0b;
  --maroon-2: #801212;
  --red: #d90000;
  --red-d: #b30000;
  --red-l: #fce6e3;
  --red-rgb: 217, 0, 0; /* the accent as r, g, b: used for glows, focus rings and shadows */
  --btn-a: #e80c0c; /* primary button gradient (top, bottom) and its hover pair */
  --btn-b: #c20000;
  --btn-ha: #f01616;
  --btn-hb: #b80000;
  --pill-bg: #c40000;
  --paper: #faf1da;
  --paper-2: #fff8e6;
  --card: #fffdf8;
  --cream: #fff0c2;
  --ink: #27160f;
  --ink2: #4b352b;
  --muted: #6e5a4b;
  --line: #ebddba;
  --line-2: #f3e8cb;
  --green: #1e8e3e;
  --green-l: #ddf3e4;
  --amber: #b7791f;
  --amber-l: #fff0c7;
  --blue-l: #e4ecfb;
  --r: 16px;
  --rail: 96px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow-s: 0 1px 2px rgba(95, 11, 11, 0.06), 0 4px 14px rgba(95, 11, 11, 0.05);
  --shadow-m: 0 2px 4px rgba(95, 11, 11, 0.06), 0 16px 36px rgba(95, 11, 11, 0.12);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
/* =====================================================================
   TOUCH AND TABLET
   Makes the POS behave like an app on iPads and tablets: the page itself never scrolls, slides or
   zooms. Only the lists inside it scroll, and they never pull the page along at their ends.
   (js/device.js adds the parts CSS cannot do: old iPads, pinch zoom, keyboard.)
   ===================================================================== */

/* The height of the app. Modern browsers: 100dvh (the visible height, even with a moving toolbar).
   Older iPads do not know dvh, so js/device.js measures the window and sets --app-h itself. */
:root {
  --app-h: 100vh;
}
@supports (height: 100dvh) {
  :root {
    --app-h: 100dvh;
  }
}

html {
  -webkit-text-size-adjust: 100%; /* iOS must not enlarge text when the tablet is turned sideways */
  text-size-adjust: 100%;
  touch-action: pan-x pan-y; /* swipe and scroll yes, pinch zoom and double-tap zoom no */
}
html,
body {
  height: 100%;
  overflow: hidden; /* the page itself never scrolls */
  overscroll-behavior: none; /* and never rubber-bands */
}

/* Every area that scrolls keeps its scrolling to itself: reaching the end does not drag the page. */
#view,
.item-grid,
.cart-scroll,
.modal-body,
.rail-nav,
.lock,
.tbl-wrap,
.hm-wrap,
.chips,
.tabbar,
.ts-in,
.qr-alert,
.so-list,
.sup-thread,
#ops-root {
  overscroll-behavior: contain;
}

/* A POS is tapped, not read: no accidental text selection, no long-press menu, no dragged images.
   Text boxes and anything marked .selectable stay normal. */
body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input,
textarea,
.selectable,
.wa-box {
  -webkit-user-select: text;
  user-select: text;
}
img,
a {
  -webkit-user-drag: none;
}

body {
  font:
    500 14px/1.45 'Montserrat',
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(128, 18, 18, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 18, 18, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}
input,
select,
textarea {
  font: inherit;
  font-size: 16px;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 3px solid rgba(var(--red-rgb), 0.45);
  outline-offset: 2px;
}
h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--maroon);
}
h2 {
  font-size: 20px;
  font-weight: 800;
}
h3 {
  font-size: 15px;
  font-weight: 700;
}
.hide {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.center {
  text-align: center;
}
.mt {
  margin-top: 12px;
}
.mb {
  margin-bottom: 12px;
}
.mono {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.nowrap {
  white-space: nowrap;
}
.pre {
  white-space: pre-wrap;
}
.grow {
  flex: 1;
}
.ic {
  width: 20px;
  height: 20px;
  flex: none;
}
.wordmark {
  /* --brand-font and --brand-scale are set by SOBrand (js/theme-boot.js) when the cafe picks a name font */
  font-family: var(--brand-font, 'Great Vibes', 'Brush Script MT', cursive);
  font-weight: 400;
  color: var(--maroon);
  font-size: calc(34px * var(--brand-scale, 1));
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.wordmark.xl {
  font-size: calc(52px * var(--brand-scale, 1));
  margin: 4px 0 2px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- shell ---------- */
#app {
  height: var(--app-h);
}
.shell {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  height: 100%;
}
.rail {
  background: linear-gradient(180deg, var(--maroon-2) 0%, var(--maroon) 100%);
  color: var(--paper-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px 12px;
  gap: 10px;
  min-height: 0;
  box-shadow: 2px 0 18px rgba(95, 11, 11, 0.25);
  z-index: 2;
}
.rail-logo {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #fff;
  flex: none;
  box-shadow: 0 0 0 3px rgba(255, 240, 194, 0.35);
}
.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  flex: 1;
  overflow-y: auto;
  margin-top: 10px;
  scrollbar-width: none;
}
.rail-foot {
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 240, 194, 0.18);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 248, 230, 0.72);
  width: 100%;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.nav-item.active {
  background: var(--paper-2);
  color: var(--maroon);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.logout-item:hover {
  background: rgba(var(--red-rgb), 0.5);
}
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 62px;
  padding: 0 20px;
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  flex: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.top-logo {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.clock {
  font-weight: 600;
  color: var(--ink2);
  font-size: 13px;
}
.net {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px 4px 22px;
  border-radius: 999px;
  position: relative;
}
.net::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: currentColor;
}
.cloud {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.cloud.hide {
  display: none;
}
.cloud.ok {
  color: #146c2e;
  background: var(--green-l);
}
.cloud.busy {
  color: #8a5a00;
  background: var(--amber-l);
}
.cloud.off {
  color: #5a4a36;
  background: #efe6cc;
}
.cloud.err {
  color: #a80000;
  background: var(--red-l);
}
.net.on {
  color: var(--green);
  background: var(--green-l);
}
.net.off {
  color: #a80000;
  background: var(--red-l);
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--maroon);
  color: var(--paper-2);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}
.logout-btn {
  color: var(--red-d);
  border-color: #f0c9c2;
}
.logout-btn:hover {
  background: var(--red-l);
}
#view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#view.view-pos {
  overflow: hidden;
}
.appfoot {
  display: flex;
  justify-content: center;
  gap: 14px;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.9);
  border-top: 1px solid var(--line);
  flex: none;
  text-align: center;
}
.tabbar {
  display: none;
}
.view-head,
.pad {
  width: 100%;
  max-width: 1480px;
  margin-inline: auto;
}
.view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 24px 8px;
}
.head-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pad {
  padding: 10px 24px 28px;
}

/* ---------- controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 13px;
  font-weight: 700;
  font-size: 14px;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition:
    transform 0.08s,
    background 0.15s,
    box-shadow 0.15s;
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn.primary {
  background: linear-gradient(180deg, var(--btn-a), var(--btn-b));
  color: #fff;
  box-shadow:
    0 6px 16px rgba(var(--red-rgb), 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn.primary:hover {
  background: linear-gradient(180deg, var(--btn-ha), var(--btn-hb));
}
.btn.dark {
  background: var(--maroon);
  color: #fff;
}
.btn.dark:hover {
  background: var(--maroon-2);
}
.btn.ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover {
  background: var(--paper-2);
  border-color: #dfcb98;
}
.btn.wa {
  background: #1fa855;
  color: #fff;
}
.btn.danger {
  background: #b00020;
  color: #fff;
}
.btn.sm {
  height: 36px;
  padding: 0 13px;
  font-size: 13px;
  border-radius: 11px;
}
.btn.sm .ic {
  width: 17px;
  height: 17px;
}
.btn.icon-only {
  width: 46px;
  padding: 0;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-grid;
  place-items: center;
}
.icon-btn:hover {
  background: var(--line-2);
}
.danger-text {
  color: #b00020 !important;
}
.wa-text {
  color: #1fa855;
}
.link {
  color: var(--red);
  font-weight: 700;
  text-decoration: underline;
  padding: 0 4px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  min-width: 0;
}
.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink2);
}
.field label i {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
}
.block-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--maroon);
}
input:not([type='checkbox']),
select,
textarea {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
textarea {
  height: auto;
  padding: 11px 14px;
  resize: vertical;
}
input::placeholder,
textarea::placeholder {
  color: #b6a592;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(var(--red-rgb), 0.1);
}
input[readonly] {
  background: #f6efdb;
  color: var(--muted);
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inline input,
.inline select {
  flex: 1;
  min-width: 0;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  font-weight: 600;
  cursor: pointer;
}
.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--red);
  margin-top: 1px;
  flex: none;
}
.check small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 12.5px;
}
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.seg {
  display: inline-flex;
  background: #f2e7c8;
  border-radius: 13px;
  padding: 4px;
  gap: 2px;
}
.seg button {
  padding: 8px 15px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink2);
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background 0.15s;
}
.seg button.on {
  background: #fff;
  color: var(--red-d);
  box-shadow: 0 1px 4px rgba(95, 11, 11, 0.18);
}
.seg.full {
  display: flex;
}
.seg.full button {
  flex: 1;
}
.pill {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar {
  display: none;
}
.chips-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  flex: none;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.chip:hover {
  border-color: #dcc58a;
}
.chip small {
  opacity: 0.65;
  font-weight: 700;
}
.chip-e {
  font-size: 16px;
  line-height: 1;
}
.chip.on {
  background: var(--maroon);
  border-color: var(--maroon);
  color: #fff;
}
.chip.sm {
  padding: 5px 11px;
  font-size: 12px;
}
.chip.special {
  border-color: #e2b84c;
  background: #fff4ce;
}
.chip.special.on {
  background: var(--maroon);
  border-color: var(--maroon);
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 0 13px;
  height: 46px;
  flex: 1;
  min-width: 150px;
  color: var(--muted);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.search:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(var(--red-rgb), 0.1);
}
.search input {
  border: 0 !important;
  box-shadow: none !important;
  padding: 0;
  height: 100%;
  background: transparent;
}
.search.sm {
  height: 42px;
  flex: none;
  width: 220px;
}
.date-in {
  width: auto !important;
  height: 42px !important;
}
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #efe6cc;
  color: #5a4a36;
  white-space: nowrap;
}
.tag.new {
  background: var(--blue-l);
  color: #1e40af;
}
.tag.preparing {
  background: var(--amber-l);
  color: #8a5a00;
}
.tag.ready,
.tag.paid {
  background: var(--green-l);
  color: #146c2e;
}
.tag.served,
.tag.off {
  background: #efe6cc;
  color: #5a4a36;
}
.tag.cancelled,
.tag.unpaid {
  background: var(--red-l);
  color: #a80000;
}
.vdot {
  width: 15px;
  height: 15px;
  border: 1.6px solid var(--green);
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  flex: none;
  background: #fff;
}
.vdot::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}
.vdot.nv {
  border-color: #b00020;
}
.vdot.nv::after {
  background: #b00020;
}
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--amber-l);
  border: 1px solid #f0d98a;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 13px;
  margin-bottom: 12px;
}
.banner.warn {
  background: #fff1cc;
  border-color: #f0cf73;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.empty b {
  color: var(--ink);
  font-size: 15px;
}
.empty p {
  max-width: 320px;
}
.empty.big {
  padding: 64px 12px;
}
.empty.small {
  padding: 12px;
  font-size: 13px;
}
.empty-ico {
  font-size: 38px;
  line-height: 1.1;
}
.switch {
  width: 46px;
  height: 27px;
  border-radius: 999px;
  background: #d9cfb3;
  position: relative;
  transition: background 0.15s;
}
.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.switch.on {
  background: var(--green);
}
.switch.on i {
  transform: translateX(19px);
}
.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

/* ---------- tables / panels / kpis ---------- */
.tbl-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-s);
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.tbl th {
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  padding: 12px 16px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl th.num {
  text-align: right;
}
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.tbl tr:last-child td {
  border-bottom: 0;
}
.tbl.clickable tbody tr {
  cursor: pointer;
}
.tbl.clickable tbody tr:hover {
  background: var(--paper-2);
}
.w-min {
  width: 1%;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-s);
}
.panel > h3,
.panel-head h3 {
  margin-bottom: 12px;
  color: var(--maroon);
  font-size: 16px;
  font-weight: 800;
}
.panel h3 small {
  font-weight: 500;
  color: var(--muted);
  font-size: 12.5px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.panel-head h3 {
  margin: 0;
}
.cols2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.count {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--maroon);
  font-size: 12px;
  font-weight: 800;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow-s);
}
.kpi span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.kpi b {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.kpi small {
  color: var(--muted);
  font-size: 12.5px;
}
.kpi.hero {
  background: linear-gradient(160deg, var(--maroon-2), var(--maroon));
  border-color: var(--maroon);
  color: var(--paper-2);
}
.kpi.hero span,
.kpi.hero small {
  color: rgba(255, 248, 230, 0.78);
}
.kpi.hero b {
  font-size: 32px;
}
.kpis.sm {
  grid-template-columns: repeat(3, 1fr);
}
.kpis.sm .kpi b {
  font-size: 18px;
}
.kpis.sm .kpi {
  padding: 11px 13px;
  box-shadow: none;
}
.hbar {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 11px 0;
  font-size: 13.5px;
}
.hbar .hv {
  height: 10px;
  background: #f3e9cc;
  border-radius: 6px;
  overflow: hidden;
}
.hbar .hv i {
  display: block;
  height: 100%;
  background: var(--red);
  border-radius: 0 5px 5px 0;
}
.hbar b {
  min-width: 72px;
  text-align: right;
}
.chart-wrap {
  position: relative;
}
.chart-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}
.chart-wrap .gl {
  stroke: #efe3c2;
  stroke-width: 1;
}
.chart-wrap .al {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.chart-wrap .bar {
  fill: var(--red);
}
.chart-wrap .hit:hover {
  fill: rgba(var(--red-rgb), 0.06);
}
.tip {
  position: absolute;
  pointer-events: none;
  background: var(--maroon);
  color: #fff;
  border-radius: 11px;
  padding: 7px 12px;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  box-shadow: var(--shadow-m);
  z-index: 5;
}
.tip b {
  font-size: 14px;
}

/* ---------- POS ---------- */
.pos {
  display: grid;
  grid-template-columns: 1fr 410px;
  height: 100%;
}
.pos-menu {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  padding: 16px 18px 0;
}
.pos-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.item-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
  align-content: start;
  padding: 4px 2px 24px;
}
.item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: stretch;
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 8px 8px 11px;
  transition:
    transform 0.08s,
    border-color 0.15s,
    box-shadow 0.15s;
  box-shadow: var(--shadow-s);
}
.item:hover {
  border-color: #dcc58a;
}
.item:active {
  transform: scale(0.97);
}
.item-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 72px;
  border-radius: 14px;
}
.emo {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(95, 11, 11, 0.15));
}
.item-name {
  flex: none;
  padding: 0 5px;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.28;
  min-height: 35px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5px;
}
.item-price {
  color: var(--red-d);
  font-weight: 800;
  font-size: 15px;
}
.item.off {
  opacity: 0.5;
}
.soldout {
  position: absolute;
  left: 14px;
  top: 14px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #b00020;
  padding: 2px 8px;
  border-radius: 999px;
}
.badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 26px;
  height: 26px;
  border-radius: 13px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: none;
  place-items: center;
  padding: 0 7px;
  box-shadow: 0 2px 6px rgba(var(--red-rgb), 0.4);
}
.badge.on {
  display: inline-grid;
}
.badge.bump {
  animation: bump 0.28s ease-out;
}
@keyframes bump {
  0% {
    transform: scale(0.6);
  }
  60% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}
.item:has(.badge.on) {
  border-color: var(--red);
  background: var(--paper-2);
  box-shadow:
    0 0 0 3px rgba(var(--red-rgb), 0.1),
    var(--shadow-s);
}
.pos-cart {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--card);
  border-left: 1px solid var(--line);
  box-shadow: -6px 0 24px rgba(95, 11, 11, 0.06);
}
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.cart-head b {
  font-size: 17px;
  font-weight: 800;
  color: var(--maroon);
}
.only-sheet {
  display: none;
}
.cart-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  -webkit-overflow-scrolling: touch;
}
.cart-scroll > .seg {
  margin-bottom: 12px;
}
.block {
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 13px 13px 4px;
  margin-top: 12px;
}
.block-title {
  margin-bottom: 10px;
}
.block:has(#cart-lines) {
  background: #fff;
}
.cust-badge {
  font-size: 12.5px;
  color: var(--ink2);
  min-height: 4px;
  padding-bottom: 8px;
}
.err-text {
  color: #b00020;
  font-weight: 600;
}
.line {
  display: grid;
  grid-template-columns: 1fr auto 64px;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
}
.line:last-child {
  border-bottom: 0;
}
.line-name {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.3;
}
.line-note {
  font-size: 12px;
  color: var(--muted);
  text-align: left;
  padding: 2px 0 0 23px;
}
.line-note:hover {
  color: var(--red);
}
.stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #f5ecd2;
  border-radius: 12px;
}
.stepper button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.stepper button:active {
  background: #e9dbb0;
}
.stepper .ic {
  width: 16px;
  height: 16px;
}
.stepper span {
  min-width: 22px;
  text-align: center;
  font-weight: 800;
}
.line-amt {
  text-align: right;
  font-weight: 800;
}
.cp-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  padding: 8px 11px;
  border-radius: 11px;
  margin: 4px 0 8px;
}
.cp-status.ok {
  background: var(--green-l);
  color: #146c2e;
}
.cp-status.err {
  background: var(--red-l);
  color: #a80000;
}
.cp-status .ic {
  width: 16px;
  height: 16px;
}
.cp-status span {
  flex: 1;
}
#cart-totals {
  margin-top: 14px;
  padding: 12px 14px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.trow {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13.5px;
  color: var(--ink2);
}
.trow b {
  color: var(--ink);
}
.trow.neg b {
  color: var(--green);
}
.trow.grand {
  font-size: 17px;
  font-weight: 800;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1.5px dashed var(--line);
  color: var(--maroon);
}
.trow.grand b {
  font-size: 26px;
  color: var(--maroon);
  letter-spacing: -0.02em;
}
.trow.grand small {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.cart-foot {
  display: flex;
  gap: 8px;
  padding: 12px 16px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--card);
}
.cart-foot .btn {
  height: 54px;
  font-size: 15px;
  border-radius: 15px;
}
.cart-foot .btn.primary {
  justify-content: space-between;
  padding: 0 20px;
  font-size: 16px;
}
.cart-foot .btn.primary b {
  font-size: 20px;
  font-weight: 800;
}
.cart-fab {
  display: none;
}

/* ---------- orders ---------- */
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.col h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 800;
  color: var(--maroon);
}
.col h3 i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3b6be6;
}
.col.c-preparing h3 i {
  background: #e9a100;
}
.col.c-ready h3 i {
  background: var(--green);
}
.col-empty {
  border: 2px dashed var(--line);
  border-radius: var(--r);
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}
.col-tabs {
  display: none;
}
.ogrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}
.ocard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px 10px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-s);
  position: relative;
  overflow: hidden;
}
.ocard::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: #cfc2a0;
}
.ocard.st-new::before {
  background: #3b6be6;
}
.ocard.st-preparing::before {
  background: #e9a100;
}
.ocard.st-ready::before {
  background: var(--green);
}
.ocard.st-cancelled::before {
  background: var(--red);
}
.ocard.st-cancelled {
  opacity: 0.78;
}
.ogrid .ocard {
  margin: 0;
}
.ocard header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding-top: 4px;
}
.otitle {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.otitle b {
  display: block;
  font-size: 14px;
}
.otitle small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
.tok {
  flex: none;
  min-width: 48px;
  height: 48px;
  padding: 0 8px;
  border-radius: 14px;
  background: var(--maroon);
  color: var(--paper-2);
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
}
.oside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: none;
}
.age {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green);
}
.age .ic {
  width: 15px;
  height: 15px;
}
.age.warn {
  color: var(--amber);
}
.age.late {
  color: #c20000;
}
.age.quiet {
  color: var(--muted);
}
.olist {
  list-style: none;
  margin: 12px 0 4px;
  padding: 10px 12px;
  background: var(--paper-2);
  border-radius: 12px;
  font-size: 13.5px;
}
.olist li {
  display: flex;
  gap: 8px;
  padding: 3px 0;
}
.olist li b {
  min-width: 28px;
  color: var(--maroon);
}
.olist small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.onote {
  background: var(--amber-l);
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 12.5px;
  margin-top: 6px;
}
.steps {
  display: flex;
  margin: 14px 0 6px;
}
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  position: relative;
  padding: 2px 0;
  cursor: pointer;
}
.step i {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #d8cba9;
  background: #fff;
  position: relative;
  z-index: 1;
  transition: background 0.15s;
}
.step::before {
  content: '';
  position: absolute;
  top: 9px;
  left: -50%;
  right: 50%;
  height: 2px;
  background: #e3d6b4;
}
.step:first-child::before {
  display: none;
}
.step.done i {
  background: var(--green);
  border-color: var(--green);
}
.step.done::before,
.step.now::before {
  background: var(--green);
}
.step.now i {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(var(--red-rgb), 0.15);
}
.step.now {
  color: var(--ink);
  cursor: default;
}
.step:hover:not(:disabled) i {
  border-color: var(--red);
}
.ocard footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  flex-wrap: wrap;
}
.otot {
  font-size: 21px;
  font-weight: 800;
  color: var(--maroon);
  letter-spacing: -0.01em;
}
.otot small {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.oact {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.oact .btn .ic {
  width: 16px;
  height: 16px;
}
.osub {
  display: flex;
  gap: 2px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line-2);
}
.osub button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink2);
}
.osub button:hover {
  background: var(--line-2);
}
.osub .ic {
  width: 16px;
  height: 16px;
}

/* ---------- modals / toast ---------- */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(40, 8, 8, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.15s;
}
.modal-back.in {
  opacity: 1;
}
.modal {
  background: var(--card);
  border-radius: 24px;
  width: min(560px, 100%);
  max-height: calc(var(--app-h) * 0.94);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(40, 8, 8, 0.4);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.2s;
  overflow: hidden;
}
.modal-back.in .modal {
  transform: none;
}
.modal.sm {
  width: min(410px, 100%);
}
.modal.md {
  width: min(640px, 100%);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px 12px 22px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--maroon);
}
.modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-foot {
  display: flex;
  gap: 8px;
  padding: 12px 22px calc(16px + var(--safe-b));
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  background: var(--card);
}
.pay-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: linear-gradient(160deg, var(--maroon-2), var(--maroon));
  color: var(--paper-2);
  padding: 14px 18px;
  border-radius: 16px;
  margin-bottom: 16px;
  font-weight: 600;
}
.pay-total b {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.pay-modal .seg {
  margin-bottom: 16px;
}
.quick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.pay-hint {
  min-height: 24px;
  font-weight: 700;
  margin-top: 6px;
}
.pay-hint.ok {
  color: var(--green);
  font-size: 16px;
}
.pay-hint.err {
  color: #b00020;
}
.upi-box {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
}
.upi-qr {
  width: 192px;
  flex: none;
  padding: 10px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-s);
}
.upi-qr svg {
  width: 100%;
  height: auto;
  display: block;
}
.upi-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.upi-meta b {
  font-size: 26px;
  color: var(--maroon);
}
.upi-meta span {
  font-weight: 700;
  word-break: break-all;
}
.upi-meta small {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.upi-box.sm .upi-qr {
  width: 120px;
}
.bill-modal .modal-body {
  background: #f4ead0;
}
.success {
  text-align: center;
  margin-bottom: 14px;
}
.tick {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  box-shadow: 0 0 0 8px var(--green-l);
  animation: pop 0.35s ease-out;
}
.tick .ic {
  width: 32px;
  height: 32px;
  stroke-width: 2.6;
}
@keyframes pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  70% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.success p {
  color: var(--ink2);
  font-weight: 600;
  margin-top: 2px;
}
.change-due {
  margin-top: 10px;
  display: inline-block;
  background: var(--amber-l);
  padding: 9px 18px;
  border-radius: 12px;
  font-size: 16px;
}
.bill-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.bill-actions .btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 12px;
}
.bill-modal .modal-foot {
  padding-left: 16px;
  padding-right: 16px;
}
#toast-root {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(60px + var(--safe-b));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 300;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-m);
  opacity: 0;
  transform: translateY(10px);
  transition: 0.25s;
  max-width: min(92vw, 480px);
}
.toast.in {
  opacity: 1;
  transform: none;
}
.toast.err {
  background: #b00020;
}
.toast.ok {
  background: #146c2e;
}

/* ---------- login ---------- */
#lock-root:empty {
  display: none;
}
.lock {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background-color: var(--maroon);
  background-image:
    radial-gradient(circle at 20% 15%, rgba(var(--red-rgb), 0.35), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(255, 240, 194, 0.14), transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size:
    auto,
    auto,
    24px 24px,
    24px 24px;
}
.lock-card {
  background: var(--paper-2);
  border-radius: 30px;
  padding: 28px 30px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  width: min(380px, 100%);
}
.lock-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-m);
}
.lock-sub {
  color: var(--muted);
  font-weight: 600;
}
.dots {
  display: flex;
  gap: 14px;
  margin: 16px 0 4px;
}
.dots i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--maroon);
  transition: background 0.1s;
}
.dots i.on {
  background: var(--red);
  border-color: var(--red);
}
.lock-msg {
  min-height: 20px;
  color: #b00020;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 76px);
  gap: 12px;
  margin-top: 6px;
}
.keypad button {
  height: 66px;
  border-radius: 50%;
  background: #fff;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(95, 11, 11, 0.14);
  transition:
    background 0.1s,
    transform 0.08s;
}
.keypad button:active {
  background: var(--red);
  color: #fff;
  transform: scale(0.94);
}
.lock-foot {
  margin-top: 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 248, 230, 0.75);
}
.shake {
  animation: shake 0.35s;
}
@keyframes shake {
  20%,
  60% {
    transform: translateX(-10px);
  }
  40%,
  80% {
    transform: translateX(10px);
  }
}
.fatal {
  max-width: 460px;
  margin: 20vh auto;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- receipt (screen preview + print) ---------- */
.receipt {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 11.5px;
  line-height: 1.4;
  color: #000;
  background: #fff;
  width: 100%;
  font-weight: 500;
}
.receipt-preview .receipt {
  max-width: 310px;
  margin: 0 auto;
  padding: 16px 14px;
  border-radius: 6px;
  box-shadow: var(--shadow-m);
}
.r-center {
  text-align: center;
}
.r-right {
  text-align: right;
}
.r-b {
  font-weight: 700;
}
.r-big {
  font-size: 15px;
}
.r-small {
  font-size: 10px;
  line-height: 1.35;
}
.r-logo {
  width: 30mm;
  max-width: 55%;
  display: block;
  margin: 0 auto 3px;
}
.r-biz {
  font-family: var(--brand-font, inherit); /* the cafe's chosen name font, if any */
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.r-hr {
  border-top: 1px dashed #000;
  margin: 6px 0;
}
.r-hr.dbl {
  border-top: 2px solid #000;
}
.r-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.r-row > span:last-child {
  text-align: right;
}
.r-item {
  margin: 4px 0;
}
.r-name {
  font-weight: 700;
}
.r-name small {
  font-weight: 500;
}
.r-total {
  font-size: 15px;
  font-weight: 800;
}
.r-qr {
  width: 36mm;
  max-width: 60%;
  margin: 8px auto 0;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
}
.r-qr svg {
  width: 100%;
  height: auto;
  display: block;
}
.r-stamp {
  border: 2px solid #000;
  text-align: center;
  font-weight: 800;
  font-size: 16px;
  padding: 4px;
  margin: 8px 0;
}
.kot .kot-item {
  font-size: 14px;
  font-weight: 700;
  margin: 5px 0;
}
.kot-q {
  display: inline-block;
  min-width: 38px;
}
#print-area {
  display: none;
}

@media print {
  html,
  body {
    height: auto;
    overflow: visible;
    background: #fff;
  }
  #app,
  #modal-root,
  #toast-root,
  #lock-root {
    display: none !important;
  }
  #print-area {
    display: block;
  }
  .paper-80 .receipt {
    width: 72mm;
    margin: 0 auto;
    padding: 3mm 0;
  }
  .paper-58 .receipt {
    width: 50mm;
    margin: 0 auto;
    padding: 2mm 0;
    font-size: 10.5px;
  }
  .paper-58 .r-biz {
    font-size: 14px;
  }
  .paper-a4 .receipt {
    width: 100%;
    max-width: 130mm;
    margin: 0 auto;
    font-size: 13px;
  }
  .paper-a4 .r-biz {
    font-size: 22px;
  }
  .paper-a4 .r-small {
    font-size: 12px;
  }
  .paper-a4 .r-logo {
    width: 28mm;
  }
  .receipt {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .pos {
    grid-template-columns: 1fr 360px;
  }
  .board {
    grid-template-columns: 1fr 1fr;
  }
  .clock {
    display: none;
  }
}
@media (max-width: 900px) {
  .pos {
    grid-template-columns: 1fr;
  }
  .pos-cart {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: calc(var(--app-h) * 0.05);
    z-index: 60;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 44px rgba(40, 8, 8, 0.3);
    transform: translateY(105%);
    transition: transform 0.25s;
    border-left: 0;
  }
  .pos-cart.open {
    transform: none;
  }
  .only-sheet {
    display: inline-grid;
  }
  .cart-fab {
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    left: calc(var(--rail) + 14px);
    right: 14px;
    bottom: calc(44px + var(--safe-b));
    z-index: 40;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--btn-a), var(--btn-b));
    color: #fff;
    padding: 0 20px;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(var(--red-rgb), 0.45);
  }
  .cart-fab span {
    flex: 1;
    text-align: left;
  }
  .cart-fab b {
    font-weight: 800;
  }
  .item-grid {
    padding-bottom: 96px;
  }
  .cols2 {
    grid-template-columns: 1fr;
  }
  .board {
    grid-template-columns: 1fr;
  }
  .col-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }
  .col:not(.on) {
    display: none;
  }
}
@media (max-width: 760px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  .rail {
    display: none;
  }
  .topbar {
    height: 56px;
    padding: 0 12px;
  }
  .top-logo {
    display: block;
  }
  .wordmark {
    font-size: calc(30px * var(--brand-scale, 1));
  }
  .clock,
  .net {
    display: none;
  }
  .cloud {
    padding: 3px 8px;
    font-size: 11px;
  }
  .user-chip span:last-child {
    display: none;
  }
  .user-chip {
    padding: 3px;
  }
  .tabbar {
    display: flex;
    background: linear-gradient(180deg, var(--maroon-2), var(--maroon));
    padding: 6px 6px calc(6px + var(--safe-b));
    overflow-x: auto;
    gap: 2px;
    scrollbar-width: none;
  }
  .tabbar .nav-item {
    min-width: 64px;
    flex: 1;
    padding: 7px 4px;
  }
  .cart-fab {
    left: 12px;
    right: 12px;
    bottom: calc(118px + var(--safe-b));
  }
  .item-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .view-head {
    padding: 12px 14px 4px;
  }
  .pad {
    padding: 8px 14px 22px;
  }
  .pos-menu {
    padding: 12px 12px 0;
  }
  .two {
    grid-template-columns: 1fr;
  }
  .hide-sm {
    display: none;
  }
  .search.sm {
    width: 100%;
    flex: 1;
  }
  .head-tools {
    width: 100%;
  }
  .upi-box {
    flex-direction: column;
    text-align: center;
  }
  .upi-qr {
    width: 210px;
  }
  .appfoot {
    padding: 5px 8px;
    font-size: 11px;
  }
  #toast-root {
    bottom: calc(124px + var(--safe-b));
  }
  .ogrid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) and (min-width: 480px) {
  .item-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (hover: none) {
  .item:hover,
  .chip:hover {
    border-color: var(--line);
  }
}

/* =====================================================================
   PART 2: MAINTENANCE SCREEN AND NOTICE BARS
   ===================================================================== */

/* ---------- maintenance screen ---------- */
#ops-root {
  position: fixed;
  inset: 0;
  z-index: 450;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  text-align: center;
  background-color: var(--maroon);
  background-image:
    radial-gradient(circle at 20% 15%, rgba(var(--red-rgb), 0.35), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(255, 240, 194, 0.14), transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size:
    auto,
    auto,
    24px 24px,
    24px 24px;
}
.ops-card {
  background: var(--paper-2);
  border-radius: 30px;
  padding: 32px 30px 28px;
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.ops-logo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-m);
}
.ops-card h1 {
  margin-top: 6px;
}
.ops-pill {
  margin-top: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--amber-l);
  color: #7a4d00;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ops-msg {
  font-weight: 500;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink2);
  white-space: pre-line;
  max-width: 36ch;
  overflow-wrap: anywhere;
}
.ops-eta-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 10px 26px;
  border-radius: 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  margin: 2px 0 4px;
}
.ops-eta-box small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.ops-eta-box b {
  font-size: 22px;
  font-weight: 800;
  color: var(--maroon);
  letter-spacing: -0.01em;
}
.ops-eta {
  color: var(--maroon);
}
.ops-note {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 6px;
}
.ops-credit {
  margin-top: 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 248, 230, 0.75);
  user-select: none;
}

/* ---------- notice bars (announcement / update / maintenance heads-up) ---------- */
#ops-bars {
  flex: none;
  display: flex;
  flex-direction: column;
}
#ops-bars:empty {
  display: none;
}
.ops-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.ops-bar span {
  flex: 1;
  min-width: 0;
}
.ops-bar.info {
  background: var(--blue-l);
  color: #1b3d7a;
}
.ops-bar.warn {
  background: #fff1cc;
  color: #6b4700;
}
.ops-bar.err {
  background: var(--red-l);
  color: #a80000;
}
.ops-bar .icon-btn {
  width: 30px;
  height: 30px;
  flex: none;
}

@media (max-width: 760px) {
  .ops-bar {
    padding: 8px 12px;
  }
}

/* update bar: one tidy line, details in a dialog */
.ops-link {
  background: none;
  border: 0;
  padding: 0 0 0 6px;
  font: inherit;
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.ops-notes {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 15px;
  line-height: 1.45;
}
.ops-notes li::marker {
  color: var(--maroon);
}

/* =====================================================================
   PART 3: TABLES, KITCHEN, INVENTORY, CASH, HELP AND SUPPORT
   ===================================================================== */

/* ---------- shared ---------- */
.qty-row {
  display: flex;
  gap: 8px;
}
.qty-row input {
  flex: 1;
  min-width: 0;
}
.qty-row select {
  width: auto; /* grows for names like "bottle" or "carton" */
  min-width: 88px;
  max-width: 150px;
}
#sk-pre:not(:empty) {
  margin: -2px 0 12px;
  font-weight: 600;
  color: var(--maroon);
}
/* Pack / box fields of the ingredient form */
.qty-row select.wide-select {
  width: auto;
  min-width: 120px;
}
.qty-suffix {
  align-self: center;
  min-width: 56px;
  font-weight: 700;
  color: var(--muted);
}
.pk-fields {
  margin: 4px 0 12px;
  padding: 12px 14px 4px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--paper-2);
}
.pk-fields .field {
  margin-bottom: 10px;
}
#pk-sum:not(:empty) {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--maroon);
}
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ok-text {
  color: var(--green);
}
.ic.inl {
  width: 15px;
  height: 15px;
  vertical-align: -3px;
}
.nav-item {
  position: relative;
}
.kst {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 99px;
  letter-spacing: 0.02em;
}
.kst.new {
  background: var(--blue-l);
  color: #1b3d7a;
}
.kst.preparing {
  background: var(--amber-l);
  color: #7a4d00;
}
.kst.ready {
  background: var(--green-l);
  color: #14672c;
}
.kst.served {
  background: #ece4d0;
  color: var(--muted);
}
.kst.cancelled {
  background: var(--red-l);
  color: #a80000;
}
.var {
  font-weight: 800;
  font-size: 12.5px;
}
.var.ok {
  color: var(--green);
}
.var.warn {
  color: var(--amber);
}
.var.bad {
  color: #c20000;
}
.bar {
  display: block;
  height: 8px;
  background: var(--line-2);
  border-radius: 99px;
  overflow: hidden;
  flex: 1;
}
.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--maroon-2));
  border-radius: 99px;
}

/* ---------- inventory ---------- */
.stk {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 99px;
}
.stk.ok {
  background: var(--green-l);
  color: #14672c;
}
.stk.low {
  background: var(--amber-l);
  color: #7a4d00;
}
.stk.out {
  background: var(--red-l);
  color: #a80000;
}
.rc-row {
  display: grid;
  grid-template-columns: 1fr 90px 70px 36px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.rc-row select,
.rc-row input {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 9px 10px;
  background: #fff;
  min-width: 0;
  width: 100%;
}
.icon-btn.has-recipe {
  color: var(--green);
}
[data-badge-for].on {
  display: inline-flex;
  position: absolute;
  top: 4px;
  right: 12px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  align-items: center;
  justify-content: center;
}
@media (max-width: 760px) {
  .rc-row {
    grid-template-columns: 1fr 78px 64px 32px;
  }
  [data-badge-for].on {
    right: 6px;
  }
}

/* ---------- tables ---------- */
.tb-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.tb-legend i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
  margin-left: 8px;
}
.tb-legend i:first-child {
  margin-left: 0;
}
.tb-legend i.free {
  background: var(--green-l);
  border: 2px solid var(--green);
}
.tb-legend i.busy {
  background: var(--red-l);
  border: 2px solid var(--red);
}
.tb-grid,
.tb-pick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.tb-pick {
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}
.tb-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 15px;
  border-radius: 20px;
  text-align: left;
  border: 2.5px solid;
  min-height: 132px;
  box-shadow: var(--shadow-s);
  transition: transform 0.12s;
}
.tb-card:active {
  transform: scale(0.98);
}
.tb-card.free {
  background: linear-gradient(180deg, #f2fbf4, var(--green-l));
  border-color: #8ad3a0;
}
.tb-card.busy {
  background: linear-gradient(180deg, #fff3f1, var(--red-l));
  border-color: #f2988e;
}
.tb-top {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}
.tb-top small {
  font-weight: 700;
  color: var(--muted);
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.tb-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--maroon);
  line-height: 1.1;
}
.tb-state {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.free .tb-state {
  color: #14672c;
}
.busy .tb-state {
  color: #a80000;
}
.tb-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
}
.tb-amt {
  font-size: 20px;
  font-weight: 800;
}
.tb-meta {
  font-size: 12px;
  color: var(--ink2);
}
.tb-sum {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 0 12px;
  font-size: 13px;
}
.tb-ord {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fff;
}
.tb-ord-h {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tb-ord-t {
  margin-left: auto;
  font-size: 16px;
}
.tb-ord-i {
  font-size: 13px;
  color: var(--ink2);
  margin: 6px 0 10px;
}
.tb-ord-a {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
}
.sp-n {
  font-weight: 700;
  display: flex;
  flex-direction: column;
}
.sp-n small {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}
.qty {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  border-radius: 12px;
  padding: 3px;
}
.qty b {
  min-width: 22px;
  text-align: center;
}
.qty button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
  font-size: 20px;
  font-weight: 700;
  box-shadow: var(--shadow-s);
}
.tb-erow {
  display: grid;
  grid-template-columns: 1fr 90px 36px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.tb-erow input {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: #fff;
  min-width: 0;
  width: 100%;
}

/* ---------- kitchen ---------- */
.kcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px 12px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-s);
  position: relative;
  overflow: hidden;
}
.kcard::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: #3b6be6;
}
.kcard.st-preparing::before {
  background: #e9a100;
}
.kcard.st-ready::before {
  background: var(--green);
}
.kcard header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}
.kwhere {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.kwhere small {
  color: var(--muted);
  font-weight: 600;
}
.ktimer {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 3px 12px;
  border-radius: 12px;
}
.ktimer.ok {
  background: var(--green-l);
  color: #14672c;
}
.ktimer.warn {
  background: var(--amber-l);
  color: #7a4d00;
}
.ktimer.late {
  background: #c20000;
  color: #fff;
  animation: kpulse 1.4s ease-in-out infinite;
}
.ktimer.done {
  background: #ece4d0;
  color: var(--ink2);
  font-size: 15px;
}
@keyframes kpulse {
  50% {
    opacity: 0.72;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ktimer.late {
    animation: none;
  }
}
.kcard .olist {
  margin: 10px 0;
}
.kcard .olist li {
  font-size: 16px;
}
.kadd {
  background: var(--amber-l);
  color: #7a4d00;
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 8px;
}
.kcard footer {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.kcard footer .btn.grow {
  min-height: 46px;
  font-size: 15px;
}

/* ---------- cash ---------- */
.cs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.cs-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--shadow-s);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cs-card small {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cs-card b {
  font-size: 24px;
  font-weight: 800;
  color: var(--maroon);
}
.cs-card em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.cs-card.hl {
  background: linear-gradient(180deg, #fff8e6, var(--cream));
  border-color: #e8cf86;
}
.cs-card.ok b {
  color: var(--green);
}
.cs-card.warn b {
  color: var(--amber);
}
.cs-card.bad b {
  color: #c20000;
}
.cs-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.cs-cols > .panel {
  margin: 0;
}
.cs-close .cs-cols {
  margin-bottom: 8px;
  align-items: start;
}
.cs-pay {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
}
.cs-pay.tot {
  border: 0;
  font-weight: 800;
  padding-top: 12px;
}
.cs-pl {
  width: 96px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
}
.cs-pl small {
  color: var(--muted);
  font-weight: 500;
  font-size: 11.5px;
}
.cs-pay b {
  min-width: 86px;
  text-align: right;
}
.cs-calc {
  margin-top: 12px;
  background: var(--paper-2);
  border-radius: 14px;
  padding: 8px 14px;
}
.cs-calc div {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}
.cs-calc .sum {
  border-top: 1.5px dashed var(--line);
  margin-top: 4px;
  padding-top: 8px;
  font-weight: 800;
  font-size: 15px;
  color: var(--maroon);
}
.cs-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.cs-row .field {
  flex: 1;
  min-width: 180px;
  margin: 0;
}
.cs-open {
  border: 2px dashed #e8cf86;
  background: var(--paper-2);
  margin-bottom: 14px;
}
.cs-den {
  margin-bottom: 12px;
}
.cs-den summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--maroon-2);
  padding: 6px 0;
}
.cs-dgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.cs-dgrid label {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--cream);
  border-radius: 10px;
  padding: 4px 8px;
  font-weight: 700;
}
.cs-dgrid input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  text-align: right;
}
.cs-var {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--cream);
  font-size: 12.5px;
  color: var(--ink2);
}
.cs-var b {
  font-size: 20px;
}
.cs-var.ok {
  background: var(--green-l);
}
.cs-var.ok b {
  color: var(--green);
}
.cs-var.warn {
  background: var(--amber-l);
}
.cs-var.warn b {
  color: #7a4d00;
}
.cs-var.bad {
  background: var(--red-l);
}
.cs-var.bad b {
  color: #c20000;
}
.panel + .panel {
  margin-top: 14px;
}
@media (max-width: 900px) {
  .cs-cols {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .tb-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .tb-card {
    min-height: 118px;
  }
  .cs-card b {
    font-size: 20px;
  }
  .cs-pl {
    width: 78px;
  }
}

/* more menu items than before: keep the side bar compact so everything fits on a laptop screen */
@media (min-width: 761px) and (max-height: 900px) {
  .rail {
    gap: 6px;
    padding-top: 10px;
  }
  .rail-logo {
    width: 50px;
    height: 50px;
  }
  .rail-nav {
    margin-top: 4px;
    gap: 2px;
  }
  .rail-nav .nav-item,
  .rail-foot .nav-item {
    padding: 6px 4px;
    gap: 2px;
    font-size: 11px;
  }
}

/* inventory table: action buttons wrap instead of running off the screen */
.iv-act {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
@media (max-width: 760px) {
  .tabbar .nav-item {
    min-width: 72px;
    padding: 7px 2px;
    font-size: 11px;
  }
  .tbl .iv-act .btn.sm {
    padding: 3px 9px;
    min-height: 28px;
  }
  .tbl td,
  .tbl th {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* Help and support (Settings) */
.sup-list {
  display: grid;
  gap: 8px;
}
.sup-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--line, #e3d9cc);
  border-radius: 10px;
  background: var(--card, #fff);
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.sup-row:hover {
  border-color: var(--accent, #6b4a2f);
}
.sup-new {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9px;
  background: var(--red, #c0392b);
  color: #fff;
}
.sup-s {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sup-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 42vh;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line, #e3d9cc);
  border-radius: 10px;
}
.sup-b {
  max-width: 88%;
  padding: 8px 11px;
  border-radius: 12px;
  border: 1px solid var(--line, #e3d9cc);
}
.sup-b.me {
  align-self: flex-end;
  background: rgba(107, 74, 47, 0.1);
}
.sup-b.them {
  align-self: flex-start;
  background: rgba(46, 125, 50, 0.1);
}
.sup-bh {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 2px;
}
.sup-bh small {
  opacity: 0.7;
}
.sup-bt {
  white-space: pre-line;
  word-break: break-word;
}

/* =====================================================================
   PART 4: LOYALTY, EXPENSES, FEEDBACK
   ===================================================================== */

.loy-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 8px 10px;
  margin-top: 8px;
  border-radius: 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.loy-line.ok {
  background: #e6f6ea;
  border-color: #b7e0c2;
  color: #0b5a2a;
}
.loy-line .ic {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
}
.loy-line .link {
  font-weight: 700;
  color: var(--red-d);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.loy-use {
  margin-top: 8px;
  gap: 8px;
}
.loy-use input {
  min-width: 0;
}
.loy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff4ce;
  border: 1px solid #e8cf7a;
  margin-bottom: 6px;
}
.loy-card b {
  font-size: 20px;
  color: var(--maroon);
}
.neg-text {
  color: #b00020;
}
.sub {
  display: block;
  font-size: 12px;
}
.btn.wide {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

/* expenses */
.month-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 6px;
}
.month-nav b {
  min-width: 86px;
  text-align: center;
  font-size: 14px;
}
.month-nav .icon-btn {
  font-size: 20px;
  line-height: 1;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 760px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}
.bar-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 4px 0;
}
.bar {
  height: 10px;
  border-radius: 99px;
  background: var(--paper);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--red);
  border-radius: 99px;
}
.kpi.good b {
  color: #0b7a3b;
}
.kpi.bad b {
  color: #b00020;
}

/* feedback */

.wa-prev {
  background: #dcf8c6;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 8px;
  word-break: break-word;
}
textarea#s-wamsg {
  width: 100%;
  font: inherit;
}

/* =====================================================================
   PART 5: DARK THEME, HIGH-CONTRAST KITCHEN, REPORTS, WHATSAPP SUMMARY, AUDIT LOG
   ===================================================================== */

/* ---------------- theme button (top bar) ---------------- */
.theme-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink2);
}
.theme-btn:hover {
  background: var(--line-2);
}
.theme-btn .ic {
  width: 19px;
  height: 19px;
}

/* ---------------- DARK THEME ---------------- */
html[data-theme='dark'] {
  --maroon: #4b0d0d;
  --maroon-2: #6a1414;
  --red: #f04438;
  --red-d: #ff6b5e;
  --red-l: #4a1d1a;
  /* dark-mode tints of the accent (selected chips, counters, focus). The "Cafe colours" setting re-defines them. */
  --d-chip: #7a1818;
  --d-chip-line: #a32424;
  --d-tint: #4b1a17;
  --d-nchip: #b02a22;
  --d-nchip-line: #d4443a;
  --d-days: #8d0b0b;
  --d-hover: #7e1a1a;
  --d-focus: #ffb4a8;
  --d-sp: #4a1f1a;
  --d-sp-text: #ffd0c4;
  --d-pill: #e02b20;
  --paper: #150e0c;
  --paper-2: #1f1512;
  --card: #271b17;
  --cream: #3a2b22;
  --ink: #f7ecdd;
  --ink2: #dccdbb;
  --muted: #ad9a85;
  --line: #3e2d27;
  --line-2: #31231e;
  --green: #4cc672;
  --green-l: #173a22;
  --amber: #f0b04a;
  --amber-l: #43330f;
  --blue-l: #1b2b50;
  --shadow-s: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-m: 0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 36px rgba(0, 0, 0, 0.45);
}
html[data-theme='dark'] body {
  background-image:
    linear-gradient(rgba(255, 220, 190, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 220, 190, 0.025) 1px, transparent 1px);
}
html[data-theme='dark'] :focus-visible {
  outline-color: rgba(255, 130, 110, 0.6);
}
html[data-theme='dark'] h1,
html[data-theme='dark'] .wordmark,
html[data-theme='dark'] .col h3,
html[data-theme='dark'] .olist li b,
html[data-theme='dark'] .block-title,
html[data-theme='dark'] .panel > h3,
html[data-theme='dark'] .panel-head h3,
html[data-theme='dark'] .count,
html[data-theme='dark'] .cart-head b,
html[data-theme='dark'] .trow.grand,
html[data-theme='dark'] .trow.grand b,
html[data-theme='dark'] .otot,
html[data-theme='dark'] .modal-head h3,
html[data-theme='dark'] .upi-meta b,
html[data-theme='dark'] .loy-card b,
html[data-theme='dark'] .tb-name,
html[data-theme='dark'] .cs-card b,
html[data-theme='dark'] .cs-calc .sum,
html[data-theme='dark'] .cs-den summary,
html[data-theme='dark'] .ops-eta {
  color: #ffe9c9;
}
html[data-theme='dark'] .count {
  background: var(--d-tint);
}
html[data-theme='dark'] .avatar {
  background: #ffe9c9;
  color: var(--maroon);
}
html[data-theme='dark'] .rail,
html[data-theme='dark'] .kpi.hero,
html[data-theme='dark'] .tok,
html[data-theme='dark'] .pay-total {
  color: #fff8e6;
}
html[data-theme='dark'] .legend i.prev {
  background: #6b5748;
}
html[data-theme='dark'] .col h3 .count {
  background: var(--maroon);
  color: #fff;
}
html[data-theme='dark'] .topbar,
html[data-theme='dark'] .appfoot {
  background: rgba(31, 21, 18, 0.9);
}
html[data-theme='dark'] .nav-item.active {
  background: #ffe9c9;
  color: var(--maroon);
}
html[data-theme='dark'] .btn.ghost:hover {
  background: var(--line-2);
  border-color: #5a4238;
}
html[data-theme='dark'] .btn.dark {
  background: var(--maroon-2);
}
html[data-theme='dark'] .btn.dark:hover {
  background: var(--d-hover);
}
html[data-theme='dark'] input:not([type='checkbox']),
html[data-theme='dark'] select,
html[data-theme='dark'] textarea,
html[data-theme='dark'] .search,
html[data-theme='dark'] .rc-row select,
html[data-theme='dark'] .rc-row input,
html[data-theme='dark'] .tb-erow input {
  background: #1b1210;
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme='dark'] input::placeholder,
html[data-theme='dark'] textarea::placeholder {
  color: #7f6c5c;
}
html[data-theme='dark'] input[readonly] {
  background: #2a1d18;
  color: var(--muted);
}
html[data-theme='dark'] option {
  background: #271b17;
  color: var(--ink);
}
html[data-theme='dark'] .seg {
  background: #1b1210;
}
html[data-theme='dark'] .seg button.on {
  background: var(--d-tint);
  color: #ffd9c9;
  box-shadow: none;
}
html[data-theme='dark'] .chip {
  background: var(--card);
}
html[data-theme='dark'] .chip:hover {
  border-color: #6b5144;
}
html[data-theme='dark'] .chip.on {
  background: var(--d-chip);
  border-color: var(--d-chip-line);
  color: #fff;
}
html[data-theme='dark'] .chip.special {
  background: #3f3112;
  border-color: #8a6a20;
}
html[data-theme='dark'] .chip.special.on {
  background: var(--d-chip);
  border-color: var(--d-chip-line);
}
html[data-theme='dark'] .tag {
  background: #3a2b22;
  color: #e6d7c4;
}
html[data-theme='dark'] .tag.new {
  background: #1f3160;
  color: #b9ccff;
}
html[data-theme='dark'] .tag.preparing {
  background: #4a3912;
  color: #ffd27a;
}
html[data-theme='dark'] .tag.ready,
html[data-theme='dark'] .tag.paid {
  background: #1b4a2a;
  color: #9fe8b5;
}
html[data-theme='dark'] .tag.served,
html[data-theme='dark'] .tag.off {
  background: #3a2b22;
  color: #e6d7c4;
}
html[data-theme='dark'] .tag.cancelled,
html[data-theme='dark'] .tag.unpaid {
  background: #5a2320;
  color: #ffb4aa;
}
html[data-theme='dark'] .vdot {
  background: var(--card);
}
html[data-theme='dark'] .vdot.nv {
  border-color: var(--red-d);
}
html[data-theme='dark'] .vdot.nv::after {
  background: var(--red-d);
}
html[data-theme='dark'] .banner {
  border-color: #6e5420;
}
html[data-theme='dark'] .banner.warn {
  background: #43330f;
  border-color: #7b5d1f;
  color: #ffe2a6;
}
html[data-theme='dark'] .switch {
  background: #4a3a30;
}
html[data-theme='dark'] .tbl th {
  background: #1f1512;
}
html[data-theme='dark'] .tbl td {
  border-color: var(--line-2);
}
html[data-theme='dark'] .hbar .hv {
  background: #34261f;
}
html[data-theme='dark'] .chart-wrap .gl {
  stroke: #3a2a24;
}
html[data-theme='dark'] .tip {
  background: #000;
  border: 1px solid var(--line);
}
html[data-theme='dark'] .item:hover {
  border-color: #6b5144;
}
html[data-theme='dark'] .block:has(#cart-lines),
html[data-theme='dark'] #cart-totals,
html[data-theme='dark'] .tb-ord,
html[data-theme='dark'] .qty button {
  background: var(--card);
}
html[data-theme='dark'] .stepper {
  background: #34261f;
}
html[data-theme='dark'] .stepper button:active {
  background: #4a382d;
}
html[data-theme='dark'] .step i {
  background: var(--card);
  border-color: #5d4639;
}
html[data-theme='dark'] .step::before {
  background: #4a382d;
}
html[data-theme='dark'] .bill-modal .modal-body {
  background: #1b1210;
}
html[data-theme='dark'] .cloud.ok {
  color: #9fe8b5;
}
html[data-theme='dark'] .cloud.busy {
  color: #ffd27a;
}
html[data-theme='dark'] .cloud.off {
  color: #dccdbb;
  background: #3a2b22;
}
html[data-theme='dark'] .net.off,
html[data-theme='dark'] .age.late {
  color: #ff8a7d;
}
html[data-theme='dark'] .logout-btn {
  color: #ff8a7d;
  border-color: #5a2a25;
}
html[data-theme='dark'] .danger-text,
html[data-theme='dark'] .err-text,
html[data-theme='dark'] .neg-text,
html[data-theme='dark'] .pay-hint.err,
html[data-theme='dark'] .lock-msg {
  color: #ff8a7d !important;
}
html[data-theme='dark'] .cp-status.ok {
  color: #9fe8b5;
}
html[data-theme='dark'] .cp-status.err {
  color: #ffb4aa;
}
html[data-theme='dark'] .keypad button {
  background: var(--card);
  color: var(--ink);
}
html[data-theme='dark'] .lock-card,
html[data-theme='dark'] .ops-card {
  background: var(--paper-2);
}
html[data-theme='dark'] .ops-bar.info {
  background: #1b2b50;
  color: #c9d8ff;
}
html[data-theme='dark'] .ops-bar.warn {
  background: #43330f;
  color: #ffe2a6;
}
html[data-theme='dark'] .ops-bar.err {
  background: var(--red-l);
  color: #ffb4aa;
}
html[data-theme='dark'] .loy-line.ok {
  background: #173a22;
  border-color: #2a6a3f;
  color: #9fe8b5;
}
html[data-theme='dark'] .loy-card {
  background: #3f3112;
  border-color: #7b5d1f;
}
html[data-theme='dark'] .kpi.good b {
  color: #6fe08f;
}
html[data-theme='dark'] .kpi.bad b {
  color: #ff8a7d;
}
html[data-theme='dark'] .wa-prev {
  background: #1f3a27;
  color: #e8f6ea;
}
html[data-theme='dark'] .kst.new {
  background: #1b2b50;
  color: #b9ccff;
}
html[data-theme='dark'] .kst.preparing {
  background: #43330f;
  color: #ffd27a;
}
html[data-theme='dark'] .kst.ready {
  background: #173a22;
  color: #9fe8b5;
}
html[data-theme='dark'] .stk.ok {
  background: #173a22;
  color: #9fe8b5;
}
html[data-theme='dark'] .stk.low {
  background: #43330f;
  color: #ffd27a;
}
html[data-theme='dark'] .stk.out {
  background: var(--red-l);
  color: #ffb4aa;
}
html[data-theme='dark'] .tb-card.free {
  background: linear-gradient(180deg, #17301f, #173a22);
  border-color: #2d6a41;
}
html[data-theme='dark'] .tb-card.busy {
  background: linear-gradient(180deg, #34201d, var(--red-l));
  border-color: #7a3a33;
}
html[data-theme='dark'] .free .tb-state {
  color: #9fe8b5;
}
html[data-theme='dark'] .busy .tb-state {
  color: #ffb4aa;
}
html[data-theme='dark'] .cs-card.hl {
  background: linear-gradient(180deg, #2c211a, #3a2b22);
  border-color: #6e5420;
}
html[data-theme='dark'] .cs-open {
  background: var(--paper-2);
  border-color: #6e5420;
}
html[data-theme='dark'] .cs-dgrid label {
  background: #3a2b22;
}
html[data-theme='dark'] .cs-var.ok {
  background: #173a22;
}
html[data-theme='dark'] .cs-var.warn {
  background: #43330f;
}
html[data-theme='dark'] .cs-var.warn b {
  color: #ffd27a;
}
html[data-theme='dark'] .ktimer.ok {
  background: #173a22;
  color: #9fe8b5;
}
html[data-theme='dark'] .ktimer.warn {
  background: #43330f;
  color: #ffd27a;
}
html[data-theme='dark'] .ktimer.done {
  background: #3a2b22;
}
html[data-theme='dark'] .kadd,
html[data-theme='dark'] .onote {
  background: #43330f;
  color: #ffe2a6;
}
html[data-theme='dark'] .olist {
  background: #1f1512;
}
html[data-theme='dark'] .modal-back {
  background: rgba(0, 0, 0, 0.65);
}
html[data-theme='dark'] img.rail-logo,
html[data-theme='dark'] .top-logo {
  background: #fff;
}
/* the receipt, the QR code and anything that prints stays white on purpose */
html[data-theme='dark'] .receipt,
html[data-theme='dark'] .upi-qr {
  background: #fff;
  color: #000;
}
html[data-theme='dark'] .upi-qr svg {
  background: #fff;
}

/* ---------------- KITCHEN: bigger order numbers, timers and statuses; high-contrast night screen ---------------- */
.kcard {
  border-width: 2px;
}
.kcard .tok {
  min-width: 74px;
  height: 64px;
  font-size: 34px;
  border-radius: 16px;
  letter-spacing: -0.02em;
}
.kcard .kwhere b {
  font-size: 19px;
}
.kcard .kwhere small {
  font-size: 13.5px;
}
.ktimer {
  font-size: 30px;
  padding: 4px 14px;
  border-radius: 14px;
  line-height: 1.15;
}
.ktimer.done {
  font-size: 18px;
}
.kst-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 999px;
}
.kst-pill::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}
.kst-pill.new {
  background: #dce6ff;
  color: #1b3fa0;
}
.kst-pill.preparing {
  background: #ffe3a3;
  color: #6b4300;
}
.kst-pill.ready {
  background: #cbf1d6;
  color: #0b5a2a;
}
.kcard .olist li {
  font-size: 19px;
  line-height: 1.3;
}
.kcard .olist li b {
  font-size: 21px;
  min-width: 38px;
}
.knote {
  display: inline-block;
  margin-top: 3px;
  padding: 3px 10px;
  border-radius: 8px;
  background: #ffe08a;
  color: #4a3000;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.kcard .onote {
  font-size: 16px;
  font-weight: 700;
  padding: 9px 12px;
}
.kcard footer .btn.grow {
  min-height: 54px;
  font-size: 17px;
}
.col h3 {
  font-size: 19px;
}
.col h3 .count {
  margin-left: auto;
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 15px;
  background: var(--maroon);
  color: #fff;
  font-size: 15px;
  padding: 0 9px;
}

#view.kd-night {
  background: #000;
  color: #fff;
}
#view.kd-night .view-head h1,
#view.kd-night .muted,
#view.kd-night .col h3 {
  color: #fff;
}
#view.kd-night .muted {
  color: #cfcfcf;
}
#view.kd-night .btn.ghost {
  background: #111;
  color: #fff;
  border-color: #666;
}
#view.kd-night .chip {
  background: #111;
  color: #fff;
  border-color: #666;
}
#view.kd-night .chip.on {
  background: #fff;
  color: #000;
  border-color: #fff;
}
#view.kd-night .col-empty,
#view.kd-night .empty {
  color: #cfcfcf;
  border-color: #555;
}
#view.kd-night .empty b {
  color: #fff;
}
#view.kd-night .kcard {
  background: #0b0b0b;
  border-color: #fff;
  color: #fff;
  box-shadow: none;
}
#view.kd-night .kcard::before {
  height: 10px;
  background: #5c8dff;
}
#view.kd-night .kcard.st-preparing::before {
  background: #ffc400;
}
#view.kd-night .kcard.st-ready::before {
  background: #35e07a;
}
#view.kd-night .kcard .tok {
  background: #fff;
  color: #000;
}
#view.kd-night .kwhere small,
#view.kd-night .olist small {
  color: #d9d9d9;
}
#view.kd-night .olist {
  background: #1a1a1a;
  border: 1px solid #444;
}
#view.kd-night .olist li b {
  color: #ffd84d;
}
#view.kd-night .ktimer.ok {
  background: #00b050;
  color: #000;
}
#view.kd-night .ktimer.warn {
  background: #ffc400;
  color: #000;
}
#view.kd-night .ktimer.late {
  background: #ff2b2b;
  color: #fff;
}
#view.kd-night .ktimer.done {
  background: #444;
  color: #fff;
}
#view.kd-night .kst-pill.new {
  background: #5c8dff;
  color: #000;
}
#view.kd-night .kst-pill.preparing {
  background: #ffc400;
  color: #000;
}
#view.kd-night .kst-pill.ready {
  background: #35e07a;
  color: #000;
}
#view.kd-night .knote {
  background: #ffe14d;
  color: #000;
}
#view.kd-night .kadd,
#view.kd-night .kcard .onote {
  background: #ffc400;
  color: #000;
}
#view.kd-night .btn.primary {
  background: #ff3b30;
  box-shadow: none;
}
#view.kd-night .btn.dark {
  background: #fff;
  color: #000;
}
#view.kd-night .col h3 .count {
  background: #fff;
  color: #000;
}
@media (prefers-contrast: more) {
  .kcard {
    border-color: currentColor;
  }
}

/* ---------------- quick notes (kitchen instruction chips) ---------------- */
.nchips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}
.nchip {
  padding: 9px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-weight: 700;
  font-size: 13.5px;
}
.nchip:hover {
  border-color: #dcc58a;
}
.nchip.on {
  background: var(--maroon);
  border-color: var(--maroon);
  color: #fff;
}

/* ---------------- reports: comparison, delta chips, heatmap ---------------- */
.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 800;
  font-size: 12.5px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.delta.up {
  background: var(--green-l);
  color: #146c2e;
}
.delta.down {
  background: var(--red-l);
  color: #a80000;
}
.delta.flat {
  background: var(--line-2);
  color: var(--muted);
}
html[data-theme='dark'] .delta.up {
  color: #9fe8b5;
}
html[data-theme='dark'] .delta.down {
  color: #ffb4aa;
}
.cmp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.cmp-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
}
.cmp-card > span {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}
.cmp-card > b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.cmp-card > small {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  flex-wrap: wrap;
}
.cmp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.cmp-day {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.cmp-day .pair {
  height: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  margin-bottom: 4px;
}
.cmp-day .pair i {
  width: 38%;
  max-width: 22px;
  border-radius: 5px 5px 0 0;
  background: var(--red);
  min-height: 2px;
}
.cmp-day .pair i.prev {
  background: #d9c79a;
}
html[data-theme='dark'] .cmp-day .pair i.prev {
  background: #6b5748;
}
.legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 8px;
}
.legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--red);
  margin-right: 5px;
  vertical-align: -1px;
}
.legend i.prev {
  background: #d9c79a;
}
.hm-wrap {
  overflow-x: auto;
}
.hm {
  display: grid;
  gap: 3px;
  min-width: 620px;
  font-size: 11.5px;
  font-weight: 700;
}
.hm .hl {
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
}
.hm .hh {
  color: var(--muted);
  text-align: center;
}
.hm .hc {
  height: 34px;
  border-radius: 6px;
  background: rgba(var(--red-rgb), var(--i, 0));
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  color: transparent;
}
.hm .hc:hover {
  outline: 2px solid var(--ink);
  color: var(--ink);
}
.hm .hc.strong {
  color: #fff;
}
.hm .hc.z {
  background: transparent;
}
.hm-scale {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.hm-scale i {
  width: 120px;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(var(--red-rgb), 0.06), rgba(var(--red-rgb), 1));
}
.rk {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.rk-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line-2);
}
.rk-row:last-child {
  border: 0;
}
.rk-n {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--line-2);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.rk-row.top .rk-n {
  background: var(--maroon);
  color: #fff;
}
.rk-row small {
  display: block;
  color: var(--muted);
  font-weight: 600;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 820px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* ---------------- WhatsApp summary / reminder / purchase list ---------------- */
.sum-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 18px;
  background: #e5f6ea;
  color: #0b5a2a;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 1px solid #bfe3cb;
}
html[data-theme='dark'] .sum-bar {
  background: #173a22;
  color: #9fe8b5;
  border-color: #2a6a3f;
}
.sum-bar button {
  white-space: nowrap;
}
.sum-bar .x {
  opacity: 0.7;
  padding: 4px 8px;
}
.wa-box {
  white-space: pre-wrap;
  background: #dcf8c6;
  color: #111;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  max-height: calc(var(--app-h) * 0.46);
  overflow: auto;
  word-break: break-word;
}
html[data-theme='dark'] .wa-box {
  background: #1f3a27;
  color: #e8f6ea;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin: 8px 0 12px;
}
.stat-row > div {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
}
.stat-row span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.stat-row b {
  font-size: 17px;
}

/* ---------------- approvals + audit ---------------- */
.appr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.modal.wide {
  width: min(980px, 100%);
}
.tbl-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.kpi.hero .delta.up {
  background: #cbf1d6;
  color: #0b5a2a;
}
.kpi.hero .delta.down {
  background: #ffd9d4;
  color: #8f0a00;
}
.kpi.hero .delta.flat {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.kpi small .delta {
  margin-left: 2px;
}
html[data-theme='dark'] .nchip.on {
  background: var(--d-nchip);
  border-color: var(--d-nchip-line);
}
@media (max-width: 640px) {
  .theme-btn {
    width: 34px;
    height: 34px;
  }
  .top-right {
    gap: 8px;
  }
  .sum-bar {
    padding: 8px 12px;
    font-size: 12.5px;
  }
  .cmp-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cmp-card > b {
    font-size: 20px;
  }
  .kcard .tok {
    min-width: 64px;
    height: 56px;
    font-size: 28px;
  }
  .ktimer {
    font-size: 24px;
  }
  .hm {
    min-width: 520px;
  }
}
html[data-theme='dark'] .ops-pill {
  background: #43330f;
  color: #ffd27a;
}
html[data-theme='dark'] .ops-eta-box b {
  color: #ffe9c9;
}
html[data-theme='dark'] .ops-eta-box {
  background: #34261f;
}

/* =====================================================================
   PART 6: QR ORDERING (STAFF SIDE), MENU PHOTOS / SIZES / ADD-ONS, TEXT SIZE
   ===================================================================== */

.qr-alert {
  background: linear-gradient(180deg, #fff3c9, #ffe8a0);
  border-bottom: 2px solid #e0b040;
  padding: 8px 14px;
  display: grid;
  gap: 6px;
  color: #3b2a00;
}
.qra-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}
.qra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 1px solid #ebddba;
  border-radius: 12px;
  padding: 7px 10px;
}
.qra-t {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.qra-t small {
  color: var(--muted);
  font-size: 12px;
}
.qra-n {
  color: var(--muted);
  font-weight: 700;
}
.qra-b {
  display: flex;
  gap: 6px;
  flex: none;
}
.tag.qr {
  background: #e3eeff;
  color: #1b4a8f;
}
.qr-tag {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  background: #1b4a8f;
  color: #fff;
  border-radius: 6px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}
/* table QR cards (screen + A4 print) */
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.qr-card {
  border: 2px solid var(--maroon, #7a0a0a);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  background: #fff;
  color: #27160f;
  break-inside: avoid;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.qr-brand {
  font-weight: 800;
  font-size: 13px;
  color: #7a0a0a;
}
.qr-code {
  width: 140px;
  height: 140px;
}
.qr-code svg {
  width: 100%;
  height: 100%;
  display: block;
}
.qr-table {
  font-size: 24px;
  font-weight: 800;
}
.qr-say {
  font-size: 11.5px;
  color: #6b5547;
  line-height: 1.3;
}
.qr-link {
  font-size: 12px;
}
.qr-sheet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10mm;
}
.qr-sheet .qr-card {
  padding: 8mm 5mm;
  border-radius: 6mm;
}
.qr-sheet .qr-code {
  width: 55mm;
  height: 55mm;
}
.qr-sheet .qr-table {
  font-size: 28px;
}
.qr-sheet .qr-brand {
  font-size: 15px;
}
.qr-sheet .qr-say {
  font-size: 13px;
}
/* menu editor: photo, sizes, add-ons */
.mi-photo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mi-ph {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--cream, #fff0c7) center/cover no-repeat;
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  flex: none;
}
.mi-opts {
  display: grid;
  gap: 6px;
}
.mi-opt {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 6px;
}
.mi-opt input {
  min-width: 0;
}
.opt-pick {
  display: grid;
  gap: 8px;
}
.opt-pick .opt {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--card, #fff);
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.opt-pick .opt.on {
  border-color: var(--red, var(--red));
  background: #fff1f0;
}
.opt-pick .opt b {
  margin-left: auto;
}
.opt-pick .grp {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 6px;
}
html[data-theme='dark'] .qr-alert {
  background: #3a2b0c;
  border-color: #8a6a1c;
  color: #ffe9b0;
}
html[data-theme='dark'] .qra-row {
  background: #2a1f1a;
  border-color: #4a3a2a;
}
html[data-theme='dark'] .tag.qr {
  background: #1c3558;
  color: #cfe2ff;
}
@media print {
  .qr-sheet .qr-card {
    border-color: #000;
  }
}

/* ---------------- Text size: whole POS (body zoom) and the kitchen board ---------------- */
body {
  zoom: var(--z, 1);
}
#app {
  height: calc(var(--app-h) / var(--z, 1));
}
.modal {
  max-height: calc(var(--app-h) * 0.94 / var(--z, 1));
}
@media (max-width: 760px) {
  .pos-cart {
    top: calc(var(--app-h) * 0.05 / var(--z, 1));
  }
}
#view.view-kitchen #kt-body {
  zoom: var(--kz, 1);
}
.size-seg button {
  font-weight: 800;
  line-height: 1;
  padding: 6px 11px;
  min-width: 34px;
}
.size-seg button:nth-child(1) {
  font-size: 11px;
}
.size-seg button:nth-child(2) {
  font-size: 14px;
}
.size-seg button:nth-child(3) {
  font-size: 17px;
}
.size-seg button:nth-child(4) {
  font-size: 20px;
}
@media (max-width: 760px) {
  html[data-size='2'] .top-right .user-chip span,
  html[data-size='3'] .top-right .user-chip span,
  html[data-size='3'] .logout-btn span {
    display: none;
  }
  html[data-size='2'] .wordmark,
  html[data-size='3'] .wordmark {
    display: none;
  }
  html[data-size='3'] .top-right .clock {
    display: none;
  }
}
/* printed bills, KOTs and QR sheets are never scaled by the on-screen text size */
@media print {
  html {
    --z: 1 !important;
    --kz: 1 !important;
  }
  body {
    zoom: 1 !important;
  }
  #view.view-kitchen #kt-body {
    zoom: 1 !important;
  }
}

/* =====================================================================
   PART 7: TODAY STRIP, SOLD-OUT SWITCH, KITCHEN STATIONS
   ===================================================================== */

.today-strip {
  flex: none;
  background: var(--card, #fff);
  border-bottom: 1px solid var(--line, #eadfc4);
}
.qr-alert,
.sum-bar {
  flex: none;
}
.qr-alert {
  max-height: 34vh;
  overflow-y: auto;
}
.ts-in {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ts-in::-webkit-scrollbar {
  display: none;
}
.ts-t {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #8a7a5a);
  margin-right: 4px;
  flex: none;
}
.ts-c {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--paper-2, #fbf4e1);
}
.ts-c {
  white-space: nowrap;
}
.ts-c b {
  font-size: 15px;
}
.ts-c small {
  display: inline;
  color: var(--muted, #8a7a5a);
  font-size: 12px;
}
.ts-c.ts-main {
  background: #e5f6ea;
  color: #0b5a2b;
}
.ts-c.ts-main small {
  color: #0b5a2b;
  opacity: 0.8;
}
.ts-c.hot {
  background: #ffe9a8;
  color: #5b3800;
}
.ts-c.hot small {
  color: #5b3800;
  opacity: 0.8;
}
.ts-x,
.ts-show {
  margin-left: auto;
  flex: none;
  opacity: 0.65;
  padding: 4px 10px;
  font-size: 18px;
  line-height: 1;
}
.ts-show {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 18px;
  width: 100%;
  text-align: left;
}
html[data-theme='dark'] .ts-c.ts-main {
  background: #173a22;
  color: #9fe8b5;
}
html[data-theme='dark'] .ts-c.ts-main small {
  color: #9fe8b5;
}
html[data-theme='dark'] .ts-c.hot {
  background: #3a2b0c;
  color: #ffe9b0;
}
html[data-theme='dark'] .ts-c.hot small {
  color: #ffe9b0;
}
@media (max-width: 700px) {
  .ts-in {
    padding: 8px 12px;
  }
}
@media print {
  .today-strip {
    display: none !important;
  }
}

.sold-n {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b3261e;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  margin-left: 4px;
}
#kt-sold.warn {
  border-color: #b3261e;
  color: #b3261e;
}
.so-search {
  display: block;
  margin-bottom: 10px;
}
.so-search input {
  width: 100%;
}
.so-list {
  max-height: 52vh;
  overflow-y: auto;
  display: grid;
  gap: 6px;
}
.so-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--paper-2, #fbf4e1);
}
.so-row b {
  display: block;
  font-size: 15px;
}
.so-row small {
  color: var(--muted, #8a7a5a);
}
.so-row.off {
  background: #fde8e6;
}
.so-row.off b {
  color: #b3261e;
  text-decoration: line-through;
}
html[data-theme='dark'] .so-row.off {
  background: #3a1613;
}

.st-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 18px 10px;
}
.st-filter .chip {
  padding: 7px 16px;
}
.stbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 8px;
}
.stp {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: #ffe9a8;
  color: #5b3800;
}
.stp.ok {
  background: #d5f0df;
  color: #0b5a2b;
}
.stp.me {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}
.stag {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--paper-2, #fbf4e1);
  color: var(--muted, #8a7a5a);
  vertical-align: middle;
}
.stwait {
  align-self: center;
  font-weight: 700;
  color: #0b5a2b;
  font-size: 14px;
}
.kot .kot-st {
  margin: 8px 0 2px;
  text-align: center;
}
/* while the counter has QR orders to answer, the alert bar owns the top of the screen; short screens never lose room to the strip */
.qr-alert ~ .today-strip {
  display: none;
}
@media (max-height: 640px) {
  .today-strip {
    display: none;
  }
}

/* menu photos on the counter screen and in the Menu list */
.item-art {
  overflow: hidden;
}
.item-art .item-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.item-art .badge {
  z-index: 2;
}
.mn-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px dashed var(--line);
  background: var(--paper-2, #fff8e6);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  color: var(--muted);
  padding: 0;
}
.mn-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mn-thumb svg {
  width: 20px;
  height: 20px;
}
.mn-thumb.has {
  border-style: solid;
}
.mn-thumb.busy {
  opacity: 0.5;
  pointer-events: none;
}
.mn-photos {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 10px;
  font-size: 13px;
}
.mn-bar {
  flex: 1;
  min-width: 120px;
  max-width: 260px;
  height: 8px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.mn-bar i {
  display: block;
  height: 100%;
  background: #1f8f4e;
}
.osub button {
  white-space: nowrap;
}
.osub {
  gap: 2px;
}

/* =====================================================================
   PART 8: COUNTER REFINEMENTS, DROPDOWNS, OFFERS, WORDMARK, CONTRAST, SLOW-ORDER BANNER
   ===================================================================== */

.field.tight {
  margin: 0 0 8px;
}
.field.tight input {
  height: 42px;
}
.cart-scroll > .seg {
  margin-bottom: 8px;
}
.block {
  margin-top: 10px;
}
.optrow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.optp {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 9px 10px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink2);
  text-align: left;
  cursor: pointer;
  font: inherit;
  min-width: 0;
}
.optp .ic {
  width: 17px;
  height: 17px;
  color: var(--maroon);
  margin-bottom: 2px;
}
.optp .ot {
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.1;
}
.optp small {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.optp.set {
  background: #fff4e0;
  border-color: #e9c98b;
}
.optp.set small {
  color: var(--maroon);
}
.optp.on {
  border-color: var(--maroon);
  box-shadow: 0 0 0 2px rgba(122, 14, 14, 0.12);
}
.accp {
  margin-top: 10px;
  padding: 12px 12px 2px;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: 16px;
}
.accp[hidden] {
  display: none;
}
.cust-badge .tag.bday {
  background: #ffe3ec;
  color: #a3123f;
}
.cu-note {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink2);
}
html[data-theme='dark'] .optp {
  background: #2a2321;
  border-color: #3c3330;
  color: #e8ddd6;
}
html[data-theme='dark'] .optp.set {
  background: #3a2e1e;
  border-color: #6b5230;
}
html[data-theme='dark'] .accp {
  background: #241e1c;
  border-color: #3c3330;
}
@media (max-width: 380px) {
  .optrow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.qra-snd {
  display: flex;
  gap: 6px;
  flex: none;
}
.qra-row.ack {
  opacity: 0.85;
  border-style: dashed;
}
.qra-b {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.vol-seg {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.vol-seg button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font: inherit;
  font-weight: 800;
  font-size: 13px;
  color: var(--ink2);
  cursor: pointer;
}
.vol-seg button small {
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
}
.vol-seg button.on {
  background: var(--maroon);
  border-color: var(--maroon);
  color: #fff;
}
.vol-seg button.on small {
  color: #ffd9a8;
}
@media (max-width: 480px) {
  .vol-seg {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.cu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.cu-head > div:last-child {
  min-width: 0;
}
.cu-av {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 19px;
  flex: none;
}
.cu-hint {
  margin: -6px 0 10px;
}
.cu-filters {
  margin-bottom: 12px;
}
.cu-filters .chip small {
  opacity: 0.7;
  margin-left: 3px;
}
.btn.pulse {
  animation: pulseBtn 1.4s infinite;
}
@keyframes pulseBtn {
  50% {
    box-shadow: 0 0 0 6px rgba(var(--red-rgb), 0.18);
  }
}

/* Dropdowns (table + customer) and cleaner focus */
.combo {
  position: relative;
}
.combo-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.combo-btn .ic {
  width: 18px;
  height: 18px;
}
#table-field input {
  padding-right: 42px;
}
.combo-pop {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(60, 20, 10, 0.22);
  padding: 8px;
  max-height: 300px;
  overflow: auto;
}
.combo-pop[hidden] {
  display: none;
}
.tp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.tp {
  border: 1.5px solid var(--line);
  background: var(--paper-2);
  border-radius: 11px;
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  line-height: 1.2;
}
.tp b {
  display: block;
  font-size: 15px;
}
.tp small {
  font-size: 11px;
  color: var(--muted);
}
.tp.free {
  border-color: #9fd7b4;
}
.tp.free small {
  color: #1b7a45;
}
.tp.busy {
  border-color: #e6b84c;
  background: #fff4d6;
}
.tp.busy small {
  color: #8a5a00;
}
.tp.sel {
  outline: 2px solid var(--maroon);
}
.combo-empty {
  padding: 10px;
  font-size: 13px;
  color: var(--muted);
}
.cust-who {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 13px;
}
.who-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
}
.who-chip.walk {
  background: transparent;
  border-style: dashed;
  color: var(--muted);
}
.who-chip .ic {
  width: 15px;
  height: 15px;
}
/* keyboard / tap focus: a warm maroon ring, not the red that looks like an error */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--maroon) !important;
  box-shadow: 0 0 0 3px rgba(122, 14, 14, 0.14) !important;
}
html[data-theme='dark'] .combo-pop {
  background: #241e1c;
  border-color: #3c3330;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6);
}
html[data-theme='dark'] .tp {
  background: #2a2321;
  border-color: #3c3330;
}
html[data-theme='dark'] .tp.free {
  border-color: #2e7a4a;
}
html[data-theme='dark'] .tp.free small {
  color: #7fe0a5;
}
html[data-theme='dark'] .tp.busy {
  background: #3a2e1e;
  border-color: #8a6a1c;
}
html[data-theme='dark'] .tp.busy small {
  color: #ffd28a;
}
html[data-theme='dark'] .who-chip {
  background: #2a2321;
  border-color: #3c3330;
}
html[data-theme='dark'] input:focus,
html[data-theme='dark'] select:focus,
html[data-theme='dark'] textarea:focus {
  border-color: var(--d-focus) !important;
  box-shadow: 0 0 0 3px rgba(255, 180, 168, 0.2) !important;
}

/* Text size button + menu, theme button (same look, light and dark) */
.size-wrap {
  position: relative;
  display: inline-flex;
}
.size-btn,
.theme-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink2);
  cursor: pointer;
  line-height: 1;
}
.size-btn:hover,
.theme-btn:hover {
  background: var(--line-2);
}
.size-btn .aa {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.size-btn .aa b {
  font-size: 17px;
}
.size-btn .aa i {
  font-size: 12px;
  font-style: normal;
}
.size-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(60, 20, 10, 0.25);
  padding: 8px;
}
.size-pop[hidden] {
  display: none;
}
.sp-h {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 8px 6px;
}
.sp {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.sp:hover {
  background: var(--paper-2);
}
.sp.on {
  background: #fff1c9;
  color: var(--maroon);
}
.sp .ic {
  margin-left: auto;
  width: 17px;
  height: 17px;
}
.sp-a {
  width: 34px;
  font-weight: 800;
  color: var(--maroon);
}
@media (max-width: 760px) {
  .size-btn,
  .theme-btn {
    width: 34px;
    height: 34px;
  }
  .size-pop {
    right: -40px;
  }
}
html[data-theme='dark'] .size-btn,
html[data-theme='dark'] .theme-btn {
  background: #2a2321;
  border-color: #3c3330;
  color: #f0e4dc;
}
html[data-theme='dark'] .size-btn:hover,
html[data-theme='dark'] .theme-btn:hover {
  background: #352c29;
}
html[data-theme='dark'] .size-pop {
  background: #241e1c;
  border-color: #3c3330;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}
html[data-theme='dark'] .sp {
  color: #f0e4dc;
}
html[data-theme='dark'] .sp:hover {
  background: #2f2724;
}
html[data-theme='dark'] .sp.on {
  background: var(--d-sp);
  color: var(--d-sp-text);
}
html[data-theme='dark'] .sp-a {
  color: var(--d-focus);
}
.topbar {
  position: relative;
  z-index: 60;
}
.who-chip {
  align-items: flex-start;
  border-radius: 14px;
  max-width: 100%;
  line-height: 1.35;
}
.who-chip .ic {
  margin-top: 2px;
  flex: none;
}

/* Phone header fits (icon-only Log out, wordmark may shrink) and the Menu table keeps its stock switch in view */
.brand {
  min-width: 0;
}
.wordmark {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
@media (max-width: 560px) {
  .logout-btn span {
    display: none;
  }
  .logout-btn {
    padding: 0;
    width: 34px;
    height: 34px;
    justify-content: center;
  }
  .top-right {
    gap: 6px;
  }
  .wordmark {
    font-size: calc(27px * var(--brand-scale, 1));
  }
  #mn-body .tbl th:nth-child(4),
  #mn-body .tbl td:nth-child(4) {
    display: none;
  }
  #mn-body .tbl td:nth-child(3) small,
  #mn-body .tbl td:nth-child(3) .tag {
    white-space: nowrap;
  }
}

/* Day picker in the item editor, offers, shifts */
.days {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}
.days button {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink2);
  border-radius: 999px;
  padding: 6px 11px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.days button.on {
  background: var(--maroon);
  border-color: var(--maroon);
  color: #fff;
}
html[data-theme='dark'] .days button {
  background: #2a2321;
  border-color: #3c3330;
  color: #f0e4dc;
}
html[data-theme='dark'] .days button.on {
  background: var(--d-days);
  border-color: #b33;
  color: #fff;
}
.so-row .btn.sm {
  margin-left: auto;
  margin-right: 10px;
  white-space: nowrap;
}
.ofr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.ofr-row:last-child {
  border-bottom: 0;
}
.ofr-row div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ofr-row small {
  color: var(--muted);
  font-size: 12.5px;
}
.ofr-row.off b {
  opacity: 0.55;
}
.of-part {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 8px;
  margin-top: 6px;
}
.trow.neg b,
.trow.neg span {
  color: #1b7f3b;
}
html[data-theme='dark'] .trow.neg b,
html[data-theme='dark'] .trow.neg span {
  color: #6fdc8c;
}
.bulk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.bulk-row div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bulk-row small {
  color: var(--muted);
  font-size: 12.5px;
}
.bulk-row.done b {
  opacity: 0.6;
}
.cu-filters .btn.wa {
  margin-left: auto;
}
/* Wordmark: "So & So Cafe" with a clear gap around the ampersand and no clipped swashes */
.wordmark {
  line-height: 1.3;
  padding: 0.06em 0.12em 0.12em;
  letter-spacing: 0.02em;
  word-spacing: 0.1em;
  overflow: visible;
  max-width: 100%;
}
.wordmark .amp {
  display: inline-block;
  margin: 0 0.16em;
}
.keypad button {
  width: 76px;
  height: 76px;
  aspect-ratio: 1 / 1;
}
.keypad {
  grid-template-columns: repeat(3, 76px);
  justify-items: center;
}
@media (max-width: 760px) {
  .brand {
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  .wordmark {
    font-size: calc(clamp(18px, 5.5vw, 26px) * var(--brand-scale, 1));
    letter-spacing: 0;
    word-spacing: 0;
    padding: 0.04em 0 0.12em;
    text-overflow: clip;
  }
  .wordmark .amp {
    margin: 0 0.1em;
  }
  .top-right {
    flex: none;
  }
}
@media (max-width: 380px) {
  .wordmark {
    font-size: calc(19px * var(--brand-scale, 1));
  }
  .top-logo {
    width: 32px;
    height: 32px;
  }
}
/* Contrast: muted text is darker in the light theme, and the maroon icons/numbers that vanished on dark panels are lifted in the dark theme */
.age {
  color: #17803a;
}
.badge,
.pill {
  background: #c40000;
}
html[data-theme='dark'] .optp .ic,
html[data-theme='dark'] .optp.set small,
html[data-theme='dark'] .upi-meta b,
html[data-theme='dark'] .ops-eta,
html[data-theme='dark'] .ops-eta-box b,
html[data-theme='dark'] .tb-name,
html[data-theme='dark'] .cs-card b,
html[data-theme='dark'] .cs-calc .sum,
html[data-theme='dark'] .loy-card b,
html[data-theme='dark'] .otot,
html[data-theme='dark'] .olist li b,
html[data-theme='dark'] .modal-head h3,
html[data-theme='dark'] .cart-head b {
  color: #f6d2c8;
}
html[data-theme='dark'] .optp .ic {
  stroke: currentColor;
}
html[data-theme='dark'] .badge,
html[data-theme='dark'] .pill {
  background: var(--d-pill);
}
html[data-theme='dark'] .age {
  color: #5fd38a;
}
html[data-theme='dark'] .age.warn {
  color: #f5b84a;
}
.help-btn .ic {
  width: 19px;
  height: 19px;
}
@media (max-width: 480px) {
  .user-chip {
    display: none;
  }
}

/* PACK tag on kitchen and order cards when a note asks for packing / parcel */
.packtag {
  display: inline-block;
  background: #ffc400;
  color: #000;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 999px;
  margin: 0 6px 0 0;
  vertical-align: middle;
}
.olist .packtag,
.knote + .packtag {
  margin: 0 0 0 6px;
}

/* Slow-order banner, waiting-for-table panel */
.slow-alert {
  margin: 8px 14px 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff1cc;
  border: 1.5px solid #d69a00;
  color: #4a3000;
}
.slow-alert .sla-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.slow-alert .sla-head .btn {
  margin-left: auto;
}
.slow-alert .sla-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px dashed rgba(0, 0, 0, 0.18);
  margin-top: 6px;
  flex-wrap: wrap;
}
.slow-alert .sla-row span {
  color: #9a2a00;
  font-weight: 700;
}
.slow-alert .sla-row .btn {
  margin-left: auto;
}
@media (prefers-color-scheme: dark) {
  .slow-alert {
    background: #3a2a05;
    border-color: #8a6500;
    color: #ffe2a6;
  }
  .slow-alert .sla-row span {
    color: #ffb38a;
  }
}
[data-theme='dark'] .slow-alert {
  background: #3a2a05;
  border-color: #8a6500;
  color: #ffe2a6;
}
.wq {
  background: var(--card, #fff);
  border: 1.5px solid #d69a00;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
.wq h3 {
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wq .count {
  background: #d69a00;
  color: #2b1a00;
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 13px;
}
.wq-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
}
.wq-n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #5a0a14;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: none;
}
.wq-t {
  flex: 1 1 200px;
  min-width: 0;
}
.wq-t small {
  display: block;
  color: var(--muted, #7a6a55);
}
.wq-b {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag.wait {
  background: #ffe9b0;
  color: #6b4300;
}
.tp-full {
  grid-column: 1 / -1;
  padding: 8px 10px;
  margin: 0 0 8px;
  border-radius: 10px;
  background: #fff1cc;
  color: #4a3000;
  font-size: 13px;
}

/* =====================================================================
   PART 9: ALERT SOUND BUTTON (js/sound.js)
   Appears at the bottom of the screen only while the browser has locked the sound again.
   ===================================================================== */
.snd-button {
  position: fixed;
  left: 50%;
  bottom: calc(14px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 350;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: #b45309;
  color: #fff;
  font: inherit;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  animation: snd-pulse 1.6s ease-in-out infinite;
}
@keyframes snd-pulse {
  50% {
    box-shadow: 0 6px 26px rgba(180, 83, 9, 0.7);
  }
}
@media print {
  .snd-button {
    display: none;
  }
}

/* =====================================================================
   PART 10 (v1.19): SETTINGS HOME, CAFE COLOURS, DEVICES, BLOCKED NOTICE, RECIPE DIALOG
   Everything here uses the colour variables from PART 1, so light, dark and the "Cafe colours" setting all apply.
   ===================================================================== */

/* ---- Settings (v1.20): a short list of sections on the left, the section's panels on the right ----
   On a phone the list becomes a row of tabs that scrolls sideways. */
.settings [hidden],
.view-head [hidden],
.btn[hidden],
.rc2-picker[hidden] {
  display: none !important; /* the hidden attribute alone loses to .btn / .view-head display rules */
}
#set-root.settings {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  column-gap: 22px;
  align-items: start;
  max-width: 1100px;
}
#set-root.settings > * {
  grid-column: 2; /* panels, notices and the credit line sit in the right-hand column */
}
#set-root.settings > .set-tabs {
  grid-column: 1;
  grid-row: 1 / span 40;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.set-tab {
  position: relative;
  display: block;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-left: 3px solid var(--line);
  border-radius: 0 10px 10px 0;
  padding: 10px 14px 10px 14px;
  cursor: pointer;
}
.set-tab b {
  display: block;
  font-size: 15px;
}
.set-tab small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 1px;
}
.set-tab:hover {
  background: var(--red-l);
}
.set-tab.on {
  border-left-color: var(--red);
  background: var(--card);
  box-shadow: var(--shadow-s);
}
.set-dot {
  position: absolute;
  right: 10px;
  top: 12px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: 700 12px/20px inherit;
  font-style: normal;
  text-align: center;
}
.set-todo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--red-l);
}
/* panels that most cafes never need start folded: only the heading shows, with an arrow */
.panel.fold > h3 {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}
.panel.fold > h3::after {
  content: '';
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.panel.fold.open > h3::after {
  transform: rotate(-135deg);
}
.panel.fold:not(.open) > :not(h3) {
  display: none;
}
.panel.fold.open > h3 {
  margin-bottom: 10px;
}
@media (max-width: 800px) {
  #set-root.settings {
    display: block;
  }
  #set-root.settings > .set-tabs {
    position: sticky;
    z-index: 2;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    margin: 0 -4px 12px;
    padding: 6px 4px;
    background: var(--paper);
  }
  .set-tab {
    flex: none;
    border-left: 0;
    border-bottom: 3px solid var(--line);
    border-radius: 10px 10px 0 0;
    padding: 8px 12px;
  }
  .set-tab small {
    display: none;
  }
  .set-tab b {
    display: inline;
  }
  .set-tab.on {
    border-bottom-color: var(--red);
  }
  .set-dot {
    position: static;
    display: inline-block;
    margin-left: 6px;
    vertical-align: 1px;
  }
}

/* a phone's top bar is too narrow for the outlet name: it still shows on the PIN screen and on bills */
@media (max-width: 560px) {
  .topbar .branch-chip {
    display: none;
  }
}

/* ---- Name, logo and font ---- */
.idn-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
}
.idn-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  flex: none;
}
.idn-name {
  white-space: normal;
}
.branch-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--red-l);
  color: var(--red);
  font:
    600 12px/1.6 'Montserrat',
    Arial,
    sans-serif;
  white-space: nowrap;
  vertical-align: middle;
}
.lock .branch-chip {
  margin: 0 0 6px;
}
.fonts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}
.font-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.font-pick span {
  font-size: 22px;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.font-pick small {
  font:
    500 12px 'Montserrat',
    Arial,
    sans-serif;
  color: var(--muted);
}
.font-pick.on {
  border-color: var(--red);
  background: var(--red-l);
}
/* a cafe's own logo may be any shape: show all of it */
.rail-logo,
.top-logo,
.lock-logo,
.ops-logo {
  object-fit: contain;
}

/* ---- Cafe colours ---- */
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.swatch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.swatch i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sw);
  flex: none;
}
.swatch.on {
  border-color: var(--ink);
}
.swatch input[type='color'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.brand-demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  background: var(--paper-2);
}
.brand-demo-rail {
  padding: 8px 14px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(180deg, var(--maroon-2), var(--maroon));
}

/* ---- Devices ---- */
.dev-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--line-2);
}
.dev-row.blocked {
  opacity: 0.75;
}
.dev-main {
  min-width: 0;
}
.dev-btns {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: none;
}
.dev-on {
  color: var(--green);
  font-weight: 700;
}
.pill.ok {
  background: var(--green-l);
  color: var(--green);
}
.pill.bad {
  background: var(--red-l);
  color: var(--red);
}
@media (max-width: 640px) {
  .dev-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- A blocked device: the whole app is covered by this notice until the owner unblocks it ---- */
.blocked-ov {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 8, 6, 0.86);
}
.blocked-card {
  max-width: 420px;
  background: var(--card);
  color: var(--ink);
  border-radius: var(--r);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-m);
}
.blocked-card h2 {
  color: var(--red);
  margin-bottom: 10px;
}
.blocked-card p {
  margin-bottom: 10px;
}

/* ---- Recipe dialog (v1.19) ---- */
.rc2-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  margin-bottom: 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
}
.rc2-search svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
  flex: none;
}
.rc2-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 10px 0;
  font: inherit;
  color: var(--ink);
  outline: none;
}
.rc2-row {
  display: grid;
  grid-template-columns: 1fr auto 36px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.rc2-name b {
  display: block;
}
.rc2-name .small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  margin-top: 2px;
}
.rc2-warn {
  color: var(--amber);
  font-weight: 600;
  font-size: 12px;
}
.rc2-qty {
  display: flex;
  gap: 6px;
}
.rc2-qty input,
.rc2-qty select {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: var(--card);
  color: var(--ink);
  min-width: 0;
}
.rc2-qty input {
  width: 96px;
  flex: none;
}
.rc2-qty select {
  width: 84px;
  flex: none;
}
.rc2-empty,
.rc2-none {
  text-align: center;
  padding: 18px 8px;
}
.rc2-picker {
  margin-top: 10px;
  border: 1.5px solid var(--red);
  border-radius: 12px;
  padding: 10px;
  background: var(--paper-2);
}
.rc2-pick-head {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.rc2-pick-head input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}
.rc2-pick-list {
  max-height: 220px;
  overflow: auto;
  overscroll-behavior: contain;
}
.rc2-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 8px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.rc2-pick b {
  flex: 1;
}
.rc2-pick:hover {
  background: var(--red-l);
}
.rc2-sum {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--paper-2);
  display: grid;
  gap: 4px;
}
.rc2-sum:empty {
  display: none;
}
.rc2-low {
  color: var(--red);
}
@media (max-width: 560px) {
  .rc2-row {
    grid-template-columns: 1fr 36px;
  }
  .rc2-qty {
    grid-column: 1 / 2;
    grid-row: 2;
  }
}

/* ---- Help guides (articles from the Console) ---- */
.sup-h4 {
  margin: 0 0 8px;
  color: var(--maroon);
}
.sup-guides {
  margin-bottom: 16px;
}
.sup-guide {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  margin-bottom: 8px;
}
.sup-guide summary {
  cursor: pointer;
  padding: 11px 14px;
  font-weight: 700;
}
.sup-guide-b {
  padding: 0 14px 14px;
  color: var(--ink2);
  line-height: 1.55;
}
.sup-cat-t {
  margin: 8px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
