@font-face{font-family:'IBM Plex Sans Arabic';src:url('/fonts/IBMPlexSansArabic-Regular.ttf') format('truetype');font-weight:400;font-display:swap}@font-face{font-family:'IBM Plex Sans Arabic';src:url('/fonts/IBMPlexSansArabic-Medium.ttf') format('truetype');font-weight:500;font-display:swap}
@font-face{font-family:'Noto Sans Arabic';src:url('/fonts/NotoSansArabic.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}
/* مشوار v2 — hand-coded design system */
:root, [data-theme="a"] {
  --font: 'IBM Plex Sans Arabic', Arial, sans-serif;
  --teal: #0f766e; --teal-dark: #0b5f56; --teal-deep: #083f3a; --teal-soft: #d9efec;
  --amber: #d97706; --amber-bright: #f59e0b; --amber-soft: #fdeccd; --fee-text: #92600a;
  --ink: #17211f; --ink2: #5b6663; --ink3: #96a19e;
  --line: #e9e6e2; --bg: #f3f1ee; --card: #ffffff;
  --red: #dc2626; --red-soft: #fde4e4;
  --green: #16a34a; --green-soft: #e2f5e8;
  --shadow: 0 1px 2px rgba(23,33,31,.05), 0 8px 24px -12px rgba(23,33,31,.18);
  --shadow-lg: 0 2px 4px rgba(23,33,31,.06), 0 16px 40px -16px rgba(23,33,31,.28);
  --r: 18px;
}
/* theme D — light, airy, modern global-app look: white/soft-gray, black buttons, gold accents */
[data-theme="d"] {
  --font: 'IBM Plex Sans Arabic', Arial, sans-serif;
  --teal: #1c1913; --teal-dark: #14110d; --teal-deep: #14110d; --teal-soft: #f1ede4;
  --amber: #b8860b; --amber-bright: #d9a521; --amber-soft: #fbf3dc; --fee-text: #8a6809;
  --ink: #171512; --ink2: #6f6a5e; --ink3: #a9a396;
  --line: #eceadf; --bg: #f7f6f2; --card: #ffffff;
  --red: #dc2626; --red-soft: #fee9e7;
  --green: #15803d; --green-soft: #e5f4e9;
  --shadow: 0 1px 2px rgba(23,21,18,.04), 0 10px 30px -16px rgba(23,21,18,.14);
  --shadow-lg: 0 2px 6px rgba(23,21,18,.05), 0 18px 44px -18px rgba(23,21,18,.22);
  --r: 16px;
}
[data-theme="d"] .topbar {
  background: var(--card); color: var(--ink);
  box-shadow: 0 6px 24px -14px rgba(23,21,18,.18);
}
[data-theme="d"] .appname { color: var(--ink); }
[data-theme="d"] .hello { color: var(--ink2); opacity: 1; }
[data-theme="d"] .logout { color: var(--ink2); border-color: var(--line); opacity: 1; }
[data-theme="d"] .logout:active { background: var(--bg); }
[data-theme="d"] .stat { background: var(--bg); border: 1px solid var(--line); backdrop-filter: none; }
[data-theme="d"] .stat b { color: var(--ink); }
[data-theme="d"] .stat span { color: var(--ink2); opacity: 1; }
[data-theme="d"] .banner.b1 { background: linear-gradient(135deg, #fbf3dc, #f3e3b0); color: var(--ink); }
[data-theme="d"] .banner.b2 { background: linear-gradient(135deg, #171512, #3d3423); }
[data-theme="d"] .banner.b1 span { opacity: .7; }
[data-theme="d"] .chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
[data-theme="d"] .auth-logo .name { color: var(--ink); }
[data-theme="d"] .role-opt.on { border-color: var(--ink); background: var(--bg); color: var(--ink); }
[data-theme="d"] .navbar { background: rgba(255,255,255,.96); }
[data-theme="d"] .navbar button.on { color: var(--ink); }

/* geo + light extras (all themes) */
.sel {
  width: 100%; border: 1.5px solid var(--line); border-radius: 13px;
  padding: 12px 14px; font-size: 15px; background: #fbfaf9; color: var(--ink);
  outline: none; font-family: inherit;
}
.locbar {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--card); border-radius: 14px; padding: 12px 16px;
  box-shadow: var(--shadow); margin-bottom: 12px; font-size: 14px;
}
.locbar b { font-size: 14.5px; }
.locbar .locedit { margin-inline-start: auto; color: var(--amber); font-weight: 800; font-size: 12.5px; }

/* theme C — elegant: ivory, charcoal black, gold. Almarai */
[data-theme="c"] {
  --font: 'IBM Plex Sans Arabic', Arial, sans-serif;
  --teal: #2b251e; --teal-dark: #201c16; --teal-deep: #14110d; --teal-soft: #efe9dc;
  --amber: #a8801f; --amber-bright: #d4af37; --amber-soft: #f5ecd2; --fee-text: #7d5f13;
  --ink: #1c1913; --ink2: #6b6457; --ink3: #a89e8d;
  --line: #e7e0d2; --bg: #f6f3ec; --card: #fffdf8;
  --red: #b91c1c; --red-soft: #fbe4e0;
  --green: #15803d; --green-soft: #e6f4e8;
  --shadow: 0 1px 2px rgba(28,25,19,.05), 0 10px 28px -14px rgba(28,25,19,.22);
  --shadow-lg: 0 2px 4px rgba(28,25,19,.06), 0 18px 44px -16px rgba(28,25,19,.32);
  --r: 16px;
}
/* theme B — crisp European: cool white, deep blue + vivid orange, sharp corners, Tajawal */
[data-theme="b"] {
  --font: 'IBM Plex Sans Arabic', Arial, sans-serif;
  --teal: #1d4ed8; --teal-dark: #1e3a8a; --teal-deep: #172554; --teal-soft: #dbeafe;
  --amber: #ea580c; --amber-bright: #f97316; --amber-soft: #ffedd5; --fee-text: #9a3412;
  --ink: #0f172a; --ink2: #64748b; --ink3: #94a3b8;
  --line: #e5e7eb; --bg: #f6f7f9; --card: #ffffff;
  --red: #dc2626; --red-soft: #fee2e2;
  --green: #16a34a; --green-soft: #dcfce7;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 6px 20px -10px rgba(15,23,42,.14);
  --shadow-lg: 0 2px 4px rgba(15,23,42,.05), 0 14px 34px -14px rgba(15,23,42,.22);
  --r: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg); color: var(--ink);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea { font-family: inherit; }
a.plain { color: var(--teal); font-weight: 700; text-decoration: none; }

.shell { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.content { flex: 1; padding: 18px 16px 96px; }

/* ---------- top bar ---------- */
.topbar {
  background: linear-gradient(160deg, var(--teal-deep), var(--teal-dark) 55%, var(--teal));
  color: #fff; padding: 20px 18px 26px;
  border-radius: 0 0 28px 28px;
  position: sticky; top: 0; z-index: 30;
  box-shadow: 0 10px 30px -14px rgba(8,63,58,.55);
}
.who { display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.appname { font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.hello { font-size: 13px; opacity: .85; margin-top: 1px; }
.logout { font-size: 12.5px; font-weight: 700; color: #fff; opacity: .9; border: 1.5px solid rgba(255,255,255,.4); padding: 6px 14px; border-radius: 99px; transition: background .15s; }
.logout:active { background: rgba(255,255,255,.15); }

.stats { display: flex; gap: 10px; margin-top: 16px; }
.stat {
  flex: 1; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px; padding: 10px 6px 12px; text-align: center;
  backdrop-filter: blur(4px);
}
.stat b { display: block; font-size: 18px; font-weight: 800; }
.stat span { font-size: 11.5px; opacity: .85; }

/* ---------- cards ---------- */
.card, .order {
  background: var(--card); border-radius: var(--r); padding: 18px;
  box-shadow: var(--shadow); margin-bottom: 14px;
  animation: rise .35s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.section-title { font-size: 17px; font-weight: 800; margin: 6px 2px 12px; display: flex; align-items: center; gap: 8px; }
.section-title .hint { font-size: 12px; font-weight: 600; color: var(--ink3); }

/* ---------- order card ---------- */
.order .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.order .title { font-weight: 800; font-size: 16px; }
.order .code { font-size: 12px; color: var(--ink2); margin-top: 3px; }
.pill { font-size: 11.5px; font-weight: 800; padding: 5px 12px; border-radius: 99px; white-space: nowrap; }
.pill.open { background: var(--amber-soft); color: var(--amber); }
.pill.live { background: var(--teal-soft); color: var(--teal); }
.pill.done { background: var(--green-soft); color: var(--green); }
.pill.cancelled { background: var(--red-soft); color: var(--red); }
.pill.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(217,119,6,.35); } 50% { box-shadow: 0 0 0 6px rgba(217,119,6,0); } }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13.5px; }
.kv span:first-child { color: var(--ink2); flex-shrink: 0; }
.kv span:last-child { text-align: left; font-weight: 600; }
.kv .total { font-weight: 800; }
.kv .fee { font-weight: 800; color: var(--amber); }

.bigfee {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #ffffff, var(--amber-soft));
  border: 1.5px dashed var(--amber-bright); border-radius: 14px;
  padding: 12px 16px; margin: 12px 0 4px;
}
.bigfee .lbl { font-size: 12.5px; font-weight: 700; color: var(--fee-text); }
.bigfee .amt { font-size: 22px; font-weight: 800; color: var(--amber); }

/* ---------- steps timeline ---------- */
.steps { display: flex; margin-top: 14px; position: relative; }
.steps::before { content: ''; position: absolute; top: 5px; right: 12px; left: 12px; height: 2px; background: var(--line); }
.step { flex: 1; position: relative; text-align: center; font-size: 9.5px; color: var(--ink3); font-weight: 700; line-height: 1.5; }
.step::before {
  content: ''; display: block; width: 12px; height: 12px; border-radius: 50%;
  background: var(--line); margin: 0 auto 5px; position: relative; z-index: 1;
  border: 2.5px solid var(--card);
}
.step.done::before { background: var(--teal); }
.step.cur { color: var(--teal); }
.step.cur::before { background: var(--amber-bright); box-shadow: 0 0 0 4px rgba(245,158,11,.25); }

/* ---------- offers ---------- */
.offers-head { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1.5px dashed var(--line); }
.offers-head b { font-size: 14px; }
.offers-head .cnt { background: var(--amber); color: #fff; font-size: 11px; font-weight: 800; border-radius: 99px; padding: 2px 10px; }
.offer-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--line); animation: rise .3s both;
}
.offer-row:last-child { border-bottom: 0; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff; font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.offer-mid { flex: 1; min-width: 0; }
.offer-name { font-weight: 800; font-size: 14px; }
.offer-note { font-size: 12px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offer-price { font-weight: 800; font-size: 17px; color: var(--amber); white-space: nowrap; }
.offer-new { font-size: 10px; font-weight: 800; color: var(--green); }
.no-offers { text-align: center; color: var(--ink3); font-size: 13px; font-weight: 600; padding: 14px 0 6px; }

/* ---------- forms ---------- */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink2); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 13px;
  padding: 12px 14px; font-size: 15px; background: #fbfaf9; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus, .field textarea:focus {
  border-color: var(--teal); background: #fff;
  box-shadow: 0 0 0 4px rgba(15,118,110,.12);
}
.offerbox { display: flex; gap: 8px; margin-top: 10px; }
.offerbox input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 13px; padding: 10px 14px;
  font-size: 15px; background: #fbfaf9; outline: none;
}
.offerbox input:focus { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(217,119,6,.12); }

/* ---------- buttons ---------- */
.btn {
  display: block; width: 100%; text-align: center;
  background: linear-gradient(160deg, var(--teal), var(--teal-dark));
  color: #fff; font-size: 15px; font-weight: 800;
  padding: 13px 18px; border-radius: 14px; margin-top: 10px;
  box-shadow: 0 8px 18px -8px rgba(15,118,110,.55);
  transition: transform .1s, box-shadow .2s, opacity .2s;
}
.btn:active { transform: scale(.975); box-shadow: 0 3px 8px -6px rgba(15,118,110,.55); }
.btn.ghost { background: #f1efec; color: var(--ink); box-shadow: none; }
.btn.amber { background: linear-gradient(160deg, var(--amber-bright), var(--amber)); box-shadow: 0 8px 18px -8px rgba(217,119,6,.55); }
.btn.danger { background: var(--red-soft); color: var(--red); box-shadow: none; }
.btn.small { width: auto; display: inline-block; padding: 10px 18px; font-size: 13.5px; margin-top: 0; }
.btnrow { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.btnrow .btn { flex: 1; margin-top: 0; min-width: 120px; }

/* ---------- bottom nav ---------- */
.navbar {
  position: fixed; bottom: 0; right: 0; left: 0; margin: 0 auto; max-width: 480px;
  display: flex; background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); z-index: 40;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px -14px rgba(23,33,31,.2);
}
.navbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11.5px; font-weight: 700; color: var(--ink3); padding: 7px 0 4px;
  border-radius: 12px; transition: color .15s;
}
.navbar button .em { font-size: 21px; filter: grayscale(1) opacity(.55); transition: filter .15s, transform .15s; }
.navbar button.on { color: var(--teal); }
.navbar button.on .em { filter: none; transform: translateY(-1px) scale(1.08); }

/* ---------- auth ---------- */
.auth-logo { text-align: center; margin-top: 7vh; }
.auth-logo img { width: 92px; height: 92px; border-radius: 26px; box-shadow: var(--shadow-lg); }
.auth-logo .name { font-size: 34px; font-weight: 800; color: var(--teal-dark); margin-top: 10px; letter-spacing: -.5px; }
.auth-tag { text-align: center; color: var(--ink2); font-size: 13.5px; font-weight: 600; margin: 8px 0 26px; }
.auth-card { padding: 20px; }
.tabs { display: flex; background: #f1efec; border-radius: 13px; padding: 4px; margin-bottom: 18px; }
.tabs button { flex: 1; padding: 10px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--ink2); transition: all .18s; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.09); }
.roles { display: flex; gap: 8px; margin-bottom: 16px; }
.role-opt {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 13px 4px; border: 2px solid var(--line); border-radius: 15px;
  font-size: 13px; font-weight: 800; color: var(--ink2); background: #fbfaf9;
  transition: all .15s;
}
.role-opt .em { font-size: 25px; }
.role-opt.on { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); }

/* ---------- misc ---------- */
.error { background: var(--red-soft); color: var(--red); font-size: 13px; font-weight: 700; padding: 11px 14px; border-radius: 12px; margin-bottom: 12px; animation: rise .25s both; }
.ok { background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 700; padding: 11px 14px; border-radius: 12px; margin-bottom: 12px; }
.empty { text-align: center; padding: 44px 20px; color: var(--ink2); font-size: 14px; font-weight: 600; line-height: 1.9; }
.empty .em { font-size: 42px; display: block; margin-bottom: 10px; }
.muted { color: var(--ink2); font-size: 13px; }
.myoffer {
  background: var(--teal-soft); border-radius: 13px; padding: 11px 14px; margin-top: 10px;
  font-size: 13.5px; font-weight: 700; color: var(--teal-dark);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.myoffer .st { font-size: 11.5px; color: var(--ink2); font-weight: 600; }

/* ---------- map ---------- */
.mapcard { border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 14px; }
#map, .mapbox { height: 300px; width: 100%; z-index: 1; }
.map-hint { background: var(--amber-soft); color: var(--fee-text); font-size: 12.5px; font-weight: 700; padding: 10px 14px; }
.modal {
  position: fixed; inset: 0; z-index: 100; background: rgba(23,33,31,.5);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-sheet {
  background: #fff; width: 100%; max-width: 480px; border-radius: 24px 24px 0 0;
  padding: 18px; animation: sheet .28s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes sheet { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-sheet h3 { margin-bottom: 12px; font-size: 16px; }
.leaflet-container { font-family: inherit; }

/* ---------- v4: customer ordering ---------- */
.menu-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.rest-card { cursor: pointer; transition: transform .12s, box-shadow .2s; }
.rest-card:active { transform: scale(.985); }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button {
  width: 34px; height: 34px; border-radius: 11px; font-size: 19px; font-weight: 800;
  background: var(--teal-soft); color: var(--teal-dark); line-height: 1;
  transition: transform .1s;
}
.qty button:active { transform: scale(.9); }
.qty b { min-width: 26px; text-align: center; font-size: 16px; }
.cartbar {
  position: fixed; bottom: 0; right: 0; left: 0; margin: 0 auto; max-width: 480px;
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  z-index: 40; box-shadow: 0 -8px 24px -14px rgba(23,33,31,.2);
}
.cartbar .ghost { padding: 10px 16px; border-radius: 12px; background: #f1efec; font-weight: 800; font-size: 13.5px; }
.cartbar .go {
  flex: 1; background: linear-gradient(160deg, var(--amber-bright), var(--amber));
  color: #fff; font-weight: 800; font-size: 14.5px; padding: 12px 16px; border-radius: 13px;
  box-shadow: 0 8px 18px -8px rgba(217,119,6,.55);
}

/* ---------- v5: Talabat-style customer experience ---------- */
.searchbar {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 14px; padding: 12px 16px;
  box-shadow: var(--shadow); margin-bottom: 14px;
}
.searchbar span { opacity: .55; }
.searchbar input { border: 0; outline: none; flex: 1; font-size: 15px; background: none; color: var(--ink); }
.banners { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 8px; scroll-snap-type: x mandatory; }
.banners::-webkit-scrollbar { display: none; }
.banner {
  min-width: 82%; scroll-snap-align: center;
  border-radius: 20px; padding: 22px 20px; color: #fff;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow-lg);
}
.banner b { font-size: 17px; }
.banner span { font-size: 12.5px; opacity: .85; line-height: 1.7; }
.banner.b1 { background: linear-gradient(135deg, #14110d, #3a2f1d 60%, #a8801f); }
.banner.b2 { background: linear-gradient(135deg, #1c1913, #14110d 55%, #4d3a12); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 6px; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  white-space: nowrap; padding: 8px 16px; border-radius: 99px;
  background: var(--card); color: var(--ink2); font-size: 13px; font-weight: 800;
  border: 1.5px solid var(--line); transition: all .15s;
}
.chips button.on { background: var(--teal-deep); color: var(--amber-bright); border-color: var(--teal-deep); }

.rest-card2 { background: var(--card); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 16px; cursor: pointer; animation: rise .35s both; transition: transform .12s; }
.rest-card2:active { transform: scale(.98); }
.rest-card2 .cover { position: relative; height: 150px; }
.rest-card2 .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rest-card2 .heart {
  position: absolute; top: 12px; left: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.92); font-size: 17px; color: var(--ink2);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.rest-card2 .heart.on { color: #d6336c; }
.rest-card2 .coverfee {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(20,17,13,.88); color: var(--amber-bright);
  font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 99px;
}
.rc-body { padding: 14px 16px 16px; }
.rc-name { font-weight: 800; font-size: 16.5px; }
.rc-cat { font-size: 12.5px; color: var(--ink2); margin-top: 3px; }
.rc-meta { display: flex; gap: 10px; align-items: center; margin-top: 9px; font-size: 12.5px; font-weight: 700; color: var(--ink2); flex-wrap: wrap; }
.rc-meta i { color: var(--ink3); font-style: normal; }
.newbadge { color: var(--amber); font-weight: 800; }

.menuhero { position: relative; height: 210px; background-size: cover; background-position: center; margin: 0 -16px; }
.hero-grad { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,17,13,.25), transparent 40%, rgba(246,243,236,.4) 82%, var(--bg)); }
.backbtn {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.94); font-size: 18px; font-weight: 800; color: var(--ink);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.hero-text { position: absolute; bottom: 30px; right: 18px; left: 18px; color: #fff; z-index: 2; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.hero-text b { display: block; font-size: 22px; }
.hero-text span { font-size: 12.5px; opacity: .9; }

.item-card { display: flex; gap: 12px; align-items: center; padding: 12px; }
.item-card img { width: 86px; height: 86px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.item-card .item-mid { flex: 1; min-width: 0; }

.ratebox {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 12px; padding: 10px 14px;
  background: var(--amber-soft); border-radius: 13px;
  font-size: 13px; font-weight: 700; color: var(--fee-text);
}
.stars { display: flex; gap: 2px; }
.stars button { font-size: 24px; color: var(--amber-bright); line-height: 1; padding: 2px; }
.stars { color: var(--amber-bright); font-size: 18px; letter-spacing: 2px; }

/* geo prompt */
.geoprompt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: var(--amber-soft); border: 1.5px solid var(--amber-bright);
  border-radius: 14px; padding: 12px 16px; margin-bottom: 12px;
  font-size: 13.5px; font-weight: 700; color: var(--fee-text);
  animation: rise .3s both;
}
.geoprompt .geobtns { display: flex; gap: 8px; }

/* ---------- detail pass: toasts, timeline, checklist, offer note ---------- */
#toast {
  position: fixed; bottom: 96px; right: 16px; left: 16px; z-index: 220;
  background: #171512; color: #fff; font-weight: 700; font-size: 14px;
  padding: 13px 18px; border-radius: 14px; text-align: center;
  box-shadow: 0 10px 34px rgba(0,0,0,.3);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
#toast.show { opacity: 1; transform: translateY(0); }
.detailbtn { width: 100%; margin-top: 8px; }
.timeline { padding: 6px 10px; }
.tl-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.tl-row:last-child { border-bottom: 0; }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); flex-shrink: 0; }
.tl-dot.cur { background: var(--amber-bright); box-shadow: 0 0 0 4px var(--amber-soft); }
.tl-mid { flex: 1; display: flex; flex-direction: column; }
.tl-mid b { font-size: 13.5px; }
.tl-mid span { font-size: 12px; color: var(--ink2); }
.tl-time { font-size: 12px; color: var(--ink3); white-space: nowrap; }
.modal-sheet { max-height: 88vh; overflow-y: auto; }
.checklist b { display: block; margin-bottom: 10px; font-size: 15px; }
.chk { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.chk:active { background: var(--bg); }
.chk span { font-weight: 800; color: var(--amber); }
.chk.done { color: var(--ink2); }
.chk.done span { color: var(--green); }
.offernote {
  width: 100%; margin-top: 8px; border: 1.5px dashed var(--line); border-radius: 12px;
  padding: 9px 12px; font-family: var(--font); font-size: 13px; background: transparent; color: var(--ink);
}

/* ---------- restaurant page: bio + facebook ---------- */
.shop-bio { margin: 10px 6px 0; font-size: 13.5px; line-height: 1.65; color: var(--ink2); text-align: center; font-weight: 600; }
.fblink { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px auto 2px; padding: 9px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: #fbfaf9; color: var(--ink); font-size: 13px; font-weight: 800; text-decoration: none; width: fit-content; }
.fblink span { font-size: 14px; }
.fblink:active { transform: scale(.98); }

/* Responsive layouts: phone, tablet, and desktop */
html, body { width:100%; }
.shell, .content, .card, .order, .brand, .who, .stat, .kv > *, .offer, .menu-row > * { min-width:0; }
input, textarea, select { max-width:100%; }
input, textarea, select, button { touch-action:manipulation; }
.field input, .field textarea, .sel { font-size:16px; }
.searchbar input { min-width:0; width:100%; }
.hello, .kv, .offer-note, .shop-bio, .title, .rc-name { overflow-wrap:anywhere; }
.section-title, .ratebox, .menu-row, .offerbox { flex-wrap:wrap; }
.section-title .hint { line-height:1.7; }
.kv span:first-child { flex-shrink:1; }
.navbar button, .qty button, .chips button { min-height:44px; }
.modal-sheet { max-height:90dvh; padding-bottom:calc(18px + env(safe-area-inset-bottom)); }
#toast { max-width:600px; margin:auto; }
.restaurant-grid { display:grid; gap:16px; }
.restaurant-grid .rest-card2 { margin:0; }
@media (max-width:599px) {
  .topbar { position:relative; padding:16px 14px 18px; }
  .content { padding:16px 12px 110px; }
  .auth-logo { margin-top:3vh; }
  .auth-tag { line-height:1.8; }
  .menu-row { gap:8px; padding:14px; }
  .menu-row .offer-mid { flex-basis:52%; }
  .menu-row .btn { flex:1; }
  .item-card { gap:8px; flex-wrap:wrap; }
  .item-card img { width:68px; height:68px; }
  .item-card .item-mid { flex-basis:calc(100% - 90px); }
  .item-card .qty { margin-inline-start:auto; }
  .locbar { flex-wrap:wrap; }
  .order .top { flex-wrap:wrap; }
  .banners, .chips { margin-inline:-12px; padding-inline:12px; }
}
@media (min-width:600px) {
  .shell { max-width:1100px; }
  .content { padding:24px 28px 120px; }
  .shell:has(.auth-card), .shell:has(#track-result) { max-width:560px; }
  .topbar { padding:20px 28px; }
  .stats { max-width:760px; }
  .navbar, .cartbar { max-width:1100px; }
  .restaurant-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
  .banner { min-width:0; flex:1; }
  .banners { margin-inline:0; padding-inline:0; }
  .chips { margin-inline:0; padding-inline:0; flex-wrap:wrap; overflow:visible; }
  .modal { align-items:center; padding:24px; }
  .modal-sheet { max-width:680px; border-radius:24px; }
  .app-content.role-restaurant.view-home > .card, .app-content.role-restaurant.view-location > .card { max-width:850px; }
  .menu-content { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
  .menu-content > .menuhero, .menu-content > .section-title, .menu-content > .card:not(.item-card), .menu-content > .empty { grid-column:1/-1; }
  .menu-content > .menuhero { margin-inline:-28px; height:300px; }
}
@media (min-width:1100px) {
  .shell:has(.navbar button) { max-width:1680px; padding-inline-end:230px; }
  .shell:has(.navbar button) .navbar { inset-block:0; inset-inline-start:auto; inset-inline-end:max(0px,calc((100vw - 1680px)/2)); width:230px; max-width:none; margin:0; border:0; border-inline-start:1px solid var(--line); display:flex; flex-direction:column; justify-content:flex-start; gap:12px; padding:40px 16px; box-shadow:none; }
  .navbar button { flex:none; flex-direction:row; gap:14px; padding:16px; font-size:15px; text-align:start; }
  .navbar button.on { background:var(--amber-soft); }
  .content { padding:30px 36px 70px; }
  .topbar { border-radius:0 0 22px 22px; padding:24px 36px; position:relative; }
  .stats { margin-top:22px; max-width:none; }
  .stat { padding:16px; }
  .stat b { font-size:24px; }
  .stat span { font-size:13px; }
  .restaurant-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .rest-card2 .cover { height:190px; }
  .app-content.role-courier, .app-content.view-orders { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; align-items:start; }
  .app-content.role-courier > .section-title, .app-content.view-orders > .section-title, .app-content > .empty { grid-column:1/-1; }
  .app-content.role-restaurant.view-home, .app-content.role-restaurant.view-location, .app-content.role-restaurant.view-menu { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; align-items:start; }
  .app-content.role-restaurant.view-home > .section-title, .app-content.role-restaurant.view-location > .section-title { grid-column:1/-1; }
  .app-content.role-restaurant.view-home > .card:not(.checklist) { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr; gap:12px 24px; }
  .app-content.role-restaurant.view-home > .card > #err, .app-content.role-restaurant.view-home > .card > button, .app-content.role-restaurant.view-home > .card > p { grid-column:1/-1; }
  .shell.menu-shell { max-width:1500px; }
  .menu-content { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .menu-content > .menuhero { margin-inline:-36px; height:360px; }
  .cartbar { max-width:1500px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; } }
@media (min-width:1100px) {
  .app-content.role-restaurant.view-home > .card:not(.checklist) { max-width:none; width:100%; }
  .app-content.role-restaurant.view-home { align-content:start; }
  .app-content.role-restaurant.view-home > .section-title { margin-bottom:0; }
}
@media (min-width:768px) and (max-width:1099px) {
  .app-content.role-courier, .app-content.view-orders { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:start; }
  .app-content.role-courier > .section-title, .app-content.view-orders > .section-title, .app-content > .empty { grid-column:1/-1; }
}
.menu-content { align-content:start; }
@media (max-width:599px) {
  .banners { display:grid; gap:12px; overflow:visible; margin-inline:0; padding-inline:0; }
  .banner { min-width:0; }
  .chips { flex-wrap:wrap; overflow:visible; margin-inline:0; padding-inline:0; }
}

/* Plain Arabic typography across native controls and all roles. */
select{font-family:inherit}h1,h2,h3,b,strong{font-weight:700}

.nav-directory{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;text-decoration:none;color:var(--ink2);font:inherit;font-size:12px;font-weight:700;gap:4px;min-height:58px}.nav-directory .em{font-size:25px;line-height:1.2}#interest-send:disabled{opacity:.65}
