:root {
  --bg: #f8f5ef;
  --bg-strong: #f2eadf;
  --sidebar: #102c2a;
  --sidebar-2: #0f2a2e;
  --primary: #0f766e;
  --primary-dark: #0b5d57;
  --accent: #c7923e;
  --card: #ffffff;
  --ink: #1f2933;
  --muted: #6b7280;
  --border: #e7ded2;
  --success: #168057;
  --warning: #b7791f;
  --danger: #b42318;
  --info: #2563a8;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 45px rgba(33, 28, 21, .10);
  --shadow-sm: 0 10px 24px rgba(33, 28, 21, .07);
  --focus: 0 0 0 4px rgba(15, 118, 110, .14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Tahoma, Arial, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(199, 146, 62, .13), transparent 34rem),
    linear-gradient(180deg, var(--bg), #fbfaf7 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:
    linear-gradient(135deg, rgba(16, 44, 42, .86), rgba(15, 42, 46, .54)),
    url("https://images.unsplash.com/photo-1554118811-1e0d58224f24?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.login-card {
  width: min(480px, 100%);
  padding: 28px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
  backdrop-filter: blur(12px);
}

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

.logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: contain;
  display: block;
  background: #fff;
  box-shadow: var(--shadow-sm);
  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:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--focus);
}

.demo-credentials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.demo-credentials div {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbf8f2;
}

.demo-credentials b,
.demo-credentials span {
  display: block;
  font-size: 12px;
}
.demo-credentials span { color: var(--muted); margin-top: 3px; direction: ltr; text-align: right; }

.btn {
  min-height: 44px;
  padding: 0 17px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(15, 118, 110, .18);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(15, 118, 110, .22); }
.btn.secondary { background: #efe8dc; color: var(--ink); 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(16, 44, 42, .10);
}

.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(199, 146, 62, .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,
.nav button.active {
  color: #fff;
  background: rgba(255,255,255,.12);
}
.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 rgba(231, 222, 210, .75);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  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);
}

.welcome-panel {
  min-height: 150px;
  display: grid;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(15,118,110,.08), rgba(199,146,62,.11)),
    #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(199,146,62,.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(33,28,21,.045);
}
.product:hover { transform: translateY(-2px); border-color: rgba(199,146,62,.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(199,146,62,.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(33,28,21,.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, #0f3d35, #14584c);
  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: #0f766e;
  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(15, 61, 53, 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: #111827;
  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: #64748b;
  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: #0f766e;
  white-space: nowrap;
}

.customer-qr-add-button {
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  background: #0f766e;
  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, linear-gradient(180deg, #f9f5ee 0%, #fffcf6 100%));
  color: #111827;
  padding: 16px 16px 24px;
  font-family: 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: #fff;
  border: 1px solid rgba(15, 61, 53, 0.1);
  border-radius: 20px;
  padding: 24px;
}

.customer-menu-error.inline {
  min-height: auto;
  display: block;
  margin-bottom: 14px;
  color: #991b1b;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  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(135deg, #0a2e28 0%, #0f3d35 60%, #1a5045 100%));
  box-shadow: 0 8px 28px rgba(15, 61, 53, 0.22);
  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(196, 127, 50, 0.10);
  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, #c47f32);
  color: #fff;
  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, #c47f32);
  color: #fff;
  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: #fffdf7;
  border: 2px solid rgba(196, 127, 50, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18), 0 0 0 4px rgba(196, 127, 50, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
  overflow: hidden;
  padding: 14px;
}

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

/* ── Search ────────────────────────────────────────────────── */
.customer-search-wrap {
  margin-bottom: 10px;
}

.customer-search-input {
  width: 100%;
  height: 50px;
  border: 1.5px solid #e4d8c6;
  border-radius: 16px;
  background: #fff;
  color: #111827;
  padding: 0 18px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
  box-shadow: 0 4px 18px rgba(15, 61, 53, 0.06);
}

.customer-search-input:focus {
  border-color: #0f3d35;
  box-shadow: 0 0 0 3px rgba(15, 61, 53, 0.1);
}

/* ── Category chips ────────────────────────────────────────── */
.customer-category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.customer-category-chips::-webkit-scrollbar { display: none; }

.customer-chip {
  flex: 0 0 auto;
  border: 1.5px solid #e4d8c6;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  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-primary, #0f3d35);
  border-color: var(--menu-primary, #0f3d35);
  color: #fff;
}

/* ── Offers section ────────────────────────────────────────── */
.customer-offers-section {
  margin-bottom: 16px;
  background: linear-gradient(160deg, #fffbf0 0%, #fff8e8 100%);
  border: 1px solid #f0d9b0;
  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: #0f3d35;
}

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

.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, #fffbf2 0%, #fff7e6 100%);
  border: 1px solid #f0d9b0;
  box-shadow: 0 8px 28px rgba(196, 127, 50, 0.16);
  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, #c47f32);
  color: #fff;
  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: #111827;
  line-height: 1.25;
}

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

.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, #0f3d35);
  color: var(--menu-button-text, #fff);
  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: #0d3530; }

.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, #fffbf2 0%, #fff7e6 100%);
  border: 1px solid #f0d9b0;
  box-shadow: 0 4px 16px rgba(196, 127, 50, 0.12);
  transition: box-shadow 0.2s;
  min-height: 140px;
}

.customer-offer-card:hover {
  box-shadow: 0 8px 28px rgba(196, 127, 50, 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, #c47f32 0%, #e8a84c 60%, #f5c97a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.customer-offer-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--menu-accent, #c47f32);
  color: #fff;
  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: #111827;
  line-height: 1.3;
}

.customer-offer-products {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
  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: #9ca3af;
  font-size: 13px;
}

.customer-offer-price {
  font-size: 20px;
  font-weight: 900;
  color: #0f3d35;
}

.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: #0f3d35;
}

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

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

.customer-menu-layout.has-cart {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.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, #fff);
  border: 1px solid #eadfce;
  box-shadow: 0 4px 18px rgba(15, 61, 53, 0.07);
  transition: box-shadow 0.2s, transform 0.15s;
}

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

.customer-product-img-wrap {
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: #f5f0ea;
  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, #fdf6ed 0%, #fef3e2 50%, #fdf0d9 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: #c47f32;
  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: #fdf0e0;
  color: #9a5d18;
  font-size: 11px;
  font-weight: 800;
}

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

.customer-product-desc {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
  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, #0f3d35);
  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, #0f3d35);
  color: var(--menu-button-text, #fff);
  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: #0d3530; }
.customer-add-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.customer-add-btn.secondary-btn {
  background: #c47f32;
}

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

.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: #0f3d35;
  color: #fff;
  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: #c47f32; }
.customer-menu-add-button.wide { width: 100%; height: 46px; }
.customer-menu-add-button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── QR cart panel (unchanged) ─────────────────────────────── */
.customer-menu-layout.has-cart {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.customer-menu-cart {
  position: sticky;
  top: 16px;
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #eadfce;
  box-shadow: 0 8px 30px rgba(15, 61, 53, 0.1);
}

.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 #efe4d3;
}

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

.customer-menu-cart-line span,
.customer-menu-muted { color: #64748b; }

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

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

.customer-menu-icon-button {
  border: 1px solid #eadfce;
  border-radius: 10px;
  background: #fffaf2;
  color: #0f3d35;
  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 #eadfce;
  border-radius: 12px;
  padding: 0 12px;
}

.customer-menu-cart-total {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8f4ec;
}

.customer-menu-cart-total b { color: #0f3d35; font-size: 20px; }

.customer-menu-mobile-cart-bar { display: none; }

.customer-menu-cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}

/* ── 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, #edf7f3, #f0fbf5);
  border: 1px solid #c1e4d3;
  text-align: center;
}

.customer-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0f3d35;
  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: #0f3d35;
}

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

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

/* ── QR success card (existing) ────────────────────────────── */
.customer-menu-success {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 20px;
  color: #0f3d35;
  background: #edf7f3;
  border: 1px solid #cce6db;
  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);
  }

  .customer-menu-layout.has-cart {
    grid-template-columns: 1fr;
  }

  .customer-menu-layout.has-cart > .customer-menu-cart {
    display: none;
  }

  .customer-menu-mobile-cart-bar {
    position: sticky;
    bottom: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 18px -16px -24px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #eadfce;
    box-shadow: 0 -8px 24px rgba(15, 61, 53, 0.1);
  }

}


@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; }

  .customer-menu-mobile-cart-bar {
    margin: 16px -10px -20px;
    padding: 10px 14px;
  }
}

@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;
}

@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-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 > .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);
}

.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-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(180px, 1fr));
  gap: 14px;
}
.table-card {
  min-height: 160px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  text-align: right;
  box-shadow: 0 8px 18px rgba(33,28,21,.045);
  transition: .18s ease;
}
.table-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.table-card.available { border-color: rgba(22,128,87,.35); background: linear-gradient(180deg, #fff, #f2fbf6); }
.table-card.occupied { border-color: rgba(183,121,31,.42); background: linear-gradient(180deg, #fff, #fff7e8); }
.table-card.reserved { border-color: rgba(37,99,168,.34); background: linear-gradient(180deg, #fff, #f0f6ff); }
.table-card.locked { border-color: #d9d9d9; background: linear-gradient(180deg, #fff, #f3f4f6); }
.table-card.busy { border-color: rgba(183,121,31,.42); background: #fff7e8; }
.table-card.free { border-color: rgba(22,128,87,.35); background: #f2fbf6; }

.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(33,28,21,.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(15, 118, 110, .42);
}

.payroll-card {
  border-color: rgba(199, 146, 62, .38);
}

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

.shift-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(15, 118, 110, .25);
  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(15, 118, 110, .18);
  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-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(33,28,21,.04);
}

.inventory-stock-card:hover,
.inventory-recipe-card:hover,
.inventory-movement-card:hover,
.inventory-low-card:hover {
  border-color: rgba(199,146,62,.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;
}

@media (max-width: 1000px) {
  .inventory-tab-layout {
    grid-template-columns: 1fr;
  }

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

.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(199,146,62,.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(199,146,62,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(15,118,110,.16);
  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-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;
  }
}

/* ── 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); }
.report-rank-cell { color: var(--muted); font-size: 0.78rem; font-weight: 700; width: 28px; text-align: center; }

/* ── 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; }

/* ── 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-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));
}

.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: #f4eee5;
  color: #3a413f;
  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(33,28,21,.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, #0f3d35 0%, #164e3a 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: #c47f32; 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: #1e293b;
  border: 1.5px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  color: #f1f5f9;
  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: #451a03; }
.admin-notif-toast.sev-danger  { border-color: rgba(239,68,68,.45);  background: #450a0a; }
.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(15,61,53,.06); }
.notif-item.is-unread { background: rgba(15,61,53,.05); border-color: rgba(15,61,53,.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, #0f3d35 0%, #133b2f 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: #f1f5f9;
  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: #f1f5f9;
}
.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: #c47f32;
  border-color: #c47f32;
}
.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;
}

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

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 18, .48);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 10;
}
.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);
}

.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: 20px; }
  .demo-credentials { grid-template-columns: 1fr; }
  .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: 1fr; }
  .btn { width: 100%; }
  .actions .btn { width: auto; }
}

/* ============================================================
   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 */

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

  body {
    background: #fff !important;
  }

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

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

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

  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) * {
    visibility: hidden !important;
  }

  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 * {
    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) .thermal-preview {
    width: 80mm;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }

  .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(33,28,21,.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(33,28,21,.04);
  min-width: 0;
}

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

.admin-menu-product-image {
  position: relative;
  background:
    linear-gradient(135deg, rgba(15,118,110,.12), rgba(199,146,62,.16)),
    #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-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%);
}

.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(199,146,62,.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;
  }
}

@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;
}

/* 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: #f3c766;
  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 bubbles */
.pos-category-bubbles {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  padding: 4px 0 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  direction: rtl;
}
.pos-category-bubbles::-webkit-scrollbar { display: none; }

.pos-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  min-height: 32px;
  box-sizing: border-box;
}
.pos-category-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pos-category-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pos-category-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 0 5px;
  min-width: 18px;
  height: 16px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}
.pos-category-chip.active .pos-category-chip-count {
  background: rgba(255,255,255,0.28);
}

.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(199,146,62,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(199,146,62,0.12);
}

.pos-change-table-btn {
  background: rgba(199,146,62,0.1);
  border: 1px solid rgba(199,146,62,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(199,146,62,0.22); border-color: rgba(199,146,62,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(199,146,62,0.3);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

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

.pos-table-modal-box {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 64px rgba(30,25,15,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 {
  margin: 12px 16px 0;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.92rem;
  direction: rtl;
  background: #fafafa;
}

.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;
}

/* Modal table card */
.pos-modal-table-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px 10px 8px;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pos-modal-table-card:hover { border-color: rgba(199,146,62,0.7); box-shadow: 0 4px 12px rgba(199,146,62,0.15); }
.pos-modal-table-card.available { border-color: rgba(22,128,87,.3); background: linear-gradient(180deg,#fff,#f4fcf7); }
.pos-modal-table-card.occupied  { border-color: rgba(183,121,31,.4); background: linear-gradient(180deg,#fff,#fff8ed); }
.pos-modal-table-card.reserved  { border-color: rgba(37,99,168,.3); background: linear-gradient(180deg,#fff,#f0f6ff); }
.pos-modal-table-card.locked    { border-color: #ddd; background: #f6f6f6; opacity: 0.65; cursor: not-allowed; }
.pos-modal-table-card.selected  { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(199,146,62,0.3); }

.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;
}

/* ---- 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(33,28,21,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(199,146,62,0.55);
  box-shadow: 0 6px 22px rgba(199,146,62,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(33,28,21,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: #a5681e; }
.pos-add-btn:active { transform: scale(0.94); }

/* 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-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-bubbles { padding: 2px 0 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; }

.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(15,118,110,.4);
  border-radius: 12px;
  background: #f0fdf4;
  overflow: hidden;
}

.offer-image-preview.has-image {
  border-style: solid;
  border-color: var(--primary, #0f766e);
  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, #0f766e);
  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: #c47f32; color: #fff; 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-primary, #0f3d35);
  box-shadow: none;
}
.online-order-form-box .btn[type="submit"]:hover {
  background: var(--menu-primary, #0f3d35);
  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-primary, #0f3d35);
  color: #fff;
}

/* 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, #0f3d35);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(15, 61, 53, 0.35);
  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, #c47f32);
  color: var(--menu-button-text, #fff);
  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
══════════════════════════════════════════════════════════════ */

.customer-contact-section {
  margin-top: 34px;
  padding-top: 32px;
  border-top: 1px solid rgba(15, 61, 53, 0.1);
}

.customer-contact-header {
  text-align: center;
  margin-bottom: 28px;
}

.customer-contact-header h2 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900;
  color: #0a2e28;
  margin: 0 0 6px;
}

.customer-contact-header p {
  font-size: .9rem;
  color: #4b7a72;
  margin: 0;
}

.customer-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  align-items: stretch;
}

.customer-contact-card {
  background: #fff;
  border: 1px solid rgba(15, 61, 53, 0.12);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(15, 61, 53, 0.06);
}

.customer-contact-card-icon { font-size: 1.4rem; line-height: 1; }
.customer-contact-card-label { font-size: .75rem; font-weight: 700; color: #c47f32; letter-spacing: .04em; }
.customer-contact-card-value { font-size: .82rem; color: #374151; line-height: 1.5; }

.customer-contact-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  justify-content: center;
}

.customer-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
  cursor: pointer;
}

.customer-contact-btn.primary {
  background: #0f766e;
  color: #fff;
  border: 2px solid #0f766e;
}

.customer-contact-btn.primary:hover { background: #0a5c56; border-color: #0a5c56; }

.customer-contact-btn.secondary {
  background: #fff;
  color: #0a2e28;
  border: 2px solid rgba(15, 61, 53, 0.2);
}

.customer-contact-btn.secondary:hover {
  background: #f0fdf4;
  border-color: #0f766e;
  color: #0f766e;
}

.customer-map-card {
  margin-top: 4px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 61, 53, 0.12);
  border: 1px solid rgba(15, 61, 53, 0.1);
}

.customer-map-frame {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

@media (max-width: 600px) {
  .customer-map-frame { height: 240px; }
  .customer-contact-grid { grid-template-columns: 1fr 1fr; }
  .customer-contact-actions { flex-direction: column; align-items: stretch; }
  .customer-contact-btn { justify-content: center; }
}

/* ── Hero contact strip ────────────────────────────────────── */
.customer-hero-contact-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 14px;
  background: #fff;
  border: 1px solid rgba(15, 61, 53, 0.1);
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: .8rem;
  color: #374151;
}

.customer-hero-strip-item { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.customer-hero-strip-sep { color: #d1d5db; }

.customer-hero-strip-btn {
  margin-inline-start: auto;
  padding: 5px 12px;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background .15s;
}

.customer-hero-strip-btn:hover { background: #0a5c56; }

/* ── Pickup location note ────────────────────────────────────── */
.pickup-location-note {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .875rem;
}

.pickup-location-note b { color: #166534; font-weight: 700; }
.pickup-location-note span { color: #374151; }

/* ── 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: #c47f32;
}

.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: #c47f32;
  border-bottom-color: #c47f32;
}
.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, #111827); 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, #111827);
}
.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, #111827);
  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, #111827);
  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; }

/* ── 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, #111827); }
.ops-tc-total  { font-size: 15px; font-weight: 900; color: var(--text, #111827); 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, #111827); 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, #111827); }
.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, #111827); 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, #111827);
  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; }

/* 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: #f4f6f9;
  min-height: 100vh;
}

/* ── Premium Header ── */
.ops-header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 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: #94a3b8;
  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: #64748b; }

/* ── 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-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: #0f172a; }
.ops-kpi-of   { font-size: 16px; font-weight: 500; color: #94a3b8; }
.ops-kpi-lbl  { font-size: 13px; font-weight: 600; color: #64748b; }
.ops-kpi-hint { font-size: 12px; color: #94a3b8; 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 #f1f5f9;
  flex-shrink: 0;
}
.ops-panel-title { font-size: 14px; font-weight: 800; color: #0f172a; }
.ops-panel-sub   { font-size: 12px; color: #94a3b8; 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: #0f172a;
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ops-tl-time { font-size: 11px; color: #94a3b8; flex-shrink: 0; }
.ops-tl-sub  { font-size: 11px; color: #64748b; 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: #0f172a; }
.ops-sc-idle { font-size: 13px; color: #94a3b8; 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: #f1f5f9; }
.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: #0f172a; line-height: 1; }
.ops-sc-lbl  { font-size: 11px; color: #64748b; 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 #f1f5f9; 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: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-sc-oage { font-size: 11px; color: #94a3b8; 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: #0f172a; margin: 0; }
.ops-sec-sub    { font-size: 13px; color: #64748b; }

/* ── 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: #0f172a; }
.otc-status {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  background: #f1f5f9; color: #64748b;
}
.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: #64748b;
}
.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: #94a3b8; text-align: center; padding: 8px 0; }
.otc-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: #64748b; padding: 2px 0;
  border-bottom: 1px solid #f8fafc;
}
.otc-row:last-child { border-bottom: none; }
.otc-row b { font-weight: 700; color: #0f172a; }
.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 { font-size: 11px; color: #94a3b8; line-height: 1.5; }
.otc-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 6px; border-top: 1px solid #f1f5f9;
}
.otc-last-act { font-size: 11px; color: #94a3b8; }

/* ── 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: #94a3b8; white-space: nowrap; }

/* ── Empty State ── */
.ops-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 36px 20px; color: #94a3b8; 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(15, 118, 110, .25);
}

.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(15,118,110,.08), rgba(15,118,110,.04));
  border: 1px solid rgba(15,118,110,.25);
}
.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;
}

@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;
  }
}
