/* ============================================================
   في السكة — نظام التصميم
   شكل تطبيقات التوصيل: كروت، تدرجات، أيقونات، شريط سفلي، حركة.
   ============================================================ */

:root {
  /* الهوية — أخضر لأن كل المنتج مبني على «متاح» */
  --brand-700: #00815A;
  --brand-600: #00A86B;
  --brand-500: #0FBF7F;
  --brand-400: #2BD99A;
  --brand-tint: #E6F9F0;

  --ink-900: #0B1220;
  --ink-700: #1C2736;
  --ink-600: #36425A;
  --ink-500: #5A6880;
  --ink-400: #8A96AD;
  --ink-300: #B9C2D2;

  --canvas: #F2F6F9;
  --surface: #FFFFFF;
  --line: #E6ECF2;

  --amber: #FFB020;
  --amber-tint: #FFF6E3;
  --sky: #2E7DF6;
  --sky-tint: #E8F1FE;
  --rose: #F0374B;
  --rose-tint: #FEECEE;

  --hero: linear-gradient(135deg, #00815A 0%, #00A86B 45%, #2BD99A 100%);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-full: 999px;

  --sh-card: 0 1px 2px rgba(11, 18, 32, .04), 0 8px 24px -12px rgba(11, 18, 32, .16);
  --sh-lift: 0 2px 6px rgba(11, 18, 32, .06), 0 18px 40px -16px rgba(11, 18, 32, .28);
  --sh-brand: 0 8px 22px -8px rgba(0, 168, 107, .55);

  --pad: 16px;
  --tap: 52px;
  --wrap: 560px;
  --nav-h: 68px;

  --ease: cubic-bezier(.22, .9, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink-900: #F2F6FA;
    --ink-700: #DDE5EE;
    --ink-600: #B4C0D0;
    --ink-500: #8E9BAE;
    --ink-400: #6D7A8C;
    --ink-300: #4A5566;

    --canvas: #070B12;
    --surface: #111826;
    --line: #202B3D;

    --brand-tint: #06281D;
    --amber-tint: #2A2008;
    --sky-tint: #0B1D36;
    --rose-tint: #2A0F14;

    --sh-card: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 26px -14px rgba(0, 0, 0, .8);
    --sh-lift: 0 2px 8px rgba(0, 0, 0, .55), 0 20px 44px -18px rgba(0, 0, 0, .9);
  }
}

* { box-sizing: border-box; }

/* 🔴 قاعدة [hidden] بتاعة المتصفح ضعيفة، وأي display في كلاس بيغلبها.
   من غير السطر ده، الصفوف المفلترة بتفضل ظاهرة والأوراق المقفولة
   بتغطي الصفحة. لازم يفضل فوق كل حاجة. */
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--canvas);
  color: var(--ink-900);
  font-family: 'Alexandria', 'Segoe UI', Tahoma, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; }

.app { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 14px); }

/* ---------- الحركة ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop  { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.rise { animation: rise .42s var(--ease) both; }
.pop  { animation: pop .3s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- الهيدر ---------- */

.hero {
  background: var(--hero);
  color: #fff;
  padding: 16px var(--pad) 54px;
  border-end-start-radius: 26px;
  border-end-end-radius: 26px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset-block-start: -70px;
  inset-inline-start: -50px;
  width: 210px; height: 210px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
}
.hero > * { position: relative; z-index: 1; }

.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; }
.hero-logo {
  width: 34px; height: 34px; border-radius: 11px;
  background: rgba(255, 255, 255, .2);
  display: grid; place-items: center;
}

.zonepick {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: var(--r-full);
  padding: 8px 14px;
  color: #fff; font-size: 14px; font-weight: 600;
  min-height: 40px;
  cursor: pointer;
}


.hero h1 {
  margin: 16px 0 5px;
  font-size: clamp(21px, 5.9vw, 26px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.45;
}
.hero p { margin: 0; font-size: 15px; opacity: .88; }

/* ---------- البحث ---------- */

.searchwrap { margin: -30px var(--pad) 0; position: relative; z-index: 3; }
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lift);
  padding: 0 16px;
  min-height: 56px;
}
.search input {
  flex: 1; border: 0; background: none; color: var(--ink-900);
  font: inherit; font-size: 16px; min-width: 0; padding: 16px 0;
}
.search input::placeholder { color: var(--ink-400); }
.search input:focus { outline: none; }
.search svg { color: var(--ink-400); flex: 0 0 auto; }
.search .clear {
  border: 0; background: var(--canvas); color: var(--ink-500);
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; flex: 0 0 auto;
}

/* ---------- عناوين الأقسام ---------- */

.sec { padding: 20px var(--pad) 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.sec-head h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.sec-head .side { font-size: 14px; color: var(--ink-500); font-weight: 600; }

/* ---------- أيقونات الخدمات ---------- */

.services {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px var(--pad) 2px;
  margin: 0 calc(var(--pad) * -1);
  scroll-padding-inline: var(--pad);
}
.services::-webkit-scrollbar { display: none; }
.services::after { content: ''; flex: 0 0 8px; }

.svc {
  flex: 0 0 auto;
  width: 74px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 10px 4px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 2px solid transparent;
  box-shadow: var(--sh-card);
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.svc:active { transform: scale(.95); }
.svc[aria-pressed='true'] { border-color: var(--brand-600); }
.svc .bubble {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  color: #fff;
}
.svc span { font-size: 12.5px; font-weight: 700; color: var(--ink-700); text-align: center; line-height: 1.25; }
.svc[aria-pressed='true'] span { color: var(--brand-700); }

.b-all      { background: linear-gradient(140deg, #36425A, #0B1220); }
.b-delivery { background: linear-gradient(140deg, #00C07E, #00815A); }
.b-tuktuk   { background: linear-gradient(140deg, #FFC24D, #F08C00); }
.b-goods    { background: linear-gradient(140deg, #5B9BFF, #2452D6); }
.b-bicycle  { background: linear-gradient(140deg, #4FD1D9, #12879B); }
.b-mahalla  { background: linear-gradient(140deg, #B07CFF, #6D2FD4); }

/* ---------- شرائح القرى ---------- */

.zones { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.zones::-webkit-scrollbar { display: none; }
.zones::after { content: ''; flex: 0 0 8px; }
.zchip {
  flex: 0 0 auto; min-height: 40px;
  display: inline-flex; align-items: center;
  padding: 0 15px; border-radius: var(--r-full);
  background: var(--surface); border: 1.5px solid var(--line);
  color: var(--ink-600); font-size: 14.5px; font-weight: 700;
  transition: transform .16s var(--ease);
}
.zchip:active { transform: scale(.95); }
.zchip[aria-pressed='true'] {
  background: var(--ink-900); border-color: var(--ink-900); color: var(--canvas);
}

/* ---------- كارت السائق ---------- */

.cards { display: flex; flex-direction: column; gap: 12px; }

.row {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-card);
  padding: 15px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  border: 1.5px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.row.live { border-color: rgba(0, 168, 107, .3); }
.row:active { transform: scale(.985); }

.avatar {
  width: 52px; height: 52px; border-radius: 17px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px; color: #fff;
  position: relative; flex: 0 0 auto;
}
.avatar .vbadge {
  position: absolute; inset-block-end: -4px; inset-inline-end: -4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--sky); color: #fff;
  display: grid; place-items: center;
  border: 2.5px solid var(--surface);
}

.row .head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.row h3 { margin: 0; font-size: 17.5px; font-weight: 800; letter-spacing: -.01em; }

.rate {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--amber-tint); color: #8A5B00;
  border-radius: var(--r-full); padding: 2px 8px;
  font-size: 12.5px; font-weight: 800;
}
@media (prefers-color-scheme: dark) { .rate { color: var(--amber); } }

.row .meta {
  margin: 5px 0 0; color: var(--ink-500); font-size: 14px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.row .subnote { margin: 3px 0 0; color: var(--ink-400); font-size: 13.5px; line-height: 1.5; }

.state {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: var(--r-full); padding: 5px 11px 5px 9px;
  font-size: 13px; font-weight: 800; margin-top: 9px;
}
.state.on  { background: var(--brand-tint); color: var(--brand-700); }
.state.off { background: var(--canvas); color: var(--ink-500); }
@media (prefers-color-scheme: dark) { .state.on { color: var(--brand-400); } }
.state .since { font-weight: 500; opacity: .8; }

.beacon { position: relative; width: 9px; height: 9px; flex: 0 0 auto; }
.beacon i {
  position: absolute; inset: 0; border-radius: 50%; background: currentColor;
}
.state.on .beacon i:first-child { animation: ping 1.9s var(--ease) infinite; }

.row .actions { display: flex; gap: 9px; margin-top: 13px; }

/* ---------- الأزرار ---------- */

.btn {
  min-height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 18px; border-radius: 14px; border: 0;
  background: var(--ink-900); color: var(--canvas);
  font-size: 16px; font-weight: 800; cursor: pointer;
  transition: transform .16s var(--ease), opacity .16s var(--ease);
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .55; transform: none; cursor: default; }

.btn.call { background: var(--brand-600); color: #fff; box-shadow: var(--sh-brand); white-space: nowrap; }
.row .btn.call { flex: 1 1 auto; min-width: 0; padding: 0 12px; }
.btn.wa   { background: #25D366; color: #fff; flex: 0 0 auto; width: 54px; padding: 0; }
.btn.ghost { background: var(--surface); color: var(--ink-900); border: 1.5px solid var(--line); }
.btn.quiet { background: var(--canvas); color: var(--ink-600); font-size: 14.5px; font-weight: 700; min-height: 44px; padding: 0 14px; border-radius: 12px; }
.row .btn.quiet { flex: 0 0 auto; width: 46px; padding: 0; min-height: var(--tap); }
.btn.danger { background: var(--rose); color: #fff; }
.btn.wide { width: 100%; }

.linkish {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 11px; font-size: 14px; font-weight: 700; color: var(--ink-500);
}

/* ---------- الشريط السفلي ---------- */

.nav {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 40;
  background: var(--surface);
  border-block-start: 1px solid var(--line);
  padding-block-end: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -6px 24px -14px rgba(11, 18, 32, .3);
}
.nav ul {
  max-width: var(--wrap); margin: 0 auto; padding: 0;
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
}
.nav a {
  height: var(--nav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--ink-400); font-size: 11.5px; font-weight: 700;
  transition: color .18s var(--ease);
}
.nav a[aria-current='page'] { color: var(--brand-600); }
.nav .ic { transition: transform .2s var(--ease); }
.nav a[aria-current='page'] .ic { transform: translateY(-2px); }

/* ---------- الحالة الفاضية ---------- */

.empty {
  background: var(--surface); border-radius: var(--r-lg);
  padding: 34px 22px; text-align: center; box-shadow: var(--sh-card);
}
.empty .ill {
  width: 70px; height: 70px; border-radius: 24px; margin: 0 auto 16px;
  background: var(--brand-tint); color: var(--brand-600);
  display: grid; place-items: center;
}
.empty h3 { margin: 0 0 7px; font-size: 18px; font-weight: 800; }
.empty p { margin: 0 0 18px; color: var(--ink-500); font-size: 15px; }

/* ---------- القسم المطوي ---------- */

details.offline { margin-top: 12px; }
details.offline > summary {
  list-style: none; cursor: pointer;
  background: var(--surface); border-radius: var(--r-md);
  padding: 15px 17px; min-height: var(--tap);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 800; font-size: 15px; color: var(--ink-600);
  box-shadow: var(--sh-card);
}
details.offline > summary::-webkit-details-marker { display: none; }
details.offline > summary .chev { transition: transform .22s var(--ease); color: var(--ink-400); }
details.offline[open] > summary .chev { transform: rotate(180deg); }
details.offline[open] > summary { border-end-start-radius: 0; border-end-end-radius: 0; }
details.offline .cards { margin-top: 12px; }

/* ---------- الصفحات الداخلية ---------- */

.page { padding: 20px var(--pad) 30px; }
.page h1 { font-size: 24px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.02em; }
.page h2 { font-size: 17px; font-weight: 800; margin: 28px 0 12px; }
.page .lede { color: var(--ink-500); margin: 0 0 20px; font-size: 15px; }

.card {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--sh-card); padding: 18px; margin-bottom: 14px;
}

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; color: var(--ink-700); }
.field input, .field textarea, .field select {
  width: 100%; min-height: var(--tap);
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--canvas); color: var(--ink-900); font: inherit; font-size: 16px;
  transition: border-color .18s var(--ease);
}
.field textarea { min-height: 108px; resize: vertical; line-height: 1.6; }
.field :is(input, textarea, select):focus { border-color: var(--brand-600); outline: none; }

.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px;
  border: 1.5px solid var(--line); border-radius: var(--r-full);
  padding: 8px 14px; font-size: 14.5px; font-weight: 700; cursor: pointer;
  background: var(--surface);
}
.checks input { width: 18px; height: 18px; accent-color: var(--brand-600); }

.note {
  display: flex; gap: 11px;
  background: var(--sky-tint); color: var(--ink-700);
  border-radius: var(--r-md); padding: 14px 15px; margin: 0 0 16px;
  font-size: 14.5px; line-height: 1.6;
}
.note .ic { color: var(--sky); flex: 0 0 auto; margin-top: 2px; }
.note.warn { background: var(--rose-tint); }
.note.warn .ic { color: var(--rose); }
.note strong { font-weight: 800; }

.msg {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 15px; border-radius: 14px; margin-bottom: 16px;
  font-weight: 700; font-size: 14.5px;
}
.msg.ok  { background: var(--brand-tint); color: var(--brand-700); }
.msg.bad { background: var(--rose-tint); color: var(--rose); }
@media (prefers-color-scheme: dark) { .msg.ok { color: var(--brand-400); } }

/* ---------- الأسعار ---------- */

.price {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.price:last-child { border-bottom: 0; }
.price .bubble { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.price .t { flex: 1; min-width: 0; }
.price .t b { display: block; font-size: 15.5px; font-weight: 800; }
.price .t span { color: var(--ink-500); font-size: 13.5px; }
.price .v { font-weight: 800; font-size: 16px; white-space: nowrap; color: var(--brand-700); }
@media (prefers-color-scheme: dark) { .price .v { color: var(--brand-400); } }

/* ---------- الطلبات ---------- */

.req { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-card); padding: 16px; margin-bottom: 12px; }
.req p { margin: 0 0 11px; font-size: 15.5px; line-height: 1.6; }
.req .when { display: flex; align-items: center; gap: 7px; color: var(--ink-400); font-size: 13px; font-weight: 600; }

/* ---------- زرار السائق ---------- */

.toggle {
  width: 100%; min-height: 180px;
  border: 0; border-radius: 26px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  font-size: 27px; font-weight: 800; color: #fff;
  transition: transform .2s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
  position: relative; overflow: hidden;
}
.toggle.on  { background: var(--hero); box-shadow: 0 16px 40px -14px rgba(0, 168, 107, .75); }
.toggle.off { background: linear-gradient(140deg, #5A6880, #36425A); box-shadow: var(--sh-card); }
.toggle:active { transform: scale(.97); }
.toggle small { font-size: 14.5px; font-weight: 600; opacity: .92; }
.toggle .ring {
  position: absolute; width: 130px; height: 130px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3);
}
.toggle.on .ring { animation: ping 2.6s var(--ease) infinite; }

/* ---------- الورقة السفلية ---------- */

.scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(11, 18, 32, .5);
  animation: fadeIn .22s var(--ease) both;
  display: flex; align-items: flex-end; justify-content: center;
}

.sheet {
  width: 100%; max-width: var(--wrap);
  background: var(--surface);
  border-start-start-radius: 26px; border-start-end-radius: 26px;
  padding: 10px var(--pad) calc(22px + env(safe-area-inset-bottom, 0px));
  animation: sheetUp .3s var(--ease) both;
}
.grab { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 16px; }

/* ---------- الإدارة ---------- */

.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; }
.tabs::-webkit-scrollbar { display: none; }

.admin-row {
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--sh-card);
  padding: 15px; margin-bottom: 11px;
}
.admin-row .who { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.admin-row .sub { color: var(--ink-500); font-size: 13.5px; margin-top: 4px; }
.admin-row .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.tokenbox {
  font-family: ui-monospace, monospace; font-size: 12.5px;
  background: var(--canvas); border-radius: 10px; padding: 10px;
  word-break: break-all; margin-top: 10px; color: var(--ink-600);
}
.pill { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: var(--r-full); }
.pill.on   { background: var(--brand-tint); color: var(--brand-700); }
.pill.warn { background: var(--rose); color: #fff; }
.pill.info { background: var(--sky-tint); color: var(--sky); }

/* ---------- التذييل ---------- */

.foot { padding: 24px var(--pad) 8px; color: var(--ink-400); font-size: 13px; line-height: 1.7; }
.foot p { margin: 0 0 9px; }
.foot a { color: var(--ink-600); font-weight: 700; }

/* ---------- تصنيفات المحلات ---------- */

.b-restaurant  { background: linear-gradient(140deg, #FF8A5B, #E0452B); }
.b-supermarket { background: linear-gradient(140deg, #5B9BFF, #2452D6); }
.b-grocery     { background: linear-gradient(140deg, #00C07E, #00815A); }
.b-herbalist   { background: linear-gradient(140deg, #8FD14F, #46811F); }
.b-bakery      { background: linear-gradient(140deg, #FFC24D, #D98A00); }
.b-butcher     { background: linear-gradient(140deg, #FF7A8A, #C42A48); }
.b-produce     { background: linear-gradient(140deg, #7ED957, #2E9E3E); }
.b-pharmacy    { background: linear-gradient(140deg, #4FD1D9, #0E7C8C); }
.b-stationery  { background: linear-gradient(140deg, #B07CFF, #6D2FD4); }
.b-sweets      { background: linear-gradient(140deg, #FF9ECD, #D2338A); }
.b-hardware    { background: linear-gradient(140deg, #9AA6B8, #4C596D); }
.b-phones      { background: linear-gradient(140deg, #6FD1FF, #1E7FC0); }
.b-other       { background: linear-gradient(140deg, #A9B4C4, #5C6879); }

/* ---------- سعر البداية لكل مركبة ---------- */

.rates { display: flex; flex-direction: column; gap: 10px; }
.rate-row {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface); border-radius: var(--r-md);
  box-shadow: var(--sh-card); padding: 13px 15px;
}
.rate-row .bubble { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.rate-row .t { flex: 1; min-width: 0; }
.rate-row .t b { display: block; font-size: 15.5px; font-weight: 800; }
.rate-row .t span { color: var(--ink-500); font-size: 13px; }
.rate-row .v { text-align: center; flex: 0 0 auto; }
.rate-row .v em {
  display: block; font-style: normal; font-size: 11px;
  font-weight: 700; color: var(--ink-400);
}
.rate-row .v b { font-size: 21px; font-weight: 800; color: var(--brand-700); letter-spacing: -.02em; }
@media (prefers-color-scheme: dark) { .rate-row .v b { color: var(--brand-400); } }

/* ---------- خطوات الطلب في الورقة السفلية ---------- */

.step { display: flex; gap: 12px; margin-bottom: 16px; }
.step .n {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  background: var(--brand-600); color: #fff;
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
}
.step .c { flex: 1; min-width: 0; }
.step .c b { display: block; font-size: 15.5px; font-weight: 800; margin-bottom: 3px; }
.step .c p { margin: 0 0 10px; color: var(--ink-500); font-size: 14px; line-height: 1.55; }
.step .actions { display: flex; gap: 9px; }

.mini {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.mini:last-child { border-bottom: 0; }
.mini .t { flex: 1; min-width: 0; }
.mini .t b { display: block; font-size: 15px; font-weight: 800; }
.mini .t span { color: var(--ink-500); font-size: 12.5px; }

/* ---------- بلاطة تنقّل ---------- */

.tile {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--sh-card); padding: 14px 15px;
  transition: transform .18s var(--ease);
}
.tile:active { transform: scale(.985); }
.tile .bubble { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.tile .t { flex: 1; min-width: 0; }
.tile .t b { display: block; font-size: 16px; font-weight: 800; }
.tile .t span { color: var(--ink-500); font-size: 13.5px; }
.tile .go { color: var(--ink-300); transform: rotate(90deg); flex: 0 0 auto; }

/* ---------- صور الحسابات ---------- */

.avatar.photo { background: var(--canvas); overflow: visible; }
.avatar.photo img {
  width: 100%; height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

/* ---------- رفع صورة ---------- */

.photofield {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1.5px dashed var(--line);
  border-radius: var(--r-md); padding: 14px; margin-bottom: 14px;
}
.photofield .prev {
  width: 64px; height: 64px; border-radius: 20px; flex: 0 0 auto;
  background: var(--canvas); color: var(--ink-400);
  display: grid; place-items: center; overflow: hidden;
}
.photofield .prev img { width: 100%; height: 100%; object-fit: cover; }
.photofield .t { flex: 1; min-width: 0; }
.photofield .t b { display: block; font-size: 15px; font-weight: 800; }
.photofield .t span { color: var(--ink-500); font-size: 13px; }
.photofield input[type='file'] { display: none; }
.photofield .pick {
  border: 1.5px solid var(--line); background: var(--canvas); color: var(--ink-700);
  border-radius: 12px; padding: 10px 14px; font-size: 14.5px; font-weight: 700;
  cursor: pointer; min-height: 44px; flex: 0 0 auto;
}

/* ---------- الريفيوز ---------- */

.review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review .top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.review .who { font-weight: 800; font-size: 14.5px; }
.review .when { color: var(--ink-400); font-size: 12.5px; margin-inline-start: auto; }
.review p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-700); }
.stars-row { display: inline-flex; gap: 1px; color: var(--amber); }
.stars-row .off { color: var(--ink-300); }

/* ---------- إحصائيات الإدارة ---------- */

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat {
  background: var(--surface); border-radius: var(--r-md);
  box-shadow: var(--sh-card); padding: 13px 12px; text-align: center;
}
.stat b { display: block; font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--ink-500); font-weight: 700; }
.stat.alert b { color: var(--rose); }
.stat.good b { color: var(--brand-600); }

/* ---------- المحادثة ---------- */

.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.bubble-msg {
  max-width: 80%; padding: 11px 14px; border-radius: 18px;
  font-size: 15px; line-height: 1.55;
}
.bubble-msg.mine {
  align-self: flex-start; background: var(--brand-600); color: #fff;
  border-end-start-radius: 6px;
}
.bubble-msg.theirs {
  align-self: flex-end; background: var(--surface); color: var(--ink-900);
  box-shadow: var(--sh-card); border-end-end-radius: 6px;
}
.bubble-msg .who { display: block; font-size: 12px; font-weight: 800; opacity: .8; margin-bottom: 3px; }
.bubble-msg .at { display: block; font-size: 11px; opacity: .65; margin-top: 4px; }
.chat-empty { text-align: center; color: var(--ink-400); font-size: 14.5px; padding: 26px 0; }


/* ============================================================
   إضافات نسخة PHP
   ============================================================ */

/* الرقم + زرار اتصال + نسخ */
.telbox{display:flex;align-items:center;gap:8px;background:var(--canvas);border:1.5px solid var(--line);
  border-radius:14px;padding:8px 10px 8px 8px;margin-top:10px;flex-wrap:wrap}
.telbox .num{flex:1 1 120px;font-weight:800;font-size:16.5px;letter-spacing:.02em;
  font-variant-numeric:tabular-nums;direction:ltr;text-align:left;user-select:all;padding-inline-start:6px}
.telbox .tb-call{display:inline-flex;align-items:center;gap:6px;background:var(--brand-600);color:#fff;
  border-radius:11px;padding:10px 14px;font-size:14.5px;font-weight:800;min-height:44px;white-space:nowrap}
.telbox .tb-copy{background:var(--surface);color:var(--ink-600);border:1.5px solid var(--line);
  border-radius:11px;padding:10px 12px;font-size:14px;font-weight:700;cursor:pointer;min-height:44px}

/* شبكة الإدارة */
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:20px}
.stat{background:var(--surface);border-radius:var(--r-md);box-shadow:var(--sh-card);padding:13px 12px;text-align:center}
.stat b{display:block;font-size:23px;font-weight:800;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.stat span{font-size:12px;color:var(--ink-500);font-weight:700}
.stat.alert b{color:var(--rose)} .stat.good b{color:var(--brand-600)}
.tabs{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin-bottom:18px;padding-bottom:2px}
.tabs::-webkit-scrollbar{display:none}
.tabs::after{content:'';flex:0 0 8px}

/* الريفيوز */
.review{padding:14px 0;border-bottom:1px solid var(--line)}
.review:last-child{border-bottom:0}
.review .top{display:flex;align-items:center;gap:8px;margin-bottom:6px;flex-wrap:wrap}
.review .who{font-weight:800;font-size:14.5px}
.review .when{color:var(--ink-400);font-size:12.5px;margin-inline-start:auto}
.review p{margin:0;font-size:15px;line-height:1.6;color:var(--ink-700)}
.stars-row{display:inline-flex;gap:1px;color:var(--amber)}
.stars-row .off{color:var(--ink-300)}

/* المحادثة */
.chat{display:flex;flex-direction:column;gap:10px;margin-bottom:18px}
.bubble-msg{max-width:82%;padding:11px 14px;border-radius:18px;font-size:15px;line-height:1.55}
.bubble-msg.mine{align-self:flex-start;background:var(--brand-600);color:#fff;border-end-start-radius:6px}
.bubble-msg.theirs{align-self:flex-end;background:var(--surface);color:var(--ink-900);
  box-shadow:var(--sh-card);border-end-end-radius:6px}
.bubble-msg .who{display:block;font-size:12px;font-weight:800;opacity:.8;margin-bottom:3px}
.bubble-msg .at{display:block;font-size:11px;opacity:.65;margin-top:4px}
.chat-empty{text-align:center;color:var(--ink-400);font-size:14.5px;padding:26px 0}

/* رفع صورة */
.photofield{display:flex;align-items:center;gap:14px;background:var(--surface);
  border:1.5px dashed var(--line);border-radius:var(--r-md);padding:14px;margin-bottom:14px}
.photofield .prev{width:64px;height:64px;border-radius:20px;flex:0 0 auto;background:var(--canvas);
  color:var(--ink-400);display:grid;place-items:center;overflow:hidden}
.photofield .prev img{width:100%;height:100%;object-fit:cover}
.photofield .t{flex:1;min-width:0}
.photofield .t b{display:block;font-size:15px;font-weight:800}
.photofield .t span{color:var(--ink-500);font-size:13px}
.photofield input[type=file]{display:none}
.photofield .pick{border:1.5px solid var(--line);background:var(--canvas);color:var(--ink-700);
  border-radius:12px;padding:10px 14px;font-size:14.5px;font-weight:700;cursor:pointer;min-height:44px;flex:0 0 auto}

/* بلاطة تنقّل */
.tile{display:flex;align-items:center;gap:13px;background:var(--surface);border-radius:var(--r-lg);
  box-shadow:var(--sh-card);padding:14px 15px;transition:transform .18s var(--ease)}
.tile:active{transform:scale(.985)}
.tile .bubble{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;color:#fff;flex:0 0 auto}
.tile .t{flex:1;min-width:0}
.tile .t b{display:block;font-size:16px;font-weight:800}
.tile .t span{color:var(--ink-500);font-size:13.5px}
.tile .go{color:var(--ink-300);transform:rotate(90deg);flex:0 0 auto}

/* صورة الحساب */
.avatar.photo{background:var(--canvas);overflow:visible}
.avatar.photo img{width:100%;height:100%;border-radius:inherit;object-fit:cover;display:block}

/* شريط تثبيت التطبيق */
.installbar{display:flex;align-items:center;gap:11px;background:var(--surface);border-radius:var(--r-md);
  box-shadow:var(--sh-card);padding:13px 15px;margin:0 var(--pad) 4px}
.installbar .t{flex:1;min-width:0;font-size:14px;font-weight:700}
.installbar .t span{display:block;color:var(--ink-500);font-size:12.5px;font-weight:400}
.installbar button{background:var(--brand-600);color:#fff;border:0;border-radius:11px;padding:10px 15px;
  font-size:14px;font-weight:800;cursor:pointer;min-height:44px;white-space:nowrap}
.installbar .x{background:none;color:var(--ink-400);padding:8px;min-height:auto}

/* حالة الطلب المخفي */
.hidden-note{margin:10px 0 0;color:var(--ink-500);font-size:14px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
