/* أرحب — نظامُ التصميمِ الواحد للضيفِ والموظّفِ والصفحةِ العامّة.
   سِمتان: «شماغ» (أبيضُ وقرمزيُّ الشماغِ بكاروهاتِه — الافتراضيّ) و«بشت» (أسودُ وذهبُ الزري).
   --accent لونُ الفعلِ والتمييز: قرمزيٌّ في الشماغ وذهبيٌّ في البشت؛ و--gold للزري وحدَه. كلُّ لونٍ رمزٌ هنا ولا لونَ بيدٍ في الصفحات. */

[data-theme="bisht"] {
  --accent: #c9a24e;
  --accent-2: #ebcd86;
  --accent-3: #8c6c2c;
  --accent-soft: rgba(201, 162, 78, 0.12);
  --accent-glow: rgba(201, 162, 78, 0.25);
  --on-accent: #191307;
  --bg: #0b0a08;
  --bg-2: #100e0b;
  --surface: #16130f;
  --surface-2: #1d1914;
  --surface-3: #27221b;
  --line: rgba(201, 162, 78, 0.16);
  --line-2: rgba(244, 238, 226, 0.07);
  --text: #f4eee2;
  --muted: #b0a48d;
  --faint: #776d5d;
  --gold: #c9a24e;
  --gold-2: #ebcd86;
  --gold-3: #8c6c2c;
  --gold-soft: rgba(201, 162, 78, 0.12);
  --red: #c42a36;
  --red-2: #e5545e;
  --red-soft: rgba(196, 42, 54, 0.14);
  --ok: #2ec4b6;
  --ok-soft: rgba(46, 196, 182, 0.13);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.13);
  --warn: #e8a33d;
  --warn-soft: rgba(232, 163, 61, 0.14);
  --violet: #a08cf0;
  --violet-soft: rgba(160, 140, 240, 0.14);
  --on-gold: #191307;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --glass: rgba(22, 19, 15, 0.78);
  --pattern-ink: rgba(201, 162, 78, 0.07);
  color-scheme: dark;
}

:root,
[data-theme="shemagh"] {
  --bg: #fbf8f5;
  --bg-2: #f4eee7;
  --surface: #ffffff;
  --surface-2: #fcf9f6;
  --surface-3: #f3ece4;
  --line: rgba(200, 16, 46, 0.14);
  --line-2: rgba(23, 17, 15, 0.08);
  --text: #17110f;
  --muted: #5d534a;
  --faint: #998e83;
  --accent: #c8102e;
  --accent-2: #c8102e;
  --accent-3: #8f0b20;
  --accent-soft: rgba(200, 16, 46, 0.075);
  --accent-glow: rgba(200, 16, 46, 0.28);
  --on-accent: #ffffff;
  --gold: #b0852c;
  --gold-2: #c9a24e;
  --gold-3: #7a5a1c;
  --gold-soft: rgba(176, 133, 44, 0.1);
  --red: #c8102e;
  --red-2: #d4223e;
  --red-soft: rgba(200, 16, 46, 0.08);
  --ok: #0f8f6e;
  --ok-soft: rgba(15, 143, 110, 0.1);
  --info: #0b6fb8;
  --info-soft: rgba(11, 111, 184, 0.09);
  --warn: #b86400;
  --warn-soft: rgba(184, 100, 0, 0.1);
  --violet: #6a52c9;
  --violet-soft: rgba(106, 82, 201, 0.1);
  --on-gold: #ffffff;
  --shadow: 0 16px 40px rgba(110, 20, 30, 0.12);
  --shadow-sm: 0 4px 14px rgba(110, 20, 30, 0.08);
  --glass: rgba(255, 255, 255, 0.86);
  --pattern-ink: rgba(200, 16, 46, 0.08);
  color-scheme: light;
}

:root {
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Reem Kufi", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  /* نقشةُ الشماغ: مربّعاتٌ وصلبانٌ صغيرةٌ تتكرّر */
  --shemagh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cg fill='%23c42a36'%3E%3Crect x='6' y='0' width='4' height='4'/%3E%3Crect x='6' y='12' width='4' height='4'/%3E%3Crect x='0' y='6' width='4' height='4'/%3E%3Crect x='12' y='6' width='4' height='4'/%3E%3Crect x='7' y='7' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-2); text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.gold { color: var(--accent-2); }
.red { color: var(--red-2); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.display { font-family: var(--display); letter-spacing: 0.01em; }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: var(--s2); }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: var(--s3); }
.grow { flex: 1; min-width: 0; }
.ico { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 18px; height: 18px; }
.ico.lg { width: 28px; height: 28px; }
.ico.xl { width: 36px; height: 36px; }

/* زيُّ الزري: خطٌّ ذهبيٌّ رفيعٌ يحدُّ البطاقاتِ الرئيسيّة */
.zari { position: relative; }
.zari::before {
  content: "";
  position: absolute;
  inset-inline: 18px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 18%, var(--gold-2) 50%, var(--gold) 82%, transparent);
  opacity: 0.8;
}
.band {
  height: 6px;
  background-color: var(--surface);
  background-image: var(--shemagh);
  background-size: 8px 8px;
  opacity: 0.9;
}
[data-theme="bisht"] .band { filter: saturate(0.9); }
.pattern-bg { position: relative; isolation: isolate; }
.pattern-bg::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: var(--shemagh); background-size: 22px 22px; opacity: 0.06;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%); }

/* ── الأزرار ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-weight: 600;
  transition: transform 0.18s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, var(--accent-3));
  color: var(--on-accent);
  border-color: transparent;
  box-shadow: 0 8px 22px var(--accent-glow);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.red { background: var(--red); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.btn.xs { min-height: 30px; padding: 0 10px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; white-space: normal; text-align: center; line-height: 1.3; padding-block: 8px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
}
.icon-btn:hover { border-color: var(--accent); }

/* ── البطاقات ─────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: var(--s4);
}
.card.pad-lg { padding: var(--s6); }
.card.flat { background: var(--surface-2); }
.card.hero {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(201, 162, 78, 0.18), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(196, 42, 54, 0.12), transparent 60%),
    var(--surface);
  border-color: var(--line);
}
.card h3, .card h2 { margin: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: var(--s6) 0 var(--s3); }
.section-title h2 { font-family: var(--display); font-size: 19px; margin: 0; font-weight: 600; }
.section-title .link { font-size: 14px; color: var(--accent-2); background: none; border: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--muted);
  white-space: nowrap;
}
.chip.gold { background: var(--accent-soft); color: var(--accent-2); }
.chip.red { background: var(--red-soft); color: var(--red-2); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.violet { background: var(--violet-soft); color: var(--violet); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}

/* ── الحقول ─────────────────────────────── */
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  outline: none;
  transition: border-color 0.2s;
}
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { border-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 1 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow-sm); }
.qty { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-2); border-radius: 12px; padding: 3px; }
.qty button { width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--surface-3); display: grid; place-items: center; }
.qty b { min-width: 22px; text-align: center; }
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  text-align: start;
  width: 100%;
}
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt .grow small { display: block; color: var(--muted); font-size: 13px; }

/* ── الضيف: الهيكل ─────────────────────────── */
.g-app { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.g-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line-2);
}
.g-top .brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.g-top .brand img { width: 34px; height: 34px; }
.g-top .brand b { font-family: var(--display); font-size: 17px; display: block; line-height: 1.2; }
.g-top .brand small { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-main { padding: 16px; }
.page-in { animation: pageIn 0.38s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.g-nav {
  position: fixed;
  z-index: 30;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  pointer-events: none;
}
.g-nav nav {
  pointer-events: auto;
  width: 100%;
  max-width: 536px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  padding: 6px;
  border-radius: 24px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.g-nav a {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 7px 2px 6px;
  border-radius: 16px;
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 600;
  position: relative;
  transition: color 0.2s;
}
.g-nav a.on { color: var(--accent-2); }
.g-nav a.on::after { content: ""; position: absolute; bottom: 1px; width: 18px; height: 3px; border-radius: 3px; background: var(--accent); }
.g-nav a .badge { position: absolute; top: 2px; inset-inline-end: 22%; }
.g-nav a.ai .orb {
  width: 54px;
  height: 54px;
  margin-top: -26px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: var(--on-accent);
  background: linear-gradient(140deg, var(--accent-2), var(--accent) 50%, var(--accent-3));
  box-shadow: 0 10px 26px rgba(201, 162, 78, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: rotate(45deg);
}
.g-nav a.ai .orb svg { transform: rotate(-45deg); }
.g-nav a.ai.on::after { display: none; }

/* الصفحةُ الرئيسة */
.hello { display: flex; align-items: flex-start; gap: 12px; }
.hello h1 { font-family: var(--display); font-size: 25px; line-height: 1.25; margin: 0; font-weight: 600; }
.hello p { margin: 4px 0 0; color: var(--muted); }
.stay-ring { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 88px; height: 88px; flex: none; }
.ring svg { width: 88px; height: 88px; transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring .lbl b { font-size: 22px; font-family: var(--display); }
.ring .lbl small { font-size: 11px; color: var(--muted); }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.kv div { background: var(--surface-2); border-radius: 13px; padding: 9px 10px; border: 1px solid var(--line-2); }
.kv small { display: block; color: var(--muted); font-size: 11.5px; }
.kv b { font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding: 14px 4px 12px;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  transition: transform 0.2s var(--spring), border-color 0.2s;
}
.tile:hover { border-color: var(--accent); }
.tile:active { transform: scale(0.95); }
.tile .ti {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-2);
}
.tile.red .ti { background: var(--red-soft); color: var(--red-2); }
.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
.sugg { width: 248px; display: grid; gap: 8px; }
.sugg .kicker { font-size: 12px; color: var(--accent-2); font-weight: 700; letter-spacing: 0.02em; display: flex; gap: 6px; align-items: center; }
.sugg b { font-size: 15.5px; line-height: 1.35; }
.sugg p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* التتبّع */
.track { display: grid; gap: 10px; }
.trk {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  text-align: start;
  width: 100%;
}
.trk.late { border-color: rgba(232, 163, 61, 0.45); }
.trk .head { display: flex; align-items: center; gap: 12px; }
.trk .ti { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); flex: none; }
.trk .head b { display: block; font-size: 15px; line-height: 1.3; }
.trk .head small { color: var(--muted); font-size: 13px; }
.trk .eta { text-align: end; flex: none; }
.trk .eta b { font-size: 17px; font-family: var(--display); color: var(--accent-2); }
.trk .eta small { display: block; font-size: 11px; color: var(--muted); }
.bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-3), var(--accent-2)); transition: width 0.6s var(--ease); }
[dir="rtl"] .bar i { margin-inline-start: auto; background: linear-gradient(270deg, var(--accent-3), var(--accent-2)); }
.bar.live i { background-size: 200% 100%; animation: flow 2.4s linear infinite; background-image: linear-gradient(90deg, var(--accent-3), var(--accent-2), var(--accent-3)); }
@keyframes flow { to { background-position: -200% 0; } }
.steps { display: flex; gap: 4px; }
.steps span { flex: 1; height: 5px; border-radius: 4px; background: var(--surface-3); }
.steps span.done { background: var(--accent); }
.steps span.now { background: linear-gradient(90deg, var(--accent), var(--accent-2)); animation: pulse 1.6s infinite; }
.steps-lbl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); }
.steps-lbl .on { color: var(--accent-2); font-weight: 700; }
.timeline { display: grid; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding-bottom: 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 10px; top: 18px; bottom: 0; width: 2px; background: var(--surface-3); }
.timeline li:last-child::before { display: none; }
.timeline .pt { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--faint); }
.timeline li.done .pt { background: var(--accent); color: var(--on-accent); }
.timeline li.now .pt { background: var(--accent-2); color: var(--on-accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline time { color: var(--muted); font-size: 13px; }

/* القوائم */
.list { display: grid; gap: 1px; background: var(--line-2); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-2); }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--surface); text-align: start; width: 100%; border: 0; }
button.li:hover { background: var(--surface-2); }
.li .ti { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--accent-2); flex: none; }
.li b { display: block; font-size: 15px; line-height: 1.35; }
.li small { color: var(--muted); font-size: 13px; display: block; }
.li .end { margin-inline-start: auto; text-align: end; flex: none; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.price small { font-weight: 500; color: var(--muted); font-size: 12px; }

/* القائمة */
.menu-item { display: flex; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); }
.menu-item .art {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--accent-2);
  background: radial-gradient(circle at 30% 25%, var(--accent-soft), transparent 70%), var(--surface-3);
}
.menu-item b { font-size: 15.5px; display: block; line-height: 1.35; }
.menu-item p { margin: 3px 0 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.cartbar {
  position: fixed;
  z-index: 25;
  inset-inline: 12px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  max-width: 536px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  border-radius: 20px;
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow);
  animation: pageIn 0.3s var(--ease);
}
[dir="rtl"] .cartbar { padding: 10px 16px 10px 10px; }
.cartbar b { font-size: 15px; }

/* الورقةُ السفليّة */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.55); animation: fade 0.25s; backdrop-filter: blur(2px); }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed;
  z-index: 61;
  inset-inline: 0;
  bottom: 0;
  max-width: 560px;
  margin: 0 auto;
  max-height: 88dvh;
  overflow: auto;
  border-radius: 26px 26px 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  animation: up 0.38s var(--ease);
  box-shadow: var(--shadow);
}
.sheet .grab { width: 44px; height: 5px; border-radius: 5px; background: var(--surface-3); margin: 0 auto 12px; }
.sheet h3 { font-family: var(--display); font-size: 20px; margin: 0 0 4px; font-weight: 600; }
.sheet .sub { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
@keyframes up { from { transform: translateY(100%); } }
.toast {
  position: fixed;
  z-index: 80;
  top: calc(14px + env(safe-area-inset-top));
  inset-inline: 16px;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: var(--shadow);
  animation: drop 0.35s var(--spring);
}
@keyframes drop { from { transform: translateY(-140%); } }

/* المرشد */
.chat { display: grid; gap: 10px; padding-bottom: 150px; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 20px; line-height: 1.6; font-size: 15px; white-space: pre-wrap; word-wrap: break-word; }
.msg.me { justify-self: end; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--on-accent); border-end-end-radius: 6px; }
.msg.ai { justify-self: start; background: var(--surface); border: 1px solid var(--line-2); border-end-start-radius: 6px; }
.msg.ai .who { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--accent-2); font-weight: 700; margin-bottom: 4px; }
.acts { display: grid; gap: 8px; margin-top: 10px; }
.act-card { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.act-card b { font-size: 14px; display: block; line-height: 1.35; }
.act-card small { color: var(--muted); font-size: 12.5px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
.composer {
  position: fixed;
  z-index: 25;
  inset-inline: 0;
  bottom: calc(86px + env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 12px;
}
.composer .chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.composer .chips::-webkit-scrollbar { display: none; }
.composer .chips button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; color: var(--text); }
.composer form { display: flex; gap: 8px; padding: 6px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.composer input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 12px; outline: none; font-size: 16px; }

/* ── الموظّف: الهيكل ─────────────────────────── */
.s-app { display: grid; grid-template-columns: 252px 1fr; min-height: 100dvh; }
.s-side {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: auto;
  padding: 18px 14px;
  background: var(--bg-2);
  border-inline-end: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.s-side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.s-side .brand img { width: 40px; height: 40px; }
.s-side .brand b { font-family: var(--display); font-size: 21px; letter-spacing: 0.02em; display: block; line-height: 1.1; }
.s-side .brand small { color: var(--muted); font-size: 11.5px; }
.s-side .grp { font-size: 11.5px; color: var(--faint); font-weight: 700; padding: 14px 10px 6px; letter-spacing: 0.04em; }
.s-side a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14.5px;
}
.s-side a:hover { background: var(--surface); color: var(--text); }
.s-side a.on { background: var(--accent-soft); color: var(--accent-2); box-shadow: inset 3px 0 0 var(--accent); }
[dir="rtl"] .s-side a.on { box-shadow: inset -3px 0 0 var(--accent); }
.s-side a .badge { margin-inline-start: auto; }
.s-side .me { margin-top: auto; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); display: grid; gap: 8px; }
.s-main { min-width: 0; }
.s-top {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-2);
}
.s-top h1 { font-family: var(--display); font-size: 22px; margin: 0; font-weight: 600; }
.s-top .clock { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
.s-body { padding: 22px 24px 60px; display: grid; gap: 18px; }
.menu-btn { display: none; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); display: grid; gap: 4px; position: relative; overflow: hidden; }
.kpi small { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi b { font-size: 30px; font-family: var(--display); line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12.5px; color: var(--faint); }
.kpi.accent { background: radial-gradient(120% 120% at 100% 0%, rgba(201, 162, 78, 0.2), transparent 60%), var(--surface); border-color: var(--line); }
.kpi .spark { position: absolute; inset-inline-end: 10px; bottom: 10px; width: 90px; height: 30px; opacity: 0.85; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.panel { background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; padding: 18px; min-width: 0; }
.panel > header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel > header h3 { margin: 0; font-size: 16px; font-weight: 700; }
.panel > header .chip { margin-inline-start: auto; }
.panel > header small { color: var(--muted); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: start; font-weight: 600; color: var(--faint); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--surface-2); }
.scroll-x { overflow-x: auto; }
.empty { padding: 26px 10px; text-align: center; color: var(--faint); display: grid; justify-items: center; gap: 8px; }
.empty .ico { width: 34px; height: 34px; opacity: 0.6; }

/* لوحةُ الغرف */
.legend { display: flex; flex-wrap: wrap; gap: 8px; }
.legend button { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 999px; padding: 5px 11px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.legend button.on { border-color: var(--accent); color: var(--text); }
.floor { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: center; }
.floor > b { color: var(--faint); font-size: 13px; text-align: center; }
.rooms { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.room {
  position: relative;
  min-height: 74px;
  border-radius: 14px;
  padding: 8px 9px;
  text-align: start;
  border: 1px solid transparent;
  background: var(--surface-2);
  display: grid;
  align-content: space-between;
  transition: transform 0.18s var(--spring), box-shadow 0.2s;
}
.room:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.room b { font-size: 15px; font-variant-numeric: tabular-nums; }
.room small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room .flags { position: absolute; top: 7px; inset-inline-end: 7px; display: flex; gap: 3px; }
.room .flags i { width: 7px; height: 7px; border-radius: 50%; }
.st-vc { background: var(--ok-soft); border-color: rgba(46, 196, 182, 0.35); }
.st-ins { background: var(--info-soft); border-color: rgba(56, 189, 248, 0.35); }
.st-vd { background: var(--warn-soft); border-color: rgba(232, 163, 61, 0.4); }
.st-oc { background: var(--accent-soft); border-color: rgba(201, 162, 78, 0.35); }
.st-od { background: var(--red-soft); border-color: rgba(196, 42, 54, 0.4); }
.st-cl { background: var(--violet-soft); border-color: rgba(160, 140, 240, 0.4); }
.st-ooo { background: repeating-linear-gradient(135deg, var(--surface-3) 0 6px, var(--surface-2) 6px 12px); border-color: var(--line-2); opacity: 0.8; }
.c-vc { color: var(--ok); } .c-ins { color: var(--info); } .c-vd { color: var(--warn); } .c-oc { color: var(--accent-2); }
.c-od { color: var(--red-2); } .c-cl { color: var(--violet); } .c-ooo { color: var(--faint); }

/* الكانبان */
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lane { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 18px; padding: 12px; display: grid; gap: 10px; align-content: start; min-height: 200px; }
.lane > header { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.ticket { padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); display: grid; gap: 8px; animation: pageIn 0.3s var(--ease); }
.ticket.late { border-color: rgba(232, 163, 61, 0.5); box-shadow: inset 3px 0 0 var(--warn); }
[dir="rtl"] .ticket.late { box-shadow: inset -3px 0 0 var(--warn); }
.ticket .top { display: flex; align-items: center; gap: 8px; }
.ticket .top b { font-size: 16px; font-variant-numeric: tabular-nums; }
.ticket ul { margin: 0; padding-inline-start: 18px; font-size: 13.5px; color: var(--muted); }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; }

/* الرسوم */
.chart { display: block; max-width: 100%; height: auto; overflow: visible; }
.chartbox { width: 100%; min-width: 0; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid line { stroke: var(--line-2); }
.chart .bar-g rect:hover, .chart .hit:hover { filter: brightness(1.25); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.chart-legend span { display: inline-flex; gap: 6px; align-items: center; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-wrap svg { width: 150px; flex: none; }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; font-size: 10.5px; color: var(--faint); align-items: center; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--accent); }
.gauge { display: grid; justify-items: center; }
.gauge svg { width: 100%; max-width: 230px; }

/* الدخول */
.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(60% 60% at 50% 0%, rgba(201, 162, 78, 0.16), transparent 70%),
    var(--bg);
}
.gate .card { width: min(420px, 100%); display: grid; gap: 14px; justify-items: center; text-align: center; padding: 30px 26px; }
.gate .card img { width: 74px; }
.gate .card > * { max-width: 100%; min-width: 0; }
.gate h1 { font-family: var(--display); margin: 0; font-size: 26px; font-weight: 600; }
.gate .input { text-align: center; letter-spacing: 0.12em; font-size: 18px; }

/* الصفحةُ العامّة */
.l-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 14px clamp(16px, 4vw, 48px); background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line-2); }
.l-nav .brand { display: flex; align-items: center; gap: 10px; }
.l-nav .brand img { width: 38px; }
.l-nav .brand b { font-family: var(--display); font-size: 22px; letter-spacing: 0.03em; }
.l-nav nav { display: flex; gap: 22px; margin-inline-start: auto; font-weight: 600; font-size: 15px; }
.l-nav nav a { color: var(--muted); }
.l-nav nav a:hover { color: var(--text); }
.l-hero {
  position: relative;
  padding: clamp(48px, 9vw, 110px) clamp(16px, 5vw, 64px) 60px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
}
.l-hero h1 { font-family: var(--display); font-size: clamp(38px, 6vw, 70px); line-height: 1.08; margin: 0 0 18px; font-weight: 700; }
.l-hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--accent-2), var(--accent) 60%, var(--red-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.l-hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 560px; margin: 0 0 26px; }
.meaning { display: inline-flex; gap: 10px; align-items: center; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--muted); margin-bottom: 18px; }
[dir="rtl"] .meaning { padding: 6px 6px 6px 14px; }
.meaning b { color: var(--accent-2); font-family: var(--display); padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); }
.phone {
  justify-self: center;
  width: min(340px, 86vw);
  aspect-ratio: 9 / 18.5;
  border-radius: 44px;
  padding: 12px;
  background: linear-gradient(160deg, #2a241b, #0b0a08);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(201, 162, 78, 0.3);
  position: relative;
}
.phone .scr { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: var(--bg); display: grid; align-content: start; gap: 10px; padding: 18px 14px; }
.features { max-width: 1240px; margin: 0 auto; padding: 30px clamp(16px, 5vw, 64px) 70px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature { padding: 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line-2); display: grid; gap: 10px; align-content: start; }
.feature .ti { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.feature h3 { margin: 0; font-size: 19px; font-family: var(--display); font-weight: 600; }
.feature p { margin: 0; color: var(--muted); }
.l-sec { max-width: 1240px; margin: 0 auto; padding: 40px clamp(16px, 5vw, 64px); }
.l-sec h2 { font-family: var(--display); font-size: clamp(28px, 4vw, 42px); margin: 0 0 10px; font-weight: 600; }
.l-qr { justify-items: center; text-align: center; border-color: var(--line); }
.qr-box { background: #fff; padding: 12px; border-radius: 16px; width: max-content; line-height: 0; }
.qr-box img, .qr-box canvas { width: 168px; height: 168px; }
.l-foot { border-top: 1px solid var(--line-2); padding: 28px clamp(16px, 5vw, 64px); color: var(--faint); font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* QR للطباعة */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.qr-card { background: #fff; color: #111; border-radius: 18px; padding: 16px; display: grid; justify-items: center; gap: 8px; text-align: center; border: 1px solid #e8dfd0; }
.qr-card .qrc { line-height: 0; }
.qr-card .qrc canvas, .qr-card .qrc img { width: 160px; height: 160px; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .qr-card { break-inside: avoid; border-color: #d9cdb6; }
  .qr-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .l-sec { padding: 0; max-width: none; }
  .pattern-bg::before, .band { display: none; }
}

/* ── الاستجابة ─────────────────────────── */
@media (max-width: 1100px) {
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rooms { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .s-app { grid-template-columns: 1fr; }
  .s-side { position: fixed; z-index: 50; inset-block: 0; inset-inline-start: 0; width: 270px; transform: translateX(-105%); transition: transform 0.3s var(--ease); box-shadow: var(--shadow); }
  [dir="rtl"] .s-side { transform: translateX(105%); }
  .s-side.open { transform: none !important; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.55); }
  .menu-btn { display: grid; }
  .g2, .g21, .g12, .g3, .lanes { grid-template-columns: 1fr; }
  .s-body { padding: 16px 14px 60px; }
  .s-top { padding: 10px 14px; gap: 10px; }
  .s-top h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .s-top .clock { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; border-radius: 14px; }
  .kpi b { font-size: 24px; }
  .kpi .spark { width: 64px; height: 24px; }
  .l-hero { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .l-nav nav { display: none; }
}
@media (max-width: 420px) {
  .tiles { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .tile { font-size: 11.5px; padding: 12px 2px 10px; }
  .tile .ti { width: 42px; height: 42px; }
  .rooms { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kv { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}


/* ══ أرحب: لمسةُ الشماغ ══════════════════════════════════════════
   البطاقةُ البطلةُ قرمزيّةٌ بكاروهاتٍ بيضاءَ خافتة، وكلُّ ما فيها أبيضُ — تُعادُ تسميةُ الرموزِ داخلَها فلا يُكتَبُ لونٌ مرّتين. */
:root { --shemagh-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cg fill='%23fff'%3E%3Crect x='0' y='0' width='6' height='6'/%3E%3Crect x='6' y='6' width='6' height='6'/%3E%3C/g%3E%3C/svg%3E"); }
.card.hero { position: relative; overflow: hidden; }
[data-theme="shemagh"] .card.hero {
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.16), transparent 50%), linear-gradient(140deg, #c8102e, #8f0b20 62%, #5c0714);
  border-color: transparent;
  box-shadow: 0 18px 44px rgba(143, 11, 32, 0.3);
  --text: #ffffff; --muted: rgba(255, 255, 255, 0.82); --faint: rgba(255, 255, 255, 0.62);
  --surface: rgba(255, 255, 255, 0.1); --surface-2: rgba(255, 255, 255, 0.12); --surface-3: rgba(255, 255, 255, 0.2);
  --line: rgba(255, 255, 255, 0.24); --line-2: rgba(255, 255, 255, 0.18);
  --accent: #ffffff; --accent-2: #ffffff; --accent-3: #ffe3e7; --accent-soft: rgba(255, 255, 255, 0.16); --on-accent: #8f0b20; --accent-glow: rgba(0, 0, 0, 0.18);
  color: var(--text);
}
[data-theme="shemagh"] .card.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background-image: var(--shemagh-w); background-size: 12px 12px; transform: rotate(0deg); opacity: 0.06;
  -webkit-mask-image: linear-gradient(200deg, #000, transparent 70%); mask-image: linear-gradient(200deg, #000, transparent 70%);
}
[data-theme="shemagh"] .card.hero > * { position: relative; z-index: 1; }
[data-theme="shemagh"] .band { height: 9px; background-color: #fff; background-image: var(--shemagh); background-size: 9px 9px; opacity: 1; box-shadow: inset 0 -1px 0 rgba(200, 16, 46, 0.25); }
[data-theme="shemagh"] .btn.primary { background: linear-gradient(135deg, #e0283f, #c8102e 55%, #8f0b20); }
.brandmark { display: inline-grid; place-items: center; }
.brandmark img { filter: drop-shadow(0 6px 12px rgba(90, 10, 20, 0.22)); }

/* ── الحركة: ما يأتي يدخلُ وما يُقرَأُ يتلوّن — ولا حركةَ لمن طلبَ السكون ── */
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.msg.new { animation: msgIn 0.32s var(--ease) both; }
.ticks { display: inline-flex; align-items: center; gap: 0; margin-inline-start: 6px; vertical-align: -3px; color: currentColor; opacity: 0.7; }
.ticks svg { width: 16px; height: 16px; }
.ticks.two svg + svg { margin-inline-start: -10px; }
.ticks.read { color: #4fc3f7; opacity: 1; }
[data-theme="shemagh"] .msg.me .ticks.read { color: #ffe08a; }
.ticks.pop svg:last-child { animation: popIn 0.28s var(--spring) both; }
.typing i { animation: blink 1.1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
.who .role { font-weight: 400; opacity: 0.75; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent-2); flex: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; animation: pulseRing 1.8s infinite; }
.sla { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; font-weight: 600; }
.sla .ring { width: 30px; height: 30px; }
.sla .ring circle { fill: none; stroke-width: 3.4; }
.sla .ring .bg { stroke: var(--surface-3); }
.sla .ring .fg { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset 0.6s var(--ease); }
.sla.warn .ring .fg { stroke: var(--warn); }
.sla.late .ring .fg { stroke: var(--red); }
.sla.late { color: var(--red); }
.otp { letter-spacing: 0.6em; text-align: center; font-size: 26px; font-weight: 700; direction: ltr; padding-inline-start: 0.6em; }
.demo-note { border: 1px dashed var(--warn); background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 8px 12px; font-size: 13px; }
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.dev { display: grid; gap: 12px; }
.dev .head { display: flex; align-items: center; gap: 10px; }
.dev .state { font-weight: 700; font-variant-numeric: tabular-nums; }
.dev.on .ti { background: var(--accent); color: var(--on-accent); }
.dial { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dial b { font-size: 34px; font-family: var(--display); font-variant-numeric: tabular-nums; }
.switch { position: relative; width: 48px; height: 28px; border-radius: 20px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background 0.2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); transition: inset-inline-start 0.22s var(--spring); }
.switch.on { background: var(--accent); border-color: transparent; }
.switch.on::after { inset-inline-start: 23px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.meal { display: grid; gap: 8px; }
.meal .badge-inc { background: var(--ok-soft); color: var(--ok); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.shift-bar { position: relative; height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.shift-bar i { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 6px; opacity: 0.85; }
.shift-bar i.live { background: var(--ok); }
.team-card { display: grid; gap: 10px; }
.log-row td { font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  .msg.new, .ticks.pop svg:last-child, .typing i, .live-dot { animation: none !important; }
}

.chips.wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 999px; padding: 6px 12px; font-size: 13px; min-height: 34px; transition: background 0.18s, color 0.18s, transform 0.15s; }
.chip-btn:active { transform: scale(0.96); }
.chip-btn.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.msg .meta { display: flex; align-items: center; justify-content: flex-end; gap: 2px; font-size: 11px; opacity: 0.78; margin-top: 4px; }
.msg.ai .meta { justify-content: flex-start; }
.msg.ai .who img { width: 20px; height: 20px; }
.welcome .card { max-width: 430px; width: 100%; display: grid; gap: 12px; }
.welcome .field { width: 100%; }
.hotel-logo { margin: 0 auto; }
.powered { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--faint); font-size: 12px; margin-top: 4px; }
/* صفحةُ الترحيب: رأسٌ قرمزيٌّ بنقشِ الشماغ تنهضُ فوقَه بطاقةُ الفندق */
[data-theme="shemagh"] .gate.welcome { position: relative; isolation: isolate; align-content: start; padding-top: clamp(64px, 12vh, 112px); background: var(--bg); }
[data-theme="shemagh"] .gate.welcome::before,
[data-theme="shemagh"] .gate.welcome::after { content: ""; position: absolute; inset: 0 0 auto 0; height: clamp(240px, 36vh, 320px); z-index: -1; border-radius: 0 0 40px 40px; }
[data-theme="shemagh"] .gate.welcome::before { background: radial-gradient(120% 90% at 80% 0%, #e0193a, transparent 60%), linear-gradient(165deg, #c8102e, #8f0b20); }
[data-theme="shemagh"] .gate.welcome::after { background-image: var(--shemagh-w); background-size: 14px 14px; opacity: 0.13;
  -webkit-mask-image: linear-gradient(#000 30%, transparent); mask-image: linear-gradient(#000 30%, transparent); }
[data-theme="shemagh"] .gate.welcome .card { box-shadow: 0 30px 70px -30px rgba(143, 11, 32, 0.55), 0 2px 0 rgba(255, 255, 255, 0.6) inset; animation: popIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@media (prefers-reduced-motion: reduce) { [data-theme="shemagh"] .gate.welcome .card { animation: none; } }
/* أرحب: قماشُ شماغٍ مصوَّرٌ (طيّاتٌ وعمقُ ميدان) بدلَ النقشِ المرسوم — shemagh.jpg من تصييرِ Blender */
[data-theme="shemagh"] .band { height: 12px; background: url("shemagh-strip.jpg") center / auto 100% repeat-x; opacity: 1; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08); }
[data-theme="shemagh"] .card.hero { background: linear-gradient(160deg, rgba(150, 8, 28, 0.78), rgba(70, 3, 14, 0.9)), url("shemagh.jpg") center 40% / cover; }
[data-theme="shemagh"] .card.hero::after { display: none; }
[data-theme="shemagh"] .gate.welcome::before { background: linear-gradient(180deg, rgba(120, 6, 24, 0.15), rgba(90, 4, 16, 0.5)), url("shemagh.jpg") center 45% / cover; }
[data-theme="shemagh"] .gate.welcome::after { display: none; }
.brand img, .hotel-logo + .powered img, .powered img { object-fit: contain; }
/* الأيقونةُ القرمزيّةُ للأحجامِ الصغيرة، والنخلةُ المجسَّمةُ للكبيرة */
img.app-icon { border-radius: 24%; box-shadow: 0 2px 6px rgba(90, 4, 16, 0.25); object-fit: cover; }
.l-emblem { display: block; width: clamp(150px, 17vw, 230px); height: auto; margin: 0 0 8px; filter: drop-shadow(0 26px 30px rgba(110, 6, 22, 0.28)); animation: popIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@media (prefers-reduced-motion: reduce) { .l-emblem { animation: none; } }
.gate .card .powered img, .powered img { width: 22px; height: 22px; flex: none; }

/* تذييلُ الاستقبال (مسار 2956): روابطُ الخصوصيّةِ والشروطِ والتواصل، ولونٌ يجتازُ تباينَ WCAG AA على الشماغ */
.l-foot { color: var(--muted); }
.l-foot b { color: var(--text); }
.l-foot a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.l-legal { display: flex; gap: 14px; flex-wrap: wrap; }
