/* 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: #ffffff;
  --bg-2: #f4f6f5;
  --bg-3: #eaefed;
  --ink: #0e1413;
  --ink-2: #46524f;
  --ink-3: #5f6b68;
  --line: #e2e7e5;
  --line-strong: #c9d2cf;
  --accent: #134e4b;
  --accent-hover: #0e3f3c;
  --accent-ink: #134e4b;
  --accent-weak: #e6efed;
  --on-accent: #ffffff;
  --ring: rgba(19, 78, 75, 0.35);
  --live: #c2540a;
  --live-weak: #fbede3;
  --live-ink: #a64808;
  --night: #0b1211;
  --night-2: #121b19;
  --night-ink: #eef4f2;
  --night-ink-2: #a3b3af;
  --logo: #134e4b;
  --nav-bg: rgba(255, 255, 255, 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: #1f6e67;
  --accent-hover: #25817a;
  --accent-ink: #7fd1c4;
  --accent-weak: #15302d;
  --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: #1f6e67; --accent-hover: #25817a; --accent-ink: #7fd1c4; --accent-weak: #15302d;
    --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; }
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(19, 78, 75, 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); 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: #0e3f3c; box-shadow: none; }
.cta .btn-primary:hover { background: #e6efed; }
.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; }

/* ---------- المقاسات ---------- */
@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; }
}
@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; }
}
