:root {
  --bg: #0f0d0b;
  --surface: #1a1612;
  --surface-2: #252019;
  --accent: #c8956c;
  --accent-2: #e8b88a;
  --text: #f5f0eb;
  --muted: #9a8f82;
  --success: #6dbf8a;
  --warn: #e8b84a;
  --danger: #e86a6a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(200, 149, 108, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(232, 184, 138, 0.08), transparent);
}

.font-display { font-family: "Fraunces", Georgia, serif; }

.glass {
  background: rgba(26, 22, 18, 0.72);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(200, 149, 108, 0.12);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #a67c52);
  color: #1a1208;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(200, 149, 108, 0.35); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(200, 149, 108, 0.3);
  color: var(--accent-2);
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
}

.chip {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  border: 1px solid rgba(200, 149, 108, 0.2);
  background: var(--surface-2);
  cursor: pointer;
  transition: all 0.15s;
}
.chip.active {
  background: var(--accent);
  color: #1a1208;
  border-color: var(--accent);
  font-weight: 600;
}

.card-menu {
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-menu:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.status-step { opacity: 0.4; }
.status-step.done { opacity: 1; color: var(--success); }
.status-step.current { opacity: 1; color: var(--accent-2); font-weight: 700; }

.order-hub-status-track {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.order-hub-step {
  flex: 1;
  min-width: 3.5rem;
  text-align: center;
  padding: 0.45rem 0.25rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.65rem;
  line-height: 1.25;
  opacity: 0.4;
  position: relative;
}
.order-hub-step.done {
  opacity: 1;
  background: rgba(74, 222, 128, 0.12);
  color: var(--success);
}
.order-hub-step.current {
  opacity: 1;
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-2);
  font-weight: 700;
  animation: order-step-pulse 1.4s ease-in-out infinite;
}
.order-hub-step-icon {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.15rem;
}
.order-hub-loyalty {
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  background: rgba(200, 149, 108, 0.12);
  border: 1px solid rgba(200, 149, 108, 0.25);
}
.order-hub-loyalty-bar {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
  margin-top: 0.45rem;
}
.order-hub-loyalty-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.5s ease;
}
.order-hub-line {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.875rem;
}
.order-hub-line:last-child { border-bottom: none; }
.order-hub-line-head { font-weight: 700; }
.order-hub-line-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
  line-height: 1.35;
}
.order-hub-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.order-hub-link {
  display: block;
  text-align: center;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface-2);
  color: var(--accent-2);
}
.order-hub-link--google {
  border-color: rgba(251, 191, 36, 0.35);
}
.order-hub-link--loyalty {
  border-color: rgba(200, 149, 108, 0.35);
}

/* Customer bottom bar — cart footer + menu/order tabs */
.customer-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 42;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(10, 10, 10, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.customer-cart-footer {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  z-index: 1;
  background: transparent;
  border-top: none;
}

body.has-customer-dock.customer-view-order .customer-cart-footer {
  display: none;
}

.customer-dock {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  z-index: 2;
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem 0.5rem;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.customer-dock.hidden {
  display: none;
}

body.has-customer-dock {
  padding-bottom: 7.5rem;
}

body.has-customer-dock.customer-view-order {
  padding-bottom: 4.25rem;
}

body.has-customer-dock #app-main.jacca-menu .menu-root-wrap {
  padding-bottom: 5.5rem;
}

.customer-dock-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 3rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.85rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  position: relative;
}

.customer-dock-btn.active {
  color: var(--accent-2);
  background: rgba(200, 149, 108, 0.14);
  border-color: rgba(200, 149, 108, 0.32);
}

.customer-dock-btn.active .customer-dock-icon svg {
  stroke: var(--accent-2);
}

.customer-dock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1;
}

.customer-dock-icon svg {
  display: block;
  stroke: currentColor;
}

.customer-dock-label {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
}

.customer-dock-badge {
  position: absolute;
  top: 0.4rem;
  right: calc(50% - 1.5rem);
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(10, 10, 10, 0.95);
}

.customer-dock-badge.hidden {
  display: none;
}

.call-fab.call-fab--with-footer {
  bottom: 5.25rem;
}

.call-fab.call-fab--with-dock {
  bottom: 8.5rem;
}

.call-fab.call-fab--with-dock-only {
  bottom: 4.75rem;
}

.cart-review-line {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cart-review-line:last-child { border-bottom: none; }
.cart-review-remove {
  color: var(--danger);
  font-size: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.order-sent-toast {
  position: fixed;
  top: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.95);
  color: #0f0d0b;
  font-weight: 700;
  font-size: 0.875rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: order-toast-in 0.3s ease;
}
@keyframes order-step-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(251, 191, 36, 0); }
}
@keyframes order-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.call-fab {
  position: fixed;
  bottom: 1.25rem;
  right: 1rem;
  min-width: 3.5rem;
  min-height: 3.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--danger), #c44);
  border: none;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(232, 106, 106, 0.45);
  cursor: pointer;
  z-index: 70;
  animation: pulse 2s infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.call-fab.hidden { display: none; }
.call-fab-icon { font-size: 1.35rem; line-height: 1; }
.call-fab-label { font-size: 0.65rem; line-height: 1.1; max-width: 4.5rem; text-align: center; }
.call-fab.call-fab--with-footer { bottom: 5.5rem; }
.call-fab.call-fab--custom-pos {
  bottom: auto !important;
  right: auto !important;
  animation: none;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.call-fab.call-fab--custom-pos:active { cursor: grabbing; }
.call-fab.call-fab--dragging { animation: none; opacity: 0.92; }

#app-main > header {
  padding-right: 3.25rem;
}

.profile-line-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  color: var(--accent-2);
  border-bottom: 1px dashed rgba(232, 184, 138, 0.35);
  font-weight: 600;
  min-height: 2rem;
}
.profile-line-btn:hover { color: var(--accent); }

.top-banner { border: 1px solid rgba(200, 149, 108, 0.2); }

@keyframes name-prompt-blink {
  0%, 100% { opacity: 1; color: var(--danger); }
  50% { opacity: 0.25; color: #ff9999; }
}

.top-name-prompt:not(.hidden) {
  animation: name-prompt-blink 0.75s ease-in-out infinite;
  font-weight: 600;
}

.name-child-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.name-child-row-text {
  flex: 1;
  min-width: 0;
  text-align: start;
}

.name-field-wrap {
  position: relative;
  width: 100%;
}
.name-field-wrap input {
  padding-right: 3.25rem;
}
.name-field-wrap--display {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.35rem 0.4rem 0.35rem 0.75rem;
  min-height: 2.75rem;
}
.name-field-wrap--display .profile-line-btn {
  border-bottom: none;
  padding: 0.15rem 0;
}

.btn-child-in-field {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}
.name-field-wrap--display .btn-child-in-field {
  position: static;
  transform: none;
  flex-shrink: 0;
}

.btn-child {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(91, 143, 212, 0.25);
  color: #fff;
  border: 1px solid rgba(91, 143, 212, 0.5);
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  box-shadow: none;
}
.btn-child:hover {
  background: rgba(91, 143, 212, 0.45);
}
.btn-child:active { transform: scale(0.92); }
.btn-child-in-field:active { transform: translateY(-50%) scale(0.92); }
.name-field-wrap--display .btn-child-in-field:active { transform: scale(0.92); }

.waiter-picker.hidden { display: none; }
.waiter-picker-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.waiter-picker-list {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
}
.waiter-picker-list::-webkit-scrollbar { display: none; }
.waiter-chip {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 3.5rem;
  max-width: 4.5rem;
  padding: 0.35rem 0.4rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(200, 149, 108, 0.2);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.waiter-chip:hover { border-color: var(--accent); }
.waiter-chip.active {
  border-color: var(--accent);
  background: rgba(200, 149, 108, 0.15);
}
.waiter-chip-name {
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.waiter-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid rgba(200, 149, 108, 0.25);
}
.waiter-assigned {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.waiter-assigned .waiter-avatar {
  width: 1.5rem;
  height: 1.5rem;
}
.waiter-assigned-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-2);
}
.waiter-picker {
  padding-right: 3rem;
}
.waiter-selected-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.waiter-welcome-msg {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--accent-2);
}
.btn-change-waiter {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid rgba(200, 149, 108, 0.35);
  background: var(--surface);
  color: var(--accent-2);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: border-color 0.15s, background 0.15s;
}
.btn-change-waiter:hover {
  border-color: var(--accent);
  background: rgba(200, 149, 108, 0.12);
}

.btn-call-waiter {
  position: relative;
  flex-shrink: 0;
  padding: 0;
  border: 2px solid rgba(200, 149, 108, 0.45);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  line-height: 0;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn-call-waiter:hover {
  border-color: var(--danger);
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(232, 106, 106, 0.25);
}
.btn-call-waiter .waiter-avatar {
  width: 2.25rem;
  height: 2.25rem;
  display: block;
}
.btn-call-waiter-ring {
  position: absolute;
  right: -0.2rem;
  bottom: -0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: var(--danger);
  font-size: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
  line-height: 1;
}

.call-fab-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: block;
}
.call-fab--sent {
  animation: none;
  background: linear-gradient(135deg, var(--success), #4a9);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(232, 106, 106, 0.45); }
  50% { box-shadow: 0 8px 48px rgba(232, 106, 106, 0.7); }
}

.table-tile {
  aspect-ratio: 1;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  min-height: 0;
  padding: 0.35rem;
  gap: 0.15rem;
}
.table-tile.status-empty,
.monitor-tile.status-empty {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--muted);
}
.table-tile.status-open,
.monitor-tile.status-open {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.55);
  color: #1a1208;
}
.table-tile.status-ordered,
.monitor-tile.status-ordered {
  background: #f0c030;
  border-color: #c99a18;
  color: #1a1208;
}
.table-tile.status-served,
.monitor-tile.status-served {
  background: #3d8fd9;
  border-color: #2a6fad;
  color: #fff;
}
.table-tile.status-pay,
.monitor-tile.status-pay {
  background: #5cb87a;
  border-color: #3d9460;
  color: #0a2012;
}
.table-tile.status-call,
.monitor-tile.status-call {
  background: rgba(220, 60, 60, 0.45);
  border-color: #e03030;
  color: #fff;
  animation: garson-blink 0.75s ease-in-out infinite;
}
.table-tile .tile-waiter {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
  font-size: 0.55rem;
  font-weight: 600;
  line-height: 1.1;
  opacity: 0.95;
}
.table-tile.status-open .tile-waiter { color: #5a4a38; }
.table-tile .tile-waiter img {
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}
.table-tile .tile-waiter span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-tile .tile-status-label {
  font-size: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
.table-tile.needs-garson,
.table-tile.has-order,
.table-tile.ready { /* legacy — use status-* */ }
@keyframes garson-blink {
  0%, 100% {
    background: rgba(220, 60, 60, 0.35);
    box-shadow: 0 0 0 0 rgba(232, 60, 60, 0.5);
  }
  50% {
    background: rgba(232, 40, 40, 0.95);
    box-shadow: 0 0 14px 4px rgba(232, 60, 60, 0.55);
  }
}
@keyframes blink { 50% { opacity: 0.7; } }

.floor-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.floor-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--muted);
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  background: var(--surface);
}
.floor-legend-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.floor-legend-swatch--empty { background: rgba(255, 255, 255, 0.92); }
.floor-legend-swatch--open { background: rgba(255, 255, 255, 0.92); }
.floor-legend-swatch--ordered { background: #f0c030; }
.floor-legend-swatch--served { background: #3d8fd9; }
.floor-legend-swatch--pay { background: #5cb87a; }
.floor-legend-swatch--call {
  background: #e03030;
  animation: garson-blink 0.75s ease-in-out infinite;
}
.floor-waiter-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.floor-waiter-filter .chip.active {
  background: var(--accent);
  color: #1a1208;
}

.staff-toasts {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: min(22rem, calc(100vw - 1.5rem));
  pointer-events: none;
}
.staff-toast {
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.25s;
}
.staff-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.staff-toast--call {
  background: rgba(220, 60, 60, 0.92);
  color: #fff;
  border-color: #e03030;
}
.staff-toast--order {
  background: rgba(240, 192, 48, 0.95);
  color: #1a1208;
}
.staff-toast--info,
.staff-toast--status {
  background: rgba(61, 143, 217, 0.92);
  color: #fff;
}
.alert-hint {
  font-size: 0.75rem;
  color: var(--accent-2);
  text-align: center;
  padding: 0.4rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
  background: rgba(200, 149, 108, 0.12);
  cursor: pointer;
  line-height: 1.4;
}
.btn-enable-alerts {
  display: block;
  width: 100%;
  max-width: 20rem;
  margin: 0 auto 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--accent);
  color: #1a1208;
  border: none;
  cursor: pointer;
}
.btn-enable-alerts.hidden,
.alert-hint.hidden {
  display: none;
}
.call-flash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(180, 20, 20, 0.92);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.call-flash.is-active {
  display: flex;
}
.call-flash.is-pulse {
  background: rgba(220, 40, 40, 0.97);
}
.call-flash-inner {
  text-align: center;
  max-width: 20rem;
  color: #fff;
}
.call-flash-count {
  display: inline-block;
  background: #fff;
  color: #b01010;
  font-weight: 800;
  font-size: 1.1rem;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}
.call-flash-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  animation: call-icon-bounce 0.6s ease infinite alternate;
}
.call-flash-msg {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.35;
}
@keyframes call-icon-bounce {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}
body.call-flash-active {
  overflow: hidden;
}

/* Garson waiter — top bar + call banner + table quick actions */
.waiter-page {
  padding-top: max(0.75rem, env(safe-area-inset-top));
}
.waiter-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.waiter-topbar-profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
  text-align: left;
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
  cursor: pointer;
}
.waiter-topbar-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}
.waiter-topbar-identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.waiter-topbar-role {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.waiter-topbar-name {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.waiter-topbar-edit {
  font-size: 0.75rem;
  color: var(--accent-2);
}
.waiter-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.waiter-topbar-link {
  font-size: 0.8rem;
  color: var(--accent-2);
  white-space: nowrap;
}
/* Mobile / app: avoid topbar link + icon overlap (especially manager → garson panel) */
@media (max-width: 640px) {
  .waiter-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .waiter-topbar-profile {
    flex: none;
    width: 100%;
    max-width: 100%;
  }
  .waiter-topbar-actions {
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 1;
    gap: 0.35rem 0.45rem;
    row-gap: 0.4rem;
  }
  .waiter-topbar-link {
    font-size: 0.72rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0.4rem;
    background: rgba(255, 255, 255, 0.06);
    line-height: 1.25;
  }
  .waiter-topbar-actions #btn-mgr-back {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .waiter-topbar-actions #staff-lang-slot {
    margin-left: auto;
  }
  .waiter-topbar-actions .btn-ghost {
    font-size: 0.72rem;
    padding: 0.3rem 0.55rem;
    line-height: 1.25;
    white-space: nowrap;
  }
}
.waiter-page-title {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.call-banner {
  max-width: 48rem;
  margin: 0 auto 0.75rem;
  border-radius: 0.75rem;
  background: rgba(200, 40, 40, 0.2);
  border: 1px solid rgba(232, 60, 60, 0.45);
}
.call-banner--active {
  animation: call-banner-pulse 1.2s ease-in-out infinite;
}
@keyframes call-banner-pulse {
  0%, 100% { border-color: rgba(232, 60, 60, 0.45); }
  50% { border-color: rgba(255, 120, 120, 0.9); }
}
.call-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
}
.call-banner-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.call-banner-text {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 0;
}
.call-banner-isee {
  flex-shrink: 0;
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
}

.waiter-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.waiter-qa-btn {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.65rem 0.5rem;
  border-radius: 0.65rem;
  background: var(--surface-2);
  border: 1px solid rgba(200, 149, 108, 0.35);
  color: var(--text);
  text-align: center;
}
.waiter-qa-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.waiter-qa-btn:active:not(:disabled) {
  background: rgba(200, 149, 108, 0.2);
}
.waiter-qa-btn--free {
  grid-column: 1 / -1;
  color: var(--danger);
  border-color: rgba(232, 60, 60, 0.45);
  background: rgba(220, 60, 60, 0.12);
}
.waiter-qa-btn--free:active {
  background: rgba(220, 60, 60, 0.22);
}
.master-assign-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}
.master-assign-row select {
  flex: 1;
  min-width: 8rem;
  border-radius: 0.65rem;
  padding: 0.5rem 0.65rem;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
}
.master-garson-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.master-garson-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.85rem;
  background: var(--surface-2);
  border: 2px solid transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: start;
  transition: border-color 0.15s, background 0.15s;
}
.master-garson-chip:hover:not(:disabled) {
  border-color: rgba(200, 149, 108, 0.45);
}
.master-garson-chip.active {
  border-color: var(--accent);
  background: rgba(200, 149, 108, 0.15);
}
.master-garson-chip:disabled {
  opacity: 0.6;
  cursor: wait;
}
.master-garson-av {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.12);
}
.master-garson-av--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--muted);
  font-size: 1rem;
}
.master-garson-name {
  flex: 1;
}
.master-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.master-picker-backdrop.hidden {
  display: none;
}
.master-picker.hidden {
  display: none;
}
.master-picker {
  position: relative;
  z-index: 100;
  width: min(18rem, 100%);
  max-height: min(80vh, 24rem);
  padding: 0.85rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  overflow: auto;
}
.master-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.master-picker-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
}
.master-garson-list--compact {
  gap: 0.35rem;
  max-height: 14rem;
  overflow-y: auto;
}
.master-garson-list--compact .master-garson-chip {
  padding: 0.5rem 0.65rem;
  font-size: 0.85rem;
}
.master-garson-list--compact .master-garson-av {
  width: 1.85rem;
  height: 1.85rem;
}
.master-picker-clear {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.4rem;
  font-size: 0.75rem;
  color: var(--danger);
  background: none;
  border: 1px solid rgba(232, 106, 106, 0.35);
  border-radius: 0.5rem;
  cursor: pointer;
}
.master-picker-call {
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--surface);
  background: var(--danger);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}
.master-picker-call:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.master-shift-panel {
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.master-shift-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.65rem;
}
.master-shift-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.master-shift-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem 0.35rem 0.35rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface-2);
  cursor: pointer;
  transition: opacity 0.15s, border-color 0.15s;
}
.master-shift-chip:disabled {
  opacity: 0.6;
  cursor: wait;
}
.master-shift-chip.is-off {
  opacity: 0.55;
}
.master-shift-chip.is-off .master-shift-name {
  color: var(--muted);
}
.master-shift-av {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  object-fit: cover;
}
.master-shift-name {
  font-size: 0.85rem;
  font-weight: 600;
  padding-right: 0.15rem;
  flex: 1;
  min-width: 0;
}
.master-shift-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.master-shift-badge.on {
  background: rgba(72, 187, 120, 0.2);
  color: #68d391;
}
.master-shift-badge.off {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}
.table-tile--pick {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.staff-confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.staff-confirm-dialog.hidden {
  display: none;
}
.staff-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}
.staff-confirm-box {
  position: relative;
  z-index: 1;
  width: min(20rem, 100%);
  padding: 1.25rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.staff-confirm-title {
  font-family: var(--font-display, Fraunces, serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.staff-confirm-body {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}
.staff-confirm-actions {
  display: flex;
  gap: 0.5rem;
}
.staff-confirm-actions button {
  flex: 1;
}
.staff-confirm-ok--danger {
  background: var(--danger) !important;
  color: #fff !important;
}

.staff-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
}
.staff-modal.hidden {
  display: none;
}
@media (min-width: 640px) {
  .staff-modal {
    align-items: center;
  }
}
.staff-modal-panel {
  width: min(24rem, 100%);
  max-height: min(85vh, 36rem);
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.staff-modal-panel--wide {
  width: min(28rem, 100%);
}
.staff-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.staff-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
}
.staff-modal-body {
  padding: 0.85rem 1rem 1rem;
  overflow-y: auto;
}
.waiter-order-card {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.waiter-order-card:last-of-type {
  border-bottom: none;
}
.waiter-order-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.waiter-order-lines {
  list-style: none;
  margin: 0.5rem 0;
  padding: 0;
}
.waiter-order-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.waiter-order-line:last-child {
  border-bottom: none;
}
.waiter-order-line-info {
  flex: 1;
  min-width: 0;
}
.waiter-order-line-meta {
  font-size: 0.75rem;
  color: var(--muted);
}
.waiter-line-locked {
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.55;
}
.btn-line-remove {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(232, 106, 106, 0.35);
  background: rgba(232, 106, 106, 0.1);
  color: var(--danger);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.waiter-menu-cat {
  margin-bottom: 1rem;
}
.waiter-menu-cat-title {
  font-family: var(--font-display, Fraunces, serif);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.waiter-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.35rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface-2);
  cursor: pointer;
}
.waiter-menu-item-name {
  font-size: 0.9rem;
  font-weight: 600;
}
.waiter-menu-item-price {
  font-size: 0.85rem;
  color: var(--accent-2);
  flex-shrink: 0;
}
.waiter-table-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  padding: 0.65rem 0;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.waiter-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.monitor-body {
  min-height: 100vh;
  padding: 1.25rem 1.5rem 2rem;
  background: var(--bg);
}
.monitor-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.monitor-legend {
  max-width: none;
}
.monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.75rem;
}
.monitor-tile {
  aspect-ratio: 1;
  border-radius: 1rem;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.monitor-tile.status-open .monitor-tile-garson,
.monitor-tile.status-open .monitor-tile-meta,
.monitor-tile.status-ordered .monitor-tile-garson,
.monitor-tile.status-ordered .monitor-tile-meta,
.monitor-tile.status-pay .monitor-tile-garson,
.monitor-tile.status-pay .monitor-tile-meta {
  color: inherit;
  opacity: 0.88;
}
.monitor-tile.status-served .monitor-tile-garson,
.monitor-tile.status-served .monitor-tile-meta,
.monitor-tile.status-call .monitor-tile-garson,
.monitor-tile.status-call .monitor-tile-meta {
  color: rgba(255, 255, 255, 0.92);
}
.monitor-tile.status-open .monitor-tile-avatar,
.monitor-tile.status-ordered .monitor-tile-avatar,
.monitor-tile.status-pay .monitor-tile-avatar {
  border-color: rgba(0, 0, 0, 0.12);
}
.monitor-tile.status-served .monitor-tile-avatar,
.monitor-tile.status-call .monitor-tile-avatar {
  border-color: rgba(255, 255, 255, 0.35);
}
.monitor-guests {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.6rem;
  opacity: 0.9;
}
.monitor-tile-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}
.monitor-tile-avatar--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 1rem;
}
.monitor-tile-num {
  font-family: var(--font-display, Fraunces, serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
}
.monitor-tile-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.35rem;
  opacity: 0.9;
}
.monitor-tile-garson {
  font-size: 0.75rem;
  margin-top: 0.35rem;
  color: var(--accent-2);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.monitor-tile-meta {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
.monitor-mix {
  display: block;
  font-size: 0.6rem;
}

.waiter-duty-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}
.waiter-duty-btn {
  flex: 1;
  min-width: 6rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.waiter-duty-btn.active {
  border-color: var(--accent);
  background: rgba(200, 149, 108, 0.15);
}
.waiter-duty-btn--available.active { border-color: #68d391; }
.waiter-duty-btn--rest.active { border-color: #ecc94b; }
.waiter-duty-btn--end.active { border-color: var(--muted); }

.waiter-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface-2);
  color: var(--text);
  max-width: 100%;
}
.waiter-profile-chip:hover { border-color: rgba(200, 149, 108, 0.45); }
.waiter-profile-av {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}
.waiter-profile-edit {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  flex-shrink: 0;
}
#staff-name {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.waiter-profile-photo-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.waiter-profile-photo-row img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.master-duty-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 9999px;
  text-transform: uppercase;
}
.master-duty-badge.available { background: rgba(72, 187, 120, 0.25); color: #68d391; }
.master-duty-badge.rest { background: rgba(236, 201, 75, 0.2); color: #ecc94b; }
.master-shift-list--rows {
  flex-direction: column;
  align-items: stretch;
}
.master-shift-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface-2);
}
.master-shift-row.is-off {
  opacity: 0.65;
}
.master-call-garson {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(232, 106, 106, 0.45);
  background: rgba(232, 106, 106, 0.15);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  margin-left: auto;
}
.master-call-garson:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.master-duty-btns {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}
.master-duty-opt {
  padding: 0.25rem 0.45rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  color: var(--muted);
}
.master-duty-opt:disabled {
  opacity: 0.5;
  cursor: wait;
}
.master-duty-opt.active {
  color: #fff;
  border-color: transparent;
}
.master-duty-opt--available.active {
  background: rgba(72, 187, 120, 0.85);
}
.master-duty-opt--rest.active {
  background: rgba(236, 201, 75, 0.85);
  color: #1a1208;
}
.master-duty-opt--end_shift.active {
  background: rgba(120, 120, 120, 0.85);
}

.floor-section {
  margin-bottom: 1.75rem;
}
.floor-section-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.65rem;
  border-radius: 0.85rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.floor-section-head.is-me {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(200, 149, 108, 0.25);
}
.floor-section-head img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.floor-section-head .floor-section-name {
  font-family: var(--font-display, Fraunces, serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}
.floor-section-head .floor-section-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.floor-section-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .floor-section-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.floor-section-empty {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.5rem 0.25rem;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

.screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(200, 149, 108, 0.18), transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}
.screen-overlay.hidden {
  display: none !important;
  pointer-events: none;
}
.screen-overlay:not(.hidden) {
  z-index: 65;
}
.screen-inner { width: 100%; max-width: 28rem; padding-top: 3rem; }
.screen-inner--welcome {
  padding-top: 0.75rem;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.welcome-service-panel,
.guest-strip {
  margin: 0.2rem 0 0.25rem;
}
.guest-strip--inline {
  margin: 0.15rem 0 0.2rem;
}
.guest-strip--welcome {
  margin-top: 0;
  margin-bottom: 0;
}
.guest-strip-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.guest-strip-input {
  flex: 1;
  min-width: 0;
  height: 1.65rem;
  padding: 0 0.45rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.7rem;
}
.guest-strip-input--mono {
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  margin-top: 0.25rem;
  height: 1.65rem;
}
.guest-strip-icon {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.guest-strip-icon--loyalty {
  color: var(--accent-2);
  font-weight: 800;
  font-size: 0.72rem;
}
.guest-strip-icon--loyalty.is-active,
.guest-strip-icon--loyalty[aria-expanded="true"] {
  background: rgba(200, 149, 108, 0.2);
  border-color: rgba(200, 149, 108, 0.35);
}
.guest-strip-expand {
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.guest-strip-expand.hidden {
  display: none;
}
.guest-strip-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}
.guest-strip-check input {
  width: 0.8rem;
  height: 0.8rem;
  accent-color: var(--accent);
}
.guest-strip-sub {
  display: none;
}
.guest-strip-loyalty-code.hidden {
  display: none;
}
.guest-strip-ok {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--accent-2);
  text-align: center;
  margin-top: 0.2rem;
}
.guest-strip-err {
  font-size: 0.62rem;
  color: var(--danger);
  text-align: center;
  margin-top: 0.2rem;
}
.guest-strip-link {
  display: block;
  text-align: center;
  font-size: 0.58rem;
  color: var(--muted);
  margin-top: 0.25rem;
  text-decoration: underline;
}
.guest-strip--minimal .guest-strip-input {
  display: none;
}
.guest-strip--minimal .guest-strip-row {
  justify-content: flex-end;
  gap: 0.2rem;
}
.guest-strip--minimal.guest-strip--inline {
  margin-top: 0;
  margin-bottom: 0.1rem;
}
.hdr-menu {
  position: relative;
}
.hdr-menu-row {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}
.hdr-menu-table {
  min-width: 0;
  flex: 0 0 auto;
  max-width: 34%;
}
.hdr-menu-guest {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}
.hdr-menu-guest-main {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  justify-content: flex-start;
}
.hdr-menu-actions {
  display: flex;
  align-items: center;
  gap: 0.18rem;
  flex: 0 0 auto;
  margin-left: auto;
}
.hdr-menu-guest.hidden {
  display: none;
}
.hdr-menu-input {
  width: 4.6rem;
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.62rem;
}
.hdr-menu-input.hidden {
  display: none;
}
.hdr-menu-name {
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--accent-2);
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: end;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.hdr-menu-name.hidden {
  display: none;
}
.hdr-menu-icon {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.hdr-menu-icon--loyalty {
  color: var(--accent-2);
  font-weight: 800;
  font-size: 0.68rem;
}
.hdr-menu-icon--loyalty.is-active,
.hdr-menu-icon--loyalty[aria-expanded="true"] {
  background: rgba(200, 149, 108, 0.2);
  border-color: rgba(200, 149, 108, 0.35);
}
.hdr-menu-chips {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 calc(100% - 10px), transparent 100%);
}
.hdr-menu-chips::-webkit-scrollbar {
  display: none;
}
.hdr-menu-chips .chip {
  flex-shrink: 0;
  font-size: 0.58rem;
  line-height: 1.2;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
}
.hdr-menu-chips.hidden {
  display: none;
}
.hdr-menu-guest-main:has(.hdr-menu-chips:not(.hidden)) .hdr-menu-input,
.hdr-menu-guest-main:has(.hdr-menu-chips:not(.hidden)) .hdr-menu-name {
  display: none !important;
}
.hdr-loyalty-popover {
  position: absolute;
  right: 0.65rem;
  top: calc(100% - 0.1rem);
  z-index: 55;
  width: min(14.5rem, calc(100vw - 1.25rem));
  padding: 0.4rem 0.45rem;
  border-radius: 0.55rem;
  background: rgba(18, 16, 14, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}
.hdr-loyalty-popover.hidden {
  display: none;
}
#app-main.jacca-menu > header.glass {
  padding-bottom: 0.35rem;
}
.btn-child-service {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(91, 143, 212, 0.45);
  background: rgba(91, 143, 212, 0.18);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.25;
}
.btn-child-service:hover {
  background: rgba(91, 143, 212, 0.32);
}
.btn-child-service-icon {
  font-size: 1.1rem;
  line-height: 1;
}
#app-service-panel.hidden,
.hdr-menu-guest.hidden {
  display: none;
}
.screen-overlay#screen-welcome {
  align-items: stretch;
  padding: 0.75rem 1rem 1rem;
  overflow: hidden;
}
.welcome-block { flex-shrink: 0; }
.mode-card--compact {
  padding: 0.65rem 0.5rem;
  align-items: center;
  text-align: center;
  gap: 0.15rem;
}
.mode-card--compact .mode-card-title { font-size: 0.85rem; }

.modal-close-btn {
  position: absolute;
  top: 0.25rem;
  right: 0;
  z-index: 15;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close-btn:hover { background: rgba(0, 0, 0, 0.55); }
.item-modal-scroll {
  max-height: calc(85vh - 2.5rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  padding-top: 0.25rem;
}

/* Full product photo in order modal (customer + waiter) — 3px inset */
.item-modal-hero {
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 0.75rem;
  background: #f0ebe6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.item-modal-hero .item-modal-photo {
  width: 100%;
  height: auto;
  max-height: min(72vw, 24rem);
  object-fit: contain;
  object-position: center center;
  display: block;
}
.item-subsheet {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: var(--surface);
  border-radius: inherit;
  padding: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.item-subsheet.hidden { display: none !important; }
#modal-body.item-subsheet-open .item-modal-scroll,
#item-modal-body.item-subsheet-open .item-modal-scroll {
  pointer-events: none;
}
#modal-body:has(.item-modal-scroll),
#item-modal-body:has(.item-modal-scroll) {
  min-height: min(70vh, 36rem);
  position: relative;
  overflow: hidden;
}
#item-modal-body .item-modal-scroll {
  max-height: min(70vh, 36rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.opt-btn .opt-price-total {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-2);
  margin-top: 0.15rem;
}
.opt-btn.active .opt-price-total { color: var(--text); }
.drink-picker-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface-2);
  color: var(--text);
  text-align: start;
}
.drink-picker-btn.has-drinks,
.modifier-picker-btn.has-selection { border-color: rgba(200, 149, 108, 0.45); }
.modifier-picker-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface-2);
  color: var(--text);
  text-align: start;
  cursor: pointer;
}

/* Extras / drinks / removables — grid cards in item modal subsheets */
.mod-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  align-content: start;
}

.mod-option.extra-opt,
.mod-option.drink-opt {
  min-height: 5.25rem;
  padding: 0.35rem 0.35rem 0.45rem;
  gap: 0.3rem;
}

.mod-option.extra-opt .mod-option-img,
.mod-option.extra-opt .mod-option-img--placeholder,
.mod-option.drink-opt .mod-option-img,
.mod-option.drink-opt .mod-option-img--placeholder {
  height: 4.5rem;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 0.4rem;
  object-fit: contain;
  object-position: center center;
  background: #f0ebe6;
}

.mod-option.extra-opt .mod-option-name,
.mod-option.drink-opt .mod-option-name {
  font-size: 0.68rem;
  -webkit-line-clamp: 2;
}

.mod-option.extra-opt .mod-option-price,
.mod-option.drink-opt .mod-option-price {
  font-size: 0.65rem;
}

.mod-option {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  min-height: 7.25rem;
  padding: 0.55rem 0.5rem 0.6rem;
  border-radius: 0.75rem;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: var(--surface-2);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.mod-option:active {
  transform: scale(0.98);
}

.mod-option--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  min-height: 4rem;
  text-align: start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
}

.mod-option--wide .mod-option-body {
  align-items: flex-start;
}

.mod-option--wide .mod-option-img,
.mod-option--wide .mod-option-img--placeholder {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center center;
  background: #f0ebe6;
}

.mod-option-img {
  width: 100%;
  height: 5rem;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 0.55rem;
  object-fit: contain;
  object-position: center center;
  background: #f0ebe6;
}

.mod-option-img.is-hidden {
  display: none;
}

.mod-option-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.mod-option-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.mod-option-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  word-break: break-word;
}

.mod-option-price {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-2);
  line-height: 1.15;
}

.mod-option.is-active {
  border-color: var(--accent);
  background: rgba(200, 149, 108, 0.14);
  box-shadow: inset 0 0 0 1px rgba(200, 149, 108, 0.25);
}

.mod-option.is-active .mod-option-name {
  color: var(--accent-2);
}

.mod-option.removable-opt.is-active {
  border-color: var(--danger);
  background: rgba(232, 106, 106, 0.12);
  box-shadow: inset 0 0 0 1px rgba(232, 106, 106, 0.22);
}

.mod-option.removable-opt.is-active .mod-option-name {
  color: #ffb4b4;
}

@media (min-width: 400px) {
  .mod-option {
    min-height: 7.5rem;
    padding: 0.6rem 0.55rem 0.65rem;
  }

  .mod-option-img {
    height: 5.25rem;
  }

  .mod-option.extra-opt,
  .mod-option.drink-opt {
    min-height: 6.25rem;
  }

  .mod-option.extra-opt .mod-option-img,
  .mod-option.drink-opt .mod-option-img {
    height: 4.75rem;
  }

  .mod-option-name {
    font-size: 0.82rem;
  }
}

.guest-chip-add {
  border-style: dashed;
  opacity: 0.85;
}

.lang-flags {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  max-width: 22rem;
  margin: 0 auto;
}
@media (min-width: 380px) {
  .lang-flags { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 520px) {
  .lang-flags { grid-template-columns: repeat(4, 1fr); max-width: 28rem; }
}
.lang-flag-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 4.5rem;
  min-width: 0;
  padding: 1.1rem 0.75rem;
  border-radius: 1rem;
  border: 2px solid rgba(200, 149, 108, 0.2);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
  z-index: 1;
}
.lang-flag-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.lang-flag-btn .flag-img {
  width: 2.75rem;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.lang-flag-btn .label { font-size: 0.8rem; font-weight: 600; color: var(--accent-2); }

.scan-table-badge {
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(200, 149, 108, 0.25);
}

.lang-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2rem;
  padding: 0.25rem 0.35rem !important;
}
.lang-global-btn {
  position: fixed;
  top: max(0.65rem, env(safe-area-inset-top));
  right: max(0.65rem, env(safe-area-inset-right));
  bottom: auto;
  left: auto;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid rgba(200, 149, 108, 0.35);
  background: rgba(26, 22, 18, 0.92);
  backdrop-filter: blur(12px);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s, transform 0.15s;
}
.lang-global-btn:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}
.flag-img-sm {
  width: 1.5rem;
  height: auto;
  border-radius: 2px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  display: block;
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 2px solid rgba(200, 149, 108, 0.25);
  background: var(--surface);
  cursor: pointer;
  text-align: start;
  width: 100%;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.mode-card:hover, .mode-card.selected {
  border-color: var(--accent);
  background: rgba(200, 149, 108, 0.12);
}
.mode-card-title { font-weight: 700; font-size: 1.05rem; }
.mode-card-hint { font-size: 0.8rem; color: var(--muted); }

.welcome-name-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.35s ease;
}
.welcome-name-panel.is-visible {
  max-height: 8rem;
  opacity: 1;
  margin-bottom: 0.35rem;
}
.welcome-name-panel.hidden { display: block; }
.welcome-name-panel:not(.is-visible) { pointer-events: none; }
.welcome-name-panel.is-visible { pointer-events: auto; }

.table-group-bar {
  background: rgba(232, 184, 74, 0.08);
  border: 1px solid rgba(232, 184, 74, 0.25);
  border-radius: 0.75rem;
  padding: 0.5rem 0.65rem;
}
.table-group-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.35rem;
}
.table-group-names {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.table-group-name {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(200, 149, 108, 0.15);
  border: 1px solid rgba(200, 149, 108, 0.25);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.kitchen-group-names { margin-bottom: 0.25rem; }
.kitchen-guest-block {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.65rem;
}
.kitchen-guest-block:first-of-type {
  border-top: none;
  padding-top: 0;
}
.kitchen-guest-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-2);
  margin: 0 0 0.35rem;
}

html[dir="rtl"] .call-fab { right: auto; left: 1rem; }

.staff-lang-switch {
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface-2);
}
.staff-lang-btn {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.55rem;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
}
.staff-lang-btn.active {
  color: var(--text);
  background: rgba(200, 149, 108, 0.25);
}
.staff-lang-btn:hover:not(.active) {
  color: var(--text);
}

.table-admin-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.table-admin-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.table-admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.table-name-input {
  min-width: 6rem;
  max-width: 10rem;
  border-radius: 0.375rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.875rem;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
}

.survey-star {
  font-size: 2rem;
  line-height: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.15s, color 0.15s, transform 0.15s;
}

.survey-star.active,
.survey-star:hover {
  opacity: 1;
  color: var(--accent-2);
  transform: scale(1.08);
}

/* Garson app — no pinch/zoom on inputs; manual scroll only */
body.waiter-page {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}
body.waiter-page.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}
body.waiter-page input,
body.waiter-page select,
body.waiter-page textarea {
  font-size: 16px !important;
  line-height: 1.25;
}
body.waiter-page #modal {
  overscroll-behavior: contain;
  align-items: flex-start;
  padding-top: max(1rem, env(safe-area-inset-top));
}
body.waiter-page #modal-body {
  max-height: min(88dvh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
body.waiter-page .pay-amount,
body.waiter-page .pay-method,
body.waiter-page .pay-loyalty-code {
  font-size: 16px !important;
}
body.waiter-page .waiter-orders-highlight {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 0.5rem;
}
body.waiter-page .staff-modal {
  overscroll-behavior: contain;
}
body.waiter-page .staff-modal-body {
  max-height: min(80dvh, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Customer menu — Jacca / My Chef layout */
#app-main.jacca-menu {
  --jacca-bg: #0a0a0a;
  --jacca-red: #c41e1e;
  --jacca-white: #ffffff;
  background: var(--jacca-bg);
  color: var(--jacca-white);
}

#app-main.jacca-menu > header.glass {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#app-main.jacca-menu .top-banner,
#app-main.jacca-menu .waiter-picker,
#app-main.jacca-menu #loyalty-bar-app,
#app-main.jacca-menu .name-field-wrap--display {
  background: #141414;
  border-color: rgba(255, 255, 255, 0.1);
}

#app-main.jacca-menu .menu-browse {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 7.25rem);
  z-index: 30;
  background: var(--jacca-bg);
  padding-top: 0.35rem;
}

#app-main.jacca-menu .menu-root-wrap {
  padding-bottom: 1rem;
}

#app-main.jacca-menu .menu-loading-msg {
  padding: 2rem 1rem;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

#app-main.jacca-menu .jacca-cats {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0 0.75rem 0.85rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

#app-main.jacca-menu .jacca-cats::-webkit-scrollbar {
  display: none;
}

#app-main.jacca-menu .jacca-cat {
  flex: 0 0 7.5rem;
  scroll-snap-align: start;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}

#app-main.jacca-menu .jacca-cat-img {
  width: 7.5rem;
  height: 7.5rem;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 0.35rem;
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  background-origin: content-box;
  background-color: #f0ebe6;
  position: relative;
  overflow: hidden;
}

#app-main.jacca-menu .jacca-cat-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 55%);
}

#app-main.jacca-menu .jacca-cat-label {
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.45rem;
  z-index: 1;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

#app-main.jacca-menu .jacca-cat.is-active .jacca-cat-img {
  outline: 2px solid var(--jacca-red);
  outline-offset: 2px;
}

#app-main.jacca-menu .jacca-toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 0 0.75rem 0.85rem;
  align-items: stretch;
}

#app-main.jacca-menu .jacca-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--jacca-white);
  border-radius: 0.35rem;
  padding: 0.65rem 0.75rem;
}

#app-main.jacca-menu .jacca-search-wrap svg {
  flex-shrink: 0;
  opacity: 0.45;
  color: #111;
}

#app-main.jacca-menu .jacca-search {
  border: none;
  outline: none;
  width: 100%;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111;
  background: transparent;
}

#app-main.jacca-menu .jacca-search::placeholder {
  color: #888;
}

#app-main.jacca-menu .jacca-cat-btn {
  flex-shrink: 0;
  border: 1.5px solid var(--jacca-white);
  background: transparent;
  color: var(--jacca-white);
  border-radius: 0.35rem;
  padding: 0 0.85rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

#app-main.jacca-menu .jacca-section {
  margin-bottom: 0.35rem;
}

#app-main.jacca-menu .jacca-section-head {
  background: var(--jacca-red);
  color: var(--jacca-white);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.55rem 0.75rem;
  scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 14rem);
}

#app-main.jacca-menu .jacca-items {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem 0;
}

#app-main.jacca-menu .jacca-item {
  display: flex;
  gap: 0;
  background: var(--jacca-white);
  border-radius: 0.45rem;
  overflow: hidden;
  min-height: 9rem;
  cursor: pointer;
}

#app-main.jacca-menu .jacca-item-img {
  width: 10.5rem;
  min-width: 10.5rem;
  height: 10.5rem;
  min-height: 10.5rem;
  flex-shrink: 0;
  align-self: center;
  padding: 3px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0ebe6;
}

#app-main.jacca-menu .jacca-item-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  display: block;
}

/* Shared food thumbs — manager, admin, inventory (matches customer menu) */
.food-photo-thumb {
  flex-shrink: 0;
  padding: 3px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0ebe6;
  border-radius: 0.65rem;
  overflow: hidden;
}

.food-photo-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.food-photo-thumb--sm {
  width: 2.75rem;
  height: 2.75rem;
}

.food-photo-thumb--md {
  width: 3.5rem;
  height: 3.5rem;
}

.food-photo-thumb--lg {
  width: 4.5rem;
  height: 4.5rem;
}

.food-photo-thumb--ph,
.food-photo-thumb--broken {
  font-size: 1.1rem;
  color: rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.mgr-app-wrap .food-photo-thumb--ph,
.mgr-app-wrap .food-photo-thumb--broken {
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.food-photo-thumb--broken img {
  display: none;
}

#app-main.jacca-menu .jacca-item-body {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.65rem 0.5rem;
  display: flex;
  flex-direction: column;
  color: #111;
}

#app-main.jacca-menu .jacca-item-name {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
}

#app-main.jacca-menu .jacca-item-desc {
  margin: 0;
  flex: 1;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #333;
}

#app-main.jacca-menu .jacca-item-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

#app-main.jacca-menu .jacca-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: #111;
}

#app-main.jacca-menu .jacca-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

#menu-cat-modal.jacca-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

#menu-cat-modal.jacca-modal.hidden {
  display: none;
}

#menu-cat-modal .jacca-modal-panel {
  width: min(24rem, 100%);
  max-height: 70vh;
  overflow-y: auto;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem 1rem 0.5rem 0.5rem;
  padding: 1rem;
}

#menu-cat-modal .jacca-modal-panel h3 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aaa;
}

#menu-cat-modal .jacca-modal-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

#menu-cat-modal .jacca-modal-list button {
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1a1a1a;
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#menu-cat-modal .jacca-modal-close {
  margin-top: 0.75rem;
  width: 100%;
  border: none;
  background: var(--jacca-red);
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.7rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#app-main.jacca-menu > footer.glass,
#app-main.jacca-menu .customer-bottom {
  background: rgba(10, 10, 10, 0.95);
  border-top-color: rgba(255, 255, 255, 0.08);
}
