/* =========================================================
   شُرفة — تطبيق المستخدم (زائر · شريك · منظم)
   نفس ألوان الهوية، وطريقة عرض التطبيق: شاشات + شريط تنقل سفلي
   ========================================================= */
:root {
  --green: #1A2E28; --green-2: #24403A; --purple: #7B5BA7; --purple-soft: #EEE8F5;
  --gold: #F5A623; --gold-soft: #FDF0D9; --gold-ink: #7A4F00;
  --teal: #2CA6A4; --teal-ink: #1E7C7A; --teal-soft: #DDF2F1;
  --brick: #E4573D; --brick-soft: #FBE6E1;
  --cream: #FAF6F0; --sand: #E7E0D6; --sand-2: #F1ECE4; --card: #fff; --ink: #1A2E28; --muted: #5C6B66;
  --ok: #1F7F6E; --ok-soft: #DDEFEB; --err: #C43A22; --err-soft: #F9E1DC; --warn: #8A5A00; --warn-soft: #FDF0D9;
  --head: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font: "IBM Plex Sans Arabic", "Geeza Pro", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --tabbar-h: 68px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #E9E3D9; color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.6; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-ink); }
h1, h2, h3 { margin: 0; line-height: 1.3; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

/* إطار التطبيق: ملء الشاشة في الجوال، وعمود بعرض الجوال في الكمبيوتر */
.shell { position: relative; max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: var(--cream); display: flex; flex-direction: column; box-shadow: 0 0 40px rgba(26,46,40,.08); }
.screen { flex: 1; padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom, 0px)); }
.screen.no-tabs { padding-bottom: 32px; }

/* رأس الشاشة */
.phead { display: flex; align-items: center; gap: 8px; padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 12px; }
.phead h2 { font-family: var(--head); font-size: 20px; flex: 1; }
.iconbtn { width: 44px; height: 44px; border-radius: 22px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.iconbtn.ring { border: 1px solid var(--sand); background: #fff; }
.avatar { width: 44px; height: 44px; border-radius: 22px; background: var(--green); color: var(--cream); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; border: 0; flex: none; }
.avatar.lg { width: 58px; height: 58px; border-radius: 29px; font-size: 22px; }

.pad { padding: 0 18px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.sp { height: 18px; }
.sub { font-size: 12.5px; color: var(--muted); }
.muted { color: var(--muted); }
.sec-t { font-family: var(--head); font-size: 16px; font-weight: 700; }
.card { background: var(--card); border-radius: 18px; padding: 16px; box-shadow: 0 1px 2px rgba(26,46,40,.06); }
.card.flat { box-shadow: none; border: 1px solid var(--sand); }
button.card { border: 0; width: 100%; text-align: right; }

.btn { min-height: 50px; border-radius: 14px; font-weight: 700; font-size: 16px; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 0 16px; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: progress; }
.btn-cta { background: var(--brick); color: #fff; }
.btn-dark { background: var(--green); color: var(--cream); }
.btn-line { background: transparent; border: 1.5px solid var(--green); color: var(--green); }
.btn-soft { background: var(--sand-2); color: var(--ink); }
.btn-danger { background: transparent; border: 1.5px solid rgba(196,58,34,.4); color: var(--err); }
.btn-sm { min-height: 40px; font-size: 14px; border-radius: 11px; width: auto; }
.linkbtn { background: none; border: 0; color: var(--teal-ink); font-weight: 600; font-size: 13.5px; padding: 8px 4px; min-height: 40px; }

.st { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.st-ok { background: var(--ok-soft); color: var(--ok); } .st-warn { background: var(--warn-soft); color: var(--warn); }
.st-err { background: var(--err-soft); color: var(--err); } .st-mute { background: var(--sand-2); color: var(--muted); }
.st-teal { background: var(--teal-soft); color: var(--teal-ink); } .st-purple { background: var(--purple-soft); color: var(--purple); }
.st-glass { background: rgba(255,255,255,.18); color: #fff; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--sand); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 9px; min-height: 40px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 700; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field > label { font-size: 13.5px; font-weight: 700; }
.input { height: 50px; border-radius: 12px; border: 1px solid #D6CDBF; background: #fff; padding: 0 14px; font-size: 16px; width: 100%; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(245,166,35,.18); }
.input.code { text-align: center; letter-spacing: .4em; font-size: 24px; font-weight: 700; direction: ltr; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green); flex: none; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 12px; border: 1px solid var(--sand); border-radius: 14px; background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.opt:has(input:checked) { border: 2px solid var(--green); }
.opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }

.msg { padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.msg.err { background: var(--err-soft); color: var(--err); }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.msg.info { background: var(--gold-soft); color: var(--gold-ink); }

.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--sand-2); }
.li:last-child { border-bottom: 0; }
.menu-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; background: #fff; border: 0; border-bottom: 1px solid var(--sand-2); padding: 0 16px; text-align: right; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink); }
.menu-btn:last-child { border-bottom: 0; }
.menu-btn.danger { color: var(--err); }
.ico-tile { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--sand-2); }
.hscroll { display: flex; gap: 12px; overflow-x: auto; padding: 4px 18px 8px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex: none; scroll-snap-align: start; }
.empty { text-align: center; padding: 26px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.prog { height: 8px; border-radius: 4px; background: var(--sand-2); overflow: hidden; }
.prog > i { display: block; height: 100%; border-radius: 4px; background: var(--purple); }
.kpis3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpis3 > div { background: #fff; border-radius: 14px; padding: 12px 8px; text-align: center; box-shadow: 0 1px 2px rgba(26,46,40,.06); }
.kpis3 b { display: block; font-size: 24px; font-family: var(--head); }
.kpis3 span { font-size: 12px; color: var(--muted); }
.skel { background: linear-gradient(90deg, var(--sand-2), #fff, var(--sand-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 14px; min-height: 70px; }
@keyframes sk { to { background-position: -200% 0; } }

/* شريط التنقل السفلي */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 20; background: #fff; border-top: 1px solid var(--sand); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px)); }
.tabbar button { border: 0; background: none; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.tabbar button[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tabbar button[data-tab="work"][aria-current="page"] { color: var(--teal-ink); }

/* البطاقة الرئيسية للفعالية */
.hero { margin: 0 18px; border-radius: 24px; color: #fff; padding: 20px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; background: var(--green); }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .28; }
.hero > *:not(.bg) { position: relative; }
.hero h3 { font-family: var(--head); font-size: 26px; line-height: 1.25; }
.hero .meta { font-size: 13px; opacity: .92; display: flex; flex-direction: column; gap: 4px; }
.hero .logo { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: #fff; }

/* الجواز */
.pp-cover { margin: 0 18px; border-radius: 24px; background: linear-gradient(150deg, var(--purple), #5F4486); color: #fff; padding: 20px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; }
.pp-cover .qr { background: #fff; border-radius: 16px; padding: 10px; align-self: center; line-height: 0; }
.pp-cover .qr img, .pp-cover .qr canvas { width: 190px !important; height: 190px !important; }
.pp-code { text-align: center; font-family: ui-monospace, Menlo, monospace; font-size: 24px; letter-spacing: .25em; font-weight: 700; direction: ltr; }
.pp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; background: rgba(255,255,255,.14); border-radius: 14px; padding: 10px 6px; }
.pp-stats b { display: block; font-size: 20px; font-family: var(--head); }
.pp-stats span { font-size: 11.5px; opacity: .9; }

.loyalty { background: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 1px 2px rgba(26,46,40,.06); }
.loyalty-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.loyalty-head b { font-family: var(--head); font-size: 16px; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed #D6CDBF; color: #B3A998; font-size: 13px; font-weight: 700; }
.slot.on { border: 3px double var(--purple); background: rgba(123,91,167,.08); color: var(--purple); }
.slot.reward { width: auto; min-width: 44px; padding: 0 12px; border-radius: 14px; border: 1.5px solid rgba(245,166,35,.6); color: var(--ink); font-size: 12px; }
.slot.reward.on { background: var(--gold); border-color: var(--gold); }
.slot.reward.next { box-shadow: 0 0 0 4px rgba(245,166,35,.25); }
.loyalty-next { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

/* بطاقات الخدمات والفعاليات */
.svc { width: 230px; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 1px 3px rgba(26,46,40,.08); display: flex; flex-direction: column; text-decoration: none; color: var(--ink); border: 0; padding: 0; text-align: right; }
.svc .art { height: 92px; display: flex; align-items: center; justify-content: center; color: #fff; }
.svc .b { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.evc { width: 260px; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 1px 3px rgba(26,46,40,.08); display: flex; flex-direction: column; border: 0; padding: 0; text-align: right; color: var(--ink); }
.evc.full { width: 100%; }
.evc .img { height: 130px; background-size: cover; background-position: center; position: relative; }
.evc .img .st { position: absolute; top: 10px; right: 10px; }
.evc .b { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* واجهة الشريك */
.ohead { background: var(--green); color: var(--cream); padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.ohead h2 { font-family: var(--head); font-size: 20px; }
.ohead select { background: rgba(250,246,240,.12); color: var(--cream); border: 1px solid rgba(250,246,240,.3); border-radius: 12px; height: 44px; padding: 0 12px; }
.ohead select option { color: var(--ink); }
.otile { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 14px 16px; border: 0; border-radius: 18px; text-align: right; background: var(--green); color: var(--cream); }
#reader { width: 100%; border-radius: 20px; overflow: hidden; background: #0E1A16; min-height: 60px; }
#reader video { border-radius: 20px; }
.result { border-radius: 20px; padding: 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.result .big { width: 60px; height: 60px; border-radius: 30px; display: flex; align-items: center; justify-content: center; color: #fff; }
.result h3 { font-family: var(--head); font-size: 22px; }
.r-ok { background: var(--ok-soft); } .r-ok .big { background: var(--ok); } .r-ok h3 { color: var(--ok); }
.r-gold { background: var(--gold-soft); } .r-gold .big { background: var(--gold); color: var(--ink); } .r-gold h3 { color: var(--gold-ink); }
.r-err { background: var(--err-soft); } .r-err .big { background: var(--err); } .r-err h3 { color: var(--err); }
.r-warn { background: var(--warn-soft); } .r-warn .big { background: #B07400; } .r-warn h3 { color: var(--warn); }
.manual { display: flex; gap: 8px; }
.manual .input { letter-spacing: .15em; text-transform: uppercase; direction: ltr; text-align: center; }

/* شاشة الدخول */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.auth-top { background: var(--green); color: var(--cream); padding: calc(36px + env(safe-area-inset-top, 0px)) 22px 34px; border-radius: 0 0 32px 32px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.auth-top img { width: 58px; height: 58px; }
.auth-top h1 { font-family: var(--head); font-size: 26px; }
.auth-top p { opacity: .85; font-size: 14.5px; }
.auth-body { padding: 22px 18px 32px; display: flex; flex-direction: column; gap: 14px; }

.toast { position: fixed; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; z-index: 50; padding: 11px 18px; border-radius: 12px; background: var(--green); color: var(--cream); font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); text-align: center; transition: all .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--err); } .toast.ok { background: var(--ok); }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } .toast { transition: none; } }

/* شريط شعارات الشركاء */
.rail { overflow-x: auto; scrollbar-width: none; padding: 10px 0 6px; cursor: grab; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.rail.drag { cursor: grabbing; }
.rail-track { display: flex; gap: 12px; width: max-content; padding: 0 18px; }
.rail-item { width: 92px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: #fff; border-radius: 18px; padding: 12px 6px 10px; box-shadow: 0 1px 3px rgba(26,46,40,.08); user-select: none; -webkit-user-select: none; }
.rail-item img { pointer-events: none; -webkit-user-drag: none; }
.rail-item span:last-child { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; }
select.input { appearance: auto; }

.ohead .seg button { color: rgba(250,246,240,.85); }
.ohead .seg button[aria-pressed="true"] { color: var(--ink); }

/* شاشة «من أنت؟» */
.who-card { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 86px; padding: 16px; border: 0; border-radius: 20px; color: #fff; text-align: right; box-shadow: 0 6px 18px rgba(26,46,40,.14); }
.who-card b { display: block; font-family: var(--head); font-size: 19px; }
.who-card b small { font-size: 13px; font-weight: 600; opacity: .85; font-family: var(--font); }
.who-card .grow > span { display: block; font-size: 13.5px; opacity: .92; margin-top: 2px; }
.who-card:active { transform: scale(.99); }

/* =========================================================
   التصميم المتجاوب (Mobile-First)
   نقاط التوقف: 480 · 768 · 1024 · 1280
   ========================================================= */
html { font-size: 100%; }
img, video, svg { max-width: 100%; height: auto; }
.tabbar { display: none !important; }                 /* التنقل في الشريط العلوي */
.shell { max-width: none; box-shadow: none; background: var(--cream); min-height: calc(100dvh - 3.75rem); }
body { background: var(--cream); }
.screen { width: 100%; max-width: 75rem; margin-inline: auto; padding-bottom: 2.5rem; }
.toast { bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); }
.phead { padding-top: 1rem; }
.ohead { padding-top: 1.1rem; border-radius: 0 0 1.5rem 1.5rem; }

/* الشريط العلوي */
.appbar { position: sticky; top: 0; z-index: 30; background: rgba(250, 246, 240, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--sand); padding-top: env(safe-area-inset-top, 0px); }
.appbar-in { width: 100%; max-width: 75rem; margin-inline: auto; display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem; min-height: 3.75rem; }
.appbar-brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; margin-inline-end: auto; }
.appbar-brand img { width: 2rem; height: 2rem; }
.appbar-nav { display: none; }
.appbar-menu { width: 2.75rem; height: 2.75rem; border-radius: .875rem; border: 1px solid var(--sand); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.drawer { display: grid; gap: .25rem; padding: .5rem 1rem 1rem; border-top: 1px solid var(--sand); background: var(--cream); max-height: calc(100dvh - 4rem); overflow-y: auto; }
.drawer[hidden] { display: none; }
.drawer button { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 3.25rem; padding: 0 1rem; border: 0; border-radius: .875rem; background: transparent; font-size: 1rem; font-weight: 600; color: var(--ink); text-align: right; }
.drawer button[aria-current="page"] { background: #fff; box-shadow: 0 1px 2px rgba(26,46,40,.08); }
.drawer .drawer-cta { background: var(--green); color: var(--cream); margin-top: .25rem; }

/* شرائح اختيار الفعالية (الإدارة) */
.chips { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .1rem; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 1px solid rgba(250,246,240,.35); background: transparent; color: var(--cream); border-radius: 999px; padding: .45rem .9rem; font-size: .85rem; font-weight: 600; }
.chips button[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.grid2 { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.media-box { display: flex; align-items: center; justify-content: center; width: 100%; border: 1.5px dashed #CFC5B6; border-radius: 1rem; overflow: hidden; background: #fff; cursor: pointer; }

/* شاشات الدخول: عمود مركزي */
.auth-screen .auth-body { width: 100%; max-width: 32rem; margin-inline: auto; }
.auth-top > * { width: 100%; max-width: 32rem; margin-inline: auto; }

/* ≥ 480px: هواتف كبيرة */
@media (min-width: 480px) {
  .pad { padding-inline: 1.5rem; }
  .hero, .pp-cover { margin-inline: 1.5rem; }
  .hscroll { padding-inline: 1.5rem; }
  .grid2 { grid-template-columns: 1fr 1fr; }
}

/* ≥ 768px: آيباد */
@media (min-width: 768px) {
  html { font-size: 106.25%; }
  .pad { padding-inline: 2rem; }
  .hero, .pp-cover { margin-inline: 2rem; }
  .hscroll:not(.rail) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; padding-inline: 2rem; }
  .hscroll:not(.rail) > * { width: auto; }
  .hero { min-height: 18rem; padding: 2rem; }
  .hero h3 { font-size: 2.25rem; }
  .kpis3 { gap: 1rem; }
  .wrap-md, .stack#ppBody { max-width: 46rem; margin-inline: auto; width: 100%; }
  .ohead { padding-inline: 2rem; }
  .who-card { min-height: 6rem; }
  #reader { max-width: 30rem; margin-inline: auto; }
}

/* ≥ 1024px: لابتوب — قائمة كاملة بدل القائمة المنسدلة */
@media (min-width: 1024px) {
  .appbar-nav { display: flex; gap: .25rem; }
  .appbar-nav button { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; padding: 0 .9rem; border: 0; border-radius: .75rem; background: transparent; font-size: .95rem; font-weight: 600; color: var(--muted); }
  .appbar-nav button[aria-current="page"] { background: var(--green); color: var(--cream); }
  .appbar-menu, .drawer { display: none !important; }
  .hscroll:not(.rail) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { margin-top: 1rem; }
  .ohead { border-radius: 1.5rem; margin: 1rem 2rem 0; }
  /* الجواز: الغلاف بجانب البطاقات */
  .screen.pass-layout { display: grid; grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); gap: 0 1.5rem; align-items: start; }
  .screen.pass-layout > .phead { grid-column: 1 / -1; }
  .screen.pass-layout > .pp-cover { grid-column: 1; position: sticky; top: 5rem; }
  .screen.pass-layout > :not(.phead):not(.pp-cover) { grid-column: 2; }
}

/* ≥ 1280px: شاشات كبيرة */
@media (min-width: 1280px) {
  .hscroll:not(.rail) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .appbar-in { padding-inline: 2rem; }
}

/* بطاقات خدمات الفعالية — أيقونات الهوية + خلفية تمثل كل خدمة */
.bico { width: 1em; height: 1em; display: block; color: currentColor; }
.svc { width: 15rem; transition: transform .2s ease, box-shadow .2s ease; }
.svc:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(26,46,40,.14); }
.svc .svc-art { display: block; position: relative; height: 9.5rem; overflow: hidden; isolation: isolate;
  background-image: linear-gradient(150deg, color-mix(in srgb, var(--c1) 88%, transparent), color-mix(in srgb, var(--c2) 94%, transparent)), var(--photo, none);
  background-color: var(--c2); background-size: cover; background-position: center; }
.svc-pattern { position: absolute; inset: 0; background: url("../assets/img/brand/pattern.png") center / 14rem repeat; opacity: .12; mix-blend-mode: screen; z-index: 0; }
.svc-art::after { content: ""; position: absolute; width: 12rem; height: 12rem; border-radius: 50%; inset-inline-start: -3rem; bottom: -6rem; background: rgba(255,255,255,.12); z-index: 0; }
.svc-main { position: absolute; z-index: 2; inset-inline-start: 1rem; bottom: 1rem; width: 4.25rem; height: 4.25rem; border-radius: 1.25rem; display: grid; place-items: center;
  background: rgba(255,255,255,.96); color: var(--c2); font-size: 2.6rem; --ia: var(--c1); box-shadow: 0 8px 18px rgba(0,0,0,.18); }
.svc-deco { position: absolute; z-index: 1; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; --ia: #FFD27A; backdrop-filter: blur(2px); }
.svc-deco.d1 { width: 3rem; height: 3rem; font-size: 1.6rem; inset-inline-end: 1rem; top: 1rem; transform: rotate(-10deg); }
.svc-deco.d2 { width: 2.4rem; height: 2.4rem; font-size: 1.25rem; inset-inline-end: 4.4rem; top: 3.6rem; transform: rotate(8deg); }
.svc-deco.d3 { width: 2rem; height: 2rem; font-size: 1.05rem; inset-inline-end: 1.6rem; top: 5.4rem; }
.svc-badge { position: absolute; z-index: 2; inset-inline-start: 1rem; top: 1rem; background: var(--gold); color: var(--ink); font-size: .78rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.svc-cta { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 700;
  background: color-mix(in srgb, var(--c1) 12%, #fff); color: color-mix(in srgb, var(--c1) 80%, #000); }
@media (prefers-reduced-motion: reduce) { .svc, .svc:hover { transition: none; transform: none; } }
@media (min-width: 768px) { .svc .svc-art { height: 11rem; } }

/* ---------- نافذة النتيجة (المسح والإشعارات الفورية) ---------- */
.ovl { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(14, 26, 22, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: ovlIn .18s ease-out; }
.ovl-card { position: relative; overflow: hidden; width: 100%; max-width: 26rem; border-radius: 24px; padding: 1.75rem 1.25rem 1.25rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); animation: ovlPop .28s cubic-bezier(.2, .9, .3, 1.3); }
.ovl-card .big { width: 76px; height: 76px; border-radius: 38px; display: flex; align-items: center; justify-content: center; color: #fff; }
.ovl-card h3 { font-family: var(--head); font-size: 1.45rem; line-height: 1.35; }
.ovl-body { font-size: 1rem; line-height: 1.8; color: var(--ink); }
.ovl-acts { display: flex; flex-direction: column; align-items: center; gap: .4rem; width: 100%; }
.ovl-acts .btn { width: 100%; }
.ovl-card > .btn { width: 100%; margin-top: .25rem; }
.ovl-logo { display: flex; justify-content: center; }
.ovl-logo > * { border-radius: 18px !important; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); }
.ovl-bar { position: absolute; bottom: 0; right: 0; height: 4px; width: 100%; background: currentColor; opacity: .35; transform-origin: right; animation: ovlBar linear forwards; }
.r-ok .ovl-bar { color: var(--ok); } .r-gold .ovl-bar { color: var(--gold-ink); } .r-warn .ovl-bar { color: var(--warn); } .r-err .ovl-bar { color: var(--err); }
.r-wait { background: var(--cream, #FAF6F0); } .r-wait .big { background: var(--green, #1A2E28); }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3.5px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: spin .8s linear infinite; }
#scanBtn.on { background: var(--err); }
@keyframes ovlIn { from { opacity: 0; } }
@keyframes ovlPop { from { transform: scale(.85); opacity: 0; } }
@keyframes ovlBar { to { transform: scaleX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ovl, .ovl-card { animation: none; } .spin { animation-duration: 2s; } }

/* ---------- خدمات الفعالية (صفحة الفعالية) + سوار الأمان ---------- */
.feat-grid { display: grid; gap: .75rem; }
@media (min-width: 768px) { .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feat { display: flex; align-items: center; gap: .85rem; text-align: right; padding: .9rem 1rem; border-radius: 18px; background: #fff; border: 1.5px solid color-mix(in srgb, var(--c1) 35%, transparent); box-shadow: 0 2px 10px rgba(26,46,40,.06); width: 100%; transition: transform .15s ease; }
.feat:hover { transform: translateY(-2px); }
.feat b { display: block; font-size: 1rem; }
.feat .sub { display: block; line-height: 1.6; }
.feat-ico { flex: none; width: 3.25rem; height: 3.25rem; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.6rem; --ia: #FAF6F0;
  background: linear-gradient(150deg, var(--c1), var(--c2, var(--c1))); }
.soon-hero { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1.25rem; border-radius: 22px; color: #fff;
  background: linear-gradient(150deg, var(--c1), var(--c2, color-mix(in srgb, var(--c1) 55%, #000))); }
.soon-hero .feat-ico { background: rgba(255,255,255,.18); width: 3.75rem; height: 3.75rem; font-size: 1.9rem; }
.soon-hero b { font-family: var(--head); font-size: 1.35rem; }
.ico-tile .bico, .menu-btn .bico, .card .bico { width: 20px; height: 20px; }
.ico-tile .bico { --ia: currentColor; }
.r-alert { background: #FFF1EC; border: 2px solid var(--err); } .r-alert .big { background: var(--err); animation: ring 1s ease-in-out infinite; } .r-alert h3 { color: var(--err); }
@keyframes ring { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .r-alert .big { animation: none; } }
.ovl-card .big .bico { width: 40px; height: 40px; --ia: rgba(255,255,255,.75); }

/* ---------- تذاكر الألعاب ---------- */
.games-grid { display: grid; gap: .9rem; }
@media (min-width: 768px) { .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.game { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 2px 12px rgba(26,46,40,.07); }
.game-img { position: relative; aspect-ratio: 16/9; background: linear-gradient(150deg, #F5A623, #9A5B00) center/cover; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 3.2rem; --ia: #FAF6F0; }
.game-img .st { position: absolute; top: 10px; right: 10px; font-size: 12px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--sand); border-radius: 14px; overflow: hidden; flex: none; }
.qty button { width: 42px; height: 42px; font: 700 20px var(--font); color: var(--ink); background: var(--sand-2); }
.qty b { min-width: 34px; text-align: center; font-size: 17px; }
.tqr { flex: none; width: 120px; height: 120px; padding: 4px; background: #fff; border-radius: 12px; }
.tqr img, .tqr canvas { width: 100% !important; height: 100% !important; }
.ticket.used { opacity: .65; }
.ticket.pending_payment { border: 1.5px solid var(--gold); }

/* ---------- عروض الجواز: خصم + باقات / تذكرة لعبة (019) ---------- */
.deal{display:flex;flex-direction:column;gap:8px;background:var(--cream,#FAF6F0);border:1.5px solid var(--line,#E7E0D3);border-radius:16px;padding:12px 14px}
.deal-head{display:flex;align-items:center;gap:12px}
.deal-pct{flex:none;min-width:58px;height:58px;border-radius:16px;background:var(--gold-soft,#FFF1D6);color:var(--gold-ink,#7A4A00);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:20px;direction:ltr}
.deal-pct.deal-tk svg{width:28px;height:28px}
.deal-pkg{display:flex;flex-direction:column;gap:4px;background:#fff;border:1px dashed var(--line,#E7E0D3);border-radius:12px;padding:10px 12px}
.deal-price{display:flex;flex-direction:column;align-items:flex-end;line-height:1.3;white-space:nowrap}
.deal-price s,.deal-row s{color:var(--mute,#7A8580);font-size:12.5px}
.deal-price b{font-size:15px}
.deal-row{display:flex;align-items:center;gap:8px;justify-content:space-between}
.pool-ex{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.pool-ex>div{background:#fff;border-radius:12px;padding:8px;text-align:center;display:flex;flex-direction:column;gap:2px}
.pool-ex span{font-size:11.5px;color:var(--mute,#7A8580)}
.pool-ex b{font-size:14px}
.pool-ex small{font-size:11px;color:var(--mute,#7A8580)}
.offer-list{display:flex;flex-direction:column;gap:12px}
.offer-item{display:flex;flex-direction:column;gap:10px}
.offer-item.is-used{opacity:.7}
.choice-chips{display:flex;flex-wrap:wrap;gap:6px}
.choice-chips button{border:1.5px solid var(--line,#E7E0D3);background:#fff;border-radius:999px;padding:6px 12px;font:inherit;font-size:13px;cursor:pointer}
.choice-chips button[aria-pressed=true]{background:var(--ink,#1A2E28);color:#fff;border-color:var(--ink,#1A2E28)}
.ihead{display:flex;align-items:center;gap:6px}
.ihead svg{flex:none;width:18px;height:18px}

/* ---------- باقات شُرفة + قراءة الجواز عند الكشك (020) ---------- */
.chip-list{display:flex;flex-wrap:wrap;gap:6px}
.chip-list span{background:#fff;border:1px solid var(--line,#E7E0D3);border-radius:999px;padding:4px 10px;font-size:12.5px;font-weight:600}
.stepper{display:inline-flex;align-items:center;gap:8px;flex:none}
.stepper button{width:34px;height:34px;border-radius:10px;border:1.5px solid var(--line,#E7E0D3);background:#fff;font:inherit;font-size:18px;font-weight:700;cursor:pointer;color:var(--ink)}
.stepper button:disabled{opacity:.35;cursor:default}
.stepper b{min-width:18px;text-align:center}
.pk-total{position:sticky;bottom:calc(env(safe-area-inset-bottom,0px) + 76px);display:flex;align-items:center;gap:12px;background:var(--ink,#1A2E28);color:#fff;border-radius:18px;padding:12px 14px;box-shadow:0 10px 30px rgba(0,0,0,.18);z-index:3}
.pk-total .sub{color:rgba(255,255,255,.75)}
.lk-list{display:flex;flex-direction:column;gap:8px;text-align:start;margin-top:6px}
.lk-h{font-size:12.5px;font-weight:700;color:var(--mute,#7A8580);margin-top:4px}
.lk-row{display:flex;align-items:center;gap:10px;width:100%;background:#fff;border:1.5px solid var(--line,#E7E0D3);border-radius:14px;padding:10px 12px;font:inherit;color:var(--ink);text-align:start;cursor:pointer}
.lk-row:disabled{opacity:.5}
.lk-row.is-done{background:transparent;border-style:dashed;color:var(--mute,#7A8580);cursor:default}
/* ---------- تذاكر ألعاب الشركاء: خصم سعر شُرفة (022) ---------- */
.game-img{position:relative}
.game-off{position:absolute;top:10px;left:10px;background:var(--err,#C7432B);color:#fff;font-weight:800;font-size:13px;padding:5px 10px;border-radius:999px;box-shadow:0 4px 12px rgba(0,0,0,.18)}
.tqr-lock{flex:none;width:120px;height:120px;border-radius:14px;border:2px dashed var(--line,#E7E0D3);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;padding:10px;color:var(--mute,#7A8580);font-size:12.5px;font-weight:600;background:var(--cream,#FAF6F0)}

/* ---------- صورة المشروع في نموذج الشريك (إلزامي) ---------- */
.logo-drop{display:flex;align-items:center;gap:14px;padding:14px;border:2px dashed var(--gold,#F5A623);border-radius:16px;background:var(--gold-soft,#FFF1D6);cursor:pointer}
.logo-drop.has-img{border-style:solid;border-color:var(--ok,#2E8B57);background:var(--ok-soft,#E7F5EC)}
.logo-drop.is-missing{border-color:var(--err,#C7432B);background:#FDECE8;animation:shake .35s}
.logo-drop-img{flex:none;width:88px;height:88px;border-radius:20px;background:#fff;display:flex;align-items:center;justify-content:center;color:var(--gold-ink,#7A4A00);overflow:hidden}
.logo-drop-btn{align-self:flex-start;pointer-events:none}
.req{display:inline-block;font-size:11px;font-weight:800;color:#fff;background:var(--err,#C7432B);border-radius:999px;padding:2px 8px;vertical-align:middle}
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
