/* SERVA — موقع تعريفي. هادئ، واسع، والمنتج هو البطل.
   الاتجاه منطقي (inline-start/end) فالعربي والإنجليزي بينقلبوا لحالهم. */

/* ---------- الخطوط (مستضافة عندنا: ولا طلب لجهة تالتة) ---------- */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-arabic.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EFD-10EFF, U+1EE00-1EEFF;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- الألوان ---------- */
:root {
  color-scheme: light;
  --bg: #f6f3ec;
  --bg-2: #efebe1;
  --bg-3: #e6e0d2;
  --ink: #0e1413;
  --ink-2: #46524f;
  --ink-3: #5f6b68;
  --line: #e1dcce;
  --line-strong: #cdc6b4;
  --accent: #163832;
  --accent-hover: #0f2a25;
  --accent-ink: #163832;
  --accent-weak: #e3ebe7;
  --on-accent: #ffffff;
  --ring: rgba(22, 56, 50, 0.35);
  --live: #c2540a;
  --live-weak: #fbede3;
  --live-ink: #a64808;
  --night: #0b1211;
  --night-2: #121b19;
  --night-ink: #eef4f2;
  --night-ink-2: #a3b3af;
  --logo: #163832;
  --nav-bg: rgba(246, 243, 236, 0.78);
  --shadow-1: 0 1px 2px rgba(14, 20, 19, 0.06), 0 8px 24px -10px rgba(14, 20, 19, 0.14);
  --shadow-2: 0 2px 6px rgba(14, 20, 19, 0.06), 0 40px 80px -36px rgba(8, 44, 41, 0.42);
  --radius-tile: 28px;
  --font-ar: "Vazirmatn", "Hanken Grotesk", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-en: "Hanken Grotesk", "Vazirmatn", system-ui, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f0e;
  --bg-2: #121816;
  --bg-3: #19211f;
  --ink: #eef3f1;
  --ink-2: #aab8b4;
  --ink-3: #8b9995;
  --line: #222b29;
  --line-strong: #34403d;
  --accent: #23665a;
  --accent-hover: #2a7568;
  --accent-ink: #7fd1c4;
  --accent-weak: #142a26;
  --on-accent: #ffffff;
  --ring: rgba(127, 209, 196, 0.4);
  --live: #f08a3c;
  --live-weak: #34221a;
  --live-ink: #f08a3c;
  --night: #060a09;
  --night-2: #0e1514;
  --logo: #ffffff;
  --nav-bg: rgba(11, 15, 14, 0.72);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -10px rgba(0, 0, 0, 0.6);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.35), 0 40px 90px -30px rgba(0, 0, 0, 0.8);
}

/* بلا جافاسكربت: نتبع جهاز الزائر */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0b0f0e; --bg-2: #121816; --bg-3: #19211f;
    --ink: #eef3f1; --ink-2: #aab8b4; --ink-3: #8b9995;
    --line: #222b29; --line-strong: #34403d;
    --accent: #23665a; --accent-hover: #2a7568; --accent-ink: #7fd1c4; --accent-weak: #142a26;
    --ring: rgba(127, 209, 196, 0.4); --live: #f08a3c; --live-weak: #34221a; --live-ink: #f08a3c;
    --night: #060a09; --night-2: #0e1514; --logo: #ffffff; --nav-bg: rgba(11, 15, 14, 0.72);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -10px rgba(0, 0, 0, 0.6);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.35), 0 40px 90px -30px rgba(0, 0, 0, 0.8);
  }
}

/* ---------- الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* الكتل اللي عندها display بالكلاس بتغلب [hidden]، فنثبّتها */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ar);
  font-size: 1.0625rem;
  line-height: 1.75;
  font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent-ink);
  overflow-x: clip;
}
:lang(en) body, html:lang(en) body { font-family: var(--font-en); line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.18; text-wrap: balance; }
html:lang(en) h1, html:lang(en) h2, html:lang(en) h3 { letter-spacing: -0.025em; line-height: 1.08; }
p { margin: 0; text-wrap: pretty; }
.num, .tabular, .dish-price, .order-sum, .guest-cart .sum, .plan-limit { font-variant-numeric: tabular-nums; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
html.i18n-pending body { visibility: hidden; }
html:lang(en) .only-ar { display: none; }
html:not(:lang(en)) .only-en { display: none; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

html { scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 99px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: min(1200px, 100% - 2 * clamp(20px, 4vw, 40px)); margin-inline: auto; }
.wrap-narrow { width: min(820px, 100% - 2 * clamp(20px, 4vw, 40px)); margin-inline: auto; }
.section { padding-block: clamp(88px, 11vw, 150px); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(40px, 6vw, 72px); }
.section-head h2 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.9rem); }
.section-head p { margin-top: 18px; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); color: var(--ink-2); }
.on-tint { background: var(--bg-2); }

/* ---------- الأيقونات ---------- */
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }
[dir="ltr"] .flip-ltr { transform: scaleX(-1); }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* ---------- الشعار (لونه بيتبع الوضع) ---------- */
.mark {
  display: inline-block; width: 28px; height: 28px; flex: none;
  background: var(--logo);
  -webkit-mask: url("../img/serva-mark.png") center / contain no-repeat;
          mask: url("../img/serva-mark.png") center / contain no-repeat;
}
.wordmark { font-family: "Hanken Grotesk", sans-serif; font-weight: 700; letter-spacing: 0.12em; font-size: 1.05rem; color: var(--ink); }

/* ---------- الشريط العلوي ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
          backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-row { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-links { display: flex; gap: 26px; margin-inline-start: 20px; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.tool {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px;
  border-radius: 99px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
  font: 600 0.85rem/1 var(--font-en); letter-spacing: 0.04em;
}
.tool:hover { background: var(--bg-2); color: var(--ink); }
.tool .icon { width: 20px; height: 20px; }
.tool .icon-moon { display: none; }
:root[data-theme="dark"] .tool .icon-sun { display: none; }
:root[data-theme="dark"] .tool .icon-moon { display: block; }
.menu-btn { display: none; }
.nav .btn { height: 40px; padding-inline: 16px; font-size: 0.92rem; }

.sheet {
  position: fixed; inset: 64px 0 auto 0; z-index: 49; display: none;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-1);
  padding: 8px clamp(20px, 4vw, 40px) 22px;
}
.sheet.is-open { display: block; }
.sheet a { display: block; padding: 14px 4px; font-size: 1.15rem; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.sheet .btn { margin-top: 18px; width: 100%; justify-content: center; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  height: 52px; padding-inline: 1.55rem; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 1.0625rem/1 inherit; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s, box-shadow 0.2s, color 0.2s, transform 0.2s var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn .icon { width: 20px; height: 20px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px -8px rgba(22, 56, 50, 0.55); }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-secondary:hover { background: var(--bg-2); text-decoration: none; }
.btn-quiet { background: var(--bg-2); color: var(--ink); }
.btn-quiet:hover { background: var(--bg-3); text-decoration: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- البداية ---------- */
.hero { padding-top: clamp(40px, 5vw, 64px); text-align: center; overflow: clip; }
.hero h1 { font-size: clamp(2.7rem, 1.4rem + 5vw, 5rem); line-height: 1.14; }
html:lang(en) .hero h1 { line-height: 1.02; }
.hero-lede { margin: 20px auto 0; max-width: 46rem; text-wrap: balance; font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem); color: var(--ink-2); line-height: 1.7; }
.hero .actions { margin-top: 30px; }
.hero-meta { margin-top: 18px; font-size: 0.9rem; color: var(--ink-3); }
.hero-visual { position: relative; width: min(1000px, 100% - 2 * clamp(20px, 5vw, 64px)); margin: clamp(36px, 4.5vw, 52px) auto 0; padding-bottom: clamp(48px, 6vw, 88px); }

/* إطار الشاشة والموبايل */
.display {
  position: relative; border-radius: clamp(12px, 1.6vw, 22px); padding: clamp(5px, 0.75vw, 11px);
  background: #0c100f; box-shadow: var(--shadow-2), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.display > img, .display > picture img { width: 100%; border-radius: clamp(7px, 1vw, 12px); }
.phone {
  position: relative; border-radius: clamp(24px, 3.6vw, 46px); padding: clamp(4px, 0.62vw, 9px);
  background: #0a0c0c; box-shadow: var(--shadow-2), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone > img { width: 100%; border-radius: clamp(20px, 3.1vw, 38px); }
.phone::after {
  content: ""; position: absolute; top: clamp(9px, 1.2vw, 17px); left: 50%; transform: translateX(-50%);
  width: 30%; height: clamp(8px, 1vw, 15px); border-radius: 99px; background: #050606;
}
.hero-visual .phone { position: absolute; width: clamp(118px, 23%, 240px); inset-inline-end: clamp(-40px, -2.5vw, -8px); top: 14%; }

/* صورة لكل وضع */
.for-dark { display: none; }
:root[data-theme="dark"] .for-light { display: none; }
:root[data-theme="dark"] .for-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .for-light { display: none; }
  :root:not([data-theme]) .for-dark { display: block; }
}

/* إشعار الطلب الجديد فوق الشاشة */
.toast {
  position: absolute; top: 12%; inset-inline-end: 27%; z-index: 2;
  display: flex; align-items: flex-start; gap: 12px; text-align: start;
  padding: 14px 18px; border-radius: 16px; min-width: min(300px, 58%);
  background: var(--bg); color: var(--ink); box-shadow: var(--shadow-2), 0 0 0 1px var(--line);
  font-size: 0.95rem; line-height: 1.5;
}
.toast b { display: block; font-weight: 700; }
.toast span { color: var(--ink-2); font-size: 0.86rem; }
.toast time { margin-inline-start: auto; color: var(--ink-3); font-size: 0.8rem; white-space: nowrap; }
.live-dot { position: relative; flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--live); }
.live-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--live); opacity: 0; animation: ping 1.8s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.8; } 100% { transform: scale(1.6); opacity: 0; } }
.js .toast { opacity: 0; transform: translateY(-10px) scale(0.98); }
.js .toast.is-in { opacity: 1; transform: none; transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out); }

ul.clean, ol.clean { list-style: none; margin: 0; padding: 0; }

/* ---------- المحاكاة ---------- */
.demo-stage {
  display: grid; gap: clamp(20px, 2.6vw, 36px);
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr) minmax(220px, 250px);
  align-items: start;
}
.stage-label { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 0.9rem; font-weight: 600; color: var(--ink-2); }
.stage-label .step-no {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-3); color: var(--ink-2); font: 700 0.8rem/1 var(--font-en); transition: background 0.3s, color 0.3s;
}
.stage-col.is-current .step-no, .stage-col.is-done .step-no { background: var(--accent); color: var(--on-accent); }

/* موبايل الزبون: نفس ألوان منيو البرنامج الحقيقي */
.guest {
  --g-bg: #16181d; --g-card: #ffffff; --g-gold: #d4ae3f; --g-gold-2: #b8912a; --g-ink: #1b1d22; --g-ink-2: #6c6f78;
  position: relative; border-radius: 40px; padding: 8px; background: #0a0c0c; box-shadow: var(--shadow-2), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.guest-screen {
  position: relative; height: 600px; border-radius: 32px; overflow: hidden; background: var(--g-bg); color: #f3f1ec;
  display: flex; flex-direction: column; font-family: var(--font-ar);
}
html:lang(en) .guest-screen { font-family: var(--font-ar); }
.guest-top { display: flex; align-items: center; gap: 10px; padding: 34px 16px 12px; }
.guest-logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(160deg, #e2c35c, #b8912a); color: #2a2205; font-weight: 800; font-size: 1.2rem; }
.guest-name b { display: block; font-size: 1.05rem; line-height: 1.3; }
.guest-name span { font-size: 0.75rem; color: #a6a39a; }
.guest-table { margin-inline-start: auto; padding: 6px 12px; border-radius: 99px; background: var(--g-gold); color: #2a2205; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.guest-chips { display: flex; gap: 6px; padding: 4px 16px 12px; overflow: hidden; }
.guest-chips span { padding: 6px 12px; border-radius: 99px; border: 1px solid #2c2f36; font-size: 0.78rem; color: #cfccc4; white-space: nowrap; }
.guest-chips span.on { background: var(--g-gold); border-color: var(--g-gold); color: #2a2205; font-weight: 700; }
.guest-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: max-content; gap: 10px; padding: 0 12px 96px; align-content: start; scrollbar-width: none; overscroll-behavior: contain; }
.guest-grid::-webkit-scrollbar { display: none; }
.dish { position: relative; border-radius: 18px; overflow: hidden; background: var(--g-card); color: var(--g-ink); }
.dish img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.dish-body { padding: 8px 10px 10px; }
.dish-name { font-size: 0.82rem; font-weight: 700; line-height: 1.35; min-height: 2.2em; }
.dish-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.dish-price { font: 700 0.85rem/1 var(--font-en); }
.dish-add {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(160deg, #e2c35c, #b8912a); color: #2a2205; box-shadow: 0 6px 12px -6px rgba(184, 145, 42, 0.8);
  transition: transform 0.15s;
}
.dish-add:active { transform: scale(0.88); }
.dish-add .icon { width: 18px; height: 18px; stroke-width: 2.4; }
.dish-qty {
  position: absolute; top: 8px; inset-inline-start: 8px; min-width: 26px; height: 26px; padding: 0 7px;
  display: grid; place-items: center; border-radius: 99px; background: var(--g-gold); color: #2a2205;
  font: 800 0.8rem/1 var(--font-en); transform: scale(0); transition: transform 0.25s var(--ease-out);
}
.dish.has-qty .dish-qty { transform: scale(1); }
.guest-cart {
  position: absolute; inset: auto 12px 14px 12px; display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 14px; border-radius: 99px; background: #0d0e11; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 1px #2a2c33;
  transform: translateY(140%); transition: transform 0.45s var(--ease-out);
}
html[dir="rtl"] .guest-cart { padding: 10px 14px 10px 10px; }
.guest-cart.is-up { transform: none; }
.guest-cart .count { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #23252b; font: 800 0.85rem/1 var(--font-en); }
.guest-cart .sum { line-height: 1.2; }
.guest-cart .sum b { display: block; font: 700 0.95rem/1.2 var(--font-en); }
.guest-cart .sum span { font: 500 0.72rem/1.2 var(--font-en); color: #a6a39a; }
.guest-send {
  margin-inline-start: auto; height: 42px; padding: 0 18px; border: 0; border-radius: 99px; cursor: pointer;
  background: linear-gradient(160deg, #e2c35c, #b8912a); color: #2a2205; font: 800 0.9rem/1 var(--font-ar);
}
.guest-sent {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; text-align: center; padding: 24px;
  background: rgba(22, 24, 29, 0.94); opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.guest-sent.is-on { opacity: 1; pointer-events: auto; }
.guest-sent .tick { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--g-gold); color: #2a2205; }
.guest-sent .tick .icon { width: 30px; height: 30px; stroke-width: 2.6; }
.guest-sent b { font-size: 1.1rem; }
.guest-sent span { font-size: 0.85rem; color: #a6a39a; }

/* شاشة الكاشير */
.counter { border-radius: 22px; background: var(--bg); box-shadow: var(--shadow-1), 0 0 0 1px var(--line-strong); overflow: hidden; }
.counter-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.counter-head b { font-size: 1.05rem; }
.counter-live { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--ink-3); }
.counter-live i { width: 8px; height: 8px; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 3px rgba(34, 160, 107, 0.18); }
.orders { list-style: none; margin: 0; padding: 0; }
.order { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.order:last-child { border-bottom: 0; }
.order-no { font: 700 0.95rem/1 var(--font-en); color: var(--ink-2); }
.order-table { font-weight: 700; }
.order-items { grid-column: 2 / 3; display: flex; flex-wrap: wrap; gap: 6px; }
.order-items span { padding: 3px 10px; border-radius: 8px; background: var(--bg-2); font-size: 0.82rem; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.order-sum { grid-row: 1 / 3; grid-column: 3; text-align: end; }
.order-sum b { display: block; font: 700 1rem/1.2 var(--font-en); }
.order-sum span { font: 500 0.78rem/1.3 var(--font-en); color: var(--ink-3); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.pill-prep { background: var(--accent-weak); color: var(--accent-ink); }
.pill-new { background: var(--live-weak); color: var(--live-ink); }
.pill-new i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.order-meta { display: flex; align-items: center; gap: 10px; }
.order.is-new { animation: arrive 0.9s var(--ease-out) both, glow 2.6s ease-out 0.3s both; }
@keyframes arrive { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes glow { 0% { background: var(--live-weak); } 100% { background: transparent; } }
.counter-empty { padding: 18px 20px; font-size: 0.85rem; color: var(--ink-3); }

/* الطابعات */
.printers { display: grid; gap: 16px; }
.printer { position: relative; padding: 14px 14px 0; border-radius: 18px; background: var(--bg-3); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.printer-mouth { position: relative; z-index: 2; height: 12px; border-radius: 7px; background: #141918; box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 255, 255, 0.5); }
:root[data-theme="dark"] .printer-mouth { background: #000000; box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.09); }
:root[data-theme="dark"] .printer { background: var(--bg-3); }
.printer-name { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.printer-name::after { content: ""; margin-inline-start: auto; width: 8px; height: 8px; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 3px rgba(34, 160, 107, 0.16); }
.printer.is-printing .printer-name::after { background: var(--live); box-shadow: 0 0 0 3px var(--live-weak); }
.printer-name .icon { color: var(--ink-3); }
.paper-slot { position: relative; margin: -6px 10px 0; min-height: 76px; overflow: hidden; }
.ticket {
  background: #fdfdfb; color: #111; padding: 14px 14px 12px; font-family: var(--font-ar);
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.45);
  transform: translateY(-104%); transition: transform 1.6s cubic-bezier(0.45, 0, 0.2, 1);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 8px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 8px repeat-x;
  padding-bottom: 20px;
}
.ticket.is-out { transform: none; }
.ticket-head { text-align: center; font-size: 0.78rem; line-height: 1.4; padding-bottom: 8px; border-bottom: 1.5px solid #111; }
.ticket-head b { display: block; font-size: 0.9rem; }
.ticket-no { text-align: center; padding: 8px 0 6px; border-bottom: 1.5px dashed #777; }
.ticket-no b { display: block; font: 800 1.6rem/1 var(--font-en); }
.ticket-no span { font-weight: 800; font-size: 1rem; }
.ticket-no .ticket-time { display: block; margin-top: 2px; font: 500 0.75rem/1.6 var(--font-en); }
.ticket-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 8px; font-weight: 800; font-size: 0.98rem; }
.ticket-line em { font: 800 0.95rem/1 var(--font-en); font-style: normal; }
.printer-idle { position: relative; margin: 0 10px; padding: 26px 10px 16px; font-size: 0.8rem; color: var(--ink-3); text-align: center; }
.printer-idle::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 16px; background: #fdfdfb; box-shadow: 0 6px 10px -8px rgba(0, 0, 0, 0.5);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 100%; }

.demo-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin-top: clamp(28px, 4vw, 44px); }
.demo-note { font-size: 0.88rem; color: var(--ink-3); }
.sr-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- الميزات ---------- */
.feature { display: grid; gap: clamp(32px, 5vw, 80px); align-items: center; }
.feature + .feature { margin-top: clamp(96px, 12vw, 168px); }
.feature-copy h2 { font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem); }
.feature-copy > p { margin-top: 18px; font-size: clamp(1.08rem, 1rem + 0.4vw, 1.25rem); color: var(--ink-2); max-width: 46ch; }
.points { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 0; max-width: 520px; }
.points li { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.points li:last-child { border-bottom: 1px solid var(--line); }
.points .icon { grid-row: 1 / 3; margin-top: 4px; color: var(--accent-ink); width: 22px; height: 22px; }
.points b { font-weight: 700; }
.points span { color: var(--ink-2); font-size: 0.98rem; }
.plan-tag { display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: 99px; background: var(--accent-weak); color: var(--accent-ink); font-size: 0.72rem; font-weight: 700; vertical-align: 2px; }

.tile { position: relative; border-radius: var(--radius-tile); background: var(--bg-2); overflow: hidden; padding: clamp(18px, 3vw, 36px); }
.on-tint .tile { background: var(--bg); }
.tile-night { background: radial-gradient(120% 90% at 50% 0%, #1a2624 0%, var(--night) 62%); color: var(--night-ink); }
.on-tint .tile-night { background: radial-gradient(120% 90% at 50% 0%, #1a2624 0%, var(--night) 62%); }

.phones { display: flex; justify-content: center; gap: clamp(14px, 3vw, 34px); align-items: flex-start; }
.phones .phone { width: min(48%, 300px); }
.phones .phone:nth-child(2) { margin-top: clamp(28px, 6vw, 70px); }

.tickets { display: flex; justify-content: center; align-items: flex-start; gap: clamp(16px, 3vw, 36px); padding-block: 8px; }
.tickets figure { margin: 0; width: min(46%, 250px); }
.tickets img { width: 100%; box-shadow: 0 30px 50px -24px rgba(0, 0, 0, 0.9); }
.tickets figure:first-child { transform: rotate(-2.2deg); }
.tickets figure:last-child { transform: rotate(1.8deg) translateY(28px); }
.tickets-caption { margin-top: 34px; text-align: center; font-size: 0.9rem; color: var(--night-ink-2); }

/* قسم الدرج: داكن بعرض الصفحة، ولقطات بحجمها الحقيقي */
.night { background: var(--night); color: var(--night-ink); }
.night .section-head p { color: var(--night-ink-2); }
.night :focus-visible { outline-color: rgba(255, 255, 255, 0.6); }
.money-stage { display: grid; grid-template-columns: repeat(2, minmax(0, 430px)); justify-content: center; align-items: start; gap: clamp(28px, 4vw, 64px); }
.panel { margin: 0; }
.panel-shot { border-radius: 22px; overflow: hidden; box-shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.09); }
.panel-shot img { width: 100%; }
.panel figcaption { margin-top: 22px; }
.panel figcaption b { display: block; font-size: 1.3rem; font-weight: 800; color: var(--night-ink); }
.panel figcaption span { display: block; margin-top: 6px; max-width: 40ch; color: var(--night-ink-2); }
.money-more { margin: clamp(40px, 5vw, 64px) auto 0; max-width: 60ch; text-align: center; color: var(--night-ink-2); }

/* التقارير: قصّات مقروءة بحجمها */
.report-stack { display: grid; gap: 14px; }
.report-stack img { width: 100%; border-radius: 16px; box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }

/* أسئلة صاحب المطعم: سطور بخط رفيع، السؤال أولاً والجواب تحته */
.owner { border-top: 1px solid var(--line); }
.ask { display: grid; border-top: 2px solid var(--ink); }
.ask li { display: grid; align-content: start; justify-items: start; gap: 10px; padding: 26px 0 30px; border-bottom: 1px solid var(--line); }
.ask h3 { font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.7rem); }
.ask p { color: var(--ink-2); max-width: 36ch; }
.ask .plan-tag { margin: 4px 0 0; }
@media (min-width: 720px) {
  .ask { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(28px, 4vw, 64px); }
}
@media (min-width: 1024px) {
  .ask { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- ليش SERVA ---------- */
.pillars { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pillar { padding: clamp(28px, 4vw, 48px) 0; border-bottom: 1px solid var(--line); }
.pillar h3 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); }
.pillar p { margin-top: 12px; color: var(--ink-2); font-size: 1.08rem; max-width: 34ch; }

/* ---------- الباقات ---------- */
.plans { display: grid; gap: 16px; }
.plan { display: flex; flex-direction: column; border-radius: 26px; padding: clamp(26px, 3vw, 36px); background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.plan h3 { font-size: 1.6rem; }
.plan-for { margin-top: 6px; color: var(--ink-2); }
.plan-limit { margin-top: 22px; font-size: 1.05rem; font-weight: 700; }
.plan ul { list-style: none; margin: 18px 0 28px; padding: 0; display: grid; gap: 12px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 0.98rem; line-height: 1.55; }
.plan li .icon { margin-top: 3px; color: var(--accent-ink); width: 18px; height: 18px; }
.plan li.inherit { color: var(--ink); font-weight: 600; }
.plan .btn { margin-top: auto; justify-content: center; }
.plans-note { margin-top: 26px; text-align: center; color: var(--ink-3); font-size: 0.95rem; }

/* ---------- الخطوات ---------- */
.steps { display: grid; gap: 28px; counter-reset: step; }
.step { padding-top: 22px; border-top: 2px solid var(--ink); }
.step-num { font: 600 1rem/1 var(--font-en); color: var(--ink-3); }
.step h3 { margin-top: 14px; font-size: 1.45rem; }
.step p { margin-top: 10px; color: var(--ink-2); }
.steps-note { margin-top: 36px; text-align: center; color: var(--ink-2); }

/* ---------- الأسئلة ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 2px; cursor: pointer;
  list-style: none; font-size: 1.15rem; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--ink-3); transition: transform 0.3s var(--ease-out); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq .answer { padding: 0 2px 24px; color: var(--ink-2); max-width: 68ch; }
.faq .answer p + p { margin-top: 10px; }

/* ---------- الدعوة الأخيرة ---------- */
.cta { background: var(--night); color: var(--night-ink); text-align: center; }
.cta h2 { font-size: clamp(2.2rem, 1.3rem + 3.6vw, 4.2rem); }
.cta p { margin: 18px auto 0; max-width: 46ch; color: var(--night-ink-2); font-size: 1.15rem; }
.cta .actions { margin-top: 34px; }
.cta .btn-primary { background: #ffffff; color: #0f2a25; box-shadow: none; }
.cta .btn-primary:hover { background: #e3ebe7; }
.cta .btn-secondary { color: #ffffff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); }
.cta .btn-secondary:hover { background: rgba(255, 255, 255, 0.08); }
.cta .mark { --logo: #ffffff; width: 44px; height: 44px; margin: 0 auto 26px; background: #ffffff; }
.cta :focus-visible { outline-color: rgba(255, 255, 255, 0.6); }

/* ---------- التذييل ---------- */
.footer { padding-block: 40px 48px; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--ink-3); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.footer-row + .footer-row { margin-top: 18px; }
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer .brand { margin-inline-end: auto; }
.footer .mark { width: 22px; height: 22px; }

/* ---------- صفحة الخصوصية ---------- */
.prose { padding-block: clamp(56px, 8vw, 96px) clamp(80px, 10vw, 120px); }
.prose h1 { font-size: clamp(2.3rem, 1.5rem + 3vw, 3.6rem); }
.prose .updated { margin-top: 12px; color: var(--ink-3); }
.prose .intro { margin-top: 26px; font-size: 1.2rem; color: var(--ink-2); }
.prose h2 { margin-top: 56px; font-size: 1.6rem; }
.prose h3 { margin-top: 28px; font-size: 1.15rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose p { margin-top: 14px; max-width: 70ch; }
.prose ul { margin: 14px 0 0; padding-inline-start: 1.2em; display: grid; gap: 8px; max-width: 70ch; }
.prose strong { color: var(--ink); }
.summary-box { margin-top: 32px; padding: 26px 28px; border-radius: 22px; background: var(--bg-2); }
.summary-box ul { margin-top: 8px; }
.credits { width: 100%; margin-top: 18px; border-collapse: collapse; font-size: 0.92rem; }
.credits th, .credits td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; color: var(--ink-2); }
.credits th { color: var(--ink); font-weight: 700; }
.back-home { display: inline-flex; align-items: center; gap: 8px; margin-top: 48px; }
.notfound { text-align: center; }
.notfound .mark { width: 48px; height: 48px; margin: 0 auto 28px; }
.notfound .intro { margin-inline: auto; }

/* ---------- شريط التموضع تحت البداية ---------- */
.section-tight { padding-block: clamp(48px, 6vw, 86px); }

/* ---------- المشكلة ---------- */
.pains { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pains li { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; padding: 26px 0 30px; border-bottom: 1px solid var(--line); }
.pains .icon { grid-row: 1 / 3; margin-top: 6px; width: 24px; height: 24px; color: var(--ink-3); }
.pains h3 { font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.5rem); }
.pains p { color: var(--ink-2); max-width: 38ch; }
.pain-bridge { margin: clamp(34px, 4vw, 52px) auto 0; max-width: 46ch; text-align: center; font-size: clamp(1.05rem, 1rem + 0.35vw, 1.22rem); color: var(--ink); }

/* ---------- بلا مخاطرة ---------- */
.risks { display: grid; gap: 0; border-top: 1px solid var(--line); }
.risks li { padding: 24px 0 28px; border-bottom: 1px solid var(--line); }
.risks h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.42rem); }
.risks p { margin-top: 8px; color: var(--ink-2); max-width: 46ch; }

/* ---------- الجسر إلى الفصل الثاني ---------- */
.act-bridge { display: flex; justify-content: center; margin-top: clamp(30px, 4vw, 46px); }
.act-bridge .btn .icon { width: 18px; height: 18px; }
.act2-head { margin-top: clamp(76px, 9vw, 128px); }
.act2-head h2 { font-size: clamp(1.9rem, 1.25rem + 2.6vw, 3.1rem); }

/* ---------- الفصل الثاني: شاشة الكاشير ---------- */
.pos-stage {
  display: grid; gap: clamp(20px, 2.6vw, 36px);
  grid-template-columns: minmax(0, 1fr) minmax(230px, 290px);
  align-items: start;
}
.pos-drawer { grid-column: 1; }

/* خطّ الكرت لحاله ما بيكفي بالوضع الغامق على شاشة حقيقية: لون الكرت نفس لون
   الصفحة، فيختفي. فنستعمل `--line-strong` حتى يبان الكرت بذاته. */
/* ---------- نسخة طبق الأصل من لوحة الكاشير ----------
   الألوان منقولة حرفياً من static/admin.css (:root و[data-theme="dark"])
   حتى تطابق اللوحة ما يراه الكاشير فعلاً. الخطوط من خطوط الموقع:
   البرنامج يستعمل Cairo وIBM Plex، وما منجيب خطوط إضافية للموقع. */
.console {
  --c-bg: #f6f3ec; --c-surface: #ffffff; --c-surface-2: #faf8f3; --c-surface-3: #efebe1;
  --c-border: #e1dcce; --c-border-soft: #ebe7dc; --c-border-strong: #cdc6b4;
  --c-text: #1a2522; --c-muted: #5b7570; --c-faint: #7f8e89;
  --c-accent: #163832; --c-accent-hover: #102b26; --c-accent-weak: #e9efec; --c-accent-text: #163832;
  --c-rail-bg: #163832; --c-rail-bg-2: #1c443d; --c-rail-border: #2a5850;
  --c-rail-text: #c9dcd5; --c-rail-faint: #86a69d; --c-rail-accent: #0c221e;
  --c-prep-fg: #0b5a9e; --c-prep-bg: #e3effb; --c-prep-bd: #c2ddf4;
  --c-gold: #c07d10; --c-gold-bg: #fcf0da; --c-gold-bd: #f0dcb4;
  --c-ok: #1f8355;
  /* شاشة حقيقية لها ارتفاع: بدونه تنقطع أزرار النوافذ أسفل اللوحة */
  position: relative; overflow: hidden; min-height: 560px;
  display: grid; grid-template-columns: 190px minmax(0, 1fr);
  border-radius: 18px; background: var(--c-bg); color: var(--c-text);
  box-shadow: var(--shadow-2), 0 0 0 1px var(--c-border-strong);
  font-size: 13px; line-height: 1.5;
}
:root[data-theme="dark"] .console {
  --c-bg: #0d0f14; --c-surface: #14171f; --c-surface-2: #1a1e28; --c-surface-3: #232833;
  --c-border: #262b36; --c-border-soft: #1f242e; --c-border-strong: #39404f;
  --c-text: #e7e9ef; --c-muted: #99a0b0; --c-faint: #6d7484;
  --c-accent: #35514f; --c-accent-hover: #3f5f5c; --c-accent-weak: #1a2222; --c-accent-text: #bcd2d0;
  --c-rail-bg: #10403c; --c-rail-bg-2: #154e49; --c-rail-border: #1e5c56;
  --c-rail-text: #b5d4cf; --c-rail-faint: #74a49d; --c-rail-accent: #092e2b;
  --c-prep-fg: #69b3f0; --c-prep-bg: #0e2942; --c-prep-bd: #17395c;
  --c-gold: #d9982f; --c-gold-bg: #35270c; --c-gold-bd: #4d3a13;
  --c-ok: #2ba36c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .console {
    --c-bg: #0d0f14; --c-surface: #14171f; --c-surface-2: #1a1e28; --c-surface-3: #232833;
    --c-border: #262b36; --c-border-soft: #1f242e; --c-border-strong: #39404f;
    --c-text: #e7e9ef; --c-muted: #99a0b0; --c-faint: #6d7484;
    --c-accent: #35514f; --c-accent-hover: #3f5f5c; --c-accent-weak: #1a2222; --c-accent-text: #bcd2d0;
    --c-rail-bg: #10403c; --c-rail-bg-2: #154e49; --c-rail-border: #1e5c56;
    --c-rail-text: #b5d4cf; --c-rail-faint: #74a49d; --c-rail-accent: #092e2b;
    --c-prep-fg: #69b3f0; --c-prep-bg: #0e2942; --c-prep-bd: #17395c;
    --c-gold: #d9982f; --c-gold-bg: #35270c; --c-gold-bd: #4d3a13;
    --c-ok: #2ba36c;
  }
}

/* الشريط الجانبي */
.c-rail { background: linear-gradient(180deg, var(--c-rail-bg-2), var(--c-rail-bg)); color: var(--c-rail-text); padding-bottom: 10px; }
.c-brand { display: flex; align-items: center; gap: 9px; padding: 14px 13px; border-bottom: 1px solid var(--c-rail-border); }
.c-mark { width: 26px; height: 26px; flex: none; background: #ffffff;
  -webkit-mask: url("../img/serva-mark.png") center / contain no-repeat;
          mask: url("../img/serva-mark.png") center / contain no-repeat; }
.c-brand-text { display: grid; }
.c-brand-text b { font: 700 0.95rem/1.2 "Hanken Grotesk", sans-serif; letter-spacing: 0.1em; color: #fff; }
.c-brand-text i { font-style: normal; font-size: 0.68rem; color: var(--c-rail-faint); }
.c-nav { display: grid; gap: 1px; padding: 8px 7px; }
.c-sec { padding: 10px 8px 4px; font-size: 0.66rem; color: var(--c-rail-faint); }
.c-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; font-size: 0.8rem; }
.c-item.is-on { background: var(--c-rail-accent); color: #fff; font-weight: 700; }
.c-item .c-count { margin-inline-start: auto; min-width: 19px; padding: 1px 6px; border-radius: 99px;
  background: rgba(255,255,255,0.16); font: 700 0.7rem/1.5 var(--font-en); text-align: center; }
.c-shift { cursor: default; }
.c-shift.is-live { cursor: pointer; background: var(--c-rail-accent); color: #fff; font-weight: 700;
  box-shadow: 0 0 0 1.5px var(--c-gold); }
.c-shift.is-live::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c-gold);
  margin-inline-start: auto; animation: ping 1.8s var(--ease-out) infinite; }

/* المساحة الرئيسية */
.c-main { display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--c-bg); min-width: 0; }
.c-topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 15px; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.c-title h3 { font-size: 0.98rem; font-weight: 800; }
.c-title p { font-size: 0.72rem; color: var(--c-muted); margin-top: 1px; }
.c-topbar-actions { margin-inline-start: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.c-btn { padding: 5px 10px; border-radius: 8px; background: var(--c-surface-2);
  box-shadow: inset 0 0 0 1px var(--c-border); font-size: 0.72rem; color: var(--c-muted); white-space: nowrap; }
.c-btn-sound { background: var(--c-accent-weak); color: var(--c-accent-text); box-shadow: inset 0 0 0 1px var(--c-accent); }
.c-body { padding: 13px 15px 16px; display: grid; gap: 11px; align-content: start; min-width: 0; }
.c-fx { justify-self: start; padding: 4px 11px; border-radius: 99px; background: var(--c-surface);
  box-shadow: inset 0 0 0 1px var(--c-border); font: 600 0.74rem/1.6 var(--font-en); font-variant-numeric: tabular-nums; }

.c-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.c-stat { position: relative; padding: 11px 13px; border-radius: 11px; background: var(--c-surface);
  box-shadow: inset 0 0 0 1px var(--c-border); overflow: hidden; }
.c-stat::before { content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; width: 3px; background: var(--c-accent); }
.c-stat.is-free::before { background: var(--c-border-strong); }
.c-stat.is-awaiting::before { background: var(--c-gold); }
.c-stat b { display: block; font: 800 1.35rem/1.2 var(--font-en); font-variant-numeric: tabular-nums; }
.c-stat span { font-size: 0.7rem; color: var(--c-muted); }

.c-panel { border-radius: 12px; background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-border); overflow: hidden; }
.c-panel-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 11px 13px; border-bottom: 1px solid var(--c-border-soft); }
.c-panel-head h4 { font-size: 0.86rem; font-weight: 800; }
.c-pcount { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 99px;
  background: var(--c-surface-3); font: 700 0.7rem/1.6 var(--font-en); }
.c-note { margin-inline-start: auto; font-size: 0.68rem; color: var(--c-faint); }
.c-table-wrap { overflow-x: auto; }
.console table { width: 100%; border-collapse: collapse; }
.console th { padding: 8px 11px; text-align: start; font-size: 0.68rem; font-weight: 600; color: var(--c-faint);
  border-bottom: 1px solid var(--c-border-soft); white-space: nowrap; }
.console td { padding: 10px 11px; border-bottom: 1px solid var(--c-border-soft); font-size: 0.76rem; white-space: nowrap; vertical-align: middle; }
.console tbody tr:last-child td { border-bottom: 0; }
.c-empty td { padding: 22px 13px; color: var(--c-faint); text-align: center; white-space: normal; }
.c-no { font: 700 0.76rem/1 var(--font-en); color: var(--c-muted); }
.c-money { font: 700 0.8rem/1 var(--font-en); font-variant-numeric: tabular-nums; }
.c-time { font: 500 0.72rem/1 var(--font-en); color: var(--c-faint); }
.c-items { display: flex; flex-wrap: wrap; gap: 4px; white-space: normal; max-width: 22ch; }
.c-items span { padding: 2px 7px; border-radius: 6px; background: var(--c-surface-2);
  box-shadow: inset 0 0 0 1px var(--c-border-soft); font-size: 0.7rem; color: var(--c-muted); }
.c-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px;
  background: var(--c-prep-bg); color: var(--c-prep-fg); box-shadow: inset 0 0 0 1px var(--c-prep-bd);
  font-size: 0.68rem; font-weight: 700; }
.c-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.c-acts { display: flex; gap: 5px; }
.c-act { padding: 5px 11px; border: 0; border-radius: 7px; cursor: pointer; font: 700 0.72rem/1.4 inherit; white-space: nowrap; }
.c-act-settle { background: var(--c-ok); color: #fff; }
.c-act-settle:hover { filter: brightness(1.08); }
.c-act-edit { background: var(--c-surface-2); color: var(--c-muted); box-shadow: inset 0 0 0 1px var(--c-border); }
.c-act-serve { background: var(--c-gold-bg); color: var(--c-gold); box-shadow: inset 0 0 0 1px var(--c-gold-bd); }

/* النوافذ */
.c-modal { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 16px;
  background: rgba(8, 10, 14, 0.62); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.c-sheet { width: min(420px, 100%); max-height: 100%; overflow-y: auto; display: grid; gap: 11px;
  padding: 16px; border-radius: 14px; background: var(--c-surface); color: var(--c-text);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7), inset 0 0 0 1px var(--c-border-strong); }
.c-sheet h4 { font-size: 0.95rem; font-weight: 800; }
.c-center { text-align: center; }
.c-pay-toggle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.c-pay-btn { padding: 11px 6px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--c-surface-2); color: var(--c-muted); box-shadow: inset 0 0 0 1px var(--c-border);
  font: 700 0.78rem/1.3 inherit; transition: background 0.18s, color 0.18s; }
.c-pay-btn:hover { background: var(--c-surface-3); }
.c-pay-btn.is-on { background: var(--c-accent); color: #fff; box-shadow: none; }
.c-fxpay { display: grid; gap: 10px; padding: 12px; border-radius: 11px; background: var(--c-surface-2); box-shadow: inset 0 0 0 1px var(--c-border-soft); }
.c-due { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 0.76rem; color: var(--c-muted); }
.c-due strong { font: 800 1.15rem/1.2 var(--font-en); color: var(--c-text); font-variant-numeric: tabular-nums; }
/* عناصر الشبكة `min-width:auto`، وخانة الإدخال عندها عرض افتراضي ~200px،
   فكانت تدفع النافذة أعرض من جوفها وتُقَصّ الأرقام من الطرف. */
.c-sheet > *, .c-fxpay > *, .c-fx-inputs > * { min-width: 0; }
.c-fx-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.c-fx-inputs label, .c-field { display: grid; gap: 5px; font-size: 0.72rem; color: var(--c-muted); }
.c-fx-inputs input, .c-field input { width: 100%; min-width: 0; height: 42px; padding-inline: 11px; border: 0; border-radius: 9px;
  background: var(--c-surface); color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-border-strong);
  font: 700 0.95rem/1 var(--font-en); font-variant-numeric: tabular-nums; }
.c-fx-inputs input:focus-visible, .c-field input:focus-visible { box-shadow: inset 0 0 0 2px var(--c-accent); outline: none; }
.c-change { display: grid; gap: 7px; }
.c-change-amounts { font-size: 0.76rem; color: var(--c-muted); }
.c-change-amounts strong { font: 800 0.86rem/1 var(--font-en); color: var(--c-text); }
.c-change-label { font-size: 0.72rem; color: var(--c-muted); }
.c-change-toggle .c-pay-btn { padding: 8px 4px; font-size: 0.74rem; }
.c-hint { min-height: 1.3em; font-size: 0.72rem; font-weight: 600; color: var(--c-gold); }
.c-callout { padding: 10px 12px; border-radius: 10px; background: var(--c-accent-weak);
  box-shadow: inset 0 0 0 1px var(--c-accent); font-size: 0.74rem; color: var(--c-accent-text); }
.c-field-hint { margin-top: -4px; font-size: 0.7rem; color: var(--c-faint); }
.c-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 2px; }
.c-btn-ghost, .c-btn-submit { padding: 12px 10px; border: 0; border-radius: 10px; cursor: pointer; font: 700 0.82rem/1.3 inherit; }
.c-btn-ghost { background: var(--c-surface-2); color: var(--c-muted); box-shadow: inset 0 0 0 1px var(--c-border); }
.c-btn-submit { background: var(--c-accent); color: #fff; }
.c-btn-submit:hover:not([disabled]) { background: var(--c-accent-hover); }
.c-btn-submit[disabled] { opacity: 0.45; cursor: not-allowed; }

.pos-cue { margin-top: 14px; font-size: 0.92rem; color: var(--ink-3); }

/* اللوحة على الجوال: البرنامج نفسه بيحوّل الشريط الجانبي لشريط فوقاني */
@media (max-width: 760px) {
  .console { grid-template-columns: minmax(0, 1fr); font-size: 12.5px; }
  .c-rail { padding-bottom: 0; }
  .c-brand { padding: 9px 12px; }
  .c-nav { grid-auto-flow: column; grid-auto-columns: max-content; gap: 4px; padding: 6px 8px;
    overflow-x: auto; scrollbar-width: none; }
  .c-nav::-webkit-scrollbar { display: none; }
  .c-sec { display: none; }
  .c-item { padding: 7px 11px; white-space: nowrap; }
  .c-item .c-count { margin-inline-start: 0; }
  .c-title p { display: none; }
  .c-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .c-stat { padding: 9px 10px; }
  .c-stat b { font-size: 1.1rem; }
  .c-note { display: none; }
  /* الجدول يمرّ أفقياً في البرنامج نفسه، لكن زر «محاسبة» هو كل الغاية هنا،
     فنُخفي العمودين الأقل قيمة ليبقى الزر في الشاشة بلا تمرير جانبي. */
  .console th:nth-child(5), .console td:nth-child(5),
  .console th:nth-child(6), .console td:nth-child(6) { display: none; }
  .c-items { max-width: none; }
  .c-items span { white-space: nowrap; }
  .c-act { padding: 5px 9px; }
  .c-fx-inputs { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* على جوال ضيّق الأزرار الثلاثة وحدها تأكل العرض، فيخرج «محاسبة» خارج
     الشاشة ويعلق الزائر. نُبقي الإجراء الأساسي فقط، والباقي يظهر على الأوسع. */
  /* `.c-empty` خلية واحدة ممتدة، فلو أخفينا «العمود الأول» لاختفت رسالة
     الجدول الفارغ معه — نستثنيها. */
  .console thead th:first-child,
  .console tbody tr:not(.c-empty) td:first-child { display: none; }
  .c-act-edit, .c-act-serve { display: none; }
  .console th, .console td { padding-inline: 8px; }
  .c-items span { white-space: normal; }
}

/* فاتورة الزبون المطبوعة */
.ticket-pay { display: flex; justify-content: space-between; gap: 10px; padding-top: 6px; font-size: 0.86rem; }
.ticket-pay em { font: 700 0.86rem/1 var(--font-en); font-style: normal; }
.ticket-rule { margin: 8px 0 2px; border-top: 1.5px dashed #777; }
.ticket-thanks { padding-top: 10px; text-align: center; font-size: 0.78rem; }

/* إغلاق الدرج */
.drawer-result { display: grid; gap: 14px; padding: 20px; border-radius: 18px; background: var(--bg-2); }
.drawer-figures { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.drawer-figures div { display: grid; gap: 2px; }
.drawer-figures span { font-size: 0.84rem; color: var(--ink-3); }
/* الرقم داخل `.ltr`، فلولا `justify-self` لتمدّد وبدأ من الطرف المقابل للعنوان */
.drawer-figures b { justify-self: start; font: 700 1.05rem/1.3 var(--font-en); font-variant-numeric: tabular-nums; }
.drawer-verdict { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 700; }
.drawer-verdict .icon { width: 22px; height: 22px; }
.drawer-verdict.is-ok { color: var(--accent-ink); }
.drawer-verdict.is-off { color: var(--live-ink); }
.drawer-after { font-size: 0.92rem; color: var(--ink-2); max-width: 60ch; }

/* شارة الباقة الموصى بها */
.plan { position: relative; }
.plan.is-featured { box-shadow: 0 0 0 1.5px var(--accent-ink), var(--shadow-1); }
.plan-badge {
  position: absolute; top: 0; inset-inline-start: clamp(26px, 3vw, 36px); transform: translateY(-50%);
  padding: 5px 14px; border-radius: 99px; background: var(--accent); color: var(--on-accent);
  font-size: 0.78rem; font-weight: 700; white-space: nowrap;
}
.plan.is-featured h3 { margin-top: 6px; }

/* واتساب في الشريط العلوي */
.tool-wa:hover { color: var(--accent-ink); text-decoration: none; }

@media (min-width: 720px) {
  /* عمود واحد على صفحة بعرض 1200 بيترك نصّها فاضي، فنوزّعها متل باقي الأقسام.
     والخطوط تنتقل إلى الحاوية، وإلا طلعت مقطّعة تحت كل عمود. */
  .pains, .risks { border-bottom: 1px solid var(--line); }
  .pains li, .risks li { border-bottom: 0; }
  .pains { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(28px, 4vw, 64px); }
  .risks { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 80px); row-gap: 8px; }
  .pains p, .risks p { max-width: 34ch; }
}
@media (max-width: 899px) {
  .pos-stage { grid-template-columns: minmax(0, 1fr); }
  .pos-receipt .printers { max-width: 300px; }
}
@media (max-width: 719px) {
  .pains li { grid-template-columns: 1fr; }
  .pains .icon { grid-row: auto; margin-bottom: 2px; }
  .settle-foot .btn { flex: 1 1 100%; justify-content: center; }
  .drawer .btn-primary { justify-self: stretch; justify-content: center; }
}

/* ---------- صفحة التجربة (demo.html) ---------- */
.demo-page { background: var(--bg-2); }
.demo-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
  padding: 10px clamp(14px, 3vw, 28px);
  background: var(--nav-bg); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
}
.demo-back { display: inline-flex; align-items: center; gap: 8px; font-size: 0.92rem; font-weight: 600; text-decoration: none; color: var(--ink); white-space: nowrap; }
.demo-back:hover { text-decoration: none; color: var(--accent-ink); }
.demo-back .icon { width: 18px; height: 18px; }
.demo-note {
  display: flex; align-items: flex-start; gap: 8px; flex: 1 1 320px;
  font-size: 0.84rem; line-height: 1.5; color: var(--ink-2);
}
.demo-note .icon { flex: none; margin-top: 2px; width: 17px; height: 17px; color: var(--accent-ink); }
.demo-bar-tools { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }

.demo-main { padding: clamp(14px, 2.5vw, 26px) clamp(14px, 3vw, 28px) clamp(20px, 4vw, 40px); }
.demo-console {
  min-height: min(760px, calc(100vh - 150px));
  max-width: 1320px; margin-inline: auto;
}
.demo-console .c-body { overflow-y: auto; }
.c-panel-wrap { display: grid; gap: 11px; align-content: start; }
/* لقطة شاشة من البرنامج: بعرض المساحة، وبتتمرّر طولياً داخل اللوحة */
.c-shot { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--c-border); }
.demo-console .c-item { width: 100%; border: 0; cursor: pointer; font: inherit; text-align: start; color: inherit; background: transparent; }
.demo-console .c-item:hover { background: var(--c-rail-hover); }
.demo-console .c-item.is-on { background: var(--c-rail-accent); color: #fff; font-weight: 700; }

.demo-foot-bar {
  display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap;
  max-width: 1320px; margin: clamp(16px, 2.5vw, 26px) auto 0;
}
.demo-foot-note { flex: 1 1 260px; font-size: 0.92rem; color: var(--ink-2); }
.demo-foot-actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 719px) {
  .demo-note { order: 3; flex-basis: 100%; }
  .demo-bar-tools { margin-inline-start: auto; }
  .demo-console { min-height: 0; }
  .demo-console .c-body { overflow-y: visible; }
  .demo-foot-actions { width: 100%; }
  .demo-foot-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- المقاسات ---------- */
@media (max-width: 1023px) {
  .demo-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .demo-stage .stage-guest { grid-row: span 2; }
}
@media (max-width: 899px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-grid; }
  .nav .nav-cta-text { display: none; }
  .nav .btn { width: 40px; padding: 0; justify-content: center; }
  /* زر «جرّب» ما فيه أيقونة، فالكلمة لازم تضل ظاهرة */
  .nav .nav-try { width: auto; padding-inline: 14px; }
  .nav .nav-try .nav-cta-text { display: inline; }
}
/* جوال صغير: الشريط كان أعرض من الشاشة ويطلع سكرول بالعرض */
@media (max-width: 419px) {
  .nav-row { gap: 8px; }
  .nav-tools { gap: 2px; }
  .nav .tool { min-width: 36px; padding: 0 6px; }
  .nav .nav-try { padding-inline: 12px; }
}
@media (max-width: 359px) {
  .nav .wordmark { display: none; }
}
@media (max-width: 719px) {
  body { font-size: 1rem; }
  .actions .btn { flex: 1 1 100%; justify-content: center; }
  .hero .actions { max-width: 420px; margin-inline: auto; }
  .hero-visual { padding-bottom: 64px; }
  .hero-visual .phone { width: 27%; top: auto; bottom: 8px; inset-inline-end: -2px; }
  .toast { top: 7%; inset-inline-end: auto; inset-inline-start: 5%; min-width: 0; max-width: 64%; padding: 10px 12px; gap: 9px; font-size: 0.8rem; border-radius: 12px; }
  .toast span { font-size: 0.74rem; }
  .toast time { display: none; }
  .live-dot { margin-top: 5px; width: 8px; height: 8px; }
  .demo-stage { grid-template-columns: minmax(0, 1fr); }
  .demo-stage .stage-guest { grid-row: auto; }
  .guest { max-width: 320px; margin-inline: auto; }
  .guest-screen { height: 560px; }
  .order { padding: 14px 16px; }
  .tickets figure:last-child { transform: rotate(1.8deg) translateY(18px); }
  .money-stage { grid-template-columns: minmax(0, 1fr); }
  .footer .brand { margin-inline-end: 0; width: 100%; }
}
@media (min-width: 720px) {
  .pillars { grid-template-columns: repeat(3, 1fr); border-top: 0; }
  .pillar { padding: 8px clamp(24px, 3vw, 40px) 8px 0; border-bottom: 0; border-inline-start: 1px solid var(--line); padding-inline-start: clamp(24px, 3vw, 40px); }
  .pillar:first-child { border-inline-start: 0; padding-inline-start: 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 44px); }
}
@media (min-width: 900px) {
  .plans { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .feature { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .feature.is-flipped { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .feature.is-flipped .feature-copy { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .toast { opacity: 1; transform: none; }
}

@media print {
  .nav, .sheet, #demo, .cta { display: none !important; }
}
