/* ═══════════════════════════════════════════════════════════════
   الملف: css/style.css — التنسيقات العامة للقالب (الهوية في css/brand.css)
   الفهرس: 1) الخطوط  2) المتغيّرات (فاتح/داكن)  3) الأساسيات  4) الشريط العلوي
   5) العناصر العامة  6) الرئيسية  7) قائمة الطعام  8) السلة  9) تتبّع الطلب
   10) الدخول  11) لوحات الموظفين  12) لوحات المدير  13) الحركة  14) الطباعة
   المقاسات: جوال (افتراضي) · آيباد ≥ 720px · كمبيوتر ≥ 1100px
   ═══════════════════════════════════════════════════════════════ */
/* ───── 1 و 2) الخطوط والمتغيّرات (الألوان): في ملف الهوية css/brand.css ───── */
/* ───── 3) الأساسيات ───── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; scrollbar-gutter: stable; }
/* قفل تمرير الخلفية عند فتح نافذة أو قائمة (ScrollLock) */
html.is-locked, html.is-locked body { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.7 var(--font-body); min-height: 100dvh;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
input, textarea, select { -webkit-user-select: text; user-select: text; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.3; margin: 0; text-wrap: balance; }
h1 { font-size: 1.7rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; -webkit-user-drag: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 6px; }
/* لا overflow-x: hidden على body: يكسر العناصر الثابتة على الآيفون. القص يتم هنا */
#app { overflow-x: clip; }
.muted { color: var(--ink-2); }
.small { font-size: .84rem; }
.ic { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.ic svg { width: 100%; height: 100%; }
.price, .stat-value, .step-qty, .order-seq, .queue-box strong, td, .mini-price { font-variant-numeric: tabular-nums; }
/* ───── 4) الشريط العلوي ───── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-inner {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: var(--gutter) var(--gutter-end);
  max-width: 1400px;
  margin-inline: auto;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; margin-inline-end: auto; }
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  background: #f3f1ee;
  transition: transform .5s var(--ease);
}
.brand:hover .brand-logo { transform: rotate(-14deg) scale(1.06); }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-text strong { font-family: var(--font-display); font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: .74rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  position: relative;
  transition: background .2s, transform .2s var(--ease);
  flex: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.danger { color: var(--bad); }
.back-btn { background: var(--surface); border: 1px solid var(--line); }
.badge {
  position: absolute;
  top: 2px;
  inset-inline-start: 0;
  min-width: 20px;
  height: 20px;
  padding-inline: 5px;
  border-radius: 10px;
  background: var(--ember);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.badge.bump { animation: bump .4s var(--ease); }
.user-chip {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: .85rem;
}
.user-chip small { color: var(--ink-2); }
.banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px var(--gutter);
  font-size: .82rem;
  background: var(--brand-soft);
  color: var(--ink);
  text-align: center;
}
.banner-warn { background: var(--warn-soft); color: var(--warn); }
.view { display: block; min-height: calc(100dvh - var(--topbar-h)); padding-bottom: var(--dock-h, 0px); }
/* backwards وليس both: لا يبقى transform بعد انتهاء الحركة */
.view.view-in > * { animation: view-in .4s var(--ease) backwards; }
/* ───── 5) العناصر العامة ───── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 99px;
  font-weight: 600;
  font-size: .95rem;
  border: 1.5px solid transparent;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { border-color: var(--line); background: var(--surface); }
.btn-ghost:hover, .btn-soft:hover { border-color: var(--brand); }
.btn-soft { background: var(--brand-soft); color: var(--ink); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-success { background: var(--ok); color: var(--bg); }
.btn-lg { min-height: 52px; padding-inline: 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .86rem;
  font-weight: 500;
}
.chip-accent { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.chip-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: .76rem;
  font-weight: 600;
  background: var(--surface-2);
  white-space: nowrap;
}
.pill-pending, .pill-unpaid { background: var(--warn-soft); color: var(--warn); }
.pill-accepted, .pill-preparing { background: var(--brand-soft); color: var(--ink); }
.pill-ready, .pill-out_for_delivery, .pill-delivered, .pill-paid { background: var(--ok-soft); color: var(--ok); }
.pill-rejected { background: var(--bad-soft); color: var(--bad); }
.count { color: var(--ink-2); font-size: .85rem; }
.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: var(--r-s);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
textarea.input { resize: vertical; min-height: 70px; }
select.input { appearance: auto; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.field.inline { flex-direction: row; align-items: center; gap: 12px; max-width: 320px; }
.narrow-field { max-width: 220px; }
.form-grid { display: grid; gap: 14px; }
.form-error { color: var(--bad); font-size: .9rem; font-weight: 500; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--brand); }
.switch { position: relative; display: inline-flex; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-ui {
  width: 46px;
  height: 26px;
  border-radius: 99px;
  background: var(--line);
  transition: background .25s;
  position: relative;
  pointer-events: none;
}
.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .25s var(--ease);
}
.switch input:checked + .switch-ui { background: var(--ok); }
.switch input:checked + .switch-ui::after { transform: translateX(-20px); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 99px; background: var(--surface-2); }
.seg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 99px;
  font-weight: 600;
  transition: background .25s, color .25s;
}
.seg.active { background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow); }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.panel-head { display: flex; align-items: center; gap: 8px; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; margin-inline-end: auto; }
.panel-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; }
.two-col { display: grid; gap: 16px; }
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-m);
  background: var(--brand-soft);
  font-size: .92rem;
}
.narrow { max-width: 620px; margin-inline: auto; padding: 24px var(--gutter) 60px; display: flex; flex-direction: column; gap: 18px; }
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 56px 20px;
  color: var(--ink-2);
  grid-column: 1 / -1;
}
.empty h3 { color: var(--ink); font-size: 1.15rem; }
.empty-ic { width: 54px; height: 54px; padding: 13px; border-radius: 50%; background: var(--surface-2); color: var(--ink); }
.loader { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px 20px; color: var(--ink-2); grid-column: 1 / -1; }
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
#toasts {
  position: fixed;
  z-index: 90;
  bottom: calc(16px + max(var(--dock-h, 0px), env(safe-area-inset-bottom, 0px)));
  inset-inline: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  padding-inline: 16px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--bg);
  font-size: .92rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in .35s var(--ease) both;
  max-width: 100%;
}
.toast-ok { background: var(--ok); }
.toast-error { background: var(--bad); color: var(--bg); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .3s; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgb(20 8 10 / .55);
  backdrop-filter: blur(3px);
  display: grid;
  align-items: end;
  justify-items: center;
  animation: fade .2s both;
}
.modal {
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: var(--r-l) var(--r-l) 0 0;
  box-shadow: var(--shadow-lg);
  animation: sheet-in .35s var(--ease) both;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.modal-wide { max-width: 720px; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); }
.modal-text { line-height: 1.8; }
.install-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.install-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--line);
}
.step-n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none;
}
/* ───── 6) الصفحة الرئيسية ───── */
.home { overflow: clip; }
.hero { display: grid; grid-template-areas: "stage" "show" "copy"; gap: 24px; align-items: center; padding: 20px var(--gutter-end) 44px var(--gutter); max-width: 1240px; margin-inline: auto; }
.hero > .hero-copy { grid-area: copy; }
.hero > .showcase { grid-area: show; min-width: 0; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.eyebrow { font-family: var(--font-display); font-weight: 600; color: var(--ember); font-size: 1.05rem; }
.hero-title {
  font-family: var(--font-script);
  font-size: clamp(4.2rem, 19vw, 8.5rem);
  line-height: 1.15;
  color: var(--brand);
  margin-block: -8px -4px;
}
.hero-tag { font-family: var(--font-display); font-size: clamp(1.15rem, 4.4vw, 1.6rem); font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.install-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  color: var(--ink-2);
  border-bottom: 1.5px dashed var(--line);
}
.install-link:hover { color: var(--ink); border-color: var(--brand); }
.hero-stage { grid-area: stage; perspective: 1100px; display: grid; place-items: center; --p: 0; --tx: 0; --ty: 0; }
.plate {
  position: relative;
  width: min(66vw, 400px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--p) * 8deg + var(--ty) * -14deg)) rotateY(calc(var(--tx) * 18deg)) translateY(calc(var(--p) * -10px));
  transition: transform .5s var(--ease);
}
.plate-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  animation: plate-in 1.1s var(--ease) both;
}
.plate-ring {
  position: absolute;
  inset: -5%;
  border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, transparent);
  animation: spin 60s linear infinite;
}
/* الشعار والدائرتان على نفس المستوى (بدون عمق مختلف) حتى تبقى الدوائر متمركزة ومتساوية مع الميلان */
.plate-ring.r2 { inset: -12%; border-style: solid; border-color: var(--line); animation: none; }
.plate-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: .82rem;
  font-weight: 600;
  transform: translateZ(80px);
  animation: float 5s ease-in-out infinite;
}
.plate-tag .ic { color: var(--ember); }
.plate-tag.t1 { top: 6%; inset-inline-start: -4%; }
.plate-tag.t2 { bottom: 8%; inset-inline-end: -4%; animation-delay: -2.5s; }
.band { padding: 48px var(--gutter); max-width: 1240px; margin-inline: auto; }
.band-alt { max-width: none; background: var(--surface); border-block: 1px solid var(--line); }
.band-alt > * { max-width: 1208px; margin-inline: auto; }
.section-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); }
.section-head p { color: var(--ink-2); }
.spec-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(70vw, 250px);
  gap: 14px;
  overflow-x: auto;
  padding: 8px 2px 18px;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  perspective: 1000px;
}
.spec-rail::-webkit-scrollbar { display: none; }
.spec-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px;
  border-radius: var(--r-l);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .4s var(--ease), box-shadow .4s;
  transform-origin: center bottom;
}
@media (hover: hover) and (pointer: fine) { .spec-card:hover { transform: translateY(-6px) rotateX(6deg); box-shadow: var(--shadow-lg); } }
.spec-card p { color: var(--ink-2); font-size: .9rem; }
.spec-ic {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 1.15rem;
}
.spec-card:nth-child(even) .spec-ic { background: var(--ember); color: #fff; }
.spec-card.is-feature { background: var(--brand); color: var(--brand-ink); border-color: transparent; justify-content: center; }
.spec-card.is-feature p { color: inherit; opacity: .8; }
.spec-card.is-feature .spec-ic { background: var(--ember); color: #fff; }
.steps { display: grid; gap: 14px; counter-reset: none; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 2px;
  align-items: center;
  padding: 18px;
  border-radius: var(--r-m);
  background: var(--bg);
  border: 1px solid var(--line);
}
.step-num {
  position: absolute;
  top: 10px;
  inset-inline-end: 16px;
  font-family: var(--font-script);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--line);
}
.step-ic {
  grid-row: span 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  font-size: 1.3rem;
}
.step p { color: var(--ink-2); font-size: .92rem; grid-column: 2; }
.foot { padding: 44px var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px)); max-width: 1240px; margin-inline: auto; }
.foot-grid { display: grid; gap: 26px; }
.foot-grid h3 { margin-bottom: 10px; }
.foot-list { display: flex; flex-direction: column; gap: 8px; }
.foot-list li, .foot-staff { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.foot-list .ic, .foot-staff .ic { color: var(--ember); }
.foot-staff { font-weight: 600; }
.foot-staff:hover, .foot-list a:hover { text-decoration: underline; }
.foot-copy { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .84rem; text-align: center; }
/* ───── 7) قائمة الطعام ───── */
.menu-page { max-width: 1400px; margin-inline: auto; padding: 18px var(--gutter-end) 32px var(--gutter); }
.menu-main { min-width: 0; }
.menu-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.menu-context { display: flex; flex-wrap: wrap; gap: 8px; }
.search { position: relative; display: block; }
.search .ic { position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.search-input { padding-inline-start: 44px; border-radius: 99px; }
.cat-chips, .filter-bar { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 10px; }
.cat-chips {
  position: sticky;
  top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  z-index: 20;
  background: var(--bg);
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--line);
}
.cat-chips::-webkit-scrollbar, .filter-bar::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: none;
  touch-action: manipulation;
  min-height: 40px;
  padding: 6px 16px;
  border-radius: 99px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  font-size: .9rem;
  transition: background .25s, color .25s, border-color .25s;
}
.cat-chip.active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.menu-section { padding-top: 26px; }
.menu-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.menu-section-head h2 { font-size: 1.45rem; }
.menu-section-head::after { content: ""; flex: 1; height: 1px; background: var(--line); align-self: center; order: 1; }
.menu-section-head .count { order: 2; }
.item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.item-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  overflow: hidden;
}
.item-card.is-off { opacity: .6; }
.item-media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.item-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.item-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: color-mix(in srgb, var(--brand) 40%, transparent);
  background: radial-gradient(circle at 30% 30%, var(--brand-soft), var(--surface-2));
}
.item-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; padding: 10px 12px 4px; }
.item-body h3 { font-size: .98rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-desc {
  display: none;
  color: var(--ink-2);
  font-size: .84rem;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; color: var(--ember); white-space: nowrap; }
.item-control { margin-top: auto; }
.item-control .btn { width: 100%; min-height: 42px; padding: 4px 12px; }
.item-control .stepper { display: flex; width: 100%; justify-content: space-between; }
.sold-out { font-size: .8rem; color: var(--bad); font-weight: 600; }
.item-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  margin: 4px 12px 4px;
  border-top: 1px dashed var(--line);
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-2);
}
.item-more:active { color: var(--ink); }
/* تأثيرات المرور بالمؤشر للكمبيوتر فقط: على اللمس تثقل التمرير ولا فائدة منها */
@media (hover: hover) and (pointer: fine) {
  .item-card { transition: box-shadow .3s, transform .3s var(--ease); }
  .item-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
  .item-card:hover .item-media img { transform: scale(1.06); }
  .item-more:hover { color: var(--ink); }
}
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 99px;
  background: var(--brand);
  color: var(--brand-ink);
  animation: pop .3s var(--ease);
}
.step-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.step-btn:active { transform: scale(.88); background: rgb(255 255 255 / .18); }
.step-qty { min-width: 24px; text-align: center; font-weight: 700; }
.mini-cart { display: none; }
/* ───── 8) السلة ───── */
.cart-page, .track-page { max-width: 1100px; margin-inline: auto; padding: 22px var(--gutter) 80px; display: grid; gap: 16px; align-items: start; }
.cart-main, .track-main, .cart-side, .track-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cart-lines { display: flex; flex-direction: column; }
.cart-line {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
  animation: view-in .3s var(--ease) both;
}
.cart-line:first-child { padding-top: 0; }
.cart-line-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.cart-line-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.line-note { min-height: 38px; padding: 6px 12px; font-size: 16px; margin-top: 4px; background: transparent; border-style: dashed; }
.cart-more a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 6px; font-weight: 600; color: var(--ember); }
.summary { display: flex; flex-direction: column; gap: 10px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; }
.sum-total { padding-top: 10px; border-top: 1px dashed var(--line); font-size: 1.15rem; }
.sum-total strong { font-family: var(--font-display); color: var(--ember); font-size: 1.35rem; }
.accounts { display: flex; flex-direction: column; gap: 8px; }
.account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: var(--r-s);
  background: var(--bg);
  border: 1px solid var(--line);
}
.account > div { display: flex; flex-direction: column; }
.account-num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 14px;
  border-radius: 99px;
  background: var(--brand-soft);
  font-weight: 700;
  letter-spacing: .04em;
}
.receipt-preview { display: flex; align-items: center; gap: 12px; color: var(--ok); font-weight: 600; }
.receipt-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-s); border: 1px solid var(--line); }
.receipt-preview span { display: inline-flex; gap: 6px; align-items: center; }
.receipt-view img { max-height: 65dvh; margin-inline: auto; border-radius: var(--r-s); }
.receipt-view p { margin-top: 12px; text-align: center; }
/* ───── 9) تتبّع الطلب ───── */
.status-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px 22px;
  border-radius: var(--r-l);
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: var(--shadow-lg);
}
.status-card::after {
  content: "";
  position: absolute;
  inset-inline-end: -70px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--brand-ink) 35%, transparent);
  animation: spin 40s linear infinite;
}
.status-card .eyebrow { color: color-mix(in srgb, var(--brand-ink) 75%, transparent); font-size: .92rem; }
.status-card h1 { font-size: 1.9rem; }
.status-card.is-done { background: var(--ok); color: var(--bg); }
.status-card.is-rejected { background: var(--bad-soft); color: var(--bad); box-shadow: none; }
.status-ic {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  background: color-mix(in srgb, currentColor 16%, transparent);
  animation: pulse 2.2s ease-in-out infinite;
}
.is-done .status-ic, .is-rejected .status-ic { animation: none; }
.queue { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 10px; position: relative; z-index: 1; }
.queue .small { grid-column: 1 / -1; color: inherit; opacity: .8; }
.queue-box {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border-radius: var(--r-m);
  background: color-mix(in srgb, var(--brand-ink) 12%, transparent);
}
.queue-box span { font-size: .85rem; opacity: .85; }
.queue-box strong { font-family: var(--font-display); font-size: 2.3rem; line-height: 1.15; }
.next-step { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; opacity: .85; }
.timeline { display: flex; flex-direction: column; }
.tl-item { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding-bottom: 20px; color: var(--ink-2); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; inset-inline-start: 19px; top: 40px; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-item.done::before { background: var(--ok); }
.tl-item > div { display: flex; flex-direction: column; justify-content: center; }
.tl-item .muted { font-size: .84rem; }
.tl-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  z-index: 1;
  transition: background .4s, color .4s;
}
.tl-item.done { color: var(--ink); }
.tl-item.done .tl-dot { background: var(--ok); color: var(--bg); }
.tl-item.current .tl-dot { box-shadow: 0 0 0 5px var(--ok-soft); animation: pulse 2s ease-in-out infinite; }
.inv-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.inv-table th {
  text-align: start;
  font-weight: 600;
  color: var(--ink-2);
  font-size: .78rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.inv-table td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.inv-table td small { display: block; color: var(--ink-2); }
.inv-table th:not(:first-child), .inv-table td:not(:first-child) { text-align: end; padding-inline-start: 10px; white-space: nowrap; }
.inv-notes, .order-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--r-s);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: .88rem;
}
.stars { display: flex; gap: 6px; direction: ltr; justify-content: flex-end; }
.star {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  color: var(--line);
  transition: transform .2s var(--ease), color .2s;
}
.star.on { color: var(--ember); }
.star.on svg { fill: currentColor; }
button.star:active { transform: scale(1.25); }
.stars.readonly .star { width: 30px; height: 30px; font-size: 1.2rem; }
.stars.small .star { width: 20px; height: 20px; font-size: .9rem; }
.order-links { display: flex; flex-direction: column; gap: 10px; }
.order-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .25s var(--ease);
}
.order-links a:hover { transform: translateX(-4px); }
.order-links a > span:nth-child(2) { display: flex; flex-direction: column; margin-inline-end: auto; }
.order-no { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ember); }
/* ───── 10) الدخول ───── */
.login-page {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-top, 0px) - 40px);
  padding: 24px var(--gutter-end) 40px var(--gutter);
}
.login-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px;
  border-radius: var(--r-l);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.login-logo { width: 96px; height: 96px; border-radius: 50%; align-self: center; box-shadow: var(--shadow); }
.login-card h1, .login-card > .muted { text-align: center; }
.demo-box { margin-top: 6px; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 10px; }
.demo-box p { display: flex; gap: 6px; align-items: center; color: var(--ink-2); }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-chips .chip { min-height: 38px; }
/* ───── 11) لوحات الموظفين ───── */
.staff {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px var(--gutter-end) 40px var(--gutter);
  max-width: 1500px;
  margin-inline: auto;
}
.staff-side { display: none; }
.staff-role {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.staff-link {
  position: relative;
  flex: 1 0 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 6px;
  border-radius: 14px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
  white-space: nowrap;
  transition: background .25s, color .25s;
}
.staff-link .ic { font-size: 1.2rem; }
.staff-link.active { background: var(--brand); color: var(--brand-ink); }
.nav-badge {
  position: absolute;
  top: 2px;
  inset-inline-start: calc(50% + 6px);
  min-width: 19px;
  height: 19px;
  padding-inline: 5px;
  border-radius: 10px;
  background: var(--ember);
  color: #fff;
  font-size: .7rem;
  display: grid;
  place-items: center;
}
/* المدير على الجوال والآيباد: شريط علوي فيه زر القائمة الجانبية */
.staff-bar {
  position: sticky;
  z-index: 30;
  top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -18px calc(var(--gutter-end) * -1) 0 calc(var(--gutter) * -1);
  padding: 10px var(--gutter-end) 10px var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.staff-menu-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 18px;
  border-radius: 99px;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
  flex: none;
}
.staff-menu-btn .nav-badge { position: static; }
.staff-bar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.staff.is-admin .staff-head h1 { display: none; }
.staff-content { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.staff-head { display: flex; flex-direction: column; gap: 4px; }
.board { display: flex; flex-direction: column; gap: 10px; }
.order-grid { display: grid; gap: 14px; align-items: start; }
.order-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--line);
  animation: view-in .35s var(--ease) both;
}
.st-pending { border-top-color: var(--warn); }
.st-accepted, .st-preparing { border-top-color: var(--brand); }
.st-ready, .st-out_for_delivery, .st-delivered { border-top-color: var(--ok); }
.st-rejected { border-top-color: var(--bad); }
.order-head { display: flex; align-items: flex-start; gap: 12px; }
.order-seq {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.order-title { display: flex; flex-direction: column; margin-inline-end: auto; min-width: 0; }
.order-title strong { font-family: var(--font-display); font-size: 1.1rem; }
.order-where { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ember); }
.order-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.order-meta .small { display: inline-flex; align-items: center; gap: 4px; }
.order-items { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--r-s); background: var(--bg); }
.order-items li { display: flex; gap: 10px; align-items: baseline; }
.order-items b { color: var(--ember); min-width: 30px; }
.order-items span:nth-child(2) { flex: 1; }
.order-items small { display: block; color: var(--ink-2); }
.order-customer { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.order-customer > * { display: flex; align-items: center; gap: 8px; }
.order-customer a { font-weight: 600; justify-content: flex-end; flex-direction: row-reverse; }
.order-total { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .84rem; color: var(--ink-2); }
.order-total strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); margin-inline-start: auto; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.order-actions .btn { flex: 1 1 auto; white-space: normal; }
/* ───── 12) لوحات المدير ───── */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 0;
}
.stat:first-child { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.stat:first-child .muted, .stat:first-child .stat-label { color: inherit; opacity: .8; }
.stat-ic { font-size: 1.2rem; color: var(--ember); }
.stat-label { font-size: .84rem; color: var(--ink-2); }
.stat-value { font-family: var(--font-display); font-size: 1.55rem; line-height: 1.3; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars li { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; align-items: center; gap: 10px; font-size: .88rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--ember);
  transform-origin: right;
  animation: grow .8s var(--ease) both;
}
.reviews { display: grid; gap: 12px; }
.reviews li { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r-s); background: var(--bg); }
.reviews .stars { justify-content: flex-end; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.data-table th { text-align: start; color: var(--ink-2); font-size: .8rem; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table tbody tr { cursor: pointer; transition: background .2s; }
.data-table tbody tr:hover { background: var(--bg); }
.admin-items { display: flex; flex-direction: column; }
.admin-item, .staff-row { display: flex; align-items: center; gap: 10px; padding-block: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.admin-item-main, .staff-row-main { display: flex; flex-direction: column; flex: 1 1 140px; min-width: 0; }
.staff-row-main strong { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.staff-row.is-off { opacity: .6; }
.thumb, .avatar {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--ink-2);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-lg { width: 92px; height: 92px; border-radius: var(--r-m); font-size: 1.6rem; }
.avatar { border-radius: 50%; }
.image-pick { display: flex; align-items: center; gap: 14px; }
.image-pick > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.qr-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--line);
}
.qr-card.is-off .qr-canvas { opacity: .35; }
.qr-canvas { width: 100%; height: auto; border-radius: var(--r-s); }
.qr-info { display: flex; flex-direction: column; }
.qr-actions { display: flex; align-items: center; gap: 4px; }
.qr-actions .btn { flex: 1; min-height: 40px; padding-inline: 10px; }
/* شاشة العرض في الرئيسية: لوحة عنّابية بإطار مزدوج مثل حلقة الشعار */
.screen {
  position: relative;
  padding: 18px 0 16px;
  border-radius: 30px;
  color: var(--screen-ink);
  background:
    radial-gradient(120% 80% at 85% -10%, color-mix(in srgb, var(--screen-gold) 22%, transparent), transparent 60%),
    linear-gradient(160deg, var(--screen-bg-2), var(--screen-bg) 70%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px color-mix(in srgb, var(--screen-gold) 35%, transparent);
  overflow: hidden;
}
.screen::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 23px;
  border: 1.5px dashed color-mix(in srgb, var(--screen-gold) 45%, transparent);
  pointer-events: none;
}
.screen-gem {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 11px;
  height: 11px;
  translate: -50% 0;
  rotate: 45deg;
  background: var(--screen-gold);
  box-shadow: 0 0 0 4px var(--screen-bg-2);
}
.show-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 22px 14px; }
.show-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.show-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--screen-gold); color: var(--screen-bg); font-size: 1.15rem; }
.show-title h2 { font-size: 1.3rem; line-height: 1.25; color: var(--screen-ink); }
.show-title p { font-size: .82rem; opacity: .75; }
.show-all { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 6px 12px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--screen-ink) 30%, transparent); font-size: .85rem; font-weight: 600; color: var(--screen-ink); }
.show-track {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(74vw, 320px);
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 22px;
  scrollbar-width: none;
  padding: 2px 22px 6px;
}
.show-track::-webkit-scrollbar { display: none; }
.show-card {
  position: relative;
  scroll-snap-align: start;
  display: block;
  aspect-ratio: 4 / 3.4;
  overflow: hidden;
  border-radius: 20px;
  background: var(--screen-bg-2);
  border: 2px solid color-mix(in srgb, var(--screen-gold) 55%, transparent);
  text-align: start;
  color: #fff;
}
.show-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.show-card .item-ph { color: color-mix(in srgb, var(--screen-ink) 40%, transparent); background: radial-gradient(circle at 30% 30%, var(--screen-bg-2), var(--screen-bg)); font-size: 2.6rem; }
.show-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgb(20 6 8 / .88)); pointer-events: none; }
.show-info { position: absolute; z-index: 1; inset-inline: 0; bottom: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.show-info strong { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.3; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 8px rgb(0 0 0 / .5); }
.show-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.show-info .price { color: var(--screen-gold); font-size: 1.25rem; }
.show-info .old-price { color: rgb(255 255 255 / .7); }
.show-go { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 99px; background: var(--screen-gold); color: var(--screen-bg); font-size: .88rem; font-weight: 700; }
.show-card .badges { z-index: 1; }
@media (hover: hover) and (pointer: fine) { .show-card:hover .show-img { transform: scale(1.06); } }
.show-bottom { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 22px 2px; }
.show-progress-track { display: block; width: min(220px, 60%); height: 3px; border-radius: 99px; background: color-mix(in srgb, var(--screen-ink) 18%, transparent); overflow: hidden; }
.show-progress { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--screen-gold); }
.show-progress.run { animation: show-fill var(--interval, 3000ms) linear forwards; }
@keyframes show-fill { from { width: 0; } to { width: 100%; } }
.dots { display: flex; justify-content: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--screen-ink) 30%, transparent); transition: width .3s var(--ease), background .3s; }
.dot.on { width: 22px; background: var(--screen-gold); }

/* شارات الأصناف */
.badges { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; flex-wrap: wrap; gap: 4px; max-width: calc(100% - 16px); pointer-events: none; }
.badge-tag { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 99px; font-size: .72rem; font-weight: 700; box-shadow: var(--shadow); }
.badge-tag .ic { font-size: .9em; }
.badge-top { background: var(--ember); color: #fff; }
.badge-new { background: var(--ok); color: #fff; }
.badge-offer { background: var(--brand); color: var(--brand-ink); }
.lb-badges { position: static; }
.price-tag { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.old-price { color: var(--ink-2); font-size: .85rem; font-weight: 500; }

/* استدعاء النادل */
.call-options { display: flex; flex-direction: column; gap: 10px; }
.call-option { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--surface); text-align: start; transition: border-color .2s, transform .15s var(--ease); }
.call-option:active { transform: scale(.98); }
.call-option:disabled { opacity: .5; }
.call-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: 1.3rem; flex: none; }
.call-text { display: flex; flex-direction: column; }
.call-text strong { font-size: 1.05rem; }
.call-text small { color: var(--ink-2); }
.call-grid { display: grid; gap: 12px; }
.call-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); border-inline-start: 5px solid var(--warn); animation: view-in .35s var(--ease) both; }
.call-card.call-bill { border-inline-start-color: var(--ok); }
.call-table { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 6px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); line-height: 1.2; }
.call-table small { font-size: .72rem; opacity: .85; }
.call-table strong { font-family: var(--font-display); font-size: 1.7rem; }
.call-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.call-info strong { font-size: 1.05rem; }
.call-info .small { display: inline-flex; align-items: center; gap: 4px; }
.call-btn { min-height: 38px; padding-inline: 14px; }

/* التقارير */
.report-bar { align-items: flex-end; justify-content: space-between; }

/* ساعات العمل */
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-open { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip-closed { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.hours-note { font-weight: 600; color: var(--bad); }
.notice-closed { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.hours-list { display: flex; flex-direction: column; gap: 6px; }
.hours-list li { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.hours-list b { font-weight: 600; font-variant-numeric: tabular-nums; }
.hours-editor { display: flex; flex-direction: column; gap: 12px; }
.hours-days { display: flex; flex-direction: column; gap: 8px; }
.hours-day { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-s); background: var(--bg); }
.hours-day > .check { grid-column: 1 / -1; }
.hours-day.is-off { opacity: .6; }
.hours-time { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hours-time span { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.hours-time .input { min-width: 0; }

/* خيارات الصنف */
.item-price-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.item-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-size: .74rem; font-weight: 600; }
.opt-line { display: block; color: var(--ember); font-weight: 600; }
.line-options { color: var(--ember); font-size: .86rem; font-weight: 600; }
.mini-name small { display: block; color: var(--ink-2); font-size: .8rem; }
.opt-form { display: flex; flex-direction: column; gap: 14px; width: 100%; margin-top: 8px; }
.opt-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.opt-group legend { display: flex; align-items: baseline; gap: 8px; padding: 0; margin-bottom: 8px; font-weight: 700; }
.opt-group legend small { color: var(--ink-2); font-weight: 500; font-size: .8rem; }
.opt-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  font-size: .92rem;
  transition: background .2s, color .2s, border-color .2s;
}
.opt-choice small { color: var(--ember); font-weight: 700; }
.opt-choice.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.opt-choice.on small { color: inherit; opacity: .85; }
.opt-section { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; border-top: 1px dashed var(--line); }
.opt-editor { display: flex; flex-direction: column; gap: 12px; }
.opt-edit-group { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg); min-width: 0; }
.opt-edit-head { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.opt-edit-head .input:first-child { grid-column: 1 / -1; }
.opt-max { max-width: 220px; }
.opt-edit-choices { display: flex; flex-direction: column; gap: 8px; }
.opt-edit-choices li { display: grid; grid-template-columns: 1fr 110px auto; gap: 8px; align-items: center; }
.opt-price { display: flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-2); }
.opt-copy { max-width: 260px; }

/* إشعارات الجوال */
.staff-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.push-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-m);
  background: var(--brand-soft);
  border: 1px solid var(--line);
}
.push-box p { flex: 1 1 200px; font-size: .92rem; font-weight: 500; }
.push-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); flex: none; }
.push-status { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.key-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.key-name { grid-column: 1 / -1; font-size: .8rem; font-weight: 700; color: var(--ink-2); text-align: left; }
.key-value { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px; min-width: 0; }
.setup-steps { display: flex; flex-direction: column; gap: 8px; padding-inline-start: 22px; list-style: decimal; }
.usage { display: flex; flex-direction: column; gap: 8px; }
.usage-track { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.usage-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--ember);
  transform-origin: right;
  animation: grow .8s var(--ease) both;
}
.usage-list { display: flex; flex-direction: column; gap: 6px; }
.usage-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-s); background: var(--bg); }
.usage-list li span { flex: 1; }
.usage-list b { font-variant-numeric: tabular-nums; }
.account-rows { display: flex; flex-direction: column; gap: 10px; }
.account-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; border-radius: var(--r-s); background: var(--bg); }
.account-row .input { grid-column: 1; }
.account-row .icon-btn { grid-column: 2; grid-row: 1; }
/* ───── 12ب) الطبقات العائمة: الشريط السفلي، القائمة الجانبية، تفاصيل الصنف ───── */
/* الشريط السفلي يعيش في #dock تحت body مباشرة، خارج أي عنصر متحرك (لهذا لا يختفي ولا يظهر في منتصف الصفحة) */
.dock {
  position: fixed;
  z-index: 75;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 var(--gutter-end) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gutter);
  pointer-events: none;
  transition: transform .35s var(--ease), opacity .25s;
}
.dock:empty { display: none; }
.dock > * { pointer-events: auto; }
.dock.is-hidden { transform: translateY(calc(100% + 24px)); opacity: 0; }
.dock.is-hidden > * { pointer-events: none; }
.dock.dock-edge { padding: 0; }
.cart-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  margin-inline: auto;
  padding: 8px;
  padding-inline-start: 12px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.cart-bar-info { display: flex; align-items: center; gap: 12px; min-width: 0; margin-inline-end: auto; }
.cart-bar-count {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  font-size: 1.2rem;
}
.cart-bar-count b {
  position: absolute;
  top: -6px;
  inset-inline-start: -6px;
  min-width: 22px;
  height: 22px;
  padding-inline: 5px;
  border-radius: 11px;
  background: var(--ember);
  color: #fff;
  font-size: .75rem;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.cart-bar-sum { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.cart-bar-sum > span { font-size: .78rem; color: var(--ink-2); }
.cart-bar-sum strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ember);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cart-bar-go { min-height: 50px; border-radius: 16px; padding-inline: 16px; }
.cart-bar.bump .cart-bar-count { animation: bump .4s var(--ease); }
.dock-nav {
  display: flex;
  gap: 2px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 24px -18px rgb(0 0 0 / .35);
  overflow-x: auto;
  scrollbar-width: none;
}
.dock-nav::-webkit-scrollbar { display: none; }
/* الطبقة العائمة العامة: خلفية ضبابية تمنع التفاعل مع الصفحة */
.ov {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgb(20 8 10 / .4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .3s var(--ease);
  overscroll-behavior: contain;
}
.ov.is-open { opacity: 1; }
.ov-panel { outline: none; }
/* القائمة الجانبية (تنزلق من جهة البداية: اليمين) */
.ov-drawer .ov-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: min(86vw, 330px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) 0;
  transform: translateX(100%);
  transition: transform .38s var(--ease);
}
.ov-drawer.is-open .ov-panel { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer-head > div { display: flex; flex-direction: column; min-width: 0; margin-inline-end: auto; }
.drawer-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 12px; overflow-y: auto; overscroll-behavior: contain; }
.drawer-nav .staff-link, .staff-side .staff-link {
  flex: none;
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 14px;
  font-size: .98rem;
  text-align: start;
  white-space: normal;
}
.drawer-nav .nav-badge, .staff-side .nav-badge { position: static; margin-inline-start: auto; }
.ov-drawer.is-open .drawer-nav .staff-link { animation: drawer-item .4s var(--ease) backwards; }
.ov-drawer.is-open .drawer-nav .staff-link:nth-child(2) { animation-delay: .03s; }
.ov-drawer.is-open .drawer-nav .staff-link:nth-child(3) { animation-delay: .06s; }
.ov-drawer.is-open .drawer-nav .staff-link:nth-child(4) { animation-delay: .09s; }
.ov-drawer.is-open .drawer-nav .staff-link:nth-child(5) { animation-delay: .12s; }
.ov-drawer.is-open .drawer-nav .staff-link:nth-child(6) { animation-delay: .15s; }
.ov-drawer.is-open .drawer-nav .staff-link:nth-child(7) { animation-delay: .18s; }
/* تفاصيل الصنف */
.ov-lightbox {
  display: grid;
  place-items: center;
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter-end) calc(12px + max(var(--dock-h, 0px), env(safe-area-inset-bottom, 0px))) var(--gutter);
}
.ov-lightbox .ov-panel {
  width: min(100%, 540px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-lg);
  transform: scale(.94);
  transition: transform .35s var(--ease);
}
.ov-lightbox.is-open .ov-panel { transform: none; }
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.lb-counter { padding-inline: 6px; font-size: .9rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lb-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 4px 16px;
  border-radius: 99px;
  background: var(--surface-2);
  font-size: .92rem;
  font-weight: 600;
}
.lb-stage { flex: 1 1 auto; min-height: 0; display: grid; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
.lb-slide { grid-area: 1 / 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.lb-media { position: relative; flex: none; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.lb-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lb-media .item-ph { font-size: 3.2rem; }
.lb-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 18px 10px; }
.lb-info .eyebrow { font-size: .9rem; }
.lb-info h2 { font-size: 1.5rem; }
.lb-desc { color: var(--ink-2); line-height: 1.8; }
.lb-info .price { font-size: 1.45rem; }
.lb-foot { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.lb-control { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.lb-control .btn { min-height: 52px; }
.lb-control .stepper { flex: 1; display: flex; justify-content: space-between; padding: 4px; }
.lb-control .step-btn { width: 44px; height: 44px; }
.lb-line-total {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ember);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lb-navs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lb-nav { min-height: 46px; }
.lb-nav:disabled { opacity: .35; }
@media (min-width: 900px) {
  .ov-lightbox .ov-panel { width: min(100%, 900px); }
  .lb-slide { display: grid; grid-template-columns: 1.1fr 1fr; }
  .lb-media { aspect-ratio: auto; min-height: 380px; }
  .lb-info { justify-content: center; padding: 28px; }
}
/* ───── 13) الحركة ───── */
@keyframes spin { to { rotate: 360deg; } }
@keyframes fade { from { opacity: 0; } }
@keyframes view-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
@keyframes toast-in { from { transform: translateY(14px) scale(.96); opacity: 0; } }
@keyframes pop { from { transform: scale(.8); opacity: .4; } }
@keyframes bump { 40% { transform: scale(1.35); } }
@keyframes pulse { 50% { transform: scale(1.08); } }
@keyframes float { 50% { translate: 0 -8px; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes drawer-item { from { opacity: 0; transform: translateX(24px); } }
@keyframes plate-in { from { opacity: 0; transform: translateZ(-200px) rotate(-40deg) scale(.7); } }
/* لا نخفي أي محتوى بانتظار التمرير: التمرير السريع كان يُظهر فراغات وتعليقاً */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
/* ───── آيباد ≥ 720px ───── */
@media (min-width: 720px) {
  :root { --topbar-h: 68px; --gutter: max(28px, env(safe-area-inset-left, 0px)); --gutter-end: max(28px, env(safe-area-inset-right, 0px)); }
  h1 { font-size: 2rem; }
  .user-chip { display: inline-flex; }
  .modal-backdrop { align-items: center; }
  .modal { border-radius: var(--r-l); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .full, .form-grid .image-pick, .form-grid .check { grid-column: 1 / -1; }
  .two-col { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1.05fr .95fr; grid-template-areas: "copy stage" "show show"; padding-block: 48px 64px; column-gap: 32px; }
  .plate { width: min(40vw, 440px); }
  .spec-rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-columns: auto;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
  .spec-card.is-feature { grid-column: span 3; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { grid-template-columns: 1fr; row-gap: 8px; padding: 24px; }
  .step-ic { grid-row: auto; }
  .step p { grid-column: 1; }
  .foot-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .hours-day { grid-template-columns: 160px 1fr 1fr; } .hours-day > .check { grid-column: auto; }
  .item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .item-desc { display: -webkit-box; }
  .cart-page, .track-page { grid-template-columns: 1.25fr 1fr; gap: 22px; }
  .sticky { position: sticky; top: calc(var(--topbar-h) + 18px); }
  .staff-head { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .order-grid { grid-template-columns: repeat(2, 1fr); }
  .call-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .account-row { grid-template-columns: 1fr 1fr 1fr auto; }
  .account-row .input, .account-row .icon-btn { grid-column: auto; grid-row: auto; }
  .qr-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}
/* ───── كمبيوتر ≥ 1100px ───── */
@media (min-width: 1100px) {
  .hero-title { font-size: 9.5rem; }
  .spec-rail { grid-template-columns: repeat(4, 1fr); }
  .spec-card.is-feature { grid-column: span 2; }
  .menu-page { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; padding-bottom: 60px; }
  .cart-bar { display: none; }
  .mini-cart {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: calc(var(--topbar-h) + 22px);
    padding: 20px;
    border-radius: var(--r-l);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: calc(100dvh - var(--topbar-h) - 44px);
    overflow-y: auto;
  }
  .mini-cart h2 { display: flex; align-items: center; gap: 8px; }
  .mini-lines { display: flex; flex-direction: column; gap: 10px; }
  .mini-lines li { display: flex; gap: 8px; align-items: baseline; font-size: .92rem; animation: view-in .3s var(--ease) both; }
  .mini-qty { color: var(--ember); font-weight: 700; min-width: 28px; }
  .mini-name { flex: 1; }
  .mini-total { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 1.1rem; }
  .mini-total strong { font-family: var(--font-display); color: var(--ember); }
  .staff { display: grid; grid-template-columns: 250px 1fr; gap: 30px; align-items: start; }
  .staff-side {
    display: block;
    position: sticky;
    top: calc(var(--topbar-h) + 18px);
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-l);
  }
  .staff-nav { display: flex; flex-direction: column; gap: 4px; }
  .staff-bar, .dock-nav { display: none; }
  .staff.is-admin .staff-head h1 { display: block; }
  .order-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 1400px) { .item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* ───── 14) طباعة رموز QR ───── */
@media print {
  body.print-qr .topbar, body.print-qr .banners, body.print-qr .staff-side, body.print-qr .staff-head, body.print-qr .toolbar, body.print-qr .qr-actions, body.print-qr .qr-info, body.print-qr #toasts, body.print-qr .staff-content > .panel-stack > .muted {
    display: none !important;
  }
  body.print-qr { background: #fff; }
  body.print-qr .staff { display: block; padding: 0; }
  body.print-qr .qr-grid { grid-template-columns: repeat(2, 1fr); gap: 8mm; }
  body.print-qr .qr-card { border: 0; padding: 0; break-inside: avoid; }
}