/* RAWA POS — retail + restaurant.
   Task 2 (البند صفر) — the POS now inherits the shipped v2 design system:
   every --pos-* token is an alias of a --rawa-* token from rawa_tokens.css
   (monochrome canvas + one electric-blue accent). Light/dark follow the
   shared [data-theme] on <html>. Nothing downstream in this file needed
   to change to recolor — it all reads var(--pos-*). */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap");
:root {
  --pos-bg: var(--rawa-bg);
  --pos-surface: var(--rawa-card);
  --pos-elevated: var(--rawa-elevated);
  --pos-surface-alt: var(--rawa-bg-alt);
  --pos-ink: var(--rawa-text);
  --pos-ink-text: var(--rawa-bg);          /* inverse of --pos-ink (rare "inverted chip") */
  --pos-muted: var(--rawa-text-3);
  --pos-line: var(--rawa-hairline);        /* near-invisible — "no ugly borders" */
  --pos-line-strong: var(--rawa-border-strong);
  --pos-accent: var(--rawa-accent);        /* #2f6bff */
  --pos-champagne: var(--rawa-accent);
  --pos-champagne-dark: var(--rawa-champagne-dark);
  --pos-champagne-glow: var(--rawa-accent-soft);
  --pos-sel: var(--rawa-accent);           /* selected / primary control fill */
  --pos-sel-text: var(--rawa-primary-text);
  --pos-ok: var(--rawa-success);
  --pos-ok-dark: var(--rawa-success);
  --pos-ok-bg: color-mix(in srgb, var(--rawa-success) 14%, transparent);
  --pos-warn: var(--rawa-warning);
  --pos-warn-bg: color-mix(in srgb, var(--rawa-warning) 14%, transparent);
  --pos-info: var(--rawa-accent);
  --pos-info-bg: var(--rawa-accent-soft);
  --pos-danger: var(--rawa-danger);
  --pos-danger-dark: var(--rawa-danger);
  --pos-danger-bg: color-mix(in srgb, var(--rawa-danger) 12%, transparent);
  --pos-shadow-card: var(--rawa-shadow-sm);
  --pos-shadow-card-hover: var(--rawa-shadow);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  font-family: var(--rawa-font, "Inter", "Segoe UI", Tahoma, sans-serif); background: var(--pos-bg); color: var(--pos-ink);
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.rawa-pos-shell {
  position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden; z-index: 20;
  background: var(--pos-bg);
}

.pos-topbar {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.65rem 1rem; background: var(--pos-surface); border-bottom: 1px solid var(--pos-line);
  z-index: 40; flex-wrap: wrap;
}
.pos-mode-badge {
  border: 1px solid var(--pos-ink); background: var(--pos-ink); color: var(--pos-ink-text);
  border-radius: 999px; padding: 0.35rem 0.85rem; font-size: 0.8rem; font-weight: 800;
}
.pos-topbar-left, .pos-topbar-center, .pos-topbar-right { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.pos-menu-toggle {
  display: none;
  border: 1px solid var(--pos-line); background: var(--pos-surface); border-radius: 10px;
  padding: 0.45rem 0.75rem; font-size: 0.85rem; font-weight: 700;
}
.pos-mobile-cart-bar {
  display: none;
}
.pos-mode-wrap { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.7rem; color: var(--pos-muted); }
.pos-mode-wrap select { min-width: 140px; border: 1.5px solid var(--pos-line); border-radius: 10px; padding: 0.4rem 0.6rem; background: var(--pos-surface); }
.pos-meta { display: flex; flex-direction: column; font-size: 0.7rem; color: var(--pos-muted); min-width: 70px; }
.pos-meta strong { color: var(--pos-ink); font-size: 0.92rem; }
.pos-top-btn {
  border: 1px solid var(--pos-line); background: var(--pos-surface); border-radius: 10px;
  padding: 0.45rem 0.8rem; font-size: 0.8rem; font-weight: 600; color: var(--pos-ink); text-decoration: none;
  display: inline-flex; align-items: center; transition: border-color 0.18s ease, background 0.18s ease;
}
.pos-top-btn:hover { border-color: var(--pos-champagne); background: var(--pos-surface-alt); }
.pos-top-btn:focus-visible { outline: 2px solid var(--pos-champagne); outline-offset: 2px; }

.pos-more-wrap { position: relative; }
.pos-more-backdrop[hidden], .pos-more-menu[hidden] { display: none !important; }
.pos-more-backdrop { position: fixed; inset: 0; z-index: 55; background: transparent; }
.pos-more-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 0.5rem);
  min-width: 190px; background: var(--pos-surface); border: 1px solid var(--pos-line);
  border-radius: 14px; box-shadow: 0 20px 40px -14px rgba(0,0,0,0.28);
  padding: 0.4rem; display: flex; flex-direction: column; gap: 0.15rem; z-index: 60;
}
.pos-more-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.35rem 0.6rem 0.5rem; margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--pos-line);
  font-size: 0.78rem; font-weight: 800; color: var(--pos-muted);
}
.pos-more-menu button.pos-more-close {
  border: none; background: var(--pos-surface-alt); color: var(--pos-ink);
  width: 26px; height: 26px; padding: 0; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.pos-more-menu button.pos-more-close:hover { background: var(--pos-danger-bg); color: var(--pos-danger-dark); }
.pos-more-menu a, .pos-more-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  border: none; background: transparent; color: var(--pos-ink); text-decoration: none;
  border-radius: 9px; padding: 0.55rem 0.7rem; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; text-align: start; transition: background 0.15s ease;
}
.pos-more-menu a:hover, .pos-more-menu button:hover { background: var(--pos-surface-alt); }

.pos-theme-fab {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.5rem; padding: 0 0.9rem; border-radius: 999px; flex: 0 0 auto;
  border: 1px solid var(--pos-line-strong); background: var(--pos-surface); color: var(--pos-ink);
  font-family: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.pos-theme-fab:hover { border-color: var(--pos-champagne); }
.pos-theme-fab:active { transform: scale(0.95); }
.pos-theme-fab:focus-visible { outline: 2px solid var(--pos-champagne); outline-offset: 2px; }
.pos-top-btn--link { background: var(--pos-ink); color: var(--pos-ink-text); border-color: var(--pos-ink); }

.pos-subnav {
  flex: 0 0 auto;
  display: flex; gap: 0.35rem; padding: 0.5rem 1rem; background: var(--pos-surface); border-bottom: 1px solid var(--pos-line);
}
.pos-subnav-btn {
  border: none; background: var(--pos-surface-alt); padding: 0.5rem 1rem; border-radius: 10px;
  font-weight: 700; color: var(--pos-muted); transition: background 0.14s ease, color 0.14s ease;
}
.pos-subnav-btn:hover { color: var(--pos-ink); }
.pos-subnav-btn.active { background: var(--pos-sel); color: var(--pos-sel-text); }

.pos-main { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.pos-sale-view {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  height: 100%; min-height: 0; overflow: hidden;
}
.pos-sale-view.pos-view-hidden,
.pos-tables-view.pos-view-hidden {
  display: none !important;
}
.pos-tables-view:not(.pos-view-hidden) {
  display: block !important;
  height: 100%;
  min-height: 0;
  overflow: auto;
}
.products-panel { padding: 0.85rem; overflow: auto; min-height: 0; height: 100%; }
.cart-panel {
  background: var(--pos-surface); border-inline-start: 1px solid var(--pos-line);
  display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden;
}

.products-toolbar input {
  width: 100%; min-height: 46px; border: 1.5px solid var(--pos-line-strong); border-radius: 12px;
  padding: 0.65rem 0.9rem; margin-bottom: 0.55rem; background: var(--pos-surface);
}
.retail-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: end; margin-bottom: 0.75rem;
}
.retail-toolbar .price-mode {
  display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.7rem; color: var(--pos-muted);
}
.retail-toolbar select {
  border: 1.5px solid var(--pos-line); border-radius: 10px; padding: 0.4rem 0.55rem; background: var(--pos-surface); min-width: 130px;
}
.pos-tool-btn {
  border: 1px solid var(--pos-line); background: var(--pos-surface); border-radius: 10px;
  padding: 0.45rem 0.75rem; font-size: 0.8rem; font-weight: 600;
}
.pos-tool-btn:hover { border-color: var(--pos-champagne); }
.last-sale-banner--clickable { cursor: pointer; }
.last-sale-banner--clickable:hover { border-color: var(--pos-champagne, #c4a574); }
.quick-orders-panel {
	margin-top: 1rem;
	padding: 0.85rem 1rem 1rem;
	background: var(--pos-surface, #fff);
	border: 1px solid #ececec;
	border-radius: 14px;
}
.quick-orders-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.quick-orders-list {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-top: 0.75rem;
}
.quick-order-chip {
	border: 1.5px solid var(--pos-champagne, #c4a574);
	background: var(--pos-surface-alt, #faf7f2);
	border-radius: 999px;
	padding: 0.45rem 0.9rem;
	font-weight: 700;
	font-size: 0.85rem;
	cursor: pointer;
}
.quick-order-chip:hover { background: var(--pos-champagne, #c4a574); }
.counter-order-type-row {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-bottom: 0.75rem;
}
.counter-order-type-row .quick-order-chip { flex: 1 1 auto; text-align: center; }
.order-type-picker { display: flex; gap: 0.5rem; align-items: stretch; width: 100%; }
.order-type-select {
	flex: 1 1 auto;
	min-width: 0;
	border: 1.5px solid var(--pos-line);
	border-radius: 10px;
	padding: 0.5rem 0.65rem;
	background: var(--pos-surface);
	color: var(--pos-ink);
	font-weight: 600;
	font-size: 0.85rem;
}
.order-type-picker .order-type-start-btn { flex: 0 0 auto; padding: 0.5rem 0.9rem; font-size: 0.85rem; }
.cart-customer-bar {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	background: var(--pos-surface-alt, #faf7f2);
	border: 1.5px dashed var(--pos-champagne, #c4a574);
	border-radius: 12px;
	padding: 0.5rem 0.7rem;
	margin-bottom: 0.6rem;
	font-size: 0.82rem;
}
.cart-customer-info { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.cart-customer-actions { display: flex; gap: 0.35rem; flex: 0 0 auto; }
.cart-customer-actions .pos-tool-btn { padding: 0.3rem 0.6rem; }
.cust-results { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.5rem 0; max-height: 180px; overflow-y: auto; }
.cust-result {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15rem;
	text-align: start;
	border: 1px solid var(--pos-line);
	border-radius: 10px;
	padding: 0.5rem 0.7rem;
	background: var(--pos-surface);
	cursor: pointer;
}
.cust-result:hover { border-color: var(--pos-champagne); background: var(--pos-surface-alt); }
.cust-result span { font-size: 0.78rem; color: var(--pos-muted); }
.cust-empty { font-size: 0.82rem; color: var(--pos-muted); padding: 0.4rem 0.1rem; }
.cust-new-section { margin-top: 0.85rem; border-top: 1px solid var(--pos-line); padding-top: 0.85rem; }
.cust-new-title { margin: 0 0 0.5rem; font-size: 0.85rem; font-weight: 700; color: var(--pos-muted); }
.reservations-panel {
	margin-top: 1rem;
	padding: 0.85rem 1rem 1rem;
	background: var(--pos-surface, #fff);
	border: 1px solid #ececec;
	border-radius: 14px;
}
.reservations-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}
.reservations-panel-head h3 { margin: 0; font-size: 0.95rem; }
.reservations-panel-head input[type="date"] {
	min-height: 38px;
	border: 1.5px solid #ddd;
	border-radius: 10px;
	padding: 0.35rem 0.55rem;
	font-weight: 600;
}
.reservations-list { display: flex; flex-direction: column; gap: 0.55rem; max-height: 260px; overflow: auto; }
.res-empty { color: var(--pos-muted); font-size: 0.88rem; padding: 0.5rem 0; }
.res-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.65rem 0.75rem;
	border: 1px solid #eee;
	border-radius: 12px;
	background: #fafafa;
}
.res-card-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.res-meta { font-size: 0.78rem; color: var(--pos-muted); }
.res-status { font-size: 0.72rem; font-weight: 700; color: #b45309; }
.res-status--seated { color: var(--pos-ok-dark); }
.res-status--cancelled { color: var(--pos-danger-dark); }
.res-card-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }
.res-card-actions button {
	border: 1px solid #ddd;
	background: var(--pos-surface);
	border-radius: 9px;
	padding: 0.35rem 0.55rem;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
}
.res-card-actions .res-btn-danger {
	border-color: #fecaca;
	color: var(--pos-danger-dark);
	background: #fef2f2;
}
.res-status--no-show { color: #6b7280; }
.res-label {
	display: block;
	font-size: 0.78rem;
	font-weight: 700;
	margin: 0.55rem 0 0.3rem;
}
#reservation-modal input {
	width: 100%;
	min-height: 44px;
	border: 1.5px solid var(--pos-line-strong);
	border-radius: 12px;
	padding: 0.55rem 0.8rem;
	font-weight: 600;
}
.res-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.last-sale-banner {
  background: color-mix(in srgb, var(--pos-ok) 10%, transparent); color: var(--pos-ok-dark); border-radius: 10px;
  padding: 0.5rem 0.75rem; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.65rem;
}
.product-card .stock { font-size: 0.72rem; color: var(--pos-muted); margin-top: 0.2rem; padding-inline: 0.75rem; }
.product-card .stock.stock--low { color: var(--pos-warn); font-weight: 700; }
.product-card .stock.stock--out { color: var(--pos-danger); font-weight: 700; }
.product-card--blocked { opacity: 0.55; cursor: not-allowed; }
.product-card--blocked:hover { opacity: 0.55; }

.variant-picker-overlay {
  position: fixed; inset: 0; z-index: 6000; background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.variant-picker-box {
  background: var(--pos-surface, #fff); border-radius: 16px; padding: 1.1rem 1.15rem;
  width: 100%; max-width: 22rem; max-height: 80vh; overflow: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.variant-picker-box h3 { margin: 0 0 0.75rem; font-size: 1rem; font-weight: 700; }
.variant-picker-list { display: flex; flex-direction: column; gap: 0.5rem; }
.variant-picker-item {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.7rem 0.9rem; border-radius: 12px; border: 1.5px solid var(--pos-line-strong);
  background: var(--pos-bg-alt, transparent); font-size: 0.92rem; font-weight: 600; cursor: pointer;
}
.variant-picker-item:hover { border-color: var(--pos-accent, var(--pos-line-strong)); }
.variant-picker-cancel {
  width: 100%; margin-top: 0.85rem; padding: 0.6rem; border-radius: 10px; border: none;
  background: transparent; color: var(--pos-muted); font-weight: 600; cursor: pointer;
}
.rate-input {
  width: 72px; height: 34px; text-align: center; border: 1.5px solid var(--pos-line-strong); border-radius: 10px; font-size: 0.82rem;
}
.cart-discount-row {
  display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 1rem; border-top: 1px solid var(--pos-line);
  font-size: 0.85rem;
}
.cart-discount-row input, .cart-discount-row select {
  border: 1.5px solid var(--pos-line-strong); border-radius: 8px; padding: 0.35rem 0.45rem; min-height: 34px;
}
.cart-discount-row input { width: 90px; }
.quick-cash { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.quick-cash-btn {
  border: 1px solid var(--pos-line); background: var(--pos-surface-alt); border-radius: 10px;
  padding: 0.45rem 0.7rem; font-weight: 700; font-size: 0.85rem;
}
.held-list { max-height: 50vh; overflow: auto; }
.held-row {
  display: flex; justify-content: space-between; gap: 0.75rem; align-items: center;
  padding: 0.75rem 0; border-bottom: 1px solid var(--pos-line);
}
.held-actions { display: flex; gap: 0.35rem; }
.held-actions button {
  border: 1px solid var(--pos-line); background: var(--pos-surface); border-radius: 8px;
  padding: 0.35rem 0.65rem; font-size: 0.78rem;
}
.categories-bar {
  display: flex; align-items: flex-start; gap: 0.45rem; margin-bottom: 0.75rem;
}
.categories-container {
  display: flex; gap: 0.4rem; flex-wrap: wrap; flex: 1; min-width: 0;
}
.cat-chip {
  border: 1px solid var(--pos-line); background: var(--pos-surface); border-radius: 999px;
  padding: 0.35rem 0.8rem; font-size: 0.8rem; cursor: pointer; color: var(--pos-ink);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.cat-chip:hover { border-color: var(--pos-champagne); }
.cat-chip:focus-visible { outline: 2px solid var(--pos-champagne); outline-offset: 2px; }
.cat-chip.active { background: var(--pos-ink); color: var(--pos-ink-text); border-color: var(--pos-ink); }
.cat-chip .cat-count { margin-inline-start: 0.35rem; opacity: 0.75; font-size: 0.78em; color: var(--pos-muted); }
.cat-chip.active .cat-count { color: inherit; opacity: 0.75; }

/* Task 2 — categories as solid colour blocks. Colour is set inline by
   rawa_pos.js from RAWA Item Group.color (DB). No colour → neutral surface. */
.cat-chip.cat-block {
  border: 0; border-radius: 12px;
  padding: 0.5rem 0.85rem; min-height: 44px; min-width: 92px;
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.1rem;
  font-size: 0.82rem; font-weight: 700; line-height: 1.2;
  box-shadow: var(--pos-shadow-card);
  transition: transform 0.14s ease, box-shadow 0.14s ease, outline-color 0.14s ease;
}
.cat-chip.cat-block[style*="background"] { color: #fff; }
.cat-chip.cat-block:not([style*="background"]) { background: var(--pos-surface); color: var(--pos-ink); }
.cat-chip.cat-block:hover { transform: translateY(-2px); box-shadow: var(--pos-shadow-card-hover); border-color: transparent; }
.cat-chip.cat-block.active { outline: 2px solid var(--pos-accent); outline-offset: 2px; }
.cat-chip.cat-block .cat-count {
  margin-inline-start: 0; font-size: 0.7rem; font-weight: 600; opacity: 0.82; color: inherit;
}
.cat-chip.cat-block.cat-block--lite,
.cat-chip.cat-block.cat-block--lite .cat-count { color: #1b1a16; }
.cat-add-btn {
  flex-shrink: 0;
  border: 1.5px dashed var(--pos-ink); background: var(--pos-surface); color: var(--pos-ink);
  border-radius: 999px; padding: 0.35rem 0.85rem; font-size: 0.8rem; font-weight: 800;
  cursor: pointer; white-space: nowrap; transition: border-color 0.18s ease, background 0.18s ease;
}
.cat-add-btn:hover { background: var(--pos-ink); color: var(--pos-ink-text); border-style: solid; }
body.pos-mode-restaurant .cat-add-btn {
  background: var(--pos-ink); color: var(--pos-ink-text); border-style: solid;
}
.cat-manage-help {
  margin: 0 0 0.9rem; color: var(--pos-muted); font-size: 0.85rem; line-height: 1.5;
}
.cat-manage-add {
  display: grid; grid-template-columns: 1fr auto auto; gap: 0.6rem; align-items: end;
  background: var(--pos-elevated); border-radius: 14px; padding: 0.85rem; margin-bottom: 0.85rem;
}
.cat-manage-add label {
  display: block; font-size: 0.74rem; font-weight: 700; color: var(--pos-muted); margin-bottom: 0.3rem;
}
.cat-manage-add-name input[type="text"] {
  width: 100%; min-height: 44px; border: 1.5px solid var(--pos-line-strong); border-radius: 10px;
  padding: 0.55rem 0.8rem; font-weight: 700; background: var(--pos-surface); color: var(--pos-ink);
}
.cat-manage-add-name input[type="text"]:focus {
  outline: none; border-color: var(--pos-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos-accent) 18%, transparent);
}
.cat-manage-add .primary-btn { min-height: 44px; white-space: nowrap; align-self: end; }
.cat-manage-swatch {
  position: relative; display: block; width: 52px; height: 44px;
}
.cat-manage-swatch.sm { width: 38px; height: 38px; }
.cat-manage-swatch input[type="color"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: none; padding: 0; cursor: pointer; background: none; border-radius: 10px;
}
.cat-manage-swatch input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.cat-manage-swatch input[type="color"]::-webkit-color-swatch {
  border: 1.5px solid var(--pos-line-strong); border-radius: 10px;
}
.cat-manage-swatch.is-empty::after {
  content: ""; position: absolute; inset: 0; border-radius: 10px;
  border: 1.5px dashed var(--pos-line-strong);
  background: repeating-linear-gradient(45deg, transparent, transparent 5px, var(--pos-line) 5px, var(--pos-line) 6px);
  pointer-events: none;
}
.cat-manage-list {
  max-height: 34vh; overflow: auto; margin-top: 0.25rem;
}
.cat-manage-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.7rem; align-items: center;
  padding: 0.55rem 0.15rem; border-bottom: 1px solid var(--pos-line); font-size: 0.88rem;
}
.cat-manage-row:last-child { border-bottom: none; }
.cat-manage-row .cmn { font-weight: 700; }
.cat-manage-row .cmc { font-size: 0.76rem; color: var(--pos-muted); }
.cat-manage-row .cm-clear {
  border: none; background: none; font: inherit; font-size: 0.72rem; font-weight: 600;
  color: var(--pos-muted); cursor: pointer; padding: 0.3rem 0.5rem; border-radius: 8px;
}
.cat-manage-row .cm-clear:hover { color: var(--pos-danger); background: var(--pos-surface-alt); }
@media (max-width: 480px) {
  .cat-manage-add { grid-template-columns: 1fr auto; }
  .cat-manage-add .primary-btn { grid-column: 1 / -1; }
}
.products-empty {
  grid-column: 1 / -1; text-align: center; padding: 2rem 1rem; color: var(--pos-muted);
  border: 1.5px dashed var(--pos-line); border-radius: 14px; background: var(--pos-surface-alt);
}
.products-empty p { margin: 0 0 0.85rem; line-height: 1.5; }
.product-card { position: relative; touch-action: manipulation; user-select: none; }
.product-card--draggable { cursor: grab; }
.product-card--draggable:active { cursor: grabbing; }
.product-card.is-dragging {
	opacity: 0.55; transform: scale(1.04); box-shadow: 0 14px 28px rgba(0,0,0,0.14); z-index: 5;
}
.product-card.drag-over { outline: 2px dashed var(--pos-ink); outline-offset: 2px; }
.product-card .item-move-btn {
  position: absolute; top: 0.4rem; inset-inline-end: 0.4rem; z-index: 2;
  border: none; background: rgba(20,20,20,0.55); backdrop-filter: blur(3px); color: #fff;
  border-radius: 9px;
  width: 26px; height: 26px; cursor: pointer; display: none;
  align-items: center; justify-content: center;
}
.product-card .item-move-btn svg { width: 14px; height: 14px; }
body.pos-mode-restaurant .product-card .item-move-btn { display: inline-flex; }

.products-container {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 0.9rem;
}
.product-card {
  position: relative;
  background: var(--pos-surface); border: 0; border-radius: 14px;
  padding: 0; text-align: start; cursor: pointer; overflow: hidden;
  box-shadow: var(--pos-shadow-card);
  transition: transform 0.18s cubic-bezier(.2,.8,.2,1), box-shadow 0.18s cubic-bezier(.2,.8,.2,1);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--pos-shadow-card-hover); }
.product-card:active { transform: translateY(-1px) scale(0.98); }
.product-card img {
  width: 100%; height: 100px; object-fit: cover; display: block;
  background: var(--pos-surface-alt);
}
.product-card .ph {
  width: 100%; height: 100px; background: var(--pos-surface-alt);
  display: flex; align-items: center; justify-content: center; color: var(--pos-muted);
}
.product-card h4 {
  margin: 0.65rem 0 0.15rem; padding-inline: 0.75rem;
  font-size: 0.88rem; font-weight: 700; color: var(--pos-ink);
}
.product-card .price {
  display: block; padding: 0 0.75rem 0.75rem; text-align: start;
  color: var(--pos-champagne-dark); font-size: 0.88rem; font-weight: 800;
  border: none; background: transparent; cursor: pointer; font: inherit;
}
.product-card .price:hover { text-decoration: underline; }

.cart-header, .tables-toolbar {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--pos-line);
}
.cart-header h2, .tables-toolbar h2 { margin: 0; font-size: 1.05rem; }
.cart-header-actions { display: flex; align-items: center; gap: 0.4rem; }
.cart-header button, #clear-cart {
  border: none; background: color-mix(in srgb, var(--pos-danger) 8%, transparent); color: var(--pos-danger);
  border-radius: 8px; padding: 0.35rem 0.7rem; font-size: 0.8rem; cursor: pointer;
}
.cart-held-btn {
  background: color-mix(in srgb, var(--pos-ink) 6%, transparent) !important; color: var(--pos-ink) !important;
  font-weight: 700;
}
.cart-pay-row {
  display: grid; grid-template-columns: 1fr 1.35fr; gap: 0.5rem;
}
.cart-pay-row .secondary-btn,
.cart-pay-row .primary-btn { width: 100%; }
.active-table-badge {
  margin: 0.6rem 1rem 0; padding: 0.4rem 0.7rem; border-radius: 10px;
  background: color-mix(in srgb, var(--pos-accent) 18%, transparent); color: var(--pos-champagne-dark); font-weight: 700; font-size: 0.85rem;
}
.cart-items {
  flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto;
  padding: 0.75rem 1rem; -webkit-overflow-scrolling: touch;
}
.cart-row {
  border: 0; border-radius: 12px; padding: 0.65rem 0.75rem; margin-bottom: 0.55rem; background: var(--pos-surface-alt);
}
.cart-row-top { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.45rem; }
.cart-row-top strong { font-size: 0.9rem; }
.cart-row-top .line-total { font-weight: 700; }
.cart-row-controls { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; }
.qty-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--pos-line);
  background: var(--pos-surface); font-size: 1.1rem; font-weight: 700;
}
.qty-input {
  width: 64px; height: 34px; text-align: center; border: 1.5px solid var(--pos-line-strong); border-radius: 10px;
}
.cart-notes {
  width: 100%; min-height: 34px; border: 1px dashed #d0c9bb; border-radius: 10px;
  padding: 0.35rem 0.55rem; font-size: 0.8rem; background: var(--pos-surface);
}
/* Never show kitchen notes in retail / commercial shops mode */
body.pos-mode-retail .cart-notes { display: none !important; }
.cart-row.is-editing {
  border-color: var(--pos-champagne);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pos-accent) 28%, transparent);
}
.cart-row-mods {
  margin: 0.15rem 0 0.35rem;
  padding: 0 0.1rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--pos-muted);
}
.cart-row-mods .mod-line { font-weight: 650; color: var(--pos-ink); }
.cart-row-mods .without-line { font-weight: 650; color: var(--pos-danger-dark); }
.cart-row-mods .note-line { font-style: italic; color: var(--pos-muted); }
.cart-row-clickable { cursor: pointer; }
.cart-row-clickable:hover strong { color: var(--pos-champagne-dark); }

/* Item modifiers side panel (replaces product grid while editing) */
.item-mods-panel {
  display: none;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.15rem 0 0.5rem;
  min-height: 0;
  height: 100%;
  overflow: auto;
}
.item-mods-panel.is-open { display: flex !important; }
body.pos-mods-open .products-toolbar,
body.pos-mods-open .retail-toolbar,
body.pos-mods-open .last-sale-banner,
body.pos-mods-open .categories-bar,
body.pos-mods-open .pos-drag-hint,
body.pos-mods-open .products-container { display: none !important; }
body.pos-mods-open .item-mods-panel { display: flex !important; }
body.pos-mods-open .products-panel {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
}
.cart-edit-mods {
  border: 1px solid var(--pos-champagne);
  background: color-mix(in srgb, var(--pos-accent) 15%, transparent);
  color: var(--pos-champagne-dark);
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.cart-row--mods .cart-row-clickable { cursor: pointer; }
.cart-row--mods .cart-row-clickable:active { opacity: 0.85; }
.item-mods-head {
  display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.25rem;
}
.item-mods-back {
  border: 1px solid var(--pos-line); background: var(--pos-surface); border-radius: 10px;
  padding: 0.4rem 0.75rem; font-weight: 700; cursor: pointer;
}
.item-mods-title {
  margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--pos-ink);
}
.item-mods-label {
  font-size: 0.82rem; font-weight: 700; color: var(--pos-muted);
}
.item-mods-notes {
  width: 100%; border: 1.5px solid var(--pos-line-strong); border-radius: 12px;
  padding: 0.65rem 0.75rem; font-size: 0.95rem; resize: vertical;
  font-family: inherit; min-height: 88px;
}
.item-mods-section-title {
  font-size: 0.85rem; font-weight: 800; color: var(--pos-ink); margin-top: 0.25rem;
}
.item-mods-addons {
  display: flex; flex-direction: column; gap: 0.45rem;
}
.item-mod-chip {
  display: flex; align-items: center; gap: 0.65rem;
  border: 1.5px solid var(--pos-line-strong); border-radius: 12px; padding: 0.55rem 0.75rem;
  background: var(--pos-surface); cursor: pointer; user-select: none;
}
.item-mod-chip.is-on {
  border-color: var(--pos-champagne); background: color-mix(in srgb, var(--pos-accent) 12%, transparent);
}
.item-mod-chip input { width: 18px; height: 18px; accent-color: var(--pos-champagne); }
.item-mod-chip .mod-name { flex: 1; font-weight: 700; font-size: 0.92rem; }
.item-mod-chip .mod-price { font-size: 0.82rem; color: var(--pos-muted); font-weight: 650; }
.item-mod-chip.is-without.is-on {
  border-color: var(--pos-danger); background: color-mix(in srgb, var(--pos-danger) 12%, transparent);
}
.item-mods-manage {
  margin-top: 0.35rem; padding-top: 0.65rem;
  border-top: 1px dashed var(--pos-line-strong);
}
.item-mods-qty-row {
  display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap;
  padding: 0.45rem 0.55rem; border-radius: 12px; background: var(--pos-surface-alt);
}
.item-mods-qty-row label { font-size: 0.85rem; font-weight: 800; color: var(--pos-ink); }
.item-mods-qty {
  width: 72px; min-height: 40px; text-align: center;
  border: 1.5px solid var(--pos-line-strong); border-radius: 10px; font-weight: 800;
}
.item-mods-qty-hint { font-size: 0.78rem; color: var(--pos-muted); font-weight: 650; }
.item-mods-new-row {
  display: grid; grid-template-columns: 1fr 88px; gap: 0.4rem;
}
.item-mods-new-row input {
  min-height: 40px; border: 1.5px solid var(--pos-line-strong); border-radius: 10px;
  padding: 0.35rem 0.55rem; font-size: 0.9rem;
}
.item-mods-new-actions {
  display: flex; gap: 0.4rem; margin-top: 0.4rem;
}
.item-mods-new-actions button {
  flex: 1; border: none; border-radius: 10px; background: var(--pos-ink); color: var(--pos-ink-text);
  font-weight: 700; padding: 0.55rem 0.85rem; cursor: pointer; min-height: 42px;
}
.item-mods-new-actions .item-mods-without-btn { background: var(--pos-danger-dark); color: #fff; }
.item-mods-hint { margin: 0.35rem 0 0; font-size: 0.75rem; color: var(--pos-muted); }
.item-mods-done {
  margin-top: 0.5rem; min-height: 48px; border: none; border-radius: 12px;
  background: var(--pos-champagne); color: #1f1a12; font-weight: 800; font-size: 1rem;
  cursor: pointer;
}
.item-mods-empty {
  font-size: 0.85rem; color: var(--pos-muted); padding: 0.5rem 0.15rem;
}
.cart-remove { border: none; background: transparent; color: var(--pos-danger); font-size: 0.8rem; }

/* ── Retail supermarket cashier layout (isolated) ── */
body.pos-mode-retail .pos-drag-hint,
body.pos-mode-retail .item-move-btn { display: none !important; }
body.pos-mode-retail .pos-sale-view {
  grid-template-columns: minmax(0, 1fr) 360px;
}
body.pos-mode-retail .products-toolbar input {
  min-height: 56px;
  font-size: 1.15rem;
  font-weight: 600;
  border-color: var(--pos-champagne);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos-accent) 18%, transparent);
  margin-bottom: 0.35rem;
}
body.pos-mode-retail .products-toolbar input:focus {
  outline: none;
  border-color: var(--pos-champagne-dark);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pos-accent) 28%, transparent);
}
.retail-scan-hint {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: var(--pos-muted);
  line-height: 1.35;
}
.retail-scan-feedback {
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin: 0 0 0.35rem;
  border-radius: 10px;
  padding: 0 0.75rem;
  font-size: 0.88rem;
  font-weight: 700;
  transition: opacity 0.15s ease, max-height 0.15s ease, padding 0.15s ease;
}
.retail-scan-feedback.show {
  max-height: 48px;
  opacity: 1;
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.55rem;
}
.retail-scan-feedback.ok { background: color-mix(in srgb, var(--pos-ok) 12%, transparent); color: var(--pos-ok-dark); }
.retail-scan-feedback.err { background: color-mix(in srgb, var(--pos-danger) 12%, transparent); color: var(--pos-danger-dark); }

body.pos-mode-retail .categories-bar { margin-bottom: 0.5rem; }
body.pos-mode-retail .cat-chip {
  border-radius: 10px;
  padding: 0.28rem 0.65rem;
  font-size: 0.76rem;
}
body.pos-mode-retail .products-container {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.5rem;
}
body.pos-mode-retail .product-card--retail {
  padding: 0.55rem;
  border-radius: 12px;
  text-align: start;
}
body.pos-mode-retail .product-card--retail img,
body.pos-mode-retail .product-card--retail .ph {
  height: 54px;
  border-radius: 8px;
}
body.pos-mode-retail .product-card--retail .retail-ph {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--pos-champagne-dark);
  background: linear-gradient(145deg, var(--pos-surface), var(--pos-surface-alt));
}
body.pos-mode-retail .product-card--retail h4 {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.84rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.pos-mode-retail .product-card--retail .sku {
  font-size: 0.68rem;
  color: var(--pos-muted);
  margin-bottom: 0.15rem;
  letter-spacing: 0.02em;
}
body.pos-mode-retail .product-card--retail .price {
  font-size: 0.95rem;
  color: var(--pos-ink);
}
body.pos-mode-retail .product-card--retail .stock {
  margin-top: 0.15rem;
}

body.pos-mode-retail .cart-panel {
  background: #fbfaf7;
}
body.pos-mode-retail .cart-empty-msg {
  color: var(--pos-muted);
  text-align: center;
  padding: 2.25rem 1rem;
  font-size: 0.95rem;
}
body.pos-mode-retail .cart-row--retail {
  background: var(--pos-surface);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
}
body.pos-mode-retail .cart-row--retail .cart-sku {
  font-size: 0.72rem;
  color: var(--pos-muted);
  margin-top: 0.1rem;
}
body.pos-mode-retail .cart-row--retail .qty-btn {
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
}
body.pos-mode-retail .cart-row--retail .qty-input {
  width: 72px;
  height: 40px;
  font-size: 1.05rem;
  font-weight: 700;
}
body.pos-mode-retail .cart-row--retail .line-total {
  font-size: 1.05rem;
}
body.pos-mode-retail .cart-summary .grand-total {
  font-size: 1.35rem !important;
  margin-top: 0.25rem;
}
body.pos-mode-retail .cart-actions .primary-btn {
  padding: 1rem;
  font-size: 1.08rem;
}
body.pos-mode-retail .last-sale-banner--retail {
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--pos-ok) 25%, transparent);
}
body.pos-mode-retail .last-sale-banner--retail:hover {
  background: color-mix(in srgb, var(--pos-ok) 16%, transparent);
}
.pay-fig--due { color: var(--pos-danger); }
.pay-fig--ok { color: var(--pos-ok); }
.pay-fig--change { color: #0f766e; font-size: 1.1em; }

body.pos-mode-retail .payment-summary {
  background: var(--pos-bg);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-top: 0.35rem;
}
body.pos-mode-retail .payment-summary strong {
  font-variant-numeric: tabular-nums;
}

.cart-summary {
  flex: 0 0 auto; padding: 0.75rem 1rem; border-top: 1px solid var(--pos-line);
  background: var(--pos-surface);
}
.cart-summary > div { display: flex; justify-content: space-between; margin-bottom: 0.35rem; font-size: 0.9rem; }
.cart-no-service {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.1rem 0 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  user-select: none;
}
.cart-no-service input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #0f766e;
  cursor: pointer;
}
.grand-total { font-size: 1.1rem !important; font-weight: 800; }
.cart-actions {
  flex: 0 0 auto; padding: 0.75rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--pos-surface); box-shadow: 0 -8px 24px rgba(0,0,0,0.04);
}
.cart-actions #send-kitchen { display: block; }
.primary-btn {
  width: 100%; border: none; background: var(--pos-ink); color: var(--pos-ink-text);
  border-radius: 14px; padding: 0.9rem 1rem; font-weight: 700; font-size: 1rem;
  box-shadow: 0 10px 20px -10px rgba(0,0,0,0.35);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.primary-btn:hover { box-shadow: 0 14px 26px -10px rgba(0,0,0,0.4); }
.primary-btn:active { transform: scale(0.98); }
.primary-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.danger-btn {
  border: none; background: var(--pos-danger-dark); color: #fff;
  border-radius: 14px; padding: 0.9rem 1rem; font-weight: 700; font-size: 1rem;
  cursor: pointer; transition: transform 0.14s ease;
}
.danger-btn:active { transform: scale(0.98); }
.pos-modal-actions .primary-btn,
.pos-modal-actions .danger-btn { width: auto; flex: 1; min-width: 140px; }
.line-void-btn {
  min-height: 34px; border: 1px solid #b91c1c; background: var(--pos-surface); color: var(--pos-danger-dark);
  border-radius: 8px; font-weight: 700; cursor: pointer; padding: 0 0.65rem; font-size: 0.78rem;
}
.held-row.is-voided { opacity: 0.7; }
.held-row.is-voided strong { text-decoration: line-through; }
.secondary-btn {
  width: 100%; border: 1.5px solid var(--pos-line-strong); background: var(--pos-surface); color: var(--pos-ink);
  border-radius: 14px; padding: 0.8rem 1rem; font-weight: 700; font-size: 0.95rem;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}
.secondary-btn:hover { background: var(--pos-surface-alt); border-color: var(--pos-champagne); }
.secondary-btn:active { transform: scale(0.98); }

.pos-tables-view { padding: 1rem; height: 100%; overflow: auto; min-height: 0; }
.tables-toolbar-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.tables-toolbar-actions #btn-new-reservation {
	min-height: 40px;
	padding: 0.45rem 0.9rem;
	font-weight: 800;
}
.tables-toolbar-actions input {
  width: 80px; border: 1.5px solid var(--pos-line-strong); border-radius: 10px; padding: 0.4rem 0.55rem; margin-inline-start: 0.35rem;
}
.floorplan-view {
  position: relative;
  margin-top: 1rem;
  min-height: 240px;
  border-radius: 18px;
  padding: 1.75rem;
  background: radial-gradient(ellipse 70% 60% at 50% 35%, #e3c99a, #d3ae78 60%, #c39c66 100%);
  border: 1px solid var(--pos-line);
  box-shadow: inset 0 0 70px rgba(70,45,15,0.14);
  overflow-x: auto;
}
.tables-grid {
  position: relative; width: 100%; height: 100%; min-height: 220px; margin: 0 auto;
}
.table-shadow {
  position: absolute; left: 0; top: 0; width: 100%; height: 30%;
  transform: translate(-50%, 50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(40,25,10,0.22), transparent 75%);
  z-index: 0; pointer-events: none;
}
.table-card {
  position: absolute;
  left: 0; top: 0;
  transform: translate(-50%, -50%);
  width: 100px; height: 100px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.12rem;
  cursor: pointer; padding: 0.3rem; text-align: center; z-index: 1;
  transition: transform 0.15s ease;
}
.table-card:hover { z-index: 4; transform: translate(-50%, -50%) scale(1.045); }
.table-top {
  position: absolute; inset: 0; border: 3px solid rgba(70,45,20,0.5);
}
.table-top::before {
  content: ""; position: absolute; inset: 5px; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
}
.shape-round .table-top { border-radius: 50%; }
.shape-square .table-top { border-radius: 16%; }
.wood { background: radial-gradient(circle at 34% 26%, #f7ead0, #dcbb8b 60%, #b9915e 100%); }
.shape-square .wood { background: linear-gradient(150deg, #f7ead0, #dcbb8b 60%, #b9915e 100%); }
.table-card.free .table-top { box-shadow: var(--pos-shadow-card), inset 0 2px 6px rgba(255,255,255,0.4), inset 0 -8px 12px rgba(0,0,0,0.14); }
.table-card.occupied .table-top { border-color: var(--pos-warn); box-shadow: var(--pos-shadow-card), 0 0 0 4px var(--pos-warn-bg), inset 0 2px 6px rgba(255,255,255,0.3), inset 0 -8px 12px rgba(0,0,0,0.14); }
.table-card.reserved .table-top { border-color: var(--pos-info); box-shadow: var(--pos-shadow-card), 0 0 0 4px var(--pos-info-bg), inset 0 2px 6px rgba(255,255,255,0.3), inset 0 -8px 12px rgba(0,0,0,0.14); animation: rawa-pulse-ring 2.4s ease-in-out infinite; }
.table-card.seated .table-top { border-color: var(--pos-ok); box-shadow: var(--pos-shadow-card), 0 0 0 4px var(--pos-ok-bg), inset 0 2px 6px rgba(255,255,255,0.3), inset 0 -8px 12px rgba(0,0,0,0.14); }
.table-card.occupied .wood { background: linear-gradient(rgba(200,120,30,0.14), rgba(200,120,30,0.14)), radial-gradient(circle at 34% 26%, #f7ead0, #dcbb8b 60%, #b9915e 100%); }
.table-card.reserved .wood { background: linear-gradient(rgba(29,78,216,0.12), rgba(29,78,216,0.12)), radial-gradient(circle at 34% 26%, #f7ead0, #dcbb8b 60%, #b9915e 100%); }
.table-card.seated .wood { background: linear-gradient(rgba(22,163,74,0.12), rgba(22,163,74,0.12)), radial-gradient(circle at 34% 26%, #f7ead0, #dcbb8b 60%, #b9915e 100%); }
@keyframes rawa-pulse-ring {
  0%, 100% { box-shadow: var(--pos-shadow-card), 0 0 0 4px var(--pos-info-bg), inset 0 2px 6px rgba(255,255,255,0.3), inset 0 -8px 12px rgba(0,0,0,0.16); }
  50% { box-shadow: var(--pos-shadow-card), 0 0 0 7px var(--pos-info-bg), inset 0 2px 6px rgba(255,255,255,0.3), inset 0 -8px 12px rgba(0,0,0,0.16); }
}
@media (prefers-reduced-motion: reduce) { .table-card.reserved .table-top { animation: none; } }
.table-card .t-body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.12rem; }
.t-plaque {
  background: linear-gradient(160deg, #f4e2b0, #c9a860);
  border: 1px solid rgba(90,60,20,0.4);
  border-radius: 5px; padding: 0.03rem 0.5rem;
  font-size: 1rem; font-weight: 800; color: #3d2a10;
  box-shadow: 0 1px 1px rgba(255,255,255,0.5) inset, 0 1px 2px rgba(0,0,0,0.25);
}
.table-card .t-status {
  font-size: 0.58rem; font-weight: 800; padding: 0.06rem 0.42rem; border-radius: 999px;
  background: rgba(255,255,255,0.78); color: #1a1a1a;
}
.table-card.occupied .t-status { background: var(--pos-warn-bg); color: var(--pos-warn); }
.table-card.reserved .t-status { background: var(--pos-info-bg); color: var(--pos-info); }
.table-card.seated .t-status { background: var(--pos-ok-bg); color: var(--pos-ok-dark); }
.table-card .t-detail {
  font-weight: 700; font-size: 0.58rem; color: #1a1a1a; max-width: 84px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.table-card .t-release {
  position: absolute; top: -7px; inset-inline-end: -7px; width: 22px; height: 22px; line-height: 20px;
  border-radius: 50%; border: 1px solid var(--pos-danger); background: var(--pos-danger-bg);
  color: var(--pos-danger-dark); font-size: 0.95rem; font-weight: 800; padding: 0; cursor: pointer;
  z-index: 2; transition: background 0.15s ease;
}
.table-card .t-release:hover { background: var(--pos-danger); color: #fff; }
.chair-wrap { position: absolute; z-index: 0; pointer-events: none; }
.chair-seat {
  width: 17px; height: 15px; border-radius: 4px;
  background: linear-gradient(160deg, #9c6b3f, #6b4425);
  box-shadow: 0 2px 3px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.18);
}
.chair-back {
  position: absolute; left: 2px; right: 2px; top: -5px; height: 6px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(160deg, #8a5a34, #5a3820);
  box-shadow: 0 1px 2px rgba(0,0,0,0.22);
}

.pos-modal-overlay {
  position: fixed; inset: 0; background: rgba(10,10,10,0.5); display: none;
  align-items: center; justify-content: center; padding: 1rem; z-index: 80;
}
.pos-modal-overlay.active { display: flex; }
.pos-modal {
  background: var(--pos-surface); border-radius: 16px; width: 100%; max-width: 380px; padding: 1.25rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.pos-modal--wide { max-width: 460px; }
.pos-modal h2 { margin: 0 0 0.5rem; }
.pos-modal-header { display: flex; justify-content: space-between; align-items: center; }
.pos-modal-header button { border: none; background: none; font-size: 1.5rem; }
.pos-modal-actions { margin-top: 1rem; }
.pos-error { color: var(--pos-danger); font-size: 0.85rem; margin-top: 0.6rem; min-height: 1.2em; }

#pin-input {
  width: 100%; min-height: 48px; text-align: center; letter-spacing: 0.3em;
  border: 1.5px solid var(--pos-line-strong); border-radius: 12px; font-size: 1.3rem; margin-top: 0.75rem;
}
.pin-cashiers { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }
.pin-cashier-btn {
  border: 1px solid var(--pos-line); background: var(--pos-surface-alt); border-radius: 999px;
  padding: 0.35rem 0.75rem; font-size: 0.82rem;
}
.pin-cashier-btn.active { background: var(--pos-ink); color: var(--pos-ink-text); border-color: var(--pos-ink); }

.shift-summary-box {
  background: var(--pos-bg); border-radius: 12px; padding: 0.85rem 1rem; margin-top: 0.5rem;
}
.shift-sum-row {
  display: flex; justify-content: space-between; gap: 0.75rem;
  font-size: 0.9rem; margin: 0.28rem 0;
}
.shift-sum-total {
  border-top: 1px dashed #ccc; margin-top: 0.55rem; padding-top: 0.55rem; font-weight: 800;
}
.shift-paper-btn.active {
  background: var(--pos-ink); color: var(--pos-ink-text); border-color: var(--pos-ink);
}
.cash-mv-type-btn { flex: 1; text-align: center; }
.cash-mv-type-btn.active {
  background: var(--pos-ink); color: var(--pos-ink-text); border-color: var(--pos-ink);
}

.payment-total-box {
  background: var(--pos-bg); border-radius: 12px; padding: 0.9rem 1rem;
  display: flex; justify-content: space-between; margin: 0.75rem 0; font-weight: 700;
}
.payment-methods { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.payment-method {
  flex: 1 1 30%; min-width: 5.6rem; border: 1px solid var(--pos-line); background: var(--pos-surface); border-radius: 10px; padding: 0.55rem; font-weight: 600;
}
.payment-method.active { background: var(--pos-ink); color: var(--pos-ink-text); border-color: var(--pos-ink); }
.payment-input-area { display: flex; gap: 0.5rem; }
.payment-input-area input, .payment-input-area select { flex: 1; min-height: 42px; border: 1.5px solid var(--pos-line-strong); border-radius: 10px; padding: 0.5rem 0.7rem; background: var(--pos-surface); }
.payment-input-area button { border: 1px solid var(--pos-line); background: var(--pos-surface); border-radius: 10px; padding: 0 0.9rem; }
.payments-list { margin: 0.75rem 0; font-size: 0.88rem; }
.payment-summary > div { display: flex; justify-content: space-between; margin-bottom: 0.3rem; }
.discount-presets { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.discount-preset-btn {
  border: 1px solid var(--pos-line); background: var(--pos-surface); border-radius: 999px;
  padding: 0.28rem 0.7rem; font-size: 0.8rem; font-weight: 700; cursor: pointer;
}
.discount-preset-btn.active { background: var(--pos-ink); color: var(--pos-ink-text); border-color: var(--pos-ink); }

@media (max-width: 900px) {
  .pos-sale-view {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr minmax(280px, 42vh);
  }
  .cart-panel {
    border-inline-start: none; border-top: 1px solid var(--pos-line);
    max-height: none; height: 100%;
  }
}

@media (max-width: 640px) {
  .pos-topbar {
    padding: 0.55rem 0.75rem;
    gap: 0.5rem;
  }
  .pos-topbar-center {
    display: none;
  }
  .pos-menu-toggle {
    display: inline-flex;
    align-items: center;
    margin-inline-start: auto;
  }
  .pos-topbar-right {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding-top: 0.35rem;
  }
  .pos-topbar.pos-menu-open .pos-topbar-right {
    display: flex;
  }
  .pos-topbar-right .pos-top-btn,
  .pos-topbar-right .rawa-lang-switcher {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .pos-mode-wrap select { min-width: 0; width: 100%; max-width: 160px; }
  .pos-subnav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.45rem 0.75rem;
  }
  .pos-sale-view {
    min-height: calc(100vh - 96px);
    padding-bottom: 4.25rem;
  }
  .cart-panel {
    max-height: none;
    border-top: none;
  }
  .products-container {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
  }
  .product-card img,
  .product-card .ph { height: 72px; }
  .payment-methods {
    flex-direction: column;
  }
  .payment-input-area {
    flex-direction: column;
  }
  .payment-input-area button {
    min-height: 44px;
  }
  .pos-mobile-cart-bar {
    display: flex;
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 45;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.9rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,0.96);
    border-top: 1px solid var(--pos-line);
    box-shadow: 0 -8px 24px rgba(0,0,0,0.08);
  }
  .pos-mobile-cart-bar .pm-total {
    font-weight: 800;
    font-size: 1.05rem;
  }
  .pos-mobile-cart-bar .pm-meta {
    font-size: 0.75rem;
    color: var(--pos-muted);
  }
  .pos-mobile-cart-bar button {
    border: none;
    background: var(--pos-ink);
    color: var(--pos-ink-text);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    font-weight: 700;
    min-height: 44px;
  }
  body.pos-cart-focus .products-panel { display: none; }
  body.pos-cart-focus.pos-mods-open .products-panel {
    display: flex !important;
    flex-direction: column;
    min-height: calc(100vh - 110px);
  }
  body.pos-mods-open .cart-panel { display: none; }
  body.pos-cart-focus .cart-panel {
    max-height: none;
    min-height: calc(100vh - 110px);
  }
  body.pos-cart-focus.pos-mods-open .cart-panel { display: none; }
  body.pos-cart-focus .pos-mobile-cart-bar button[data-action="toggle-cart"] {
    background: var(--pos-surface);
    color: var(--pos-ink);
    border: 1px solid var(--pos-line);
  }
}

/* ============================================================
   RAWA v2 POS redesign — appended overrides (Task 2 / البند صفر).
   Kept as a trailing block so the change is auditable and reversible.
   ============================================================ */

/* ---- Primary + selected controls = the one electric-blue accent
        (matches the reference "Pay" button, active nav/tab). ---- */
.primary-btn,
.item-mods-done,
.item-mods-new-actions button {
  background: var(--pos-sel); color: var(--pos-sel-text);
  box-shadow: var(--rawa-shadow-sm);
}
.primary-btn:hover { background: var(--rawa-accent-hover); box-shadow: var(--rawa-shadow); }
.item-mods-new-actions .item-mods-without-btn { background: var(--pos-danger); color: #fff; }

.pos-mode-badge,
.cat-chip.active,
.pin-cashier-btn.active,
.payment-method.active,
.cash-mv-type-btn.active,
.shift-paper-btn.active,
.discount-preset-btn.active,
.cat-add-btn:hover,
body.pos-mode-restaurant .cat-add-btn {
  background: var(--pos-sel); color: var(--pos-sel-text); border-color: transparent;
}

/* ---- No ugly borders: containers separate by surface value + soft
        shadow. --pos-line is already a hairline; drop it entirely on
        the big card-shaped surfaces. ---- */
.pos-more-menu,
.quick-orders-panel,
.reservations-panel,
.res-card,
.cust-result,
.pos-modal,
.variant-picker-box,
.payment-method,
.pos-top-btn,
.pos-tool-btn,
.qty-btn,
.held-actions button,
.res-card-actions button {
  border: 0;
}
.pos-more-menu,
.quick-orders-panel,
.reservations-panel,
.pos-modal,
.variant-picker-box { box-shadow: var(--rawa-shadow); background: var(--pos-elevated, var(--pos-surface)); }
.res-card,
.cust-result { background: var(--pos-surface-alt); }
.pos-top-btn,
.pos-tool-btn,
.payment-method,
.qty-btn,
.held-actions button,
.res-card-actions button { background: var(--pos-surface-alt); }
.pos-top-btn:hover,
.pos-tool-btn:hover,
.payment-method:hover { background: var(--pos-surface); border-color: transparent; }

/* topbar / subnav / cart divider keep a single hairline only */
.pos-topbar,
.pos-subnav,
.cart-panel,
.cart-header,
.tables-toolbar,
.cart-summary,
.cart-actions { border-color: var(--pos-line) !important; }

/* ---- Cart sidebar: a distinct raised surface, not just a bordered column ---- */
.cart-panel {
  background: var(--pos-elevated, var(--pos-surface));
  box-shadow: -14px 0 40px -24px rgba(0,0,0,0.28);
}
.cart-actions { box-shadow: 0 -10px 24px -14px rgba(0,0,0,0.14); }
.primary-btn, .secondary-btn, .danger-btn { border-radius: 12px; }

/* ---- Compact shift-context chip in the topbar (company · cashier · shift · time) ---- */
.pos-topbar-center {
  gap: 0; background: var(--pos-surface-alt); border-radius: 999px;
  padding: 0.3rem 0.85rem; flex-wrap: nowrap;
}
.pos-topbar-center .pos-meta {
  flex-direction: row; align-items: baseline; gap: 0.3rem; min-width: 0;
  font-size: 0.7rem; color: var(--pos-muted);
}
.pos-topbar-center .pos-meta + .pos-meta::before {
  content: "·"; margin-inline-end: 0.55rem; color: var(--pos-line-strong); font-weight: 700;
}
.pos-topbar-center .pos-meta strong { font-size: 0.8rem; }

/* ---- Products grid: a touch tighter and more regular ---- */
.products-container { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }

/* ---- Floor plan / tables: drop the fake wood + heavy insets, use clean
        surfaces; keep the semantic free/occupied/reserved/seated colours. ---- */
.floorplan-view {
  background: var(--pos-bg); border: 0; box-shadow: inset 0 0 0 1px var(--pos-line);
}
.wood,
.shape-square .wood,
.table-card.occupied .wood,
.table-card.reserved .wood,
.table-card.seated .wood { background: var(--pos-surface-alt); }
.table-top { border-color: var(--pos-line-strong); }
.table-top::before { box-shadow: none; }
.table-card.free .table-top { box-shadow: var(--pos-shadow-card); }
.table-card.occupied .table-top { box-shadow: var(--pos-shadow-card), 0 0 0 3px var(--pos-warn-bg); }
.table-card.reserved .table-top { box-shadow: var(--pos-shadow-card), 0 0 0 3px var(--pos-info-bg); }
.table-card.seated .table-top { box-shadow: var(--pos-shadow-card), 0 0 0 3px var(--pos-ok-bg); }
.t-plaque {
  background: var(--pos-surface); border: 1px solid var(--pos-line);
  color: var(--pos-ink); box-shadow: none;
}
.table-card .t-status { background: var(--pos-surface); color: var(--pos-ink); }
.table-card .t-detail { color: var(--pos-muted); }
.chair-seat { background: var(--pos-line-strong); box-shadow: none; }
.chair-back { background: var(--pos-line-strong); box-shadow: none; }

/* ---- Modal scrim a touch softer ---- */
.pos-modal-overlay { background: color-mix(in srgb, var(--rawa-text) 45%, transparent); }
.pos-modal { box-shadow: var(--rawa-shadow); }

/* ---- More-menu: floating glass panel ---- */
.pos-more-menu {
  background: var(--rawa-glass, var(--pos-surface));
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--rawa-glass-border, var(--pos-line));
}

/* ---- kill leftover literal hex on the "change due" figure ---- */
.pay-fig--change { color: var(--pos-ok); }
.cart-no-service { color: var(--pos-muted); }
.cart-no-service input { accent-color: var(--pos-accent); }
.item-mod-chip input { accent-color: var(--pos-accent); }

@media (max-width: 900px) {
  .pos-sale-view { grid-template-columns: 1fr; }
  body.pos-mode-retail .pos-sale-view { grid-template-columns: 1fr; }
  .cart-panel { box-shadow: none; }
  .pos-topbar-center { flex-wrap: wrap; }
}

/* ================================================================
   RAWA POS — Task 2 radical rebuild shell (البند صفر).
   Minimal topbar · category tile grid · 5-per-row product grid ·
   tabbed "Check" sidebar · bottom nav + slide-up sheets.
   Everything sized to one fixed screen (no page scroll).
   ================================================================ */

.rawa-pos-shell { font-size: 13px; }

/* ---- topbar (minimal) ---- */
.pos-top {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.4rem 0.7rem;
  background: var(--pos-surface);
  border-bottom: 1px solid var(--pos-line);
  min-height: 46px;
}
.pos-top-title { font-weight: 800; font-size: 0.95rem; white-space: nowrap; }
.pos-top-sp { margin-inline-start: auto; }
.pos-seg {
  display: flex; gap: 2px; padding: 3px;
  background: var(--pos-surface-alt); border-radius: 9px;
}
.pos-seg .pos-subnav-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: transparent; color: var(--pos-muted);
  font-weight: 700; font-size: 0.78rem; padding: 5px 11px; border-radius: 7px;
  cursor: pointer;
}
.pos-seg .pos-subnav-btn svg { width: 13px; height: 13px; }
.pos-seg .pos-subnav-btn.active { background: var(--pos-surface); color: var(--pos-ink); box-shadow: var(--pos-shadow-card); }
.pos-top-ico {
  width: 30px; height: 30px; flex: 0 0 auto;
  border: 0; border-radius: 8px; background: var(--pos-surface-alt); color: var(--pos-muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  font: inherit; font-size: 0.7rem; font-weight: 700;
}
.pos-top-ico:hover { color: var(--pos-ink); }
.pos-top-ico svg { width: 15px; height: 15px; }

/* ---- sale view : products | sidebar ---- */
.pos-sale-view { grid-template-columns: minmax(0, 1fr) 320px; }
body.pos-mode-restaurant .pos-sale-view { grid-template-columns: minmax(0, 1fr) 320px; }
.products-panel { padding: 0.6rem 0.7rem; }
.products-toolbar input { min-height: 40px; border-radius: 10px; margin-bottom: 0.45rem; }

/* category tile grid — colour blocks from DB. Square-ish tiles with a large,
   legible label: this bar is read at arm's length on a tablet mounted at the
   register, not scanned up close like a settings screen. */
.categories-bar { align-items: stretch; gap: 0.35rem; margin-bottom: 0.5rem; }
.categories-container.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px;
  flex: 1; max-height: 216px; overflow-y: auto;
}
.categories-container.cat-grid .cat-chip.cat-block {
  min-width: 0; height: 100px; padding: 8px; border-radius: 14px;
  gap: 4px; font-size: 1.15rem; justify-content: center; align-items: center; text-align: center;
}
.categories-container.cat-grid .cat-chip.cat-block .cat-count { font-size: 0.9rem; margin-inline-start: 0; }
.cat-add-btn { flex: 0 0 auto; align-self: flex-start; padding: 0.3rem 0.7rem; font-size: 0.72rem; border-radius: 10px; }

/* product grid — 5 per row, compact height */
.products-container { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.product-card { border-radius: 9px; }
.product-card img, .product-card .ph { height: 46px; }
.product-card h4 { margin: 0.4rem 0 0.05rem; padding-inline: 0.5rem; font-size: 0.74rem; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-card .price { padding: 0 0.5rem 0.5rem; font-size: 0.74rem; }
.product-card .stock { font-size: 0.62rem; padding-inline: 0.5rem; }
@media (max-width: 1100px) { .products-container { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px)  { .products-container { grid-template-columns: repeat(3, 1fr); }
  .categories-container.cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px)  { .products-container { grid-template-columns: repeat(2, 1fr); }
  .categories-container.cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- sidebar : tabbed "Check" ---- */
.pos-side {
  background: var(--pos-elevated, var(--pos-surface));
  border-inline-start: 1px solid var(--pos-line);
  display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden;
  box-shadow: -14px 0 40px -26px rgba(0,0,0,0.3);
}
.side-h {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  padding: 0.55rem 0.7rem 0.45rem;
}
.side-h .oname { font-weight: 800; font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-h-mini { margin-inline-start: auto; display: flex; gap: 4px; flex: 0 0 auto; }
.side-h-btn, .ns-toggle {
  width: 26px; height: 26px; border: 0; border-radius: 7px;
  background: var(--pos-surface-alt); color: var(--pos-muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  font: inherit; font-size: 0.8rem; font-weight: 800;
}
.side-h-btn svg { width: 13px; height: 13px; }
.side-h-btn:hover { color: var(--pos-ink); }
.ns-toggle { position: relative; }
.ns-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ns-toggle:has(input:checked) { background: var(--pos-sel); color: var(--pos-sel-text); }

.side-tabs {
  flex: 0 0 auto; display: flex; gap: 14px; padding: 0 0.7rem;
  border-bottom: 1px solid var(--pos-line);
}
.side-tabs .side-tab {
  border: 0; background: none; color: var(--pos-muted);
  font: inherit; font-weight: 700; font-size: 0.76rem; padding: 6px 0 8px;
  cursor: pointer; position: relative;
}
.side-tabs .side-tab.active { color: var(--pos-ink); }
.side-tabs .side-tab.active::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px;
  background: var(--pos-accent); border-radius: 2px;
}
.side-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0.5rem 0.7rem; }
.side-pane[hidden] { display: none; }

.act-list { display: flex; flex-direction: column; gap: 5px; }
.act-btn {
  display: flex; align-items: center; gap: 9px; width: 100%;
  border: 0; border-radius: 9px; background: var(--pos-surface-alt); color: var(--pos-ink);
  font: inherit; font-weight: 700; font-size: 0.8rem; text-align: start;
  padding: 0.6rem 0.7rem; cursor: pointer;
}
.act-btn svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--pos-muted); }
.act-btn .act-count {
  margin-inline-start: auto; background: var(--pos-accent); color: #fff;
  font-size: 0.68rem; min-width: 18px; height: 18px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
.act-hint { margin: 0.6rem 0 0; font-size: 0.68rem; color: var(--pos-muted); line-height: 1.45; }
.guest-order-type { margin-top: 8px; }

.side-foot {
  flex: 0 0 auto; border-top: 1px solid var(--pos-line);
  padding: 0.55rem 0.7rem 0.65rem; background: var(--pos-elevated, var(--pos-surface));
}
.side-foot .srow {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.75rem; color: var(--pos-muted); padding: 1px 0;
  font-variant-numeric: tabular-nums;
}
.side-foot .srow.grand { color: var(--pos-ink); font-weight: 800; font-size: 1rem; padding-top: 3px; }
.side-act { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 8px; }
.side-act button {
  border: 0; border-radius: 9px; font: inherit; font-weight: 800; font-size: 0.78rem;
  padding: 0.62rem 0.3rem; cursor: pointer; min-height: 40px;
}
.side-act .b-hold { background: var(--pos-surface-alt); color: var(--pos-muted); }
.side-act .b-kit  { background: var(--pos-surface-alt); color: var(--pos-ink); }
.side-act .b-pay  { background: var(--pos-sel); color: var(--pos-sel-text); }
.side-act .b-pay:hover { background: var(--rawa-accent-hover, var(--pos-sel)); }

/* compact customer chip (bill tab) */
.cart-customer-bar { display: inline-flex; gap: 4px; align-items: center; margin-bottom: 6px; border: 0; padding: 0; background: none; }
.cust-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 170px;
  border: 0; border-radius: 999px; background: var(--rawa-accent-soft, var(--pos-champagne-glow));
  color: var(--pos-champagne-dark); font: inherit; font-size: 0.72rem; font-weight: 700;
  padding: 3px 10px; cursor: pointer;
}
.cust-chip .cust-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-chip--add { background: var(--pos-surface-alt); color: var(--pos-muted); }
.cust-chip-x {
  border: 0; background: var(--pos-surface-alt); color: var(--pos-muted);
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 0.7rem; line-height: 1;
}

/* compact restaurant cart row */
.cart-items { padding: 0.4rem 0; }
.cart-row.cart-row--compact {
  background: transparent; border: 0; border-bottom: 1px solid var(--pos-line);
  border-radius: 0; padding: 0.5rem 0.1rem; margin: 0;
}
.cart-row--compact.is-editing { box-shadow: none; background: color-mix(in srgb, var(--pos-accent) 8%, transparent); border-radius: 8px; }
.cart-row-line { display: grid; grid-template-columns: 1fr auto auto auto auto; align-items: center; gap: 3px 6px; }
.cart-row-name {
  font-size: 0.78rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
.cart-row--compact .line-total { font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 42px; text-align: end; }
.cart-ico-btn {
  width: 21px; height: 21px; border: 0; border-radius: 6px; flex: 0 0 auto;
  background: var(--pos-surface-alt); color: var(--pos-muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.72rem; line-height: 1;
}
.cart-ico-btn svg { width: 11px; height: 11px; }
.cart-ico-btn.cart-remove:hover { background: var(--pos-danger-bg); color: var(--pos-danger); }
.cart-qty { display: inline-flex; align-items: center; gap: 3px; }
.cart-qty .qty-btn {
  width: 19px; height: 19px; border: 0; border-radius: 5px; background: var(--pos-surface-alt);
  color: var(--pos-ink); font-weight: 800; font-size: 0.8rem; line-height: 1; cursor: pointer;
}
.cart-qty .qty-input {
  width: 30px; height: 20px; text-align: center; border: 0; background: transparent;
  color: var(--pos-ink); font-size: 0.74rem; font-weight: 700; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.cart-qty .qty-input::-webkit-outer-spin-button, .cart-qty .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-row-rate { margin-top: 4px; }
.cart-row-rate .rate-input { width: 76px; height: 26px; text-align: center; border: 1px solid var(--pos-line-strong); border-radius: 7px; font-size: 0.74rem; }
.cart-row--compact .cart-row-mods { margin: 3px 0 0; font-size: 0.68rem; }

/* ---- bottom nav ---- */
.pos-bot {
  flex: 0 0 auto; display: flex; align-items: stretch; gap: 2px;
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
  background: var(--pos-surface); border-top: 1px solid var(--pos-line);
  min-height: 54px;
}
.pos-bot .pos-bot-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: transparent; color: var(--pos-muted);
  font: inherit; font-size: 0.6rem; font-weight: 700; cursor: pointer; border-radius: 9px; position: relative;
  padding: 3px 2px;
}
.pos-bot .pos-bot-item svg { width: 17px; height: 17px; }
.pos-bot .pos-bot-item:hover { color: var(--pos-ink); }
.pos-bot .pos-bot-item.active,
.pos-bot .pos-bot-item.on { color: var(--pos-accent); background: var(--rawa-accent-soft, var(--pos-champagne-glow)); }
.pos-bot .pos-bot-prof { flex: 0 0 48px; }
.pos-bot .pos-bot-prof .av {
  width: 21px; height: 21px; border-radius: 50%; background: var(--rawa-accent-soft, var(--pos-champagne-glow));
  color: var(--pos-accent); display: flex; align-items: center; justify-content: center;
  font-size: 0.58rem; font-weight: 800;
}
.pos-bot .pos-bot-bdg {
  position: absolute; top: 2px; inset-inline-end: 24%;
  min-width: 14px; height: 14px; border-radius: 7px; padding: 0 3px;
  background: var(--pos-accent); color: #fff; font-size: 0.55rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.pos-bot .pos-bot-bdg[hidden] { display: none; }

/* ---- slide-up sheets (account / transactions / more) ---- */
.pos-sheet {
  position: fixed; inset: 0; z-index: 70;
  background: color-mix(in srgb, var(--rawa-text) 42%, transparent);
  display: flex; align-items: flex-end; justify-content: center;
}
.pos-sheet[hidden] { display: none; }
.pos-sheet-panel {
  width: 100%; max-width: 420px;
  background: var(--pos-elevated, var(--pos-surface));
  border-radius: 18px 18px 0 0;
  padding: 0.75rem 0.9rem calc(1rem + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--rawa-shadow, 0 -20px 50px rgba(0,0,0,0.3));
  display: flex; flex-direction: column; gap: 5px;
  max-height: 80vh; overflow-y: auto;
}
.pos-sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 800; font-size: 0.85rem; padding: 0.15rem 0.15rem 0.4rem;
}
.pos-sheet-x { border: 0; background: var(--pos-surface-alt); color: var(--pos-muted);
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 0.9rem; line-height: 1; }
.pos-sheet-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px;
  background: var(--pos-surface-alt); border-radius: 10px; padding: 0.55rem 0.7rem; margin-bottom: 4px;
}
.pos-sheet-meta > div { display: flex; flex-direction: column; font-size: 0.62rem; color: var(--pos-muted); }
.pos-sheet-meta > div strong { font-size: 0.82rem; color: var(--pos-ink); }
.sheet-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 0; border-radius: 10px; background: var(--pos-surface-alt); color: var(--pos-ink);
  font: inherit; font-weight: 700; font-size: 0.82rem; text-align: start; text-decoration: none;
  padding: 0.7rem 0.8rem; cursor: pointer; min-height: 44px;
}
.sheet-btn:hover { background: color-mix(in srgb, var(--pos-accent) 8%, var(--pos-surface-alt)); }
.sheet-btn--danger { color: var(--pos-danger); }
.sheet-btn #display-link-badge {
  font-size: 0.62rem; font-weight: 800; background: var(--pos-surface); border-radius: 999px; padding: 2px 8px; color: var(--pos-muted);
}
.sheet-lang { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0.4rem 0.15rem 0; font-size: 0.78rem; font-weight: 700; color: var(--pos-muted); }

/* legacy topbar/subnav leftovers no longer rendered on this page */
.pos-topbar, .pos-subnav, .pos-mode-wrap, .pos-more-wrap { display: none !important; }

@media (max-width: 760px) {
  .pos-sale-view { grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) auto; }
  body.pos-mode-restaurant .pos-sale-view { grid-template-columns: 1fr; }
  .pos-side { border-inline-start: 0; border-top: 1px solid var(--pos-line); box-shadow: none; max-height: 46vh; }
  .pos-top-title { font-size: 0.85rem; }
}

/* ================================================================
   RAWA POS — Task 2 fixes round 1 (user visual review 2026-08-30):
   1) kill ALL shadow on the tables / floor plan (looked broken)
   2) real image room in product cards (were too short for a photo)
   3) cart line: item name readable (was truncated to nothing)
   4) topbar theme toggle = icon only (no text label)
   ================================================================ */

/* 1 — tables / floor plan: no shadows, no fake depth, just clean surfaces */
.floorplan-view,
.tables-grid,
.table-card,
.table-card .table-top,
.table-card.free .table-top,
.table-card.occupied .table-top,
.table-card.reserved .table-top,
.table-card.seated .table-top,
.table-top::before,
.t-plaque,
.table-card .t-status,
.chair-seat,
.chair-back {
  box-shadow: none !important;
}
.floorplan-view { background: var(--pos-bg) !important; border: 0 !important; }
.table-shadow { display: none !important; }
.table-card.free .table-top    { box-shadow: inset 0 0 0 1px var(--pos-line) !important; }
.table-card.occupied .table-top { box-shadow: inset 0 0 0 2px var(--pos-warn) !important; }
.table-card.reserved .table-top { box-shadow: inset 0 0 0 2px var(--pos-info) !important; }
.table-card.seated .table-top   { box-shadow: inset 0 0 0 2px var(--pos-ok) !important; }
.chair-seat, .chair-back { background: var(--pos-line-strong) !important; }
@keyframes rawa-pulse-ring { 0%,100%,50% { box-shadow: inset 0 0 0 2px var(--pos-info) !important; } }

/* 2 — product cards: give the image a real block (photo-forward like the reference) */
.products-container { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.product-card { border-radius: 10px; }
.product-card img, .product-card .ph { height: 92px !important; }
.product-card .ph svg { width: 26px; height: 26px; }
.product-card h4 {
  margin: 0.5rem 0 0.1rem; padding-inline: 0.55rem;
  font-size: 0.78rem; line-height: 1.25; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.1em;
}
.product-card .price { padding: 0 0.55rem 0.55rem; font-size: 0.8rem; }
@media (max-width: 1240px) { .products-container { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .products-container { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .products-container { grid-template-columns: repeat(2, 1fr); } }

/* 3 — cart line: name on its own line (wraps up to 2); a compact
      controls row (remove · qty · mods · price) underneath. Flex, not grid. */
.cart-row.cart-row--compact { padding: 0.5rem 0.15rem; }
.cart-row--compact .cart-row-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px;
}
.cart-row--compact .cart-row-name {
  flex: 1 0 100%; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 0.8rem; line-height: 1.3; font-weight: 600;
}
.cart-row--compact .cart-ico-btn.cart-remove { order: 1; }
.cart-row--compact .cart-qty { order: 2; display: inline-flex; align-items: center; gap: 4px; }
.cart-row--compact .cart-qty .qty-btn { width: 20px; height: 20px; }
.cart-row--compact .cart-qty .qty-input { width: 32px; height: 22px; font-size: 0.78rem; }
.cart-row--compact .cart-ico-btn[data-act="mods"] { order: 3; }
.cart-row--compact .line-total {
  order: 4; margin-inline-start: auto;
  font-size: 0.82rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.cart-row--compact .cart-row-rate { margin-top: 5px; }
.cart-row--compact .cart-row-mods { margin-top: 3px; }

/* 4 — topbar theme toggle: icon only, no text */
.pos-top-ico[data-theme-toggle] > span { gap: 0 !important; }
.pos-top-ico[data-theme-toggle] > span > span { display: none !important; }
.pos-top-ico[data-theme-toggle] svg { width: 15px !important; height: 15px !important; }

/* ================================================================
   RAWA POS — Task 2 fixes round 2 (user visual review 2026-08-30):
   - sidebar a bit wider, products area a bit narrower
   - product grid: 4 per row (nicer boxes with photos); 5 only on very
     wide screens
   - "held sales" + "menu QR" become header icons next to ٪ / ✏ / 🗑
   ================================================================ */

.pos-sale-view,
body.pos-mode-restaurant .pos-sale-view { grid-template-columns: minmax(0, 1fr) 372px !important; }

.products-container { grid-template-columns: repeat(4, 1fr) !important; gap: 9px !important; }
@media (min-width: 1500px) { .products-container { grid-template-columns: repeat(5, 1fr) !important; } }
@media (max-width: 1024px) { .products-container { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 680px)  { .products-container { grid-template-columns: repeat(2, 1fr) !important; } }

/* header icons: fit 5 (held · qr · ٪ · ✏ · 🗑) beside the order name */
.side-h-mini { gap: 3px; }
.side-h-btn, .ns-toggle { width: 25px; height: 25px; }
.side-h .oname { flex: 1 1 auto; min-width: 0; }
.side-h-btn.has-badge { position: relative; overflow: visible; }
.side-h-btn .h-badge {
  position: absolute; top: -4px; inset-inline-end: -4px;
  min-width: 13px; height: 13px; border-radius: 7px; padding: 0 3px;
  background: var(--pos-accent); color: #fff; font-size: 0.52rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.side-h-btn .h-badge[hidden] { display: none; }

@media (max-width: 760px) {
  .pos-sale-view,
  body.pos-mode-restaurant .pos-sale-view { grid-template-columns: 1fr !important; }
}

/* ================================================================
   RAWA POS — Task 2 fixes round 3 (user 2026-08-30):
   the cart still had a horizontal scrollbar — kill it. The order-type
   "+ طلب جديد" button inherits width:100% from .primary-btn and sat in a
   flex ROW next to the <select> → overflow. Stack it, and clamp every
   sidebar child to the panel width.
   ================================================================ */

.pos-side, .pos-side * { min-width: 0; }
.pos-side { overflow: hidden !important; }
.side-body { overflow-x: hidden !important; overflow-y: auto; }
.side-pane, .side-foot, .side-h, .side-tabs { max-width: 100%; overflow-x: hidden; }

/* order-type picker: select on top, full-width button under it */
.side-pane .order-type-picker,
.counter-order-type-row .order-type-picker,
.guest-order-type .order-type-picker {
  display: flex; flex-direction: column; gap: 6px; width: 100%; align-items: stretch;
}
.side-pane .order-type-picker .order-type-select,
.counter-order-type-row .order-type-select,
.guest-order-type .order-type-select { width: 100%; min-width: 0; }
.side-pane .order-type-picker .order-type-start-btn,
.counter-order-type-row .order-type-start-btn,
.guest-order-type .order-type-start-btn { width: 100% !important; flex: none; }

/* cart rows + totals never push width */
.cart-items, .cart-row, .cart-row--compact, .cart-row-line,
.cart-customer-bar, .counter-order-type-row, .active-table-badge { max-width: 100%; overflow-x: hidden; }
.cart-row--compact .cart-row-name { word-break: break-word; }
.side-foot .srow { min-width: 0; }
.side-foot .srow span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-act { min-width: 0; }
.side-act button { min-width: 0; padding-inline: 2px; }

/* stack earlier (≤ 900px) so a laptop window never squeezes both columns.
   Below 760px the sidebar becomes a bottom-sheet — see the Task 4 block. */
@media (min-width: 761px) and (max-width: 900px) {
  .pos-sale-view,
  body.pos-mode-restaurant .pos-sale-view {
    grid-template-columns: 1fr !important;
    grid-template-rows: minmax(0, 1fr) minmax(240px, 42vh);
  }
  .pos-side {
    border-inline-start: 0; border-top: 1px solid var(--pos-line);
    box-shadow: none; height: 100%;
  }
  .products-panel { min-height: 0; }
}

/* ================================================================
   RAWA POS — Task 4: mobile responsiveness (البند صفر)
   ONE authoritative mobile layer. On phones the product grid is
   full-width, the bottom nav stays, and the cart lives in a
   FAB-triggered bottom-sheet. This block is last on purpose — it is
   the final word over every earlier @media rule for .pos-sale-view /
   .pos-side / .products-container. Zero sale/payment/shift logic.
   ================================================================ */

/* the pre-Task-2 mobile cart bar is dead DOM — never show it */
.pos-mobile-cart-bar { display: none !important; }

/* --- Floating cart button (phones only, when the cart has items) --- */
.pos-cart-fab {
  position: fixed; z-index: 46;
  inset-inline-end: max(0.9rem, env(safe-area-inset-right, 0px));
  bottom: calc(54px + env(safe-area-inset-bottom, 0px) + 0.7rem);
  display: none; align-items: center; gap: 0.5rem;
  border: 0; border-radius: 999px; cursor: pointer;
  padding: 0.6rem 0.95rem 0.6rem 1.05rem;
  background: var(--pos-accent); color: #fff;
  font: inherit; font-weight: 800; font-size: 0.85rem;
  box-shadow: 0 10px 26px -6px color-mix(in srgb, var(--pos-accent) 55%, transparent),
              0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.16s ease, opacity 0.18s ease;
}
.pos-cart-fab:active { transform: scale(0.96); }
.pos-cart-fab svg { width: 18px; height: 18px; }
.pos-cart-fab .fab-count {
  background: rgba(255, 255, 255, 0.26); border-radius: 999px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.pos-cart-fab .fab-total { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* --- Bottom-sheet scrim --- */
.pos-cart-scrim {
  position: fixed; inset: 0; z-index: 47;
  background: color-mix(in srgb, var(--rawa-text, #000) 45%, transparent);
  opacity: 0; pointer-events: none; transition: opacity 0.24s ease;
}
body.pos-cart-sheet-open .pos-cart-scrim { opacity: 1; pointer-events: auto; }

@media (max-width: 760px) {
  /* single column — the cart leaves the grid flow */
  .pos-sale-view,
  body.pos-mode-restaurant .pos-sale-view,
  body.pos-mode-retail .pos-sale-view {
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr !important;
  }

  /* cart = bottom-sheet */
  .pos-side.cart-panel {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 48;
    height: min(86dvh, 640px); max-height: 86dvh;
    border: 0 !important;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -14px 44px -12px rgba(0, 0, 0, 0.4);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  body.pos-cart-sheet-open .pos-side.cart-panel { transform: translateY(0); }
  .pos-side.cart-panel::before {
    content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
    width: 36px; height: 4px; border-radius: 2px; background: var(--pos-line-strong); z-index: 3;
  }
  .pos-side .side-h { padding-top: 0.95rem; }
  .pos-side .side-foot { padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px)); }

  /* product grid: 2 columns, taller photo */
  .products-container,
  body.pos-mode-restaurant .products-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.55rem !important;
  }
  .product-card img, .product-card .ph { height: 96px !important; }
  .categories-container.cat-grid { grid-template-columns: repeat(3, 1fr) !important; }

  /* products panel clears the bottom nav + FAB; native momentum scroll */
  .products-panel {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)) !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .pos-tables-view { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }

  /* FAB shows only when the cart has items and no sheet is open */
  .pos-cart-fab.has-items { display: inline-flex; }
  body.pos-cart-sheet-open .pos-cart-fab { opacity: 0; pointer-events: none; }

  /* on the tables view there is no cart context — hide the FAB */
  body:has(.pos-tables-view:not(.pos-view-hidden)) .pos-cart-fab { display: none !important; }
}

@media (max-width: 360px) {
  .products-container,
  body.pos-mode-restaurant .products-container { grid-template-columns: 1fr !important; }
  .categories-container.cat-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (prefers-reduced-motion: reduce) {
  .pos-side.cart-panel { transition: none !important; }
  .pos-cart-scrim { transition: none !important; }
}

/* ===== Category 20 — void / refund / held-delete reason + manager PIN ===== */
.void-reason-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.void-reason-chips .vr-chip {
  border: 1.5px solid var(--pos-line-strong);
  background: var(--pos-elevated, #fff);
  color: var(--pos-text, inherit);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 38px;
}
.void-reason-chips .vr-chip.active {
  background: var(--pos-accent, #2f6bff);
  border-color: var(--pos-accent, #2f6bff);
  color: #fff;
}
/* The void/reason dialog is a SUB-dialog opened on top of #sale-detail-modal.
   Every .pos-modal-overlay shares z-index:80, so without this the reason modal
   (earlier in the DOM) renders *behind* the sale-detail modal and looks broken
   ("appears under the delete tab"). Lift it above all sibling overlays. */
#void-reason-modal { z-index: 1000; }
#void-reason-modal .pos-modal { max-width: 420px; }

/* ---- phone: keep the restaurant top bar on ONE row (2026-09-20) ----
   At ~360dp the title + 3 tabs + icons wrapped to 3 lines and one control was
   cut off at the edge. The active tab already names the view, so hide the title
   here and let the tabs share the row. Printing / desktop layouts untouched. */
@media (max-width: 520px) {
  .pos-top { gap: 0.35rem; padding: 0.4rem 0.5rem; }
  body.pos-mode-restaurant .pos-top-title { display: none; }
  .pos-seg { flex: 1 1 auto; min-width: 0; }
  .pos-seg .pos-subnav-btn { flex: 1 1 0; min-width: 0; justify-content: center; white-space: nowrap; padding: 5px 6px; font-size: 0.72rem; }
  .pos-seg .pos-subnav-btn { flex: 0 0 auto; }
  .pos-seg .pos-subnav-btn.active { flex: 1 1 auto; }
  .pos-seg .pos-subnav-btn svg { width: 16px; height: 16px; }
  /* only the active tab shows its name; the others are icon-only */
  .pos-seg .pos-subnav-btn:not(.active) > span[data-i18n] { display: none; }
}


/* ---- Waiters + live tables (2026-10-06) ----
   «مفتوحة»: someone opened the table and hasn't ordered yet — violet, distinct
   from occupied (amber), reserved (blue) and seated (green). `.live` = a device
   has this table open right now (small pulsing dot on any state). */
.table-card.opened .table-top { border-color: #7c3aed; box-shadow: var(--pos-shadow-card), 0 0 0 4px rgba(124,58,237,0.16), inset 0 2px 6px rgba(255,255,255,0.3), inset 0 -8px 12px rgba(0,0,0,0.14); }
.table-card.opened .wood { background: linear-gradient(rgba(124,58,237,0.12), rgba(124,58,237,0.12)), radial-gradient(circle at 34% 26%, #f7ead0, #dcbb8b 60%, #b9915e 100%); }
.table-card.opened .t-status { background: rgba(124,58,237,0.14); color: #6d28d9; }
.table-card.live::after {
  content: ""; position: absolute; top: 6%; inset-inline-end: 6%; z-index: 2;
  width: 11px; height: 11px; border-radius: 50%; background: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.25); animation: rawa-live-dot 1.6s ease-in-out infinite;
}
@keyframes rawa-live-dot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) { .table-card.live::after { animation: none; } }

/* Waiter: tables only — no counter sale, held list, transactions, menu orders,
   item management or drawer; no pay/split unless the owner allowed it. */
body.pos-waiter .pos-subnav-btn[data-view="cash"],
body.pos-waiter .pos-subnav-btn[data-view="online"],
body.pos-waiter #btn-held-nav,
body.pos-waiter #pos-nav-txns,
body.pos-waiter #pos-nav-menu,
body.pos-waiter #btn-drawer,
body.pos-waiter #btn-held,
body.pos-waiter #btn-add-category,
body.pos-waiter #btn-add-item,
body.pos-waiter #btn-close-shift,
body.pos-waiter .quick-orders-panel,
body.pos-waiter #save-table-count,
body.pos-waiter .tables-toolbar-actions label,
body.pos-waiter-nopay #open-payment,
body.pos-waiter-nopay #btn-split { display: none !important; }

/* ---- ذمم (credit sales) — payment panel + collect-debt modal ---- */
.pos-modal-overlay--top { z-index: 95; }
.payment-method--credit { border-style: dashed; }
.credit-box { margin-top: 0.6rem; padding: 0.7rem 0.8rem; border: 1.5px solid var(--pos-line-strong); border-radius: 12px; background: var(--pos-surface-alt); }
.credit-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.credit-head strong { font-size: 1rem; }
.credit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; text-align: center; }
.credit-grid div { background: var(--pos-surface); border-radius: 8px; padding: 0.35rem 0.2rem; }
.credit-grid span { display: block; font-size: 0.7rem; color: var(--pos-muted); }
.credit-grid b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.credit-bar { height: 6px; border-radius: 3px; background: var(--pos-line); overflow: hidden; margin-top: 0.5rem; }
.credit-bar i { display: block; height: 100%; width: 0; background: var(--pos-ok); }
.credit-msg { margin-top: 0.4rem; font-size: 0.8rem; color: var(--pos-muted); min-height: 1em; }
.credit-msg.is-over { color: var(--pos-danger); font-weight: 700; }
.cust-result .cust-bal { display: inline-block; margin-inline-start: 0.4rem; font-size: 0.75rem; padding: 1px 7px; border-radius: 10px; background: var(--pos-warn-bg); color: var(--pos-warn); }
.rcv-result { margin-top: 0.6rem; padding: 0.6rem 0.7rem; border-radius: 10px; background: var(--pos-ok-bg); color: var(--pos-ok-dark); font-weight: 700; }
.rcv-methods { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.4rem 0; }
.rcv-methods button.active { background: var(--pos-sel); color: var(--pos-sel-text); }

/* A tall modal (payment + ذمم panel + loyalty + discount on a phone) used to be centered and
   clipped at BOTH ends. Every POS modal now caps at the visible height and scrolls inside;
   the payment modal keeps its main action pinned to the bottom edge of that scroll area. */
.pos-modal { max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#payment-modal .pos-modal-actions { position: sticky; bottom: -1.25rem; margin-inline: -1.25rem; padding: 0.6rem 1.25rem 1rem; background: var(--pos-elevated, var(--pos-surface)); border-top: 1px solid var(--pos-line); z-index: 2; }
@media (max-width: 520px) {
  .credit-box { padding: 0.5rem 0.6rem; margin-top: 0.4rem; }
  .credit-head { margin-bottom: 0.35rem; }
  .credit-grid b { font-size: 0.92rem; }
  .credit-grid span { font-size: 0.66rem; }
}
