/* Oumma Food PWA */
:root {
  --cream: #F5EFE6;
  --paper: #FFFDF9;
  --sand: #EFE4D2;
  --kraft: #D9BC93;
  --kraft-deep: #B98E5E;
  --green: #1F3B2D;
  --green-2: #2B5140;
  --green-soft: #E3ECE5;
  --orange: #C8531F;
  --orange-soft: #F7E3D6;
  --blush: #F6E3DF;
  --butter: #FBF0D9;
  --ink: #1B1712;
  --ink-2: #4A4239;
  --muted: #8A7F72;
  --line: #E7DDCE;
  --wa: #1FA855;
  --danger: #B3261E;
  --chart-a: #1F7A55;
  --chart-b: #D2601F;
  --r-lg: 26px;
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 10px 30px -12px rgba(60, 40, 15, .22);
  --shadow-sm: 0 4px 14px -6px rgba(60, 40, 15, .18);
  --f-display: 'Playfair Display', Georgia, serif;
  --f-body: 'Poppins', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
html[lang="ar"] { --f-display: 'Tajawal', sans-serif; --f-body: 'Tajawal', sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
html[lang="ar"] body { font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
html[dir="rtl"] svg.flip { transform: scaleX(-1); }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-logo { font-family: var(--f-display); font-size: 28px; font-style: italic; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------- Layout ---------- */
.shell { min-height: 100vh; }
.topbar { display: none; }
.side { display: none; }
.main { padding: 0 16px calc(110px + var(--safe-b)); max-width: 1180px; margin: 0 auto; }

.mtop { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; gap: 10px; position: sticky; top: 0; z-index: 20; background: linear-gradient(var(--cream) 70%, rgba(245, 239, 230, 0)); }
.mtop .right { display: flex; gap: 10px; align-items: center; }
.logo { font-family: var(--f-display); font-size: 21px; letter-spacing: -.01em; display: flex; align-items: center; gap: 9px; text-decoration: none; }
.logo i { font-style: italic; font-weight: 400; }
.logo b { font-weight: 700; }
.logo-mark { width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: var(--kraft); display: grid; place-items: center; font-family: 'Playfair Display', serif; font-style: italic; font-size: 17px; }
html[lang="ar"] .logo { font-family: 'Playfair Display', serif; }

.icon-btn { width: 46px; height: 46px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; position: relative; box-shadow: var(--shadow-sm); flex: none; }
.icon-btn.dark { background: var(--ink); color: #fff; }
.icon-btn .dot { position: absolute; top: 6px; inset-inline-end: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--paper); }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: var(--kraft); display: grid; place-items: center; font-weight: 600; font-size: 17px; flex: none; text-decoration: none; border: 3px solid var(--paper); box-shadow: var(--shadow-sm); }

/* Bottom nav (mobile) — floating pill like the mockup */
.bnav { position: fixed; bottom: calc(14px + var(--safe-b)); left: 50%; transform: translateX(-50%); background: var(--ink); border-radius: 40px; padding: 7px; display: flex; gap: 6px; z-index: 40; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .45); }
.bnav a { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #d9d2c7; background: rgba(255, 255, 255, .08); text-decoration: none; position: relative; transition: background .2s, color .2s; }
.bnav a.on { background: var(--paper); color: var(--ink); }
.bnav a .dot { position: absolute; top: 4px; inset-inline-end: 4px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; padding: 0 4px; }

@media (min-width: 1024px) {
  .mtop, .bnav { display: none; }
  .topbar { display: flex; align-items: center; gap: 28px; max-width: 1280px; margin: 18px auto 0; padding: 14px 28px; background: var(--paper); border-radius: 22px; box-shadow: var(--shadow-sm); position: sticky; top: 12px; z-index: 30; }
  .topbar nav { display: flex; gap: 6px; margin-inline-start: auto; }
  .topbar nav a { text-decoration: none; padding: 8px 14px; border-radius: 20px; color: var(--ink-2); font-size: 14px; }
  .topbar nav a.on, .topbar nav a:hover { background: var(--cream); color: var(--ink); }
  .topbar .right { display: flex; gap: 10px; align-items: center; }
  .topbar .icon-btn { width: 42px; height: 42px; background: var(--cream); box-shadow: none; }
  .topbar .avatar { width: 42px; height: 42px; border: 0; box-shadow: none; }
  .layout { display: grid; grid-template-columns: 270px 1fr; gap: 32px; max-width: 1280px; margin: 24px auto 0; padding: 0 28px 60px; align-items: start; }
  .side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 100px; }
  .main { padding: 0; max-width: none; margin: 0; min-width: 0; }
}

/* Sidebar */
.ucard { background: var(--green); color: #f3ede3; border-radius: var(--r-lg); padding: 22px; position: relative; overflow: hidden; }
.ucard::after { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .06); top: -40px; inset-inline-end: -40px; }
.ucard .avatar { background: var(--sand); color: var(--green); border: 0; margin-bottom: 12px; }
.ucard h3 { font-family: var(--f-display); font-size: 20px; margin: 0; font-weight: 600; }
.ucard p { margin: 2px 0 12px; font-size: 12.5px; color: #c9d3cc; word-break: break-all; }
.ucard .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 20px; padding: 5px 11px; color: var(--kraft); }
.ucard .btn { margin-top: 6px; }
.snav { background: var(--paper); border-radius: var(--r-lg); padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.snav a, .snav button { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; text-decoration: none; color: var(--ink-2); font-size: 14.5px; width: 100%; text-align: start; }
.snav a:hover, .snav button:hover { background: var(--cream); }
.snav a.on { background: var(--green); color: #fff; }
.snav .cnt { margin-inline-start: auto; background: var(--orange); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 8px; font-weight: 600; }
.snav hr { border: 0; border-top: 1px solid var(--line); margin: 6px 8px; }
.snav .danger { color: var(--orange); }

/* ---------- Generic UI ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 30px; font-weight: 500; font-size: 15px; text-decoration: none; transition: transform .15s, background .2s, opacity .2s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-light { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13.5px; }
.btn-xs { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-lg { height: 56px; font-size: 16px; }

.chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; margin: 0 -16px; padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 44px; padding: 0 22px; border-radius: 26px; background: #ECE6DC; color: var(--ink-2); font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; }
@media (min-width: 1024px) { .chips { margin: 0; padding-inline: 2px; flex-wrap: wrap; } .chip { height: 38px; padding: 0 18px; font-size: 13.5px; background: var(--paper); border: 1px solid var(--line); } .chip.on { background: var(--green); border-color: var(--green); } }

.search { display: flex; gap: 10px; align-items: center; }
.search label { flex: 1; display: flex; align-items: center; gap: 10px; height: 54px; background: var(--paper); border-radius: 30px; padding: 0 20px; box-shadow: var(--shadow-sm); color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; background: none; min-width: 0; font-size: 15px; color: var(--ink); }
.search .icon-btn { width: 54px; height: 54px; }

.h-title { font-family: var(--f-display); font-size: 30px; line-height: 1.15; margin: 10px 0 18px; letter-spacing: -.01em; }
.h-title i { font-weight: 400; color: var(--ink-2); }
.h-title b { font-weight: 700; display: block; }
html[lang="ar"] .h-title { font-size: 28px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 10px; }
.sec-head h2 { font-size: 17px; margin: 0; font-weight: 600; }
.sec-head a, .sec-head button { font-size: 13px; color: var(--muted); text-decoration: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 18px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--f-display); font-size: 30px; margin: 0; font-weight: 600; line-height: 1.15; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.banner { display: flex; align-items: center; gap: 14px; background: var(--paper); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-sm); margin: 14px 0; }
.banner .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--orange-soft); color: var(--orange); display: grid; place-items: center; flex: none; }
.banner strong { display: block; font-size: 14.5px; }
.banner span { font-size: 13px; color: var(--muted); }
.banner .btn { margin-inline-start: auto; }
.banner.closed { background: var(--blush); }

/* Featured cards (mockup 1) */
.feat { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 10px; scrollbar-width: none; }
.feat::-webkit-scrollbar { display: none; }
.fcard { flex: 0 0 86%; max-width: 420px; scroll-snap-align: start; border-radius: var(--r-lg); padding: 22px 20px; position: relative; overflow: hidden; min-height: 200px; display: flex; flex-direction: column; cursor: pointer; }
.fcard:nth-child(3n+1) { background: var(--butter); }
.fcard:nth-child(3n+2) { background: var(--blush); }
.fcard:nth-child(3n+3) { background: var(--green-soft); }
.fcard h3 { font-family: var(--f-display); font-size: 24px; line-height: 1.1; margin: 0; max-width: 52%; overflow-wrap: anywhere; hyphens: auto; position: relative; z-index: 2; }
.fcard h3 i { font-weight: 400; display: block; font-size: .8em; }
.fcard h3 b { font-weight: 700; }
.fcard p { font-size: 13px; color: var(--ink-2); margin: 8px 0 16px; max-width: 52%; position: relative; z-index: 2; }
.fcard .btn { margin-top: auto; align-self: flex-start; position: relative; z-index: 2; }
.fcard .ph { position: absolute; inset-inline-end: -34px; top: 50%; transform: translateY(-50%); width: 50%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 18px 30px -12px rgba(60, 30, 10, .45); border: 5px solid rgba(255, 255, 255, .7); }
.fcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.price-tag { position: absolute; top: 18px; inset-inline-end: 34%; background: var(--paper); border-radius: 20px; padding: 4px 12px; font-size: 13px; font-weight: 600; transform: rotate(-8deg); box-shadow: var(--shadow-sm); z-index: 3; }
@media (min-width: 1024px) { .feat { margin: 0; padding: 4px 0 10px; } .fcard { flex-basis: calc(33.333% - 10px); min-height: 210px; } }

/* Dish grid (mockup 2) */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; } }
.dcard { background: var(--paper); border-radius: var(--r); padding: 8px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; position: relative; transition: transform .2s; }
.dcard:hover { transform: translateY(-2px); }
.dcard .ph { position: relative; border-radius: 13px; overflow: hidden; aspect-ratio: 4/3; background: var(--sand); cursor: pointer; }
.dcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.dcard .badge { position: absolute; top: 9px; inset-inline-start: 9px; }
.dcard .fav { position: absolute; top: 8px; inset-inline-end: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; }
.dcard .fav svg { width: 17px; height: 17px; }
.fav.on svg { fill: var(--orange); stroke: var(--orange); }
.dcard .body { padding: 10px 6px 4px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.dcard .row1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.dcard h3 { font-family: var(--f-display); font-size: 16.5px; margin: 0; font-weight: 600; line-height: 1.2; cursor: pointer; }
.dcard .price { color: var(--orange); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.meta { display: flex; gap: 12px; color: var(--muted); font-size: 12px; align-items: center; flex-wrap: wrap; }
.meta span { display: inline-flex; align-items: center; gap: 4px; }
.meta svg.i { width: 15px; height: 15px; }
.dcard .foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.dcard .origin { font-size: 12px; color: var(--ink-2); }
.add-btn { height: 32px; padding: 0 14px; border-radius: 18px; background: var(--green); color: #fff; font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.add-btn.in { background: var(--orange); }
.dcard.off .ph::after { content: attr(data-off); position: absolute; inset: 0; background: rgba(27, 23, 18, .55); color: #fff; display: grid; place-items: center; font-weight: 500; font-size: 13.5px; }
.dcard.off .add-btn { background: #cfc6b8; pointer-events: none; }
@media (max-width: 400px) { .dcard .foot .origin { display: none; } .dcard h3 { font-size: 15px; } }

.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 12px; background: var(--green); color: #fff; letter-spacing: .01em; }
.badge.new { background: #F2C14E; color: var(--ink); }
.badge.spicy { background: var(--orange); }
.badge.chef { background: var(--green); }
.badge.bestseller { background: var(--ink); }
.badge.limited { background: #6E4B8B; }
.badge.veggie { background: #4E8B4F; }

/* Detail (mockup 1, third screen) */
.detail { margin: 0 -16px; }
.detail-top { background: linear-gradient(180deg, var(--sand), var(--cream)); padding: 14px 16px 26px; position: relative; }
.detail-top .bar { display: flex; justify-content: space-between; align-items: center; }
.detail-top .bar h2 { font-size: 15px; font-weight: 600; margin: 0; }
.detail-img { margin: 18px auto 0; width: min(88%, 420px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 30px 50px -20px rgba(60, 30, 10, .5); border: 6px solid var(--paper); position: relative; }
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-top .stick { position: absolute; background: var(--paper); border-radius: 20px; padding: 6px 14px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm); }
.detail-top .stick.a { bottom: 46px; inset-inline-start: 18px; transform: rotate(-12deg); }
.detail-top .stick.b { bottom: 90px; inset-inline-end: 18px; transform: rotate(8deg); }
.detail-sheet { background: var(--paper); border-radius: 30px 30px 0 0; margin-top: -18px; padding: 26px 20px 30px; position: relative; }
.detail-sheet .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.detail-sheet h1 { font-family: var(--f-display); font-size: 30px; line-height: 1.1; margin: 0; }
.detail-sheet h1 i { font-weight: 400; display: block; font-size: 26px; }
.detail-sheet h1 b { font-weight: 700; }
.detail-sheet .big-price { font-size: 22px; font-weight: 600; }
.detail-sheet h4 { margin: 20px 0 6px; font-size: 15px; }
.detail-sheet p.desc { color: var(--ink-2); margin: 0; font-size: 14.5px; }
.spice { display: inline-flex; gap: 2px; }
.spice b { width: 7px; height: 14px; border-radius: 4px; background: var(--line); display: inline-block; }
.spice b.on { background: var(--orange); }
@media (min-width: 1024px) {
  .detail { margin: 0; display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-sm); }
  .detail-top { padding: 24px; }
  .detail-sheet { margin: 0; border-radius: 0; padding: 40px; display: flex; flex-direction: column; justify-content: center; }
}

.stepper { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 30px; padding: 4px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: var(--ink); }
.stepper output { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; }
.stepper.sm button { width: 28px; height: 28px; font-size: 17px; }
.stepper.sm output { width: 30px; height: 30px; font-size: 13px; }

/* Cart */
.cart-wrap { display: grid; gap: 18px; }
@media (min-width: 1024px) { .cart-wrap { grid-template-columns: 1fr 360px; align-items: start; } }
.panel { background: var(--paper); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.panel h3 { margin: 0 0 12px; font-size: 16px; }
.citem { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.citem:last-child { border-bottom: 0; }
.citem img { width: 70px; height: 70px; border-radius: 14px; object-fit: cover; flex: none; }
.citem .info { flex: 1; min-width: 0; }
.citem .info strong { display: block; font-family: var(--f-display); font-size: 16px; }
.citem .info small { color: var(--muted); }
.citem .rm { color: var(--muted); padding: 6px; }
.sumline { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: var(--ink-2); }
.sumline.total { font-size: 18px; font-weight: 600; color: var(--ink); border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; }
.note { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
.note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* Forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea { height: 50px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); padding: 0 16px; outline: 0; width: 100%; font-size: 15px; transition: border-color .2s; }
.field textarea { height: auto; min-height: 84px; padding: 12px 16px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; accent-color: var(--green); flex: none; margin-top: 1px; }
.err { color: var(--danger); font-size: 13px; min-height: 0; }
.modes { display: grid; gap: 12px; }
@media (min-width: 640px) { .modes { grid-template-columns: 1fr 1fr; } }
.mode { display: flex; gap: 12px; padding: 16px; border-radius: var(--r); border: 2px solid var(--line); background: var(--paper); cursor: pointer; text-align: start; transition: border-color .2s; }
.mode .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--cream); display: grid; place-items: center; flex: none; }
.mode strong { display: block; font-size: 14.5px; }
.mode small { color: var(--muted); font-size: 12.5px; line-height: 1.4; display: block; }
.mode.on { border-color: var(--green); background: #F7FAF7; }
.mode.on .ic { background: var(--green); color: #fff; }
.addr { display: flex; gap: 10px; align-items: center; background: var(--cream); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; flex-wrap: wrap; }
.addr .btn { margin-inline-start: auto; }
.tabs { display: flex; background: #ECE6DC; border-radius: 30px; padding: 4px; margin-bottom: 18px; }
.tabs button { flex: 1; height: 42px; border-radius: 26px; font-weight: 500; color: var(--ink-2); font-size: 14px; }
.tabs button.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.narrow { max-width: 520px; margin: 0 auto; }

/* Orders list */
.olist { display: grid; gap: 12px; }
.ocard { background: var(--paper); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-sm); }
.ocard .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ocard .top strong { font-size: 15px; }
.ocard .top small { color: var(--muted); }
.ocard ul { list-style: none; margin: 10px 0; padding: 0; font-size: 13.5px; color: var(--ink-2); }
.ocard .bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 20px; background: var(--cream); color: var(--ink-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.new { background: #FFF2D6; color: #8A5A00; }
.pill.confirmed { background: #E2EEF9; color: #1D4F7A; }
.pill.ready { background: #E1F1E7; color: #1B6B40; }
.pill.done { background: #ECE6DC; color: #5A5146; }
.pill.cancelled { background: #F8E1DF; color: #9A2A21; }

/* Thank you */
.thanks { text-align: center; padding: 20px 0; }
.thanks .ok { width: 84px; height: 84px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin: 10px auto 16px; }
.thanks .ok svg { width: 40px; height: 40px; stroke-width: 2.4; }
.thanks h1 { font-family: var(--f-display); font-size: 30px; margin: 0 0 6px; }
.steps { display: grid; gap: 10px; text-align: start; margin: 20px 0; }
.steps div { display: flex; gap: 12px; align-items: center; background: var(--paper); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.steps b { width: 28px; height: 28px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; flex: none; font-size: 13px; }
.steps div.done b { background: var(--green); color: #fff; }

/* Empty */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .ic { width: 76px; height: 76px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; margin: 0 auto 14px; color: var(--kraft-deep); }
.empty .ic svg { width: 32px; height: 32px; }
.empty h3 { color: var(--ink); font-family: var(--f-display); font-size: 22px; margin: 0 0 6px; }
.empty .btn { margin-top: 16px; }

/* Onboarding (mockup 1, first screen) */
.onb { position: fixed; inset: 0; z-index: 100; background: #120e0a; display: flex; align-items: flex-end; justify-content: center; animation: fade .4s; }
.onb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.onb::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .15) 30%, rgba(0, 0, 0, .75)); z-index: 1; }
.onb .glass { position: relative; z-index: 2; margin: 0 16px calc(28px + var(--safe-b)); max-width: 460px; width: 100%; background: rgba(255, 255, 255, .12); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255, 255, 255, .18); border-radius: 30px; padding: 28px 22px 22px; color: #fff; text-align: center; }
.onb h1 { font-family: var(--f-display); font-size: 30px; line-height: 1.15; margin: 0 0 10px; }
.onb h1 i { font-weight: 400; display: block; }
.onb p { margin: 0 0 22px; color: rgba(255, 255, 255, .85); font-size: 14.5px; }
.onb .row { display: flex; gap: 10px; }
.onb .row .btn { flex: 1; background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .2); }
.onb .row .go { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.onb .langs { position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); inset-inline-end: 16px; z-index: 3; display: flex; gap: 6px; }
.onb .langs button { color: #fff; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .25); padding: 6px 12px; border-radius: 20px; font-size: 13px; }
.onb .langs button.on { background: #fff; color: var(--ink); }
.onb .brand { position: absolute; top: calc(20px + env(safe-area-inset-top, 0px)); inset-inline-start: 18px; z-index: 3; color: #fff; }
@keyframes fade { from { opacity: 0; } }

/* Lang switch */
.lang-sw { display: flex; gap: 4px; background: var(--paper); border-radius: 22px; padding: 4px; }
.lang-sw button { padding: 5px 11px; border-radius: 18px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.lang-sw button.on { background: var(--green); color: #fff; }
.topbar .lang-sw { background: var(--cream); }

/* Modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(27, 23, 18, .5); z-index: 90; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.modal { background: var(--cream); width: 100%; max-width: 720px; max-height: 92vh; overflow: auto; border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + var(--safe-b)); animation: up .25s ease-out; }
@media (min-width: 760px) { .modal-bg { align-items: center; } .modal { border-radius: 26px; padding: 26px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.modal .mh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal .mh h2 { margin: 0; font-family: var(--f-display); font-size: 22px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(100px + var(--safe-b)); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 30px; font-size: 14px; z-index: 120; box-shadow: var(--shadow); animation: up .25s; max-width: 92vw; text-align: center; }
@media (min-width: 1024px) { .toast { bottom: 30px; } }

.cart-fab { position: fixed; bottom: calc(92px + var(--safe-b)); left: 16px; right: 16px; z-index: 35; display: flex; align-items: center; justify-content: space-between; background: var(--green); color: #fff; border-radius: 22px; padding: 12px 14px 12px 18px; text-decoration: none; box-shadow: var(--shadow); animation: up .25s; }
.cart-fab b { background: var(--orange); border-radius: 14px; padding: 7px 14px; font-weight: 600; }
@media (min-width: 1024px) { .cart-fab { display: none; } }

.info-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.faq details { background: var(--paper); border-radius: 14px; padding: 14px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 500; cursor: pointer; }
.faq p { color: var(--ink-2); font-size: 14px; margin: 8px 0 0; }
.notif { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.notif:last-child { border: 0; }
.notif .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--orange-soft); color: var(--orange); display: grid; place-items: center; flex: none; }
.notif strong { display: block; font-size: 14.5px; }
.notif p { margin: 2px 0; font-size: 13.5px; color: var(--ink-2); }
.notif small { color: var(--muted); font-size: 12px; }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
.toggle { width: 48px; height: 28px; border-radius: 14px; background: #D6CDBF; position: relative; transition: background .2s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.toggle.on { background: var(--green); }
.toggle.on::after { inset-inline-start: 23px; }

/* ---------- Admin ---------- */
.anav { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 16px; padding: 2px 16px 6px; scrollbar-width: none; }
.anav::-webkit-scrollbar { display: none; }
.anav a { flex: none; text-decoration: none; height: 38px; padding: 0 16px; border-radius: 20px; background: var(--paper); display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.anav a.on { background: var(--green); color: #fff; }
@media (min-width: 1024px) { .anav { display: none; } }
.seg { display: inline-flex; background: var(--paper); border-radius: 22px; padding: 4px; gap: 2px; box-shadow: var(--shadow-sm); }
.seg button { padding: 7px 14px; border-radius: 18px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.seg button.on { background: var(--ink); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--paper); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-sm); }
.kpi .lbl { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 26px; font-weight: 600; margin: 4px 0 2px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .val small { font-size: 13px; font-weight: 500; color: var(--muted); margin-inline-start: 3px; }
.kpi .delta { font-size: 12px; font-weight: 500; color: var(--muted); }
.kpi .delta.up { color: #1B6B40; }
.kpi .delta.down { color: #9A2A21; }
.kpi.hero { background: var(--green); color: #fff; }
.kpi.hero .lbl, .kpi.hero .delta, .kpi.hero .val small { color: #cfe0d5; }
.dash { display: grid; gap: 16px; }
@media (min-width: 1100px) { .dash { grid-template-columns: 1.6fr 1fr; } .dash .wide { grid-column: 1 / -1; } }
.panel .ph-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.panel .ph-head h3 { margin: 0; }
.panel .ph-head small { color: var(--muted); font-size: 12.5px; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-l { stroke: #EEE6DA; stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 10.5px; font-family: var(--f-body); }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; border-radius: 10px; padding: 7px 10px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .1s; z-index: 5; }
.chart .tip.on { opacity: 1; }
.hbars { display: grid; gap: 9px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbar .tr { height: 12px; background: #F1EBE1; border-radius: 0 4px 4px 0; overflow: hidden; }
html[dir="rtl"] .hbar .tr { border-radius: 4px 0 0 4px; }
.hbar .fl { height: 100%; background: var(--chart-a); border-radius: 0 4px 4px 0; min-width: 2px; }
html[dir="rtl"] .hbar .fl { border-radius: 4px 0 0 4px; }
.hbar .v { font-variant-numeric: tabular-nums; font-weight: 500; min-width: 34px; text-align: end; }
.split { display: flex; height: 14px; border-radius: 4px; overflow: hidden; gap: 2px; margin: 8px 0; }
.split div { height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; }
.heat div { aspect-ratio: 1 / 1.6; border-radius: 3px; background: #F1EBE1; position: relative; }
.heat-ax { display: grid; grid-template-columns: repeat(24, 1fr); font-size: 10px; color: var(--muted); margin-top: 4px; }
.funnel { display: grid; gap: 8px; }
.funnel .st { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13px; }
.funnel .st .tr { grid-column: 1 / -1; height: 26px; background: #F1EBE1; border-radius: 6px; overflow: hidden; }
.funnel .st .fl { height: 100%; background: var(--chart-a); border-radius: 6px; }
.funnel .st small { color: var(--muted); }
.tbl-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: start; font-weight: 500; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: end; font-variant-numeric: tabular-nums; }
.tbl .thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }
.tbl select { height: 32px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); padding: 0 8px; font-size: 13px; }
.aorder { background: var(--paper); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-sm); display: grid; gap: 10px; }
.aorder .top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.aorder .who { font-size: 13.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.aorder .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.aorder select { height: 36px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--paper); padding: 0 12px; font-size: 13.5px; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 340px; overflow: auto; }
.mgrid button { aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 3px solid transparent; }
.mgrid button.on { border-color: var(--orange); }
.mgrid img { width: 100%; height: 100%; object-fit: cover; }
.img-pick { display: flex; gap: 12px; align-items: center; }
.img-pick img, .img-pick .ph0 { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; background: var(--sand); }
.ltabs { display: flex; gap: 6px; }
.ltabs button { padding: 6px 14px; border-radius: 16px; background: #ECE6DC; font-size: 13px; }
.ltabs button.on { background: var(--ink); color: #fff; }
.adm-list { display: grid; gap: 10px; }
.adish { display: flex; gap: 12px; align-items: center; background: var(--paper); border-radius: var(--r); padding: 10px; box-shadow: var(--shadow-sm); }
.adish img, .adish .ph0 { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--sand); flex: none; }
.adish .info { flex: 1; min-width: 0; }
.adish .info strong { display: block; font-size: 15px; }
.adish .info small { color: var(--muted); font-size: 12.5px; }
.adish .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.muted { color: var(--muted); }
.mt { margin-top: 16px; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.hide-m { display: none; }
@media (min-width: 760px) { .hide-m { display: initial; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
html[lang="ar"] i, html[lang="ar"] em { font-style: normal; }
html[lang="ar"] .h-title i, html[lang="ar"] .fcard h3 i, html[lang="ar"] .detail-sheet h1 i, html[lang="ar"] .onb h1 i { font-weight: 400; }
.show-desk { display: none; }
@media (min-width: 1024px) { .show-desk { display: flex; } .hide-desk { display: none; } }
.btn-block { white-space: normal; text-align: center; line-height: 1.25; height: auto; min-height: 48px; padding-top: 10px; padding-bottom: 10px; }
.btn-lg.btn-block { min-height: 56px; }
.logo { white-space: nowrap; } .mtop .logo { font-size: 19px; }
