/* مندوب - نظام التصميم المشترك */
:root {
  --brand: #c8102e;        /* أحمر العلم البحريني */
  --brand-600: #a80d26;
  --brand-50: #fdf2f4;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --line: #e4e7ec;
  --bg: #f6f7f9;
  --card: #ffffff;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --warn: #b54708;
  --warn-bg: #fffaeb;
  --info: #175cd3;
  --info-bg: #eff8ff;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-50: #2a0d13;
    --ink: #f2f4f7;
    --ink-2: #d0d5dd;
    --muted: #98a2b3;
    --line: #2b313c;
    --bg: #0c111b;
    --card: #141a26;
    --ok-bg: #0d2b1f;
    --warn-bg: #2d2008;
    --info-bg: #0c1f3d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
  }
}
:root[data-theme="dark"] {
  --brand-50: #2a0d13; --ink: #f2f4f7; --ink-2: #d0d5dd; --muted: #98a2b3; --line: #2b313c;
  --bg: #0c111b; --card: #141a26; --ok-bg: #0d2b1f; --warn-bg: #2d2008; --info-bg: #0c1f3d;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
img, svg { display: block; max-width: 100%; }
[hidden], .hidden { display: none !important; }

/* ---------- الشريط العلوي ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); }
.brand small { font-weight: 500; color: var(--muted); font-size: 13px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: 15px; }
.nav a:hover { background: var(--bg); }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; border-radius: 12px;
  padding: 11px 18px; cursor: pointer;
  background: var(--brand); color: #fff;
  transition: background .15s, transform .05s, opacity .15s;
  text-align: center;
}
.btn:hover { background: var(--brand-600); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.lg { padding: 14px 24px; font-size: 16px; }
.btn.sm { padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn.ghost:hover { background: var(--brand-50); }
.btn.neutral { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.neutral:hover { background: var(--bg); }
.btn.success { background: var(--ok); }
.btn.success:hover { background: #055d3a; }
.btn.danger { background: transparent; color: #b42318; border-color: #fda29b; }
.btn.danger:hover { background: #fef3f2; }

/* ---------- البطاقات والحقول ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
.card + .card { margin-top: 16px; }
.card h2 { margin: 0 0 4px; font-size: 18px; }
.card .sub { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field .help { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
textarea.input { min-height: 72px; resize: vertical; }
.input-group { position: relative; }
.input-group .suffix {
  position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 14px; pointer-events: none;
}
.input-group .input { padding-inline-end: 56px; }
.input.ltr { direction: ltr; text-align: start; }

.alert { border-radius: 12px; padding: 11px 14px; font-size: 14px; margin-top: 12px; }
.alert.error { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }
.alert.info { background: var(--info-bg); color: var(--info); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- شارات ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--bg); color: var(--ink-2); border: 1px solid var(--line);
}
.badge.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(6,118,71,.5); animation: pulse 1.8s infinite; }
.badge.off::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #d92d20; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge.brand { background: var(--brand-50); color: var(--brand); border-color: transparent; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(6,118,71,.45); } 70% { box-shadow: 0 0 0 8px rgba(6,118,71,0); } 100% { box-shadow: 0 0 0 0 rgba(6,118,71,0); } }

/* ---------- قوائم تفصيلية ---------- */
.kv { display: grid; gap: 0; }
.kv .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.kv .row:last-child { border-bottom: 0; }
.kv .row span:first-child { color: var(--muted); }
.kv .row b { font-weight: 600; text-align: end; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- حالة الطلب ---------- */
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; }
.steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.steps li .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; flex-shrink: 0; background: var(--card); }
.steps li.done { color: var(--ink); }
.steps li.done .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.steps li.now { color: var(--brand); }
.steps li.now .dot { border-color: var(--brand); color: var(--brand); }
.steps li::after { content: ""; flex: 1; height: 2px; background: var(--line); border-radius: 2px; margin-inline-start: 4px; }
.steps li:last-child::after { display: none; }
.steps li.done::after { background: var(--brand); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 18px 0; padding-inline-start: 28px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 6px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 11px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--brand); }
.timeline li.done::after { background: var(--brand); }
.timeline li.now::before { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.timeline strong { display: block; font-size: 15px; }
.timeline small { color: var(--muted); }

/* ---------- العروض ---------- */
.offer {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center;
  padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  transition: border-color .15s, box-shadow .15s;
}
.offer + .offer { margin-top: 10px; }
.offer:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.offer.best { border-color: var(--brand); background: linear-gradient(180deg, var(--brand-50), var(--card)); }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand-50); color: var(--brand);
  display: grid; place-items: center; font-weight: 700; font-size: 17px;
}
.offer .name { font-weight: 700; }
.offer .meta { font-size: 13px; color: var(--muted); }
.offer .price { font-size: 20px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.offer .price small { font-size: 12px; color: var(--muted); font-weight: 600; }
.offer .tag { font-size: 12px; font-weight: 700; color: var(--brand); }

.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty .icon { font-size: 34px; margin-bottom: 6px; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand);
  animation: spin .8s linear infinite; margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- الخريطة ---------- */
.map { height: 340px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg); border: 1px solid var(--line); padding: 4px; border-radius: 14px; margin-bottom: 12px; }
.seg button {
  font: inherit; font-weight: 600; font-size: 14px; border: 0; background: transparent; color: var(--ink-2);
  padding: 9px; border-radius: 10px; cursor: pointer;
}
.seg button { transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .12s ease; }
.seg button:active { transform: scale(.97); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--brand); box-shadow: var(--shadow); animation: seg-pick .28s cubic-bezier(.2,.8,.2,1); }
@keyframes seg-pick { from { transform: scale(.96); } to { transform: none; } }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; }

/* ---------- الفوتر ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 20px; color: var(--muted); font-size: 14px; background: var(--card); }
.footer-inner { max-width: 1120px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- الإشعارات ---------- */
.toast-wrap { position: fixed; bottom: 20px; inset-inline: 0; display: grid; justify-items: center; gap: 8px; z-index: 100; pointer-events: none; }
.toast {
  background: var(--ink); color: var(--card); padding: 12px 18px; border-radius: 12px; font-size: 14.5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2); max-width: min(90vw, 420px); animation: rise .25s ease-out;
}
.toast.error { background: #b42318; color: #fff; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }


/* ---------- التخطيط ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 20px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.side { position: sticky; top: 84px; }
.side .card + .card { margin-top: 16px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- تجاوب ---------- */
@media (max-width: 640px) {
  .topbar-inner { padding: 10px 16px; }
  .brand small { display: none; }
  .nav a.hide-sm { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .wrap { padding: 14px; }
  .offer { grid-template-columns: auto 1fr; }
  .offer .price { font-size: 18px; }
  .offer .price { grid-column: 1 / -1; justify-self: start; }
  .offer .btn { grid-column: 1 / -1; }
  .steps li span.lbl { display: none; }
  .map { height: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- الصفحة الرئيسية: حركة وعالمية ---------- */
.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg); }
.lang-toggle button { font: inherit; font-size: 13px; font-weight: 700; border: 0; background: transparent; color: var(--ink-2); padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.lang-toggle button[aria-pressed="true"] { background: var(--card); color: var(--brand); box-shadow: var(--shadow); }
.hero-glow { position: relative; isolation: isolate; overflow: hidden; }
.hero-glow::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 620px; z-index: -1;
  background: radial-gradient(60% 55% at 70% 30%, rgba(200,16,46,.20), transparent 70%),
              radial-gradient(45% 45% at 15% 20%, rgba(20,33,61,.16), transparent 70%);
  pointer-events: none;
}
@media (prefers-color-scheme: dark) { .hero-glow::before { background: radial-gradient(60% 55% at 70% 30%, rgba(200,16,46,.28), transparent 70%), radial-gradient(45% 45% at 15% 20%, rgba(96,165,250,.14), transparent 70%); } }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ok); }
.live-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.8s infinite; }
.track-box { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 60px -20px rgba(16,24,40,.25); overflow: hidden; }
.track-box svg { width: 100%; height: auto; display: block; background: linear-gradient(160deg, var(--bg), var(--card)); }
.track-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); }
.track-meta b { font-size: 22px; font-weight: 800; color: var(--brand); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; max-width: 520px; }
.stat-row div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 13px; color: var(--muted); }
.stat-row b { display: block; color: var(--ink); font-size: 15px; font-weight: 700; }
.lang-en body, body[dir="ltr"] { font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
[dir="ltr"] .brand, [dir="ltr"] .band li::before { direction: ltr; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .live-pill::before { animation: none; } }

/* ---------- تخطيط الصفحة الرئيسية ---------- */
.hero { padding: 64px 0 40px; }
.hero-grid { max-width: 1120px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.18; margin: 0 0 14px; letter-spacing: -0.5px; font-weight: 800; }
h1 em { font-style: normal; color: var(--brand); display: inline-block; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 540px; margin: 0 0 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta .btn.lg { min-width: 180px; }
.sections { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
section.block { padding: 56px 0; }
section.block h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 8px; font-weight: 800; letter-spacing: -0.3px; }
section.block .intro { color: var(--muted); margin: 0 0 32px; font-size: 17px; max-width: 620px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.feat:hover { transform: translateY(-3px); }
.feat .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.feat .ico svg { width: 22px; height: 22px; }
.feat h3 { margin: 0 0 6px; font-size: 18px; }
.feat p { margin: 0; color: var(--muted); font-size: 15px; }
.step-no { font-size: 13px; font-weight: 800; color: var(--brand); letter-spacing: 1px; }
.band { background: var(--ink); color: #fff; border-radius: 24px; padding: 40px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: center; }
.band h2 { margin: 0 0 10px; font-size: clamp(24px, 3vw, 32px); color: #fff; }
.band p { margin: 0; color: #d0d5dd; }
.band ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.band li { display: flex; gap: 10px; color: #f2f4f7; }
.band li::before { content: "✓"; color: #fca5a5; font-weight: 800; }
.cta { text-align: center; padding: 56px 20px; }
.cta h2 { font-size: clamp(26px, 3.6vw, 38px); margin: 0 0 10px; font-weight: 800; }
.cta p { color: var(--muted); margin: 0 0 24px; font-size: 17px; }
.site-nav-links a, a.site-nav-links { color: var(--ink-2); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .cards { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; padding: 28px; }
  .hero { padding: 36px 0 24px; }
}
@media (max-width: 640px) { .site-nav-links { display: none; } .stat-row { grid-template-columns: 1fr 1fr 1fr; } }

/* زر بشكل رابط (حذف الحساب) */
.linkish { font: inherit; background: none; border: 0; padding: 0; color: #b42318; cursor: pointer; text-decoration: underline; }

/* ---------- محادثة الطلب ---------- */
.chat { border: 1px solid var(--line); border-radius: 14px; margin: 14px 0; overflow: hidden; background: var(--card); }
.chat-head { padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.chat-list { max-height: 220px; min-height: 60px; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.msg { max-width: 82%; padding: 7px 11px; border-radius: 12px; font-size: 14px; line-height: 1.5; background: var(--card); border: 1px solid var(--line); align-self: flex-start; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--brand); color: #fff; border-color: var(--brand); }
.msg small { display: block; opacity: .75; font-size: 11px; margin-top: 2px; }
.chat-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 8px; }
.chat-form { display: flex; gap: 8px; padding: 8px; border-top: 1px solid var(--line); }
.chat-form .input { flex: 1; padding: 9px 12px; }

/* ---------- طلباتي ---------- */
.hist-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.hist-row:last-child { border-bottom: 0; }

/* أرقام الجوال تبقى بترتيبها الصحيح داخل النص العربي */
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- نافذة تسجيل الدخول ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(16, 24, 40, .5); display: grid; place-items: center;
  padding-block: max(16px, env(safe-area-inset-top, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.modal { width: min(420px, 100%); max-height: 100%; overflow-y: auto; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 14px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- المندوب على الخريطة ---------- */
.courier-pin span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff;
  border: 3px solid #175cd3; box-shadow: 0 2px 10px rgba(23, 92, 211, .45); font-size: 20px; line-height: 1; }
.live-eta { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- المناديب المتاحون على خريطة الطلب ---------- */
.courier-near span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff;
  border: 2px solid #175cd3; box-shadow: 0 1px 6px rgba(16, 24, 40, .3); font-size: 15px; line-height: 1; }
.near-count { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--ok); }
.near-count.none { color: var(--muted); font-weight: 500; }
.switch { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { flex-shrink: 0; width: 46px; height: 26px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(20px); }
[dir="rtl"] .switch input:checked + .track::after { transform: translateX(-20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch small { display: block; }

/* ---------- موقعي الحالي ---------- */
.locate-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }

.me-dot span { display: block; width: 22px; height: 22px; border-radius: 50%; background: #175cd3; border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(23,92,211,.35), 0 2px 6px rgba(0,0,0,.35); animation: mePulse 2s infinite; box-sizing: border-box; }
@keyframes mePulse { 0% { box-shadow: 0 0 0 0 rgba(23,92,211,.55), 0 2px 6px rgba(0,0,0,.35); } 70% { box-shadow: 0 0 0 14px rgba(23,92,211,0), 0 2px 6px rgba(0,0,0,.35); } 100% { box-shadow: 0 0 0 0 rgba(23,92,211,0), 0 2px 6px rgba(0,0,0,.35); } }
@media (prefers-reduced-motion: reduce) { .me-dot span { animation: none; } }
.point-pin span { display: block; width: 26px; height: 26px; border-radius: 50%; border: 4px solid #fff; box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0,0,0,.4); cursor: grab; }
.point-pin.pickup span { background: #067647; }
.point-pin.drop span { background: #c8102e; }
#map { position: relative; }
.me-btn { position: absolute; z-index: 1000; bottom: 14px; inset-inline-end: 12px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: #fff; color: #175cd3; font-size: 24px; line-height: 1; box-shadow: 0 2px 8px rgba(0,0,0,.3); cursor: pointer; }
.me-btn.hidden { display: none; }
.me-status { margin-top: 6px; }
.me-status.good { color: #067647; }
.me-status.ok { color: #b54708; }
.me-status.bad { color: #c8102e; }

.place-search { position: relative; margin: 10px 0 8px; }
.place-search input { width: 100%; box-sizing: border-box; }
.place-results { position: absolute; z-index: 1100; inset-inline: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none;
  background: #fff; border: 1px solid #e4e7ec; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.15); max-height: 260px; overflow: auto; }
.place-results.hidden { display: none; }
.place-results li { padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1.4; }
.place-results li:hover, .place-results li:focus { background: #f2f4f7; outline: none; }
.place-results li:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.place-results li.empty { color: #667085; cursor: default; }

.addr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.addr-grid .input { padding-inline: 8px; font-size: 14px; min-width: 0; }
@media (max-width: 420px) { .addr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.addr-line { font-size: 13px; margin-top: 2px; }

.short-link { background: #fffaeb; border: 1px solid #fedf89; color: #93370d; border-radius: 12px; padding: 10px 14px; margin: 0 0 8px; font-size: 14px; }
.short-link.hidden { display: none; }
.short-link ol { margin: 6px 0 0; padding-inline-start: 20px; }
.short-link li { margin: 3px 0; }
.short-link a { font-weight: 700; }

.saved-places { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; margin-top: 10px; scrollbar-width: none; }
.saved-places.hidden { display: none; }
.saved-places::-webkit-scrollbar { display: none; }
.place-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 1px solid #e4e7ec; background: #fff;
  border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 14px; cursor: pointer; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.place-chip:hover { border-color: #c8102e; }
.place-chip .x { border: 0; background: none; color: #98a2b3; font-size: 15px; line-height: 1; padding: 0 0 0 2px; cursor: pointer; }
.save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.chip { border: 1px dashed #d0d5dd; background: #f9fafb; border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: #c8102e; color: #c8102e; }
.price-est { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, #fff5f6, #fff); border: 1px solid #fde2e6;
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 14px; }
.price-est.hidden { display: none; }
.price-est b { font-size: 16px; }
.price-est .note { flex-basis: 100%; color: #667085; font-size: 12.5px; }
.hist-row .again { white-space: nowrap; }

.recipient-box .check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.recipient-box .check input { width: 18px; height: 18px; accent-color: #c8102e; }
.rcpt-line { margin-top: 4px; font-size: 13.5px; }

.track-wrap { position: relative; }
.track-wrap.full { position: fixed; inset: 0; z-index: 100000; background: #fff; }
body.map-full { overflow: hidden; }
.track-wrap.full .track-map { height: 100% !important; border-radius: 0; margin: 0; }
.live-pill { position: absolute; z-index: 1000; top: 10px; inset-inline-start: 10px; background: rgba(255,255,255,.95); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.live-pill.hidden { display: none; }
.live-pill.stale { color: #b54708; }
.live-pill .pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #12b76a; margin-inline-end: 6px; animation: mePulse 1.6s infinite; }
.live-pill.stale .pulse { background: #f79009; animation: none; }
.track-tools { position: absolute; z-index: 1000; bottom: 12px; inset-inline-end: 10px; display: flex; flex-direction: column; gap: 8px; }
.map-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; font-size: 19px; box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: pointer; }
.map-btn.hidden { display: none; }
.map-btn.on { background: #175cd3; color: #fff; }
.courier-pin { position: relative; }
.courier-pin .dir { position: absolute; inset: -9px; display: block; transition: transform .6s; pointer-events: none; }
.courier-pin .dir::before { content: ''; position: absolute; top: 0; left: 50%; margin-left: -6px; border: 6px solid transparent; border-bottom: 9px solid #175cd3; border-top: 0; }
.courier-pin .dir.none { display: none; }
.btn.wa { background: #25d366; color: #fff; border-color: #25d366; }
.btn.wa:hover { background: #1ebe5b; }
.wa-link { color: #128c4b; font-weight: 700; text-decoration: none; }

.sched-box { margin-top: 10px; }
.sched-box.hidden { display: none; }
.sched-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sched-badge { background: #eef4ff; color: #1849a9; border: 1px solid #c7d7fe; border-radius: 12px; padding: 8px 12px; font-weight: 700; margin-bottom: 12px; }
.sched-badge.hidden { display: none; }
.sched-chip { display: inline-block; background: #eef4ff; color: #1849a9; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 700; margin-top: 4px; }

.rate-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 4px; }
.chip.on { background: #fff1f3; border-color: #c8102e; border-style: solid; color: #c8102e; font-weight: 700; }
.bid-sort { margin: 6px 0 12px; }
.bid-sort.hidden { display: none; }
.offer .tag.fast { background: #eef4ff; color: #1849a9; }
.offer .tag.top { background: #fef6e7; color: #93370d; }
.offer .tag { margin-inline-end: 4px; }
.earn-card .top-badge { background: #fef6e7; color: #93370d; }
.earn-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 10px; }
.earn-stats > div { background: #f9fafb; border-radius: 12px; padding: 10px; text-align: center; }
.earn-stats span { display: block; font-size: 12.5px; color: #667085; }
.earn-stats b { display: block; font-size: 17px; margin: 2px 0; }
.earn-stats small { color: #667085; font-size: 12px; }
.earn-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 120px; margin: 6px 0 8px; }
.earn-chart .bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.earn-chart .bar i { display: block; width: 70%; max-height: calc(100% - 34px); background: #fda4af; border-radius: 6px 6px 2px 2px; min-height: 3px; }
.earn-chart .bar.today i { background: #c8102e; }
.earn-chart .bar span { font-size: 11px; color: #667085; margin-top: 4px; }
.earn-chart .bar em { order: -1; font-style: normal; font-size: 10.5px; color: #475467; margin-bottom: 2px; min-height: 13px; }
.reviews { margin-top: 10px; }
.reviews.hidden { display: none; }
.reviews summary { cursor: pointer; font-weight: 700; }
.review { border-top: 1px solid #f2f4f7; padding: 8px 0; font-size: 14px; }
.review b { color: #f79009; letter-spacing: 1px; margin-inline-end: 6px; }
.review .tags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.review .chip { font-size: 12px; padding: 2px 8px; cursor: default; }
.offer .tag.fast, .offer .tag.top { padding: 1px 7px; border-radius: 6px; }

.net-hint { margin-top: 6px; color: #475467; }
.fee-box { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #f9fafb; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.fee-box b.due { color: #b42318; }
.fee-box b.ok { color: #067647; }

.btn.nav-go { background: #175cd3; border-color: #175cd3; color: #fff; }
.quick .suggest { background: #fffaeb; border-color: #fedf89; color: #93370d; font-weight: 700; }
.adm-map { height: 520px; border-radius: 14px; overflow: hidden; margin-top: 10px; }
.adm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; }
.adm-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 5px; }

.release-box { margin-top: 10px; }
.release-box summary { cursor: pointer; color: #b42318; font-size: 13.5px; font-weight: 600; }
.release-box .quick { margin-top: 8px; }
.alert.warn { background: #fffaeb; border: 1px solid #fedf89; color: #93370d; }
.alert.warn.hidden { display: none; }

.ok-text { color: #067647; font-weight: 600; }
.err-text { color: #b42318; }
.promo-badge { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; border-radius: 12px; padding: 8px 12px; font-weight: 700; margin-bottom: 12px; }
.promo-badge.hidden { display: none; }
.promo-chip { display: inline-block; background: #ecfdf3; color: #067647; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.promo-line { color: #067647; font-weight: 600; }
.promo-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.promo-form .input { flex: 1 1 160px; }
.promo-form select.input { flex: 0 1 170px; }
b.credit { color: #175cd3; }

/* ---------- الوضع الليلي: العناصر الجديدة والخريطة ---------- */
.theme-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 17px; cursor: pointer; margin-inline-end: 8px; line-height: 1; }
.theme-btn:hover { border-color: var(--brand); }
:root[data-theme="dark"] .place-chip, :root[data-theme="dark"] .place-results, :root[data-theme="dark"] .me-btn, :root[data-theme="dark"] .map-btn, :root[data-theme="dark"] .live-pill, :root[data-theme="dark"] .courier-pin span, :root[data-theme="dark"] .courier-near span, :root[data-theme="dark"] .track-wrap.full { background: #1b2332; color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .chip, :root[data-theme="dark"] .earn-stats > div, :root[data-theme="dark"] .fee-box { background: #1b2332; color: var(--ink-2); border-color: #344054; }
:root[data-theme="dark"] .chip.on { background: #3b0d16; color: #fda4af; border-color: #fda4af; }
:root[data-theme="dark"] .price-est { background: linear-gradient(135deg, #2a0d13, var(--card)); border-color: #4a1520; }
:root[data-theme="dark"] .place-results li:hover, :root[data-theme="dark"] .place-results li:focus { background: #253047; }
:root[data-theme="dark"] .sched-badge, :root[data-theme="dark"] .sched-chip, :root[data-theme="dark"] .offer .tag.fast { background: #0c1f3d; color: #84adff; border-color: #1d3a6e; }
:root[data-theme="dark"] .promo-badge, :root[data-theme="dark"] .promo-chip { background: #0d2b1f; color: #75e0a7; border-color: #16573a; }
:root[data-theme="dark"] .promo-line, :root[data-theme="dark"] .ok-text, :root[data-theme="dark"] .wa-link { color: #75e0a7; }
:root[data-theme="dark"] .short-link, :root[data-theme="dark"] .alert.warn, :root[data-theme="dark"] .quick .suggest, :root[data-theme="dark"] .offer .tag.top, :root[data-theme="dark"] .earn-card .top-badge { background: #2d2008; color: #fec84b; border-color: #5c3d0a; }
:root[data-theme="dark"] .review { border-color: var(--line); }
:root[data-theme="dark"] .earn-chart .bar i { background: #7a2032; }
:root[data-theme="dark"] .earn-chart .bar.today i { background: #f04461; }
:root[data-theme="dark"] .earn-chart .bar em, :root[data-theme="dark"] .earn-chart .bar span { color: var(--muted); }
:root[data-theme="dark"] .map-btn.on { background: #175cd3; color: #fff; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(100%) hue-rotate(180deg) brightness(92%) contrast(88%) saturate(.6); }
:root[data-theme="dark"] .leaflet-control-zoom a, :root[data-theme="dark"] .leaflet-bar a { background: #1b2332; color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .leaflet-popup-content-wrapper, :root[data-theme="dark"] .leaflet-popup-tip { background: #1b2332; color: var(--ink); }
:root[data-theme="dark"] .leaflet-container .leaflet-control-attribution { background: rgba(20,26,38,.8); color: var(--muted); }
:root[data-theme="dark"] .leaflet-container .leaflet-control-attribution a { color: #84adff; }
:root[data-theme="dark"] .err-text, :root[data-theme="dark"] .fee-box b.due { color: #fda29b; }
:root[data-theme="dark"] b.credit { color: #84adff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .place-chip, :root:not([data-theme="light"]) .place-results, :root:not([data-theme="light"]) .me-btn, :root:not([data-theme="light"]) .map-btn, :root:not([data-theme="light"]) .live-pill, :root:not([data-theme="light"]) .courier-pin span, :root:not([data-theme="light"]) .courier-near span, :root:not([data-theme="light"]) .track-wrap.full { background: #1b2332; color: var(--ink); border-color: var(--line); }
  :root:not([data-theme="light"]) .chip, :root:not([data-theme="light"]) .earn-stats > div, :root:not([data-theme="light"]) .fee-box { background: #1b2332; color: var(--ink-2); border-color: #344054; }
  :root:not([data-theme="light"]) .chip.on { background: #3b0d16; color: #fda4af; border-color: #fda4af; }
  :root:not([data-theme="light"]) .price-est { background: linear-gradient(135deg, #2a0d13, var(--card)); border-color: #4a1520; }
  :root:not([data-theme="light"]) .place-results li:hover, :root:not([data-theme="light"]) .place-results li:focus { background: #253047; }
  :root:not([data-theme="light"]) .sched-badge, :root:not([data-theme="light"]) .sched-chip, :root:not([data-theme="light"]) .offer .tag.fast { background: #0c1f3d; color: #84adff; border-color: #1d3a6e; }
  :root:not([data-theme="light"]) .promo-badge, :root:not([data-theme="light"]) .promo-chip { background: #0d2b1f; color: #75e0a7; border-color: #16573a; }
  :root:not([data-theme="light"]) .promo-line, :root:not([data-theme="light"]) .ok-text, :root:not([data-theme="light"]) .wa-link { color: #75e0a7; }
  :root:not([data-theme="light"]) .short-link, :root:not([data-theme="light"]) .alert.warn, :root:not([data-theme="light"]) .quick .suggest, :root:not([data-theme="light"]) .offer .tag.top, :root:not([data-theme="light"]) .earn-card .top-badge { background: #2d2008; color: #fec84b; border-color: #5c3d0a; }
  :root:not([data-theme="light"]) .review { border-color: var(--line); }
  :root:not([data-theme="light"]) .earn-chart .bar i { background: #7a2032; }
  :root:not([data-theme="light"]) .earn-chart .bar.today i { background: #f04461; }
  :root:not([data-theme="light"]) .earn-chart .bar em, :root:not([data-theme="light"]) .earn-chart .bar span { color: var(--muted); }
  :root:not([data-theme="light"]) .map-btn.on { background: #175cd3; color: #fff; }
  :root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(100%) hue-rotate(180deg) brightness(92%) contrast(88%) saturate(.6); }
  :root:not([data-theme="light"]) .leaflet-control-zoom a, :root:not([data-theme="light"]) .leaflet-bar a { background: #1b2332; color: var(--ink); border-color: var(--line); }
  :root:not([data-theme="light"]) .leaflet-popup-content-wrapper, :root:not([data-theme="light"]) .leaflet-popup-tip { background: #1b2332; color: var(--ink); }
  :root:not([data-theme="light"]) .leaflet-container .leaflet-control-attribution { background: rgba(20,26,38,.8); color: var(--muted); }
  :root:not([data-theme="light"]) .leaflet-container .leaflet-control-attribution a { color: #84adff; }
  :root:not([data-theme="light"]) .err-text, :root:not([data-theme="light"]) .fee-box b.due { color: #fda29b; }
  :root:not([data-theme="light"]) b.credit { color: #84adff; }
}

.wa-steps { margin: 10px 0 14px; padding-inline-start: 22px; line-height: 1.9; }
.wa-code { margin-top: 12px; text-align: center; font-size: 15px; }
.wa-code b { font-size: 22px; letter-spacing: 3px; }
.wa-wait { margin-top: 10px; text-align: center; }
.wa-settings { max-width: 460px; margin-top: 12px; }
.wa-settings .check { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 10px 0 4px; }

.wa-status { margin-top: 12px; }

.veh-grid { margin-top: 12px; gap: 10px; }
.veh-grid label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.veh-line { margin-top: 2px; color: var(--ink-2); }
.veh-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.veh-form .input { flex: 1 1 120px; padding-block: 8px; }
.veh-form.hidden { display: none; }
.veh-tag { color: var(--ink-2); margin-top: 2px; }
.warn-text { color: #b54708; font-weight: 600; }
.size-seg { margin-top: 10px; }
.size-seg button { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.2; padding-block: 8px; }
.size-seg small { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.size-chip-row { margin-top: 6px; }
.size-chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 700; background: #f2f4f7; color: #344054; }
.size-chip.medium { background: #fef6e7; color: #93370d; }
.size-chip.large { background: #fee4e2; color: #b42318; }
:root[data-theme="dark"] .size-chip { background: #1b2332; color: var(--ink-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .size-chip { background: #1b2332; color: var(--ink-2); } }

.proof-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.proof-btn { cursor: pointer; }
.proof-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; border: 2px solid #12b76a; }
.proof-view { margin: 12px 0 16px; }
.proof-view.hidden { display: none; }
.proof-view img { width: 100%; max-height: 360px; object-fit: contain; border-radius: 14px; background: #f2f4f7; display: block; }
.proof-view figcaption { margin-top: 6px; text-align: center; }

/* ---------- بطاقة الوصول ---------- */
.eta-card { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.eta-card.near { border-color: #12b76a; background: linear-gradient(180deg, #ecfdf3, var(--card)); }
.eta-num { display: grid; place-items: center; min-width: 64px; height: 64px; border-radius: 16px; background: var(--brand); color: #fff; line-height: 1; }
.eta-card.near .eta-num { background: #12b76a; }
.eta-num b { font-size: 28px; font-variant-numeric: tabular-nums; }
.eta-num small { font-size: 12px; opacity: .9; margin-top: -10px; }
.eta-body { flex: 1; min-width: 0; }
.eta-title { font-weight: 700; }
.eta-bar { position: relative; height: 8px; margin-top: 8px; border-radius: 99px; background: var(--line); overflow: visible; }
.eta-bar i { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand), #f04438); transition: width .9s ease; }
.eta-card.near .eta-bar i { background: #12b76a; }
.eta-bar span { position: absolute; inset-inline-end: -4px; top: 50%; transform: translateY(-50%); font-size: 14px; }
.courier-pin.near span { animation: nearPulse 1.4s infinite; border-color: #12b76a; }
@keyframes nearPulse { 0% { box-shadow: 0 0 0 0 rgba(18,183,106,.55); } 70% { box-shadow: 0 0 0 16px rgba(18,183,106,0); } 100% { box-shadow: 0 0 0 0 rgba(18,183,106,0); } }

/* ---------- حركات خفيفة ---------- */
.offer.new { animation: offerIn .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes offerIn { from { opacity: 0; transform: translateY(14px) scale(.97); } 60% { box-shadow: 0 0 0 4px var(--brand-50); } to { opacity: 1; transform: none; } }
.card.enter { animation: rise .38s cubic-bezier(.2,.8,.2,1) both; }
.btn { transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, opacity .2s; }
.btn:active:not([disabled]) { transform: scale(.97); }
#donePanel.enter #doneTitle { animation: popIn .6s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes popIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
#steps li.now::before { animation: pulse 1.8s infinite; }
.confetti { position: fixed; inset: 0; z-index: 3000; pointer-events: none; }
:root[data-theme="dark"] .eta-card.near { background: linear-gradient(180deg, rgba(18,183,106,.16), var(--card)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .eta-card.near { background: linear-gradient(180deg, rgba(18,183,106,.16), var(--card)); } }
@media (prefers-reduced-motion: reduce) {
  .offer.new, .card.enter, #donePanel.enter #doneTitle, #steps li.now::before, .courier-pin.near span, .seg button[aria-pressed="true"] { animation: none; }
  .seg button { transition: none; }
  .eta-bar i { transition: none; }
}

/* ---------- الاختيار التلقائي ---------- */
.auto-pick { margin: 4px 0 2px; font-weight: 600; }
.auto-note { margin: 0 0 10px; color: var(--brand); font-variant-numeric: tabular-nums; }

/* ---------- الإيصال ---------- */
.rc-overlay { position: fixed; inset: 0; z-index: 2500; background: rgba(16,24,40,.55); display: grid; place-items: center; padding: 16px; animation: rise .25s both; }
.rc-card { width: min(420px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); color: var(--ink); border-radius: 18px; padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.rc-head { display: flex; align-items: center; gap: 10px; }
.rc-head b { font-size: 18px; }
.rc-no { margin: 6px 0 4px; letter-spacing: .5px; }
.rc-sec { border-top: 1px dashed var(--line); padding: 10px 0; }
.rc-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 14px; }
.rc-row span { color: var(--muted); }
.rc-row b { text-align: end; overflow-wrap: anywhere; }
.rc-total { font-size: 17px; padding-top: 6px; }
.rc-total span { color: var(--ink); font-weight: 700; }
.rc-foot { text-align: center; border-top: 1px dashed var(--line); padding-top: 10px; }
.rc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rc-actions .btn { flex: 1 1 auto; }
@media print {
  body.rc-printing > *:not(.rc-overlay) { display: none !important; }
  body.rc-printing .rc-overlay { position: static; background: none; padding: 0; animation: none; }
  body.rc-printing .rc-card { box-shadow: none; max-height: none; color: #000; background: #fff; }
  .no-print { display: none !important; }
}

/* ---------- خريطة الطلبات للمندوب ---------- */
.demand { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; background: var(--card); }
.demand summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.demand-map { height: 260px; border-radius: 12px; margin: 8px 0 6px; overflow: hidden; }
.order-card.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 4px var(--brand-50), 0 0 0 6px var(--brand); } }
@media (prefers-reduced-motion: reduce) { .rc-overlay, .order-card.flash { animation: none; } }

/* ---------- الدفع بالتحويل ---------- */
.pay-box { margin: 14px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); display: grid; gap: 8px; }
.pay-title { font-weight: 700; }
.pay-acc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: var(--brand-50); }
.pay-acc span { color: var(--muted); font-size: 13px; min-width: 70px; }
.pay-acc b { flex: 1; font-variant-numeric: tabular-nums; letter-spacing: .3px; overflow-wrap: anywhere; }
.pay-up { cursor: pointer; justify-self: start; }
.pay-up.disabled { opacity: .5; pointer-events: none; }
.pay-ok { font-weight: 700; color: #067647; }
.pay-line { margin-top: 4px; padding: 6px 8px; border-radius: 8px; background: #fffaeb; color: #93370d; }
.pay-line.ok { background: #ecfdf3; color: #067647; }
.pay-chip { background: #eef4ff; color: #1849a9; }
:root[data-theme="dark"] .pay-line { background: rgba(247,144,9,.14); color: #fec84b; }
:root[data-theme="dark"] .pay-line.ok { background: rgba(18,183,106,.16); color: #6ce9a6; }

.pay-choice .seg.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 420px) { .pay-choice .seg.three { grid-template-columns: 1fr 1fr; } .pay-choice .seg.three button:last-child { grid-column: 1 / -1; } }
.pay-line .btn { margin-top: 6px; display: block; }

/* ---------- تسديد العمولة ---------- */
.settle-box { margin-top: 10px; display: grid; gap: 8px; }
.settle-box > .btn { justify-self: start; }
.st-form { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.st-line { padding: 8px 10px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.st-line.wait { background: #fffaeb; color: #93370d; }
.st-line.ok { background: #ecfdf3; color: #067647; }
.st-line.bad { background: #fef3f2; color: #b42318; }
.settle-reqs { margin: 0 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.settle-reqs h3 { margin: 0 0 8px; font-size: 16px; }
.settle-reqs tr.pending td { background: #fffaeb; }
:root[data-theme="dark"] .st-line.wait, :root[data-theme="dark"] .settle-reqs tr.pending td { background: rgba(247,144,9,.14); color: #fec84b; }
:root[data-theme="dark"] .st-line.ok { background: rgba(18,183,106,.16); color: #6ce9a6; }
:root[data-theme="dark"] .st-line.bad { background: rgba(240,68,56,.16); color: #fda29b; }

/* ---------- سقف الدين ---------- */
.debt-banner { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #fef3f2; color: #b42318; font-weight: 600; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.debt-banner.warn { background: #fffaeb; color: #93370d; }
:root[data-theme="dark"] .debt-banner { background: rgba(240,68,56,.16); color: #fda29b; }
:root[data-theme="dark"] .debt-banner.warn { background: rgba(247,144,9,.14); color: #fec84b; }

#debtBanner { margin: 16px 0 0; }

.debt-stop { text-align: center; }
.debt-stop-icon { font-size: 44px; line-height: 1; margin: 4px 0 8px; }
.debt-stop h3 { margin: 0 0 8px; color: #b42318; }
.debt-stop p { margin: 0; line-height: 1.7; }
.btn.locked { opacity: .75; }

/* ---------- التوثيق ---------- */
.ver-badge { display: inline-block; padding: 1px 7px; border-radius: 999px; background: #ecfdf3; color: #067647; font-size: 12px; font-weight: 700; vertical-align: middle; }
:root[data-theme="dark"] .ver-badge { background: rgba(18,183,106,.16); color: #6ce9a6; }
.idv-line { margin: 4px 0; display: grid; gap: 2px; }
.idv-up { cursor: pointer; font-weight: 700; }
.idv-up.disabled { opacity: .5; pointer-events: none; }

.idv-form { display: grid; gap: 10px; margin-top: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.idv-step { display: grid; gap: 6px; justify-items: start; }
.idv-pick { cursor: pointer; }
.idv-thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 2px solid #12b76a; }
button.idv-up { background: none; border: 0; padding: 0; text-align: start; font: inherit; color: var(--brand); }
.idv-review { width: min(760px, 100%); }
.idv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.idv-pair figure { margin: 0; }
.idv-pair img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 12px; background: #f2f4f7; display: block; }
@media (max-width: 560px) { .idv-pair { grid-template-columns: 1fr; } }

/* ---------- التقارير ---------- */
.report h3 { margin: 18px 0 8px; font-size: 16px; }
.report .kpis { margin-top: 12px; }
.report .kpi small { display: block; margin-top: 2px; font-size: 12px; }
.rp-chart, .rp-hours { display: grid; gap: 3px; align-items: end; height: 140px; }
.rp-hours { grid-template-columns: repeat(24, 1fr); height: 110px; margin-top: 6px; }
.rp-chart .bar, .rp-hours .bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.rp-chart .bar i, .rp-hours .bar i { display: block; width: 100%; min-height: 2px; background: var(--brand); border-radius: 4px 4px 1px 1px; opacity: .85; }
.rp-hours .bar i { background: #f79009; }
.rp-chart .bar span, .rp-hours .bar span { font-size: 10px; color: var(--muted); margin-top: 3px; height: 12px; }
.rp-chart.dense { gap: 1px; }
.rp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .rp-grid { grid-template-columns: 1fr; } }
.rp-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.report .quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.report .quick button { font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.report .quick button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- البلاغات والإعلان ---------- */
.rep-card { display: grid; gap: 10px; }
.rep-card h3 { margin: 0; }
.rep-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.rep-reasons .chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.rep-link { display: block; margin: 10px auto 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
tr.open-issue td { background: #fef3f2; }
:root[data-theme="dark"] tr.open-issue td { background: rgba(240,68,56,.12); }
.ann-banner { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 14px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(90deg, #c8102e, #e8243f); color: #fff; font-weight: 600; box-shadow: var(--shadow); }
.ann-banner span { flex: 1; line-height: 1.6; }
.ann-banner button { background: rgba(255,255,255,.2); border: 0; color: #fff; border-radius: 8px; width: 28px; height: 28px; cursor: pointer; flex: none; }

/* ---------- tips ---------- */
.tip-box { margin: 4px 0 12px; padding: 6px 12px; border: 1px dashed var(--line); border-radius: 12px; }
.tip-box summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.tip-box[open] { display: grid; gap: 6px; }
.tip-box[open] .tip-chips { margin-top: 6px; }
.tip-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tip-chips .chip { font-variant-numeric: tabular-nums; }
.tip-chips .chip.on { background: #fdf2fa; border: 1px solid #ee46bc; color: #c11574; font-weight: 700; }
.tip-chip { display: inline-block; margin: 2px 0; padding: 1px 8px; border-radius: 999px; background: #fdf2fa; color: #c11574; font-size: 12px; font-weight: 700; }
:root[data-theme="dark"] .tip-chips .chip.on, :root[data-theme="dark"] .tip-chip { background: rgba(238,70,188,.16); color: #faa7e0; }

/* ---------- الصفحة الرئيسية: جوال العروض، الثقة، الأسئلة ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand); font-size: 13px; font-weight: 700; }
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 4px rgba(18,183,106,.18); }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.trust-row span { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 13px; color: var(--ink-2); }
.trust-row b { font-weight: 700; }
.phone-demo { position: relative; display: flex; justify-content: center; padding: 10px 0 30px; }
.phone { width: 290px; border-radius: 40px; padding: 12px; background: #101828; box-shadow: 0 40px 80px -24px rgba(16,24,40,.45); position: relative; }
.phone-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 92px; height: 22px; border-radius: 0 0 14px 14px; background: #101828; z-index: 2; }
.phone-screen { border-radius: 30px; background: var(--bg); padding: 40px 12px 16px; min-height: 430px; display: grid; gap: 9px; align-content: start; }
.pd-head { display: flex; justify-content: space-between; align-items: center; }
.pd-head b { font-size: 15px; }
.pd-live { font-size: 11px; font-weight: 700; color: #067647; background: #ecfdf3; padding: 2px 8px; border-radius: 999px; }
.pd-item { font-size: 12px; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; }
.pd-offer { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 9px 10px; opacity: 0; transform: translateY(12px); animation: pdIn 9s infinite; }
.pd-offer i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-style: normal; font-weight: 800; }
.pd-offer b { font-size: 13px; }
.pd-offer small { display: block; font-size: 11px; color: var(--muted); }
.pd-offer em { font-style: normal; font-weight: 800; font-size: 15px; color: var(--ink); }
.pd-offer em::after { content: ' د.ب'; font-size: 10px; color: var(--muted); font-weight: 600; }
.pd-offer.best { border-color: var(--brand); background: linear-gradient(180deg, var(--brand-50), var(--card)); }
.pd-ver { font-size: 10px; color: #067647; background: #ecfdf3; border-radius: 999px; padding: 0 5px; }
.pd-offer.o2 { animation-delay: 1.2s; }
.pd-offer.o3 { animation-delay: 2.4s; }
@keyframes pdIn { 0% { opacity: 0; transform: translateY(12px); } 6%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateY(-6px); } }
.pd-pick { margin-top: 4px; text-align: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--brand); border-radius: 12px; padding: 10px; }
.pd-float { position: absolute; font-size: 13px; font-weight: 700; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; box-shadow: var(--shadow); animation: pdFloat 4s ease-in-out infinite; white-space: nowrap; }
.pd-float.f1 { top: 120px; inset-inline-end: 0; }
.pd-float.f2 { bottom: 40px; inset-inline-start: 0; animation-delay: 2s; }
@keyframes pdFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.faq { display: grid; gap: 10px; margin-top: 18px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 10px 0 0; color: var(--ink-2); line-height: 1.8; }
@media (max-width: 900px) { .pd-float.f1 { inset-inline-end: 4px; } .pd-float.f2 { inset-inline-start: 4px; } }
@media (prefers-reduced-motion: reduce) { .pd-offer { animation: none; opacity: 1; transform: none; } .pd-float { animation: none; } }
:root[data-theme="dark"] .pd-live, :root[data-theme="dark"] .pd-ver { background: rgba(18,183,106,.16); color: #6ce9a6; }
:root[data-theme="dark"] .phone { background: #000; }
