:root {
  --bg: #f4f6fb;
  --bg-strong: #e8edf7;
  --sidebar: #0b1f4b;
  --sidebar-2: #102a63;
  --primary: #1e4fa8;
  --primary-dark: #163c82;
  --mash-black: #0b1f4b;
  --mash-accent: #ffc20e;
  --mash-accent-hover: #f2b300;
  --mash-coffee: #1e4fa8;
  --mash-caramel: #f7941d;
  --accent: #ffc20e;
  --card: #ffffff;
  --ink: #14213d;
  --muted: #5b6785;
  --border: #dce3f0;
  --success: #168057;
  --warning: #b7791f;
  --danger: #b42318;
  --info: #2563a8;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 45px rgba(20, 33, 61, .10);
  --shadow-sm: 0 10px 24px rgba(20, 33, 61, .07);
  --focus: 0 0 0 4px rgba(255, 194, 14, .30);
}

* { box-sizing: border-box; }
img, video, svg, iframe { max-width: 100%; height: auto; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Tahoma, Arial, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(255, 194, 14, .12), transparent 34rem),
    linear-gradient(180deg, var(--bg), #f8fafe 70%);
  color: var(--ink);
  letter-spacing: 0;
}

button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; transition: .18s ease; }
button:disabled { cursor: not-allowed; opacity: .62; }

h1, h2, h3 { margin: 0; line-height: 1.35; }
h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 800; }

.sub {
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.75;
  font-size: 14px;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(255, 194, 14, .14) 0%, transparent 50%),
    linear-gradient(155deg, #0b1f4b, #0c1c3d);
    
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.login-card {
  width: min(460px, 100%);
  padding: 36px 32px 32px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .70);
  border-top: 3px solid var(--accent);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .32);
  backdrop-filter: blur(16px);
  animation: cardIn .4s cubic-bezier(.22, 1, .36, 1) both;
}

.brand-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}
.brand-logo-full {
  width: 160px;
  height: auto;
  display: block;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: contain;
  display: block;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
}

.field {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

textarea { min-height: 88px; resize: vertical; }
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: unset;
  border: unset;
  border-radius: unset;
  padding: unset;
  background: transparent;
  -webkit-appearance: auto;
  appearance: auto;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--focus);
}

/* ── Password field with an inline show/hide toggle ───────────────────────
   The toggle is overlaid inside the input instead of sitting beside it in a
   flex row. A flex row forced the input to keep its ~20-character automatic
   minimum width, so on narrow phones (iOS especially) the row overflowed and
   the field got clipped. Overlaying keeps the input full width at every size. */
.pw-field {
  position: relative;
  display: block;
}
.pw-field input {
  width: 100%;
  /* Reserve the toggle's footprint so typed text never slides underneath it. */
  padding-inline-end: 66px;
  /* iOS Safari zooms the whole page when a focused input is under 16px. */
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}
.pw-field .pw-toggle {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-strong);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: none;
  /* Kills the 300ms tap delay and the grey flash on iOS. */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pw-field .pw-toggle:active { background: var(--border); }

.login-card .field span {
  color: var(--ink);
  font-size: 12.5px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.login-card .btn {
  width: 100%;
  min-height: 50px;
  font-size: 15px;
  border-radius: 14px;
  margin-top: 6px;
  letter-spacing: .04em;
}

.btn {
  min-height: 44px;
  padding: 0 17px;
  border-radius: 12px;
  background: var(--mash-accent);
  color: #14213d;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(255, 194, 14, .22);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(255, 194, 14, .30); background: var(--mash-accent-hover); }
.btn.secondary { background: var(--card); color: var(--ink); border: 1px solid #d9d0c2; box-shadow: none; }
.btn.warn { background: var(--warning); }
.btn.bad { background: var(--danger); }
.btn.ok { background: var(--success); }
.btn.info { background: var(--info); }
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--border); box-shadow: none; }

.layout, .app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 18px 14px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), transparent 22rem),
    linear-gradient(160deg, var(--sidebar), var(--sidebar-2));
  box-shadow: 12px 0 34px rgba(6, 13, 28, .22);
}

.side-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px 20px;
  border-bottom: 1px solid rgba(255,255,255,.13);
}
.side-head .logo { background: #fff; box-shadow: none; }
.sidebar-toggle {
  display: none;
  margin-right: auto;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 800;
}
.role-badge {
  display: inline-flex;
  margin-top: 7px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(247, 148, 29, .18);
  color: #f7d99b;
  font-size: 12px;
  font-weight: 800;
}

.nav {
  display: grid;
  gap: 7px;
  padding-top: 16px;
}
.nav button {
  width: 100%;
  min-height: 44px;
  text-align: right;
  padding: 10px 12px;
  border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,.76);
  font-weight: 700;
}
.nav button:hover {
  color: #f7f3e8;
  background: rgba(30, 79, 168, .55);
}
.nav button.active {
  color: #0b1f4b;
  background: var(--mash-accent);
  font-weight: 800;
}
.nav button.active {
  box-shadow: inset -4px 0 0 var(--accent);
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar, .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.top-actions, .actions, .toolbar, .surface-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill, .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f5ef;
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}
.pill.warn, .badge.warning { background: #fff4d9; color: var(--warning); }
.pill.bad, .badge.danger { background: #ffe7e3; color: var(--danger); }
.pill.info, .badge.info { background: #eaf1ff; color: var(--info); }
.badge.success { background: #e8f5ef; color: var(--success); }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel, .data-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.welcome-panel {
  min-height: 150px;
  display: grid;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(30, 79, 168,.07), rgba(247, 148, 29,.10)),
    #fff;
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 148px;
  display: grid;
  gap: 8px;
  align-content: space-between;
}
.stat-card::after {
  content: "";
  position: absolute;
  inset: auto auto -35px -35px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(247, 148, 29,.10);
}
.stat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f2eadf;
  color: var(--primary);
  font-weight: 900;
}
.stat strong { font-size: 28px; font-weight: 900; }
.stat span { color: var(--muted); font-size: 13px; }

.pos {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 440px);
  gap: 16px;
  align-items: start;
}

.seg {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.seg button {
  min-height: 42px;
  padding: 0 14px;
  background: transparent;
  border-left: 1px solid var(--border);
  font-weight: 800;
  color: var(--muted);
}
.seg button:last-child { border-left: 0; }
.seg button.active { background: var(--primary); color: #fff; }

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f4eee5;
  color: var(--muted);
  font-weight: 800;
}
.chip.active, .chip:hover { background: var(--primary); color: #fff; }

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 12px;
}
.product {
  min-height: 130px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  text-align: right;
  display: grid;
  align-content: space-between;
  gap: 10px;
  box-shadow: 0 8px 18px rgba(20, 33, 61,.045);
}
.product:hover { transform: translateY(-2px); border-color: rgba(247, 148, 29,.75); box-shadow: var(--shadow-sm); }
.product b { font-size: 16px; }
.product span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.product strong { color: var(--primary); font-size: 18px; }

.menu-products-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.page-hero.compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f7efe4);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.page-hero.compact h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.page-hero.compact p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 10px;
}

.menu-product-form-card,
.menu-products-list-panel {
  overflow: hidden;
}

.menu-product-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.menu-product-fields,
.menu-product-fields .grid {
  min-width: 0;
}

.tight-grid {
  gap: 12px;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfaf7;
  color: var(--ink);
  font-weight: 800;
}

.toggle-line input {
  width: 18px;
  height: 18px;
  min-height: auto;
  accent-color: var(--primary);
}

.field small {
  color: var(--muted);
  line-height: 1.6;
}

.form-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.menu-product-image-uploader {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.menu-image-preview {
  aspect-ratio: 1 / 1;
  width: 100%;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(247, 148, 29,.6);
  border-radius: 14px;
  background: #fffaf1;
  color: var(--muted);
  overflow: hidden;
  min-width: 0;
}

.menu-image-preview.has-image {
  border-style: solid;
  background: #fff;
}

.menu-image-preview img,
.menu-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.upload-button {
  position: relative;
  overflow: hidden;
  justify-content: center;
}

.upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.menu-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  min-width: 0;
}

.menu-product-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  box-shadow: 0 8px 18px rgba(20, 33, 61,.045);
  min-width: 0;
}

.menu-product-card.is-hidden {
  background: #fbfaf7;
}

.menu-product-image {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #f4eee5;
  min-width: 0;
}

.menu-product-image.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
  padding: 10px;
}

.menu-product-content {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.menu-product-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.menu-product-title-row b {
  display: block;
  font-size: 18px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.menu-product-title-row span,
.menu-product-meta,
.menu-product-content p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.menu-product-title-row strong {
  color: var(--primary);
  font-size: 20px;
  white-space: nowrap;
}

.menu-product-content p {
  margin: 0;
}

.menu-product-badges,
.menu-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.badge.warn {
  background: #fff4d9;
  color: var(--warning);
}

.qr-image-warning {
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff4d9;
  color: var(--warning);
  font-size: 12px;
  font-weight: 800;
}

.menu-products-empty {
  margin-top: 12px;
}

.customer-qr-menu-page {
  direction: rtl;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  background: #faf7f1;
  color: #1f2933;
  padding: 16px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.admin-menu-products-page *,
.customer-qr-menu-page * {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  white-space: normal;
  box-sizing: border-box;
}

.customer-qr-menu-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.customer-qr-menu-header {
  width: 100%;
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--mash-black), #163c82);
  color: white;
}

.customer-qr-menu-header h1,
.customer-qr-menu-header h2,
.customer-qr-menu-header p {
  margin: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.customer-qr-menu-search {
  width: 100%;
  margin: 16px 0;
}

.customer-qr-menu-search input {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid #e5dccf;
  padding: 0 16px;
  font-size: 16px;
}

.customer-qr-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 20px;
  width: 100%;
}

.customer-qr-category-chip {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: #eee7dc;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.customer-qr-category-chip.active {
  background: var(--mash-coffee);
  color: white;
}

.customer-qr-products-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  align-items: stretch;
}

.customer-qr-product-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: white;
  border: 1px solid #eadfce;
  box-shadow: 0 10px 30px rgba(30, 79, 168, 0.08);
}

.customer-qr-product-image,
.customer-qr-product-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 160px;
  object-fit: cover;
  background: #f0ebe3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #746b5f;
  font-weight: 800;
  text-align: center;
}

.customer-qr-product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.customer-qr-product-title {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 900;
  color: #14213d;
  margin: 0;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  min-width: 0;
}

.customer-qr-product-description,
.customer-qr-product-category {
  font-size: 14px;
  line-height: 1.6;
  color: #5b6785;
  margin: 0;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

.customer-qr-product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-qr-product-price {
  font-size: 20px;
  font-weight: 900;
  color: var(--mash-coffee);
  white-space: nowrap;
}

.customer-qr-add-button {
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  background: var(--mash-coffee);
  color: white;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .customer-qr-menu-page {
    padding: 12px;
  }

  .customer-qr-products-grid {
    grid-template-columns: 1fr !important;
  }

  .customer-qr-menu-header {
    padding: 16px;
    border-radius: 20px;
  }

  .customer-qr-product-title {
    font-size: 17px;
  }

  .customer-qr-product-price {
    font-size: 19px;
  }
}

.customer-qr-cart {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.qr-cart-line {
  display: grid;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   PUBLIC CUSTOMER MENU — premium layout
   ═══════════════════════════════════════════════════════════════ */

.customer-menu-page {
  direction: rtl;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--menu-bg, #0a1a3f);
  color: #f4f6fb;
  padding: 16px 16px 92px;
  font-family: var(--menu-font, inherit);
}

.customer-menu-page * {
  box-sizing: border-box;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: normal !important;
  overflow-wrap: anywhere;
}

.customer-menu-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.customer-menu-loading,
.customer-menu-error,
.customer-menu-empty {
  min-height: 200px;
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
  background: #12295c;
  border: 1px solid rgba(255, 194, 14, 0.18);
  border-radius: 20px;
  padding: 24px;
}

.customer-menu-error.inline {
  min-height: auto;
  display: block;
  margin-bottom: 14px;
  color: #FCA5A5;
  background: rgba(153, 27, 27, 0.2);
  border: 1px solid #7F1D1D;
  border-radius: 14px;
  padding: 12px 16px;
}

/* ── Hero ──────────────────────────────────────────────────── */
.customer-menu-hero {
  display: grid;
  grid-template-columns: 1fr 176px;
  gap: 20px;
  align-items: center;
  border-radius: 24px;
  padding: 18px 24px 20px;
  color: #fff;
  background: var(--menu-primary, linear-gradient(160deg, #0e2047 0%, #0a1a3f 65%, #0a1734 100%));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}

.customer-menu-hero::before {
  content: "";
  position: absolute;
  top: -55px;
  left: -55px;
  width: 150px;
  height: 150px;
  border: 26px solid rgba(255, 194, 14, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

.customer-menu-hero::after {
  content: "";
  position: absolute;
  bottom: -30px;
  left: 60px;
  width: 80px;
  height: 80px;
  border: 16px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.customer-menu-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.customer-menu-hero-title {
  margin: 0 0 5px;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 900;
  line-height: 1.15;
  color: var(--menu-hero-text, #fff);
}

.customer-menu-hero-sub {
  margin: 0 0 4px;
  font-size: clamp(13px, 1.8vw, 16px);
  color: var(--menu-hero-text, #ffe4bd);
  font-weight: 700;
  opacity: 0.92;
}

.customer-menu-hero-desc {
  margin: 0 0 10px;
  font-size: clamp(11px, 1.4vw, 13px);
  color: var(--menu-hero-text, rgba(255, 255, 255, 0.72));
  font-weight: 500;
  line-height: 1.5;
  opacity: 0.82;
}

.customer-menu-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255,255,255,0.13);
  color: #fff4df;
  border: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 9px;
  letter-spacing: 0.3px;
}

.customer-menu-table-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 900;
  background: var(--menu-accent, #ffc20e);
  color: #0a1a3f;
  border: none;
  font-size: 13px;
  margin-top: 4px;
}

.customer-menu-hero-cta {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 800;
  background: var(--menu-accent, #ffc20e);
  color: #0a1a3f;
  font-size: 13px;
  border: none;
  margin-top: 4px;
  letter-spacing: 0.2px;
}

.customer-menu-hero-mark {
  position: relative;
  z-index: 1;
  width: 176px;
  height: 148px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #0a1a3f;
  border: 2px solid rgba(255, 194, 14, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(255, 194, 14, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  overflow: hidden;
  padding: 10px;
}

.customer-menu-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Search ────────────────────────────────────────────────── */
.customer-search-wrap {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-filter-toggle {
  position: relative;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  border: 1.5px solid #1b3a7a;
  background: var(--menu-filter-icon-bg, #12295c);
  color: var(--menu-filter-icon, #c9d3ea);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.customer-filter-toggle:hover {
  border-color: var(--menu-filter-icon-active, #ffc20e);
}
.customer-filter-toggle.open,
.customer-filter-toggle.has-filter {
  color: var(--menu-filter-icon-active, #ffc20e);
  border-color: var(--menu-filter-icon-active, #ffc20e);
}
.customer-filter-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--menu-filter-icon-active, #ffc20e);
  box-shadow: 0 0 0 2px #12295c;
}

.customer-search-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 50px;
  border: 1.5px solid #1b3a7a;
  border-radius: 16px;
  background: var(--menu-search-bg, #12295c);
  color: var(--menu-search-text, #f4f6fb);
  padding: 0 18px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.customer-search-input:focus {
  border-color: #ffc20e;
  box-shadow: 0 0 0 3px rgba(255, 194, 14, 0.18);
}

.customer-search-input::placeholder { color: #7A6C58; }

/* ── Category chips ────────────────────────────────────────── */
.customer-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 2px 10px;
}

.customer-chip {
  flex: 0 0 auto;
  border: 1.5px solid #1b3a7a;
  border-radius: 999px;
  background: #12295c;
  color: #c9d3ea;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.customer-chip.active,
.customer-chip:hover {
  background: var(--menu-accent, #ffc20e);
  border-color: var(--menu-accent, #ffc20e);
  color: #0a1a3f;
}

/* ── Offers section ────────────────────────────────────────── */
.customer-offers-section {
  margin: 0 auto 16px;
  max-width: 720px;
  background: linear-gradient(160deg, #0d1d41 0%, #081329 100%);
  border: 1px solid #1b3a7a;
  border-radius: 22px;
  padding: 18px 18px 20px;
}

.customer-offers-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}

.customer-offers-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: var(--menu-accent, #ffc20e);
}

.customer-offers-sub {
  margin: 0;
  font-size: 13px;
  color: #8d9bbd;
}

.customer-offers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* ── Featured offer (single offer — full-width horizontal layout) ── */
.customer-featured-offer {
  display: grid;
  grid-template-columns: 1fr 200px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(160deg, #0f224b 0%, #0e2352 100%);
  border: 1px solid #1b3a7a;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  min-height: 160px;
}

.customer-featured-offer-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-featured-offer-badge {
  display: inline-block;
  background: var(--menu-accent, #ffc20e);
  color: #0a1a3f;
  font-size: 11px;
  font-weight: 900;
  border-radius: 999px;
  padding: 4px 12px;
  letter-spacing: 0.3px;
  align-self: flex-start;
}

.customer-featured-offer-title {
  margin: 0;
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 900;
  color: #f4f6fb;
  line-height: 1.25;
}

.customer-featured-offer-items {
  margin: 0;
  font-size: 13px;
  color: #8d9bbd;
}

.customer-featured-offer-prices {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.customer-featured-offer-prices .customer-offer-price {
  font-size: 22px;
}

.customer-featured-offer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--menu-button, #ffc20e);
  color: var(--menu-button-text, #0a1a3f);
  border: none;
  border-radius: 14px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  height: 44px;
  margin-top: auto;
  transition: background .15s;
  font-family: inherit;
}

.customer-featured-offer-btn:hover { background: #B1855C; }

.customer-featured-offer-img {
  position: relative;
  overflow: hidden;
}

.customer-featured-offer-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.customer-offer-card {
  display: flex;
  flex-direction: row;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, #0f224b 0%, #0e2352 100%);
  border: 1px solid #1b3a7a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.2s;
  min-height: 140px;
}

.customer-offer-card:hover {
  box-shadow: 0 8px 28px rgba(255, 194, 14, 0.22);
}

.customer-offer-img-wrap {
  position: relative;
  width: 35%;
  flex-shrink: 0;
  overflow: hidden;
}

.customer-offer-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.customer-offer-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #16316d 0%, #1b3a7a 60%, #2a5fd3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.customer-offer-img-placeholder span {
  font-size: 48px;
  font-weight: 900;
  color: rgba(255, 194, 14, 0.65);
}

.customer-offer-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--menu-accent, #ffc20e);
  color: #0a1a3f;
  font-size: 11px;
  font-weight: 900;
  border-radius: 999px;
  padding: 4px 10px;
  letter-spacing: 0.4px;
}

.customer-offer-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.customer-offer-title {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: #f4f6fb;
  line-height: 1.3;
}

.customer-offer-products {
  margin: 0;
  font-size: 12px;
  color: #8d9bbd;
  line-height: 1.4;
}

.customer-offer-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.customer-offer-original {
  text-decoration: line-through;
  color: #8A7C66;
  font-size: 13px;
}

.customer-offer-price {
  font-size: 20px;
  font-weight: 900;
  color: var(--menu-accent, #ffc20e);
}

.customer-offer-savings {
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 9px;
}

/* ── Product section header ────────────────────────────────── */
.customer-product-section-header {
  margin-bottom: 12px;
}

.customer-product-section-title {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 900;
  color: var(--menu-accent, #ffc20e);
}

.customer-product-section-sub {
  margin: 0;
  font-size: 13px;
  color: #8d9bbd;
}

/* ── Product grid ──────────────────────────────────────────── */
.customer-menu-layout {
  display: grid;
  gap: 18px;
}

.customer-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  min-width: 0;
}

/* ── Product card ──────────────────────────────────────────── */
.customer-product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: var(--menu-card, #12295c);
  border: 1px solid #173474;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.2s, transform 0.15s;
}

@media (hover: hover) {
  .customer-product-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
    transform: translateY(-2px);
  }
}

.customer-product-img-wrap {
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: #09142c;
  flex-shrink: 0;
}

.customer-product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.customer-product-img-placeholder {
  width: 100%;
  height: 140px;
  background: linear-gradient(145deg, #0f224b 0%, #0a1734 50%, #071125 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
}

.customer-product-img-placeholder span {
  font-size: 36px;
  font-weight: 900;
  color: #ffc20e;
  opacity: 0.55;
  line-height: 1;
}

/* Emoji placeholder — shown instead of a letter initial */
.cpm-emoji {
  font-size: 34px !important;
  font-weight: normal !important;
  opacity: 0.6 !important;
  line-height: 1 !important;
  color: inherit !important;
}

.customer-product-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.customer-product-cat-badge {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(255, 194, 14, 0.15);
  color: #ffc20e;
  font-size: 11px;
  font-weight: 800;
}

.customer-product-name {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: var(--menu-text, #f4f6fb);
  line-height: 1.3;
}

/* Holds whichever of name/nameAr is NOT the primary line above — the primary
   line prefers the Arabic name when the product has one. */
.customer-product-name-secondary {
  display: block;
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--menu-muted, #8d9bbd);
  line-height: 1.35;
}

.customer-product-desc {
  margin: 0;
  font-size: 12px;
  color: #8d9bbd;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.customer-product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
}

.customer-product-price {
  color: var(--menu-accent, #ffc20e);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Add buttons ───────────────────────────────────────────── */
.customer-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: 8px 14px;
  background: var(--menu-button, #ffc20e);
  color: var(--menu-button-text, #0a1a3f);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  min-width: 80px;
  height: 38px;
  flex-shrink: 0;
  line-height: 1;
  transition: background 0.15s;
}

.customer-add-btn:hover { background: #B1855C; }
.customer-add-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Product-card qty controls (replaces Add button once item is in cart) ── */
.cpm-qty-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: rgba(22, 101, 52, 0.2);
  border: 1.5px solid #166534;
  border-radius: 999px;
  overflow: hidden;
  height: 34px;
}
.cpm-qty-btn {
  width: 32px;
  height: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  color: #4ADE80;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
  flex-shrink: 0;
  line-height: 1;
}
.cpm-qty-btn:hover { background: rgba(22, 101, 52, 0.35); }
.cpm-qty-num {
  min-width: 24px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  color: #4ADE80;
  padding: 0 2px;
}

.customer-add-btn.secondary-btn {
  background: #e0a800;
  color: #ffffff;
}

.customer-add-btn.secondary-btn:hover { background: #3d8aff; }

.offer-add-btn {
  width: 100%;
  margin-top: auto;
  height: 42px;
  font-size: 13px;
  border-radius: 14px;
}

/* Keep old class as alias so QR cart panel buttons still work */
.customer-menu-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: 8px 14px;
  background: #ffc20e;
  color: #0a1a3f;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  min-width: 80px;
  height: 38px;
  flex-shrink: 0;
  line-height: 1;
}

.customer-menu-add-button.secondary { background: #e0a800; color: #ffffff; }
.customer-menu-add-button.wide { width: 100%; height: 46px; }
.customer-menu-add-button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Card image size variants ────────────────────────────────── */
.cpc-img-large  { height: 200px !important; }
.cpc-img-medium { height: 140px !important; }

/* ── Card style: image-focus ─────────────────────────────────── */
.cpc-image-focus .customer-product-body { padding: 8px 12px 10px; gap: 4px; }
.cpc-image-focus .customer-product-desc { display: none; }

/* ── Card style: compact ─────────────────────────────────────── */
.cpc-compact .customer-product-img-wrap,
.cpc-compact .customer-product-img-placeholder { height: 110px !important; }
.cpc-compact .customer-product-body { padding: 8px 10px 10px; gap: 4px; }
.cpc-compact .customer-product-name { font-size: 13px; }
.cpc-compact .customer-product-desc { -webkit-line-clamp: 1; }

/* ── Card name + image as clickable ──────────────────────────── */
.cpc-name-link {
  cursor: pointer;
  touch-action: manipulation;
}
.cpc-name-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--menu-accent, #ffc20e);
  text-underline-offset: 2px;
}
.customer-product-img-wrap[data-action],
.customer-product-img-placeholder[data-action] {
  cursor: pointer;
  touch-action: manipulation;
}
.customer-product-img-wrap[data-action] img { transition: transform .2s; }
.customer-product-img-wrap[data-action]:hover img { transform: scale(1.05); }

/* ── Product Detail Panel ────────────────────────────────────── */
/* ══ Product Detail Popup ═══════════════════════════════════════ */
.menu-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(10, 22, 20, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  touch-action: manipulation;
}

/* ── shared panel base ── */
.menu-detail-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--menu-popup-bg, #12295c);
  font-family: var(--menu-font, inherit);
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.26),
    0 8px 24px rgba(0, 0, 0, 0.14);
  max-height: 88vh;
  animation: menuDetailPopIn .22s cubic-bezier(0.34, 1.12, 0.64, 1);
}

@keyframes menuDetailPopIn {
  from { transform: scale(0.88) translateY(12px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

/* ── top layout: image on top, content below ── */
.menu-detail-panel.detail-top {
  width: min(440px, 100%);
}
.menu-detail-panel.detail-top .menu-detail-img-wrap { height: 250px; }

/* ── side layout: image left + content right on desktop ── */
.menu-detail-panel.detail-side {
  width: min(440px, 100%);
  flex-direction: column;
}
.menu-detail-panel.detail-side .menu-detail-img-wrap { height: 250px; }

@media (min-width: 680px) {
  .menu-detail-panel.detail-side {
    flex-direction: row;
    width: min(720px, 94vw);
    max-height: 82vh;
    overflow: hidden;
  }
  .menu-detail-panel.detail-side .menu-detail-img-wrap {
    width: 48%;
    height: auto;
    min-height: 100%;
    flex-shrink: 0;
  }
  .menu-detail-panel.detail-side .menu-detail-img-wrap .menu-detail-img {
    height: 100%;
    object-fit: cover;
  }
  .menu-detail-panel.detail-side .menu-detail-body {
    overflow-y: auto;
  }
}

/* ── image wrapper ── */
.menu-detail-img-wrap {
  width: 100%;
  overflow: hidden;
  background: linear-gradient(145deg, #0f224b 0%, #0a1734 100%);
  flex-shrink: 0;
  position: relative;
}

.menu-detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.menu-detail-img-wrap.menu-detail-img-error,
.menu-detail-img-placeholder {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
}

/* ── gradient overlay on image (fades into content) ── */
.menu-detail-img-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(5, 11, 25, 0.35), transparent);
  pointer-events: none;
}

/* ── content body ── */
.menu-detail-body {
  padding: 22px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  direction: rtl;
  overflow-y: auto;
  flex: 1;
}

.menu-detail-name {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 900;
  color: var(--menu-popup-title, var(--menu-accent, #ffc20e));
  line-height: 1.25;
}

.menu-detail-name-secondary {
  display: block;
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--menu-popup-desc, #8d9bbd);
  line-height: 1.3;
}

.menu-detail-desc {
  margin: 0;
  font-size: 14px;
  color: var(--menu-popup-desc, #c9d3ea);
  line-height: 1.75;
  white-space: pre-line;
}

/* ── price + action row ── */
.menu-detail-footer {
  margin-top: 8px;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-detail-price {
  font-size: 24px;
  font-weight: 900;
  color: var(--menu-popup-price, var(--menu-accent, #ffc20e));
  letter-spacing: -0.3px;
}

.menu-detail-add-btn {
  height: 46px;
  padding: 0 26px;
  font-size: 15px;
  border-radius: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

.menu-detail-qty-ctrl { height: 42px; border-radius: 999px; }
.menu-detail-qty-ctrl .cpm-qty-btn { width: 40px; height: 42px; font-size: 20px; }
.menu-detail-qty-ctrl .cpm-qty-num { font-size: 16px; min-width: 30px; }

.menu-detail-cat {
  display: inline-block;
  margin-bottom: 4px;
}
.menu-detail-no-desc {
  opacity: 0.38;
  font-style: italic;
}

/* ── no-image layout: a typographic card with no picture. Used for the
   brochure / classic menu, or when "صورة صفحة التفاصيل" is set to "بدون صورة". ── */
.menu-detail-panel.detail-noimg {
  width: min(400px, 100%);
}
.menu-detail-body-noimg {
  /* generous top padding so the first line clears the corner close button */
  padding: 50px 26px 26px;
  gap: 14px;
}
.menu-detail-noimg-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.menu-detail-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--menu-popup-price, var(--menu-accent, #ffc20e));
  opacity: 0.85;
}
.menu-detail-body-noimg .menu-detail-name {
  font-size: 24px;
}
.menu-detail-rule {
  width: 44px;
  height: 3px;
  border-radius: 3px;
  margin-top: 4px;
  background: var(--menu-popup-price, var(--menu-accent, #ffc20e));
}
.menu-detail-body-noimg .menu-detail-desc {
  font-size: 14.5px;
}

/* ── close button (top-right corner of popup) ── */
.menu-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(11, 25, 55, 0.9);
  color: #f4f6fb;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  transition: background .15s, transform .15s;
  line-height: 1;
}
.menu-detail-close:hover {
  background: #173474;
  transform: scale(1.1);
}

/* ── mobile: bottom sheet ── */
@media (max-width: 540px) {
  .menu-detail-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .menu-detail-panel,
  .menu-detail-panel.detail-top,
  .menu-detail-panel.detail-side,
  .menu-detail-panel.detail-noimg {
    width: 100%;
    max-height: 91dvh;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 50px rgba(0, 0, 0, 0.22);
    animation: menuDetailSheetUp .24s cubic-bezier(0.34, 1.08, 0.64, 1);
    flex-direction: column;
  }
  .menu-detail-panel .menu-detail-img-wrap,
  .menu-detail-panel.detail-side .menu-detail-img-wrap {
    height: 220px !important;
    width: 100%;
    min-height: unset;
  }
  .menu-detail-panel.detail-side .menu-detail-body { overflow-y: auto; }
  .menu-detail-close { top: 10px; right: 10px; }
}

@keyframes menuDetailSheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
/* skip animation on re-renders while popup stays open */
.menu-detail-panel.no-anim { animation: none !important; }

/* ── Branding settings card option rows ──────────────────────── */
.branding-card-options {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.branding-card-opt-group { display: flex; flex-direction: column; gap: 6px; }
.branding-radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.branding-radio-opt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1.5px solid #e4d8c6;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.branding-radio-opt:has(input:checked) { border-color: var(--mash-coffee); background: #f7f1e2; }
.branding-radio-opt input { margin: 0; accent-color: var(--mash-coffee); }
.branding-radio-opt small { font-size: 11px; color: #9ca3af; font-weight: 400; }

/* ── Settings section divider & subtitle ─────────────────────── */
.branding-section-divider {
  height: 1px;
  background: linear-gradient(to right, #e4d8c6, transparent);
  margin: 20px 0 18px;
}
.branding-subsection-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--mash-coffee);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

/* ── Font picker grid ────────────────────────────────────────── */
.branding-font-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.branding-font-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border: 2px solid #e4d8c6;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  min-width: 86px;
  transition: border-color .15s, background .15s, box-shadow .15s;
  user-select: none;
}
.branding-font-opt input[type="radio"] { display: none; }
.branding-font-opt.selected,
.branding-font-opt:has(input:checked) {
  border-color: var(--mash-coffee);
  background: #f7f1e2;
  box-shadow: 0 0 0 3px rgba(30, 79, 168, 0.10);
}
.branding-font-preview {
  font-size: 24px;
  font-weight: 700;
  color: var(--mash-coffee);
  line-height: 1;
  display: block;
}
.branding-font-name {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  white-space: nowrap;
}

/* ── QR cart drawer ─────────────────────────────────────────── */
.customer-menu-cart {
  position: sticky;
  top: 16px;
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: #12295c;
  border: 1px solid #173474;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.customer-menu-cart.drawer {
  position: static;
  width: min(94vw, 440px);
  max-height: 86vh;
  overflow-y: auto;
}

.customer-menu-cart-head,
.customer-menu-cart-line,
.customer-menu-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-menu-cart-head h2 { margin: 0; }

.customer-menu-cart-line {
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid #173474;
}

.customer-menu-cart-line b,
.customer-menu-cart-line span { display: block; }

.customer-menu-cart-line span,
.customer-menu-muted { color: #8d9bbd; }

.qr-cart-offer-preview {
  font-size: 11px;
  color: #8A7C66;
  display: block;
  margin-top: 1px;
}

.customer-menu-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.customer-menu-icon-button {
  border: 1px solid #173474;
  border-radius: 10px;
  background: #0f224b;
  color: #ffc20e;
  min-width: 32px;
  height: 32px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.customer-menu-note-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #173474;
  border-radius: 12px;
  padding: 0 12px;
  background: #09142c;
  color: #f4f6fb;
}

/* ─── legacy totals (kept for backward compat) ─────────────── */
.customer-menu-cart-total {
  padding: 10px 12px;
  border-radius: 14px;
  background: #0f224b;
}
.customer-menu-cart-total b { color: #ffc20e; font-size: 20px; }

/* ═══════════════════════════════════════════════════════════════
   QCB — fixed bottom cart bar (works on all screen sizes + Electron)
   ═══════════════════════════════════════════════════════════════ */
.qcb {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px;
  background: #0e2352;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}
.qcb-failed { background: rgba(255,243,224,.98); border-top: 1.5px solid #ffcc80; justify-content: space-between; box-shadow: 0 -4px 20px rgba(180,83,9,.15); }
.qcb-expired { background: rgba(255,235,238,.98); border-top: 1.5px solid #ef9a9a; justify-content: center; box-shadow: 0 -4px 20px rgba(183,28,28,.12); }

.qcb-status-text { font-weight: 700; font-size: 14px; color: #b45309; }
.qcb-expired .qcb-status-text { color: #b71c1c; }

.qcb-left { display: flex; align-items: center; gap: 12px; }

.qcb-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffc20e;
  color: #0a1a3f;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 194, 14, 0.35);
}
.qcb-text { display: flex; flex-direction: column; gap: 1px; }
.qcb-label { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.75); }
.qcb-total { font-size: 20px; font-weight: 900; color: #fff; }

.qcb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border: none;
  border-radius: 14px;
  background: #ffc20e;
  color: #0a1a3f;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s, transform .12s;
  box-shadow: 0 2px 10px rgba(255, 194, 14, 0.35);
}
.qcb-btn:hover { background: #B1855C; transform: translateY(-1px); }
.qcb-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.qcb-failed .qcb-btn { background: #b45309; }

/* ─── backward-compat alias ─────────────────────────────────── */
.customer-menu-mobile-cart-bar { display: none; }

body.cart-modal-open {
  overflow: hidden;
}

.customer-menu-cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 20, 30, 0.55);
  backdrop-filter: blur(4px);
}

/* ═══════════════════════════════════════════════════════════════
   QR DRAWER — centered modal
   ═══════════════════════════════════════════════════════════════ */
.qr-drawer {
  display: flex;
  flex-direction: column;
  background: #12295c;
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
}
.qr-drawer.is-drawer {
  width: min(100%, 480px);
  max-height: 90vh;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(10,20,30,.28);
}

.qr-drawer-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  min-height: 0;
}

.qr-drawer-footer {
  flex-shrink: 0;
  background: #12295c;
  border-top: 1px solid #173474;
  padding: 10px 16px 16px;
}

.qr-drawer-handle {
  display: none;
  width: 44px;
  height: 4px;
  background: #2c64dd;
  border-radius: 2px;
  margin: 14px auto 6px;
  flex-shrink: 0;
}

.qr-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #173474;
  position: sticky;
  top: 0;
  background: #0e2352;
  z-index: 2;
  border-radius: 20px 20px 0 0;
}
.qr-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}
.qr-drawer-count {
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}
.qr-drawer-close {
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
  flex-shrink: 0;
}
.qr-drawer-close:hover { background: rgba(255,255,255,0.25); }

/* Alert banners inside drawer */
.qr-drawer-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 16px 4px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
}
.qr-drawer-alert > span:first-child { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.qr-drawer-alert b { display: block; font-weight: 700; font-size: 14px; }
.qr-drawer-alert p { margin: 3px 0 0; color: #8d9bbd; font-size: 12px; }
.qr-drawer-alert-expired { background: #fff1f1; }
.qr-drawer-alert-expired b { color: #b91c1c; }
.qr-drawer-alert-failed { background: #fffbeb; flex-wrap: wrap; }
.qr-drawer-alert-failed b { color: #b45309; }

/* Items list */
.qr-drawer-items { padding: 4px 16px 8px; }

.qr-drawer-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 16px;
  color: #8A7C66;
  text-align: center;
}
.qr-drawer-empty span { font-size: 38px; }
.qr-drawer-empty p { font-size: 14px; margin: 0; }

/* Cart line */
.qr-cart-line {
  padding: 14px 0;
  border-bottom: 1px solid #173474;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qr-cart-line:last-child { border-bottom: none; }

.qr-cart-line-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.qr-cart-line-info { flex: 1; min-width: 0; }
.qr-cart-line-name { display: block; font-size: 15px; font-weight: 700; color: #f4f6fb; margin-bottom: 2px; }
.qr-cart-line-sub { display: block; font-size: 11px; color: #8A7C66; }
.qr-cart-line-unit { display: block; font-size: 12px; color: #8A7C66; margin-top: 3px; }

.qr-cart-line-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.qr-cart-line-total { font-size: 16px; font-weight: 900; color: #ffc20e; }

.qr-cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #166534;
  border-radius: 999px;
  background: rgba(22, 101, 52, 0.2);
  overflow: hidden;
  height: 36px;
}
.qr-cart-qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  color: #4ADE80;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
  line-height: 1;
}
.qr-cart-qty-btn:hover { background: rgba(22, 101, 52, 0.35); }
.qr-cart-qty-num {
  min-width: 30px;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  color: #4ADE80;
}

.qr-cart-note {
  width: 100%;
  min-height: 36px;
  border: 1px solid #1b3a7a;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  color: #f4f6fb;
  background: #09142c;
  outline: none;
  transition: border-color .15s, background .15s;
}
.qr-cart-note:focus { border-color: #ffc20e; background: #12295c; }
.qr-cart-note::placeholder { color: #7A6C58; }

/* Totals block */
.qr-drawer-totals {
  margin: 4px 16px 12px;
  background: linear-gradient(135deg, #0f224b, #0a1734);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #1b3a7a;
}
.qr-drawer-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: #c9d3ea;
}
.qr-drawer-total-row b { font-size: 15px; font-weight: 700; color: #f4f6fb; }
.qr-drawer-total-final {
  border-top: 1px solid #1b3a7a;
  padding-top: 10px;
  margin-top: 2px;
}
.qr-drawer-total-final span { font-size: 16px; font-weight: 700; color: #ffc20e; }
.qr-drawer-total-final b { font-size: 22px; font-weight: 900; color: #ffc20e; }

/* Submit button */
.qr-drawer-submit {
  display: block;
  width: 100%;
  margin: 0;
  padding: 16px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffc20e, #B1855C);
  color: #0a1a3f;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  letter-spacing: .3px;
  transition: transform .14s, box-shadow .14s;
  box-shadow: 0 4px 18px rgba(255, 194, 14, 0.3);
}
.qr-drawer-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255, 194, 14, 0.4); }
.qr-drawer-submit:active:not(:disabled) { transform: translateY(0); }
.qr-drawer-submit:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ── Success card ──────────────────────────────────────────── */
.customer-success-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 20px;
  margin-bottom: 20px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(22, 101, 52, 0.18), rgba(22, 101, 52, 0.1));
  border: 1px solid #166534;
  text-align: center;
}

.customer-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #166534;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customer-success-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: #4ADE80;
}

.customer-success-order {
  font-size: 15px;
  color: #c9d3ea;
}

.customer-success-note {
  margin: 0;
  color: #8d9bbd;
  font-size: 14px;
}

/* ── QR success card (existing) ────────────────────────────── */
.customer-menu-success {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 20px;
  color: #4ADE80;
  background: rgba(22, 101, 52, 0.15);
  border: 1px solid #166534;
  font-weight: 800;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .customer-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .customer-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}


@media (max-width: 600px) {
  .customer-menu-page { padding: 10px 10px 20px; }

  .customer-menu-hero {
    grid-template-columns: 1fr 128px;
    gap: 12px;
    padding: 14px 14px 16px;
    border-radius: 20px;
    align-items: center;
  }

  .customer-menu-hero-mark {
    width: 128px;
    height: 108px;
    border-radius: 16px;
    padding: 8px;
  }

  .customer-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .customer-product-name { font-size: 14px; }

  .customer-offer-card {
    flex-direction: column;
    min-height: auto;
  }

  .customer-offer-img-wrap {
    width: 100%;
    height: 160px;
  }

  .customer-featured-offer {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .customer-featured-offer-img {
    order: -1;
    height: 160px;
  }

  .customer-featured-offer-img img { height: 160px; }

}

@media (max-width: 380px) {
  .customer-product-grid { grid-template-columns: 1fr; }
}

.qr-cart-line span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

/* ── QR session badge & expiry ─────────────────────────────── */
.qr-session-badge {
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: #e8f5e9;
  color: #2e7d32;
  white-space: nowrap;
}

.qr-session-badge.warn {
  background: #fff3e0;
  color: #e65100;
  animation: qr-pulse 1s ease-in-out infinite;
}

.qr-session-badge.expired {
  background: #ffebee;
  color: #b71c1c;
}

/* Full-width session strip inside the drawer, below the header */
.qr-session-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  background: #e8f5e9;
  color: #2e7d32;
  border-bottom: 1px solid #c8e6c9;
  flex-shrink: 0;
}
.qr-session-strip.warn {
  background: #fff3e0;
  color: #e65100;
  border-bottom-color: #ffe0b2;
  animation: qr-pulse 1s ease-in-out infinite;
}
.qr-session-strip.expired {
  background: #ffebee;
  color: #b71c1c;
  border-bottom-color: #ef9a9a;
}

@keyframes qr-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

.qr-session-expired-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #ffebee;
  border: 1px solid #ef9a9a;
  margin-bottom: 16px;
  font-size: 14px;
  color: #b71c1c;
}

.qr-session-expired-banner > span:first-child {
  font-size: 28px;
  flex-shrink: 0;
}

.qr-session-expired-banner > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qr-session-expired-banner b {
  font-size: 15px;
  font-weight: 700;
}

.qr-session-failed-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #fff3e0;
  border: 1px solid #ffcc80;
  margin-bottom: 16px;
  font-size: 14px;
  color: #e65100;
}
.qr-session-failed-banner > span:first-child { font-size: 28px; flex-shrink: 0; }
.qr-session-failed-banner > div { display: flex; flex-direction: column; gap: 6px; }
.qr-session-failed-banner b { font-size: 15px; font-weight: 700; }
.qr-session-failed-banner button {
  align-self: flex-start;
  background: #e65100;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.qr-session-expired-overlay {
  padding: 14px;
  border-radius: 12px;
  background: #ffebee;
  color: #b71c1c;
  text-align: center;
  font-size: 14px;
  margin-bottom: 12px;
}

.qr-session-expired-overlay p {
  margin: 3px 0;
}

.customer-menu-cart-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.customer-menu-cart-head h2 {
  margin: 0;
  flex: 1;
}

.customer-menu-mobile-cart-bar.session-expired {
  background: rgba(255, 235, 238, 0.97);
  border-top-color: #ef9a9a;
}

.customer-menu-mobile-cart-bar.session-failed {
  background: rgba(255, 243, 224, 0.97);
  border-top-color: #ffcc80;
}

.qr-session-failed-overlay {
  background: #fff8e1 !important;
  color: #e65100 !important;
}

.qr-session-failed-overlay button {
  margin-top: 8px;
}

.customer-menu-mobile-cart-bar > .qr-session-badge {
  font-size: 11px;
  padding: 2px 8px;
}

.qr-menu-success,
.qr-menu-error,
.qr-menu-loading {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  border-right: 5px solid var(--success);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: center;
  line-height: 1.8;
}

.qr-menu-error {
  border-right-color: var(--danger);
  color: var(--danger);
}

.qr-menu-order-error {
  margin: 0;
}

.table-qr-modal-box {
  width: min(94vw, 520px);
}

/* ── QR المنيو modal (online + in-café menu codes) ── */
.menu-qr-modal-box { width: min(94vw, 640px); }
.menu-qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}
.menu-qr-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  background: #fff;
}
.menu-qr-card-head { display: flex; flex-direction: column; gap: 2px; }
.menu-qr-card-head b { font-size: 0.98rem; }
.menu-qr-img-wrap {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 6px;
}
.menu-qr-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.menu-qr-url {
  font-size: 0.72rem;
  color: var(--muted);
  word-break: break-all;
  line-height: 1.5;
}
.pos-menu-qr-btn { white-space: nowrap; }
@media (max-width: 560px) {
  .menu-qr-grid { grid-template-columns: 1fr; }
}

.table-qr-card,
.table-qr-print-card {
  display: grid;
  place-items: center;
  gap: 10px;
  margin: 12px auto;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  text-align: center;
  color: #111;
}

.table-qr-subtitle {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table-qr-brand {
  font-size: 22px;
  color: var(--primary);
  font-weight: 900;
}

.table-qr-print-card h3 {
  font-size: 22px;
}

.table-qr-print-card p,
.table-qr-print-card small {
  margin: 0;
  color: #333;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.table-qr-image-wrap {
  width: 280px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eee;
}

.table-qr-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.table-qr-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f4eee5;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.table-qr-permanent-note {
  padding: 10px 14px;
  border-radius: 10px;
  background: #edfaf4;
  border: 1px solid #b2dfc9;
  color: #1a6640;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 4px;
}

.table-qr-actions {
  justify-content: center;
  flex-wrap: wrap;
}

.table-qr-actions .btn {
  min-width: 110px;
}

@media (max-width: 560px) {
  .table-qr-modal-box {
    padding: 14px;
  }

  .table-qr-card,
  .table-qr-print-card {
    padding: 16px;
    border-radius: 18px;
  }

  .table-qr-actions .btn {
    width: 100%;
  }
}

.danger-text {
  color: var(--danger);
  font-weight: 900;
}

.order-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.qty { display: inline-flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #f0e8dc;
  color: var(--ink);
  font-weight: 900;
}
.icon-btn:hover { background: var(--accent); color: #fff; }

.totals {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 14px;
}
.totals div { display: flex; justify-content: space-between; gap: 10px; }
.total { font-size: 22px; font-weight: 900; }

.table-map {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.table-card {
  border: 1.5px solid var(--border);
  border-radius: 18px;
  background: #fff;
  padding: 18px 14px 14px;
  text-align: right;
  box-shadow: 0 4px 14px rgba(20, 33, 61,.06);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.table-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: #d1d5db;
}
.table-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(20, 33, 61,.12); }

.table-card.available { border-color: rgba(22,128,87,.4); background: linear-gradient(165deg, #fff 60%, #f0fdf4); }
.table-card.available::before { background: #16a34a; }

.table-card.occupied { border-color: rgba(183,121,31,.5); background: linear-gradient(165deg, #fff 60%, #fffbeb); animation: tc-occupied-pulse 2.8s ease-in-out infinite; }
.table-card.occupied::before { background: #d97706; }
.table-card.occupied:hover { animation: none; transform: translateY(-3px); box-shadow: 0 10px 28px rgba(183,121,31,.22); }

.table-card.reserved { border-color: rgba(37,99,168,.4); background: linear-gradient(165deg, #fff 60%, #eff6ff); }
.table-card.reserved::before { background: #2563a8; }

.table-card.locked { border-color: #d9d9d9; background: linear-gradient(165deg, #fff 60%, #f3f4f6); }
.table-card.locked::before { background: #9ca3af; }

.table-card.busy { border-color: rgba(183,121,31,.5); background: #fffbeb; }
.table-card.free  { border-color: rgba(22,128,87,.4);  background: #f0fdf4; }

@keyframes tc-occupied-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(183,121,31,.07); }
  50%       { box-shadow: 0 6px 24px rgba(183,121,31,.28), 0 0 0 3px rgba(183,121,31,.09); }
}

/* table card internals */
.tc-num {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 600;
  margin-top: 1px;
  letter-spacing: .3px;
}
.tc-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}
.tc-actions { gap: 5px; }
.tc-actions .btn { font-size: 11px; padding: 5px 10px; }

.tc-view-order-btn {
  display: block;
  width: calc(100% + 28px);
  margin: 2px -14px -14px;
  padding: 10px 16px;
  background: #eff6ff;
  color: #1d4ed8;
  border: none;
  border-top: 1px solid #bfdbfe;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background .15s, color .15s;
  letter-spacing: .2px;
}
.tc-view-order-btn:hover { background: #dbeafe; color: #1e40af; }

.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 14px;
}

.employee-card {
  min-height: 210px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fbf8f2);
  padding: 14px;
  text-align: right;
  box-shadow: 0 8px 18px rgba(20, 33, 61,.045);
  transition: .18s ease;
}
.employee-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.employee-meta,
.attendance-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.employee-meta span,
.employee-meta b,
.attendance-meta span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f4eee5;
  color: var(--muted);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}
.employee-meta b {
  background: #e8f5ef;
  color: var(--success);
}

.attendance-row {
  border-right: 5px solid rgba(247, 148, 29, .45);
}

.payroll-card {
  border-color: rgba(247, 148, 29, .38);
}

.payroll-total {
  display: block;
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

.shift-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(247, 148, 29, .28);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f2fbf6);
  padding: 14px;
}

.inventory-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  min-width: 0;
}

.inventory-stock-card,
.inventory-recipe-card,
.inventory-movement-card,
.inventory-low-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(247, 148, 29, .20);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.inventory-stock-card.low,
.inventory-low-card {
  border-color: rgba(185, 28, 28, .28);
  background: linear-gradient(180deg, #fff, #fff7f7);
}

.inventory-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.inventory-card-head b {
  display: block;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.inventory-card-head span:not(.badge):not(.pill) {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inventory-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  min-width: 0;
}

.inventory-metric-grid div,
.inventory-reason,
.inventory-ingredient-line {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfaf7;
  padding: 10px;
  min-width: 0;
}

.inventory-metric-grid span,
.inventory-reason span,
.inventory-ingredients > .sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inventory-metric-grid b,
.inventory-reason b {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.inventory-card-actions {
  justify-content: flex-start;
}

.inventory-ingredients {
  display: grid;
  gap: 8px;
}

.inventory-ingredient-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inventory-ingredient-line b {
  color: var(--text);
  font-weight: 900;
}

.inventory-ingredient-line span {
  color: var(--primary);
  font-weight: 900;
}

.success-text {
  color: var(--success) !important;
}

.danger-text {
  color: var(--danger) !important;
}

@media (max-width: 520px) {
  .inventory-card-grid,
  .inventory-metric-grid {
    grid-template-columns: 1fr;
  }
}

.inventory-page-body {
  margin-top: 14px;
  min-width: 0;
}

.inventory-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 194, 14, .34);
  border-radius: 22px;
  background:
    radial-gradient(circle at 9% 5%, rgba(216, 180, 131, .20), transparent 32%),
    linear-gradient(130deg, #0d1e43 0%, #16316d 50%, #09152f 100%);
  color: #f8f1e8;
  box-shadow: 0 14px 30px rgba(22, 49, 108, .12);
}

.inventory-hero-main,
.inventory-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.inventory-hero-main { min-width: 0; }

.inventory-hero-icon,
.inventory-overview-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 950;
}

.inventory-hero-icon {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(250, 229, 194, .35);
  border-radius: 15px;
  background: rgba(255, 248, 238, .11);
  color: #e5bd85;
  font-size: 25px;
}

.inventory-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #e5bd85;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.inventory-hero h2,
.inventory-hero p { margin: 0; }
.inventory-hero h2 { font-size: 25px; color: #fffaf4; }
.inventory-hero p { margin-top: 4px; color: rgba(255, 244, 230, .72); font-size: 13px; }
.inventory-hero-actions { flex-wrap: wrap; justify-content: flex-end; }
.inventory-hero-actions .btn { min-height: 40px; }

.inventory-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.inventory-overview-card {
  appearance: none;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 2px 10px;
  width: 100%;
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(61, 137, 255, .16);
  border-radius: 16px;
  background: #fffdf9;
  color: var(--text);
  text-align: right;
  box-shadow: 0 8px 18px rgba(28, 64, 141, .04);
}

button.inventory-overview-card { cursor: pointer; }
button.inventory-overview-card:hover { border-color: rgba(255, 194, 14, .72); transform: translateY(-1px); }

.inventory-overview-icon {
  grid-row: span 3;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #f5eadb;
  color: #895a26;
  font-size: 14px;
}

.inventory-overview-card > span:not(.inventory-overview-icon) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inventory-overview-card strong { font-size: 21px; line-height: 1.25; color: #20479f; font-weight: 950; }
.inventory-overview-card small { color: var(--muted); font-size: 11px; }
.inventory-overview-card.is-alert { border-color: rgba(185, 28, 28, .28); background: #fff9f8; }
.inventory-overview-card.is-alert .inventory-overview-icon { background: #ffe4df; color: #bd2717; }
.inventory-overview-card.is-alert strong { color: #bd2717; }
.inventory-overview-card.is-value { background: #f8fcf9; }
.inventory-overview-card.is-value .inventory-overview-icon { background: #e5f4eb; color: #157449; font-size: 11px; }
.inventory-overview-card.is-value strong { color: #157449; }

.inventory-low-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
  padding: 12px 15px;
  border: 1px solid rgba(190, 52, 35, .25);
  border-radius: 14px;
  background: #fff5f2;
  color: #8f2418;
  text-align: right;
  cursor: pointer;
}

.inventory-low-banner span { padding: 3px 8px; border-radius: 999px; background: #fbd9d2; font-size: 11px; font-weight: 900; }
.inventory-low-banner b { font-size: 13px; }
.inventory-low-banner em { margin-right: auto; color: #bc3828; font-size: 12px; font-style: normal; font-weight: 900; }

.inventory-page-head {
  margin-top: 14px;
  padding: 10px;
  border-radius: 16px;
  background: #fffdf9;
}

.inventory-tabs { gap: 8px; }
.inventory-tabs .chip { min-height: 38px; padding: 0 15px; border-radius: 11px; }

.inventory-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  padding: 0 12px;
  border: 1px solid rgba(61, 137, 255, .18);
  border-radius: 12px;
  background: #fffdfa;
  color: #86592c;
}

.inventory-search:focus-within {
  border-color: rgba(177, 119, 52, .72);
  box-shadow: 0 0 0 3px rgba(216, 180, 131, .18);
}

.inventory-search input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.inventory-form-tip,
.inventory-movement-hint {
  margin: -2px 0 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #f5f0e8;
  color: #73502b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.65;
}

.inventory-movement-hint {
  margin: 0 0 12px;
  border-right: 3px solid #be7c32;
  background: #fff8ed;
}

.inventory-form-panel .field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.inventory-recipe-unit-tip {
  margin: -4px 0 2px;
  color: #80603a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

.inventory-tab-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.inventory-form-panel {
  position: sticky;
  top: 16px;
  min-width: 0;
}

.inventory-list-panel {
  min-width: 0;
  overflow: hidden;
}

.inventory-stock-card,
.inventory-recipe-card,
.inventory-movement-card,
.inventory-low-card {
  box-shadow: 0 8px 18px rgba(20, 33, 61,.04);
}

.inventory-stock-card:hover,
.inventory-recipe-card:hover,
.inventory-movement-card:hover,
.inventory-low-card:hover {
  border-color: rgba(247, 148, 29,.55);
  box-shadow: var(--shadow-sm);
}

.inventory-quantity-hero {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(22,128,87,.18);
  border-radius: 14px;
  background: #eef8f5;
}

.inventory-quantity-hero.low {
  border-color: rgba(180,35,24,.18);
  background: #fff1ee;
}

.inventory-quantity-hero span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.inventory-quantity-hero strong {
  color: var(--primary);
  font-size: 24px;
  line-height: 1.2;
}

.inventory-quantity-hero.low strong {
  color: var(--danger);
}

.inventory-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.inventory-card-actions .btn {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
}

.inventory-movements-list {
  display: grid;
  gap: 12px;
}

.inventory-recipe-card.empty-recipe {
  border-color: rgba(183,121,31,.5);
  background: #fffaf0;
}

.inventory-ingredient-line span {
  text-align: left;
}

/* Recipe line whose stock item was deleted: kept on purpose, just flagged. */
.inventory-ingredient-line.is-deleted {
  border-color: rgba(198, 40, 40, .4);
  border-style: dashed;
  background: #fff6f5;
}

.inventory-ingredient-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.inventory-ingredient-line.is-deleted .inventory-ingredient-name b {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(198, 40, 40, .55);
}

.inventory-deleted-tag {
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  color: var(--danger);
  background: rgba(198, 40, 40, .1);
  border-radius: 999px;
  padding: 2px 9px;
}

@media (max-width: 1000px) {
  .inventory-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-tab-layout {
    grid-template-columns: 1fr;
  }

  .inventory-form-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .inventory-hero { align-items: flex-start; padding: 18px; }
  .inventory-hero,
  .inventory-hero-main { flex-direction: column; }
  .inventory-hero-main { align-items: flex-start; }
  .inventory-hero-actions { width: 100%; justify-content: stretch; }
  .inventory-hero-actions .btn { flex: 1 1 130px; }
  .inventory-overview { grid-template-columns: 1fr; }
  .inventory-low-banner { align-items: flex-start; flex-wrap: wrap; }
  .inventory-low-banner em { width: 100%; margin-right: 0; }
}

.pos-table-map {
  margin: 12px 0 16px;
}

/* ============================================================
   TABLE SESSION MODAL
   ============================================================ */

/* Double-class selector beats .modal-box (same-specificity, later in file) */
.modal-box.table-session-modal {
  width: min(1180px, 99vw);
  max-width: min(1180px, 99vw);
  height: 98vh;          /* fixed height so flex children fill it */
  max-height: 98vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-radius: 16px;
}

.table-session-modal *,
.table-session-modal *::before,
.table-session-modal *::after {
  box-sizing: border-box;
  min-width: 0;
}

/* Push the outer modal overlay to the top with minimal padding
   so the table session modal uses nearly the full viewport height */
.modal:has(.table-session-modal) {
  align-items: flex-start;
  padding: 8px;
}

/* --- Header (sticky inside modal) ----------------------------- */
.ts-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 30;
  flex-shrink: 0;
}

.ts-header-info { flex: 1 1 auto; min-width: 0; }

.ts-header-title {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.ts-header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.88rem;
}

.ts-table-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.ts-orders-badge {
  background: #f0f0f0;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.ts-header-actions {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
}
.ts-header-actions .btn { white-space: nowrap; }

/* --- Summary cards ------------------------------------------- */
.ts-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin: 8px 0 0;
  padding: 0 16px;
  flex-shrink: 0;
}

.ts-stat-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 9px 12px 8px;
  min-width: 0;
  overflow: hidden;
}

.ts-stat-paid   { border-color: rgba(22,128,87,.25); background: linear-gradient(160deg,#fff,#f4fcf7); }
.ts-stat-credit { border-color: rgba(247, 148, 29,.3);  background: linear-gradient(160deg,#fff,#fff8ed); }
.ts-stat-items  { border-color: rgba(37,99,168,.2);   background: linear-gradient(160deg,#fff,#f0f6ff); }

.ts-stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts-stat-value {
  display: block;
  font-size: clamp(0.95rem, 2.5vw, 1.25rem);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ts-stat-count {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: #1a5fb0;
}

.ts-stat-paid   .ts-stat-value { color: #137333; }
.ts-stat-credit .ts-stat-value { color: #b06000; }

.ts-stat-hint {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 3px;
}

/* --- Tab bar -------------------------------------------------- */
.ts-tab-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 0;
  padding: 0 16px;
  flex-shrink: 0;
}

.ts-tab-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f4f4f4;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 16px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.ts-tab-btn:hover    { background: #eaeaea; color: var(--ink); }
.ts-tab-btn.active   { background: var(--primary); color: #fff; border-color: var(--primary); }

/* --- Scrollable tab content (single scroll area) -------------- */
.table-session-tab-content {
  flex: 1 1 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 16px 8px;
  min-height: 0;
}

/* --- Payment method segmented control ------------------------ */
.ts-payment-method-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface, #f8f7f4);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 12px;
}

.ts-payment-method-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.ts-payment-method-seg {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}

.ts-method-btn {
  flex: 1 1 auto;
  min-width: 72px;
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
}
.ts-method-btn:hover       { border-color: rgba(247, 148, 29,0.5); color: var(--ink); }
.ts-method-btn.active      { background: #e6f4ea; border-color: #2f9e65; color: #137333; font-weight: 800; }
.ts-method-btn.credit-active { background: #fff8e6; border-color: #e8a826; color: #b06000; font-weight: 800; }

/* --- Selection toolbar --------------------------------------- */
.ts-selection-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ts-selection-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: #137333;
  background: #e6f4ea;
  border-radius: 999px;
  padding: 2px 12px;
}

/* --- Order group --------------------------------------------- */
.table-session-order-group {
  background: linear-gradient(180deg, #fff, #fbfaf7);
  overflow: hidden;
}

.ts-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  margin-bottom: 2px;
}

.ts-order-head-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ts-order-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.ts-order-number {
  font-size: 1rem;
  font-weight: 900;
  color: var(--ink);
}

.ts-order-time {
  font-size: 0.78rem;
  color: var(--muted);
  background: #f0f0f0;
  border-radius: 999px;
  padding: 1px 9px;
}

/* --- Items grid ---------------------------------------------- */
.table-session-items-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.table-session-unpaid-list {
  padding-bottom: 12px;
  min-width: 0;
}

.table-session-item input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.table-session-item-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(247, 148, 29,.18);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  transition: border-color .18s, background .18s, box-shadow .18s;
}

.table-session-item-card.selected {
  border: 2px solid #2f9e65;
  background: linear-gradient(180deg, #f1fbf5, #fff);
  box-shadow: 0 8px 20px rgba(47,158,101,.1);
}

.table-session-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.table-session-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1 1 220px;
  min-width: 0;
}

.table-session-check input {
  width: 20px;
  min-height: 20px;
  accent-color: #2f9e65;
  flex-shrink: 0;
}

.table-session-check b {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text);
  overflow-wrap: anywhere;
}

.table-session-item-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 1 auto;
}

/* Metrics row: 5 mini-cells */
.table-session-item-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  min-width: 0;
}

.table-session-item-metrics div,
.table-session-line-total {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfaf7;
  padding: 9px 10px;
  min-width: 0;
  overflow: hidden;
}

.table-session-item-metrics span,
.table-session-line-total span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.table-session-item-metrics b {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

/* Collect row: stepper + line total */
.table-session-collect-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 210px);
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.table-session-qty-stepper {
  display: inline-grid;
  grid-template-columns: 40px minmax(58px, 80px) 40px;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  max-width: 185px;
  width: 100%;
}

.table-session-qty-stepper.muted { opacity: .55; }

.table-session-qty-stepper input {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  font-size: 1rem;
  font-weight: 900;
}

.table-session-line-total {
  text-align: center;
  display: grid;
  align-content: center;
}

.table-session-line-total b {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 1.05rem;
}

.table-session-line-total.active {
  border-color: rgba(47,158,101,.45);
  background: #e6f4ea;
}

.table-session-line-total.active b {
  color: #137333;
  font-size: 1.35rem;
  line-height: 1.2;
}

/* --- Payment bar (sticky bottom) ----------------------------- */
.ts-payment-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: 14px;
  border: 2px solid;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
}

.ts-payment-bar-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.ts-payment-bar-left { min-width: 0; }

.ts-payment-bar-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.ts-payment-bar-amount {
  display: block;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 900;
  line-height: 1.15;
}

.ts-payment-bar-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 3px;
}

.table-session-summary-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.ts-aggregated-items {
  margin: 0 0 12px;
  border: 1px solid #b7dfc1;
  border-radius: 12px;
  background: #f5fcf8;
  overflow: hidden;
}
.ts-aggregated-items-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: #e6f4ea;
  color: #137333;
}
.ts-aggregated-items-head span { font-size: .78rem; font-weight: 700; }
.ts-aggregated-items-list { padding: 0 12px; }
.ts-aggregated-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed #b7dfc1;
  font-size: .88rem;
}
.ts-aggregated-item-row:last-child { border-bottom: 0; }
.ts-aggregated-item-row div { min-width: 0; }
.ts-aggregated-item-row b { display: block; overflow-wrap: anywhere; }
.ts-aggregated-item-row small { display: block; color: var(--muted); margin-top: 2px; }
.ts-aggregated-item-row span { color: var(--muted); white-space: nowrap; }
.ts-aggregated-item-row strong { white-space: nowrap; color: #137333; }

.ts-payment-bar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 190px;
  flex-shrink: 0;
}

.ts-pay-btn {
  width: 100%;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 13px 14px;
  white-space: normal;
  line-height: 1.3;
  text-align: center;
}

.ts-pay-all-btn {
  width: 100%;
  font-size: 0.83rem;
  padding: 9px 12px;
}

/* --- Responsive --------------------------------------------- */
@media (max-width: 820px) {
  .modal-box.table-session-modal {
    width: 100vw;
    max-width: 100vw;
    height: 99vh;
    max-height: 99vh;
    border-radius: 12px;
    padding: 0;
  }

  .ts-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-session-item-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-session-collect-row {
    grid-template-columns: 1fr;
  }

  .table-session-qty-stepper {
    grid-template-columns: 40px minmax(70px, 1fr) 40px;
    max-width: none;
    width: 100%;
  }

  .ts-payment-bar-body {
    grid-template-columns: 1fr;
  }

  .ts-payment-bar-actions {
    flex-direction: row;
    min-width: 0;
    width: 100%;
  }

  .ts-pay-btn, .ts-pay-all-btn { flex: 1 1 auto; }
}

@media (max-width: 500px) {
  .ts-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .table-session-item-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .ts-header-actions { width: 100%; }
  .ts-header-actions .btn { flex: 1; }

  .table-session-summary-lines {
    flex-direction: column;
    gap: 2px;
  }

  .ts-aggregated-item-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ts-aggregated-item-row strong { grid-column: 2; }
}

/* ── Report KPI cards ─────────────────────────────────────────── */
.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.report-kpi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-right: 4px solid transparent;
}
.report-kpi-card.kpi-green  { border-right-color: #2e7d32; }
.report-kpi-card.kpi-red    { border-right-color: #c62828; }
.report-kpi-card.kpi-blue   { border-right-color: #1565c0; }
.report-kpi-card.kpi-amber  { border-right-color: #e65100; }
.report-kpi-label { font-size: 0.78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.report-kpi-value { font-size: 1.6rem; font-weight: 900; color: var(--ink); line-height: 1.1; }
.report-kpi-sub   { font-size: 0.76rem; color: var(--muted); }
.kpi-green-text   { color: #2e7d32; }

/* ── Report table ─────────────────────────────────────────────── */
.report-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; direction: rtl; }
.report-table th { text-align: right; padding: 7px 10px; background: var(--bg-strong); font-weight: 700; font-size: 0.78rem; color: var(--muted); border-bottom: 1px solid var(--border); }
.report-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.report-table tr:last-child td { border-bottom: none; }
.report-table tr:hover td { background: var(--bg-strong); }

/* Sort toggle of the all-products panel. Its own wrapper class (not .chips /
   .no-print): the reports print builder strips the <button>s, and must be left
   with no web-only-control markup — an empty div prints nothing. */
.report-sort-toggle { display: flex; flex-wrap: wrap; gap: 8px; }

/* The all-products list can be long: it scrolls inside the panel, keeping the
   column headers and the totals row in view. */
.report-products-scroll { max-height: 560px; overflow-y: auto; }
.report-products-scroll thead th { position: sticky; top: 0; z-index: 1; }
.report-products-scroll tfoot td {
  position: sticky;
  bottom: 0;
  background: var(--bg-strong);
  font-weight: 800;
  border-top: 2px solid var(--border);
  border-bottom: none;
}
.report-rank-cell { color: var(--muted); font-size: 0.78rem; font-weight: 700; width: 28px; text-align: center; }

/* ── Profit & loss statement ─────────────────────────────────── */
.pl-side { display: grid; gap: 14px; align-content: start; }
.pl-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 4px; border-bottom: 1px solid var(--border); }
.pl-line:last-child { border-bottom: none; }
.pl-label { display: grid; gap: 2px; min-width: 0; }
.pl-label small { color: var(--muted); font-size: 0.76rem; font-weight: 500; line-height: 1.4; }
.pl-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-amount i { font-style: normal; opacity: 0.65; }
.pl-line.pl-minus .pl-amount { color: #c62828; }
.pl-line.pl-total { background: var(--bg-strong); border-bottom: none; border-radius: 10px; padding: 12px; margin: 4px 0; font-weight: 800; }
.pl-line.pl-total.pl-loss .pl-amount { color: #c62828; }
.pl-line.pl-result { border-bottom: none; border-radius: 12px; padding: 16px 14px; margin-top: 8px; font-size: 1.12rem; font-weight: 900; }
.pl-line.pl-result .pl-label small { color: inherit; opacity: 0.75; font-weight: 700; }
.pl-line.pl-result.pl-profit { background: #e8f5ef; color: #1b5e20; }
.pl-line.pl-result.pl-loss { background: #ffe7e3; color: #b71c1c; }
.pl-excluded .pl-line .pl-amount { color: var(--ink); font-weight: 700; }
.pl-profit-text { color: #2e7d32; }
.pl-loss-text { color: #c62828; }
.report-table td.pl-day-cell { font-weight: 700; white-space: nowrap; }

/* ── Payment method rows ──────────────────────────────────────── */
.report-payment-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.87rem; }
.report-payment-row:last-child { border-bottom: none; }
.report-payment-label  { min-width: 75px; font-weight: 600; }
.report-bar-mini       { flex: 1; height: 7px; background: var(--bg-strong); border-radius: 4px; overflow: hidden; }
.report-bar-mini i     { display: block; height: 100%; background: var(--primary); border-radius: 4px; transition: width 0.3s; }
.report-payment-amount { min-width: 80px; text-align: left; }
.report-payment-pct    { min-width: 38px; text-align: left; color: var(--muted); font-size: 0.76rem; }

/* ── Report misc ──────────────────────────────────────────────── */
.report-empty-state { padding: 28px; text-align: center; color: var(--muted); font-size: 0.88rem; }
.report-badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 0.76rem; font-weight: 600; }
.report-badge.badge-ok   { background: #e8f5ef; color: #2e7d32; }
.report-badge.badge-bad  { background: #ffe7e3; color: #c62828; }
.report-badge.badge-warn { background: #fff3cd; color: #856404; }
.report-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.report-filters { margin-top: 12px; }
.report-command-center { overflow: hidden; border-top: 4px solid var(--primary, #2e67e4); }
.report-command-center .row-head { align-items: flex-start; }
.report-eyebrow { display: block; color: var(--primary, #2e67e4); font-size: 0.78rem; font-weight: 800; margin-bottom: 4px; }
.report-command-center h2 { margin: 0; font-size: clamp(1.35rem, 2.3vw, 2rem); }
.report-tab-chip { display: inline-flex; align-items: center; gap: 2px; }

/* ── Print styles ─────────────────────────────────────────────── */
@media print {
  .no-print, .sidebar, nav, .chips, .report-presets, .report-filters { display: none !important; }
  .report-kpi-grid  { grid-template-columns: repeat(3, 1fr); }
  .report-kpi-card  { break-inside: avoid; border: 1px solid #ccc; }
  .report-table     { font-size: 0.78rem; }
  .report-table th, .report-table td { padding: 5px 7px; }
  .panel { box-shadow: none; border: 1px solid #ddd; }
  .report-products-scroll { max-height: none; overflow: visible; }
  .report-sort-toggle { display: none !important; }
}

.report-bar {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.report-bar i {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ── Employee attendance chart ───────────────────────────────── */
.employee-attendance-panel { overflow: hidden; }
.employee-chart-legend { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.employee-chart-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.employee-chart-legend .present, .employee-attendance-bars .present { background: #2e7d32; }
.employee-chart-legend .checkout, .employee-attendance-bars .checkout { background: #1565c0; }
.employee-attendance-chart { min-height: 175px; display: flex; align-items: end; gap: 8px; padding: 18px 4px 0; overflow-x: auto; }
.employee-attendance-day { flex: 0 0 58px; display: grid; gap: 4px; text-align: center; color: var(--muted); font-size: 0.68rem; }
.employee-attendance-day b { color: var(--ink); font-size: 0.7rem; white-space: nowrap; }
.employee-attendance-bars { height: 122px; display: flex; justify-content: center; align-items: end; gap: 5px; border-bottom: 1px solid var(--border); }
.employee-attendance-bars i { width: 15px; display: block; border-radius: 7px 7px 2px 2px; min-height: 0; transition: height .25s ease; }

.list { display: grid; gap: 12px; }
.row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}
th, td {
  border-bottom: 1px solid var(--border);
  padding: 12px;
  text-align: right;
  vertical-align: top;
}
th {
  background: var(--bg-strong);
  color: #14213d;
  font-size: 13px;
}

.notice, .empty-state {
  border: 1px solid var(--border);
  border-right: 5px solid var(--primary);
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  line-height: 1.75;
}
.notice.error {
  border-right-color: var(--danger);
  background: #fff5f3;
  color: var(--danger);
}
.empty-state {
  min-height: 130px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  background: #fbf8f2;
}
.empty-state b { color: var(--ink); }

.kitchen-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.kitchen-column {
  min-height: 420px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.kitchen-ticket {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(20, 33, 61,.045);
}

.kitchen-ticket-warning {
  border-color: #f0a928;
  box-shadow: 0 10px 22px rgba(176,96,0,.12);
}

.kitchen-ticket-critical {
  border-color: #d93025;
  box-shadow: 0 12px 26px rgba(217,48,37,.16);
  animation: kitchenCriticalPulse 1.8s ease-in-out infinite;
}

.kitchen-waiting-time {
  color: var(--ink);
}

.kitchen-waiting-warning {
  color: #b06000;
}

.kitchen-waiting-critical {
  color: #d93025;
}

@keyframes kitchenCriticalPulse {
  0%, 100% {
    box-shadow: 0 12px 26px rgba(217,48,37,.12);
  }
  50% {
    box-shadow: 0 12px 30px rgba(217,48,37,.28);
  }
}

.kitchen-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbf8f2;
}

.kitchen-item b {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.kitchen-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.65);
  background: var(--sidebar);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
}

/* ── Credit-order admin notification toast ─────────────────── */
.credit-notif-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  direction: rtl;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 14px 14px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--mash-black) 0%, #12295c 100%);
  border: 1.5px solid rgba(196, 127, 50, 0.5);
  box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 0 0 3px rgba(196,127,50,0.10);
  color: #fff;
  cursor: pointer;
  animation: cntSlideIn 0.3s ease;
}
@keyframes cntSlideIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.cnt-icon { font-size: 1.6rem; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.cnt-body { flex: 1; min-width: 0; }
.cnt-title { font-size: .72rem; font-weight: 700; color: #f7941d; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 3px; }
.cnt-customer { font-size: 1rem; font-weight: 900; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cnt-total { font-size: .9rem; font-weight: 700; color: #86efac; margin-bottom: 3px; }
.cnt-items { font-size: .75rem; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cnt-by { font-size: .72rem; opacity: .6; display: block; margin-top: 2px; }
.cnt-close {
  background: none; border: none; color: rgba(255,255,255,.5); font-size: 1rem;
  cursor: pointer; padding: 0 2px; line-height: 1; flex-shrink: 0; align-self: center;
}
.cnt-close:hover { color: #fff; }

/* ── Nav unread badge ──────────────────────────────────────── */
.notif-nav-badge {
  display: inline-block;
  margin-right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  vertical-align: middle;
}

/* ── General admin notification toast ─────────────────────── */
.admin-notif-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  direction: rtl;
  min-width: 260px;
  max-width: min(400px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 16px;
  background: #152f68;
  border: 1.5px solid rgba(247, 148, 29, 0.30);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  color: #eef2fa;
  cursor: pointer;
  animation: cntSlideIn 0.3s ease;
}
.admin-notif-toast.sev-info    { border-color: rgba(59,130,246,.45); }
.admin-notif-toast.sev-success { border-color: rgba(34,197,94,.45);  background: #14532d; }
.admin-notif-toast.sev-warning { border-color: rgba(245,158,11,.45); background: #1a3b83; }
.admin-notif-toast.sev-danger  { border-color: rgba(239,68,68,.45);  background: #183577; }
.admin-notif-toast .ant-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.admin-notif-toast .ant-body { flex: 1; min-width: 0; }
.admin-notif-toast .ant-title { font-size: .8rem; font-weight: 700; margin-bottom: 3px; opacity: .85; }
.admin-notif-toast .ant-msg   { font-size: .85rem; font-weight: 600; }
.admin-notif-toast .ant-close {
  background: none; border: none; color: rgba(255,255,255,.45); font-size: 1rem;
  cursor: pointer; padding: 0; line-height: 1; flex-shrink: 0; align-self: center;
}
.admin-notif-toast .ant-close:hover { color: #fff; }

/* ── Notifications Center page ─────────────────────────────── */
.notifications-center { padding: 20px; }
.notif-center-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.notif-center-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}
.notif-center-actions { display: flex; gap: 8px; }

.notif-list { display: flex; flex-direction: column; gap: 4px; }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border, #e5e7eb);
  cursor: pointer;
  transition: background .15s;
  direction: rtl;
}
.notif-item:hover { background: rgba(30, 79, 168,.06); }
.notif-item.is-unread { background: rgba(30, 79, 168,.05); border-color: rgba(30, 79, 168,.18); }
.notif-item.is-read { opacity: .6; }

.notif-item-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.notif-item-content { flex: 1; min-width: 0; }
.notif-item-title { font-size: .82rem; font-weight: 700; margin-bottom: 3px; }
.notif-item-msg { font-size: .85rem; color: #6b7280; margin-bottom: 4px; }
.notif-item-products { font-size: .75rem; color: #9ca3af; margin-bottom: 4px; }
.notif-item-meta { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: #9ca3af; }
.notif-item-actor { font-weight: 600; color: #6b7280; }
.notif-item-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  align-self: center; margin-right: 4px;
}

/* ── Notification Preferences Panel ────────────────────────── */
.notif-prefs-panel {
  background: linear-gradient(135deg, var(--mash-black) 0%, #0f234d 100%);
  border: 1.5px solid rgba(196, 127, 50, 0.3);
  border-radius: 20px;
  padding: 20px 20px 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  direction: rtl;
}
.notif-prefs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 10px;
  flex-wrap: wrap;
}
.notif-prefs-title {
  font-size: .95rem;
  font-weight: 800;
  color: #e2c880;
  letter-spacing: .02em;
}
.notif-test-btn {
  font-size: .78rem !important;
  padding: 6px 14px !important;
  border-radius: 10px !important;
  background: rgba(196,127,50,.18) !important;
  border-color: rgba(196,127,50,.4) !important;
  color: #e2c880 !important;
}
.notif-test-btn:hover {
  background: rgba(196,127,50,.3) !important;
}

/* Quiet Mode row */
.notif-quiet-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  margin-bottom: 4px;
  flex-wrap: wrap;
  transition: background .2s, border-color .2s;
}
.notif-quiet-mode-row.is-active {
  background: rgba(245,158,11,.08);
  border-color: rgba(245,158,11,.3);
}
.notif-quiet-mode-desc {
  font-size: .77rem;
  color: rgba(241,245,249,.55);
  line-height: 1.5;
  flex: 1;
  min-width: 0;
}
.notif-quiet-mode-row.is-active .notif-quiet-mode-desc {
  color: rgba(251,191,36,.75);
}
.notif-quiet-btn {
  white-space: nowrap;
  font-size: .8rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.09);
  color: #eef2fa;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .16s, border-color .16s, color .16s;
  line-height: 1;
}
.notif-quiet-btn:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.3);
}
.notif-quiet-btn.active {
  background: rgba(245,158,11,.22);
  border-color: rgba(245,158,11,.55);
  color: #fbbf24;
}
.notif-quiet-btn.active:hover {
  background: rgba(245,158,11,.32);
}
.notif-prefs-divider {
  height: 1px;
  background: rgba(255,255,255,.1);
  margin: 8px 0 4px;
}

.notif-prefs-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .14s;
  direction: rtl;
}
.notif-pref-row:hover { background: rgba(255,255,255,.06); }
.notif-pref-row.dimmed { opacity: .45; pointer-events: none; }

.notif-pref-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.notif-pref-label {
  font-size: .88rem;
  font-weight: 700;
  color: #eef2fa;
}
.notif-pref-desc {
  font-size: .73rem;
  color: rgba(241,245,249,.55);
  line-height: 1.4;
}

/* Toggle switch */
.notif-toggle {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.2);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s, border-color .2s;
}
.notif-toggle.on {
  background: #f7941d;
  border-color: #f7941d;
}
.notif-toggle-knob {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  right: 2px;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), right .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.notif-toggle.on .notif-toggle-knob {
  transform: translateX(-20px);
}
.notif-toggle.disabled {
  opacity: .4;
  pointer-events: none;
}

.print-modal .modal-box {
  width: min(520px, 100%);
}

.print-sheet {
  display: grid;
  place-items: center;
  padding: 16px;
  background: #f4eee5;
  border-radius: 16px;
}

.thermal-preview {
  width: 80mm;
  max-width: 100%;
  padding: 14px;
  background: #fff;
  color: #111;
  border: 1px dashed #bbb;
  border-radius: 8px;
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1.65;
  direction: rtl;
}

.thermal-preview h2 {
  text-align: center;
  font-size: 20px;
}

.thermal-preview p {
  margin: 5px 0;
  font-size: 13px;
}

.thermal-preview hr {
  border: 0;
  border-top: 1px dashed #999;
  margin: 10px 0;
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.muted-line {
  color: #555;
  font-size: 12px;
}

.grand-total {
  font-size: 16px;
  font-weight: 900;
  margin-top: 8px;
}

.ticket-item {
  padding: 8px 0;
  border-bottom: 1px dashed #bbb;
}

.ticket-item b,
.ticket-item span {
  display: block;
}

.ticket-item span {
  color: #333;
  font-size: 12px;
}

.ticket-station {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ticket-order-num {
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  margin: 4px 0 10px;
  color: #111;
}

.ticket-item b {
  font-size: 17px;
}

.ticket-notes {
  color: #555;
  font-size: 12px;
  margin: 3px 0 0;
  font-style: italic;
}

.receipt-logo {
  text-align: center;
  margin-bottom: 8px;
}

.print-logo {
  max-width: 100px;
  max-height: 60px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.print-logo.logo-small  { max-width: 60px;  max-height: 40px; }
.print-logo.logo-medium { max-width: 100px; max-height: 60px; }
.print-logo.logo-large  { max-width: 140px; max-height: 80px; }

@media print {
  .no-print { display: none !important; }
  .thermal-preview { border: none; width: 80mm; }
  .ticket-order-num { font-size: 32px; }
  .print-logo { max-width: 100px; max-height: 60px; }
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 18, .48);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 1300;
}
.modal.open { display: flex; }
.modal-box {
  width: min(680px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--card);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

/* ── Programmatic overlay (settle, QR, etc.) ─────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 18, .48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 1000;
}
.modal-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--primary);
  max-height: 88vh;
  overflow: hidden;
  width: 100%;
}
/* override the legacy .modal { display:none } rule when nested inside overlay */
.modal-overlay .modal,
.modal-overlay .app-modal-box {
  display: flex;
  flex-direction: column;
  position: relative;
  inset: auto;
  background: var(--card);
  border-radius: 18px;
  padding: 0;
  box-shadow: var(--shadow);
  max-height: 88vh;
  overflow: hidden;
  z-index: auto;
  width: 100%;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  flex-shrink: 0;
}
.modal-header h2 { margin: 0; font-size: 1rem; }
.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-secondary, #6b7280);
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}
.modal-close:hover { background: var(--bg-alt, #f5f5f5); }

.print-preview {
  background: #fff;
  color: #111;
  border: 1px dashed #999;
  padding: 16px;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.8;
}
.hidden { display: none !important; }

@media (max-width: 1100px) {
  .grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos { grid-template-columns: 1fr; }
  .kitchen-board { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .layout, .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-radius: 0 0 18px 18px;
  }
  .sidebar-toggle { display: inline-flex; align-items: center; }
  .nav { display: none; }
  body.nav-open .nav { display: grid; }
  .nav { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
  .main { padding: 16px; }
  .topbar, .page-header { align-items: stretch; flex-direction: column; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .page-hero.compact,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }
  .menu-product-form-grid {
    grid-template-columns: 1fr;
  }
  .menu-product-image-uploader {
    max-width: 320px;
  }

}

@media (max-width: 560px) {
  .login { padding: 14px; }
  .login-card { padding: 22px 18px; }
  .main { padding: 12px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-products-grid { grid-template-columns: 1fr; }
  .menu-product-card {
    grid-template-columns: 1fr;
  }
  .menu-product-image {
    width: min(220px, 100%);
  }
  .menu-product-title-row {
    flex-direction: column;
  }
  .menu-product-title-row strong {
    white-space: normal;
  }

  .table-map { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .btn { width: 100%; }
  .actions .btn { width: auto; }
  .tc-view-order-btn { width: calc(100% + 28px); }
}

/* ============================================================
   SHIFT PAGE REDESIGN
   ============================================================ */

/* ── Page Header ─────────────────────────────────────────────── */
.shift-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.shift-page-header-info { min-width: 0; }
.shift-page-title { margin: 0 0 3px; font-size: 1.5rem; font-weight: bold; }
.shift-page-sub   { margin: 0; color: var(--muted); font-size: 0.88rem; }
.shift-page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.shift-status-badge {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.shift-status-badge.open   { background: #e6f4ea; color: #1b7a42; border: 1px solid #c3e6cb; }
.shift-status-badge.closed { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.shift-num-label { font-size: 0.88rem; font-weight: bold; color: var(--ink); }

/* ── Error / Empty feedback panels ───────────────────────────── */
.shift-feedback-panel {
  text-align: center;
  padding: 36px 20px;
  margin-bottom: 18px;
}
.shift-error-panel  { background: #fff5f5; border-color: #f5c6cb; }
.shift-empty-panel  { border: 1.5px dashed var(--border); }
.shift-feedback-icon { font-size: 2.8rem; margin-bottom: 10px; }
.shift-feedback-panel h3 { margin: 0 0 6px; }
.shift-feedback-panel p  { color: var(--muted); margin: 0 0 16px; font-size: 0.9rem; }

/* ── KPI grouped sections ─────────────────────────────────────── */
.shift-kpi-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shift-kpi-group {
  background: var(--bg, #fafafa);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px 14px;
}
.shift-kpi-group--closing { border-color: #a7d9c3; background: #f0faf4; }

.shift-kpi-group-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.shift-kpi-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
}

.shift-kpi-card {
  border-radius: 10px;
  padding: 10px 12px 10px;
  border: 1px solid var(--border);
  background: #fff;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.shift-kpi-card--green   { background: #f0faf4; border-color: #c3e6cb; }
.shift-kpi-card--blue    { background: #eff6ff; border-color: #bfdbfe; }
.shift-kpi-card--amber   { background: #fffbeb; border-color: #fde68a; }
.shift-kpi-card--teal    { background: #f0fdfa; border-color: #99f6e4; }
.shift-kpi-card--primary { background: #f5fcf8; border-color: #a7d9c3; }
.shift-kpi-card--neutral { background: #f9fafb; border-color: #e5e7eb; }

.shift-kpi-card-top {
  display: flex;
  align-items: center;
  gap: 5px;
}
.shift-kpi-icon  { font-size: 0.95rem; flex-shrink: 0; }
.shift-kpi-title { font-size: 0.75rem; color: var(--muted); font-weight: 600; flex: 1; min-width: 0; }
.shift-kpi-value { font-size: 1.2rem; font-weight: 900; color: var(--ink); margin-top: 2px; }
.shift-kpi-desc  { font-size: 0.7rem; color: var(--muted); }

/* ── Work grid (form + details) ───────────────────────────────── */
.shift-work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
@media (max-width: 700px) {
  .shift-work-grid { grid-template-columns: 1fr; }
  .shift-kpi-cards { grid-template-columns: repeat(2, 1fr); }
}

.shift-section-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--primary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Shift details two-column grid ───────────────────────────── */
.shift-details-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
  margin: 0;
  font-size: 0.875rem;
}
.shift-details-grid dt {
  padding: 7px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-left: 16px;  /* RTL: gap between dt and dd */
  font-weight: 500;
}
.shift-details-grid dd {
  padding: 7px 0;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.shift-details-grid dt:last-of-type,
.shift-details-grid dd:last-of-type { border-bottom: 0; }

/* ── Cash movement helpers ────────────────────────────────────── */
.shift-required-mark { color: #c00; font-size: 0.75rem; margin-right: 4px; }
.shift-optional-mark { color: var(--muted); font-size: 0.75rem; margin-right: 4px; }

/* ── Movements table ─────────────────────────────────────────── */
.shift-movements-table {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.875rem;
}

.shift-movements-head,
.shift-movements-row,
.shift-movements-footer {
  display: grid;
  grid-template-columns: 80px 120px 1fr auto;
  gap: 10px;
  padding: 8px 14px;
  align-items: center;
}

.shift-movements-head {
  background: #f3f4f6;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.shift-movements-row { border-bottom: 1px solid var(--border); }
.shift-movements-row:last-child { border-bottom: 0; }
.shift-movements-row:nth-child(even) { background: #fafafa; }

.shift-movements-footer {
  background: #f9fafb;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}

.shift-movement-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.shift-movement-badge.deposit  { background: #e6f4ea; color: #1b7a42; }
.shift-movement-badge.withdraw { background: #fef3c7; color: #92400e; }

.shift-movement-time   { color: var(--muted); white-space: nowrap; }
.shift-movement-reason { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-movement-amount { font-weight: bold; white-space: nowrap; text-align: left; }
.shift-movements-num   { text-align: left; }

.shift-positive { color: #1b7a42; }
.shift-negative { color: #c62828; }

/* ── Shift report modal wider for new sections ────────────────── */
.shift-report-modal-box { width: min(600px, 100%); }

/* Pre-close shift review modal */
.pre-close-modal-box { width: min(560px, 100%); }

.pre-close-section {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
  background: #fff;
}
.pre-close-section.ok {
  border-color: #a5d6a7;
  background: #f1faf3;
}
.pre-close-section.blocker {
  border-color: #ef9a9a;
  background: #fff5f5;
}
.pre-close-section.force-close-section {
  border-color: #ffcc80;
  background: #fff8f0;
}
.pre-close-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 8px;
  gap: 8px;
}
.pre-close-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.87rem;
  margin-bottom: 6px;
}
.pre-close-blocker-msg {
  font-size: 0.82rem;
  color: #c62828;
  margin: 6px 0 0;
  line-height: 1.5;
}

/* Shift Report Styles */
.shift-report-print-card {
  background: #fff;
  color: #111;
  padding: 20px;
  border: 1px dashed #ccc;
  border-radius: 8px;
  max-width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}
.shift-report-print-card h2, .shift-report-print-card h3 {
  margin: 0 0 8px 0;
}
.shift-report-print-card .report-section {
  margin: 12px 0;
}
.shift-report-print-card .report-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.shift-report-print-card .negative {
  color: #e53935;
}
.shift-report-print-card .positive {
  color: #43a047;
}
/* .shift-report-modal-box width moved to SHIFT PAGE REDESIGN block above */

/* ── Shift report: "الفواتير" tab (every invoice of the shift, oldest first) ── */
.shift-report-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.shift-report-tab {
  border: 0;
  background: none;
  padding: 9px 18px;
  font: inherit;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.shift-report-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.shift-invoices-panel { display: grid; gap: 10px; }
.shift-invoices-panel .positive { color: #43a047; }
.shift-invoices-panel .negative { color: #e53935; }

.si-range {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  font-size: .86rem;
}
.si-order-note { color: var(--muted); font-size: .78rem; }

.si-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.si-summary > div {
  display: grid;
  gap: 2px;
  text-align: center;
  padding: 8px 6px;
  background: #f8f6f1;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.si-summary > div.wide { grid-column: 1 / -1; }
.si-summary span { font-size: .72rem; font-weight: 700; color: var(--muted); }
.si-summary b { font-size: 1rem; }

.si-empty { color: var(--muted); font-size: .88rem; padding: 6px 2px; }

.si-list { display: grid; gap: 8px; }
.si-invoice {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.si-invoice.open { border-color: var(--primary); }
.si-invoice.cancelled .si-main b,
.si-invoice.cancelled .si-total {
  text-decoration: line-through;
  color: var(--muted);
}

.si-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  background: none;
  font: inherit;
  text-align: right;
  cursor: pointer;
}
.si-head:hover { background: #faf8f3; }
.si-seq {
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #efece5;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}
.si-main { display: grid; gap: 1px; min-width: 0; }
.si-main span {
  font-size: .76rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.si-time { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.si-total { white-space: nowrap; font-variant-numeric: tabular-nums; }
.si-caret { color: var(--muted); font-size: .8rem; }

.si-detail {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px dashed var(--border);
  background: #fdfcf9;
}
.si-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
}
.si-meta > div { display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.si-meta span { font-size: .72rem; font-weight: 700; color: var(--muted); }
.si-meta b { font-size: .84rem; font-weight: 700; }
.si-section-title {
  font-size: .78rem;
  font-weight: 800;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
}
.si-item, .si-payment, .si-total-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: .86rem;
  padding: 3px 0;
}
.si-item-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.si-item-sub { font-size: .76rem; color: var(--muted); }
.si-item-note { flex-basis: 100%; font-size: .76rem; color: #8a6d1f; }
.si-item-total, .si-payment b, .si-total-row b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.si-tag {
  font-style: normal;
  font-size: .68rem;
  font-weight: 800;
  color: var(--danger);
  background: rgba(198, 40, 40, .1);
  border-radius: 999px;
  padding: 1px 7px;
}
.si-totals { border-top: 1px solid var(--border); padding-top: 4px; }
.si-total-row { color: var(--muted); }
.si-total-row.strong { color: var(--text); font-weight: 800; font-size: .95rem; }

/* "مرتجع الفاتورة" box at the bottom of an expanded invoice */
.si-return-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(198, 40, 40, .28);
  border-radius: 12px;
  background: rgba(198, 40, 40, .05);
}
.si-return-box > div { display: grid; gap: 3px; min-width: 0; }
.si-return-box b { font-size: .9rem; }
.si-return-box span { font-size: .78rem; color: var(--muted); line-height: 1.5; }
.si-return-box .si-return-pending { color: #b06000; font-weight: 700; }
.si-return-box.muted { border-color: var(--border); background: transparent; }
.si-return-box .btn { flex-shrink: 0; }

@media (max-width: 520px) {
  .si-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .si-head { grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px; padding: 10px; }
  .si-seq, .si-caret { display: none; }
  .si-meta { grid-template-columns: 1fr; }
  .si-return-box { flex-direction: column; align-items: stretch; }
}

@media print {
  .shift-invoices-panel, .shift-report-tabs { display: none !important; }
}

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

  body {
    background: #fff !important;
  }

  body.printing-table-qr * {
    visibility: hidden !important;
  }

  /* Scope to #tableQrPrintCard (the id on the modal element) to prevent any
     other .table-qr-print-card elements in the page from becoming visible */
  body.printing-table-qr #tableQrPrintCard,
  body.printing-table-qr #tableQrPrintCard * {
    visibility: visible !important;
  }

  body.printing-table-qr #tableQrPrintCard {
    position: absolute;
    inset: 12mm auto auto 50%;
    transform: translateX(-50%);
    width: 90mm;
    border: 0;
    box-shadow: none;
    background: #fff !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  body.printing-shift-report * {
    visibility: hidden !important;
  }

  body.printing-shift-report .shift-report-print-card,
  body.printing-shift-report .shift-report-print-card * {
    visibility: visible !important;
  }

  body.printing-shift-report .shift-report-print-card {
    position: absolute;
    inset: 0 auto auto 0;
    width: 80mm;
    border: 0;
    box-shadow: none;
    padding: 0;
    background: #fff !important;
  }

  body.printing-customer-statement * {
    visibility: hidden !important;
  }

  body.printing-customer-statement .customer-statement-card,
  body.printing-customer-statement .customer-statement-card * {
    visibility: visible !important;
  }

  body.printing-customer-statement .customer-statement-card {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    max-width: 100%;
    max-height: none !important;
    overflow: visible !important;
    border: 0;
    box-shadow: none;
    background: #fff !important;
    direction: rtl;
    font-family: Arial, sans-serif;
  }

  body.printing-customer-statement .no-print {
    display: none !important;
  }

  body.printing-customer-statement .print-only {
    display: block !important;
    visibility: visible !important;
  }

  body:not(.printing-table-qr):not(.printing-shift-report):not(.printing-customer-statement) {
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body:not(.printing-table-qr):not(.printing-shift-report):not(.printing-customer-statement) * {
    display: none !important;
    visibility: hidden !important;
  }

  body:not(.printing-table-qr):not(.printing-shift-report):not(.printing-customer-statement) .modal.open.print-modal,
  body:not(.printing-table-qr):not(.printing-shift-report):not(.printing-customer-statement) .modal.open.print-modal .modal-box,
  body:not(.printing-table-qr):not(.printing-shift-report):not(.printing-customer-statement) .print-sheet,
  body:not(.printing-table-qr):not(.printing-shift-report):not(.printing-customer-statement) .print-sheet * {
    display: block !important;
    visibility: visible !important;
  }

  body:not(.printing-table-qr):not(.printing-shift-report):not(.printing-customer-statement) .print-sheet {
    position: absolute;
    inset: 0 auto auto 0;
    width: 80mm;
    padding: 0;
    background: #fff !important;
  }

  body:not(.printing-table-qr):not(.printing-shift-report):not(.printing-customer-statement) .modal.open.print-modal {
    position: absolute !important;
    inset: 0 !important;
    width: 80mm !important;
    height: auto !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }

  body:not(.printing-table-qr):not(.printing-shift-report):not(.printing-customer-statement) .modal.open.print-modal .modal-box {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    width: 80mm !important;
    background: #fff !important;
  }

  body:not(.printing-table-qr):not(.printing-shift-report):not(.printing-customer-statement) .modal.open.print-modal .no-print {
    display: none !important;
  }

  body:not(.printing-table-qr):not(.printing-shift-report):not(.printing-customer-statement) .thermal-preview {
    width: 80mm;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }

  body:not(.printing-table-qr):not(.printing-shift-report):not(.printing-customer-statement) .receipt-logo,
  body:not(.printing-table-qr):not(.printing-shift-report):not(.printing-customer-statement) .print-logo {
    display: block !important;
    visibility: visible !important;
  }

  .no-print {
    display: none !important;
  }
}

/* Admin Menu Products Page Styles */
.admin-menu-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  width: 100%;
}

.admin-menu-product-card {
  width: 100%;
  min-width: 0;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #eadfce;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.admin-menu-product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-weight: bold;
}

.admin-menu-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-menu-product-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}

.admin-menu-product-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-menu-product-image-uploader {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

@media (max-width: 768px) {
  .admin-menu-product-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Polished Menu & Products management */
.admin-menu-products-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.admin-menu-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.admin-menu-page-header h2 {
  font-size: 26px;
}

.admin-menu-page-header p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.admin-menu-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-menu-toolbar .btn,
.admin-menu-product-actions .btn {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
}

.admin-menu-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.admin-menu-summary-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(20, 33, 61,.04);
}

.admin-menu-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-menu-summary-card b {
  color: var(--primary);
  font-size: 22px;
}

.admin-menu-filters-panel {
  padding: 14px;
}

.admin-menu-products-page select,
.admin-menu-product-modal select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: 16px 19px, 10px 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-left: 32px;
}

.admin-menu-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 240px) auto;
  gap: 10px;
  align-items: center;
}

.admin-menu-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-menu-products-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-menu-product-card {
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(20, 33, 61,.04);
  min-width: 0;
}

.admin-menu-product-card.is-hidden {
  background: #fbfaf7;
}

.admin-menu-product-image {
  position: relative;
  background:
    linear-gradient(135deg, rgba(30, 79, 168,.10), rgba(247, 148, 29,.14)),
    #f7efe4;
  color: var(--muted);
  min-width: 0;
}

.admin-menu-product-image.empty span {
  display: grid;
  place-items: center;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  border: 1px dashed rgba(107,114,128,.35);
  border-radius: 14px;
  background: rgba(255,255,255,.55);
}

.admin-menu-product-content {
  display: grid;
  gap: 9px;
  padding: 12px;
  min-width: 0;
  flex: 1;
}

.admin-menu-product-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.admin-menu-product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.45;
}

.admin-menu-product-name-ar {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.admin-menu-product-category,
.admin-menu-product-description,
.admin-menu-product-sku {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.admin-menu-product-description {
  display: -webkit-box;
  min-height: 40px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.admin-menu-product-price {
  color: var(--primary);
  font-size: 18px;
  white-space: nowrap;
}

.admin-menu-product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-menu-product-badges .badge {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.admin-menu-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 8px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.admin-menu-product-modal-box {
  width: min(820px, 100%);
}

/* ── Product status panel (3-toggle card row in product form) ───────────── */
.product-status-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.status-toggle-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #f7f6f3;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: center;
}

.status-toggle-card input[type="checkbox"] {
  display: none;
}

.status-toggle-card .status-toggle-icon {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--muted);
  line-height: 1;
}

.status-toggle-card .status-toggle-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.3;
}

.status-toggle-card.on {
  border-color: var(--primary);
  background: #fffaf1;
}

.status-toggle-card.on .status-toggle-icon,
.status-toggle-card.on .status-toggle-label {
  color: var(--primary);
}

@media (max-width: 480px) {
  .product-status-panel {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .status-toggle-card {
    padding: 8px 6px;
  }
  .status-toggle-label {
    font-size: 0.7rem;
  }
}

.product-category-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.product-category-row select {
  flex: 1;
  min-width: 0;
}
.product-category-row .btn {
  align-self: stretch;
  padding-top: 0;
  padding-bottom: 0;
  flex: 0 0 auto;   /* never grow, never shrink, size = content */
  white-space: nowrap;
}

.admin-menu-product-form-grid.compact {
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
}

.admin-menu-product-modal textarea {
  min-height: 70px;
}

.admin-menu-product-image-uploader {
  align-items: stretch;
}

.admin-menu-image-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(247, 148, 29,.55);
  border-radius: 14px;
  background: #fffaf1;
  color: var(--muted);
  overflow: hidden;
  font-weight: 900;
}

.admin-menu-image-preview.has-image {
  border-style: solid;
  background: #fff;
}

.admin-menu-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-menu-stock-selector {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfaf7;
}

.admin-menu-stock-selector .notice {
  grid-column: 1 / -1;
}

.admin-menu-modal-actions {
  justify-content: flex-start;
  margin-top: 14px;
}

@media (max-width: 1250px) {
  .admin-menu-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-menu-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .admin-menu-page-header,
  .admin-menu-filter-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
  .admin-menu-toolbar {
    justify-content: flex-start;
  }
  .admin-menu-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-menu-product-form-grid.compact,
  .admin-menu-stock-selector {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile product form modal ────────────────────────────────── */
@media (max-width: 640px) {
  /* Force single-column regardless of .compact specificity */
  .admin-menu-product-form-grid,
  .admin-menu-product-form-grid.compact {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  /* Image uploader: move to top, compact square */
  .admin-menu-product-image-uploader {
    order: -1;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
  }
  .admin-menu-image-preview {
    aspect-ratio: 3 / 2;
    max-height: 180px;
  }

  /* Category row: select fills width, button stays compact */
  .product-category-row {
    gap: 6px;
  }
  .product-category-row select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    width: 0;   /* flex-basis trick: forces flex to decide width */
  }
  .product-category-row .btn {
    flex: 0 0 auto;
    min-width: 72px;
    max-width: 100px;
    padding: 0 10px;
    font-size: 13px;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .admin-menu-summary-grid,
  .admin-menu-products-grid {
    grid-template-columns: 1fr;
  }
}

/* Antigravity: Polished Cashier Shift UI/UX styling rules */

/* POS Shift Warning Card style (RTL red/orange warning state) */
.pos-shift-warning-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fdf2e9; /* soft orange warning */
  border: 1.5px solid #f5b041;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  direction: rtl;
}

.pos-shift-warning-card .warning-icon {
  font-size: 2.2rem;
}

.pos-shift-warning-card .warning-info h3 {
  margin: 0 0 4px 0;
  color: #c0392b;
  font-size: 1.15rem;
  font-weight: bold;
}

.pos-shift-warning-card .warning-info p {
  margin: 0;
  color: #78281f;
  font-size: 0.95rem;
}

/* POS Shift Status Card (compact, premium layout) */
.pos-shift-status-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  direction: rtl;
}

.pos-shift-status-card .status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.pos-shift-status-card .status-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pos-shift-status-card .status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.pos-shift-status-card .status-indicator.online {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.pos-shift-status-card .status-actions {
  display: flex;
  gap: 8px;
}

.pos-shift-status-card .status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.pos-shift-status-card .status-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 6px;
  align-items: center;
}

.pos-shift-status-card .status-item span {
  color: var(--muted);
}

.pos-shift-status-card .status-item b {
  color: var(--ink);
  font-weight: bold;
}

.pos-shift-status-card .status-item b.success-text {
  color: var(--success);
}

/* Cash Movement Form (RTL style, segmented control & chips) */
.cash-movement-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.segmented-control {
  display: flex;
  background: var(--bg-strong);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.segmented-control button {
  flex: 1;
  background: transparent;
  border: 0;
  border-radius: calc(var(--radius-sm) - 2px);
  padding: 10px;
  font-size: 0.92rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--muted);
}

.segmented-control button.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.reason-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.reason-chips .chip {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reason-chips .chip:hover {
  background: var(--bg-strong);
  border-color: var(--primary);
}

/* Badges for shift history difference and statuses */
.badge.neutral-status {
  background: var(--bg-strong);
  color: var(--ink);
}

.badge.positive-status {
  background: #e6f4ea;
  color: #137333;
}

.badge.negative-status {
  background: #fce8e6;
  color: #c5221f;
}

/* Shift page layout custom improvements */
.current-shift-section {
  border-top: 4px solid var(--primary);
}

.large-numeric-input:focus {
  border-color: var(--primary) !important;
  box-shadow: var(--focus) !important;
  outline: none;
}

/* Credit Balance Badges */
.credit-balance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: bold;
  white-space: nowrap;
}

.credit-balance-badge.zero-balance {
  background: #e6f4ea;
  color: #137333;
  border: 1px solid #ceead6;
}

.credit-balance-badge.has-balance {
  background: #fef7e0;
  color: #b06000;
  border: 1px solid #fde293;
}

.credit-balance-badge.over-limit {
  background: #fdecea;
  color: #c62828;
  border: 1px solid #f5c6cb;
}

/* ═══════════════════════════════════════════════
   KDS — Kitchen Display System Station Styles
═══════════════════════════════════════════════ */

.kds-station-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  align-items: center;
}

.kds-station-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 30px;
  border: 1.5px solid var(--border);
  background: var(--bg-body);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.kds-station-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.kds-station-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}

.kds-station-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255,255,255,0.3);
  color: inherit;
}

.kds-station-tab:not(.active) .kds-station-count {
  background: var(--primary);
  color: #fff;
}

/* Mobile column filter tabs — visible only on small screens */
.kds-mobile-col-tabs {
  display: none;
}

@media (max-width: 1100px) {
  .kds-mobile-col-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 12px;
  }
  .kds-mobile-col-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 24px;
    border: 1.5px solid var(--border);
    background: var(--bg-body);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    white-space: nowrap;
  }
  .kds-mobile-col-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
  }
  .kds-mobile-col-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(59,130,246,0.25);
  }
  /* Hide non-selected columns on mobile */
  .kitchen-board[data-mobile-tab="ready"]    .kitchen-column[data-status="preparing"],
  .kitchen-board[data-mobile-tab="ready"]    .kitchen-column[data-status="pending"],
  .kitchen-board[data-mobile-tab="preparing"] .kitchen-column[data-status="ready"],
  .kitchen-board[data-mobile-tab="preparing"] .kitchen-column[data-status="pending"],
  .kitchen-board[data-mobile-tab="pending"]  .kitchen-column[data-status="ready"],
  .kitchen-board[data-mobile-tab="pending"]  .kitchen-column[data-status="preparing"] {
    display: none;
  }
}

/* Station Badges */
.kds-station-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.kds-station-kitchen { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.kds-station-barista,
.kds-station-bar     { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }
.kds-station-shisha  { background: #f3e5f5; color: #6a1b9a; border: 1px solid #e1bee7; }
.kds-station-none,
.kds-station-cashier { background: #f5f5f5; color: #757575; border: 1px solid #e0e0e0; }

/* KDS Order Card */
.kds-order-card {
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}

/* KDS Item Row */
.kds-item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px dashed var(--border);
}

.kds-item-row:last-child { border-bottom: none; }

/* KDS Empty State */
.kds-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
  gap: 8px;
  text-align: center;
  color: var(--text-secondary);
}

.kds-empty-icon { font-size: 2.2rem; margin-bottom: 4px; }
.kds-empty-state b { font-size: 1rem; color: var(--text-primary); }

/* Table Zones */
.table-zone-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.6;
  border: 1px solid transparent;
  vertical-align: middle;
}

.table-zone-indoor {
  background: #e8f0fe;
  color: #1a4fb6;
  border-color: #b9cdf6;
}

.table-zone-outdoor {
  background: #e6f4ea;
  color: #137333;
  border-color: #b7dfc1;
}

.table-zone-credit {
  background: #fff4e5;
  color: #b06000;
  border-color: #ffd54f;
  box-shadow: 0 0 0 2px rgba(176, 96, 0, 0.12);
}

.table-zone-kids {
  background: #fde8f3;
  color: #b0227a;
  border-color: #f6b9da;
}

.table-zone-staff {
  background: #ece8fd;
  color: #5a37c4;
  border-color: #cdc1f6;
}

.table-zone-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

/* ============================================================
   POS CASHIER REDESIGN
   ============================================================ */

/* Layout */
.pos-left-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pos-cart-panel {
  position: sticky;
  top: 16px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Row 1: order type tabs + table selector */
.pos-row1 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Row 2: product search + category + demo toggle */
.pos-row2 {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

.pos-product-search {
  flex: 1.5;
  min-width: 140px;
  padding: 0 12px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  background: #fff;
  direction: rtl;
  box-sizing: border-box;
}

/* Category picker — dropdown next to the search box (replaces the chip row) */
.pos-category-select {
  flex: 1;
  min-width: 132px;
  max-width: 230px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  direction: rtl;
  cursor: pointer;
  box-sizing: border-box;
}

/* ─── Category Section (sticky bar inside left panel) ──────── */
.pos-category-section {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--card);
  /* extend to panel edges to fill full width */
  margin-left: -18px;
  margin-right: -18px;
  padding: 8px 18px 6px;
  border-bottom: 2px solid var(--bg-strong);
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.pos-category-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: 7px;
  direction: rtl;
}

/* ═══════════════════════════════════════════════════════════════
   POS QUICK PRODUCTS STRIP
   ═══════════════════════════════════════════════════════════════ */
.pos-quick-products {
  background: #f0faf6;
  border: 1.5px solid #b2dfdb;
  border-radius: 12px;
  padding: 10px 14px 12px;
  direction: rtl;
}

.pos-quick-products-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.pos-quick-products-icon {
  font-size: 15px;
  line-height: 1;
}

.pos-quick-products-title {
  font-size: 12px;
  font-weight: 800;
  color: #0f5132;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pos-quick-products-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pos-quick-product-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: #fff;
  border: 1.5px solid #80cbc4;
  border-radius: 8px;
  padding: 7px 13px;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s, transform 0.1s;
  min-width: 72px;
  text-align: center;
}

.pos-quick-product-btn:hover {
  background: #e0f7f0;
  border-color: #26a69a;
  transform: translateY(-1px);
}

.pos-quick-product-btn:active {
  transform: translateY(0);
  background: #b2dfdb;
}

.pos-quick-product-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--mash-coffee);
  line-height: 1.2;
  white-space: nowrap;
}

.pos-quick-product-price {
  font-size: 11px;
  font-weight: 600;
  color: #26a69a;
}

@media (max-width: 700px) {
  .pos-quick-products-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .pos-quick-products-list::-webkit-scrollbar { display: none; }
  .pos-quick-product-btn { flex-shrink: 0; }
}

/* Category bubbles */
.pos-category-bubbles {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  overflow: visible;
  gap: 7px;
  padding: 2px 0 4px;
  direction: rtl;
}

.pos-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  min-height: 42px;
  box-sizing: border-box;
}
.pos-category-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(30, 79, 168, 0.05);
}
.pos-category-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 12px rgba(30, 79, 168, 0.30);
}

.pos-category-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.12);
  border-radius: 12px;
  padding: 1px 7px;
  min-width: 22px;
  height: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}
.pos-category-chip-offer {
  border-color: rgba(247, 148, 29,0.55);
  background: linear-gradient(135deg, #fff8ec, #fff);
  color: #e07b00;
}
.pos-category-chip-offer:hover {
  border-color: #e07b00;
  color: #e07b00;
  background: #fff3da;
}
.pos-category-chip-offer.active {
  background: linear-gradient(135deg, #c7923e, #e07b00);
  border-color: #e07b00;
  color: #fff;
  box-shadow: 0 3px 12px rgba(165,104,30,0.35);
}

.pos-category-chip.active .pos-category-chip-count {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

.pos-demo-toggle {
  height: 38px;
  padding: 0 13px;
  font-size: 0.78rem;
  border-radius: 10px;
  white-space: nowrap;
  color: var(--muted);
  box-sizing: border-box;
}

/* "اختيار طاولة" button */
.pos-choose-table-btn {
  font-size: 0.88rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 10px;
  white-space: nowrap;
}

/* Selected table pill (row 1) */
.pos-selected-table-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #fff8ed;
  border: 1.5px solid rgba(247, 148, 29,0.55);
  border-radius: 999px;
  padding: 6px 10px 6px 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(247, 148, 29,0.12);
}

.pos-change-table-btn {
  background: rgba(247, 148, 29,0.1);
  border: 1px solid rgba(247, 148, 29,0.6);
  border-radius: 999px;
  font-size: 0.75rem;
  color: #8a4e00;
  cursor: pointer;
  padding: 2px 11px;
  font-weight: 800;
  transition: background 0.1s, border-color 0.1s;
}
.pos-change-table-btn:hover { background: rgba(247, 148, 29,0.22); border-color: rgba(247, 148, 29,0.9); }

.pos-clear-table-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  font-weight: 700;
}
.pos-clear-table-btn:hover { color: #c00; }

.pos-session-badge {
  background: rgba(183,121,31,0.15);
  color: #7a4e00;
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 1px 8px;
}

/* Cart table info strip */
.pos-cart-table-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #fff8ed;
  border: 1px solid rgba(247, 148, 29,0.3);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.pos-new-table-order-banner { direction:rtl; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 9px; margin-bottom:10px; background:#fff8e7; border:1px solid #ebcb7a; border-radius:9px; color:#76530d; }
.pos-new-table-order-banner span { min-width:0; display:flex; flex-direction:column; gap:1px; font-size:.78rem; }
.pos-new-table-order-banner small { color:#8d7642; font-size:.7rem; }

/* Submitted activity for the selected table; deliberately separate from the cart. */
.pos-table-orders {
  direction: rtl;
  background: linear-gradient(135deg, #f4fbf9, #fff);
  border: 1px solid #b9dfd8;
  border-radius: 12px;
  padding: 9px 10px;
  margin-bottom: 10px;
  min-width: 0;
}
.pos-table-orders-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.pos-table-orders-head b { display:flex; align-items:center; flex-wrap:wrap; gap:5px; color:#0d625a; font-size:.86rem; min-width:0; }
.pos-table-orders-head b > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:132px; }
.pos-table-orders-head b em { font-style:normal; background:#e0f3ec; color:#087f5b; border-radius:999px; padding:1px 6px; font-size:.64rem; }
.pos-table-orders-head > div > span { display:block; margin-top:2px; color:var(--muted); font-size:.76rem; font-weight:600; }
.pos-table-orders-loader { width:14px; height:14px; border:2px solid #b5d9d3; border-top-color:var(--primary); border-radius:50%; animation:pos-table-orders-spin .7s linear infinite; flex:0 0 auto; }
@keyframes pos-table-orders-spin { to { transform:rotate(360deg); } }
.pos-table-orders-error { color:#b42318; font-size:.75rem; margin-top:6px; }
.pos-table-orders-label { color:#47716b; font-size:.7rem; font-weight:800; margin:8px 0 4px; }
.pos-table-orders-list { display:flex; flex-direction:column; gap:6px; max-height:250px; overflow-y:auto; padding:1px 2px 1px 0; scrollbar-width:thin; }
.pos-table-order-card { direction:rtl; min-width:0; border:1px solid #d5e7e3; background:#fff; border-radius:8px; padding:7px 8px; color:var(--ink); }
.pos-table-order-card-head { display:flex; align-items:center; justify-content:space-between; gap:7px; }
.pos-table-order-card-head b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.77rem; }
.pos-table-order-card-head .badge { flex:0 0 auto; font-size:.63rem; }
.pos-table-order-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:7px 0; color:var(--muted); font-size:.74rem; }
.pos-table-order-meta b { margin-right:auto; color:#087f5b; }
.pos-table-order-items > div { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; border-top:1px solid #eef3f2; padding:4px 0; font-size:.76rem; }
.pos-table-order-items small { display:block; color:var(--muted); margin-top:2px; }
.pos-table-order-items .badge { font-size:.64rem; white-space:nowrap; }

@media (max-width: 620px) {
  .pos-new-table-order-banner { align-items:flex-start; }
  .pos-new-table-order-banner .btn { flex:0 0 auto; }
}

/* ── System action confirm modal ─────────────────────────── */
.sys-action-modal-box {
  text-align: center;
  padding: 36px 32px 28px;
  max-width: 400px;
}
.sys-action-icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
  line-height: 1;
}
.sys-action-title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
}
.sys-action-body {
  color: #6b7280;
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0 0 24px;
}
.sys-action-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.sys-action-btns .btn {
  min-width: 110px;
  font-size: 0.92rem;
}

/* ── POS cashier-disabled full error page ────────────────── */
.pos-system-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px 24px;
}
.pos-system-error-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
}
.pos-system-error-title {
  margin: 0 0 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #b45309;
}
.pos-system-error-msg {
  font-size: 1rem;
  color: #374151;
  margin: 0 0 6px;
  font-weight: 600;
}
.pos-system-error-sub {
  font-size: 0.88rem;
  color: #9ca3af;
  margin: 0;
}

/* ── Customer menu closed page ───────────────────────────── */
.customer-menu-closed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  padding: 40px 24px;
}
.customer-menu-closed-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}
.customer-menu-closed-title {
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #f4f6fb;
}
.customer-menu-closed-msg {
  font-size: 1.1rem;
  font-weight: 700;
  color: #F87171;
  margin: 0 0 8px;
}
.customer-menu-closed-sub {
  font-size: 0.9rem;
  color: #8d9bbd;
  margin: 0;
}

/* ---- Table picker modal ---- */
.pos-table-modal {
  position: fixed;
  inset: 0;
  background: rgba(19, 42, 93,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 16px;
}

/* Pickers opened from inside a .modal dialog (z-index 1300) must stack above it,
   otherwise they paint behind its backdrop and swallow every click. */
.pos-table-modal.pos-table-modal--above-modal {
  z-index: 1400;
}

.pos-table-modal-box {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 64px rgba(19, 42, 93,0.22);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pos-table-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.pos-table-modal-head h3 { margin: 0; font-size: 1.1rem; }

.pos-table-modal-search {
  display: block;
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  direction: rtl;
  background: #fafafa;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}
.pos-table-modal-search:focus {
  border-color: var(--primary);
  background: #fff;
}

.pos-table-modal-zones {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 16px 0;
}

.pos-table-modal-status-bar {
  display: flex;
  gap: 6px;
  padding: 6px 16px 0;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
}
.pos-table-modal-status-bar .zone-chip { font-size: 0.74rem; padding: 3px 10px; }

.zone-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 13px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  background: #f4f4f4;
  color: var(--ink);
  transition: background 0.1s, border-color 0.1s;
}
.zone-chip.active,
.zone-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.zone-chip-indoor.active  { background: #1a4fb6; border-color: #1a4fb6; }
.zone-chip-outdoor.active { background: #137333; border-color: #137333; }
.zone-chip-credit.active  { background: #b06000; border-color: #b06000; }
.zone-chip-kids.active    { background: #b0227a; border-color: #b0227a; }
.zone-chip-staff.active   { background: #5a37c4; border-color: #5a37c4; }

.pos-table-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  padding: 12px 16px 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.15) transparent;
}
.pos-table-modal-grid::-webkit-scrollbar {
  width: 4px;
}
.pos-table-modal-grid::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 4px;
}
.pos-table-modal-grid::-webkit-scrollbar-track {
  background: transparent;
}

/* Modal table card */
.pos-modal-table-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px 10px 9px;
  text-align: right;
  display: flex;
  flex-direction: column;
  min-height: 88px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  user-select: none;
}
.pos-modal-table-card:hover { border-color: rgba(247, 148, 29,0.8); box-shadow: 0 4px 14px rgba(247, 148, 29,0.18); transform: translateY(-1px); }
.pos-modal-table-card:active { transform: translateY(0); }
.pos-modal-table-card.available { border-color: rgba(22,128,87,.35); background: linear-gradient(160deg,#fff 60%,#f0fbf6); }
.pos-modal-table-card.occupied  { border-color: rgba(198,40,40,.35); background: linear-gradient(160deg,#fff 60%,#fff5f5); }
.pos-modal-table-card.reserved  { border-color: rgba(37,99,168,.3);  background: linear-gradient(160deg,#fff 60%,#f0f6ff); }
.pos-modal-table-card.locked    { border-color: #ddd; background: #f6f6f6; opacity: 0.55; cursor: not-allowed; }
.pos-modal-table-card.locked:hover { transform: none; box-shadow: none; border-color: #ddd; }
.pos-modal-table-card.selected  { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(247, 148, 29,0.25); }
.pos-modal-table-name { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); line-height: 1.3; flex: 1; }

.pos-modal-card-top {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.pos-modal-table-num {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}

.pos-modal-table-name {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Product meta bar (count) */
.pos-products-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 2px 2px 6px;
}

.pos-products-count {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

/* Empty state */
.pos-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
}
.pos-empty-icon { font-size: 2.4rem; }
.pos-empty-state p { margin: 0; font-size: 0.95rem; font-weight: 600; }
.pos-empty-state .btn { font-size: 0.83rem; padding: 7px 18px; }

/* ---- Product grid ---- */
.pos-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(162px, 1fr));
  gap: 10px;
}

/* ---- Image-free cashier product list ---- */
.pos-prod-list { display: flex; flex-direction: column; gap: 6px; }
.pos-prod-group { display: flex; flex-direction: column; gap: 6px; }
.pos-prod-group + .pos-prod-group { margin-top: 6px; }
.pos-prod-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 4px 5px;
  font-size: 0.8rem; font-weight: 800; color: var(--muted);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1;
  background: var(--card);
}
.pos-prod-group-head span:last-child { font-weight: 600; opacity: 0.65; }

.pos-prod-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: right; font-family: inherit;
  padding: 11px 14px; min-height: 52px;
  border: 1px solid var(--border);
  border-right: 3px solid #b9b9b9;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.06s;
}
.pos-prod-row.barista { border-right-color: #1a4fb6; }
.pos-prod-row.kitchen { border-right-color: #c0392b; }
.pos-prod-row.shisha  { border-right-color: #5a37c4; }
.pos-prod-row.offer   { border-right-color: #c7923e; }
.pos-prod-row:hover   { background: #faf6ec; border-color: #d9c9a3; }
.pos-prod-row:active  { transform: scale(0.995); }

.pos-prod-row-name {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  min-width: 0; font-size: 0.95rem; font-weight: 600; color: var(--ink); line-height: 1.35;
}
.pos-prod-row-sub {
  flex-basis: 100%; font-size: 0.78rem; font-weight: 400; color: var(--muted);
}
.pos-prod-row-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.pos-prod-row-price {
  display: flex; flex-direction: column; align-items: flex-end;
  font-size: 0.95rem; font-weight: 800; color: #1e4fa8; white-space: nowrap;
}
.pos-prod-row-savings { font-size: 0.72rem; font-weight: 700; color: #2e7d32; }
.pos-prod-row-add {
  font-size: 0.82rem; font-weight: 800; color: #fff;
  background: #b0791e; padding: 7px 15px; border-radius: 8px; white-space: nowrap;
}
.pos-prod-row:hover .pos-prod-row-add { background: #97671a; }

@media (max-width: 560px) {
  .pos-prod-row { padding: 10px 12px; min-height: 48px; }
  .pos-prod-row-name { font-size: 0.88rem; }
  .pos-prod-row-add { padding: 6px 12px; }
}

/* ---- Product card ---- */
.pos-product {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 152px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: right;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(20, 33, 61,0.06);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

/* Colored top accent bar by station */
.pos-product::before {
  content: "";
  display: block;
  height: 3px;
  flex-shrink: 0;
  background: var(--primary);
}
.pos-product.barista::before { background: #1a4fb6; }
.pos-product.kitchen::before { background: #c0392b; }
.pos-product.shisha::before  { background: #5a37c4; }

/* Hover state — default */
.pos-product:hover {
  border-color: rgba(247, 148, 29,0.55);
  box-shadow: 0 6px 22px rgba(247, 148, 29,0.18);
  transform: translateY(-2px);
}
/* Hover state — station tint */
.pos-product.barista:hover { border-color: rgba(26,79,182,0.4); box-shadow: 0 6px 20px rgba(26,79,182,0.14); }
.pos-product.kitchen:hover { border-color: rgba(192,57,43,0.4); box-shadow: 0 6px 20px rgba(192,57,43,0.14); }
.pos-product.shisha:hover  { border-color: rgba(90,55,196,0.4); box-shadow: 0 6px 20px rgba(90,55,196,0.14); }
/* Press effect */
.pos-product:active { transform: translateY(0) scale(0.98); transition: none; }

/* Meta row: category label + station badge */
.pos-product-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px 0;
  flex-shrink: 0;
}

.pos-product-cat {
  font-size: 0.67rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

/* Station badge pill */
.pos-route-badge {
  font-size: 0.63rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 8px;
  line-height: 1.5;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.pos-route-badge.barista { background: #e8f0fe; color: #1a4fb6; }
.pos-route-badge.kitchen { background: #fdecea; color: #b71c1c; }
.pos-route-badge.shisha  { background: #ece8fd; color: #5a37c4; }

/* Product name */
.pos-product-name {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.38;
  padding: 4px 11px 0;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Footer: price + add button */
.pos-product-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  padding: 6px 10px 8px;
  border-top: 1px solid rgba(20, 33, 61,0.06);
  background: #f9f8f6;
  flex-shrink: 0;
}

.pos-product-price {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.08rem;
  font-weight: 900;
  color: #1b7a42;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "+ إضافة" button */
.pos-add-btn {
  flex: 0 0 auto;
  font-size: 0.77rem;
  font-weight: 800;
  padding: 0 14px;
  min-height: 34px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, transform 0.08s;
}
.pos-add-btn:hover  { background: #e07b00; }
.pos-add-btn:active { transform: scale(0.94); }

/* Offer card accent + badge + savings tag */
.pos-product.offer::before { background: linear-gradient(90deg, #c7923e, #e0b15a); }
.pos-product.offer:hover { border-color: rgba(247, 148, 29,0.5); box-shadow: 0 6px 20px rgba(247, 148, 29,0.2); }
.pos-route-badge.offer { background: #fff3da; color: #e07b00; }
.pos-offer-savings {
  font-size: 0.7rem;
  font-weight: 800;
  color: #1b7a42;
  background: #eafaf0;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* Cart panel */
.pos-cart-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pos-cart-header h2 { margin: 0; }

.pos-cart-count {
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 9px;
}

.pos-last-order { font-size: 0.9rem; }

.pos-cart-items { flex: 1; }

.pos-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 0 20px;
  color: var(--muted);
}
.pos-cart-empty span { font-size: 2rem; }
.pos-cart-empty p { margin: 0; font-size: 0.9rem; }

/* Cart line */
.pos-cart-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.pos-cart-line-offer {
  background: #fffaf1;
  border-radius: 8px;
  padding: 11px 8px;
  margin: 0 -8px;
}

.pos-cart-line-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pos-cart-line-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.pos-cart-line-unit {
  font-size: 0.75rem;
  color: var(--muted);
}

.pos-cart-notes {
  font-size: 0.78rem;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 100%;
  background: #fafafa;
  direction: rtl;
}

.pos-cart-line-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.pos-qty-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pos-qty-num {
  font-size: 1rem;
  min-width: 22px;
  text-align: center;
}

.pos-cart-line-total {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}

/* Remove button — visible red */
.pos-remove-btn {
  background: #fff0f0;
  border: 1px solid #f5c6c6;
  border-radius: 7px;
  font-size: 0.82rem;
  cursor: pointer;
  color: #c00;
  padding: 3px 7px;
  line-height: 1;
  transition: background 0.12s, border-color 0.12s;
}
.pos-remove-btn:hover { background: #c00; color: #fff; border-color: #c00; }

/* Totals */
.pos-totals {
  border-top: 1px solid var(--border);
  margin-top: 10px;
  padding-top: 10px;
  display: grid;
  gap: 7px;
}
.pos-totals-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
}
.pos-totals-grand {
  font-size: 1.35rem;
  font-weight: 900;
  border-top: 2px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}
.pos-totals-grand strong { color: var(--primary); }

/* Cart action buttons */
.pos-cart-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.pos-submit-btn {
  flex: 1;
  font-size: 1rem;
  font-weight: 800;
  padding: 12px;
}

/* Responsive */
@media (max-width: 1100px) {
  .pos-cart-panel { position: static; }
  .pos-products { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* Stack footer (price above button) when viewport narrows enough
   that cards are too small to fit both side-by-side */
@media (max-width: 900px) {
  .pos-product-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }
  .pos-add-btn {
    width: 100%;
    min-height: 36px;
    text-align: center;
  }
}

@media (max-width: 760px) {
  .section.pos, section.pos {
    flex-direction: column-reverse;
  }
  .pos-cart-panel {
    width: 100%;
    max-height: none;
  }
  .pos-left-panel { width: 100%; }
  .pos-products { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 700px) {
  .pos-table-modal-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .pos-table-modal-box { max-height: 96vh; }
  .pos-row2 { gap: 6px; }
  .pos-product-search { min-width: 0; flex: 1; }
  .pos-category-chip { padding: 7px 13px; font-size: 0.83rem; min-height: 38px; }
  .pos-category-bubbles { gap: 6px 6px; }
}

/* ─── Delivery Module ──────────────────────────────────────── */

.delivery-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 4px;
}

.delivery-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.delivery-page-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 4px; }
.delivery-page-sub { color: var(--muted, #888); font-size: .875rem; margin: 0; }
.delivery-page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.delivery-filters-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.delivery-seg { flex-wrap: wrap; gap: 4px; }
.delivery-search-input { flex: 1 1 220px; min-width: 0; }

.delivery-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Delivery Card */
.delivery-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.delivery-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.delivery-card-number { font-weight: 700; font-size: 1rem; }
.delivery-card-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Status badges */
.delivery-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.delivery-badge-pending  { background: #fef9c3; color: #854d0e; }
.delivery-badge-preparing { background: #dbeafe; color: #1e40af; }
.delivery-badge-out      { background: #ede9fe; color: #5b21b6; }
.delivery-badge-delivered { background: #dcfce7; color: #166534; }
.delivery-badge-cancelled { background: #fee2e2; color: #991b1b; }

.delivery-pay-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
}
.delivery-pay-badge.paid   { background: #dcfce7; color: #166534; }
.delivery-pay-badge.unpaid { background: #fef3c7; color: #92400e; }

.delivery-source-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: .72rem;
  background: #f3f4f6;
  color: #6b7280;
}

.delivery-card-customer { display: flex; flex-direction: column; gap: 4px; }
.delivery-customer-name { font-weight: 600; font-size: .95rem; }
.delivery-customer-phone { color: var(--primary, #2563eb); font-size: .875rem; text-decoration: none; }
.delivery-customer-phone:hover { text-decoration: underline; }
.delivery-card-address { font-size: .8rem; color: var(--muted, #666); }
.delivery-card-notes   { font-size: .8rem; color: var(--muted, #666); font-style: italic; }

.delivery-card-items { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border, #e5e7eb); padding-top: 10px; }
.delivery-item-row { display: flex; justify-content: space-between; font-size: .85rem; }

.delivery-card-footer { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border, #e5e7eb); padding-top: 10px; }
.delivery-card-total { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: var(--muted, #666); }
.delivery-card-total strong { font-size: 1rem; color: var(--text, #111); margin-right: auto; }
.delivery-person-row { font-size: .82rem; color: var(--muted, #666); }
.delivery-card-time  { font-size: .78rem; color: #aaa; }

.delivery-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.delivery-advance-btn { background: var(--primary, #2563eb); color: #fff; }
.delivery-advance-btn:hover { background: var(--primary-dark, #1d4ed8); }
.delivery-cancel-btn  { color: var(--danger, #dc2626); border-color: var(--danger, #dc2626); }
.delivery-cancel-btn:hover { background: #fee2e2; }

.delivery-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted, #888);
}
.delivery-empty-icon { font-size: 3rem; display: block; margin-bottom: 12px; }

/* POS Delivery Panel */
.pos-delivery-panel {
  margin: 6px 0 2px;
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  border-radius: 12px;
  padding: 14px 16px;
}
.pos-delivery-panel-title {
  font-size: .85rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 12px;
  letter-spacing: .01em;
}
.delivery-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.delivery-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.delivery-field label {
  font-size: .8rem;
  font-weight: 600;
  color: #6b7280;
}
.delivery-field .input,
.delivery-field input.input,
.delivery-field textarea.input {
  font-size: .875rem;
  padding: 8px 10px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.delivery-field .input:focus,
.delivery-field input.input:focus,
.delivery-field textarea.input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,.18);
  outline: none;
}
.delivery-field-textarea {
  resize: none;
  line-height: 1.5;
}
.delivery-field-full {
  grid-column: 1 / -1;
}
.req-star { color: #dc2626; }

.delivery-source-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.delivery-source-chip {
  padding: 5px 13px;
  border-radius: 20px;
  border: 1.5px solid #d1d5db;
  background: #fff;
  font-size: .8rem;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
  color: #374151;
}
.delivery-source-chip:hover {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}
.delivery-source-chip.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}
.delivery-customer-found {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: .82rem;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.delivery-customer-new {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: .82rem;
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.delivery-customer-lookup {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: .82rem;
  background: #f3f4f6;
  color: #6b7280;
}
@media (max-width: 700px) {
  .delivery-form-grid { grid-template-columns: 1fr; }
}

/* Delivery Create Modal */
.delivery-create-modal-box {
  width: min(1100px, 98vw);
  max-width: min(1100px, 98vw);
  height: 94vh;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-radius: 14px;
}
.modal:has(.delivery-create-modal-box) {
  align-items: flex-start;
  padding: 10px;
}

.delivery-create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  position: sticky;
  top: 0;
  background: var(--card-bg, #fff);
  z-index: 2;
}
.delivery-create-head h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }

.delivery-create-body {
  display: grid;
  grid-template-columns: 340px 1fr;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.delivery-create-form-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  overflow-y: auto;
  border-left: 1px solid var(--border, #e5e7eb);
}
.delivery-form-section-title { margin: 0 0 4px; font-size: .9rem; font-weight: 600; color: var(--muted, #666); }
.delivery-form-group { display: flex; flex-direction: column; gap: 4px; }
.delivery-form-group label { font-size: .82rem; font-weight: 500; color: var(--muted, #555); }
.delivery-form-group .input { font-size: .875rem; }
.delivery-form-row { display: flex; gap: 8px; }
.delivery-form-row .delivery-form-group { flex: 1 1 0; }
.delivery-textarea { resize: none; }
.req-star { color: var(--danger, #dc2626); }

.delivery-create-cart-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  flex: 1 1 0;
  overflow-y: auto;
}
.delivery-cart-empty-hint { text-align: center; color: var(--muted, #888); font-size: .85rem; padding: 16px; }
.delivery-cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface, #f9fafb);
  border-radius: 8px;
  font-size: .875rem;
}
.delivery-cart-item-name { flex: 1 1 0; min-width: 0; }
.delivery-cart-item-controls { display: flex; align-items: center; gap: 6px; }
.delivery-cart-item-price { font-weight: 600; min-width: 60px; text-align: left; }
.delivery-cart-totals { border-top: 1px solid var(--border, #e5e7eb); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.delivery-cart-total-row { display: flex; justify-content: space-between; font-size: .875rem; }
.delivery-cart-grand { font-weight: 700; font-size: .95rem; }

.delivery-submit-btn.wide { width: 100%; margin-top: auto; }

.delivery-create-products-col {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.delivery-products-search-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.delivery-products-search-row .input { flex: 1 1 0; min-width: 0; font-size: .875rem; }
.delivery-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
  flex: 1 1 0;
  align-content: start;
}
.delivery-product-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: border-color .15s, box-shadow .15s;
}
.delivery-product-card:hover { border-color: var(--primary, #2563eb); box-shadow: 0 2px 8px rgba(37,99,235,.12); }
.delivery-product-card.in-cart { border-color: var(--primary, #2563eb); background: #eff6ff; }
.delivery-product-name { font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.delivery-product-price { font-size: .82rem; color: var(--muted, #666); }
.delivery-product-qty {
  position: absolute;
  top: -7px;
  inset-inline-end: -7px;
  background: var(--primary, #2563eb);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.delivery-no-products { grid-column: 1/-1; text-align: center; color: var(--muted, #888); font-size: .875rem; padding: 24px; }

@media (max-width: 800px) {
  .delivery-create-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .delivery-create-form-col { border-left: none; border-bottom: 1px solid var(--border, #e5e7eb); max-height: 50vh; }
  .delivery-create-modal-box { height: 98vh; }
  .delivery-cards-grid { grid-template-columns: 1fr; }
}

/* Customer type badges */
.customer-delivery-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.customer-credit-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .02em;
}


/* Products page tabs */
.products-page-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border, #e5e7eb);
}
.products-page-tab {
  padding: 8px 22px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: .925rem;
  font-weight: 600;
  color: var(--muted, #666);
  cursor: pointer;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.products-page-tab.active {
  color: var(--primary, #2563eb);
  border-bottom-color: var(--primary, #2563eb);
}
.products-page-tab:hover { color: var(--primary, #2563eb); }

/* ═══════════════════════════════════════════════════════════════
   ADMIN OFFERS SECTION
   ═══════════════════════════════════════════════════════════════ */

.offer-admin-section { padding: 4px 0; }

.offer-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.offer-admin-header-title { margin: 0 0 4px; font-size: 1.15rem; font-weight: 700; }
.offer-admin-header-sub { color: var(--muted, #666); font-size: .875rem; margin: 0; }

.offer-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.offer-admin-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .15s;
  display: flex;
  flex-direction: column;
}

.offer-admin-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.1); }
.offer-admin-card--inactive { opacity: .6; }

.offer-admin-card-img {
  height: 130px;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.offer-admin-card-img img { width: 100%; height: 100%; object-fit: cover; }

.offer-admin-card-img--placeholder span {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary, #2563eb);
  opacity: .25;
}

.offer-admin-badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  background: var(--primary, #2563eb);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}

/* Alias for backward compat */
.offer-badge { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--primary, #2563eb); color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; }

.offer-admin-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.offer-admin-card-title { margin: 0; font-size: .95rem; font-weight: 700; }

.offer-admin-card-products { font-size: .8rem; color: var(--muted, #666); margin: 0; }

.offer-admin-card-prices { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.offer-admin-original { text-decoration: line-through; color: var(--muted, #999); font-size: .82rem; }
.offer-admin-price { font-weight: 700; font-size: 1rem; color: var(--primary, #2563eb); }
.offer-admin-savings { background: #dcfce7; color: #166534; font-size: .75rem; padding: 2px 8px; border-radius: 100px; font-weight: 600; }

.offer-admin-card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.offer-admin-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }

/* ═══════════════════════════════════════════════════════════════
   OFFER FORM MODAL
   ═══════════════════════════════════════════════════════════════ */

.offer-form-modal-box {
  max-width: 960px;
  width: 96vw;
  max-height: 92vh;
  overflow-y: auto;
}

.offer-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 4px;
}

@media (max-width: 700px) { .offer-form-grid { grid-template-columns: 1fr; } }

.offer-form-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.offer-form-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .offer-form-row2 { grid-template-columns: 1fr; } }

.offer-form-toggles { display: flex; gap: 20px; margin-top: 4px; flex-wrap: wrap; }
.field-inline { display: flex; align-items: center; gap: 8px; font-size: .875rem; }

/* Product picker */
.offer-product-picker { display: flex; flex-direction: column; gap: 8px; }
.offer-picker-header { display: flex; align-items: center; justify-content: space-between; }
.offer-picker-header b { font-size: .875rem; }

.offer-product-search {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 0 10px;
  font-size: .875rem;
}

.offer-product-picker-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
}

/* New row-based picker (replaces old button-only design) */
.offer-product-pick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--surface, #f9fafb);
  transition: background .12s;
}
.offer-product-pick-row:hover { background: #f0f4ff; border-color: #c7d2fe; }
.offer-product-pick-row.selected { background: #eff6ff; border-color: #bfdbfe; }

.offer-pick-info { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.offer-pick-name { font-size: .82rem; font-weight: 600; }
.offer-pick-meta { font-size: .74rem; opacity: .65; }

.offer-pick-add-btn {
  flex-shrink: 0;
  height: 30px;
  min-width: 60px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1.5px solid var(--primary, #2563eb);
  background: #fff;
  color: var(--primary, #2563eb);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all .12s;
}
.offer-pick-add-btn:hover { background: var(--primary, #2563eb); color: #fff; }
.offer-pick-add-btn.added {
  background: #dcfce7;
  border-color: #16a34a;
  color: #15803d;
  cursor: default;
}

/* Selected product rows */
.offer-selected-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1.5px solid #bbf7d0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f0fdf4;
  margin-top: 4px;
}

.offer-selected-rows-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.offer-selected-rows-title { font-size: .875rem; font-weight: 700; color: #166534; }
.offer-selected-rows-count { font-size: .78rem; color: #16a34a; font-weight: 600; }

.offer-selected-empty {
  font-size: .8rem;
  color: #9ca3af;
  text-align: center;
  padding: 8px 0 2px;
}

.offer-selected-product-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #d1fae5;
  font-size: .82rem;
}

.offer-sel-name { flex: 1 1 0; min-width: 0; font-weight: 600; }
.offer-sel-unit { min-width: 50px; text-align: end; color: #6b7280; font-size: .78rem; }
.offer-qty-input { width: 52px; text-align: center; padding: 4px 6px; font-size: .875rem; border: 1px solid var(--border, #e5e7eb); border-radius: 6px; }
.offer-sel-total { min-width: 60px; text-align: end; font-weight: 700; color: #166534; }
.offer-sel-remove { color: #dc2626; border-color: transparent; background: transparent; }

/* Price summary */
.offer-price-summary {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface, #f9fafb);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.offer-price-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .875rem;
}

.offer-price-summary-main {
  gap: 10px;
}

.offer-price-input {
  width: 120px;
  height: 38px;
  border: 1.5px solid var(--primary, #2563eb);
  border-radius: 8px;
  padding: 0 10px;
  font-size: .925rem;
  font-weight: 700;
  text-align: end;
}

.offer-savings-row { color: #166534; }
.offer-savings-amount { color: #166534; }

.offer-price-warning {
  font-size: .8rem;
  color: #b45309;
  background: #fef3c7;
  border-radius: 6px;
  padding: 5px 10px;
}

/* Offer image upload */
.offer-image-upload-area { display: flex; flex-direction: column; gap: 6px; }

.offer-image-preview {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 1.5px dashed rgba(247, 148, 29,.4);
  border-radius: 12px;
  background: #f0fdf4;
  overflow: hidden;
}

.offer-image-preview.has-image {
  border-style: solid;
  border-color: var(--primary, #1e4fa8);
  background: #fff;
}

.offer-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.offer-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted, #9ca3af);
}

.offer-image-placeholder-icon {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary, #1e4fa8);
  opacity: .4;
}

.offer-image-placeholder small { font-size: .72rem; }

.offer-upload-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.offer-upload-btn {
  cursor: pointer;
  font-size: .82rem;
  padding: 5px 14px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.offer-upload-status { font-size: .78rem; color: var(--muted, #6b7280); }
.offer-upload-status.success { color: #16a34a; }
.offer-upload-status.error { color: #dc2626; }

/* Numeric inputs: LTR, no RTL cursor problems */
.numeric-input {
  direction: ltr;
  text-align: center;
}

/* Remove browser spinners from any remaining number inputs in offers */
.offer-form-modal-box input[type="number"]::-webkit-outer-spin-button,
.offer-form-modal-box input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.offer-form-modal-box input[type="number"] { -moz-appearance: textfield; }

/* Backward compat aliases */
.offer-savings-hint { background: #dcfce7; color: #166534; font-size: .78rem; padding: 2px 8px; border-radius: 100px; font-weight: 600; margin-inline-start: 8px; }
.offer-original-total { text-align: end; font-size: .875rem; color: var(--muted, #666); margin-top: 8px; }
.offer-price-row { margin-top: 4px; }

/* Legacy online-offer-* aliases so nothing breaks if used elsewhere */
.online-offer-badge { position: absolute; top: 8px; inset-inline-start: 8px; background: #ffc20e; color: #0a1a3f; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; }
.online-offers-section { padding: 20px 0 8px; }
.online-offers-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 14px; }
.online-offer-card { display: flex; flex-direction: column; }

/* Online order form modal */
/* Online checkout modal sits above the cart bar (z-index: 999) */
.modal:has(.online-order-form-box) {
  z-index: 1500;
}

.online-order-form-box {
  max-width: 500px;
  width: 95vw;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--menu-bg, #fff);
  padding-bottom: 24px;
}
.online-order-form-box .btn[type="submit"] {
  background: var(--menu-button, #ffc20e);
  color: var(--menu-button-text, #0a1a3f);
  box-shadow: none;
}
.online-order-form-box .btn[type="submit"]:hover {
  background: var(--menu-button, #ffc20e);
  filter: brightness(0.9);
  transform: none;
  box-shadow: none;
}
.online-order-form-cart-summary {
  background: var(--surface, #f9fafb);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: .875rem;
}
.online-order-cart-line {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.online-order-cart-line span:first-child { flex: 1 1 0; }
.online-order-cart-total { font-weight: 700; margin-top: 8px; text-align: end; font-size: .95rem; color: var(--menu-accent, inherit); }
.online-order-note { font-size: .78rem; color: var(--muted, #999); margin-top: 4px; text-align: end; }
.online-order-type-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  background: var(--surface, #f3f4f6);
  border-radius: 10px;
  padding: 4px;
}
.online-order-type-tab {
  flex: 1 1 0;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted, #666);
  cursor: pointer;
  transition: all .15s;
}
.online-order-type-tab.active {
  background: var(--menu-accent, #ffc20e);
  color: #0a1a3f;
}

/* Hidden cart bar */
.hidden-bar { visibility: hidden; pointer-events: none; }

/* Online ordering cart bar — fixed, always visible when items exist */
.online-menu-cart-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 24px));
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--menu-primary, #0e2352);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-weight: 700;
}
.online-cart-bar-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  flex: 1 1 0;
  min-width: 0;
}

.online-cart-bar-icon { font-size: 18px; }
.online-cart-bar-sep { opacity: 0.5; }
.online-cart-bar-btn {
  border: none;
  border-radius: 12px;
  padding: 10px 22px;
  background: var(--menu-accent, #ffc20e);
  color: var(--menu-button-text, #0a1a3f);
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.online-cart-bar-btn:hover { filter: brightness(0.9); }

/* Pad page bottom so content isn't hidden under the fixed online cart bar */
.customer-menu-page.has-online-cart {
  padding-bottom: 90px;
}

/* ══════════════════════════════════════════════════════════════
   CUSTOMER CONTACT / LOCATION SECTION
   A dark "brand band" — deliberately NOT theme-adaptive to the rest of the
   customer menu (light brochure vs dark visual). It reuses the same
   primaryColor/accentColor/heroTextColor pairing already used on the hero
   section, so admins tune it from the existing color settings and it always
   reads as an intentional brand moment rather than a mismatched card grid.
══════════════════════════════════════════════════════════════ */

.customer-contact-section {
  margin-top: 34px;
  padding: 64px 56px;
  background: var(--menu-primary, #0a1a3f);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

.customer-contact-decor-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--menu-accent, #ffc20e);
  pointer-events: none;
}

.customer-contact-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.customer-contact-kicker {
  display: block;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .16em;
  color: var(--menu-accent, #ffc20e);
  margin-bottom: 10px;
}

.customer-contact-header h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--menu-hero-text, #f4f6fb);
  margin: 0 0 8px;
}

.customer-contact-header p {
  font-size: .9rem;
  color: var(--menu-hero-text, #8d9bbd);
  opacity: .65;
  margin: 0;
}

.customer-contact-main {
  display: flex;
  gap: 56px;
  align-items: stretch;
  position: relative;
}

.customer-contact-list {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.customer-contact-row { display: flex; gap: 16px; align-items: flex-start; }
.customer-contact-row.align-center { align-items: center; }
.customer-contact-row-icon { flex-shrink: 0; font-size: 1.3rem; line-height: 1; margin-top: 2px; }
.customer-contact-row.align-center .customer-contact-row-icon { margin-top: 0; }
.customer-contact-row-label { font-size: .78rem; font-weight: 700; letter-spacing: .05em; color: var(--menu-accent, #ffc20e); margin-bottom: 5px; }
.customer-contact-row-value { font-size: .92rem; color: var(--menu-hero-text, #c9d3ea); line-height: 1.65; max-width: 380px; }
.customer-contact-row-value.phone { font-weight: 700; font-size: 1.05rem; }

.customer-contact-divider { height: 1px; background: var(--menu-accent, #ffc20e); opacity: .16; }

.customer-contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.customer-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  transition: filter .15s, background .15s;
  white-space: nowrap;
  cursor: pointer;
}

.customer-contact-btn.primary {
  background: var(--menu-accent, #ffc20e);
  color: var(--menu-button-text, #0a1a3f);
}

.customer-contact-btn.primary:hover { filter: brightness(1.08); }

.customer-contact-btn.secondary {
  background: transparent;
  color: var(--menu-accent, #ffc20e);
  border: 1.5px solid var(--menu-accent, #ffc20e);
}

.customer-contact-btn.secondary:hover { background: rgba(255, 194, 14, 0.12); }

.customer-map-card {
  flex: 1 1 320px;
  min-height: 300px;
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--menu-accent, #ffc20e);
  background: #0e2352;
}

.customer-map-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 0;
}

.customer-map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 194, 14, .22) 1px, transparent 0);
  background-size: 26px 26px;
}

.customer-map-placeholder-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--menu-accent, #ffc20e);
}

.customer-map-pin-badge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.customer-map-pin-label {
  font-weight: 800;
  font-size: .85rem;
  color: var(--menu-hero-text, #f4f6fb);
  background: #0e2352;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--menu-accent, #ffc20e);
}

.customer-map-hint {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  text-align: center;
  font-size: .78rem;
  color: var(--menu-hero-text, #9C8D77);
  opacity: .7;
}

@media (max-width: 720px) {
  .customer-contact-section { padding: 36px 20px; border-radius: 20px; }
  .customer-contact-main { flex-direction: column; gap: 28px; }
  .customer-map-card { min-height: 260px; }
  .customer-contact-actions { flex-direction: column; align-items: stretch; }
  .customer-contact-btn { justify-content: center; }
}

/* ── Hero contact strip ────────────────────────────────────── */
/* One row per piece of info instead of a single-line pill — the pill forced
   everything (including a full address admins routinely paste here) onto one
   line, which overlapped/overflowed on mobile. Colors reuse the same
   primaryColor/accentColor/heroTextColor/buttonTextColor settings already
   used on the hero and the bottom contact-band section. */
.customer-hero-contact-strip {
  display: flex;
  flex-direction: column;
  background: var(--menu-primary, #0f224b);
  border: 1px solid rgba(255, 194, 14, 0.3);
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .35);
  margin-bottom: 14px;
  overflow: hidden;
}

.customer-hero-strip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}

.customer-hero-strip-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 194, 14, .14);
  border: 1px solid rgba(255, 194, 14, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.customer-hero-strip-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.customer-hero-strip-row-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--menu-accent, #ffc20e);
}

.customer-hero-strip-row-value {
  font-size: .92rem;
  font-weight: 600;
  color: var(--menu-hero-text, #f4f6fb);
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* The number keeps dir=ltr so its digits and "+" read correctly, but that also makes the
   block hug the LEFT edge; the label and the address sit on the right in this RTL card,
   so pin the number to the right with them. */
.customer-hero-strip-row-value.phone { text-align: right; }

.customer-hero-strip-divider {
  height: 1px;
  background: rgba(255, 194, 14, .18);
  margin: 0 16px;
}

.customer-hero-strip-cta-wrap { padding: 6px 14px 14px; }

.customer-hero-strip-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: 999px;
  background: var(--menu-accent, #ffc20e);
  color: var(--menu-button-text, #0a1a3f);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
  transition: filter .15s;
}

.customer-hero-strip-btn:hover { filter: brightness(1.08); }

/* ── Pickup location note ────────────────────────────────────── */
.pickup-location-note {
  background: rgba(22, 101, 52, 0.15);
  border: 1.5px solid #166534;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .875rem;
}

.pickup-location-note b { color: #4ADE80; font-weight: 700; }
.pickup-location-note span { color: #c9d3ea; }

/* ── Branding settings UI ─────────────────────────────────── */
.branding-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.branding-logo-preview {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: contain;
  border: 1.5px solid #e4d8c6;
  background: #f9f5ee;
}

.branding-logo-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  border: 1.5px dashed #c4a97b;
  background: #fdf6ea;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  color: #f7941d;
}

.branding-colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.branding-color-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.branding-color-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

.branding-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.branding-color-row input[type="color"] {
  width: 42px;
  height: 38px;
  border: 1.5px solid #e4d8c6;
  border-radius: 10px;
  padding: 2px;
  cursor: pointer;
  background: #fff;
  flex-shrink: 0;
}

.branding-hex-input {
  width: 100px;
  height: 38px;
  border: 1.5px solid #e4d8c6;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 13px;
  font-family: monospace;
  background: #fff;
}

/* ── Menu settings tabs ───────────────────────────────────── */
.menu-settings-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 14px 0 0;
  border-bottom: 2px solid #e4d8c6;
}
.menu-settings-tab-btn {
  padding: 8px 16px;
  border: none;
  background: none;
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  cursor: pointer;
  margin-bottom: -2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.menu-settings-tab-btn.active {
  color: #f7941d;
  border-bottom-color: #f7941d;
}
.menu-settings-tab-btn:hover:not(.active) {
  color: #374151;
  background: #f9f5ee;
}
.menu-settings-pane {
  padding-top: 14px;
}
.online-order-type-info {
  padding: 8px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 12px;
}

/* ── Branding preview card ────────────────────────────────── */
.branding-preview-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e4d8c6;
  max-width: 360px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.branding-preview-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
}

.branding-preview-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.branding-preview-title {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 3px;
}

.branding-preview-sub {
  font-size: 12px;
  font-weight: 600;
}

.branding-preview-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1.5px solid;
  font-size: 20px;
  font-weight: 900;
  flex-shrink: 0;
  opacity: 0.85;
}

.branding-preview-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

/* ── Station badge colors ─────────────────────────────────── */
.badge-station-kitchen  { background: #d1fae5; color: #065f46; }
.badge-station-barista  { background: #dbeafe; color: #1e40af; }
.badge-station-shisha   { background: #ede9fe; color: #5b21b6; }
.badge-station-cashier  { background: #f3f4f6; color: #374151; }

/* ── Category cards grid ──────────────────────────────────── */
.categories-tab-wrap { padding: 12px 0; }
.categories-tab-toolbar { margin-bottom: 14px; }

.category-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.category-card {
  background: var(--card, #fff);
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-card-inactive { opacity: 0.6; }

.category-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.category-card-name { font-weight: 700; font-size: 15px; }

.category-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-card-order { font-size: 12px; color: var(--text-muted, #6b7280); }

.category-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.empty-state-panel {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted, #6b7280);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.btn.sm { padding: 4px 10px; font-size: 12px; }

/* ══════════════════════════════════════════════════
   LIVE OPS DASHBOARD
══════════════════════════════════════════════════ */

.live-ops-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Header bar ── */
.live-ops-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--card, #fff);
  border-radius: 12px;
  padding: 10px 16px;
  border: 1.5px solid var(--border, #e5e7eb);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.live-ops-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.live-ops-brand {
  font-weight: 800;
  font-size: 15px;
  color: var(--text, #111);
}
.live-sys-badge { font-size: 12px; }

/* ── Stat chips ── */
.live-stat-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}
.live-stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  min-width: 54px;
  border: 1.5px solid transparent;
  cursor: default;
}
.chip-val {
  font-weight: 900;
  font-size: 17px;
  line-height: 1.2;
}
.chip-val small { font-size: 11px; font-weight: 600; opacity: 0.7; }
.chip-lbl { font-size: 10px; opacity: 0.75; margin-top: 1px; }
.chip-warn    { background: #fff7ed; border-color: #f59e0b; color: #b45309; }
.chip-info    { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }
.chip-success { background: #f0fdf4; border-color: #22c55e; color: #15803d; }
.chip-danger  { background: #fef2f2; border-color: #ef4444; color: #b91c1c; }
.chip-neutral { background: #f9fafb; border-color: #d1d5db; color: #374151; }
.chip-ok      { background: #f0fdf4; border-color: #22c55e; color: #15803d; }

/* ── Main two-column layout ── */
.live-ops-main {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 14px;
  align-items: start;
}

/* ── Activity Feed ── */
.live-feed-panel { }
.live-feed-scroll {
  max-height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  padding-right: 2px;
}
.dash-feed-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 7px 2px;
  border-bottom: 1px solid var(--border-light, #f3f4f6);
}
.dash-feed-item:last-child { border-bottom: none; }
.dash-feed-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.dash-icon-success { background: #d1fae5; color: #065f46; }
.dash-icon-danger  { background: #fee2e2; color: #991b1b; }
.dash-icon-info    { background: #dbeafe; color: #1e40af; }
.dash-icon-warning { background: #fef3c7; color: #92400e; }
.dash-icon-normal  { background: #f3f4f6; color: #374151; }
.dash-feed-body { flex: 1; min-width: 0; }
.dash-feed-top {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.dash-feed-title {
  font-weight: 600;
  font-size: 13px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-feed-time {
  font-size: 11px;
  color: var(--text-muted, #9ca3af);
  white-space: nowrap;
  flex-shrink: 0;
}
.dash-feed-sub {
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  margin-top: 1px;
}

/* ── Table Radar ── */
.live-radar-panel { }
.radar-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  margin-top: 8px;
}
.radar-table-card {
  background: #fff;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.radar-table-medium { border-color: #fbbf24; }
.radar-table-long   { border-color: #ef4444; background: #fffbeb; }
.radar-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.radar-table-name { font-weight: 700; font-size: 13px; }
.radar-dur { font-size: 10px !important; padding: 2px 5px !important; }
.radar-money-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.radar-money-cell {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.radar-money-cell span { color: var(--text-muted, #6b7280); }
.radar-table-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.radar-last-act { color: var(--text-muted, #9ca3af); }

/* Color helpers */
.ok-text     { color: #15803d; }
.warn-text   { color: #b45309; }
.danger-text { color: #b91c1c; }
.info-text   { color: #1d4ed8; }
.badge.neutral { background: #f3f4f6; color: #374151; }

/* ── Station Monitoring ── */
.live-stations-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.live-station-card { }
.station-has-ready { border-color: #22c55e !important; }
.station-idle {
  text-align: center;
  padding: 20px 0 12px;
  color: var(--text-muted, #9ca3af);
  font-size: 13px;
}
.station-counts {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}
.station-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 10px 6px;
  border-radius: 8px;
}
.station-count-pending    { background: #fef3c7; }
.station-count-preparing  { background: #dbeafe; }
.station-count-ready      { background: #f3f4f6; }
.station-count-ready-alert {
  background: #d1fae5;
  animation: pulse-ok 1.8s ease-in-out infinite;
}
@keyframes pulse-ok {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.35); }
  50%       { box-shadow: 0 0 0 6px rgba(34,197,94,.0); }
}
.scount-val { font-weight: 900; font-size: 22px; line-height: 1; }
.scount-lbl { font-size: 11px; margin-top: 3px; opacity: 0.75; }

/* ── Bottom row ── */
.live-bottom-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr;
  gap: 14px;
  align-items: start;
}

/* Cash panel */
.live-cash-panel { }
.cash-breakdown-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
}
.cash-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 3px 0;
  border-bottom: 1px dotted var(--border-light, #f3f4f6);
}
.cash-breakdown-row span { color: var(--text-muted, #6b7280); }
.cash-total-row {
  font-weight: 700;
  border-top: 2px solid var(--border, #e5e7eb);
  border-bottom: none !important;
  margin-top: 4px;
  padding-top: 6px !important;
}
.cash-expected-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 14px;
  background: #eff6ff;
  padding: 7px 10px;
  border-radius: 8px;
  margin-top: 6px;
}
.cash-moves-section { margin-top: 12px; border-top: 1px solid var(--border, #e5e7eb); padding-top: 8px; }
.cash-moves-lbl { font-size: 11px; font-weight: 700; color: var(--text-muted, #9ca3af); }
.cash-move-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-light, #f3f4f6);
}
.cash-move-reason { flex: 1; color: var(--text-muted, #6b7280); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cash-move-time { color: var(--text-muted, #9ca3af); flex-shrink: 0; }
.cash-move-suspicious { background: #fff1f2; border-radius: 4px; padding: 2px 4px; }
.cash-suspicious-alert {
  background: #fff1f2; border: 1px solid #fecaca; color: #b91c1c;
  border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 700;
  margin-bottom: 8px;
}
.cash-payments-table { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.cash-payment-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 3px 0;
  border-bottom: 1px solid var(--border-light, #f3f4f6);
}
.cash-pay-amount { font-weight: 700; white-space: nowrap; }
.cash-pay-ref { flex: 1; color: var(--text-muted, #6b7280); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cash-pay-time { color: var(--text-muted, #9ca3af); flex-shrink: 0; font-size: 11px; }

/* Station recent orders */
.station-orders-list { margin-top: 8px; border-top: 1px solid var(--border-light, #f3f4f6); padding-top: 6px; }
.station-order-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 3px 0;
  border-bottom: 1px solid var(--border-light, #f3f4f6);
}
.station-order-row:last-child { border-bottom: none; }
.station-order-num { font-weight: 700; white-space: nowrap; }
.station-order-loc { flex: 1; color: var(--text-muted, #6b7280); overflow: hidden; text-overflow: ellipsis; }
.station-order-age { font-size: 11px; color: var(--text-muted, #9ca3af); white-space: nowrap; }
.age-overdue { color: #dc2626; font-weight: 700; }
.station-order-overdue { background: #fff1f2; border-radius: 4px; }
.station-overdue-alert {
  background: #fff1f2; border: 1px solid #fecaca; color: #b91c1c;
  border-radius: 6px; padding: 4px 8px; font-size: 12px; font-weight: 700;
  margin-top: 6px;
}

/* Last updated label */
.live-last-updated { font-size: 11px; color: var(--text-muted, #9ca3af); }

/* Low stock panel */
.live-stock-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.live-stock-row  { display: flex; justify-content: space-between; align-items: center; }
.live-stock-name { font-size: 13px; font-weight: 600; flex: 1; padding-left: 6px; }
.live-stock-qty  { display: flex; align-items: center; gap: 4px; }
.live-stock-min  { font-size: 11px; color: var(--text-muted, #9ca3af); }

/* Shift panel */
.live-shift-panel { }
.shift-info-rows { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.shift-info-row  {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 3px 0;
  border-bottom: 1px dotted var(--border-light, #f3f4f6);
}
.shift-info-row span { color: var(--text-muted, #6b7280); }
.warn-row { background: #fffbeb; padding: 4px 6px; border-radius: 6px; }

/* Detail rows */
.live-detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

/* ── Responsive (old classes) ── */
@media (max-width: 1000px) {
  .live-ops-main { grid-template-columns: 1fr; }
  .live-bottom-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .live-stations-row { grid-template-columns: 1fr; }
  .live-bottom-row   { grid-template-columns: 1fr; }
  .live-detail-row   { grid-template-columns: 1fr; }
  .live-stat-chips   { justify-content: flex-start; }
}

/* ═══════════════════════════════════════════════════
   OPERATIONS CENTER — Premium Redesign (ops-*)
   ═══════════════════════════════════════════════════ */

/* Shell */
.ops-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 48px;
  max-width: 1440px;
  margin: 0 auto;
}

/* ── Sticky Header ── */
.ops-sticky-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249,250,251,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border, #e5e7eb);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -4px;
}
.ops-hd-start { display: flex; align-items: center; gap: 10px; }
.ops-hd-end   { display: flex; align-items: center; gap: 10px; }
.ops-hd-title { font-size: 17px; font-weight: 800; color: var(--text, #14213d); margin: 0; }
.ops-sys-badge {
  font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px; letter-spacing: 0.02em;
}
.ops-sys-ok     { background: #dcfce7; color: #166534; }
.ops-sys-warn   { background: #fef9c3; color: #854d0e; }
.ops-sys-danger { background: #fee2e2; color: #991b1b; }
.ops-last-upd   { font-size: 12px; color: var(--text-muted, #9ca3af); }

/* ── KPI Grid ── */
.ops-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.ops-kpi {
  background: white;
  border-radius: 16px;
  padding: 20px 20px 16px;
  border: 2px solid var(--border, #e5e7eb);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: box-shadow 0.15s;
}
.ops-kpi:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.07); }
.ops-kpi-val {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
  color: var(--text, #14213d);
}
.ops-kpi-total { font-size: 18px; font-weight: 500; color: var(--text-muted, #9ca3af); }
.ops-kpi-lbl   { font-size: 13px; font-weight: 600; color: var(--text-muted, #6b7280); margin-top: 4px; }
.ops-kpi-sub   { font-size: 12px; color: var(--text-muted, #9ca3af); margin-top: 4px; }
.ops-kpi-detail { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }

/* KPI accent colors */
.ops-kpi-warn    { border-color: #f59e0b; }
.ops-kpi-ok      { border-color: #22c55e; }
.ops-kpi-info    { border-color: #3b82f6; }
.ops-kpi-blue    { border-color: #3b82f6; }
.ops-kpi-danger  { border-color: #ef4444; }
.ops-kpi-neutral { border-color: var(--border, #e5e7eb); }
.ops-kpi-warn    .ops-kpi-val { color: #d97706; }
.ops-kpi-danger  .ops-kpi-val { color: #dc2626; }
.ops-kpi-ok      .ops-kpi-val { color: #16a34a; }
.ops-kpi-info    .ops-kpi-val,
.ops-kpi-blue    .ops-kpi-val { color: #2563eb; }

/* KPI detail chips */
.ops-kd-chip {
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
}
.ops-kd-pending  { background: #fef9c3; color: #854d0e; }
.ops-kd-preparing{ background: #fff7ed; color: #9a3412; }
.ops-kd-ready    { background: #dcfce7; color: #166534; }
.ops-kd-danger   { background: #fee2e2; color: #991b1b; }
.ops-kd-warn     { background: #fef9c3; color: #854d0e; }

/* ── Generic Panel ── */
.ops-panel {
  background: white;
  border-radius: 14px;
  border: 1px solid var(--border, #e5e7eb);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ops-panel-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text, #14213d);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  flex-shrink: 0;
}
.ops-panel-sub { font-size: 12px; font-weight: 400; color: var(--text-muted, #9ca3af); }

/* ── Main Grid: Feed 40% + Radar 60% ── */
.ops-main-grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 16px;
  align-items: start;
}

/* Activity Feed */
.ops-feed-panel { min-height: 500px; }
.ops-feed-scroll {
  flex: 1;
  overflow-y: auto;
  max-height: 500px;
  scrollbar-width: thin;
}
.ops-feed-scroll::-webkit-scrollbar { width: 4px; }
.ops-feed-scroll::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }

/* Timeline */
.ops-timeline { position: relative; padding-right: 24px; }
.ops-timeline::before {
  content: '';
  position: absolute;
  right: 10px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, #d1d5db, rgba(209,213,219,0));
  border-radius: 2px;
}
.ops-tl-item {
  position: relative;
  padding: 9px 18px 9px 0;
  border-bottom: 1px solid #f9fafb;
}
.ops-tl-item:last-child { border-bottom: none; }
.ops-tl-dot {
  position: absolute;
  right: 6px;
  top: 13px;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px #e5e7eb;
  flex-shrink: 0;
}
.ops-tl-body { }
.ops-tl-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.ops-tl-title {
  font-size: 12px; font-weight: 700;
  color: var(--text, #14213d);
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ops-tl-time  { font-size: 11px; color: var(--text-muted, #9ca3af); flex-shrink: 0; }
.ops-tl-sub   { font-size: 11px; color: var(--text-muted, #6b7280); margin-top: 2px; line-height: 1.3; }

/* Low stock alerts in feed */
.ops-feed-alerts {
  background: #fff1f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}
.ops-feed-alert-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.dfa-name { flex: 1; font-weight: 600; color: #991b1b; }
.dfa-qty  { color: #9ca3af; font-size: 11px; }

/* Attendance alert: shown only while at least one employee checked in late. */
.ops-attendance-alert {
  width: 100%; margin: 14px 0 0; border: 1px solid #f59e0b; border-right: 5px solid #dc2626;
  border-radius: 14px; background: linear-gradient(105deg, #fff7ed, #fef2f2); color: #7c2d12;
  padding: 13px 16px; display: flex; align-items: center; gap: 11px; text-align: right;
  cursor: pointer; font: inherit; animation: ops-attendance-pulse 2.2s ease-in-out infinite;
}
.ops-attendance-alert-icon { font-size: 24px; line-height: 1; }
.ops-attendance-alert-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.ops-attendance-alert-copy b { font-size: 14px; }
.ops-attendance-alert-copy small { color: #9a3412; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-attendance-alert-action { color: #b45309; font-size: 12px; font-weight: 800; white-space: nowrap; }
@keyframes ops-attendance-pulse { 50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, .13); } }

/* ── Table Radar ── */
.ops-radar-panel { }
.ops-table-list { display: flex; flex-direction: column; gap: 8px; }
.ops-table-card {
  background: var(--bg-card, #f9fafb);
  border-radius: 12px;
  border: 1.5px solid var(--border, #e5e7eb);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: border-color 0.15s;
}
.ops-tc-danger { border-color: #ef4444 !important; background: #fff5f5; }
.ops-tc-warn   { border-color: #f59e0b !important; background: #fffdf5; }
.ops-tc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ops-tc-id     { display: flex; align-items: center; gap: 7px; flex: 1; flex-wrap: wrap; }
.ops-tc-name   { font-size: 14px; font-weight: 800; color: var(--text, #14213d); }
.ops-tc-total  { font-size: 15px; font-weight: 900; color: var(--text, #14213d); white-space: nowrap; }
.ops-tc-money  {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-muted, #6b7280);
}
.ops-tc-money b { font-weight: 700; }
.ops-tc-orders { margin-right: auto; font-size: 11px; color: var(--text-muted, #9ca3af); }
.ops-tc-act    { font-size: 11px; color: var(--text-muted, #9ca3af); }
.ops-tc-items  { font-size: 11px; color: var(--text-muted, #9ca3af); line-height: 1.5; }
.ops-tc-warn-msg { font-size: 12px; color: #d97706; font-weight: 600; }
.ops-table-map-wrap {
  border-top: 1px solid var(--border, #e5e7eb);
  padding-top: 12px;
  margin-top: 2px;
}

/* ── Section Headers ── */
.ops-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 2px 0;
}
.ops-sec-title { font-size: 15px; font-weight: 800; color: var(--text, #14213d); margin: 0; }
.ops-sec-sub   { font-size: 13px; color: var(--text-muted, #6b7280); }

/* ── Station Grid ── */
.ops-station-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.ops-station-card {
  background: white;
  border-radius: 14px;
  border: 1.5px solid var(--border, #e5e7eb);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ops-station-active  {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.08);
}
.ops-station-overdue {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.08);
}
.ops-sc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ops-sc-name { font-size: 14px; font-weight: 800; color: var(--text, #14213d); }
.ops-sc-idle {
  font-size: 13px; color: var(--text-muted, #9ca3af);
  text-align: center; padding: 16px 0;
}
.ops-sc-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}
.ops-sc-count {
  border-radius: 10px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ops-sc-pending      { background: #fef9c3; }
.ops-sc-preparing    { background: #fff7ed; }
.ops-sc-ready        { background: #f3f4f6; }
.ops-sc-ready-active { background: #dcfce7; animation: ops-pulse-ready 1.8s ease-in-out infinite; }
.ops-sc-val { font-size: 28px; font-weight: 900; color: var(--text, #14213d); line-height: 1; }
.ops-sc-lbl { font-size: 11px; color: var(--text-muted, #6b7280); font-weight: 600; }
.ops-sc-overdue {
  background: #fee2e2; color: #991b1b;
  border-radius: 8px; padding: 6px 10px;
  font-size: 12px; font-weight: 700;
}
.ops-sc-orders {
  display: flex; flex-direction: column; gap: 2px;
  border-top: 1px solid var(--border-light, #f3f4f6);
  padding-top: 8px;
}
.ops-sc-order {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 2px 0;
}
.ops-sc-order-late { background: #fff1f2; border-radius: 4px; padding: 2px 5px; }
.ops-sc-onum { font-weight: 700; white-space: nowrap; }
.ops-sc-oloc { flex: 1; color: var(--text-muted, #6b7280); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-sc-oage { font-size: 11px; color: var(--text-muted, #9ca3af); white-space: nowrap; }
.ops-age-danger { color: #dc2626; font-weight: 700; }

@keyframes ops-pulse-ready {
  0%, 100% { background: #dcfce7; }
  50%       { background: #bbf7d0; }
}

/* ── Bottom Grid ── */
.ops-bottom-grid {
  display: grid;
  grid-template-columns: 2fr 1.3fr 1.3fr;
  gap: 14px;
  align-items: start;
}

/* Cash Panel */
.ops-cash-panel { }
.ops-cash-alert {
  background: #fee2e2; border: 1px solid #fecaca; color: #991b1b;
  border-radius: 8px; padding: 8px 12px;
  font-size: 12px; font-weight: 700;
}
.ops-receipt {
  background: #f9fafb;
  border-radius: 10px;
  border: 1px dashed #e5e7eb;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
}
.ops-rcpt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  border-bottom: 1px solid #f3f4f6;
}
.ops-rcpt-row:last-child { border-bottom: none; }
.ops-rcpt-row span { color: var(--text-muted, #6b7280); }
.ops-rcpt-warn   b { color: #d97706; }
.ops-rcpt-ok     b { color: #16a34a; }
.ops-rcpt-danger b { color: #dc2626; }
.ops-rcpt-divider { height: 0; border-top: 2px dashed #d1d5db; margin: 4px 0; }
.ops-rcpt-total {
  display: flex;
  justify-content: space-between;
  font-size: 14px; font-weight: 900;
  color: var(--text, #14213d);
  padding-top: 4px;
}
.ops-rcpt-total span { color: var(--text-muted, #6b7280); }

.ops-cash-section { border-top: 1px solid var(--border, #e5e7eb); padding-top: 10px; }
.ops-cash-section-title { font-size: 11px; font-weight: 700; color: var(--text-muted, #9ca3af); margin-bottom: 6px; letter-spacing: 0.03em; }
.ops-pay-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 4px 0;
  border-bottom: 1px solid #f9fafb;
}
.ops-pay-row:last-child { border-bottom: none; }
.ops-pay-ref  { flex: 1; color: var(--text-muted, #6b7280); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-pay-time { color: var(--text-muted, #9ca3af); font-size: 11px; flex-shrink: 0; }
.ops-cmove-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 3px 0;
  border-bottom: 1px solid #f9fafb;
}
.ops-cmove-row:last-child { border-bottom: none; }
.ops-cmove-suspicious { background: #fff1f2; border-radius: 4px; padding: 2px 5px; }
.ops-cmove-reason { flex: 1; color: var(--text-muted, #6b7280); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Shift Panel */
.ops-shift-panel { }
.ops-shift-info { display: flex; flex-direction: column; gap: 3px; }
.ops-si-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 5px 0;
  border-bottom: 1px dotted #f3f4f6;
}
.ops-si-row:last-child { border-bottom: none; }
.ops-si-row span { color: var(--text-muted, #6b7280); }
.ops-credit-alert {
  background: #fef9c3; border: 1px solid #fde68a;
  border-radius: 8px; padding: 8px 12px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: #854d0e; font-weight: 600;
}
.ops-ctrl-btns { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }

/* Standalone system-control page — operational toggles live here, not in Live Dashboard. */
.system-control-page { direction:rtl; max-width:1000px; margin:0 auto; display:flex; flex-direction:column; gap:18px; }
.system-control-intro { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:20px; border:1px solid var(--border); border-radius:14px; background:linear-gradient(135deg,#f4fbf9,#fff); }
.system-control-intro h2, .system-control-section h3 { margin:0; color:var(--ink); }
.system-control-intro p, .system-control-section p, .system-control-card p { margin:5px 0 0; color:var(--muted); font-size:.86rem; line-height:1.6; }
.system-control-section { display:flex; flex-direction:column; gap:9px; }
.system-control-section-head { display:flex; align-items:end; justify-content:space-between; gap:12px; }
.system-control-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.system-control-card { display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; padding:14px; border:1px solid var(--border); border-radius:12px; background:var(--card); }
.system-control-primary { border-color:#e4bf8a; background:linear-gradient(135deg,#fffaf1,#fff); }
.system-control-card-copy { display:flex; align-items:flex-start; gap:10px; min-width:0; }
.system-control-card-copy > div { min-width:0; }
.system-control-card-copy b { display:block; font-size:.93rem; }
.system-control-icon { flex:0 0 auto; display:grid; place-items:center; width:34px; height:34px; border-radius:9px; background:#edf7f4; font-size:1.05rem; }
.system-control-card-action { display:flex; flex:0 0 auto; align-items:center; gap:8px; }
@media (max-width:650px) { .system-control-grid { grid-template-columns:1fr; } .system-control-intro { padding:15px; } .system-control-card { align-items:flex-start; } .system-control-card-action { flex-direction:column; align-items:stretch; } }

/* Stock Panel */
.ops-stock-panel { }
.ops-stock-list { display: flex; flex-direction: column; gap: 6px; }
.ops-stock-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 3px 0;
  border-bottom: 1px solid #f9fafb;
}
.ops-stock-row:last-child { border-bottom: none; }
.ops-stock-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-stock-min  { font-size: 11px; color: var(--text-muted, #9ca3af); white-space: nowrap; }

/* Detail Grid */
.ops-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Empty States */
.ops-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 36px 20px;
  color: var(--text-muted, #9ca3af);
  text-align: center;
}
.ops-empty b    { color: var(--text, #374151); font-size: 14px; }
.ops-empty span { font-size: 13px; }
.ops-empty-icon { font-size: 26px; }
.ops-empty-sm   { padding: 16px 10px; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .ops-kpi-grid    { grid-template-columns: repeat(2, 1fr); }
  .ops-main-grid   { grid-template-columns: 1fr; }
  .ops-bottom-grid { grid-template-columns: 1fr 1fr; }
  .ops-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .ops-kpi-grid     { grid-template-columns: repeat(2, 1fr); }
  .ops-kpi-val      { font-size: 28px; }
  .ops-station-grid { grid-template-columns: 1fr; }
  .ops-bottom-grid  { grid-template-columns: 1fr; }
  .ops-detail-grid  { grid-template-columns: 1fr; }
  .ops-sticky-header { padding: 10px 14px; }
}

/* ═══════════════════════════════════════════════════════
   PREMIUM OPS DASHBOARD v3 — غرفة العمليات الحية
   ═══════════════════════════════════════════════════════ */

/* Page shell */
.ops-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 0 60px;
  max-width: 1440px;
  margin: 0 auto;
  background: #f4f6fb;
  min-height: 100vh;
}

/* ── Premium Header ── */
.ops-header {
  background: linear-gradient(135deg, #0f234d 0%, #0b1f4b 100%);
  border-radius: 0 0 20px 20px;
  padding: 20px 28px;
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
.ops-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ops-header-title {
  font-size: 20px;
  font-weight: 900;
  color: #f8fafc;
  margin: 0;
  letter-spacing: -0.3px;
}
.ops-header-sub {
  font-size: 12px;
  color: #8d9bbd;
  margin: 3px 0 0;
}
.ops-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ops-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.4);
  color: #4ade80;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
}
.ops-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.3);
  animation: ops-live-pulse 2s ease-in-out infinite;
}
@keyframes ops-live-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(34,197,94,0.3); }
  50%       { box-shadow: 0 0 0 5px rgba(34,197,94,0.1); }
}
.ops-sys-badge {
  font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 20px;
}
.ops-sys-ok     { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.ops-sys-warn   { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.ops-sys-danger { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.ops-last-upd   { font-size: 11px; color: #5b6785; }

/* ── KPI Cards ── */
.ops-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 4px;
}
.ops-kpi-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.15s, transform 0.15s;
}
.ops-kpi-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.08); transform: translateY(-1px); }
.ops-kpi-action { width: 100%; color: inherit; text-align: right; cursor: pointer; }
.required-mark { color: var(--danger); font-size: 12px; }
.ops-kpi-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.ops-kpi-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ops-kpi-val  { font-size: 36px; font-weight: 900; letter-spacing: -1.5px; line-height: 1; color: #14213d; }
.ops-kpi-of   { font-size: 16px; font-weight: 500; color: #8d9bbd; }
.ops-kpi-lbl  { font-size: 13px; font-weight: 600; color: #5b6785; }
.ops-kpi-hint { font-size: 12px; color: #8d9bbd; margin-top: 2px; }
.ops-kpi-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
/* KPI states */
.ops-kpi-warn    { border-color: #f59e0b; }
.ops-kpi-warn    .ops-kpi-val { color: #d97706; }
.ops-kpi-ok      { border-color: #22c55e; }
.ops-kpi-ok      .ops-kpi-val { color: #16a34a; }
.ops-kpi-info    { border-color: #3b82f6; }
.ops-kpi-info    .ops-kpi-val { color: #2563eb; }
.ops-kpi-blue    { border-color: #3b82f6; }
.ops-kpi-blue    .ops-kpi-val { color: #2563eb; }
.ops-kpi-danger  { border-color: #ef4444; }
.ops-kpi-danger  .ops-kpi-val { color: #dc2626; }
.ops-kpi-neutral { border-color: #e2e8f0; }
/* chips */
.ops-kd-chip     { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.ops-kd-pending  { background: #fef9c3; color: #854d0e; }
.ops-kd-preparing{ background: #fff7ed; color: #9a3412; }
.ops-kd-ready    { background: #dcfce7; color: #166534; }
.ops-kd-danger   { background: #fee2e2; color: #991b1b; }
.ops-kd-warn     { background: #fef9c3; color: #854d0e; }

/* ── Content Grid: Feed 3fr + Side 2fr ── */
.ops-content-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px;
  align-items: start;
}
.ops-side-stack { display: flex; flex-direction: column; gap: 16px; }

/* ── Generic Panel ── */
.ops-panel {
  background: white;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.ops-panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2fa;
  flex-shrink: 0;
}
.ops-panel-title { font-size: 14px; font-weight: 800; color: #14213d; }
.ops-panel-sub   { font-size: 12px; color: #8d9bbd; margin-top: 2px; display: block; }

/* Activity Feed */
.ops-feed-panel { min-height: 520px; }
.ops-feed-scroll {
  flex: 1;
  overflow-y: auto;
  max-height: 520px;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
/* Timeline */
.ops-timeline { position: relative; padding-right: 26px; }
.ops-timeline::before {
  content: '';
  position: absolute;
  right: 11px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, #cbd5e1, rgba(203,213,225,0));
  border-radius: 2px;
}
.ops-tl-item {
  position: relative;
  padding: 9px 16px 9px 0;
  border-bottom: 1px solid #f8fafc;
}
.ops-tl-item:last-child { border-bottom: none; }
.ops-tl-dot {
  position: absolute;
  right: 7px; top: 13px;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px #e2e8f0;
}
.ops-tl-body { }
.ops-tl-top  { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ops-tl-title {
  font-size: 12px; font-weight: 700; color: #14213d;
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ops-tl-time { font-size: 11px; color: #8d9bbd; flex-shrink: 0; }
.ops-tl-sub  { font-size: 11px; color: #5b6785; margin-top: 2px; }
/* Low stock alerts in feed */
.ops-feed-alerts {
  background: #fff1f2; border: 1px solid #fecaca;
  border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px;
}
.ops-feed-alert-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.dfa-name { flex: 1; font-weight: 600; color: #991b1b; }
.dfa-qty  { color: #9ca3af; font-size: 11px; }

/* ── Station Cards ── */
.ops-station-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ops-station-card {
  background: white; border-radius: 16px;
  border: 2px solid #e2e8f0; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ops-station-active  { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.08); }
.ops-station-overdue { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.08); }
.ops-sc-header { display: flex; align-items: center; justify-content: space-between; }
.ops-sc-name { font-size: 14px; font-weight: 800; color: #14213d; }
.ops-sc-idle { font-size: 13px; color: #8d9bbd; text-align: center; padding: 16px 0; }
.ops-sc-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.ops-sc-count { border-radius: 12px; padding: 10px 4px; display: flex; flex-direction: column; gap: 3px; }
.ops-sc-pending      { background: #fef9c3; }
.ops-sc-preparing    { background: #fff7ed; }
.ops-sc-ready        { background: #eef2fa; }
.ops-sc-ready-active { background: #dcfce7; animation: ops-pulse-ready 1.8s ease-in-out infinite; }
.ops-sc-val  { font-size: 28px; font-weight: 900; color: #14213d; line-height: 1; }
.ops-sc-lbl  { font-size: 11px; color: #5b6785; font-weight: 600; }
.ops-sc-overdue { background: #fee2e2; color: #991b1b; border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 700; }
.ops-sc-orders { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid #eef2fa; padding-top: 8px; }
.ops-sc-order       { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 0; }
.ops-sc-order-late  { background: #fff1f2; border-radius: 4px; padding: 2px 5px; }
.ops-sc-onum { font-weight: 700; white-space: nowrap; }
.ops-sc-oloc { flex: 1; color: #5b6785; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-sc-oage { font-size: 11px; color: #8d9bbd; white-space: nowrap; }
.ops-age-danger { color: #dc2626; font-weight: 700; }
@keyframes ops-pulse-ready {
  0%, 100% { background: #dcfce7; }
  50%       { background: #bbf7d0; }
}

/* ── Section Headers ── */
.ops-section-hd { display: flex; align-items: baseline; gap: 10px; padding: 4px 2px 0; }
.ops-sec-title  { font-size: 16px; font-weight: 800; color: #14213d; margin: 0; }
.ops-sec-sub    { font-size: 13px; color: #5b6785; }

/* ── Tables Section (at the bottom) ── */
.ops-tables-section { }
.ops-tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
/* Table Card states */
.ops-table-card {
  background: white;
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.15s;
}
.ops-table-card.is-free    { border-color: #22c55e; opacity: 0.75; }
.ops-table-card.is-busy    { border-color: #3b82f6; }
.ops-table-card.is-warning { border-color: #f59e0b; background: #fffdf5; }
.ops-table-card.is-danger  { border-color: #ef4444; background: #fff5f5; }
/* Table card inner */
.otc-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.otc-name   { font-size: 16px; font-weight: 900; color: #14213d; }
.otc-status {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  background: #eef2fa; color: #5b6785;
}
.otc-status.is-free    { background: #dcfce7; color: #166534; }
.otc-status.is-busy    { background: #dbeafe; color: #1e40af; }
.otc-status.is-warning { background: #fef3c7; color: #92400e; }
.otc-status.is-danger  { background: #fee2e2; color: #991b1b; }
.otc-dur-row {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: 12px; color: #5b6785;
}
.otc-dur { font-weight: 700; }
.otc-bill-badge {
  font-size: 11px; font-weight: 700;
  background: #fef3c7; color: #92400e;
  padding: 2px 8px; border-radius: 20px;
}
.otc-paid-badge {
  font-size: 11px; font-weight: 700;
  background: #dcfce7; color: #166534;
  padding: 2px 8px; border-radius: 20px;
}
.otc-body { display: flex; flex-direction: column; gap: 5px; }
.otc-body-free { font-size: 12px; color: #8d9bbd; text-align: center; padding: 8px 0; }
.otc-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: #5b6785; padding: 2px 0;
  border-bottom: 1px solid #f8fafc;
}
.otc-row:last-child { border-bottom: none; }
.otc-row b { font-weight: 700; color: #14213d; }
.otc-v-ok     { color: #16a34a !important; }
.otc-v-danger { color: #dc2626 !important; }
.otc-row-danger { background: #fff1f2; border-radius: 4px; padding: 3px 4px; }
.otc-items { display: flex; flex-wrap: wrap; gap: 4px; }
.otc-item-chip {
  font-size: 11px; font-weight: 600;
  color: #374151; background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 2px 8px; border-radius: 12px;
  white-space: nowrap;
}
.otc-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 6px; border-top: 1px solid #eef2fa;
}
.otc-last-act { font-size: 11px; color: #8d9bbd; }
.otc-tap-hint { font-size: 11px; color: #8d9bbd; }
.otc-clickable { cursor: pointer; }
.otc-clickable:active { opacity: 0.82; transform: scale(0.98); transition: transform 0.1s, opacity 0.1s; }
.otc-name-only { font-size: 14px; font-weight: 800; color: #14213d; }

/* ── Free tables compact grid ── */
.ops-free-tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.ops-free-tables-grid .ops-table-card.is-free {
  padding: 10px 12px;
  gap: 4px;
  align-items: flex-start;
}

/* ── Cash Panel adjustments ── */
.ops-cash-panel .ops-panel-hd,
.ops-shift-panel .ops-panel-hd { margin-bottom: -4px; }

/* ── Detail Grid ── */
.ops-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Stock in side panel ── */
.ops-stock-panel { }
.ops-stock-list  { display: flex; flex-direction: column; gap: 5px; }
.ops-stock-row   { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; border-bottom: 1px solid #f8fafc; }
.ops-stock-row:last-child { border-bottom: none; }
.ops-stock-name  { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-stock-min   { font-size: 11px; color: #8d9bbd; white-space: nowrap; }

/* ── Empty State ── */
.ops-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 36px 20px; color: #8d9bbd; text-align: center; }
.ops-empty b    { color: #374151; font-size: 14px; }
.ops-empty span { font-size: 13px; }
.ops-empty-icon { font-size: 26px; }
.ops-empty-sm   { padding: 14px 10px; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .ops-kpi-grid      { grid-template-columns: repeat(2, 1fr); }
  .ops-content-grid  { grid-template-columns: 1fr; }
  .ops-detail-grid   { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .ops-kpi-grid      { grid-template-columns: repeat(2, 1fr); }
  .ops-kpi-val       { font-size: 26px; }
  .ops-kpi-icon      { font-size: 22px; }
  .ops-station-grid  { grid-template-columns: 1fr; }
  .ops-tables-grid   { grid-template-columns: 1fr 1fr; }
  .ops-header        { padding: 14px 16px; border-radius: 0 0 14px 14px; }
  .ops-header-title  { font-size: 16px; }
}

/* ── Profile Page ─────────────────────────────────────────────────── */
.profile-page { display: grid; gap: 20px; min-width: 0; }

.profile-top-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.profile-avatar-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 26px; font-weight: 900;
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(247, 148, 29, .28);
}

.profile-divider { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }

.profile-info-rows { display: grid; gap: 10px; }

.profile-info-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; font-size: 14px; min-width: 0;
}

.profile-info-label {
  color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap;
}

.profile-info-value {
  font-weight: 700; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%;
}

.profile-ua { font-size: 12px; color: var(--muted); cursor: help; direction: ltr; text-align: right; }
.profile-ua-hint { font-size: 11px; color: var(--muted); cursor: help; }

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.profile-perms-toolbar { margin-bottom: 12px; }
.profile-perm-search { max-width: 380px; }
.profile-perms-list { display: grid; gap: 10px; }

.profile-perm-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}

.profile-perm-group-header {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 11px 14px;
  background: #f9f5ef; border: 0; border-bottom: 1px solid var(--border);
  text-align: right; font-weight: 800; font-size: 14px; color: var(--ink);
  cursor: pointer; transition: background .15s;
}
.profile-perm-group-header:hover { background: #f2eadf; }

.profile-perm-group-label { flex: 1; text-align: right; }

.profile-perm-count {
  padding: 2px 9px; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 900;
}

.profile-perm-chevron { color: var(--muted); transition: transform .2s; font-size: 16px; line-height: 1; }
.profile-perm-group.collapsed .profile-perm-chevron { transform: rotate(-90deg); }
.profile-perm-group.collapsed .profile-perm-chips { display: none; }

.profile-perm-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 14px; }

.perm-chip {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 7px;
  font-size: 12px; font-weight: 700;
  border: 1px solid var(--border);
  background: #f4ede5; color: var(--muted);
  direction: ltr; white-space: nowrap;
}
.perm-chip.perm-read   { background: #eef6ff; border-color: #c3daf5; color: var(--info); }
.perm-chip.perm-manage { background: #e6f5f0; border-color: #b3ddd2; color: var(--success); }
.perm-chip.perm-access { background: #f5eef8; border-color: #dcc3e8; color: #7c3aed; }
.perm-chip.perm-create { background: #fffbea; border-color: #f0d97f; color: #92560f; }
.perm-chip.perm-update { background: #fff4e8; border-color: #f5cfa0; color: var(--warning); }
.perm-chip.perm-action { background: #fff0f0; border-color: #f5b8b8; color: var(--danger); }

@media (max-width: 900px) {
  .profile-top-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .profile-stats-grid { grid-template-columns: 1fr 1fr; }
  .profile-perm-search { max-width: 100%; }
}

/* ── PWA / Mobile Polish ──────────────────────────────────── */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}
.sidebar { padding-bottom: calc(18px + var(--sab)); }
.main    { padding-bottom: calc(24px + var(--sab)); }
.pos-cart-actions { padding-bottom: calc(8px + var(--sab)); }

.pwa-install-banner,
.pwa-update-banner,
.ios-install-card {
  margin: 0 16px 8px;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
}
.pwa-install-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(247, 148, 29,.09), rgba(247, 148, 29,.04));
  border: 1px solid rgba(247, 148, 29,.28);
}
.pwa-update-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff3cd;
  border: 1px solid #fbbf24;
}
.ios-install-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

/* ================================================================
   MOBILE RESPONSIVENESS — Comprehensive fixes for 360–768px
   Applied last so they safely override individual component rules.
   ================================================================ */

/* ── Scrollable table wrapper (used by report-table) ────────────── */
.table-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* ── Mobile-only UI elements: hidden on desktop by default ──────── */
.mobile-menu-btn  { display: none; }
.mobile-nav-backdrop { display: none; }

/* ── 1024px: tablet layout tweaks ───────────────────────────────── */
@media (max-width: 1024px) {
  .pos { grid-template-columns: 1fr; }
}

/* ── 768px: phones — fixed overlay sidebar + layout width lock ───── */
@media (max-width: 768px) {

  /* ─── 1. Pin page to viewport — stops any child pushing page wider */
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  /* ─── 2. Shell: force 1 column, clip overflow at layout boundary */
  .layout, .app-shell {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100%;
    overflow-x: clip;
  }

  /* ─── 3. Main: fill viewport width, kill any desktop margin from sidebar */
  .main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-inline: 0 !important;
    box-sizing: border-box;
  }

  /* ─── 4. Sidebar: fixed overlay sliding in from the right (RTL) */
  .sidebar {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(86vw, 300px);
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    border-radius: 0 !important;
    transform: translateX(110%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  /* ─── 5. Backdrop: fades in behind the open sidebar */
  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  body.nav-open .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  /* ─── 6. Hamburger button in topbar: visible on mobile */
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    font-size: 1.25rem;
    border-radius: 10px;
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--ink);
    flex-shrink: 0;
    order: -1;
  }

  /* ─── 7. Sidebar close button: style consistently */
  .sidebar-toggle {
    display: inline-flex !important;
    align-items: center;
  }

  /* ─── 8. Modals: bottom-sheet on mobile */
  .modal {
    align-items: flex-end;
    padding: 0;
  }
  .modal-box {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding: 16px;
  }
  .modal-box.table-session-modal {
    border-radius: 20px 20px 0 0;
  }

  /* ─── 9. Page header: compact */
  .topbar, .page-header {
    padding: 12px 14px;
    gap: 10px;
    margin-bottom: 14px;
  }

  /* ─── 10. POS: single column on mobile */
  section.pos {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .pos-cart-panel { width: 100%; position: static; }
  .pos-category-section { position: static; }
}

/* ── 480px: phones ───────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Panel padding reduced */
  .panel, .data-card { padding: 14px; }

  /* Category section margin matches new panel padding */
  .pos-category-section {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Topbar typography */
  .topbar h1, .page-header h1 { font-size: 1.25rem; }
  .topbar h2, .page-header h2 { font-size: 1rem; }

  /* Grids go to 1 column */
  .grid.cols-2 { grid-template-columns: 1fr; }

  /* Products: force 2-column on phones */
  .pos-products {
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
  }
  .pos-product { min-height: 120px; padding: 10px; }
  .pos-product-name { font-size: 0.82rem; }
  .pos-product-price { font-size: 0.88rem; }

  /* Order type row (table/takeaway/delivery) */
  .pos-row1 { flex-wrap: wrap; gap: 6px; }
  .seg { flex-wrap: wrap; }
  .seg button { padding: 7px 10px; font-size: 0.82rem; min-height: 38px; }

  /* POS search row */
  .pos-row2 { flex-wrap: wrap; gap: 6px; }
  .pos-product-search { width: 100%; flex: none; }
  .pos-category-select { width: 100%; flex: none; max-width: none; }

  /* Cart lines */
  .pos-cart-line { gap: 7px; }
  .pos-cart-line-name { font-size: 0.86rem; }
  .pos-cart-notes { font-size: 0.8rem; }

  /* Cart action buttons — stay full width on phones */
  .pos-cart-actions { flex-wrap: wrap; }
  .pos-submit-btn { min-height: 48px; font-size: 0.95rem; }

  /* Report tables compact */
  .report-table th,
  .report-table td { padding: 6px 7px; font-size: 0.78rem; }

  /* Report KPI grid: 2 columns on phones — minmax(0, …) + a smaller figure so big money amounts wrap inside their card instead of pushing the grid wider than the screen */
  .report-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-kpi-card { padding: 12px 10px; }
  .report-kpi-value { font-size: 1.12rem; overflow-wrap: break-word; }

  /* Shift KPIs */
  .shift-kpi-cards { grid-template-columns: repeat(2, 1fr); }
  .shift-work-grid { grid-template-columns: 1fr; }

  /* Inputs/selects full width inside panels */
  .panel input:not([type="checkbox"]):not([type="radio"]),
  .panel select,
  .panel textarea { width: 100%; max-width: 100%; }

  /* Fix BTN width override: only full-width in form contexts */
  .pos-row1 .btn,
  .pos-row2 .btn { width: auto; }
  .top-actions .btn { width: auto; }

  /* Shift movements: fixed-width columns overflow on 360px — make table scrollable */
  .shift-movements-table { overflow-x: auto; }
}

/* ── 380px: very small phones ───────────────────────────────────── */
@media (max-width: 380px) {
  /* Main padding minimal */
  .main { padding: 10px; }

  /* Nav buttons smaller */
  .nav { grid-template-columns: repeat(2, 1fr); gap: 5px; }
  .nav button { font-size: 0.78rem; padding: 8px 6px; min-height: 40px; }

  /* POS products tighter */
  .pos-products { gap: 4px; }
  .pos-product { min-height: 110px; padding: 8px; }
  .pos-product-name { font-size: 0.78rem; }

  /* Chips smaller */
  .pos-category-chip { padding: 6px 11px; font-size: 0.8rem; min-height: 36px; }

  /* Panel padding minimal */
  .panel, .data-card { padding: 10px; }
  .pos-category-section {
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Topbar title */
  .topbar h1, .page-header h1 { font-size: 1.1rem; }
}

/* ================================================================
   DASHBOARD MOBILE — ops-page responsive refinements (360–768px)
   All rules scoped to ops-page classes; desktop unchanged.
   ================================================================ */

/* ── 768px: dashboard layout overhaul ───────────────────────────── */
@media (max-width: 768px) {

  /* Page shell: tighter vertical rhythm */
  .ops-page { gap: 14px; padding: 0 0 32px; }

  /* Dark header: not sticky on mobile (avoids overlap with sidebar) */
  .ops-header { position: static; border-radius: 12px; padding: 14px 16px; }
  .ops-header-title { font-size: 15px; }
  .ops-header-sub   { font-size: 11px; }
  .ops-last-upd     { display: none; }

  /* KPI grid: keep 2 columns, tighten spacing */
  .ops-kpi-grid { gap: 10px; padding: 0; }
  .ops-kpi-card { padding: 14px 12px; gap: 10px; align-items: flex-start; }
  .ops-kpi-icon { font-size: 22px; flex-shrink: 0; }
  .ops-kpi-val  {
    font-size: 24px;
    overflow-wrap: anywhere;
    word-break: break-all;
    min-width: 0;
    line-height: 1.1;
  }
  .ops-kpi-body { min-width: 0; overflow-wrap: anywhere; }
  .ops-kpi-lbl  { font-size: 12px; }
  .ops-kpi-hint { font-size: 11px; overflow-wrap: anywhere; }
  .ops-kd-chip  { font-size: 10px; padding: 2px 6px; }

  /* Content + detail grids: single column */
  .ops-content-grid { grid-template-columns: 1fr; }
  .ops-detail-grid  { grid-template-columns: 1fr; }

  /* Generic panel: smaller padding */
  .ops-panel { padding: 14px; gap: 10px; }
  .ops-panel-hd { padding-bottom: 8px; }

  /* Feed: reduce fixed height, keep scrollable */
  .ops-feed-panel { min-height: 0; }
  .ops-feed-scroll { max-height: 440px; }

  /* Timeline items: let titles & subs wrap fully */
  .ops-tl-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: 12px;
  }
  .ops-tl-sub { font-size: 12px; overflow-wrap: anywhere; white-space: normal; }

  /* Payment rows: wrap on narrow screens */
  .ops-pay-row { flex-wrap: wrap; gap: 4px 6px; }
  .ops-pay-ref {
    width: 100%; flex: none;
    white-space: normal; overflow: visible; text-overflow: clip;
    font-size: 11px;
  }
  .ops-cmove-row    { flex-wrap: wrap; gap: 4px 6px; }
  .ops-cmove-reason {
    width: 100%; flex: none;
    white-space: normal; overflow: visible; text-overflow: clip;
    font-size: 11px;
  }

  /* Cash receipt */
  .ops-receipt { font-size: 12px; padding: 10px 12px; }
  .ops-rcpt-total { font-size: 13px; }
  .ops-rcpt-row b { overflow-wrap: anywhere; }

  /* Shift/cash rows */
  .ops-si-row { font-size: 12px; }
  .ops-credit-alert { font-size: 12px; flex-wrap: wrap; }

  /* Section headers */
  .ops-section-hd { gap: 6px; }
  .ops-sec-title { font-size: 14px; }
  .ops-sec-sub { font-size: 11px; }

  /* Station grid: 1 column on mobile */
  .ops-station-grid { grid-template-columns: 1fr; gap: 10px; }
  .ops-station-card { padding: 14px; gap: 10px; }
  .ops-sc-val { font-size: 24px; }

  /* Tables grid: 1 column on mobile (auto-fill 240px min won't fit 2 on phone) */
  .ops-tables-grid { grid-template-columns: 1fr; }
  .ops-table-card  { padding: 12px; gap: 8px; }
  /* Free tables: 2-column compact grid on mobile */
  .ops-free-tables-grid { grid-template-columns: 1fr 1fr; gap: 6px; }

  /* Order/activity rows in list containers */
  .ops-panel .row { min-width: 0; }
  .ops-panel .row .sub { overflow-wrap: anywhere; white-space: normal; }

  /* Low-stock alert rows in feed */
  .dfa-name { overflow-wrap: anywhere; }

  /* Stock list rows */
  .ops-stock-name { white-space: normal; overflow: visible; text-overflow: clip; }
}

/* ── 480px: compact phones ───────────────────────────────────────── */
@media (max-width: 480px) {

  /* KPI cards: smaller but still 2 columns */
  .ops-kpi-grid { gap: 8px; }
  .ops-kpi-card { padding: 12px 10px; gap: 8px; }
  .ops-kpi-val  { font-size: 22px; }
  .ops-kpi-icon { font-size: 18px; }
  .ops-kpi-lbl  { font-size: 11px; }

  /* Station count cells */
  .ops-sc-counts { gap: 5px; }
  .ops-sc-val  { font-size: 22px; }
  .ops-sc-count { padding: 8px 3px; }
  .ops-sc-lbl  { font-size: 10px; }
  .ops-sc-onum, .ops-sc-oloc, .ops-sc-oage { font-size: 11px; }

  /* Table card: minimal padding */
  .ops-table-card { padding: 10px; gap: 6px; }
  .otc-name { font-size: 14px; }
  .otc-item-chip { font-size: 10px; padding: 2px 6px; }
  .ops-free-tables-grid { grid-template-columns: 1fr 1fr; gap: 5px; }
  .ops-free-tables-grid .ops-table-card.is-free { padding: 8px 10px; }

  /* Feed: slightly reduced max height */
  .ops-feed-scroll { max-height: 360px; }
}

/* ── 380px: very small phones ────────────────────────────────────── */
@media (max-width: 380px) {

  /* KPI cards: absolute minimum */
  .ops-kpi-card { padding: 10px 8px; gap: 6px; }
  .ops-kpi-val  { font-size: 20px; }
  .ops-kpi-icon { font-size: 16px; }
  .ops-kpi-lbl  { font-size: 10px; }

  /* Side stack panels: tighter */
  .ops-side-stack { gap: 10px; }
}

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

/* ── VIP Customers ─────────────────────────────────────────────────── */
.vip-customers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.vip-customer-card {
  background: var(--bg-card, var(--bg));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: box-shadow 0.18s;
}
.vip-customer-card:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.vip-customer-card.inactive {
  opacity: 0.65;
}

.vip-customer-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.vip-customer-name {
  font-weight: 700;
  font-size: 1rem;
}

.vip-customer-phone {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  direction: ltr;
}

.vip-customer-notes {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  white-space: pre-wrap;
}

.vip-customer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.vip-customer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* VIP QR link box in modal */
.vip-qr-link-box {
  user-select: all;
}

/* VIP badge on public menu hero */
.customer-menu-badge.vip-badge {
  background: linear-gradient(135deg, #c8a84b 0%, #f0d080 50%, #c8a84b 100%);
  color: #1a3b83;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* VIP QR mode subtle gold tint on hero */
.customer-menu-page.vip-qr-mode .customer-menu-hero {
  border-bottom: 2px solid #c8a84b;
}

@media (max-width: 600px) {
  .vip-customers-grid {
    grid-template-columns: 1fr;
  }
  .vip-customer-actions {
    flex-direction: column;
  }
  .vip-customer-actions .btn {
    width: 100%;
  }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Live Online Orders Page ─────────────────────────────────── */
.ol-page { padding: 20px; max-width: 900px; }
.ol-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.ol-page-title { font-size: 22px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 10px; }
.ol-pending-badge { background: #e53935; color: #fff; border-radius: 20px; padding: 2px 10px; font-size: 13px; font-weight: 700; }

.ol-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ol-empty { text-align: center; padding: 60px 20px; color: #888; }
.ol-empty span { font-size: 48px; display: block; margin-bottom: 12px; }
.ol-empty p { font-size: 16px; }

.ol-card { background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.08); border-right: 5px solid #bbb; transition: box-shadow .2s; }
.ol-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.13); }
.ol-card-new { border-right-color: #e53935; }
.ol-card-preparing { border-right-color: #f59e0b; }
.ol-card-ready { border-right-color: #22c55e; }

.ol-card-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ol-order-num { font-weight: 700; font-size: 14px; color: #333; }
.ol-time { color: #999; font-size: 12px; margin-right: auto; }
.ol-type-badge { font-size: 11px; border-radius: 8px; padding: 2px 8px; font-weight: 600; }
.ol-delivery { background: #e3f2fd; color: #1565c0; }
.ol-takeaway { background: #f3e5f5; color: #6a1b9a; }
.ol-status-badge { font-size: 11px; border-radius: 8px; padding: 2px 8px; font-weight: 600; }
.ol-status-badge.ol-new { background: #fde8e8; color: #b71c1c; }
.ol-status-badge.ol-preparing { background: #fff8e1; color: #e65100; }
.ol-status-badge.ol-ready { background: #e8f5e9; color: #1b5e20; }

.ol-customer { margin-bottom: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ol-cust-name { font-size: 15px; font-weight: 600; }
.ol-cust-phone { font-size: 13px; color: #1565c0; text-decoration: none; }
.ol-cust-phone:hover { text-decoration: underline; }
.ol-addr { font-size: 13px; color: #555; margin-bottom: 8px; }
.ol-items { font-size: 13px; color: #666; margin-bottom: 8px; line-height: 1.5; }
.ol-total { font-size: 14px; margin-bottom: 12px; }
.ol-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ol-btn { padding: 8px 16px; border-radius: 10px; border: none; font-size: 13px; font-family: inherit; cursor: pointer; font-weight: 600; transition: opacity .15s; }
.ol-btn:hover { opacity: .85; }
.ol-btn:disabled { opacity: .5; cursor: default; }
.ol-accept { background: #e53935; color: #fff; }
.ol-ready-btn { background: #f59e0b; color: #fff; }
.ol-done-btn { background: #22c55e; color: #fff; }
.ol-reject-btn { background: #fff; color: #b71c1c; border: 1px solid #e0b4b4; }

/* Online order confirmation gate */
.ol-card-awaiting-confirm { border-right-color: #d97706; background: #fffbeb; }
.ol-status-badge.ol-awaiting-confirm { background: #fef3c7; color: #92400e; }
.ol-awaiting-section { margin-bottom: 22px; }
.ol-section-title { font-size: 14px; font-weight: 700; color: #92400e; margin: 0 0 10px; }
.ol-awaiting-section + section .ol-section-title { color: #444; }

/* ── Unpaid Orders page (الأوردرات غير المدفوعة) ─────────────── */
.uap-page { padding: 20px; max-width: 1100px; }
.uap-summary { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.uap-summary b { color: var(--ink); }
.uap-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.uap-toolbar .chips { flex-wrap: wrap; }
.uap-date { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.uap-date input { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 13px; }
.uap-search { flex: 1; min-width: 220px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; font-family: inherit; font-size: 13px; }
.uap-grid { gap: 12px; }
.uap-card { border: 1px solid var(--border); border-right: 3px solid #c62828; border-radius: 10px; padding: 12px 14px; background: var(--card); display: flex; flex-direction: column; gap: 6px; }
.uap-card-part { border-right-color: #b06000; }
.uap-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uap-num { font-weight: 700; }
.uap-meta { font-size: 12px; color: var(--muted); margin-left: auto; }
.uap-cust { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.uap-cust a { color: var(--primary); text-decoration: none; }
.uap-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.uap-line b { color: var(--ink); }
.uap-remaining b { color: #c62828; }
.uap-card .actions { margin-top: 4px; }
@media (max-width: 640px) { .uap-grid { grid-template-columns: 1fr; } }

/* ── Order Tracker ─────────────────────────────── */
.ot-page { padding: 20px; max-width: 1100px; }
.ot-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ot-page-title { font-size: 22px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 10px; }
.ot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.ot-card { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 2px 6px rgba(0,0,0,.07); border-right: 5px solid #bbb; transition: box-shadow .2s; }
.ot-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.ot-status-pending   { border-right-color: #e53935; }
.ot-status-preparing { border-right-color: #f59e0b; }
.ot-status-ready     { border-right-color: #22c55e; }
.ot-status-completed { border-right-color: #8d9bbd; }
.ot-status-cancelled { border-right-color: #d1d5db; opacity: .65; }
.ot-card-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ot-order-num { font-weight: 700; font-size: 14px; color: #222; }
.ot-time { color: #999; font-size: 11px; margin-right: auto; }
.ot-customer { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 6px; }
.ot-meta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #555; }
.ot-meta strong { font-size: 14px; color: #111; }

/* ══════════════════════════════════════════════════════════════
   Table Quick View Modal  (dashboard tap-to-peek check view)
   ══════════════════════════════════════════════════════════════ */
.tqv-box {
  background: #fff;
  border-radius: 22px;
  width: min(400px, 95vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
}
.tqv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #eef2fa;
  flex-shrink: 0;
}
.tqv-title-block { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tqv-table-name  { font-size: 20px; font-weight: 900; color: #14213d; }
.tqv-status-pill {
  font-size: 11px; font-weight: 700;
  background: #fef3c7; color: #92400e;
  padding: 3px 10px; border-radius: 20px;
}
.tqv-close-btn {
  background: #eef2fa; border: none; border-radius: 50%;
  width: 34px; height: 34px; cursor: pointer;
  font-size: 13px; color: #5b6785;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s;
}
.tqv-close-btn:hover { background: #e2e8f0; }
.tqv-body { overflow-y: auto; flex: 1; padding: 16px 20px; }
.tqv-section-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: #8d9bbd; margin-bottom: 10px;
}
.tqv-items-list { display: flex; flex-direction: column; margin-bottom: 4px; }
.tqv-item-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 9px 0; border-bottom: 1px solid #f8fafc; font-size: 15px;
}
.tqv-item-row:last-child { border-bottom: none; }
.tqv-item-qty  { font-weight: 800; color: #6366f1; min-width: 28px; text-align: center; font-size: 13px; }
.tqv-item-name { flex: 1; font-weight: 600; color: #111827; }
.tqv-item-price { font-weight: 700; color: #374151; white-space: nowrap; font-size: 13px; }
.tqv-divider   { height: 1px; background: #e2e8f0; margin: 14px 0; }
.tqv-totals    { display: flex; flex-direction: column; gap: 8px; }
.tqv-total-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; color: #374151;
}
.tqv-total-row b { font-weight: 700; font-size: 15px; }
.tqv-remaining-row {
  background: #fff1f2; border-radius: 10px;
  padding: 10px 12px; margin-top: 2px;
}
.tqv-remaining-row span { font-weight: 700; color: #dc2626; }
.tqv-v-paid   { color: #16a34a !important; }
.tqv-v-unpaid { color: #dc2626 !important; font-size: 18px !important; }
.tqv-empty    { text-align: center; color: #8d9bbd; padding: 28px 16px; font-size: 14px; }
.tqv-loading  { padding: 48px; text-align: center; color: #5b6785; font-size: 14px; }
.tqv-footer {
  display: flex; gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid #eef2fa;
  flex-shrink: 0;
}
.tqv-footer .btn { flex: 1; }

/* ── VIP account: clickable balance pill + account details modal ─────────── */
/* The hero pill is the only trigger — no separate button sits beside it. */
.vip-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  min-height: 44px;
  padding: 6px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.3;
  direction: rtl;
  text-align: right;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s ease, border-color .18s ease, transform .12s ease;
}
.vip-balance-pill:hover {
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.72);
}
.vip-balance-pill:active { transform: scale(.98); }
.vip-balance-pill:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.vip-balance-pill-value { font-weight: 800; }
.vip-balance-pill-ok { font-weight: 900; }
.vip-balance-pill-chevron { font-size: .95rem; opacity: .7; line-height: 1; }
.vip-balance-pill:hover .vip-balance-pill-chevron { opacity: 1; }

.vip-acct-overlay { z-index: 1050; }
.vip-acct-details-overlay { z-index: 1100; }

.vip-acct-modal {
  display: flex;
  flex-direction: column;
  width: min(560px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  direction: rtl;
  text-align: right;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}
.vip-acct-details-card {
  width: min(560px, 94vw);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  direction: rtl;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .27);
}
.vip-acct-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  padding: 15px 18px;
  background: #4a148c;
  color: #fff;
}
.vip-acct-head-text small { display: block; opacity: .75; font-size: .72rem; }
.vip-acct-head-text b { font-size: 1.05rem; }
.vip-acct-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.vip-acct-close:hover { background: rgba(255, 255, 255, .26); }
.vip-acct-body {
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Total − Paid = Remaining, always on one row so the relation reads at a glance */
.vip-acct-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.vip-acct-block {
  min-width: 0;
  padding: 11px 10px;
  border-radius: 13px;
  background: #f7f4fa;
  border: 1px solid #e5d8ef;
}
.vip-acct-block span { display: block; font-size: .74rem; color: #6b6470; }
.vip-acct-block b {
  display: block;
  margin-top: 4px;
  font-size: 1.02rem;
  color: #32104f;
  overflow-wrap: anywhere;
}
.vip-acct-block.paid { background: #eefaf2; border-color: #bfe6cf; }
.vip-acct-block.paid b { color: #16703a; }
.vip-acct-block.rem { background: #fff0f0; border-color: #f0b7b7; }
.vip-acct-block.rem b { color: #b42318; }
.vip-acct-equation {
  margin: 9px 0 0;
  text-align: center;
  font-size: .74rem;
  color: #8a8194;
}

.vip-acct-section { margin-top: 18px; }
.vip-acct-section h4 { margin: 0 0 9px; font-size: .95rem; color: #32104f; }

.vip-acct-order {
  padding: 13px;
  margin-bottom: 10px;
  border: 1px solid #ece7f1;
  border-radius: 14px;
  background: #fff;
}
.vip-acct-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.vip-acct-order-num { font-size: .92rem; overflow-wrap: anywhere; }
.vip-acct-chip {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 700;
}
.vip-acct-chip.partial { background: #fff3cd; color: #9a6700; }
.vip-acct-chip.unpaid { background: #fdecec; color: #b42318; }
.vip-acct-order-date {
  display: block;
  margin-top: 5px;
  color: #7c7686;
  font-size: .76rem;
}
.vip-acct-order-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin: 10px 0;
  font-size: .82rem;
  color: #4a4453;
}
.vip-acct-order-figures b { color: #32104f; }
.vip-acct-order-figures .rem,
.vip-acct-order-figures .rem b { color: #b42318; font-weight: 800; }
.vip-acct-order-btn {
  width: 100%;
  min-height: 40px;
  padding: 9px;
  border: 1px solid #4a148c;
  border-radius: 10px;
  background: #fff;
  color: #4a148c;
  font-weight: 800;
  font-size: .85rem;
  cursor: pointer;
}
.vip-acct-order-btn:hover { background: #f6f0fb; }
.vip-acct-order-btn:focus-visible { outline: 2px solid #4a148c; outline-offset: 2px; }

.vip-acct-empty {
  padding: 22px 14px;
  text-align: center;
  border-radius: 14px;
  background: #f2fbf5;
  border: 1px dashed #b7e2c7;
}
.vip-acct-empty span { display: block; font-size: 1.7rem; color: #16703a; }
.vip-acct-empty b { display: block; margin-top: 6px; color: #16703a; }
.vip-acct-empty small { display: block; margin-top: 3px; color: #5c7a68; }

.vip-acct-pay { padding: 10px 0; border-bottom: 1px solid #f0edf3; }
.vip-acct-pay:last-of-type { border-bottom: 0; }
.vip-acct-pay-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.vip-acct-pay-head b { font-size: 1rem; color: #16703a; }
.vip-acct-pay-method { font-size: .76rem; color: #6b6470; }
.vip-acct-pay small {
  display: block;
  margin-top: 3px;
  color: #7c7686;
  font-size: .75rem;
}
.vip-acct-none { padding: 14px 0; color: #7c7686; font-size: .85rem; }

.vip-acct-more {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  padding: 9px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .84rem;
  cursor: pointer;
}
.vip-acct-more { border: 1px solid #ddd3e8; background: #faf8fc; color: #4a148c; }
.vip-acct-more:hover { background: #f2ebf8; }

.vip-acct-state { padding: 34px 16px; text-align: center; color: #4a4453; }
.vip-acct-warn {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecec;
  color: #b42318;
  font-size: .82rem;
}
.vip-acct-refreshing {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f2ebf8;
  color: #4a148c;
  font-size: .78rem;
  text-align: center;
}

@media (max-width: 600px) {
  /* Bottom-sheet on phones — internal vertical scroll only, never horizontal */
  .vip-acct-overlay,
  .vip-acct-details-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .vip-acct-modal,
  .vip-acct-details-card {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }
  .vip-acct-body { padding: 14px; }
  .vip-balance-pill { width: 100%; justify-content: flex-start; }
}

@media (max-width: 380px) {
  .vip-acct-block { padding: 9px 8px; }
  .vip-acct-block span { font-size: .68rem; }
  .vip-acct-block b { font-size: .88rem; }
}

/* ── Normal table QR: current-visit account card + details modal ─────────── */
.qr-acct-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 12px;
  width: 100%;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid var(--menu-accent, #ffc20e);
  border-radius: 16px;
  background: linear-gradient(180deg, #0f224b 0%, #12295c 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
  color: #f4f6fb;
  font: inherit;
  direction: rtl;
  text-align: right;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow .18s ease, transform .12s ease, border-color .18s ease;
}
.qr-acct-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  border-color: #ffc20e;
}
.qr-acct-card:active { transform: scale(.995); }
.qr-acct-card:focus-visible { outline: 2px solid var(--menu-accent, #ffc20e); outline-offset: 3px; }
.qr-acct-card-head {
  grid-column: 1;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.qr-acct-card-label { font-size: .84rem; color: #C9A876; font-weight: 700; }
.qr-acct-card-amount {
  font-size: 1.32rem;
  font-weight: 900;
  color: #F0714A;
  overflow-wrap: anywhere;
}
.qr-acct-card.is-settled .qr-acct-card-amount { color: #4ADE80; }
.qr-acct-card.is-settled .qr-acct-card-label { color: #4ADE80; }
.qr-acct-card-meta { grid-column: 1; font-size: .78rem; color: #8d9bbd; }
.qr-acct-card-chevron {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  font-size: 1.05rem;
  color: #ffc20e;
  opacity: .75;
}
.qr-acct-card:hover .qr-acct-card-chevron { opacity: 1; }

/* Placeholder while the session state is still in flight — never fake numbers */
.qr-acct-skeleton {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #eee5d6;
  border-radius: 16px;
  background: #fffdf9;
}
.qr-acct-skeleton-line {
  display: block;
  height: 12px;
  width: 42%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f1e9dc 25%, #f8f2e8 50%, #f1e9dc 75%);
  background-size: 200% 100%;
  animation: qr-acct-shimmer 1.3s ease-in-out infinite;
}
.qr-acct-skeleton-line.wide { width: 64%; height: 16px; margin-bottom: 9px; }
@keyframes qr-acct-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.qr-acct-overlay { z-index: 1050; }
body.menu-overlay-locked { overflow: hidden; }

.qr-acct-modal {
  display: flex;
  flex-direction: column;
  width: min(560px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  direction: rtl;
  text-align: right;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}
.qr-acct-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  padding: 15px 18px;
  background: linear-gradient(135deg, #285ac8 0%, #7a5222 100%);
  color: #fff;
}
.qr-acct-head-text small { display: block; opacity: .78; font-size: .72rem; }
.qr-acct-head-text b { font-size: 1.05rem; }
.qr-acct-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.qr-acct-close:hover { background: rgba(255, 255, 255, .26); }
.qr-acct-body {
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.qr-acct-settled {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #eefaf2;
  border: 1px solid #bfe6cf;
  color: #16703a;
  font-size: .82rem;
  font-weight: 700;
  text-align: center;
}

.qr-acct-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.qr-acct-block {
  min-width: 0;
  padding: 11px 10px;
  border-radius: 13px;
  background: #fdf9f2;
  border: 1px solid #ecdfc9;
}
.qr-acct-block span { display: block; font-size: .74rem; color: #7a6444; }
.qr-acct-block b {
  display: block;
  margin-top: 4px;
  font-size: 1.02rem;
  color: #234ead;
  overflow-wrap: anywhere;
}
.qr-acct-block.paid { background: #eefaf2; border-color: #bfe6cf; }
.qr-acct-block.paid b { color: #16703a; }
.qr-acct-block.rem { background: #fff0ec; border-color: #f0c3b3; }
.qr-acct-block.rem b { color: #8a2f14; }

.qr-acct-section { margin-top: 18px; }
.qr-acct-section h4 { margin: 0 0 9px; font-size: .95rem; color: #285ac8; }

.qr-acct-visit {
  padding: 12px 14px;
  border-radius: 13px;
  background: #faf7f1;
  border: 1px solid #efe6d6;
}
.qr-acct-visit-date {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #efe6d6;
  font-weight: 800;
  font-size: .88rem;
  color: #285ac8;
}
.qr-acct-visit-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  font-size: .84rem;
  color: #7a6444;
}
.qr-acct-visit-row b { color: #234ead; }

.qr-acct-order {
  padding: 13px;
  margin-bottom: 10px;
  border: 1px solid #efe6d6;
  border-radius: 14px;
  background: #fff;
}
.qr-acct-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.qr-acct-order-num { font-size: .9rem; color: #234ead; overflow-wrap: anywhere; }
.qr-acct-status {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 700;
  background: #f1ece3;
  color: #47a0ff;
}
.qr-acct-status.s-pending { background: #fff3cd; color: #9a6700; }
.qr-acct-status.s-preparing { background: #fdeede; color: #9a5b13; }
.qr-acct-status.s-ready { background: #e6f5ec; color: #16703a; }
.qr-acct-status.s-completed { background: #eef1f6; color: #445069; }
.qr-acct-order-time {
  display: block;
  margin-top: 5px;
  color: #8b7a5f;
  font-size: .76rem;
}
.qr-acct-items {
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}
.qr-acct-items li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  font-size: .84rem;
  color: #3374ff;
  border-bottom: 1px solid #f5f0e7;
}
.qr-acct-items li:last-child { border-bottom: 0; }
.qr-acct-item-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.qr-acct-item-name small { display: block; color: #9c8d76; font-size: .74rem; }
.qr-acct-item-qty { flex-shrink: 0; color: #8b7a5f; }
.qr-acct-order-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed #e6dccb;
  font-size: .84rem;
  color: #7a6444;
}
.qr-acct-order-total b { font-size: .96rem; color: #234ead; }

@media (max-width: 600px) {
  /* Bottom-sheet on phones — vertical scroll inside, never horizontal */
  .qr-acct-overlay { padding: 0; align-items: flex-end; }
  .qr-acct-modal {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }
  .qr-acct-body { padding: 14px; }
  .qr-acct-card-amount { font-size: 1.2rem; }
}

@media (max-width: 380px) {
  .qr-acct-block { padding: 9px 8px; }
  .qr-acct-block span { font-size: .68rem; }
  .qr-acct-block b { font-size: .88rem; }
}

/* Live dashboard: fluid grids that respect the sidebar and never force a page-wide scroll. */
.ops-page, .ops-page * { min-width: 0; }
.ops-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ops-content-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.ops-kpi-val { overflow-wrap: anywhere; }
.ops-vip-deferred-total { letter-spacing: -1px; font-size: clamp(23px, 2.2vw, 34px); white-space: nowrap; }
.ops-header-main, .ops-header-actions, .ops-panel-hd, .ops-section-hd { flex-wrap: wrap; }
@media (max-width: 1100px) {
  .ops-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-content-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
  .ops-kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .ops-kpi-card { padding: 13px; }
  .ops-header-actions { width: 100%; }
  .ops-header-actions .btn { margin-inline-start: auto; }
  .ops-vip-deferred-total { font-size: 27px; }
  .ops-free-tables-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── Admin sidebar ─────────────────────────────────────────────────────
   Desktop (>1024px): persistent always-visible sidebar (280px).
   Mobile/tablet (≤1024px): off-canvas drawer toggled by the hamburger.
   Markup + JS (body.nav-open) are unchanged — pure CSS split. ───────── */

@media (min-width: 1025px) {
  .layout.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .layout.app-shell .sidebar {
    position: sticky;
    top: 0;
    inset: auto;
    width: auto;
    height: 100vh;
    transform: none !important;
    visibility: visible;
    pointer-events: auto;
    border-radius: 0 !important;
    box-shadow: 12px 0 34px rgba(6, 13, 28, .18);
  }
  .layout.app-shell .mobile-menu-btn,
  .layout.app-shell .sidebar-toggle,
  .layout.app-shell .mobile-nav-backdrop { display: none !important; }
}

@media (max-width: 1024px) {
  .layout.app-shell {
    display: block;
    min-height: 100vh;
    overflow-x: clip;
  }

  .layout.app-shell .main {
    width: 100%;
    max-width: none;
  }

  .layout.app-shell .sidebar {
    position: fixed !important;
    inset: 0 0 0 auto;
    width: min(88vw, 360px);
    height: 100dvh;
    max-height: 100dvh;
    z-index: 1100;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 0 !important;
    transform: translateX(110%);
    transition: transform .24s cubic-bezier(.4, 0, .2, 1), visibility .24s;
    visibility: hidden;
    pointer-events: none;
    box-shadow: -18px 0 42px rgba(6, 13, 28, .22);
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .layout.app-shell .sidebar {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .layout.app-shell .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(8, 24, 23, .30);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  body.nav-open .layout.app-shell .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .layout.app-shell .nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .layout.app-shell .mobile-menu-btn,
  .layout.app-shell .sidebar-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .layout.app-shell .mobile-menu-btn {
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1;
  }
}

@media (max-width: 900px) {
  .layout.app-shell .main { padding: 16px; }
  .layout.app-shell .topbar,
  .layout.app-shell .page-header { flex-direction: row; align-items: center; }
  .layout.app-shell .top-actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .layout.app-shell .sidebar { width: min(90vw, 340px); }
  .layout.app-shell .main { padding: 12px; }
  .layout.app-shell .topbar,
  .layout.app-shell .page-header { align-items: stretch; flex-direction: column; }
  .layout.app-shell .top-actions { width: 100%; }
  .layout.app-shell .mobile-menu-btn { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .layout.app-shell .sidebar,
  .layout.app-shell .mobile-nav-backdrop { transition: none; }
}


/* ══════════════════════════════════════════════════════════════════════════
   Pizza Home Login — premium split layout
   Scoped entirely to .login-split so the loading / employee-request pages
   (which still use .login / .login-card) are unaffected.
   Palette: near-black #0b1f4b · cream #F7F3E8 · card #ffffff
            ink #14213d · muted #5b6785 · accent #ffc20e (brand champagne)
   ══════════════════════════════════════════════════════════════════════════ */

.login-split {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 55fr 45fr;
  direction: ltr; /* panel order: brand left, form right — content inside stays RTL */
}

.login-brand,
.login-panel { direction: rtl; }

/* ── Left: brand panel ─────────────────────────────────────────────────── */
.login-brand {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 48px 40px;
  background:
    radial-gradient(42rem 42rem at 18% 12%, rgba(255, 194, 14, .10), transparent 60%),
    radial-gradient(30rem 30rem at 85% 88%, rgba(255, 194, 14, .07), transparent 60%),
    #0b1f4b;
}

/* Subtle decorative coffee rings — never competing with the badge */
.login-brand::before,
.login-brand::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 194, 14, .14);
  border-radius: 50%;
  pointer-events: none;
}
.login-brand::before {
  width: 460px; height: 460px;
  top: -140px; inset-inline-start: -120px;
}
.login-brand::after {
  width: 340px; height: 340px;
  bottom: -110px; inset-inline-end: -90px;
  border-color: rgba(255, 194, 14, .10);
}

.login-brand-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.login-brand-logo {
  width: 160px;
  height: auto;
  display: block;
}

.login-brand-wordmark {
  direction: ltr; /* Latin wordmark must not inherit the page's RTL */
  color: #eef2fa;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .22em;
  margin-inline-start: .22em; /* optically re-centers letter-spaced text */
}

.login-brand-tagline {
  direction: ltr; /* Latin tagline must not inherit the page's RTL */
  margin: 0;
  color: #ffc20e;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .34em;
  margin-inline-start: .34em;
}

/* ── Right: form panel ─────────────────────────────────────────────────── */
.login-panel {
  display: grid;
  place-items: center;
  padding: 48px 32px;
  background: #f7f3e8;
}

.login-form {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  animation: cardIn .38s cubic-bezier(.22, 1, .36, 1) both;
}

.login-form-head { margin-bottom: 26px; }

.login-title {
  margin: 0;
  color: #14213d;
  font-size: 28px;
  font-weight: 800;
}

.login-subtitle {
  margin: 8px 0 0;
  color: #5b6785;
  font-size: 14.5px;
  line-height: 1.8;
}

/* Error alert — semantic red, compact, near the form */
.login-error {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #fdf0ee;
  border: 1px solid #f0d4d0;
  color: #b42318;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.7;
}

/* Fields */
.login-field { margin: 0 0 18px; gap: 7px; }

.login-field span {
  color: #14213d;
  font-size: 13px;
  font-weight: 700;
}

.login-field input {
  min-height: 52px;
  padding: 12px 15px;
  border: 1px solid #e3d9c8;
  border-radius: 12px;
  background: #ffffff;
  color: #14213d;
  font-size: 15px;
  box-shadow: 0 1px 2px rgba(21, 47, 105, .04);
}

.login-field input::placeholder { color: #b3a696; }

.login-field input:focus {
  border-color: #ffc20e;
  box-shadow: 0 0 0 3px rgba(255, 194, 14, .22);
}

/* Primary button — brand accent with near-black text */
.login-split .login-btn {
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
  border-radius: 12px;
  background: #ffc20e;
  color: #0b1f4b;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 6px 16px rgba(255, 194, 14, .28);
  transition: background .18s ease, transform .1s ease, box-shadow .18s ease;
}

.login-split .login-btn:hover:not(:disabled) {
  background: #bc8a5f;
  box-shadow: 0 8px 20px rgba(255, 194, 14, .34);
}

.login-split .login-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 3px 10px rgba(255, 194, 14, .26);
}

/* ── Tablet: keep the split but protect the form's width ───────────────── */
@media (max-width: 1100px) {
  .login-split { grid-template-columns: 50fr 50fr; }
  .login-brand-logo { width: 140px; }
}

/* ── Mobile / narrow tablet: stacked, compact brand header on top ──────── */
@media (max-width: 900px) {
  .login-split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }

  .login-brand { padding: 36px 24px 30px; }
  .login-brand::before { width: 260px; height: 260px; top: -110px; inset-inline-start: -90px; }
  .login-brand::after { display: none; }
  .login-brand-inner { gap: 10px; }
  .login-brand-logo { width: 112px; }
  .login-brand-wordmark { font-size: 21px; }
  .login-brand-tagline { font-size: 11px; }

  .login-panel { place-items: start center; padding: 34px 20px 40px; }
  .login-title { font-size: 24px; }
}

/* Respect reduced-motion: no entrance animation */
@media (prefers-reduced-motion: reduce) {
  .login-form { animation: none; }
  .login-split .login-btn { transition: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Sidebar signature restyle — distinctive Pizza Home brand column.
   CSS-only: same markup, same JS (body.nav-open), same drawer on mobile.
   ══════════════════════════════════════════════════════════════════════════ */

/* Column layout so the brand footer can pin to the bottom */
.layout.app-shell .sidebar,
.sidebar {
  display: flex;
  flex-direction: column;
}

/* Brand head: centered identity card */
.side-head {
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 14px 10px 20px;
  border-bottom: 0;
  position: relative;
  text-align: center;
}

/* Gold gradient divider under the brand head */
.side-head::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline: 14px;
  height: 1px;
  background: linear-gradient(to left, transparent, rgba(255, 194, 14, .45), transparent);
}

/* The badge gets a soft golden halo */
.side-head .logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 2px rgba(255, 194, 14, .35), 0 0 26px rgba(255, 194, 14, .16);
}

.side-head h2 {
  color: #f7f3e8;
  font-size: 20px;
  letter-spacing: .08em;
}

/* Nav: pill items with a caramel dot marker */
.nav {
  flex: 1;
  gap: 5px;
  padding-top: 18px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 999px;
  text-align: right;
  color: rgba(247, 243, 232, .72);
  font-size: 14.5px;
  font-weight: 700;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

/* tiny caramel dot — the nav's quiet signature */
.nav button::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(247, 148, 29, .55);
  flex-shrink: 0;
  transition: background .18s ease, transform .18s ease;
}

.nav button:hover {
  background: rgba(30, 79, 168, .55);
  color: #f7f3e8;
  transform: translateX(-4px);
}
.nav button:hover::before { background: var(--mash-caramel); transform: scale(1.25); }

/* Active: glowing accent pill, dot disappears into the fill */
.nav button.active {
  background: var(--mash-accent);
  color: #0b1f4b;
  font-weight: 800;
  transform: none;
  box-shadow: 0 6px 18px rgba(255, 194, 14, .30);
}
.nav button.active::before { background: #0b1f4b; transform: scale(.9); }

/* Brand signature pinned to the bottom of the column (pure CSS) */
.sidebar::after {
  content: "PIZZA · FATEER · CREPE";
  display: block;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  background: linear-gradient(transparent, var(--mash-black) 45%);
  padding: 26px 10px 10px;
  text-align: center;
  direction: ltr;
  color: rgba(255, 194, 14, .75);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .30em;
  border-top: 1px solid rgba(255, 194, 14, .14);
}

/* Mobile drawer: keep the identity, tighten the head */
@media (max-width: 1024px) {
  .side-head { padding-top: 10px; }
  .side-head .sidebar-toggle { position: absolute; top: 12px; inset-inline-end: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav button, .nav button::before { transition: none; }
  .nav button:hover { transform: none; }
}

/* notification counters pin to the pill edge */
.nav button .notif-nav-badge { margin-inline-start: auto; }

/* POS Release 1: hall/dine-in stays visible but non-interactive */
.seg button.pos-type-disabled:disabled {
  opacity: .42;
  cursor: not-allowed;
  background: transparent;
  color: var(--muted);
  filter: grayscale(.4);
}
.seg button.pos-type-disabled:disabled:hover { transform: none; background: transparent; }


/* ═══════════════════════════════════════════════════════════════
   Pizza Home Signature POS — full visual redesign (visual only)
   Scoped strictly under .pos — zero effect on other screens.
   ═══════════════════════════════════════════════════════════════ */

.pos { gap: 20px; }

/* ── Order-type capsule: espresso bar with glowing gold active ── */
.pos .pos-row1 .seg {
  background: #0b1f4b;
  border: 1px solid #152f68;
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  overflow: visible;
  box-shadow: 0 8px 20px rgba(6, 13, 28,.28);
}
.pos .pos-row1 .seg button {
  border-left: 0;
  border-radius: 999px;
  min-height: 38px;
  padding: 0 18px;
  color: #b9a88f;
  font-size: .85rem;
  transition: background .18s, color .18s, box-shadow .18s;
}
.pos .pos-row1 .seg button:hover:not(.active):not(:disabled) { color: #f4f6fb; background: rgba(255,255,255,.07); }
.pos .pos-row1 .seg button.active {
  background: linear-gradient(135deg, #f0e06a, #f2b300);
  color: #0b1f4b;
  box-shadow: 0 0 0 1px rgba(255, 194, 14,.55), 0 4px 16px rgba(255, 194, 14,.35);
}
.pos .pos-row1 .seg button.pos-type-disabled:disabled { color: #4aa7ff; opacity: .55; filter: none; }
.pos .pos-row1 .seg button.pos-type-disabled:disabled:hover { background: transparent; }

/* ── Search: soft pill with caramel focus ring ── */
.pos .pos-product-search {
  height: 44px;
  border-radius: 999px;
  border: 1.5px solid #ded3c0;
  background: #ffffff;
  padding: 0 22px;
  font-size: .92rem;
  box-shadow: inset 0 1px 4px rgba(21, 47, 105,.06);
  transition: border-color .15s, box-shadow .15s;
}
.pos .pos-product-search:focus {
  outline: none;
  border-color: #f7941d;
  box-shadow: 0 0 0 4px rgba(247, 148, 29,.16);
}

/* ── Quick products: warm caramel strip (was teal) ── */
.pos .pos-quick-products {
  background: linear-gradient(135deg, #faf3e4, #f6ecd7);
  border: 1.5px solid #e3d2ae;
  border-radius: 16px;
}
.pos .pos-quick-products-title { color: #7a5426; }
.pos .pos-quick-product-btn {
  background: #ffffff;
  border: 1.5px solid #dbc48f;
  border-radius: 12px;
}
.pos .pos-quick-product-btn:hover { background: #fbf2dd; border-color: #f7941d; transform: translateY(-1px); }
.pos .pos-quick-product-btn:active { background: #f1e2c2; }
.pos .pos-quick-product-price { color: #e07b00; }

/* ── Category dropdown: cream pill matching the search ── */
.pos .pos-category-select {
  height: 44px;
  border-radius: 999px;
  border: 1.5px solid #ded3c0;
  background: #ffffff;
  color: #3b85ff;
  padding: 0 16px;
  font-size: .9rem;
  box-shadow: inset 0 1px 4px rgba(21, 47, 105,.06);
}
.pos .pos-category-select:focus { outline: none; border-color: #f7941d; box-shadow: 0 0 0 4px rgba(247, 148, 29,.16); }

/* ── Image-free product list: cream rows, espresso "add" pill ── */
.pos .pos-prod-group-head { background: #fbf7ee; color: #7a5426; border-bottom-color: #e8ddc4; }
.pos .pos-prod-row {
  border: 1.5px solid #e7decb;
  border-right-width: 3px;
  border-radius: 12px;
  background: #ffffff;
}
.pos .pos-prod-row:hover { background: #fbf2dd; border-color: #f7941d; }
.pos .pos-prod-row-price { color: #1e4fa8; }
.pos .pos-prod-row-add {
  background: #0b1f4b;
  color: #ffc20e;
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: 0 3px 10px rgba(6, 13, 28,.25);
}
.pos .pos-prod-row:hover .pos-prod-row-add { background: #163270; color: #f2e47a; }

/* ── Category chips: cream chips, coffee active ── */
.pos .pos-category-chip {
  border-radius: 999px;
  background: #f6f0e2;
  border: 1.5px solid #e5dac2;
  color: #3b85ff;
  min-height: 40px;
  padding: 7px 16px;
}
.pos .pos-category-chip:hover { background: #efe5cf; border-color: #cdbb96; color: #2553b9; }
.pos .pos-category-chip.active {
  background: linear-gradient(135deg, #3980ff, #2656bf);
  color: #f8f1e2;
  border-color: #2656bf;
  box-shadow: 0 5px 14px rgba(38, 86, 191,.35);
}
.pos .pos-category-chip.active .pos-category-chip-count { background: rgba(255, 194, 14,.92); color: #0b1f4b; }
.pos .pos-category-chip-offer { border-color: rgba(247, 148, 29,.55); background: linear-gradient(135deg, #fff6e2, #fdfaf3); color: #e07b00; }
.pos .pos-category-chip-offer.active { background: linear-gradient(135deg, #c7923e, #e07b00); color: #fff; }

/* ── Sticky category bar: hairline gold under-border ── */
.pos .pos-category-section { border-bottom: 2px solid #e8ddc4; }

/* ── Product cards: rounded café tiles ── */
.pos .pos-product {
  border-radius: 18px;
  border: 1px solid #e7decb;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(21, 47, 105,.07);
}
.pos .pos-product::before { height: 4px; }
.pos .pos-product:hover {
  border-color: rgba(247, 148, 29,.55);
  box-shadow: 0 10px 26px rgba(122,84,38,.18);
  transform: translateY(-3px);
}
.pos .pos-product-footer {
  background: #f8f3e7;
  border-top: 1px solid rgba(30, 79, 168,.09);
  padding: 8px 12px 10px;
}
.pos .pos-product-price { color: #1e4fa8; }
.pos .pos-add-btn {
  background: #0b1f4b;
  color: #ffc20e;
  border-radius: 999px;
  padding: 0 16px;
  min-height: 34px;
  letter-spacing: .01em;
  box-shadow: 0 3px 10px rgba(6, 13, 28,.25);
  transition: background .15s, color .15s, transform .08s, box-shadow .15s;
}
.pos .pos-add-btn:hover { background: #163270; color: #f2e47a; box-shadow: 0 5px 14px rgba(6, 13, 28,.32); }
.pos .pos-add-btn:active { transform: scale(.94); }

/* Pizza Home POS receipt — scoped to the cashier cart only. */
.pos-cart-column { min-width: 0; width: 100%; align-self: stretch; }
.pos .pos-cart-panel {
  position: static; padding: 0 22px 22px; overflow: hidden;
  background: #fffcf5; color: #1b3c85; border: 1px solid #e4d8c5;
  border-radius: 20px; box-shadow: 0 8px 24px rgba(34, 76, 169, .08);
}
.pos .pos-cart-header {
  justify-content: space-between; gap: 12px; padding: 22px 0 18px;
  margin: 0; border-bottom: 1px dashed #d9c7aa; flex-shrink: 0;
}
.pos .pos-cart-eyebrow { display: block; color: #77644e; font-size: 10px; font-weight: 700; letter-spacing: .08em; margin-bottom: 7px; }
.pos .pos-cart-header h2 { color: #1b3c85; font-size: 23px; margin: 0; }
.pos .pos-cart-count { background: #f2ead9; border: 1px solid #e5d8bd; color: #3e8bff; box-shadow: none; padding: 6px 10px; white-space: nowrap; font-size: 12px; }
.pos .pos-cart-context { flex: 0 1 auto; overflow: auto; min-height: 0; }
.pos .pos-cart-context > :first-child { margin-top: 14px; }
.pos .pos-cart-items { min-height: 0; flex: 1 1 auto; scrollbar-width: thin; scrollbar-color: #cbb898 transparent; }
.pos .pos-cart-empty { padding: 36px 8px; gap: 9px; color: #7a6953; text-align: center; }
.pos .pos-cart-empty svg { width: 68px; height: 68px; color: #9a825a; margin-bottom: 4px; }
.pos .pos-cart-empty b { font-size: 15px; color: #3679ff; }
.pos .pos-cart-empty p { font-size: 13px; }
.pos .pos-cart-line { gap: 12px; padding: 18px 0; border-bottom: 1px dashed #dfd2bd; }
.pos .pos-cart-line:last-child { border-bottom: 0; }
.pos .pos-cart-line-offer { background: #f8efd8; border: 1px solid #e8d9b4; border-radius: 12px; padding: 12px; margin: 10px 0; }
.pos .pos-cart-line-info { gap: 7px; }
.pos .pos-cart-line-name { color: #1b3c85; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.pos .pos-cart-line-unit { color: #78654f; font-size: 12px; }
.pos .pos-cart-notes { background: #fffefa; border: 1px solid #e0d5c4; border-radius: 9px; color: #1b3c85; font-size: 12px; min-height: 44px; padding: 9px; min-width: 0; }
.pos .pos-cart-notes::placeholder { color: #87755d; }
.pos .pos-cart-line-controls { gap: 8px; }
.pos .pos-qty-row { gap: 0; border: 1px solid #dccdb7; border-radius: 12px; background: #fffefa; overflow: hidden; }
.pos .pos-qty-row .icon-btn { width: 44px; height: 44px; min-height: 44px; border: 0; border-radius: 0; background: transparent; color: #2a5fd4; font-size: 20px; box-shadow: none; }
.pos .pos-qty-row .icon-btn:hover { background: #f4ead3; }
.pos .pos-qty-num { min-width: 25px; color: #1b3c85; font-size: 15px; }
.pos .pos-cart-line-total { color: #2a5fd4; font-size: 16px; font-weight: 800; max-width: 150px; overflow-wrap: anywhere; }
.pos .pos-remove-btn { min-width: 44px; min-height: 44px; padding: 5px; background: #fff5ef; color: #a04432; border: 1px solid #efd8cc; border-radius: 10px; font-size: 22px; }
.pos .pos-remove-btn:hover { background: #f8e4d9; color: #822d20; border-color: #dbb5a3; }
.pos .pos-cart-footer { flex-shrink: 0; background: #fffcf5; border-top: 1px dashed #d9c7aa; padding-top: 15px; }
.pos .pos-totals { border: 0; margin: 0; padding: 0; gap: 9px; }
.pos .pos-totals-row { color: #78654f; align-items: baseline; flex-wrap: wrap; }
.pos .pos-totals-row b { color: #2a5fd4; }
.pos .pos-totals-grand { margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid #e7dcc8; }
.pos .pos-totals-grand span { color: #2a5fd4; font-size: 16px; }
.pos .pos-totals-grand strong { color: #1b3c85; font-size: 28px; text-shadow: none; overflow-wrap: anywhere; }
.pos .pos-cart-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 0; margin-top: 16px; }
.pos .pos-cart-actions .pos-submit-btn { background: #ffc20e; color: #1b3c85; border: 1px solid #d8c63c; border-radius: 12px; font-size: 16px; padding: 13px 16px; min-height: 48px; box-shadow: none; flex: 1 1 170px; }
.pos .pos-cart-actions .pos-submit-btn:hover:not(:disabled) { background: #f1e268; box-shadow: 0 3px 10px rgba(48, 109, 241, .1); transform: none; }
.pos .pos-cart-actions .pos-submit-btn:disabled { background: #eee7d7; color: #7a6a51; border-color: #e4d9c4; opacity: 1; cursor: not-allowed; }
.pos .pos-cart-actions .btn.secondary { background: transparent; color: #469dff; border: 1px solid #dacdb8; border-radius: 12px; min-height: 48px; }
.pos .pos-cart-actions .btn.secondary:hover:not(:disabled) { background: #f3ebda; }
.pos .pos-cart-actions .btn.secondary:disabled { opacity: 1; color: #8a7b65; border-color: #e6ddce; cursor: not-allowed; }
.pos .pos-cart-panel .notice { border-radius: 10px; }
.pos .pos-cart-column :is(button, input, [tabindex]):focus-visible { outline: 2px solid #806028; outline-offset: 2px; box-shadow: none; }
.pos .pos-last-order { background: #fffcf5; color: #2a5fd4; border: 1px solid #e4d8c5; border-radius: 16px; margin: 14px 0 0; padding: 18px 20px; box-shadow: 0 4px 14px rgba(34, 76, 169,.04); overflow-wrap: anywhere; }
.pos .pos-last-order-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; }
.pos .pos-last-order-heading span { font-size: 11px; color: #4f7049; background: #edf1e5; border-radius: 6px; padding: 4px 7px; }
.pos .pos-last-order-number { display: block; text-align: start; color: #2a5fd4; font-size: 14px; margin: 12px 0; }
.pos .pos-last-order .actions { margin-top: 10px; flex-wrap: wrap; }
.pos .pos-last-order .btn { min-height: 44px; font-size: 12px; }
.pos .pos-last-order .btn:is(.ghost, .secondary) { background: #fffefa; color: #3b84ff; border: 1px solid #dfd1ba; }
@media (min-width: 1101px) {
  .pos-cart-column { position: sticky; top: 16px; align-self: start; }
  .pos .pos-cart-panel { max-height: calc(100vh - 32px); }
  .pos .pos-cart-items { overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 1100px) {
  .pos .pos-cart-panel { max-height: none; }
  .pos .pos-cart-items, .pos .pos-cart-context { overflow: visible; }
}
@media (max-width: 480px) {
  .pos .pos-cart-panel { padding: 0 16px 16px; }
  .pos .pos-cart-line { flex-wrap: wrap; }
  .pos .pos-cart-line-info { flex-basis: 100%; }
  .pos .pos-cart-line-controls { flex-direction: row; align-items: center; flex-wrap: wrap; width: 100%; }
  .pos .pos-cart-line-total { flex: 1; text-align: center; }
  .pos .pos-last-order { padding: 16px; }
}


/* ═══════════════════════════════════════════════════════════════
   Pizza Home Signature Menu — grouped café menu redesign
   Dark lounge theme driven by the menu branding CSS vars, so it
   follows whatever colors are set in admin settings.
   Scoped strictly under .customer-menu-page.
   ═══════════════════════════════════════════════════════════════ */

/* ── Page atmosphere: layered coffee-house glow ── */
.customer-menu-page {
  background:
    radial-gradient(720px 420px at 85% -8%, rgba(255, 194, 14,.14), transparent 62%),
    radial-gradient(560px 380px at 8% 22%, rgba(30, 79, 168,.18), transparent 60%),
    radial-gradient(900px 520px at 50% 108%, rgba(255, 194, 14,.08), transparent 65%),
    var(--menu-bg, #0a1a3f);
  background-attachment: fixed;
}

/* ── Hero: centered badge-over-text café sign ── */
.customer-menu-page .customer-menu-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 38px 22px 34px;
  border-radius: 32px;
}
.customer-menu-page .customer-menu-hero::before {
  top: auto; left: auto;
  bottom: -80px; right: -80px;
  width: 230px; height: 230px;
  border-width: 34px;
  border-color: rgba(255, 194, 14,.10);
}
.customer-menu-page .customer-menu-hero::after {
  top: -50px; bottom: auto; left: -44px;
  width: 130px; height: 130px;
  border-width: 22px;
  border-color: rgba(255, 194, 14,.06);
}
.customer-menu-page .customer-menu-hero-content { align-items: center; }
.customer-menu-page .customer-menu-hero-mark {
  order: -1;
  width: 134px;
  height: 134px;
  border-radius: 50%;
  padding: 6px;
  background: #f7f2e7;
  border: 3px solid rgba(255, 194, 14,.65);
  box-shadow:
    0 0 0 7px rgba(255, 194, 14,.14),
    0 0 46px rgba(255, 194, 14,.28),
    0 12px 30px rgba(0,0,0,.5);
}
.customer-menu-page .customer-menu-hero-title {
  font-size: clamp(28px, 4.8vw, 44px);
  letter-spacing: .05em;
}
.customer-menu-page .customer-menu-badge {
  background: rgba(255, 194, 14,.14);
  border: 1px solid rgba(255, 194, 14,.4);
  color: var(--menu-accent, #ffc20e);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.customer-menu-page .customer-menu-hero-cta,
.customer-menu-page .customer-menu-table-badge {
  border-radius: 999px;
  padding: 10px 24px;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}

/* ── Search: glowing glass pill ── */
.customer-menu-page .customer-search-wrap { margin: 8px 0 16px; }
.customer-menu-page .customer-search-input {
  height: 56px;
  border-radius: 999px;
  padding: 0 26px;
  background: var(--menu-search-bg, rgba(13, 29, 64,.72));
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 194, 14,.3);
  color: var(--menu-search-text, #f4f6fb);
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.customer-menu-page .customer-search-input::placeholder { color: #7A6C58; }
.customer-menu-page .customer-search-input:focus {
  outline: none;
  border-color: var(--menu-accent, #ffc20e);
  box-shadow: 0 0 0 4px rgba(255, 194, 14,.18), 0 0 26px rgba(255, 194, 14,.16);
}
.customer-menu-page .customer-filter-toggle {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--menu-filter-icon-bg, rgba(13, 29, 64,.72));
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 194, 14,.3);
}
.customer-menu-page .customer-filter-dot {
  box-shadow: 0 0 0 2px rgba(13, 29, 64,.9);
}

/* ── Hero contact strip: glass ── */
.customer-menu-page .customer-hero-contact-strip {
  background: rgba(13, 29, 64,.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 194, 14,.24);
}

/* ── Category chips: glass pills, accent when active ── */
.customer-menu-page .customer-category-chips { gap: 10px; padding: 4px 2px 16px; }
.customer-menu-page .customer-chip {
  background: rgba(13, 29, 64,.6);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 194, 14,.25);
  color: #c9d3ea;
  padding: 9px 20px;
  font-size: 13.5px;
}
.customer-menu-page .customer-chip:hover { border-color: rgba(255, 194, 14,.6); color: #f4f6fb; background: rgba(22, 50, 112,.7); }
.customer-menu-page .customer-chip.active {
  background: var(--menu-accent, #ffc20e);
  border-color: var(--menu-accent, #ffc20e);
  color: #0a1a3f;
  box-shadow: 0 6px 18px rgba(255, 194, 14,.35);
}

/* ── Offers: signature framed showcase ── */
.customer-menu-page .customer-offers-section {
  max-width: 800px;
  border: 1.5px solid rgba(255, 194, 14,.5);
  outline: 1px dashed rgba(255, 194, 14,.35);
  outline-offset: -9px;
  border-radius: 26px;
  background:
    radial-gradient(420px 200px at 50% -20%, rgba(255, 194, 14,.12), transparent 70%),
    linear-gradient(160deg, #0d1d41 0%, #071023 100%);
  box-shadow: 0 14px 40px rgba(0,0,0,.5);
}
.customer-menu-page .customer-featured-offer { border-radius: 22px; border-color: rgba(255, 194, 14,.4); }
.customer-menu-page .customer-featured-offer-btn { border-radius: 999px; }
.customer-menu-page .customer-offer-card { border-radius: 20px; }

/* ── Category groups: every section with its products ── */
.customer-menu-page .customer-category-group { margin-bottom: 26px; }
.customer-menu-page .customer-category-group[hidden] { display: none; }
.customer-menu-page .customer-category-group-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 14px;
}
.customer-menu-page .customer-category-group-header::before,
.customer-menu-page .customer-category-group-header::after {
  content: "";
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255, 194, 14,.55));
}
.customer-menu-page .customer-category-group-header::after {
  background: linear-gradient(90deg, rgba(255, 194, 14,.55), transparent);
}
.customer-menu-page .customer-category-group-title {
  margin: 0;
  font-size: clamp(18px, 2.6vw, 23px);
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--menu-hero-text, #ffffff);
  white-space: nowrap;
}
.customer-menu-page .customer-category-group-count {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--menu-accent, #ffc20e);
  background: rgba(255, 194, 14,.12);
  border: 1px solid rgba(255, 194, 14,.35);
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
}

/* ── Product cards: floating lounge tiles ── */
.customer-menu-page .customer-product-grid { gap: 18px; }
.customer-menu-page .customer-product-card {
  position: relative;
  border-radius: 26px;
  border: 1px solid rgba(255, 194, 14,.18);
  background: linear-gradient(170deg, rgba(255, 194, 14,.06) 0%, var(--menu-card, #12295c) 45%);
  box-shadow: 0 6px 22px rgba(0,0,0,.45);
}
.customer-menu-page .customer-product-card:hover {
  border-color: rgba(255, 194, 14,.55);
  box-shadow: 0 14px 36px rgba(0,0,0,.6), 0 0 24px rgba(255, 194, 14,.14);
  transform: translateY(-4px);
}
.customer-menu-page .customer-product-img-wrap { height: 150px; position: relative; }
.customer-menu-page .customer-product-img-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(5, 11, 25,.8), transparent);
  pointer-events: none;
}
.customer-menu-page .customer-product-img-placeholder { height: 150px; }
.customer-menu-page .customer-product-cat-badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  z-index: 2;
  background: rgba(5, 11, 25,.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 194, 14,.4);
  color: #E9CBA3;
  padding: 4px 11px;
}
.customer-menu-page .customer-product-name { font-size: 16px; }
.customer-menu-page .customer-product-footer { padding-top: 8px; }
.customer-menu-page .customer-product-price {
  background: rgba(255, 194, 14,.14);
  border: 1px solid rgba(255, 194, 14,.32);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 15px;
}

/* ── Add buttons: brand pill ── */
.customer-menu-page .customer-add-btn,
.customer-menu-page .customer-menu-add-button {
  background: var(--menu-button, #ffc20e);
  color: var(--menu-button-text, #0a1a3f);
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  box-shadow: 0 5px 16px rgba(0,0,0,.4);
  transition: filter .15s, box-shadow .15s, transform .08s;
}
.customer-menu-page .customer-add-btn:hover,
.customer-menu-page .customer-menu-add-button:hover {
  filter: brightness(1.1);
  box-shadow: 0 8px 22px rgba(255, 194, 14,.35);
  background: var(--menu-button, #ffc20e);
}
.customer-menu-page .customer-add-btn:active { transform: scale(.95); }

/* ── In-cart qty control: accent theme ── */
.customer-menu-page .cpm-qty-ctrl {
  background: rgba(255, 194, 14,.12);
  border: 1.5px solid rgba(255, 194, 14,.6);
}
.customer-menu-page .cpm-qty-btn { color: var(--menu-accent, #ffc20e); }
.customer-menu-page .cpm-qty-btn:hover { background: rgba(255, 194, 14,.22); }
.customer-menu-page .cpm-qty-num { color: var(--menu-accent, #ffc20e); }

/* ── Fixed cart bar: floating gold-trim pill ── */
.customer-menu-page .online-menu-cart-bar,
.customer-menu-page .customer-menu-mobile-cart-bar {
  border-radius: 999px;
  border: 1px solid rgba(255, 194, 14,.4);
  box-shadow: 0 12px 40px rgba(0,0,0,.6), 0 0 24px rgba(255, 194, 14,.12);
}
.customer-menu-page .online-cart-bar-btn { border-radius: 999px; }

/* ── Mobile tuning ── */
@media (max-width: 640px) {
  .customer-menu-page .customer-menu-hero { padding: 28px 16px 26px; border-radius: 26px; }
  .customer-menu-page .customer-menu-hero-mark { width: 110px; height: 110px; }
  .customer-menu-page .customer-product-grid { gap: 12px; }
  .customer-menu-page .customer-category-group-header { gap: 10px; }
}

/* hidden attribute must win over display:grid on the search-empty state */
.customer-menu-page [data-qr-search-empty][hidden] { display: none; }

/* ── Theme-aware text (brochure only): ink vars adapt to tenant branding ── */
.bro-menu { color: var(--menu-ink, #f4f6fb); }
.bro-menu .customer-category-group-title { color: var(--menu-ink, #ffffff); }
.bro-menu .customer-product-desc { color: var(--menu-muted, #8d9bbd); }
/* .customer-contact-section is a deliberately non-adaptive dark brand band
   (see its rules above) — it supplies its own colors via --menu-primary/
   --menu-accent/--menu-hero-text regardless of .bro-menu, so it needs no
   theme override here. */
.bro-menu .customer-product-img-wrap::after {
  background: linear-gradient(to top, var(--menu-card, rgba(5, 11, 25,.8)), transparent);
}
/* surfaces that stay dark on purpose (cart, empty states) */
.bro-menu .customer-menu-empty { color: #f4f6fb; }
.bro-menu .customer-menu-cart,
.bro-menu .customer-menu-cart-head h2,
.bro-menu .customer-menu-cart-line b { color: #f4f6fb; }

/* ═══════════════════════════════════════════════════════════════════════════
   BROCHURE / CLASSIC MENU STYLE
   Activated when menuStyle === "brochure" — visual menu is unaffected.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Brochure page root ─────────────────────────────────────────────────── */
.bro-menu .customer-menu-container {
  max-width: 860px;
}

/* Brochure/classic hero reuses .customer-menu-hero (see the "Signature Menu"
   block above) verbatim — same markup, same classes — so it always matches
   the visual-style header exactly instead of duplicating its glow/gradient
   rules a second time. */

/* ── Category grid: 2 columns on desktop, 1 on mobile ──────────────────── */
.bro-category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 28px;
  padding: 4px 0 16px;
}
@media (max-width: 640px) {
  .bro-category-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ── Category block ─────────────────────────────────────────────────────── */
.bro-category-block {
  background: var(--menu-card-bg, rgba(255,255,255,0.06));
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  overflow: hidden;
  break-inside: avoid;
}
.bro-category-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: var(--menu-accent, #c8a96e);
  gap: 8px;
}
.bro-category-block-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--menu-cat-header-text, #fff);
  letter-spacing: 0.01em;
}
.bro-category-block .customer-category-group-count {
  font-size: 0.72rem;
  color: var(--menu-cat-header-text, #fff);
  opacity: 0.8;
  white-space: nowrap;
}

/* ── Product list inside a category block ───────────────────────────────── */
.bro-product-list {
  display: flex;
  flex-direction: column;
}

/* ── Product row ────────────────────────────────────────────────────────── */
.bro-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px dashed rgba(0,0,0,0.07);
  transition: background 0.15s;
  cursor: pointer;
}
.bro-product-row:last-child {
  border-bottom: none;
}
.bro-product-row:hover,
.bro-product-row:focus-within {
  background: rgba(200,169,110,0.08);
  outline: none;
}
.bro-product-row.bro-row-compact {
  padding: 7px 14px;
}

/* Info side (name + desc) */
.bro-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bro-row-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--menu-bro-name, var(--menu-text, inherit));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.bro-row-name-secondary {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--menu-muted, inherit);
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.bro-row-desc {
  font-size: 0.75rem;
  color: var(--menu-bro-desc, var(--menu-text, inherit));
  opacity: 0.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* Right side (price + CTA) */
.bro-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.bro-row-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--menu-bro-price, var(--menu-accent, #c8a96e));
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

/* Compact add button for brochure rows */
.bro-add-btn.customer-add-btn {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 20px;
  min-height: unset;
  height: 28px;
  line-height: 1;
  white-space: nowrap;
}

/* Qty control in brochure rows — reuse cpm-qty-ctrl but tighter */
.bro-qty-ctrl.cpm-qty-ctrl {
  transform: scale(0.85);
  transform-origin: right center;
}

/* "عرض فقط" badge in brochure rows */
.bro-row-label-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.15);
  opacity: 0.65;
  white-space: nowrap;
}

/* ── Offers section (brochure style — text rows, no image cards) ─────────── */
.bro-offers-section {
  margin: 12px 0;
  border: 1px solid var(--menu-accent, #c8a96e);
  border-radius: 10px;
  overflow: hidden;
}
.bro-offers-header {
  padding: 10px 16px 8px;
  background: var(--menu-accent, #c8a96e);
}
.bro-offers-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px;
}
.bro-offers-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.85);
  margin: 0;
}
.bro-offers-list {
  display: flex;
  flex-direction: column;
}
.bro-offer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px dashed rgba(0,0,0,0.07);
}
.bro-offer-row:last-child {
  border-bottom: none;
}
.bro-offer-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bro-offer-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--menu-accent, #c8a96e);
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  display: inline-block;
  margin-bottom: 2px;
}
.bro-offer-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--menu-text, inherit);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bro-offer-items {
  font-size: 0.74rem;
  opacity: 0.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Dark-mode: brochure surfaces ────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .bro-category-block {
    border-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
  }
  .bro-product-row {
    border-bottom-color: rgba(255,255,255,0.07);
  }
  .bro-product-row:hover,
  .bro-product-row:focus-within {
    background: rgba(200,169,110,0.12);
  }
  .bro-offer-row {
    border-bottom-color: rgba(255,255,255,0.07);
  }
  .bro-offers-section {
    border-color: var(--menu-accent, #c8a96e);
  }
  .bro-row-label-badge {
    border-color: rgba(255,255,255,0.2);
  }
  .bro-category-block-header {
    border-bottom-color: rgba(255,255,255,0.08);
  }
}

/* ── "wide" screen: give blocks more breathing room ─────────────────────── */
@media (min-width: 900px) {
  .bro-category-grid {
    gap: 28px 36px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   END BROCHURE MENU STYLE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════════════
   Pizza Home — menu header (ph-*)
   ════════════════════════════════════════════════════════════════════════ */
.ph-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  margin-bottom: 18px;
  padding: 18px 22px 0;
  color: #fff;
  background:
    radial-gradient(520px 320px at 12% 70%, rgba(255, 194, 14, .22), transparent 65%),
    radial-gradient(420px 300px at 92% 8%, rgba(230, 51, 34, .30), transparent 60%),
    linear-gradient(150deg, #10285e 0%, #0b1d47 55%, #091536 100%);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .7);
}
.ph-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.ph-hero-glow {
  position: absolute; width: 380px; height: 380px; left: -60px; bottom: -120px;
  background: radial-gradient(circle, rgba(247, 148, 29, .35), transparent 65%);
  filter: blur(10px); pointer-events: none;
}
.ph-topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.ph-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ph-brand-logo {
  width: 52px; height: 52px; border-radius: 16px; object-fit: cover;
  border: 2px solid #ffc20e; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); flex-shrink: 0;
}
.ph-brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ph-brand-text b { font-size: 19px; font-weight: 900; letter-spacing: .3px; color: #fff; }
.ph-brand-text span { font-size: 12.5px; color: #ffd54f; font-weight: 700; }
.ph-open-pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
  background: rgba(34, 197, 94, .14); color: #86efac; border: 1px solid rgba(34, 197, 94, .35);
}
.ph-open-pill i {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .7); animation: phPulse 1.8s infinite;
}
@keyframes phPulse { 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

.ph-hero-main {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center; gap: 18px; padding: 26px 0 30px;
}
.ph-hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; text-align: right; }
.ph-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 900;
  color: #1a1200; background: linear-gradient(90deg, #ffc20e, #f7941d);
  box-shadow: 0 8px 20px -8px rgba(247, 148, 29, .8);
}
.ph-title {
  margin: 0; font-size: clamp(30px, 4.6vw, 52px); font-weight: 900; line-height: 1.2;
  color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, .35); text-wrap: balance;
}
.ph-desc { margin: 0; max-width: 520px; font-size: 15.5px; line-height: 1.85; color: #c9d3ea; }
.ph-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.ph-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 16px; font-size: 16px; font-weight: 900;
  text-decoration: none; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.ph-btn:hover { transform: translateY(-2px); }
.ph-btn-primary {
  color: #fff; border: 0;
  background: linear-gradient(135deg, #ef4423 0%, #d62718 100%);
  box-shadow: 0 14px 30px -10px rgba(214, 39, 24, .9), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.ph-btn-ghost {
  color: #fff; background: rgba(255, 255, 255, .08); border: 1.5px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ph-btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.ph-features { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ph-features li {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 12px;
  font-size: 13px; font-weight: 800; color: #eef2fa;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
}
.ph-features li span { font-size: 16px; }
.ph-hero-loc { font-size: 13.5px; color: #c9d3ea; }
.ph-hero-loc a { color: #ffc20e; font-weight: 800; text-decoration: none; }
.ph-hero-table {
  padding: 10px 16px; border-radius: 14px; font-weight: 900; font-size: 16px;
  background: rgba(255, 194, 14, .14); color: #ffd54f; border: 1px solid rgba(255, 194, 14, .4);
}

.ph-hero-art { position: relative; display: grid; place-items: center; min-height: 300px; }
.ph-plate {
  position: relative; width: min(100%, 330px); aspect-ratio: 1; border-radius: 50%;
  padding: 14px;
  background: radial-gradient(circle, #f4f6fb 0%, #dfe5f1 62%, #b9c4dc 100%);
  box-shadow: 0 40px 70px -20px rgba(0, 0, 0, .75), 0 0 0 10px rgba(255, 255, 255, .05);
}
.ph-pizza-svg { width: 100%; height: 100%; display: block; animation: phSpin 60s linear infinite; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
@keyframes phSpin { to { transform: rotate(360deg); } }
.ph-art-badge {
  position: absolute; bottom: 6%; right: 4%;
  width: 104px; height: 104px; border-radius: 50%; padding: 4px;
  background: linear-gradient(135deg, #ffc20e, #f7941d);
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, .6);
  transform: rotate(-8deg);
}
.ph-art-logo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; border: 3px solid #0b1d47; }
.ph-float { position: absolute; font-size: 30px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .4)); animation: phFloat 5s ease-in-out infinite; }
.ph-f1 { top: 4%; right: 12%; }
.ph-f2 { top: 22%; left: 2%; animation-delay: -1.2s; }
.ph-f3 { bottom: 8%; left: 10%; animation-delay: -2.4s; }
.ph-f4 { top: 2%; left: 30%; animation-delay: -3.6s; font-size: 24px; }
@keyframes phFloat { 50% { transform: translateY(-12px) rotate(8deg); } }

.ph-checker {
  position: relative; z-index: 2; height: 18px; margin: 0 -22px;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #d62718 25%, transparent 25%, transparent 75%, #d62718 75%),
    linear-gradient(45deg, #d62718 25%, transparent 25%, transparent 75%, #d62718 75%);
  background-size: 18px 18px; background-position: 0 0, 9px 9px;
  opacity: .92;
}

/* Sticky category tabs */
.ph-cat-tabs {
  position: sticky; top: 0; z-index: 30;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 14px; padding: 10px 16px;
  background: rgba(10, 26, 63, .88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.ph-cat-tabs::-webkit-scrollbar { display: none; }
.ph-cat-tab {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 999px; font-size: 14px; font-weight: 800;
  color: #eef2fa; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer; transition: background .18s ease, color .18s ease;
}
.ph-cat-tab:hover { background: #ffc20e; color: #0a1a3f; border-color: #ffc20e; }
.ph-cat-tab small {
  font-size: 11px; font-weight: 900; padding: 1px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .14);
}

@media (max-width: 760px) {
  .ph-hero { padding: 14px 14px 0; border-radius: 22px; }
  .ph-checker { margin: 0 -14px; }
  .ph-brand-logo { width: 44px; height: 44px; border-radius: 13px; }
  .ph-brand-text b { font-size: 17px; }
  .ph-open-pill { font-size: 11.5px; padding: 6px 10px; }
  .ph-hero-main { grid-template-columns: 1fr; padding: 16px 0 22px; gap: 6px; }
  .ph-hero-art { order: -1; min-height: 0; padding: 6px 0 4px; }
  .ph-plate { width: 230px; padding: 10px; }
  .ph-art-badge { width: 78px; height: 78px; right: calc(50% - 128px); bottom: 0; }
  .ph-hero-copy { align-items: center; text-align: center; }
  .ph-desc { font-size: 14.5px; }
  .ph-hero-actions { justify-content: center; width: 100%; }
  .ph-btn { flex: 1 1 160px; min-height: 48px; font-size: 15px; }
  .ph-features { justify-content: center; }
  .ph-float { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-pizza-svg, .ph-float, .ph-open-pill i { animation: none; }
}

/* Pizza Home — product image placeholder (until real photos are uploaded) */
.customer-menu-page .customer-product-img-placeholder,
.customer-menu-page .menu-detail-img-placeholder {
  background:
    radial-gradient(circle at 50% 55%, rgba(255, 194, 14, .28), transparent 58%),
    radial-gradient(circle at 80% 10%, rgba(214, 39, 24, .35), transparent 55%),
    linear-gradient(160deg, #163c82, #0e2352) !important;
}
.customer-menu-page .customer-product-img-placeholder .cpm-emoji { font-size: 64px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); }

@media (max-width: 760px) {
  .ph-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 6px; }
  .ph-features li { flex-direction: column; justify-content: center; gap: 3px; padding: 8px 4px; font-size: 11.5px; text-align: center; }
  .ph-features li span { font-size: 18px; }
  .ph-plate { width: 210px; }
  .ph-art-badge { right: calc(50% - 118px); }
  .ph-hero-copy { gap: 11px; }
}

/* ════════════════════════════════════════════════════════════════════════
   Pizza Home — admin look (font, dashboard banner, KPI cards, panels)
   ════════════════════════════════════════════════════════════════════════ */
body, button, input, select, textarea { font-family: "Cairo", Tahoma, Arial, "Segoe UI", sans-serif; }

.ops-page { background: transparent; gap: 20px; }

.ph-dash-hero {
  position: relative; overflow: hidden;
  border-radius: 24px;
  padding: 24px 26px 0;
  color: #fff;
  background:
    radial-gradient(420px 260px at 8% 120%, rgba(255, 194, 14, .28), transparent 65%),
    radial-gradient(380px 240px at 96% -20%, rgba(214, 39, 24, .35), transparent 60%),
    linear-gradient(140deg, #12306f 0%, #0b1f4b 60%, #091536 100%);
  box-shadow: 0 24px 50px -26px rgba(11, 31, 75, .75);
}
.ph-dash-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
}
.ph-dash-hero::after {
  content: "🍕"; position: absolute; left: 22px; top: 6px; font-size: 120px; line-height: 1;
  opacity: .12; transform: rotate(-18deg); pointer-events: none;
}
.ph-dash-hero-main {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.ph-dash-hello { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ph-dash-logo {
  width: 74px; height: 74px; border-radius: 22px; object-fit: cover; flex-shrink: 0;
  border: 3px solid #ffc20e; box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}
.ph-dash-hello-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ph-dash-date { font-size: 12.5px; font-weight: 700; color: #ffd54f; }
.ph-dash-hello-text h1 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 900; color: #fff; }
.ph-dash-hello-text p { margin: 0; font-size: 13.5px; color: #c9d3ea; }
.ph-dash-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ph-dash-upd { font-size: 12px; color: #c9d3ea; }
.ph-dash-refresh {
  padding: 8px 14px; border-radius: 12px; font-weight: 800; font-size: 13px;
  color: #0a1a3f; background: #ffc20e; box-shadow: 0 8px 18px -8px rgba(255, 194, 14, .9);
}
.ph-dash-refresh:hover { background: #ffd54f; }

.ph-dash-quick {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px;
  margin: 22px 0 22px;
}
.ph-dash-tile {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
  text-align: right; color: #fff;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.ph-dash-tile:hover { transform: translateY(-2px); background: rgba(255, 194, 14, .16); border-color: rgba(255, 194, 14, .55); }
.ph-dash-tile-icon {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
  font-size: 21px; background: linear-gradient(135deg, #ffc20e, #f7941d);
  box-shadow: 0 6px 14px -6px rgba(247, 148, 29, .9);
}
.ph-dash-tile-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.ph-dash-tile-text b { font-size: 14.5px; font-weight: 900; }
.ph-dash-tile-text small { font-size: 11.5px; color: #c9d3ea; }
.ph-dash-checker { margin: 0 -26px; height: 14px; background-size: 14px 14px; background-position: 0 0, 7px 7px; }

/* KPI cards */
.ops-page .ops-kpi-grid { gap: 14px; }
.ops-page .ops-kpi-card {
  --kpi: #1e4fa8; --kpi-soft: rgba(30, 79, 168, .1);
  position: relative; overflow: hidden;
  border: 1px solid #e3e9f5; border-radius: 20px; padding: 18px 18px 16px;
  background: #fff; align-items: center;
  box-shadow: 0 10px 28px -18px rgba(11, 31, 75, .45);
}
.ops-page .ops-kpi-card::before {
  content: ""; position: absolute; top: 0; right: 0; width: 5px; height: 100%; background: var(--kpi);
}
.ops-page .ops-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -18px rgba(11, 31, 75, .55); }
.ops-page .ops-kpi-icon {
  width: 56px; height: 56px; border-radius: 17px; display: grid; place-items: center;
  font-size: 26px; background: var(--kpi-soft); color: var(--kpi);
}
.ops-page .ops-kpi-val { font-size: 34px; letter-spacing: -.5px; color: var(--kpi); }
.ops-page .ops-kpi-lbl { font-size: 14px; font-weight: 800; color: #14213d; }
.ops-page .ops-kpi-warn    { --kpi: #f7941d; --kpi-soft: rgba(247, 148, 29, .13); }
.ops-page .ops-kpi-ok      { --kpi: #16a34a; --kpi-soft: rgba(22, 163, 74, .11); }
.ops-page .ops-kpi-info,
.ops-page .ops-kpi-blue    { --kpi: #1e4fa8; --kpi-soft: rgba(30, 79, 168, .1); }
.ops-page .ops-kpi-danger  { --kpi: #d62718; --kpi-soft: rgba(214, 39, 24, .1); }
.ops-page .ops-kpi-neutral { --kpi: #5b6785; --kpi-soft: rgba(91, 103, 133, .1); }
.ops-page .ops-kpi-warn .ops-kpi-val,
.ops-page .ops-kpi-ok .ops-kpi-val,
.ops-page .ops-kpi-info .ops-kpi-val,
.ops-page .ops-kpi-blue .ops-kpi-val,
.ops-page .ops-kpi-danger .ops-kpi-val { color: var(--kpi); }

/* Panels */
.ops-page .ops-panel {
  border-radius: 20px; border: 1px solid #e3e9f5;
  box-shadow: 0 10px 28px -20px rgba(11, 31, 75, .45);
}
.ops-page .ops-panel-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; color: #14213d; }
.ops-page .ops-panel-title::before {
  content: ""; width: 6px; height: 18px; border-radius: 4px; background: linear-gradient(180deg, #ffc20e, #f7941d);
}

@media (max-width: 760px) {
  .ph-dash-hero { padding: 18px 16px 0; border-radius: 20px; }
  .ph-dash-checker { margin: 0 -16px; }
  .ph-dash-logo { width: 58px; height: 58px; border-radius: 17px; }
  .ph-dash-hero::after { font-size: 80px; }
  .ph-dash-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
  .ph-dash-tile { padding: 10px; gap: 9px; }
  .ph-dash-tile-icon { width: 36px; height: 36px; font-size: 18px; }
  .ph-dash-tile-text small { display: none; }
}

/* Sticky category tabs need a non-scrolling ancestor: clip instead of hidden */
.customer-menu-page { overflow-x: clip; }

/* ════════════════════════════════════════════════════════════════════════
   Pizza Home — checkout sheet (ph-co-*) and live order tracker (ph-track-*)
   ════════════════════════════════════════════════════════════════════════ */
.ph-co-modal { background: rgba(5, 12, 32, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); z-index: 1400; }
.ph-co-modal .ph-co {
  width: min(560px, 100%); max-height: 92vh; padding: 0; overflow: hidden;
  display: flex; flex-direction: column;
  background: #f5f7fc; color: #14213d; border-radius: 26px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
  font-family: "Cairo", Tahoma, Arial, sans-serif;
}
.ph-co-head {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px 18px; color: #fff; flex-shrink: 0;
  background:
    radial-gradient(260px 140px at 10% 120%, rgba(255, 194, 14, .3), transparent 70%),
    linear-gradient(140deg, #12306f, #0b1f4b);
}
.ph-co-head::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 6px;
  background-color: #fff;
  background-image: linear-gradient(45deg, #d62718 25%, transparent 25%, transparent 75%, #d62718 75%),
                    linear-gradient(45deg, #d62718 25%, transparent 25%, transparent 75%, #d62718 75%);
  background-size: 12px 12px; background-position: 0 0, 6px 6px;
}
.ph-co-head-text { display: flex; flex-direction: column; line-height: 1.25; }
.ph-co-kicker { font-size: 12px; font-weight: 800; color: #ffd54f; }
.ph-co-head h3 { margin: 0; font-size: 22px; font-weight: 900; color: #fff; }
.ph-co-close {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .22);
  display: grid; place-items: center; padding: 0; font-size: 16px; font-weight: 900;
  color: #fff; background: rgba(255, 255, 255, .1); cursor: pointer;
}
.ph-co-close:hover { background: rgba(255, 255, 255, .2); }
.ph-co-form { display: flex; flex-direction: column; min-height: 0; flex: 1; margin: 0; }
.ph-co-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }

.ph-co-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph-co-type {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 18px; text-align: right;
  background: #fff; border: 2px solid #e1e7f3; color: #14213d; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ph-co-type:hover { border-color: #ffc20e; }
.ph-co-type.is-active { border-color: #d62718; box-shadow: 0 10px 22px -14px rgba(214, 39, 24, .9); background: #fff8f6; }
.ph-co-type.is-single { cursor: default; }
.ph-co-type-ico { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; font-size: 24px; border-radius: 14px; background: #fff3cc; }
.ph-co-type.is-active .ph-co-type-ico { background: linear-gradient(135deg, #ffc20e, #f7941d); }
.ph-co-type-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.ph-co-type-text b { font-size: 14.5px; font-weight: 900; }
.ph-co-type-text small { font-size: 12px; color: #5b6785; font-weight: 700; }

.ph-co-section { background: #fff; border: 1px solid #e3e9f5; border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ph-co-section-title { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 900; color: #0e2352; }
.ph-co-section-title > span {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-size: 12.5px; color: #0a1a3f; background: #ffc20e;
}
.ph-co-forget { margin-inline-start: auto; border: 0; background: none; color: #1e4fa8; font-weight: 800; font-size: 12.5px; cursor: pointer; padding: 2px 4px; }
.ph-co-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph-co-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.ph-co-label { font-size: 13px; font-weight: 800; color: #3b4766; }
.ph-co-label em { color: #d62718; font-style: normal; }
.ph-co-input {
  width: 100%; box-sizing: border-box; min-height: 48px; padding: 11px 14px; border-radius: 14px;
  border: 1.5px solid #d8e0ee; background: #f8faff; color: #14213d; font: inherit; font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; resize: vertical;
}
textarea.ph-co-input { min-height: 0; line-height: 1.6; }
.ph-co-input::placeholder { color: #94a0bb; }
.ph-co-input:focus { outline: none; border-color: #1e4fa8; background: #fff; box-shadow: 0 0 0 4px rgba(30, 79, 168, .14); }

.ph-co-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.ph-co-zone {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 14px; text-align: right;
  border: 1.5px solid #d8e0ee; background: #f8faff; color: #14213d; cursor: pointer; font: inherit;
}
.ph-co-zone b { font-size: 13.5px; font-weight: 800; }
.ph-co-zone small { font-size: 12px; color: #16a34a; font-weight: 800; }
.ph-co-zone.is-active { border-color: #d62718; background: #fff8f6; box-shadow: 0 0 0 3px rgba(214, 39, 24, .12); }

.ph-co-gps-btn {
  width: 100%; min-height: 48px; border-radius: 14px; border: 1.5px dashed #1e4fa8; background: #eef3ff;
  color: #1e4fa8; font: inherit; font-size: 14.5px; font-weight: 900; cursor: pointer;
}
.ph-co-gps-btn small { font-weight: 700; color: #5b6785; }
.ph-co-gps-btn:disabled { opacity: .7; cursor: progress; }
.ph-co-gps { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; font-weight: 800; }
.ph-co-gps.is-ok { background: #e9f8ef; color: #15803d; border: 1px solid #b7e6c8; }
.ph-co-gps button { border: 0; background: none; color: #5b6785; font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.ph-co-hint { margin: 0; font-size: 12.5px; font-weight: 700; }
.ph-co-hint.is-warn { color: #b45309; }

.ph-co-pickup { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; background: #fff8e1; border: 1px solid #ffe08a; font-size: 13.5px; color: #3b4766; }
.ph-co-pickup b { color: #0e2352; font-size: 14.5px; }
.ph-co-pickup a { align-self: flex-start; color: #1e4fa8; font-weight: 900; text-decoration: none; }

.ph-co-lines { display: flex; flex-direction: column; }
.ph-co-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #e3e9f5; }
.ph-co-line:last-child { border-bottom: 0; }
.ph-co-line-name { display: flex; flex-direction: column; font-size: 14px; font-weight: 800; min-width: 0; }
.ph-co-line-name small { font-size: 12px; color: #7a86a3; font-weight: 700; }
.ph-co-qty { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: #f0f3fa; }
.ph-co-qty button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: #fff; color: #0e2352; font-size: 17px; font-weight: 900; cursor: pointer; box-shadow: 0 1px 3px rgba(11, 31, 75, .15); }
.ph-co-qty b { min-width: 24px; text-align: center; font-size: 14px; }
.ph-co-line-total { font-size: 14px; color: #0e2352; white-space: nowrap; }
.ph-co-sum { display: flex; flex-direction: column; gap: 7px; padding: 12px; border-radius: 14px; background: #f5f7fc; }
.ph-co-sum-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 700; color: #3b4766; }
.ph-co-sum-row.is-total { padding-top: 8px; border-top: 1px solid #dfe5f1; font-size: 17px; font-weight: 900; color: #0e2352; }
.ph-co-muted { color: #94a0bb; }
.ph-co-free { font-style: normal; color: #16a34a; font-weight: 900; }
.ph-co-pay { padding: 10px 12px; border-radius: 12px; background: #e9f8ef; color: #15803d; font-size: 13.5px; font-weight: 700; }
.ph-co-alert { padding: 11px 14px; border-radius: 14px; background: #fdecea; color: #b42318; border: 1px solid #f7c4bd; font-size: 13.5px; font-weight: 800; }
.ph-co-alert.is-warn { background: #fff6e0; color: #92400e; border-color: #fcd98a; }

.ph-co-foot { flex-shrink: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid #e3e9f5; box-shadow: 0 -10px 24px -18px rgba(11, 31, 75, .5); }
.ph-co-submit {
  width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 20px; border: 0; border-radius: 18px; cursor: pointer; font: inherit; color: #fff;
  background: linear-gradient(135deg, #ef4423, #d62718);
  box-shadow: 0 16px 30px -14px rgba(214, 39, 24, .95), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s ease, filter .15s ease;
}
.ph-co-submit span { font-size: 17px; font-weight: 900; }
.ph-co-submit b { font-size: 16px; font-weight: 900; padding: 5px 12px; border-radius: 12px; background: rgba(0, 0, 0, .18); }
.ph-co-submit:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); }
.ph-co-submit:disabled { cursor: not-allowed; filter: grayscale(.5); opacity: .7; }
.ph-co-foot-note { margin: 8px 0 0; text-align: center; font-size: 12px; font-weight: 700; color: #7a86a3; }

@media (max-width: 640px) {
  .ph-co-modal { align-items: flex-end; padding: 0; }
  .ph-co-modal .ph-co { width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 24px 24px 0 0; }
  .ph-co-modal .ph-co.is-entering { animation: phSheetUp .28s ease-out; }
  .ph-co-body { padding: 12px 12px 8px; gap: 12px; }
  .ph-co-grid { grid-template-columns: 1fr; }
  .ph-co-type { flex-direction: column; text-align: center; gap: 6px; padding: 12px 8px; }
  .ph-co-type-text { align-items: center; }
  .ph-co-type.is-single { flex-direction: row; text-align: right; }
  .ph-co-type.is-single .ph-co-type-text { align-items: flex-start; }
  .ph-co-zones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@keyframes phSheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ── Live order tracker ── */
.ph-track {
  position: relative; overflow: hidden; margin: 0 0 18px; padding: 18px; border-radius: 24px; color: #fff;
  background:
    radial-gradient(320px 200px at 0% 120%, rgba(255, 194, 14, .25), transparent 70%),
    linear-gradient(145deg, #143a85, #0b1f4b);
  border: 1px solid rgba(255, 194, 14, .35);
  box-shadow: 0 24px 50px -26px rgba(0, 0, 0, .8);
}
.ph-track.is-done { border-color: rgba(34, 197, 94, .5); }
.ph-track-cancelled { background: linear-gradient(145deg, #3b1d2a, #1d1430); border-color: rgba(214, 39, 24, .5); }
@keyframes phTrackIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.ph-track-head { display: flex; align-items: center; gap: 14px; }
.ph-track-emoji {
  width: 64px; height: 64px; flex-shrink: 0; display: grid; place-items: center; font-size: 32px; border-radius: 20px;
  background: linear-gradient(135deg, #ffc20e, #f7941d); box-shadow: 0 10px 24px -10px rgba(247, 148, 29, .9);
}
.ph-track-emoji.is-live { animation: phBob 1.6s ease-in-out infinite; }
@keyframes phBob { 50% { transform: translateY(-4px) rotate(-4deg); } }
.ph-track-titles { display: flex; flex-direction: column; min-width: 0; }
.ph-track-num { font-size: 12.5px; font-weight: 800; color: #ffd54f; }
.ph-track-titles h3 { margin: 2px 0; font-size: 21px; font-weight: 900; color: #fff; }
.ph-track-titles p { margin: 0; font-size: 13.5px; color: #c9d3ea; }
.ph-track-steps {
  --ph-p: 0;
  position: relative; list-style: none; margin: 18px 0 6px; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
}
.ph-track-steps::before, .ph-track-steps::after {
  content: ""; position: absolute; top: 17px; right: 10%; height: 4px; border-radius: 4px;
}
.ph-track-steps::before { left: 10%; background: rgba(255, 255, 255, .14); }
.ph-track-steps::after { width: calc(80% * var(--ph-p)); background: linear-gradient(90deg, #f7941d, #ffc20e); transition: width .5s ease; }
.ph-track-steps li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ph-track-steps i {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: 17px; font-weight: 900;
  background: #1b3470; border: 2px solid rgba(255, 255, 255, .18); color: #c9d3ea; filter: grayscale(.8); opacity: .8;
}
.ph-track-steps li.is-done i { background: #ffc20e; border-color: #ffc20e; color: #0a1a3f; filter: none; opacity: 1; }
.ph-track-steps li.is-current i { background: #fff; border-color: #ffc20e; filter: none; opacity: 1; box-shadow: 0 0 0 6px rgba(255, 194, 14, .25); }
.ph-track-steps span { font-size: 11.5px; font-weight: 800; color: #9fb0d6; line-height: 1.3; }
.ph-track-steps li.is-done span, .ph-track-steps li.is-current span { color: #fff; }
.ph-track-eta, .ph-track-driver { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .08); font-size: 13.5px; color: #eef2fa; }
.ph-track-eta b, .ph-track-driver b { color: #ffd54f; }
.ph-track-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ph-track-items span { padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 12.5px; color: #dfe6f5; }
.ph-track-err { margin-top: 10px; font-size: 12.5px; color: #fcd34d; }
.ph-track-actions { display: flex; gap: 8px; margin-top: 14px; }
.ph-track-call, .ph-track-ghost {
  flex: 1; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px;
  font: inherit; font-size: 14.5px; font-weight: 900; text-decoration: none; cursor: pointer;
}
.ph-track-call { color: #0a1a3f; background: #ffc20e; border: 0; }
.ph-track-ghost { color: #fff; background: rgba(255, 255, 255, .08); border: 1.5px solid rgba(255, 255, 255, .22); }
.ph-track-live { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 12px 0 0; font-size: 12px; color: #9fb0d6; }
.ph-track-live i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: phPulse 1.8s infinite; }

.ph-track-pill {
  width: 100%; display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 14px; border-radius: 18px;
  text-align: right; color: #fff; cursor: pointer; font: inherit;
  background: linear-gradient(135deg, #143a85, #0e2352); border: 1.5px solid rgba(255, 194, 14, .5);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .8);
}
.ph-track-pill.is-done { border-color: rgba(34, 197, 94, .5); }
.ph-track-pill-ico { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; font-size: 22px; border-radius: 14px; background: linear-gradient(135deg, #ffc20e, #f7941d); }
.ph-track-pill-text { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.ph-track-pill-text b { font-size: 15px; font-weight: 900; }
.ph-track-pill-text small { font-size: 12px; color: #c9d3ea; }
.ph-track-pill-go { font-size: 24px; color: #ffc20e; }

@media (max-width: 480px) {
  .ph-track { padding: 14px; border-radius: 20px; }
  .ph-track-emoji { width: 54px; height: 54px; font-size: 27px; border-radius: 17px; }
  .ph-track-titles h3 { font-size: 19px; }
  .ph-track-steps i { width: 32px; height: 32px; font-size: 14px; }
  .ph-track-steps::before, .ph-track-steps::after { top: 14px; }
  .ph-track-steps span { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-track, .ph-track-emoji.is-live, .ph-co-modal .ph-co.is-entering { animation: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   Pizza Home — delivery board (admin)
   ════════════════════════════════════════════════════════════════════════ */
.ph-dl-page { display: flex; flex-direction: column; gap: 16px; }
.ph-dl-header {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 20px 22px 26px; border-radius: 22px; color: #fff;
  background:
    radial-gradient(380px 220px at 6% 130%, rgba(255, 194, 14, .28), transparent 65%),
    radial-gradient(340px 200px at 98% -30%, rgba(214, 39, 24, .35), transparent 60%),
    linear-gradient(140deg, #12306f, #0b1f4b 60%, #091536);
  box-shadow: 0 20px 40px -26px rgba(11, 31, 75, .8);
}
.ph-dl-header::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 8px;
  background-color: #fff;
  background-image: linear-gradient(45deg, #d62718 25%, transparent 25%, transparent 75%, #d62718 75%),
                    linear-gradient(45deg, #d62718 25%, transparent 25%, transparent 75%, #d62718 75%);
  background-size: 16px 16px; background-position: 0 0, 8px 8px;
}
.ph-dl-header h1 { margin: 0; font-size: clamp(22px, 2.6vw, 28px); font-weight: 900; color: #fff; }
.ph-dl-header p { margin: 4px 0 0; font-size: 13.5px; color: #c9d3ea; }
.ph-dl-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ph-dl-header .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); }
.ph-dl-header .btn.primary { background: #ffc20e; color: #0a1a3f; border-color: #ffc20e; font-weight: 900; }

.ph-dl-await {
  width: 100%; text-align: right; padding: 13px 16px; border-radius: 16px; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 700;
  color: #7a2e00; background: #fff4d6; border: 1.5px solid #ffc20e; animation: phAwait 2s ease-in-out infinite;
}
.ph-dl-await b { color: #d62718; font-size: 16px; }
@keyframes phAwait { 50% { box-shadow: 0 0 0 5px rgba(255, 194, 14, .25); } }

.ph-dl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ph-dl-kpi {
  --k: #5b6785; --ks: rgba(91, 103, 133, .1);
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: #fff;
  border: 1px solid #e3e9f5; box-shadow: 0 10px 24px -20px rgba(11, 31, 75, .6); position: relative; overflow: hidden;
}
.ph-dl-kpi::before { content: ""; position: absolute; top: 0; right: 0; width: 4px; height: 100%; background: var(--k); }
.ph-dl-kpi-ico { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; font-size: 21px; background: var(--ks); }
.ph-dl-kpi b { display: block; font-size: 22px; font-weight: 900; color: var(--k); line-height: 1.2; }
.ph-dl-kpi small { font-size: 12.5px; font-weight: 800; color: #3b4766; }
.ph-dl-kpi.is-new  { --k: #d62718; --ks: rgba(214, 39, 24, .1); }
.ph-dl-kpi.is-oven { --k: #f7941d; --ks: rgba(247, 148, 29, .13); }
.ph-dl-kpi.is-road { --k: #1e4fa8; --ks: rgba(30, 79, 168, .1); }
.ph-dl-kpi.is-done { --k: #16a34a; --ks: rgba(22, 163, 74, .1); }
.ph-dl-kpi.is-cash { --k: #0e2352; --ks: rgba(255, 194, 14, .22); }
.ph-dl-kpi.is-late { --k: #b42318; --ks: rgba(180, 35, 24, .12); background: #fff6f5; }

.ph-dl-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.ph-dl-toolbar .delivery-search-input { flex: 1 1 240px; max-width: 380px; }

.ph-dl-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.ph-dl-col { border-radius: 20px; background: #eef2f9; border: 1px solid #e0e6f2; min-width: 0; }
.ph-dl-col-head {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 20px 20px 0 0;
  font-size: 15px; font-weight: 900; color: #fff;
}
.ph-dl-col-head b { min-width: 28px; height: 28px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; background: rgba(255, 255, 255, .22); font-size: 14px; }
.ph-dl-col.is-new  .ph-dl-col-head { background: linear-gradient(135deg, #ef4423, #d62718); }
.ph-dl-col.is-oven .ph-dl-col-head { background: linear-gradient(135deg, #ffb020, #f7941d); color: #3a1d00; }
.ph-dl-col.is-oven .ph-dl-col-head b { background: rgba(0, 0, 0, .12); }
.ph-dl-col.is-road .ph-dl-col-head { background: linear-gradient(135deg, #2a62c9, #1e4fa8); }
.ph-dl-col-body { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
.ph-dl-col-empty { padding: 26px 10px; text-align: center; color: #8a95b0; font-size: 13.5px; font-weight: 700; }
.ph-dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }

.ph-dl-card {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: #fff;
  border: 1px solid #e3e9f5; box-shadow: 0 8px 22px -18px rgba(11, 31, 75, .7); color: #14213d;
}
.ph-dl-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ph-dl-card-id { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ph-dl-card-id b { font-size: 18px; font-weight: 900; color: #0e2352; }
.ph-dl-src { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: #eef3ff; color: #1e4fa8; }
.ph-dl-age { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; white-space: nowrap; }
.ph-dl-age.is-ok { background: #e9f8ef; color: #15803d; }
.ph-dl-age.is-warn { background: #fff4d6; color: #a14b00; }
.ph-dl-age.is-late { background: #fdecea; color: #b42318; animation: phAwait 1.6s ease-in-out infinite; }
.ph-dl-age.is-done { background: #f0f3fa; color: #5b6785; }
.ph-dl-cust { display: flex; flex-direction: column; gap: 6px; }
.ph-dl-cust-name { font-size: 15.5px; font-weight: 900; }
.ph-dl-contact { display: flex; gap: 6px; flex-wrap: wrap; }
.ph-dl-chip { padding: 5px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 800; text-decoration: none; color: #0e2352; background: #f0f3fa; }
.ph-dl-chip.is-wa { color: #fff; background: #25d366; }
.ph-dl-addr { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 12px; background: #f8faff; border: 1px dashed #d8e0ee; font-size: 13.5px; line-height: 1.6; }
.ph-dl-zone { align-self: flex-start; padding: 2px 9px; border-radius: 8px; background: #ffc20e; color: #0a1a3f; font-size: 12.5px; font-weight: 900; }
.ph-dl-muted { color: #6b7794; font-size: 12.5px; }
.ph-dl-map { align-self: flex-start; color: #1e4fa8; font-weight: 900; font-size: 13px; text-decoration: none; }
.ph-dl-note { padding: 8px 10px; border-radius: 10px; background: #fff8e1; color: #6b4a00; font-size: 13px; font-weight: 700; }
.ph-dl-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ph-dl-items li { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.ph-dl-items li b { color: #d62718; }
.ph-dl-money { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid #edf1f8; }
.ph-dl-money small { display: block; font-size: 11.5px; color: #6b7794; }
.ph-dl-money strong { font-size: 18px; font-weight: 900; color: #0e2352; }
.ph-dl-pay { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.ph-dl-pay.is-paid { background: #e9f8ef; color: #15803d; }
.ph-dl-pay.is-unpaid { background: #fff4d6; color: #a14b00; }
.ph-dl-driver-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.ph-dl-link { border: 0; background: none; color: #1e4fa8; font: inherit; font-size: 13px; font-weight: 900; cursor: pointer; padding: 2px 4px; }
.ph-dl-actions { display: flex; gap: 8px; }
.ph-dl-next {
  flex: 1; min-height: 44px; border: 0; border-radius: 13px; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, #ef4423, #d62718); box-shadow: 0 10px 20px -12px rgba(214, 39, 24, .9);
}
.ph-dl-next-preparing { background: linear-gradient(135deg, #2a62c9, #1e4fa8); box-shadow: 0 10px 20px -12px rgba(30, 79, 168, .9); }
.ph-dl-next-out_for_delivery { background: linear-gradient(135deg, #22a356, #16843f); box-shadow: 0 10px 20px -12px rgba(22, 132, 63, .9); }
.ph-dl-next:hover { filter: brightness(1.06); }
.ph-dl-cancel { min-height: 44px; padding: 0 12px; border-radius: 13px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; color: #b42318; background: #fff; border: 1.5px solid #f3c6c0; }
.ph-dl-collect { min-height: 42px; border-radius: 13px; cursor: pointer; font: inherit; font-weight: 900; color: #0a1a3f; background: #ffc20e; border: 0; }

.ph-dl-assign { width: min(440px, 100%); border-radius: 22px; padding: 18px; }
.ph-dl-assign-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ph-dl-assign-head h3 { margin: 0; font-size: 18px; font-weight: 900; color: #0e2352; }
.ph-dl-x { width: 36px; height: 36px; border-radius: 10px; border: 1px solid #e3e9f5; background: #f5f7fc; cursor: pointer; font-weight: 900; }
.ph-dl-assign-sub { margin: 6px 0 12px; font-size: 13px; color: #6b7794; }
.ph-dl-drivers { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-dl-driver { padding: 10px 14px; border-radius: 12px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 800; color: #0e2352; background: #f0f3fa; border: 1.5px solid #e0e6f2; }
.ph-dl-driver:hover, .ph-dl-driver.is-active { border-color: #ffc20e; background: #fff8e1; }
.ph-dl-or { margin: 14px 0 8px; font-size: 12.5px; font-weight: 800; color: #8a95b0; }
.ph-dl-assign-form { display: flex; gap: 8px; }
.ph-dl-assign-form .input { flex: 1; }

.ph-ol-addr { display: flex; flex-direction: column; gap: 3px; }

/* Settings — delivery zones editor */
.ph-zones-box { margin-bottom: 16px; padding: 14px; border-radius: 16px; background: #f8faff; border: 1px solid #e3e9f5; }
.ph-zone-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ph-zone-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto 36px; gap: 8px; align-items: center; }
.ph-zone-row input { min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1px solid #d8e0ee; background: #fff; font: inherit; }
.ph-zone-cur { font-size: 12.5px; color: #6b7794; font-weight: 700; }
.ph-zone-del { width: 36px; height: 36px; border-radius: 10px; border: 1px solid #f3c6c0; background: #fff; color: #b42318; cursor: pointer; font-weight: 900; }
.ph-zone-extra { margin-top: 14px; gap: 10px; }

@media (max-width: 1100px) {
  .ph-dl-board { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ph-dl-header { padding: 16px 16px 22px; }
  .ph-dl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-dl-kpi { padding: 10px; gap: 8px; }
  .ph-dl-kpi-ico { width: 36px; height: 36px; font-size: 18px; }
  .ph-dl-kpi b { font-size: 18px; }
  .ph-zone-row { grid-template-columns: minmax(0, 1fr) 80px 36px; }
  .ph-zone-cur { display: none; }
  .ph-zone-extra { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-dl-await, .ph-dl-age.is-late { animation: none; }
}

/* ── Pizza Home: anti-fake-order + no-missed-order UI ── */
.ph-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.ph-area-banner {
  display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; padding: 16px; border-radius: 20px;
  background: linear-gradient(135deg, #fff6e0, #ffe9b8); color: #4a2a00; border: 1.5px solid #ffc20e;
  box-shadow: 0 14px 30px -20px rgba(0, 0, 0, .6);
}
.ph-area-ico { width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center; font-size: 24px; border-radius: 14px; background: #ffc20e; }
.ph-area-banner b { display: block; font-size: 16px; font-weight: 900; color: #0e2352; }
.ph-area-banner p { margin: 4px 0 8px; font-size: 13.5px; line-height: 1.7; }
.ph-area-banner a { display: inline-flex; padding: 8px 14px; border-radius: 12px; background: #d62718; color: #fff; font-weight: 900; text-decoration: none; }

.ph-alert-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 12px 16px; border-radius: 16px;
  color: #fff; background: linear-gradient(135deg, #ef4423, #d62718); box-shadow: 0 14px 28px -16px rgba(214, 39, 24, .9);
  animation: phAlertPulse 2s ease-in-out infinite;
}
.ph-alert-bar.is-urgent { background: linear-gradient(135deg, #b42318, #7a1209); }
@keyframes phAlertPulse { 50% { box-shadow: 0 0 0 6px rgba(214, 39, 24, .25), 0 14px 28px -16px rgba(214, 39, 24, .9); } }
.ph-alert-bell { font-size: 24px; animation: phRing 1.2s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes phRing { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-16deg); } }
.ph-alert-text { flex: 1; min-width: 180px; display: flex; flex-direction: column; line-height: 1.4; }
.ph-alert-text b { font-size: 15.5px; font-weight: 900; }
.ph-alert-text small { font-size: 12.5px; opacity: .9; }
.ph-alert-go { min-height: 40px; padding: 0 16px; border: 0; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 900; color: #7a1209; background: #fff; }
.ph-alert-mute { min-height: 40px; padding: 0 12px; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 800; color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35); }
.ph-alert-mute:disabled { opacity: .6; cursor: default; }

.ph-geo-badge { margin: 4px 0; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 800; }
.ph-geo-badge.is-gps { background: #e9f8ef; color: #15803d; }
.ph-geo-badge.is-nogps { background: #fff4d6; color: #92400e; }

@media (prefers-reduced-motion: reduce) {
  .ph-alert-bar, .ph-alert-bell { animation: none; }
}
