/* ==========================================================================
   RAW — واجهة العميل · ستايل

   نفس لغة اللعبة البصرية (كريمي/نبيتي/نحاسي) بس أخف — الصفحة دي
   بتتفتح على الموبايل في الشارع، مش على شاشة مكتب.
   ========================================================================== */
:root {
  /* المنيو فاتح ثابت. من غير السطر ده المتصفح بيلوّن
     السكرول والإنبوت حسب إعداد الجهاز، فالصفحة بتبان مختلفة
     على موبايل غامق عن موبايل فاتح. */
  color-scheme: light;
  --cream: #F7F2E8;
  --cream-2: #EFE6D6;
  --ink: #2A2119;
  --ink-soft: #6B5C4C;
  --line: #DCCFB9;
  --brass: #B08A4A;
  --burgundy: #6E2438;
  --burgundy-2: #8A3350;
  --good: #2E6B3C;
  --r: 16px;
  --font: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', system-ui, sans-serif;
}


* { box-sizing: border-box; }

/* لازم `!important`: خاصية `hidden` بتحط `display:none` من ستايل
   المتصفح الافتراضي، وأي `display` بنكتبه إحنا بيكسبها. من غير
   السطر ده ورقة الطلب (`display:flex`) بتفضل مفتوحة على طول. */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

/* ---------- الترويسة ---------- */
.m-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px max(14px, env(safe-area-inset-right)) 12px max(14px, env(safe-area-inset-left));
  background: linear-gradient(180deg, var(--burgundy), var(--burgundy-2));
  color: #FBF6EC;
}
.brand {
  font-family: 'Outfit', var(--font);
  font-weight: 800; font-size: 1.3rem; letter-spacing: .06em;
  display: flex; align-items: baseline; gap: 8px;
}
.brand small { font-family: var(--font); font-size: .68rem; opacity: .8; font-weight: 500; }
.mine {
  font-family: inherit; font-size: .78rem; font-weight: 700;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.16); color: #FBF6EC;
  border: 1px solid rgba(255,255,255,.28);
}

.m-wrap { padding: 14px max(12px, env(safe-area-inset-right)) 40px max(12px, env(safe-area-inset-left)); }

/* ---------- التصنيفات ---------- */
.cats {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  font-family: inherit; font-size: .8rem; font-weight: 700;
  padding: 8px 15px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: var(--cream-2); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.cat.on { background: var(--burgundy); color: #FBF6EC; border-color: var(--burgundy); }

/* ---------- الشبكة ---------- */
.grid {
  display: grid; gap: 11px; margin-top: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.card {
  font-family: inherit; text-align: start; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px;
  padding: 14px 13px; border-radius: var(--r);
  background: var(--cream-2); color: var(--ink);
  border: 1px solid var(--line);
  transition: transform .14s ease, border-color .14s ease;
}
.card:active { transform: scale(.98); }
.card:hover { border-color: var(--brass); }
.c-ic { font-size: 1.5rem; line-height: 1; }
.card b { font-size: .92rem; font-weight: 800; }
.c-need { font-size: .7rem; color: var(--ink-soft); line-height: 1.5; }
.c-price {
  margin-top: 4px; font-size: 1.05rem; font-weight: 800; color: var(--burgundy-2);
}
.c-price small { font-size: .64rem; font-weight: 600; opacity: .75; }


.empty {
  text-align: center; color: var(--ink-soft); font-size: .84rem;
  padding: 40px 20px; line-height: 1.7;
}

/* ---------- التتبّع ---------- */
.track { padding-top: 6px; }
.t-card {
  background: var(--cream-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px 16px;
}
.t-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.t-head b { font-size: 1.15rem; font-weight: 800; }
.t-num { font-size: .8rem; font-weight: 700; color: var(--ink-soft); }

.t-steps { list-style: none; margin: 20px 0 14px; padding: 0; }
.t-steps li {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 0; font-size: .86rem; color: var(--ink-soft);
}
.t-steps i {
  width: 13px; height: 13px; border-radius: 50%; flex: none;
  border: 2px solid var(--line); background: transparent;
}
.t-steps li.past { color: var(--ink); }
.t-steps li.past i { background: var(--good); border-color: var(--good); }
.t-steps li.now { color: var(--ink); font-weight: 800; }
.t-steps li.now i {
  background: var(--brass); border-color: var(--brass);
  animation: pulse 1.4s ease-in-out infinite;
}
.t-steps li.dead { opacity: .45; text-decoration: line-through; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .t-steps li.now i { animation: none; } }

.t-note {
  margin: 0 0 14px; font-size: .82rem; color: var(--ink-soft); line-height: 1.7;
}
.ghost {
  font-family: inherit; font-size: .82rem; font-weight: 700; width: 100%;
  padding: 11px; border-radius: 12px; cursor: pointer;
  background: transparent; color: var(--ink);
  border: 1px dashed var(--line);
}

/* ---------- ورقة الطلب ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 30;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(20, 14, 8, .5);
  padding: 0 0 env(safe-area-inset-bottom);
}
.s-card {
  width: 100%; max-width: 440px;
  background: var(--cream); color: var(--ink);
  border-radius: 20px 20px 0 0;
  padding: 22px 18px 24px;
  position: relative;
}
@media (min-width: 560px) {
  .sheet { align-items: center; }
  .s-card { border-radius: 20px; }
}
.s-x {
  position: absolute; top: 12px; inset-inline-end: 12px;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  background: var(--cream-2); color: var(--ink);
  border: 1px solid var(--line); font-size: .9rem;
}
.s-card h2 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 800; }
.s-desc { margin: 0 0 14px; font-size: .8rem; color: var(--ink-soft); line-height: 1.6; }
.s-price { font-size: 1.5rem; font-weight: 800; color: var(--burgundy-2); margin-bottom: 16px; }


.s-who { display: block; margin-bottom: 16px; }
.s-who span { display: block; font-size: .76rem; font-weight: 700; margin-bottom: 6px; color: var(--ink-soft); }
.s-who input {
  font-family: inherit; font-size: 1rem; width: 100%;
  padding: 12px 14px; border-radius: 12px;
  background: var(--cream-2); color: var(--ink);
  border: 1px solid var(--line);
}
.s-who input:focus { outline: 2px solid var(--brass); outline-offset: 1px; }

.go {
  font-family: inherit; font-size: .98rem; font-weight: 800; width: 100%;
  padding: 15px; border-radius: 14px; cursor: pointer;
  background: var(--burgundy); color: #FBF6EC; border: none;
}
.go:active { transform: scale(.985); }

/* ---------- الإشعار ---------- */
.toast {
  position: fixed; z-index: 40; inset-inline: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  padding: 13px 16px; border-radius: 13px; text-align: center;
  font-size: .85rem; font-weight: 700;
  background: var(--ink); color: var(--cream);
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}

/* ==========================================================================
   صورة الزبون

   بتظهر بعد التسليم بس. قبل كده الزبون لسه مستني ومفيش مشروب يصوّره.
   ========================================================================== */
.shoot {
  margin: 4px 0 16px; padding: 16px 14px;
  background: var(--cream); border: 1px dashed var(--line); border-radius: 14px;
  display: flex; flex-direction: column; gap: 9px;
}
.sh-ask { margin: 0; font-size: .86rem; font-weight: 700; }
.sh-pick { display: block; }
.sh-pick span {
  display: block; text-align: center; cursor: pointer;
  font-size: .84rem; font-weight: 700; padding: 12px;
  border-radius: 11px; border: 1.5px solid var(--brass); color: var(--brass);
}
.sh-pick span:hover { background: rgba(176,138,74,.1); }
.shoot input[type="text"] {
  font-family: inherit; font-size: .88rem; width: 100%;
  padding: 11px 13px; border-radius: 11px;
  background: var(--cream-2); color: var(--ink); border: 1px solid var(--line);
}
#shotGo {
  font-family: inherit; font-size: .88rem; font-weight: 700; cursor: pointer;
  padding: 12px; border: 0; border-radius: 11px;
  background: var(--burgundy); color: #FBF6EC;
}
#shotGo:disabled { opacity: .6; cursor: wait; }
.sh-note { margin: 0; font-size: .72rem; color: var(--ink-soft); }
