/* PHC Web.POS — light + dark.
   Two brand colours: amber (--accent) = actions, blue (--brand2) = selection.
   Anything else is a tint or gradient of these two; green / red only for veg, paid and errors. */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root,
html[data-theme="light"],
body[data-theme="light"],
.pos-login[data-theme="light"],
.pos-shell[data-theme="light"] {
  --bg: #f1f3f6;
  --bg-wash: linear-gradient(160deg, #edf0f4 0%, #f1f3f6 45%, #f6f7f9 100%);
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --surface-3: #e8ebf0;
  --text: #1d2633;
  --muted: #5f6b7a;
  --accent: #d4890a;
  --accent-text: #1a1204;
  --accent-soft: rgba(212, 137, 10, 0.14);
  --grad-1: linear-gradient(135deg, #e3a02c 0%, #cc7f06 100%);
  --brand2: #3a66c4;
  --brand2-text: #ffffff;
  --brand2-soft: rgba(58, 102, 196, 0.12);
  --grad-2: linear-gradient(135deg, #4a78d6 0%, #3359b0 100%);
  --chip-sel: var(--brand2);
  --chip-sel-text: var(--brand2-text);
  --cat-sel: var(--brand2);
  --cat-sel-text: var(--brand2-text);
  --fav-sel: var(--accent);
  --fav-sel-text: var(--accent-text);
  --svc-sel: var(--accent);
  --svc-sel-text: var(--accent-text);
  --border: #dbe0e7;
  --danger: #c0392b;
  --danger-text: #b42318;
  --danger-soft: rgba(192, 57, 43, 0.1);
  --ok: #1e8a4c;
  --veg: #1a9e4a;
  --nonveg: #c62828;
  --egg: #d4a017;
  --tile: #ffffff;
  --tile-hover: #f0f3f7;
  --rail: #eaedf1;
  --shadow: 0 10px 28px rgba(29, 38, 51, 0.06);
  --shell-bar: #ffffff;
}

html[data-theme="dark"],
body[data-theme="dark"],
.pos-login[data-theme="dark"],
.pos-shell[data-theme="dark"] {
  --bg: #14181c;
  --bg-wash: linear-gradient(160deg, #12161a 0%, #171c21 50%, #1a2026 100%);
  --surface: #1c2329;
  --surface-2: #232b33;
  --surface-3: #2a333c;
  --text: #eef2f5;
  --muted: #9aa7b2;
  --accent: #f0a202;
  --accent-text: #1a1405;
  --accent-soft: rgba(240, 162, 2, 0.18);
  --grad-1: linear-gradient(135deg, #f6b73c 0%, #dd8f00 100%);
  --brand2: #6f9cf0;
  --brand2-text: #0b1730;
  --brand2-soft: rgba(111, 156, 240, 0.18);
  --grad-2: linear-gradient(135deg, #82abf5 0%, #5b87e2 100%);
  --chip-sel: var(--brand2);
  --chip-sel-text: var(--brand2-text);
  --cat-sel: var(--brand2);
  --cat-sel-text: var(--brand2-text);
  --fav-sel: var(--accent);
  --fav-sel-text: var(--accent-text);
  --svc-sel: var(--accent);
  --svc-sel-text: var(--accent-text);
  --border: #2f3a44;
  --danger: #e03131;
  --danger-text: #ff9b9b;
  --danger-soft: rgba(255, 107, 107, 0.14);
  --ok: #2f9e44;
  --veg: #3dd68c;
  --nonveg: #ff6b6b;
  --egg: #f0c040;
  --tile: #232b33;
  --tile-hover: #2c3640;
  --rail: #1a2026;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shell-bar: #171c21;
}

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

html, body {
  height: 100%;
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

#blazor-error-ui {
  background: var(--danger);
  color: #fff;
  bottom: 0;
  box-shadow: 0 -2px 12px rgba(0,0,0,.25);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 2000;
}
#blazor-error-ui .reload { color: #fff; margin-left: 0.75rem; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: 0.55rem; }

/* —— Login —— */
.pos-login {
  min-height: 100vh;
  background: var(--bg-wash);
  display: flex;
  flex-direction: column;
}

.pos-login-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.35rem;
  gap: 1rem;
}

.pos-brand-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.pos-brand-logo { width: 36px; height: 36px; object-fit: contain; flex: none; }
.pos-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.pos-brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}
.pos-brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.pos-chrome-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.theme-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}
.theme-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-weight: 650;
  font-size: 0.8rem;
}
.theme-toggle button.active {
  background: var(--accent);
  color: var(--accent-text);
}
.theme-toggle-sm button {
  padding: 0.18rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 1.4rem;
}
.layout-toggle button {
  min-width: 2.35rem;
  letter-spacing: -0.02em;
}

/* Light / dark switch — same icon button as the Home screen and Back office. */
.theme-icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-icon-btn:hover { color: var(--text); border-color: var(--muted); }
.theme-icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pos-shell.compact .theme-icon-btn { width: 3rem; height: 3rem; }

.pos-login-body {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.5rem 1.25rem 2rem;
}

.pos-login-card {
  width: min(960px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.5rem 1.5rem 1.75rem;
}

.pos-login-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.pos-login-card .lede {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.tenant-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: stretch;
  margin-bottom: 1rem;
}
.tenant-row input {
  flex: 1;
  min-width: 12rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  background: var(--surface-2);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.tenant-row input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1.1rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn.primary { background: var(--grad-1); color: var(--accent-text); box-shadow: 0 1px 3px rgba(204, 127, 6, 0.28); }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.danger { background: var(--danger); color: #fff; }
.btn.lg { padding: 0.9rem 1.25rem; font-size: 1.05rem; }
.btn.block { width: 100%; }

.linkish {
  background: none;
  border: 0;
  color: var(--accent);
  font-weight: 650;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.err {
  margin: 0.65rem 0 0;
  color: var(--danger);
  font-weight: 650;
  font-size: 0.9rem;
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}
.employee-tile {
  border: 1px solid var(--border);
  background: var(--tile);
  color: var(--text);
  border-radius: 14px;
  padding: 1rem 0.75rem;
  cursor: pointer;
  text-align: center;
  min-height: 7.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.employee-tile:hover { background: var(--tile-hover); }
.employee-tile.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
  background: var(--accent-soft);
}
.emp-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
}
.emp-name {
  font-weight: 750;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--text);
}
.emp-shift {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.clock-card-row {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.clock-card-row input {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 2.4rem;
  padding: 0 0.7rem;
}
.emp-code {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.passcode-wrap {
  max-width: 22rem;
  margin: 0 auto;
  text-align: center;
}
.passcode-user {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  color: var(--text);
}
.passcode-display {
  height: 3rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  letter-spacing: 0.45em;
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}
.passcode-display.shake {
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}
.keypad button {
  height: 3.4rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--tile);
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 750;
  cursor: pointer;
}
.keypad button:active { background: var(--tile-hover); }
.keypad .key-wide { grid-column: span 1; font-size: 0.95rem; }
.keypad .key-spacer { min-height: 3.4rem; }

.outlet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem;
}
.outlet-card {
  border: 1px solid var(--border);
  background: var(--tile);
  border-radius: 14px;
  padding: 1.1rem 1rem;
  text-align: left;
  cursor: pointer;
}
.outlet-card:hover { background: var(--tile-hover); }
.outlet-card .site { font-size: 0.75rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; }
.outlet-card .name { font-size: 1.1rem; font-weight: 800; margin-top: 0.25rem; color: var(--text); }
.outlet-card .area { font-size: 0.85rem; color: var(--muted); margin-top: 0.2rem; }

/* —— Shell —— */
.pos-shell {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg);
  overflow: hidden;
}
.pos-shell.training::after {
  content: "TRAINING";
  pointer-events: none;
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  color: rgba(240, 162, 2, 0.08);
  z-index: 0;
}

.pos-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: var(--shell-bar);
  border-bottom: 1px solid var(--border);
}
.pos-topbar-left,
.pos-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.mode-pill {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--brand2-soft);
  color: var(--brand2);
}
.mode-pill.train { background: var(--accent); color: var(--accent-text); }
.terminal-chip {
  font-size: 0.78rem;
  font-weight: 750;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border);
}
.bridge-sync-chip {
  font-size: 0.72rem;
  font-weight: 750;
  padding: 0.22rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--muted);
}
.bridge-sync-chip.bridge-synced { color: var(--ok, #0a7); border-color: color-mix(in srgb, var(--ok, #0a7) 40%, var(--border)); }
.bridge-sync-chip.bridge-pending { color: #a60; background: color-mix(in srgb, #a60 12%, var(--surface)); }
.bridge-sync-chip.bridge-offline { color: #b00; background: color-mix(in srgb, #b00 10%, var(--surface)); }
.service-plans {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.service-chip {
  border-radius: 8px !important;
}
.service-chip.active {
  background: var(--svc-sel) !important;
  border-color: var(--svc-sel) !important;
  color: var(--svc-sel-text) !important;
}

.pos-main {
  position: relative;
  z-index: 1;
  display: grid;
  /* Menu ~65% · Cart ~35% */
  grid-template-columns: minmax(0, 65fr) minmax(14rem, 35fr);
  min-height: 0;
}
.pos-main.cart-left {
  grid-template-columns: minmax(14rem, 35fr) minmax(0, 65fr);
}
.pos-main.cart-left .ticket-surface {
  order: -1;
}
.pos-main.cart-left .work-surface {
  border-right: 0;
  border-left: 1px solid var(--border);
}
.pos-main.cart-left .ticket-surface {
  border-right: 1px solid var(--border);
}
@media (max-width: 900px) {
  .pos-main,
  .pos-main.cart-left {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .pos-main.cart-left .ticket-surface { order: 0; }
  .pos-main.cart-left .work-surface {
    border-left: 0;
    border-right: 0;
  }
}

.work-surface,
.ticket-surface {
  min-height: 0;
  overflow: auto;
  background: var(--surface);
}
.work-surface {
  border-right: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  position: relative;
}
.ticket-surface {
  display: flex;
  flex-direction: column;
}

.panel-pad { padding: 0.65rem; }

.filter-bar {
  display: grid;
  grid-template-columns: minmax(11rem, auto) minmax(0, 1fr) minmax(11rem, 0.75fr);
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.55rem;
  margin-bottom: 0.55rem;
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.chip-scroller {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}
.filter-pref-wrap {
  max-width: 100%;
}
.filter-chips {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none; /* Firefox — no bar; use ‹ › */
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding: 0;
}
.filter-chips::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}
.chip-nav {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  display: grid;
  place-items: center;
}
.chip-nav:disabled {
  opacity: 0.28;
  cursor: default;
}
.fchip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 6px;
  padding: 0.28rem 0.45rem;
  min-height: 1.85rem;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.fchip.active {
  background: var(--grad-2);
  border-color: var(--chip-sel);
  color: var(--chip-sel-text);
}
.fchip.active[data-pref="Vegetarian"] {
  background: var(--veg);
  border-color: var(--veg);
  color: #fff;
}
.fchip.active[data-pref="NonVegetarian"] {
  background: var(--nonveg);
  border-color: var(--nonveg);
  color: #fff;
}
.fchip.active[data-pref="Egg"] {
  background: var(--egg);
  border-color: var(--egg);
  color: #1a1204;
}
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  min-height: 2.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.chip.active {
  background: var(--grad-2);
  border-color: var(--chip-sel);
  color: var(--chip-sel-text);
}
.pos-search {
  width: 100%;
  min-width: 10rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  min-height: 1.95rem;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.75rem;
}
.pos-search:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

@media (max-width: 1100px) {
  .filter-bar {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .pos-search { min-width: 0; }
}

.menu-layout {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  gap: 0.55rem;
  padding: 0 0.45rem 0.45rem;
}
/* Category chips ~2/3 prior width; wrap to more rows — never horizontal scroll */
.cat-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.6rem, 1fr));
  align-content: start;
  gap: 0.35rem;
  padding: 0.45rem;
  background: var(--rail);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: visible;
  flex-shrink: 0;
}
.cat-chip-btn {
  border: 1px solid var(--border);
  background: var(--tile);
  color: var(--text);
  text-align: center;
  padding: 0.3rem 0.35rem;
  min-height: 2.85rem;
  width: 100%;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.7rem;
  line-height: 1.15;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  overflow: hidden;
  hyphens: auto;
  word-break: break-word;
}
.cat-chip-btn.active {
  background: var(--grad-2);
  color: var(--cat-sel-text);
  border-color: var(--cat-sel);
}
.cat-fav-cell .cat-chip-btn.cat-fav.active {
  background: var(--fav-sel);
  color: var(--fav-sel-text);
  border-color: var(--fav-sel);
}
.cat-fav-cell {
  display: grid;
  grid-template-columns: 1fr auto;
  width: 100%;
  min-width: 6.75rem;
  min-height: 2.85rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(212, 137, 10, 0.45);
  background: linear-gradient(135deg, rgba(212, 137, 10, 0.22), rgba(212, 137, 10, 0.08));
}
.cat-fav-cell .cat-chip-btn.cat-fav {
  border: 0;
  border-radius: 0;
  min-height: 100%;
  background: transparent;
  white-space: nowrap;
  font-size: 0.68rem;
  letter-spacing: -0.01em;
  padding: 0.25rem 0.3rem;
}
.cat-fav-cell .cat-chip-btn.cat-fav.active {
  background: var(--fav-sel);
  color: var(--fav-sel-text);
}
.cat-fav-cell:has(.cat-fav.active) {
  border-color: var(--fav-sel);
  background: var(--fav-sel);
}
.cat-fav-cell:has(.cat-fav.active) .fav-pos-btn {
  color: var(--fav-sel-text);
  border-left-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.08);
}
.fav-pos-btn {
  border: 0;
  border-left: 1px solid rgba(212, 137, 10, 0.35);
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
  min-width: 1.85rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0;
}
.fav-pos-btn:hover {
  background: rgba(0, 0, 0, 0.12);
}
.cat-chip-btn.cat-86 {
  font-weight: 800;
  letter-spacing: 0.04em;
  min-width: 2.75rem;
}
.cat-chip-btn.cat-86.active {
  background: #c62828;
  color: #fff;
  border-color: #c62828;
}
.item-chip.eighty-six-target {
  outline: 2px dashed #c62828;
  outline-offset: -2px;
}
.cat-chip-btn.cat-fav {
  font-weight: 800;
}
.item-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 0.45rem 0.2rem 0.5rem;
  align-content: start;
}
@media (max-width: 1200px) {
  .item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Menu chips — mockup layout (mixed image / no-image) */
.item-chip {
  position: relative;
  border: 1px solid var(--border);
  background: var(--tile);
  color: var(--text);
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 11.7rem;
  min-height: 11.7rem;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.item-chip:hover {
  background: var(--tile-hover);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}
.item-chip:active { transform: scale(0.97); }
.item-chip.cat-chip {
  height: auto;
  min-height: 3.2rem;
  justify-content: center;
  padding: 0.65rem;
}
.item-chip.cat-chip .item-name {
  text-align: center;
  font-size: 0.85rem;
}

/* Bar: deep shade of the selection blue on categories and drinks so they stand apart from food */
:root { --bar-accent: #2f4f8f; }
.pos-shell[data-theme="dark"] { --bar-accent: #8fb0f5; }
.cat-chip-btn.bar,
.item-chip.bar {
  border-left: 4px solid var(--bar-accent);
  background: color-mix(in srgb, var(--bar-accent) 9%, var(--tile));
}
.cat-chip-btn.bar.active {
  background: var(--grad-2);
  border-color: var(--bar-accent);
  color: var(--brand2-text);
}
.item-chip.bar .item-price { color: var(--bar-accent); }

.chip-photo-wrap {
  position: relative;
  width: 100%;
  height: 5.4rem;
  flex-shrink: 0;
  background: var(--surface-3);
  overflow: hidden;
}
.chip-photo {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}
.item-chip:hover .chip-photo {
  transform: scale(1.05);
}

.pref-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip-photo-wrap .pref-badge {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 1;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(6px);
}
.pref-badge.pref-veg {
  color: var(--veg);
  border-color: color-mix(in srgb, var(--veg) 40%, transparent);
}
.pref-badge.pref-nonveg {
  color: var(--nonveg);
  border-color: color-mix(in srgb, var(--nonveg) 40%, transparent);
}
.pref-badge.pref-egg {
  color: var(--egg);
  border-color: color-mix(in srgb, var(--egg) 40%, transparent);
}
.pref-badge.pref-na {
  color: var(--muted);
  border-color: var(--border);
}
.item-chip.no-img .pref-badge.pref-veg {
  background: color-mix(in srgb, var(--veg) 12%, transparent);
}
.item-chip.no-img .pref-badge.pref-nonveg {
  background: color-mix(in srgb, var(--nonveg) 12%, transparent);
}
.item-chip.no-img .pref-badge.pref-egg {
  background: color-mix(in srgb, var(--egg) 12%, transparent);
}
.item-chip.no-img .pref-badge.pref-na {
  background: var(--surface-3);
}
.pref-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.pref-dot.pref-veg { background: var(--veg); }
.pref-dot.pref-nonveg { background: var(--nonveg); }
.pref-dot.pref-egg { background: var(--egg); }
.pref-dot.pref-na { background: var(--muted); }
.pref-label { text-transform: uppercase; }

.chip-top-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.7rem 0.7rem 0;
}

.chip-mid {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.7rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.item-chip.no-img {
  padding: 0;
}
.item-chip.no-img .chip-top-meta {
  padding: 0.7rem 0.7rem 0;
}
.item-chip.no-img .chip-mid {
  justify-content: center;
  padding: 0.45rem 0.7rem;
  text-align: left;
}
.item-chip.no-img .item-name {
  font-size: 0.88rem;
}
.item-chip.no-img .item-prep {
  font-size: 0.72rem;
  margin-top: 0.2rem;
}
.item-chip.has-img .item-name {
  font-size: 0.75rem;
}
.item-chip.has-img .item-prep {
  font-size: 0.68rem;
}

.item-name {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}
.item-chip:hover .item-name {
  color: var(--accent);
}
.item-prep {
  line-height: 1.3;
  color: var(--muted);
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}

.chip-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  padding: 0.4rem 0.7rem 0.65rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}
.item-chip.no-img .chip-foot {
  padding-top: 0.5rem;
}
.chip-foot .item-price {
  font-weight: 800;
  color: var(--accent);
  font-size: 0.9rem;
  line-height: 1.1;
  white-space: nowrap;
}
.chip-foot-right {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
}
.item-tag {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--muted);
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.12rem 0.4rem;
  white-space: nowrap;
  max-width: 6.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fav-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent);
}

.pos-shell.compact .pos-topbar {
  padding: 0.4rem 0.6rem;
  gap: 0.45rem;
}
.pos-shell.compact .meta {
  font-size: 0.75rem;
}
.pos-shell.compact .mode-pill {
  font-size: 0.65rem;
  padding: 0.22rem 0.45rem;
}
.pos-shell.compact .btn {
  padding: 0.7rem 1rem;
  min-height: 3rem;
  font-size: 0.88rem;
  border-radius: 8px;
}
.pos-shell.compact .btn-sm {
  padding: 0.55rem 0.85rem;
  min-height: 3rem;
  font-size: 0.82rem;
}
.pos-shell.compact .ticket-header h2 {
  font-size: 0.95rem;
}
.pos-shell.compact .totals {
  font-size: 1rem;
}

.ticket-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem 0.4rem;
  border-bottom: 1px solid var(--border);
}
.ticket-header h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}
.ticket-head-main { min-width: 0; flex: 1; }
.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.2rem;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.ticket-order-no {
  color: var(--text);
  font-weight: 800;
  font-size: 0.85rem;
}
.ticket-meta-sep { opacity: 0.55; margin: 0 0.1rem; }
.cust-btn {
  min-height: 2.4rem !important;
  font-size: 0.75rem !important;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.35rem 0.55rem !important;
  flex-shrink: 0;
}
.cust-form {
  flex: 1;
  overflow: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cust-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--muted);
}
.cust-form label em {
  color: var(--accent);
  font-style: normal;
}
.cust-form label small {
  font-weight: 600;
  opacity: 0.8;
}
.cust-form input {
  min-height: 3rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--tile);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.55rem 0.75rem;
}
.dlv-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0.6rem 0.75rem;
}
.dlv-form .wide { grid-column: 1 / -1; }
.dlv-cod, .dlv-riders { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 700; font-size: 0.8rem; color: var(--muted); }
.dlv-add-rider { display: flex; gap: 0.4rem; margin-top: 0.3rem; }
.dlv-add-rider input { flex: 1; min-width: 0; }
.dlv-add-rider .btn { min-height: 3rem; }
.cust-btn.needs { border-color: var(--danger); color: var(--danger); }
.dlv-phone { display: flex; gap: 0.5rem; align-items: flex-end; }
.dlv-phone label { flex: 1; min-width: 0; }
.dlv-phone .btn { min-height: 3rem; }
.dlv-note { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.dlv-note.ok { color: var(--accent); }
.dlv-note.warn { color: var(--warning, #d89b28); }
.dlv-note.bad { color: var(--danger); }
.cust-form-error {
  color: var(--danger, #e85d5d);
  font-weight: 700;
  font-size: 0.85rem;
}
.totals-toggle {
  align-self: flex-end;
  border: none;
  background: none;
  padding: 0.1rem 0;
  cursor: pointer;
  color: var(--brand2);
  font-size: 0.72rem;
  font-weight: 700;
}
.totals-due {
  font-weight: 800;
  font-size: 1.05rem;
}
.totals-chevron {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}
.ticket-line.child .ticket-line-name {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--muted);
}
.qty-plain {
  font-weight: 700;
  min-width: 2rem;
  text-align: center;
  color: var(--muted);
}
.ticket-lines {
  flex: 1;
  overflow: auto;
  padding: 0.4rem 0.65rem;
}
.ticket-empty {
  color: var(--muted);
  text-align: center;
  padding: 1.25rem 0.75rem;
  font-weight: 600;
  font-size: 0.78rem;
}
.ticket-line {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
}
.ticket-line-main {
  min-width: 0;
}
.ticket-line-name {
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-line-meta {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.ticket-line-side {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}
.ticket-line-total {
  min-width: 3.6rem;
  text-align: right;
  font-size: 0.85rem;
  color: var(--text);
}
.qty-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
}
.qty-ctrl span {
  min-width: 1.25rem;
  text-align: center;
  font-weight: 750;
  color: var(--text);
  font-size: 0.85rem;
}
.qty-ctrl button {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}
.ticket-footer {
  border-top: 1px solid var(--border);
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: var(--surface);
}
.totals {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}
.ticket-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.opening-cash {
  max-width: 28rem;
  margin: 1.5rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.35rem;
  box-shadow: var(--shadow);
}
.opening-cash h2 { margin: 0 0 0.35rem; font-size: 1.25rem; }
.opening-cash p { margin: 0 0 1rem; color: var(--muted); }
.denom-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.denom-row {
  display: grid;
  grid-template-columns: 5rem 1fr 5rem;
  gap: 0.5rem;
  align-items: center;
}
.denom-row input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: var(--surface-2);
  color: var(--text);
  text-align: right;
}
.cash-total {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
}

.muted { color: var(--muted); }
.center { text-align: center; }
.mb-1 { margin-bottom: 0.65rem; }
.mt-1 { margin-top: 0.65rem; }
.gap-row { display: flex; gap: 0.55rem; flex-wrap: wrap; align-items: center; }

/* Centered custom dialog (never browser alert/confirm) */
.phc-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.phc-dialog {
  width: min(22rem, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.2rem 1rem;
  color: var(--text);
}
.phc-dialog-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 800;
}
.phc-dialog-msg {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--muted);
}
.phc-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.phc-dialog-actions.single {
  grid-template-columns: 1fr;
}
.phc-dlg-btn {
  min-height: 3.25rem !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
}

.ticket-totals {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.35rem 0 0.55rem;
  font-size: 0.8rem;
}
.ticket-totals .row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
}
.ticket-totals .row.strong {
  color: var(--text);
  font-weight: 800;
  font-size: 0.95rem;
  padding-top: 0.2rem;
}
.ticket-totals .row.disc { color: var(--ok, #3dd68c); }
.ticket-totals .row.tax { color: var(--muted); }
.ticket-line-disc {
  font-size: 0.68rem;
  color: var(--ok, #3dd68c);
  font-weight: 650;
}
.layway-panel {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.layway-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.layway-head .btn {
  min-height: 3.1rem;
  min-width: 5.5rem;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.65rem 1rem;
}
.layway-head-text { min-width: 0; flex: 1; }
.layway-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}
.layway-sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
}
.layway-scopes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.layway-scopes .btn {
  flex: 1;
  min-width: 7rem;
  min-height: 3.25rem;
  font-size: 0.95rem;
  font-weight: 800;
}
.layway-body {
  flex: 1;
  overflow: auto;
  padding: 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.65rem;
  align-content: start;
}
.disc-layway .disc-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0;
  overflow: hidden;
}
.disc-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
}
.disc-col-manual { border-right: none; background: color-mix(in srgb, var(--surface) 70%, var(--tile)); }
.disc-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.disc-mode-toggle {
  display: inline-flex;
  gap: 0.25rem;
}
.btn.tiny {
  min-height: 2.1rem;
  min-width: 2.4rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.85rem;
  font-weight: 800;
}
.disc-col-body {
  flex: 1;
  overflow: auto;
  padding: 0.65rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.55rem;
  align-content: start;
}
.disc-manual-flow {
  flex: 1;
  overflow: auto;
  padding: 0.55rem 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
}
.disc-section-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.25rem;
}
.disc-section-label .req { color: var(--accent); }
.disc-name-row,
.disc-value-row,
.disc-expand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.disc-name-chip {
  border: 1px solid var(--border);
  background: var(--tile);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  min-height: 2.4rem;
}
.disc-name-chip.active {
  border-color: var(--brand2);
  background: var(--brand2-soft);
  color: var(--brand2);
  box-shadow: inset 0 0 0 1px var(--brand2);
}
.disc-name-chip:hover { background: var(--tile-hover); }
.disc-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 1rem 0.25rem;
}
.disc-hint {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  padding: 0.35rem 0.1rem;
}
.disc-chip {
  border: 1px solid var(--border);
  background: var(--tile);
  border-radius: 10px;
  min-height: 2.85rem;
  min-width: 3.6rem;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.55rem;
  text-align: center;
}
.disc-chip.sm {
  min-height: 2.5rem;
  min-width: 3.1rem;
  font-size: 0.85rem;
}
.disc-chip.range {
  color: var(--text);
  border-style: dashed;
}
.disc-chip.range.active {
  border-style: solid;
  border-color: var(--brand2);
  box-shadow: inset 0 0 0 1px var(--brand2);
}
.disc-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.disc-chip:hover:not(:disabled) { background: var(--tile-hover); }
.disc-chip:active:not(:disabled) { transform: scale(0.97); }
.disc-expand-row {
  padding: 0.35rem;
  background: color-mix(in srgb, var(--surface) 80%, var(--accent));
  border-radius: 10px;
  border: 1px solid var(--border);
}
.ticket-coupon {
  background: color-mix(in srgb, var(--ok, #3dd68c) 10%, transparent);
  cursor: default;
}
.ticket-coupon .ticket-line-name.disc {
  color: var(--ok, #3dd68c);
  font-weight: 800;
}
.btn-line-x {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  min-width: 2.2rem;
  min-height: 2.2rem;
  cursor: pointer;
  border-radius: 8px;
}
.btn-line-x:hover { background: var(--tile-hover); color: var(--danger, #e85d5d); }
.btn-disc-clear {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  margin-left: 0.35rem;
  cursor: pointer;
  vertical-align: middle;
}
.btn-disc-clear:hover { color: var(--danger, #e85d5d); border-color: var(--danger, #e85d5d); }
.ticket-totals .row.muted-row {
  color: var(--muted);
  font-size: 0.78rem;
}
.ticket-totals .row.gst-break {
  font-size: 0.8rem;
  font-weight: 650;
}
.disc-card {
  border: 1px solid var(--border);
  background: var(--tile);
  border-radius: 12px;
  padding: 0.9rem;
  text-align: left;
  cursor: pointer;
  min-height: 6.25rem;
  color: var(--text);
}
.disc-card:hover { background: var(--tile-hover); }
.disc-card:active { transform: scale(0.98); }
.disc-card.active {
  border-color: var(--brand2);
  background: var(--brand2-soft);
  box-shadow: inset 0 0 0 1px var(--brand2);
}
.disc-card .name { font-weight: 800; font-size: 0.95rem; }
.disc-card .meta { font-size: 0.75rem; color: var(--muted); margin-top: 0.3rem; }
.disc-card .amt { font-weight: 800; color: var(--accent); margin-top: 0.55rem; font-size: 1.05rem; }
.layway-foot {
  display: flex;
  gap: 0.65rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.layway-foot .btn {
  min-height: 3.35rem;
  font-size: 0.95rem;
  font-weight: 800;
}
.ticket-line {
  cursor: pointer;
  border-radius: 8px;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  margin: 0 -0.15rem;
}
.ticket-line.selected {
  background: var(--brand2-soft);
  box-shadow: inset 3px 0 0 var(--brand2);
}
.ticket-line:active {
  background: var(--tile-hover);
}
.ticket-totals .row.gst-break {
  font-size: 0.78rem;
}
.ticket-header-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.table-layway {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.table-floor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.55rem;
}
.table-floor-head h2 { font-size: 1.05rem; margin: 0; }
.table-floor-head .table-floor-title { margin-right: auto; }
.table-floor-head .table-group-chips { padding: 0; margin-right: auto; }
.table-floor-head .table-captain-chips {
  padding: 0;
  justify-content: flex-end;
  margin-left: auto;
}
.table-floor-head .table-head-actions { margin-left: 0; }
.table-layway .layway-sub { font-size: 0.7rem; margin: 0; }
.table-head-actions {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
}
.tbl-head-btn {
  min-height: 2.85rem;
  min-width: 4.5rem;
  padding: 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.tbl-head-btn.active {
  background: var(--brand2-soft);
  border-color: var(--brand2);
}
.floor-legend {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.2rem 0.55rem 0.15rem;
}
.table-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  padding: 0;
  font-size: 0.68rem;
  color: var(--muted);
  flex: 1;
  min-width: 0;
}
.table-kot-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem 0.55rem;
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--muted);
  flex: none;
}
.table-kot-legend .seg { width: 0.85rem; height: 0.38rem; border-radius: 99px; display: inline-block; margin-right: 0.2rem; vertical-align: middle; }
.table-status-legend .dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  margin-right: 0.15rem;
  vertical-align: middle;
}
.table-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem 0.4rem;
}
.table-group-chips .chip {
  min-height: 2.35rem;
  font-size: 0.8rem;
  padding: 0 0.75rem;
  font-weight: 700;
}
.table-grid {
  flex: 1;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.75rem, 1fr));
  grid-auto-rows: minmax(6.85rem, auto);
  gap: 0.4rem;
  padding: 0.45rem 0.55rem 0.75rem;
  align-content: start;
}
.tbl {
  position: relative;
  height: 6.85rem;
  min-height: 6.85rem;
  max-height: 6.85rem;
  border-radius: 10px;
  border: 2px solid color-mix(in srgb, var(--tbl-bd, var(--border)) 75%, transparent);
  background:
    linear-gradient(165deg,
      color-mix(in srgb, var(--tbl-bg, var(--surface)) 82%, #ffffff 18%),
      var(--tbl-bg, var(--surface)));
  color: var(--tbl-fg, var(--text));
  padding: 0.35rem 0.4rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.08rem;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
  transition: box-shadow .15s, border-color .15s;
}
html[data-theme="light"] .tbl,
.pos-shell[data-theme="light"] .tbl {
  background:
    linear-gradient(165deg,
      color-mix(in srgb, var(--tbl-bg) 48%, #ffffff 52%),
      color-mix(in srgb, var(--tbl-bg) 68%, #ffffff 32%));
  color: #111827;
  border-color: color-mix(in srgb, var(--tbl-bd) 55%, #94a3b8 45%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 1px 2px rgba(15,23,42,.06);
}
html[data-theme="dark"] .tbl,
.pos-shell[data-theme="dark"] .tbl {
  background:
    linear-gradient(165deg,
      color-mix(in srgb, var(--tbl-bg) 72%, #ffffff 10%),
      color-mix(in srgb, var(--tbl-bg) 88%, #0b1220 12%));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 3px rgba(0,0,0,.35);
}
.tbl:active { filter: brightness(0.97); }
.tbl.selected {
  border-color: var(--brand2);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand2) 75%, transparent),
              inset 0 1px 0 rgba(255,255,255,.16);
  z-index: 2;
}
.tbl.bill-due { animation: tbl-bill-nudge 1.05s ease-in-out infinite; }
@keyframes tbl-bill-nudge {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
  70% { transform: translateY(1px); }
}
.tbl.timer-alert {
  animation: tbl-pulse 3.2s ease-in-out infinite;
  z-index: 3;
}
.tbl.band-warn {
  border-color: color-mix(in srgb, #f59e0b 70%, var(--tbl-bd));
}
.tbl.over-limit { border-color: #dc2626; }
.tbl.over-limit .tbl-meta { color: #fecaca; font-weight: 800; }

/* Bar tabs: one section per bar area, same chip size as tables */
.bar-areas { flex: 1; overflow: auto; padding-bottom: 0.75rem; }
.bar-area-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem 0.1rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.bar-area-head strong { font-size: 0.9rem; color: var(--text); }
.bar-area-head .bar-area-count { margin-left: auto; font-weight: 700; }
.table-grid.bar-grid { flex: none; overflow: visible; padding-bottom: 0.2rem; }
.tab-btn.over { border-color: #dc2626; color: #dc2626; font-weight: 800; }
.tab-dialog { width: min(22rem, 92vw); display: flex; flex-direction: column; gap: 0.6rem; }
.tab-field { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.8rem; color: var(--muted); }
.tab-field input { min-height: 2.75rem; font-size: 1rem; padding: 0 0.6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.tbl-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.2rem; position: relative; z-index: 2; flex-shrink: 0; }
.tbl-name { font-size: 1.05rem; font-weight: 800; line-height: 1.05; }
.tbl-status { font-size: 0.58rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; opacity: 0.95; position: relative; z-index: 2; flex-shrink: 0; }
/* Floating popup over chip — does not change chip layout size */
.tbl-alert-pop {
  position: absolute;
  left: 0.2rem;
  right: 0.2rem;
  top: 0.2rem;
  z-index: 8;
  pointer-events: none;
  padding: 0.28rem 0.35rem;
  border-radius: 7px;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  color: #fff;
  background: rgba(127, 29, 29, 0.92);
  border: 1px solid rgba(254, 202, 202, 0.55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  opacity: 0;
}
/* Pops up ~2.4 s per cycle so table details stay readable the rest of the time */
.tbl-alert-pop.pop-always { opacity: 1; animation: tbl-pop-flicker 1.6s ease-in-out infinite; }
.tbl-alert-pop.pop-c5 { animation: tbl-pop-c5 5s ease-in-out infinite; }
.tbl-alert-pop.pop-c10 { animation: tbl-pop-c10 10s ease-in-out infinite; }
.tbl-alert-pop.pop-c15 { animation: tbl-pop-c15 15s ease-in-out infinite; }
.tbl-alert-pop.pop-c30 { animation: tbl-pop-c30 30s ease-in-out infinite; }
@keyframes tbl-pop-c5 {
  0% { opacity: 0; transform: translateY(-6px) scale(0.94); }
  6% { opacity: 1; transform: none; }
  16% { opacity: 0.5; } 26% { opacity: 1; } 36% { opacity: 0.5; } 44% { opacity: 1; transform: none; }
  50%, 100% { opacity: 0; transform: translateY(-6px) scale(0.94); }
}
@keyframes tbl-pop-c10 {
  0% { opacity: 0; transform: translateY(-6px) scale(0.94); }
  3% { opacity: 1; transform: none; }
  8% { opacity: 0.5; } 13% { opacity: 1; } 18% { opacity: 0.5; } 22% { opacity: 1; transform: none; }
  25%, 100% { opacity: 0; transform: translateY(-6px) scale(0.94); }
}
@keyframes tbl-pop-c15 {
  0% { opacity: 0; transform: translateY(-6px) scale(0.94); }
  2% { opacity: 1; transform: none; }
  5.5% { opacity: 0.5; } 9% { opacity: 1; } 12% { opacity: 0.5; } 14.5% { opacity: 1; transform: none; }
  16.5%, 100% { opacity: 0; transform: translateY(-6px) scale(0.94); }
}
@keyframes tbl-pop-c30 {
  0% { opacity: 0; transform: translateY(-6px) scale(0.94); }
  1% { opacity: 1; transform: none; }
  2.8% { opacity: 0.5; } 4.5% { opacity: 1; } 6% { opacity: 0.5; } 7.3% { opacity: 1; transform: none; }
  8.3%, 100% { opacity: 0; transform: translateY(-6px) scale(0.94); }
}
@media (prefers-reduced-motion: reduce) {
  .tbl-alert-pop.pop-c5, .tbl-alert-pop.pop-c10, .tbl-alert-pop.pop-c15, .tbl-alert-pop.pop-c30 { transform: none; }
  .tbl.bill-due { animation: none; }
}
html[data-theme="light"] .tbl-alert-pop,
.pos-shell[data-theme="light"] .tbl-alert-pop {
  color: #7f1d1d;
  background: rgba(254, 242, 242, 0.96);
  border-color: rgba(248, 113, 113, 0.65);
  box-shadow: 0 4px 14px rgba(127, 29, 29, 0.18);
}
@keyframes tbl-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}
@keyframes tbl-pop-flicker {
  0%, 100% { opacity: 0.55; }
  40%, 60% { opacity: 1; }
}
.tbl-captain {
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.1;
  position: relative;
  z-index: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.tbl-captain.assigned { opacity: 0.98; }
.tbl-captain.unassigned {
  opacity: 0.92;
  font-style: italic;
  color: color-mix(in srgb, #fbbf24 70%, var(--tbl-fg, #fff));
}
html[data-theme="light"] .tbl-captain.unassigned,
.pos-shell[data-theme="light"] .tbl-captain.unassigned {
  color: #b45309;
}
.tbl-meta { font-size: 0.58rem; opacity: 0.9; position: relative; z-index: 2; }
.tbl-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.2rem; margin-top: auto; position: relative; z-index: 2; }
.tbl-time { font-size: 0.58rem; font-weight: 700; }
.age {
  display: inline-block;
  padding: 0.06rem 0.38rem;
  border-radius: 999px;
  font-weight: 750;
  line-height: 1.3;
  white-space: nowrap;
  letter-spacing: 0;
}
.age-fresh { background: #e5f6ec; color: #0f6b3a; }
.age-soon { background: #fff4d6; color: #7a4e00; }
.age-wait { background: #ffeadf; color: #8a3412; }
.age-late { background: #fde8ea; color: #8e1b3a; }
.tbl-amt { font-size: 0.72rem; font-weight: 800; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tbl:has(.tbl-bars) {
  height: auto;
  max-height: none;
}
.tbl-top .tbl-amt { margin-left: auto; font-size: 0.68rem; flex-shrink: 0; }
.tbl-bars { display: flex; flex-direction: column; gap: 0.12rem; margin-top: 0.12rem; }
.tbl-bar-row { display: flex; align-items: center; gap: 0.18rem; }
.tbl-bar-no { width: 0.72rem; flex: none; font-size: 0.55rem; font-weight: 800; text-align: center; }
.tbl-bar { flex: 1; display: flex; height: 0.38rem; border-radius: 99px; overflow: hidden; background: rgba(15, 23, 42, 0.14); }
.tbl-bar .seg, .table-status-legend .seg { display: block; height: 100%; }
.seg.hold { background: #ffffff; box-shadow: inset 0 0 0 1.5px #111827; }
.seg.wait { background: #facc15; }
.seg.cook { background: #f472b6; }
.seg.ready { background: #111827; }
.seg.got { background: #334155; }
.seg.done { background: #14532d; }
.tbl-kots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem;
  margin-top: 0.08rem;
  position: relative;
  z-index: 2;
}
.tbl-kot {
  font-size: 0.52rem;
  font-weight: 800;
  padding: 0.06rem 0.28rem;
  border-radius: 4px;
  background: #e7f0fa;
  color: #1e4a73;
  white-space: nowrap;
}
.tbl-kot.kot-Ready { background: #e5f6ec; color: #0f6b3a; }
.tbl-kot.kot-InPrep { background: #ffedd8; color: #8a3d00; }
.tbl-kot.kot-Sent { background: #e7f0fa; color: #1e4a73; }
.tbl-kot.kot-unsent { background: #fde68a; color: #92400e; }
.table-captain-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0 0.55rem 0.35rem;
}
.table-captain-chips .chip {
  min-height: 2.1rem;
  font-size: 0.72rem;
  padding: 0 0.65rem;
  font-weight: 700;
}
.table-captain-chips .chip .cnt {
  opacity: 0.75;
  font-weight: 600;
  margin-left: 0.2rem;
}
.speech-lang-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem 0.4rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, var(--accent));
}
.speech-lang-bar .lang-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-right: 0.15rem;
}
.speech-lang-bar .chip {
  min-height: 1.85rem;
  font-size: 0.7rem;
  padding: 0 0.55rem;
  font-weight: 700;
}
.table-cart-ops {
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 0.65rem;
  background: var(--surface-2);
}
.table-cart-title { font-size: 0.75rem; font-weight: 800; margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.03em; }
.table-cart-btns, .table-cart-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.table-cart-ops .btn.touch,
.guest-pad .btn.touch {
  min-height: 3rem;
  min-width: 3rem;
  font-size: 0.85rem;
  padding: 0 0.75rem;
  font-weight: 700;
}
.table-cart-row .btn.touch { flex: 1; min-height: 3.25rem; }
.guest-pad.inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0;
}
.table-cart-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.4rem; min-width: 0; }
.table-cart-head:last-child { margin-bottom: 0; }
.table-cart-head .table-cart-title { margin-bottom: 0; display: flex; align-items: center; gap: 0.4rem; }
.table-cart-status {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
}
.guest-stepper { display: inline-flex; align-items: center; gap: 0.25rem; }
.guest-stepper .btn { min-width: 2.6rem; min-height: 2.6rem; font-size: 1.2rem; font-weight: 800; padding: 0; }
.guest-val { min-width: 4.2rem; text-align: center; font-weight: 800; font-size: 1rem; }
.guest-val small { font-size: 0.7rem; font-weight: 600; color: var(--muted); }
.captain-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.45rem;
  padding: 0.3rem 0.35rem 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  min-width: 0;
}
.captain-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); flex-shrink: 0; }
.captain-name { flex: 1; min-width: 0; font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.captain-name.none { color: var(--muted); font-style: italic; font-weight: 500; }
.captain-btn { flex-shrink: 0; min-height: 2.4rem; padding: 0 0.7rem; font-size: 0.78rem; font-weight: 700; }
.table-cart-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.table-cart-head .guest-stepper { margin-right: auto; }
.table-cart-ops .btn.table-cart-mini { min-height: 2.4rem; min-width: 0; padding: 0 0.7rem; font-size: 0.78rem; font-weight: 700; }
.qty-ctrl button {
  min-width: 2.6rem;
  min-height: 2.6rem;
  font-size: 1.15rem;
  font-weight: 800;
}
.ticket-actions .btn {
  min-height: 3.25rem !important;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.65rem 0.85rem;
}

/* —— POS notification prefs + toast push alerts —— */
.notify-body { padding: 0.5rem 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.85rem; }
.notify-section { display: flex; flex-direction: column; gap: 0.4rem; }
.notify-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.notify-chip-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.notify-chip-row .chip {
  min-height: 2.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 0.7rem;
}
.notify-hint { font-size: 0.72rem; margin: 0; }
.notify-type-list { display: flex; flex-direction: column; gap: 0.3rem; }
.notify-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.notify-type-row.on { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.notify-type-row.off { opacity: 0.55; }
.notify-type-flag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.notify-type-row.on .notify-type-flag { color: var(--accent); }

.pos-toast-stack {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
  pointer-events: none;
}
.pos-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--surface) 92%, var(--accent));
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
  animation: pos-toast-in .25s ease-out;
}
.pos-toast-kotReady,
.pos-toast-orderingPending,
.pos-toast-alert {
  border-color: color-mix(in srgb, #dc2626 45%, var(--border));
  background: color-mix(in srgb, var(--surface) 88%, #fecaca);
}
.pos-toast-tenderDone,
.pos-toast-orderSaved {
  border-color: color-mix(in srgb, #16a34a 45%, var(--border));
  background: color-mix(in srgb, var(--surface) 88%, #bbf7d0);
}
.pos-toast-body { flex: 1; min-width: 0; }
.pos-toast-title { font-size: 0.82rem; font-weight: 800; line-height: 1.2; }
.pos-toast-msg { font-size: 0.78rem; opacity: 0.92; margin-top: 0.15rem; line-height: 1.3; }
.pos-toast-x {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0 0.15rem;
  min-width: 1.75rem;
  min-height: 1.75rem;
}
@keyframes pos-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ——— Open Orders panel ——— */
.orders-btn { position: relative; }
.orders-btn.active { border-color: var(--brand2); color: var(--brand2); }
.orders-badge {
  display: inline-block;
  margin-left: 0.3rem;
  min-width: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25rem;
  text-align: center;
}
.oo-start-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.oo-start-toggle input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.oo-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.45rem 0.6rem 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.oo-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.oo-tab.active { color: var(--text, inherit); border-bottom-color: var(--brand2); }
.oo-tab .cnt {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--surface-3);
}
.oo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  padding: 0.45rem 0.6rem;
}
.oo-chip-row { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.oo-chip-row .chip { min-height: 2.1rem; padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.oo-chip-row .chip .cnt { margin-left: 0.2rem; opacity: 0.75; }
.oo-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0 0.6rem 0.6rem;
}
.oo-list, .oo-detail {
  min-height: 0;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.oo-list { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.4rem; }
.oo-row {
  text-align: left;
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  /* overflow:hidden would let the scrolling list squash rows to fit */
  flex-shrink: 0;
}
/* Rows look alike; status is a small dot before the status text (overdue as a soft red tag) */
.oo-row { --tone: var(--muted); border-left: 1px solid var(--border); }
.oo-row.tone-new { --tone: var(--brand2); }
.oo-row.tone-prep { --tone: var(--accent); }
.oo-row.tone-ready { --tone: var(--ok); }
.oo-row.tone-way { --tone: color-mix(in srgb, var(--brand2) 60%, var(--text)); }
.oo-row.tone-late { --tone: var(--danger-text); }
.oo-row.tone-dine { --tone: color-mix(in srgb, var(--brand2) 45%, var(--muted)); }
.oo-row.tone-done { --tone: var(--border); }
.oo-row.selected { border-color: var(--brand2); background: var(--brand2-soft); box-shadow: inset 3px 0 0 var(--brand2); }
.oo-kind { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.oo-state { font-size: 0.82rem; font-weight: 700; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.oo-state::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--tone); margin-right: 0.35rem; vertical-align: 0.05rem; }
.oo-late-tag {
  flex-shrink: 0;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  color: var(--danger-text);
  background: var(--danger-soft);
  white-space: nowrap;
}
.oo-unpaid-toggle { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 700; cursor: pointer; margin-left: auto; }
.oo-unpaid-toggle input { width: 1.1rem; height: 1.1rem; }
.oo-detail-state { --tone: var(--muted); display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; font-weight: 800; font-size: 0.9rem; color: var(--tone); white-space: nowrap; }
.oo-detail-state.tone-new { --tone: var(--brand2); }
.oo-detail-state.tone-prep { --tone: var(--accent); }
.oo-detail-state.tone-ready { --tone: var(--ok); }
.oo-detail-state.tone-way { --tone: color-mix(in srgb, var(--brand2) 60%, var(--text)); }
.oo-detail-state.tone-late { --tone: var(--danger-text); }
.oo-detail-state.tone-dine { --tone: color-mix(in srgb, var(--brand2) 45%, var(--muted)); }
.oo-onacct { font-size: 0.78rem; color: var(--brand2); }
.bb-pay-head { margin-top: 0.3rem; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.oo-row-top { display: flex; align-items: center; gap: 0.45rem; position: relative; z-index: 1; }
.oo-no { font-weight: 800; font-size: 0.95rem; }
.oo-type {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--surface-3);
}
.oo-type.t-T { background: rgba(8, 145, 178, 0.18); }
.oo-type.t-O { background: rgba(212, 137, 10, 0.2); }
.oo-type.t-H { background: rgba(124, 58, 237, 0.18); }
.oo-type.t-Q { background: rgba(30, 138, 76, 0.18); }
.oo-time { margin-left: auto; font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.oo-row { position: relative; overflow: hidden; }
.oo-row-cust { display: flex; align-items: baseline; gap: 0.45rem; min-width: 0; line-height: 1.3; position: relative; z-index: 1; }
.oo-who { font-size: 0.9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.oo-captain { font-size: 0.78rem; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 2.5rem; flex: 0 1 auto; }
.oo-captain::before { content: "· "; }
.oo-row-addr {
  font-size: 0.8rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.oo-row-mid { font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; z-index: 1; }
.oo-row-foot { display: flex; align-items: center; flex-wrap: nowrap; gap: 0.5rem; margin-top: 0.1rem; position: relative; z-index: 1; }
.oo-filters { align-items: center; }
.oo-amt { margin-left: auto; font-weight: 800; font-size: 1.05rem; }
.oo-pay, .oo-ful, .oo-ready {
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  white-space: nowrap;
  letter-spacing: 0.01em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oo-pay.pay-Paid { border-color: var(--ok); color: #fff; background: var(--ok); }
.oo-pay.pay-Unpaid, .oo-pay.pay-Part { border-color: var(--danger); color: var(--danger); background: rgba(220, 38, 38, 0.08); }
.oo-pay.pay-RefundDue { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.oo-ful.ful-Placed { border-color: var(--brand2); color: var(--brand2); background: var(--brand2-soft); }
.oo-ful.ful-Ready { border-color: var(--ok); color: var(--ok); background: rgba(30, 138, 76, 0.12); }
.oo-ful.ful-OutForDelivery { border-color: var(--brand2); color: var(--brand2); background: var(--brand2-soft); }
.oo-ful.ful-Preparing { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.oo-ful.ful-done { border-color: var(--ok); color: var(--ok); }
.oo-ready { color: var(--muted); }
.oo-ready.late { border-color: color-mix(in srgb, var(--danger-text) 45%, transparent); color: var(--danger-text); background: var(--danger-soft); }

/* Large slanted PAID stamp (as on Takeaway): order rows, order detail, tender */
.paid-stamp {
  position: absolute;
  top: 50%;
  right: 4.5rem;
  transform: translateY(-50%) rotate(-18deg);
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 0.12rem 0.55rem 0.12rem 0.7rem;
  color: rgba(30, 138, 76, 0.28);
  border: 4px solid rgba(30, 138, 76, 0.28);
  border-radius: 10px;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  text-transform: uppercase;
}
.paid-stamp.big {
  top: 38%;
  right: 50%;
  transform: translate(50%, -50%) rotate(-18deg);
  font-size: 5.5rem;
  border-width: 7px;
  border-radius: 16px;
  color: rgba(30, 138, 76, 0.2);
  border-color: rgba(30, 138, 76, 0.2);
}
.oo-lines { position: relative; }
.oo-lines > .bb { position: relative; z-index: 1; }
.oo-detail { display: flex; flex-direction: column; }
.oo-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--border);
}
.oo-detail-title { font-weight: 800; font-size: 1.02rem; }
.oo-detail-sub { font-size: 0.78rem; }
.oo-detail-cust { font-size: 0.85rem; font-weight: 600; margin-top: 0.15rem; }
.oo-detail-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.oo-lines { flex: 1; overflow: auto; padding: 0.4rem 0.7rem; }
.oo-line { display: flex; gap: 0.45rem; font-size: 0.86rem; padding: 0.12rem 0; }
.oo-line .q { width: 2.4rem; text-align: right; color: var(--muted); }
.oo-line .n { flex: 1; }
.oo-line .a { white-space: nowrap; }
.oo-line.mod { font-size: 0.78rem; color: var(--muted); }
.oo-totals { border-top: 1px dashed var(--border); margin-top: 0.4rem; padding-top: 0.35rem; font-size: 0.85rem; }
.oo-totals > div { display: flex; justify-content: space-between; padding: 0.08rem 0; }
.oo-totals .grand { font-weight: 800; font-size: 0.98rem; }
.oo-totals .paid { color: var(--ok); }
.oo-totals .due { color: var(--danger); font-weight: 800; }
.oo-ready-box { border-top: 1px solid var(--border); padding: 0.45rem 0.7rem; }
.oo-ready-head { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.82rem; margin-bottom: 0.3rem; }
.oo-ready-head .lbl { font-weight: 700; }
.oo-ready-head .val.late { color: var(--danger-text); font-weight: 700; }
.oo-ready-presets { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.oo-ready-presets .chip { min-height: 2.1rem; padding: 0.25rem 0.55rem; font-size: 0.8rem; }
.oo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.55rem 0.7rem;
  border-top: 1px solid var(--border);
}
.oo-actions .btn { flex: 1 1 6.5rem; min-height: 3rem; font-weight: 800; }
.oo-actions .oo-step { flex-basis: 100%; }
.oo-pay.pay-OnAccount { border-color: var(--brand2); color: var(--brand2); }
.oo-bill { margin-left: 0.4rem; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.oo-detail-dlv { display: flex; flex-wrap: wrap; gap: 0.35rem; font-size: 0.8rem; margin-top: 0.15rem; }
.oo-rider { font-weight: 700; }
.oo-cod { font-weight: 800; color: var(--danger); border: 1px solid var(--danger); border-radius: 999px; padding: 0 0.4rem; }
.oo-actions .oo-refund { border-color: var(--accent); color: var(--accent); }
.oo-subpanel { border-top: 1px solid var(--border); padding: 0.5rem 0.7rem; background: var(--surface-2, var(--surface)); }
.oo-sub-head { font-size: 0.85rem; font-weight: 800; margin-bottom: 0.35rem; }
.oo-sub-actions { display: flex; gap: 0.4rem; margin-top: 0.45rem; }
.oo-sub-actions .btn { flex: 1; min-height: 2.8rem; font-weight: 800; }
.oo-preview {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: rgba(16, 21, 28, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  overflow: auto;
}
.orders-layway { position: relative; }
.oo-preview-card {
  width: min(420px, 100%);
  background: #fff;
  color: #1b1f24;
  border-radius: 0.8rem;
  padding: 0.7rem 0.8rem 0.8rem;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.2);
}
.oo-preview-card header { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.oo-preview-note { margin: 0.45rem 0 0; font-size: 0.8rem; color: #5c6770; }
.oo-slip {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  color: #000;
  background: #fff;
  border: 1px solid #e6ebf0;
  border-radius: 0.4rem;
  padding: 0.6rem;
  max-height: 55vh;
  overflow: auto;
}
.oo-slip .c { text-align: center; }
.oo-slip .b { font-weight: 700; }
.oo-slip .lg { font-size: 15px; }
.oo-slip .sm { font-size: 10.5px; }
.oo-slip hr { border: 0; border-top: 1px dashed #000; margin: 4px 0; }
.oo-slip table { width: 100%; border-collapse: collapse; }
.oo-slip td { vertical-align: top; padding: 1px 0; }
.oo-slip .q { width: 2.2em; text-align: right; padding-right: 4px; }
.oo-slip .a { text-align: right; white-space: nowrap; }
.oo-slip .mod td { font-size: 10.5px; }
.oo-slip .dup { border: 1px solid #000; padding: 1px 4px; display: inline-block; }

.tender-after { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-left: auto; }
.tender-after .chip { min-height: 2.6rem; font-weight: 700; }
.tender-balance {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.7rem 0.75rem 0.6rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}
.tender-balance .lbl { font-size: 0.8rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.tender-balance .val { font-size: 2.2rem; font-weight: 900; line-height: 1.15; color: var(--text); }
.tender-balance .of { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.tender-balance.is-change .val { color: var(--ok); }
.tender-balance.is-done .val { color: var(--ok); }
.tender-amt-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.65rem 0.75rem 0.1rem; }
.tender-amt-row label { font-size: 0.9rem; font-weight: 800; color: var(--muted); }
.tender-amt-row .tender-amt { flex: 1 1 auto; width: auto; font-size: 1.35rem; min-height: 3.1rem; }
.tender-amt-clear {
  min-width: 3rem;
  min-height: 3.1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
}
.tender-amt {
  width: 9rem;
  min-height: 2.8rem;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}
.tender-quick { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.4rem 0.75rem 0.1rem; }
.quick-note {
  min-width: 4.6rem;
  min-height: 3rem;
  font-size: 1.05rem;
  font-weight: 800;
  border: 1px solid var(--ok);
  color: var(--ok);
  background: rgba(30, 138, 76, 0.08);
  border-radius: 8px;
  cursor: pointer;
}
.quick-note:disabled { opacity: 0.5; cursor: default; }
.tender-lines { border-top: 1px solid var(--border); padding: 0.35rem 0.75rem; max-height: 9rem; overflow: auto; }
.tender-line { display: flex; align-items: center; gap: 0.5rem; padding: 0.15rem 0; font-size: 0.92rem; }
.tender-line .n { flex: 1; font-weight: 700; }
.tender-line .a { font-weight: 800; }
.tender-line .x {
  min-width: 2.4rem;
  min-height: 2.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
}
@media (max-width: 900px) {
  .oo-split { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1.2fr); }
}

/* Tender: bill breakup (left) + split payment (right) */
.tender-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(16rem, 0.9fr) minmax(0, 1.1fr);
}
.tender-bill {
  min-height: 0;
  overflow: auto;
  padding: 0.55rem 0.75rem;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.tender-cust { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.4rem; }
.tender-pay { min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.tender-pay .layway-body { flex: 1 1 auto; }
.tender-hint { margin: 0.15rem 0.75rem 0; font-size: 0.74rem; color: var(--muted); }
.tender-quick-lbl { align-self: center; font-size: 0.72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; margin-right: 0.15rem; }
.quick-note { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.quick-note small { font-size: 0.68rem; font-weight: 700; opacity: 0.85; }
.tender-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
}
.tender-btn {
  min-height: 3.6rem;
  padding: 0.4rem 0.6rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--muted);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}
.tender-btn:hover:not(:disabled) { background: var(--accent-soft); }
.tender-btn:disabled { opacity: 0.5; cursor: default; }
.tender-btn.cat-Cash { border-left-color: var(--ok); }
.tender-btn.cat-UPI, .tender-btn.cat-Wallet,
.tender-btn.cat-Card, .tender-btn.cat-NetBanking { border-left-color: var(--brand2); }
.tender-btn.cat-CustomerCredit, .tender-btn.cat-Advance, .tender-btn.cat-HouseAccount { border-left-color: var(--accent); }
.quick-note.settle { border-color: #d97706; color: #b45309; background: rgba(217, 119, 6, 0.08); }
.tender-foot { gap: 0.5rem; margin-top: auto; }
.tender-foot .btn { min-height: 3.2rem; font-size: 1rem; font-weight: 800; }
.tender-line .ref { display: block; font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.tender-line .a { text-align: right; }
.tender-line .a .chg { display: block; font-size: 0.72rem; font-weight: 700; color: var(--ok); }
.tender-ref { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); background: var(--accent-soft); }
.tender-ref-head { font-size: 0.85rem; font-weight: 800; margin-bottom: 0.35rem; }
.tender-ref-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.tender-ref-input { flex: 1 1 10rem; width: auto; font-size: 1rem; }
.tender-ref-row .btn { min-height: 2.8rem; font-weight: 800; }
@media (max-width: 900px) {
  .tender-split { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .tender-bill { max-height: 38vh; border-right: 0; border-bottom: 1px solid var(--border); }
}

/* Bill breakup (ticket totals, tender, order detail) */
.totals-tax { font-size: 0.74rem; font-weight: 700; color: var(--muted); margin-left: 0.5rem; margin-right: auto; }
.bb { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.82rem; }
.bb-lines { display: flex; flex-direction: column; gap: 0.1rem; padding-bottom: 0.35rem; border-bottom: 1px dashed var(--border); }
.bb-lines .ticket-line { cursor: default; padding-top: 0.3rem; padding-bottom: 0.3rem; gap: 0.4rem; }
.bb-lines .ticket-line:active { background: none; }
.bb-lines .ticket-line:last-child { border-bottom: none; }
.bb-lines .ticket-line-side { gap: 0.3rem; }
.bb-line { display: flex; gap: 0.45rem; padding: 0.08rem 0; }
.bb-line .q { width: 2.4rem; text-align: right; color: var(--muted); flex-shrink: 0; }
.bb-line .n { flex: 1; min-width: 0; }
.bb-line .a { white-space: nowrap; font-weight: 700; }
.bb-line.mod { font-size: 0.76rem; color: var(--muted); }
.bb-rows { display: flex; flex-direction: column; gap: 0.18rem; }
.bb-row { display: flex; justify-content: space-between; gap: 0.5rem; color: var(--muted); }
.bb-row > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bb-row.disc { color: var(--ok); }
.bb-row.tax { color: var(--text); font-weight: 700; }
.bb-row.grand { color: var(--text); font-weight: 800; font-size: 1rem; border-top: 1px solid var(--border); padding-top: 0.3rem; margin-top: 0.1rem; }
.bb-row.paid { color: var(--ok); font-weight: 700; }
.bb-row.due { color: var(--danger); font-weight: 800; font-size: 0.95rem; }
.bb-row.gst { padding-left: 0.6rem; font-size: 0.78rem; }

/* Menu tile offers: one badge, struck regular price, "No disc." for items excluded from discounts */
.offer-badge {
  display: inline-block;
  max-width: 100%;
  padding: 0.08rem 0.4rem;
  border-radius: 5px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: auto;
}
.offer-badge.save { background: var(--grad-1); color: var(--accent-text); }
.offer-badge.deal { background: var(--grad-2); color: var(--brand2-text); }
.offer-badge.time { background: var(--brand2-soft); color: var(--brand2); border: 1px solid color-mix(in srgb, var(--brand2) 40%, transparent); }
.offer-badge.on-photo {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  max-width: calc(100% - 0.7rem);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.offer-badge.on-photo.time { background: var(--surface); }
.item-chip.has-offer { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.chip-foot .item-price.is-deal { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.05rem; }
.was-price {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.1;
  color: color-mix(in srgb, var(--text) 68%, transparent);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, var(--text) 60%, transparent);
  font-variant-numeric: tabular-nums;
}
.no-disc {
  margin-left: 0.3rem;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}


/* Add-ons, kitchen notes, KOT-wise view */
.note-input {
  width: 100%;
  min-height: 3rem;
  padding: 0.55rem 0.7rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.mod-flow {
  flex: 1;
  overflow: auto;
  padding: 0.6rem 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.mod-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem 0.7rem 0.7rem;
}
.mod-group.needed { border-color: rgba(217, 119, 6, 0.55); }
.mod-group-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.mod-group-name { font-size: 0.98rem; font-weight: 800; color: var(--text); }
.mod-group-rule {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.mod-group-rule.req { background: rgba(217, 119, 6, 0.12); color: #b45309; }
.mod-group-state { margin-left: auto; font-size: 0.78rem; font-weight: 750; color: var(--muted); }
.mod-group-state.ok { color: var(--ok, #16a34a); }
.mod-group-state.need { color: #b45309; }
.mod-opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.45rem;
}
.mod-opt {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.5rem;
  align-items: center;
  text-align: left;
  min-height: 3.2rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.mod-opt:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.mod-opt.on {
  background: var(--brand2-soft);
  border-color: var(--brand2);
  box-shadow: inset 0 0 0 1px var(--brand2);
}
.mod-opt-mark {
  grid-row: 1 / span 2;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--muted);
  background: var(--surface);
  box-sizing: border-box;
}
.mod-opt-mark.radio { border-radius: 50%; }
.mod-opt-mark.check { border-radius: 4px; }
.mod-opt.on .mod-opt-mark { border-color: var(--accent); background: var(--accent); }
.mod-opt.on .mod-opt-mark.radio { box-shadow: inset 0 0 0 3px var(--surface); }
.mod-opt.on .mod-opt-mark.check::after {
  content: "✓";
  display: block;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 0.8rem;
  text-align: center;
}
.mod-opt-name {
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mod-opt-price { font-size: 0.74rem; font-weight: 700; color: var(--muted); min-height: 0.9rem; }
.mod-opt.on .mod-opt-price { color: var(--text); }
.mod-note-groups { display: flex; flex-direction: column; margin-bottom: 0.55rem; }
.mod-note-row {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  align-items: start;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-top: 1px dashed var(--border);
}
.mod-note-row:first-child { border-top: none; padding-top: 0; }
.mod-note-title {
  padding-top: 0.6rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}
.mod-note-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.mod-note-chip {
  min-height: 2.3rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.mod-note-chip.on {
  background: var(--brand2-soft);
  border-color: var(--brand2);
  color: var(--brand2);
}
.mod-group.note .note-input { min-height: 2.6rem; font-size: 0.92rem; }
.ticket-line-note { font-size: 0.74rem; font-weight: 700; color: #b45309; margin-top: 0.12rem; white-space: normal; }
.ticket-lines .ticket-line { padding-top: 0.3rem; padding-bottom: 0.3rem; gap: 0.4rem; }
.ticket-lines .ticket-line-side { gap: 0.3rem; }
.ticket-lines .qty-ctrl button { width: 2.1rem; height: 2.1rem; min-width: 2.1rem; min-height: 2.1rem; font-size: 1rem; }
.ticket-lines .btn-line-x { min-width: 1.9rem; min-height: 1.9rem; font-size: 1.2rem; }
.ticket-addons { display: flex; flex-wrap: wrap; gap: 0.2rem; margin-top: 0.15rem; }
.ticket-addon {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket-addon-x {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  padding: 0 0.1rem 0 0.2rem;
  min-width: 1.4rem;
  min-height: 1.4rem;
  cursor: pointer;
}
.ticket-addon-x:hover { color: var(--danger, #e85d5d); }
.ticket-line-acts { display: flex; gap: 0.35rem; margin-top: 0.3rem; }
.ticket-line-acts .btn { min-height: 2.4rem; padding: 0 0.8rem; font-size: 0.82rem; font-weight: 800; }
.ticket-order-note {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 0.35rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.8rem;
  color: #b45309;
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 8px;
  cursor: pointer;
}
.ticket-order-note.empty { color: var(--muted); background: transparent; border-style: dashed; border-color: var(--border); font-weight: 700; }
.ticket-kot-link { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; }
.oo-notes { margin-top: 0.4rem; padding: 0.35rem 0.5rem; font-size: 0.8rem; color: #b45309; border: 1px dashed rgba(217, 119, 6, 0.45); border-radius: 8px; }
.kot-hist-bar { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.45rem; }
.kot-hist-bar .kot-hist-title { flex: 1; font-weight: 800; }
.kot-hist-bar .btn { min-height: 2.5rem; font-weight: 800; }
.kot-hist { display: flex; flex-direction: column; gap: 0.5rem; }
.kot-empty { padding: 0.75rem 0.25rem; }
.kot-card { border: 1px solid var(--border); border-radius: 10px; padding: 0.45rem 0.6rem; background: var(--surface); }
.kot-card-head { display: flex; align-items: center; gap: 0.5rem; padding-bottom: 0.3rem; margin-bottom: 0.3rem; border-bottom: 1px dashed var(--border); }
.kot-no { font-weight: 800; }
.kot-when { flex: 1; font-size: 0.78rem; color: var(--muted); }
.kot-reprint { min-height: 2.3rem; padding: 0 0.7rem; font-size: 0.8rem; font-weight: 800; }
.kot-order-note { font-size: 0.8rem; font-weight: 700; color: #b45309; margin-bottom: 0.25rem; }
.kot-item { display: flex; align-items: baseline; gap: 0.45rem; font-size: 0.9rem; padding: 0.08rem 0; }
.kot-item .q { width: 2.2rem; text-align: right; font-weight: 800; }
.kot-item .n { flex: 1; font-weight: 700; }
.kot-item.is-cancel .n { text-decoration: line-through; color: var(--muted); }
.kot-tag { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em; border: 1px solid currentColor; border-radius: 4px; padding: 0 0.3rem; }
.kot-item.is-add .kot-tag { color: var(--ok); }
.kot-item.is-cancel .kot-tag { color: var(--danger); }
.kot-item.is-changed .kot-tag { color: #b45309; }
.kot-mod { padding-left: 2.65rem; font-size: 0.8rem; color: var(--muted); }
.kot-mod.added { color: var(--ok); font-weight: 800; }
.kot-mod.removed { color: var(--danger); font-weight: 800; }
.kot-note { padding-left: 2.65rem; font-size: 0.8rem; font-weight: 700; color: #b45309; }

/* Back / Menu buttons that leave a screen — easy to spot */
.layway-head > .btn.ghost:first-child,
.btn.ghost.nav-back {
  background: var(--grad-2);
  border-color: var(--brand2);
  color: var(--brand2-text);
  box-shadow: 0 1px 3px rgba(51, 89, 176, 0.3);
}
.layway-head > .btn.ghost:first-child:hover,
.btn.ghost.nav-back:hover {
  background: var(--brand2);
  border-color: var(--brand2);
  color: var(--brand2-text);
}

/* Liquor peg picker */
.pour-dialog { width: min(26rem, 100%); }
.pour-dialog .phc-dialog-msg.pour-out { color: var(--danger, #e03131); font-weight: 700; }
.pour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: 0.55rem; margin-bottom: 0.9rem; }
.pour-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; min-height: 4.5rem; padding: 0.5rem; border-radius: 12px; border: 2px solid var(--brand2); background: color-mix(in srgb, var(--brand2) 12%, var(--surface)); color: var(--text); cursor: pointer; }
.pour-opt:disabled { border-color: var(--border); background: var(--surface-2, var(--surface)); opacity: 0.55; cursor: not-allowed; }
.pour-size { font-size: 1.05rem; font-weight: 800; }
.pour-price { font-size: 0.9rem; font-weight: 700; }
.pour-note { font-size: 0.7rem; color: var(--danger, #e03131); }

/* Equal split chip (tender) */
.quick-note.active { background: var(--grad-2); border-color: var(--brand2); color: var(--brand2-text); }
.split-guests { display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0.35rem 0.75rem 0; }
.split-guest {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}
.split-guest.done { border-color: var(--ok); color: var(--ok); background: rgba(30, 138, 76, 0.08); }
.split-guest.next { border-color: var(--brand2); color: var(--brand2-text); background: var(--grad-2); }

/* Split bill panel */
.split-modes { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-left: auto; }
.split-body { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.split-bills { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.6rem 0.75rem 0.3rem; }
.split-bill { display: flex; flex-direction: column; min-width: 7.5rem; padding: 0.45rem 0.6rem; border: 2px solid var(--brand2); border-radius: 10px; background: color-mix(in srgb, var(--brand2) 8%, var(--surface)); }
.split-bill.empty { border-style: dashed; border-color: var(--border); background: var(--surface); }
.split-bill .n { font-weight: 800; font-size: 0.95rem; }
.split-bill .a { font-weight: 800; font-size: 1.1rem; }
.split-all { margin-top: 0.25rem; padding: 0.2rem 0.4rem; font-size: 0.75rem; font-weight: 700; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); cursor: pointer; }
.split-add { min-width: 5.5rem; border: 2px dashed var(--border); border-radius: 10px; background: transparent; color: var(--text); font-weight: 800; cursor: pointer; }
.split-company { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.3rem 0.75rem; }
.split-company input { flex: 1 1 12rem; min-height: 2.6rem; padding: 0.35rem 0.6rem; font-size: 1rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.split-company .split-gstin { flex: 0 1 12rem; text-transform: uppercase; letter-spacing: 0.04em; }
.split-hint { margin: 0; padding: 0.2rem 0.75rem 0.4rem; font-size: 0.8rem; color: var(--muted); }
.split-units { flex: 1; min-height: 0; overflow: auto; padding: 0 0.75rem 0.5rem; }
.split-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.split-unit-name { display: flex; flex-direction: column; min-width: 0; font-weight: 700; }
.split-unit-name small { font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-unit-amt { font-weight: 700; white-space: nowrap; }
.split-unit-bills { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; }
.split-pick { min-width: 2.8rem; min-height: 2.6rem; padding: 0 0.5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-weight: 800; cursor: pointer; }
.split-pick.active { background: var(--grad-2); border-color: var(--brand2); color: var(--brand2-text); }

/* Bills on one table */
.bills-dialog { width: min(28rem, 100%); }
.bills-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.9rem; }
.bills-row { display: flex; gap: 0.5rem; }
.bills-open { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; min-height: 3.2rem; padding: 0.4rem 0.75rem; border: 2px solid var(--brand2); border-radius: 10px; background: color-mix(in srgb, var(--brand2) 8%, var(--surface)); color: var(--text); cursor: pointer; }
.bills-name { font-weight: 800; text-align: left; }
.bills-amt { font-weight: 700; white-space: nowrap; }
.bills-pay { min-width: 5rem; }

.pos-login-body:has(.cout-desk) { padding: 0.55rem 0.7rem 1rem; align-items: stretch; }
.pos-login-card.cout-desk { width: 100%; max-width: none; border-radius: 12px; padding: 0.75rem 0.9rem 1rem; }
.cout-list { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.8rem; }
.cout-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; width: 100%; text-align: left; padding: 0.75rem 0.9rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; }
.cout-card strong { font-size: 1rem; }
.cout-card span { color: var(--muted); font-size: 0.85rem; }
.cout-recent { margin: 1.1rem 0 0; font-size: 0.95rem; }
.cout-bar { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.cout-bar-actions { display: flex; gap: 0.45rem; margin-left: auto; }
.cout-bar .btn { min-height: 2.5rem; }
.cout-paper { display: flex; gap: 0.3rem; padding: 0.2rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.cout-paper button { min-height: 2.15rem; padding: 0 0.85rem; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-weight: 700; cursor: pointer; }
.cout-paper button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(29, 38, 51, 0.08); }
.cout-head { display: grid; grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr); gap: 1rem; align-items: end; }
.cout-desk h1 { margin: 0; font-size: 1.35rem; }
.cout-desk .lede { margin: 0.15rem 0 0; }
.cout-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.45rem; margin: 0; }
.cout-stats span { display: flex; flex-direction: column; gap: 0.12rem; padding: 0.45rem 0.65rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.cout-stats small { color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.cout-stats b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.cout-stats b.short, .cout-table td.short { color: #c2410c; }
.cout-x { margin: 0 0 0.55rem; padding: 0.4rem 0.65rem; border-radius: 8px; background: var(--accent-soft); font-weight: 750; }
.cout-split { display: grid; grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr); gap: 0.9rem; margin-top: 0.85rem; align-items: start; }
.cout-side { display: flex; flex-direction: column; gap: 0.7rem; }
.cout-alert { margin: 0; padding: 0.55rem 0.7rem; border-radius: 10px; border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--text); font-size: 0.9rem; }
.cout-includes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.6rem; padding: 0.7rem 0.75rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: 0.86rem; }
.cout-includes > span { grid-column: 1 / -1; font-size: 0.68rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.cout-includes label { display: flex; align-items: center; gap: 0.4rem; min-height: 1.7rem; }
.cout-notes { display: flex; flex-direction: column; gap: 0.35rem; }
.cout-notes span, .cout-note-read span { font-size: 0.68rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.cout-notes textarea {
  width: 100%;
  min-height: 6.5rem;
  resize: vertical;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0.65rem 0.75rem;
  font: inherit;
  line-height: 1.4;
}
.cout-notes textarea:focus { outline: 2px solid var(--brand2-soft); border-color: var(--brand2); }
.cout-note-read { margin: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.cout-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cout-table th { text-align: right; font-size: 0.68rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 0.35rem 0.55rem 0.5rem; border-bottom: 1px solid var(--border); }
.cout-table th:first-child, .cout-table td:first-child { text-align: left; }
.cout-table td { text-align: right; padding: 0.38rem 0.55rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cout-table tbody tr:hover td { background: var(--surface-2); }
.cout-table tr.total td { font-weight: 800; border-top: 2px solid var(--border); }
.cout-table input { width: 7.5rem; min-height: 2.25rem; text-align: right; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); padding: 0.3rem 0.5rem; font: inherit; font-variant-numeric: tabular-nums; }
.cout-table input:focus { outline: 2px solid var(--brand2-soft); border-color: var(--brand2); }
.cout-cash { display: inline-flex; align-items: center; justify-content: flex-end; gap: 0.4rem; }
.cout-cash .btn { min-height: 2.25rem; padding: 0.3rem 0.7rem; }
.cout-reports { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 0.9rem; }
.cout-block { margin: 0; padding: 0.65rem 0.75rem 0.4rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.cout-block.span { grid-column: 1 / -1; }
.cout-block h2 { margin: 0 0 0.35rem; font-size: 0.95rem; }
.cout-detail { margin: 0 0 0.45rem; color: var(--muted); font-size: 0.85rem; }
.cout-block table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.cout-block th, .cout-block td { text-align: left; padding: 0.28rem 0.35rem; border-bottom: 1px solid var(--border); }
.cout-block th:last-child, .cout-block td:last-child, .cout-block th:nth-child(n+2), .cout-block td:nth-child(n+2) { text-align: right; }
.cout-confirm { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(15, 23, 42, 0.45); }
.cout-confirm-card { width: min(28rem, 100%); background: var(--surface); color: var(--text); border-radius: 14px; padding: 1.15rem 1.25rem 1.25rem; box-shadow: var(--shadow); }
.cout-confirm-card h2 { margin: 0 0 0.45rem; font-size: 1.15rem; }
.cout-confirm-card p { margin: 0 0 0.55rem; }
.cout-confirm-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.85rem; }
.cout-calc { margin-top: 1rem; padding: 0.9rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2, var(--surface)); }
.cout-calc-bar { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin-bottom: 0.6rem; }
.cout-calc-bar h2 { margin: 0 auto 0 0; font-size: 1.05rem; }
.cout-note { display: grid; grid-template-columns: 6rem 1fr 8rem; gap: 0.5rem; align-items: center; margin: 0.25rem 0; }
.cout-note input { min-height: 2.4rem; }
@media (max-width: 980px) {
  .cout-head, .cout-split, .cout-reports { grid-template-columns: 1fr; }
  .cout-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cout-stats, .cout-includes { grid-template-columns: 1fr 1fr; }
  .cout-bar { flex-wrap: wrap; }
}
@media print {
  .pos-login-chrome, .no-print { display: none !important; }
  .pos-login, .pos-login-body, .pos-login-card { background: #fff; color: #111; box-shadow: none; border: 0; width: auto; max-width: none; padding: 0; }
  .cout-head, .cout-split, .cout-reports { display: block; }
  .cout-block, .cout-side, .cout-tenders { break-inside: avoid; margin-top: 0.6rem; }
  .paper-slip, .paper-slip .pos-login-card { width: 72mm; max-width: 72mm; }
  .paper-slip .cout-stats { grid-template-columns: 1fr 1fr; }
  .paper-slip .cout-block table, .paper-slip .cout-table { font-size: 11px; }
}

.staff-card, .guest-links, .dine-card { width: min(100%, 52rem); }
.staff-choices { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0; }
.staff-cam { position: relative; margin: 0.6rem auto 0.8rem; width: min(100%, 22rem); aspect-ratio: 3 / 4; border-radius: 1.4rem; overflow: hidden; background: #111; }
.staff-cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.staff-cam::after { content: ""; position: absolute; inset: 12% 16%; border: 3px solid rgba(255,255,255,.85); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.28); pointer-events: none; }
.guest-links { max-width: none; }
.guest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.8rem; margin-top: 0.8rem; }
.guest-grid article { border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem; background: var(--surface); text-align: center; }
.guest-grid h2 { margin: 0 0 0.4rem; font-size: 1rem; }
.guest-grid p { margin: 0.4rem 0; font-size: 0.75rem; word-break: break-all; color: var(--muted); }
.dine-stage { min-height: 100dvh; display: flex; justify-content: center; background: var(--bg, #eef1f4); }
.dine-phone { width: 100%; max-width: 28rem; height: 100dvh; max-height: 100dvh; display: flex; flex-direction: column; background: var(--surface); position: relative; overflow: hidden; }
.dine-phone-head { flex: none; display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--border); }
.dine-phone-head img { width: 2rem; height: 2rem; object-fit: contain; }
.dine-phone-head strong { display: block; font-size: 0.92rem; line-height: 1.15; }
.dine-phone-head span { display: block; color: var(--muted); font-size: 0.72rem; }
.dine-phone-head .spacer { flex: 1; }
.dine-phone-body { flex: 1; min-height: 0; overflow: auto; padding: 0.85rem 0.85rem 5.4rem; scrollbar-width: none; }
.dine-phone-body::-webkit-scrollbar { display: none; }
.dine-thanks { margin: 0 0 0.55rem; padding: 0.55rem 0.7rem; border-radius: 12px; background: color-mix(in srgb, var(--brand, #0f766e) 14%, var(--surface)); font-size: 0.82rem; line-height: 1.35; }
.dine-welcome { text-align: center; padding: 0.6rem 0.2rem 0; }
.dine-welcome .dine-client-logo { width: 4.6rem; height: 4.6rem; object-fit: contain; border-radius: 16px; }
.dine-welcome h1 { margin: 0.45rem 0 0; font-size: 1.25rem; }
.dine-welcome .area { color: var(--muted); margin: 0.15rem 0 0.55rem; }
.dine-table-no { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.dine-table-label { color: var(--muted); font-size: 0.75rem; margin-bottom: 0.7rem; }
.dine-welcome label, .dine-order-note { display: block; text-align: left; font-size: 0.75rem; font-weight: 700; margin: 0.7rem 0 0.25rem; }
.dine-cc-row { display: flex; align-items: center; gap: 0.45rem; }
.dine-cc { flex: none; min-height: 3.1rem; display: flex; align-items: center; padding: 0 0.85rem; border-radius: 16px; background: color-mix(in srgb, var(--brand, #0f766e) 12%, var(--surface)); font-weight: 800; letter-spacing: 0.03em; }
.dine-field, .dine-welcome input, .dine-order-box, .dine-order-note input, .dine-sheet-card input {
  width: 100%; min-height: 3.1rem; border-radius: 16px; border: 1px solid var(--border); padding: 0.7rem 0.95rem;
  font-size: 1.05rem; background: var(--surface); box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.dine-cc-row .dine-field { letter-spacing: 0.08em; font-weight: 700; }
.dine-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.22rem; margin-top: 0.35rem; }
.dine-pad button { min-height: 1.7rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 0.92rem; font-weight: 750; padding: 0; }
.dine-pad button:active { transform: translateY(1px); }
.dine-welcome .btn, .dine-send { width: 100%; margin-top: 0.55rem; }
.dine-offer { margin: 0.4rem 0 0.2rem; padding: 0.45rem 0.6rem; border-radius: 10px; background: color-mix(in srgb, var(--brand, #0f766e) 10%, var(--surface)); font-size: 0.78rem; }
.dine-status h1 { margin: 0.2rem 0; font-size: 1.6rem; }
.dine-status .kitchen { font-size: 0.95rem; margin: 0.2rem 0 0.8rem; }
.dine-kots { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.35rem 0 0.7rem; }
.dine-kot { font-size: 0.78rem; font-weight: 800; padding: 0.22rem 0.6rem; border-radius: 999px; background: #e7f0fa; color: #1e4a73; }
.dine-kot.cook { background: #ffedd8; color: #8a3d00; }
.dine-kot.ready { background: #e5f6ec; color: #0f6b3a; }
.dine-kot.unsent { background: #fde68a; color: #92400e; }
.dine-order-list { margin: 0 0 0.6rem; padding: 0; list-style: none; text-align: left; }
.dine-order-list li { display: flex; gap: 0.55rem; padding: 0.35rem 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.dine-order-list li span { min-width: 1.4rem; font-weight: 800; }
.dine-total { margin: 0.45rem 0 0.2rem; font-size: 1.35rem; font-weight: 800; }
.dine-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.dine-head h1 { margin: 0; font-size: 1.05rem; }
.dine-cat-nav { display: flex; align-items: center; gap: 0.25rem; margin: 0.3rem 0; }
.dine-cat-nav > button { flex: none; width: 1.8rem; height: 1.8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 800; }
.dine-cats { display: flex; flex-wrap: nowrap; gap: 0.28rem; overflow: hidden; margin: 0; flex: 1; min-width: 0; scroll-behavior: smooth; }
.dine-cats .cat-chip-btn { width: auto; flex: none; min-height: 1.85rem; padding: 0.15rem 0.55rem; font-size: 0.72rem; border-radius: 999px; }
.dine-pager { position: absolute; z-index: 6; right: 0.55rem; bottom: 4.4rem; display: flex; flex-direction: column; gap: 0.25rem; }
.dine-pager button { width: 2.1rem; height: 2.1rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 800; box-shadow: 0 4px 14px rgba(15,23,42,.12); }
.dine-key { display: flex; flex-wrap: wrap; gap: 0.35rem 0.55rem; margin: 0.35rem 0 0.6rem; font-size: 0.68rem; font-weight: 700; }
.dine-key span, .dine-kot-group h2 { display: flex; align-items: center; gap: 0.28rem; }
.dine-key .seg, .dine-group-bar { height: 0.38rem; }
.dine-key .seg { width: 0.7rem; border-radius: 99px; display: inline-block; }
.dine-kot-group { text-align: left; margin: 0.7rem 0; }
.dine-kot-group h2 { margin: 0 0 0.25rem; font-size: 0.92rem; }
.dine-group-bar { display: flex; border-radius: 99px; overflow: hidden; background: rgba(15,23,42,.12); margin-bottom: 0.25rem; }
.dine-order-list .dish { flex: 1; min-width: 0; font-weight: 650; }
.dine-order-list li { align-items: center; }
.dine-tag { margin-left: auto; font-style: normal; font-size: 0.68rem; font-weight: 800; padding: 0.12rem 0.45rem; border-radius: 999px; white-space: nowrap; }
.dine-tag.cooking { background: #f472b6; color: #111827; }
.dine-tag.ready { background: #111827; color: #fff; }
.dine-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; margin: 0.35rem 0 0.2rem; }
.dine-pay .btn { min-height: 2.8rem; font-weight: 800; }
.dine-pay-lead { margin: 0.2rem 0; }
.dine-bill { margin-top: 0.4rem; padding: 0.75rem 0.7rem 0.85rem; border-radius: 1rem; background: #fff; color: #111; font-family: Consolas, "Courier New", monospace; font-size: 12px; text-align: left; }
.dine-bill .c { text-align: center; }
.dine-bill .b { font-weight: 700; }
.dine-bill .lg { font-size: 15px; }
.dine-bill .sm { font-size: 10.5px; }
.dine-bill hr { border: 0; border-top: 1px dashed #111; margin: 4px 0; }
.dine-bill table { width: 100%; border-collapse: collapse; }
.dine-bill td { vertical-align: top; padding: 1px 0; }
.dine-bill .q { width: 2.2em; text-align: right; padding-right: 4px; }
.dine-bill .a { text-align: right; white-space: nowrap; }
.dine-bill .mod td { font-size: 10.5px; }
.dine-bill .logo { display: block; margin: 0 auto 2px; max-width: 7rem; max-height: 4.2rem; object-fit: contain; }
.dine-bill img:not(.logo) { display: block; width: 9.5rem; height: 9.5rem; margin: 0.35rem auto; }
.dine-tag.collected { background: #334155; color: #fff; }
.dine-tag.served { background: #14532d; color: #fff; }
.dine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; }
.dine-grid .item-chip { min-height: 7.2rem; }
.dine-grid .item-prep { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dine-empty { grid-column: 1 / -1; margin: 0.6rem 0; }
.dine-line { display: flex; justify-content: space-between; gap: 0.45rem; padding: 0.45rem 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.dine-line-main { min-width: 0; flex: 1; }
.dine-line-main strong { display: block; font-size: 0.86rem; }
.dine-sub, .dine-line-disc { display: block; color: var(--muted); font-size: 0.72rem; }
.dine-line-disc { color: var(--ok, #0f766e); font-weight: 700; }
.dine-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.28rem; }
.dine-chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 0.12rem 0.5rem; font-size: 0.68rem; font-weight: 700; }
.dine-chip.on { border-color: var(--brand, #0f766e); color: var(--brand, #0f766e); }
.dine-line-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; font-size: 0.78rem; }
.dine-note-btn { margin-top: 0.55rem; border: 1px dashed var(--border); background: transparent; border-radius: 8px; padding: 0.35rem 0.55rem; font-size: 0.75rem; font-weight: 700; }
.dine-note-btn.on { border-style: solid; }
.dine-order-box { margin-top: 0.35rem; }
.dine-bar { position: absolute; z-index: 5; left: 0.7rem; right: 0.7rem; bottom: 0.7rem; display: flex; justify-content: space-between; align-items: center; border: 0; border-radius: 999px; padding: 0.72rem 1rem; background: var(--brand, #0f766e); color: #fff; font-weight: 750; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.dine-sheet { position: absolute; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; z-index: 8; }
.dine-sheet-card { width: 100%; background: var(--surface); border-radius: 16px 16px 0 0; padding: 0.85rem; max-height: 86%; overflow: auto; }
.dine-sheet-card h2 { margin: 0; font-size: 1rem; }
.dine-mod-group { margin: 0.45rem 0; }
.dine-mod-title { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; color: var(--muted); margin-bottom: 0.25rem; }
.dine-mod-choice { width: 100%; display: flex; justify-content: space-between; gap: 0.5rem; border: 1px solid var(--border); background: transparent; border-radius: 8px; padding: 0.4rem 0.5rem; margin-bottom: 0.25rem; font-weight: 650; }
.dine-mod-choice.on { border-color: var(--brand, #0f766e); background: color-mix(in srgb, var(--brand, #0f766e) 12%, var(--surface)); }
.dine-sheet-acts { display: flex; gap: 0.4rem; }
.dine-sheet-acts .btn { flex: 1; }
@media (min-width: 720px) {
  .dine-stage { align-items: center; padding: 1rem 0; }
  .dine-phone { height: min(100dvh - 2rem, 52rem); border-radius: 28px; border: 1px solid var(--border); box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12); }
}
@media print {
  .guest-links .no-print, .pos-login-chrome { display: none !important; }
  .guest-grid { grid-template-columns: repeat(2, 1fr); }
}
