/* رِحلة — التصميم
   فكرة التصميم: لوحات الإرشاد في شوارع القاهرة. خط عريض بشكل لافتات الشوارع،
   أصفر التاكسي كلون للأشخاص، وأخضر مزرق لخط سير الأوردرات. العنصر المميز الوحيد:
   خط الرحلة المتقطع اللي بتمشي عليه نقطة مرة واحدة عند فتح الصفحة. */

:root {
  --bg: #F7F7F4;
  --surface: #FFFFFF;
  --fg: #12161C;
  --muted: #4D5967;
  --line: #DCDFE3;
  --taxi: #FFB800;
  --on-taxi: #12161C;
  --route: #0A6E79;
  --on-route: #FFFFFF;
  --wa: #14803F;
  --on-wa: #FFFFFF;
  --night: #12161C;
  --on-night: #F2F4F6;
  --focus: #1B5CFF;
  --danger: #B3261E;
  --shadow: 0 1px 2px rgba(18, 22, 28, .06), 0 10px 28px rgba(18, 22, 28, .07);

  --font-display: 'Lalezar', 'Cairo', 'Tahoma', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Tahoma', system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 32px);
  --radius: 16px;
  --radius-sm: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1318;
    --surface: #171C23;
    --fg: #EEF1F4;
    --muted: #9AA6B4;
    --line: #2A323C;
    --route: #35BFCB;
    --on-route: #06262A;
    --wa: #2FB868;
    --on-wa: #04210F;
    --night: #070A0D;
    --focus: #7AA2FF;
    --danger: #FF8A80;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0F1318;
  --surface: #171C23;
  --fg: #EEF1F4;
  --muted: #9AA6B4;
  --line: #2A323C;
  --route: #35BFCB;
  --on-route: #06262A;
  --wa: #2FB868;
  --on-wa: #04210F;
  --night: #070A0D;
  --focus: #7AA2FF;
  --danger: #FF8A80;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100%;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; }
svg { display: block; }

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

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark { width: 40px; height: 40px; flex: none; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  padding-top: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: none;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.nav-link:hover { background: var(--line); }
.nav-link[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; text-decoration-color: var(--taxi); }

@media (min-width: 720px) {
  .nav-link { display: inline-block; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 20px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
}

.btn:active:not(:disabled) { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-taxi { background: var(--taxi); color: var(--on-taxi); }
.btn-taxi:hover { background: #FFC933; }
.btn-route { background: var(--route); color: var(--on-route); }
.btn-wa { background: var(--wa); color: var(--on-wa); }
.btn-wa:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: .9375rem; }

.btn:disabled {
  cursor: not-allowed;
  background: var(--line);
  color: var(--muted);
}

/* ---------- الصفحة الرئيسية ---------- */

.hero { padding-block: clamp(28px, 6vw, 64px) clamp(24px, 4vw, 40px); }

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.75rem);
  max-width: 14ch;
}

.hero-sub {
  margin-top: 14px;
  max-width: 34rem;
  font-size: 1.125rem;
  color: var(--muted);
}

.hero-route {
  width: 100%;
  height: auto;
  max-height: 130px;
  margin-block: 22px 10px;
  overflow: visible;
}

.route-path {
  fill: none;
  stroke: var(--muted);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 2 12;
  opacity: .7;
}

.route-end-a { fill: var(--taxi); stroke: var(--fg); stroke-width: 3; }
.route-end-b { fill: var(--route); stroke: var(--fg); stroke-width: 3; }
.route-rider { fill: var(--taxi); stroke: var(--fg); stroke-width: 3; }

.doors {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .doors { grid-template-columns: 1fr 1fr; gap: 18px; }
}

.door {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: clamp(20px, 3vw, 28px);
  border-radius: 22px;
  text-decoration: none;
  min-height: 210px;
  transition: transform .15s ease;
}

.door:hover { transform: translateY(-2px); }
.door-people { background: var(--taxi); color: var(--on-taxi); }
.door-orders { background: var(--route); color: var(--on-route); }

.door-icon { width: 52px; height: 52px; margin-bottom: 8px; }
.door-title { font-family: var(--font-display); font-size: 2rem; line-height: 1.2; }
.door-text { max-width: 24rem; opacity: .92; }

.door-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.door-cta svg { width: 20px; height: 20px; }

.section { padding-block: clamp(36px, 6vw, 72px) 0; }
.section h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 20px; }

.steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}

.steps li:last-child { border-bottom: 1px solid var(--line); }

.steps li::before {
  content: counter(step, arabic-indic);
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--taxi);
  color: var(--on-taxi);
  font-family: var(--font-display);
  font-size: 1.4rem;
  padding-top: 4px;
}

.steps h3 { font-size: 1.35rem; margin-bottom: 2px; }
.steps p { color: var(--muted); max-width: 40rem; }

.facts { display: grid; gap: 0; margin: 0; }
.facts div { padding-block: 16px; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 600; font-size: 1.0625rem; }
.facts dd { margin: 2px 0 0; color: var(--muted); max-width: 40rem; }

@media (min-width: 720px) {
  .facts div { display: grid; grid-template-columns: 17rem 1fr; gap: 24px; }
  .facts dd { margin: 0; }
}

.contact {
  margin-top: clamp(36px, 6vw, 72px);
  background: var(--night);
  color: var(--on-night);
  padding-block: clamp(32px, 6vw, 56px);
}

.contact-row { display: grid; gap: 18px; align-items: center; }
.contact h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.contact p { color: #B7C0CB; max-width: 32rem; }
.contact .number { font-size: 1.25rem; font-weight: 600; letter-spacing: .02em; direction: ltr; unicode-bidi: plaintext; text-align: right; color: var(--on-night); }

@media (min-width: 720px) {
  .contact-row { grid-template-columns: 1fr auto; gap: 40px; }
}

.captain-cta {
  display: grid;
  gap: 12px;
  padding-block: clamp(28px, 5vw, 44px);
}

.captain-cta h2 { font-size: 1.75rem; margin: 0; }
.captain-cta p { color: var(--muted); max-width: 34rem; }
.captain-cta .btn { justify-self: start; }

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 22px 32px;
  color: var(--muted);
  font-size: .9375rem;
}

.footer-row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- صفحات النماذج ---------- */

.page-head { padding-block: clamp(24px, 5vw, 48px) 8px; }
.page-head h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
.page-head p { margin-top: 8px; color: var(--muted); max-width: 36rem; }

.form-page { padding-bottom: 56px; }

.form-block {
  display: grid;
  gap: 16px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
}

.form-block > h2 { font-size: 1.5rem; }

.field { display: grid; gap: 6px; min-width: 0; }

.field label, .field .label {
  font-weight: 600;
  font-size: .9375rem;
}

.field .hint { color: var(--muted); font-size: .875rem; }

input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
  font: 400 1rem/1.5 var(--font-body);
}

input[type="tel"], input[type="email"], input[type="password"] { direction: ltr; text-align: right; }
input[type="tel"]::placeholder, input[type="email"]::placeholder { direction: rtl; text-align: right; }

textarea { min-height: 84px; resize: vertical; }

input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 0; border-color: var(--focus); }
input:user-invalid, textarea:user-invalid { border-color: var(--danger); }

.field-error { color: var(--danger); font-size: .875rem; min-height: 0; }

.two-up { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .two-up { grid-template-columns: 1fr 1fr; } }

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  padding: 5px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.seg input { position: absolute; opacity: 0; pointer-events: none; }

.seg label {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
}

.seg input:checked + label { background: var(--fg); color: var(--bg); }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

.seg-people input:checked + label { background: var(--taxi); color: var(--on-taxi); }
.seg-orders input:checked + label { background: var(--route); color: var(--on-route); }

.map-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

#req-map {
  position: relative;
  z-index: 0;
  isolation: isolate;
  height: clamp(300px, 52vh, 440px);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  direction: ltr;
}

.map-status { min-height: 1.5em; color: var(--muted); font-size: .9375rem; }
.map-status.is-error { color: var(--danger); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9375rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--fg); display: inline-block; }
.legend .dot-a { background: var(--taxi); }
.legend .dot-b { background: var(--route); }

.pin { background: none; border: 0; }
.pin-dot {
  position: absolute;
  top: 6px; left: 2px;
  width: 26px; height: 26px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--pin-color, #FFB800);
  border: 3px solid #12161C;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35);
}
.pin-dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #FFFFFF;
}
.pin-a { --pin-color: #FFB800; }
.pin-b { --pin-color: #0B7A86; }

.leaflet-container { font-family: var(--font-body); }

.pay-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .pay-grid { grid-template-columns: repeat(3, 1fr); } }

.pay-grid input { position: absolute; opacity: 0; pointer-events: none; }

.pay-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
}

.pay-grid label::before {
  content: "";
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  flex: none;
}

.pay-grid input:checked + label { border-color: var(--fg); }
.pay-grid input:checked + label::before { border-color: var(--fg); background: radial-gradient(circle, var(--fg) 0 45%, transparent 50%); }
.pay-grid input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

.pending {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 2px dashed var(--muted);
  border-radius: var(--radius);
  background: var(--surface);
}

.pending-tag {
  justify-self: start;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--taxi);
  color: var(--on-taxi);
  font-weight: 600;
  font-size: .875rem;
}

.pending dl { display: grid; gap: 4px; margin: 0; }
.pending dl div { display: flex; justify-content: space-between; gap: 12px; }
.pending dt { color: var(--muted); }
.pending dd { margin: 0; font-weight: 600; }
.pending p { color: var(--muted); font-size: .9375rem; }

.submit-row { display: grid; gap: 12px; }
@media (min-width: 720px) { .submit-row { grid-template-columns: 1fr 1fr; align-items: start; } }
.submit-row .note { color: var(--muted); font-size: .875rem; margin-top: 6px; }

.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-block: 8px 0; }
.tabs button {
  min-height: 48px;
  border: 0;
  border-bottom: 3px solid var(--line);
  background: none;
  color: var(--muted);
  font: 600 1rem var(--font-body);
  cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--taxi); }

.photo-row { display: flex; align-items: center; gap: 14px; }
.photo-preview {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface) center / cover no-repeat;
  flex: none;
}

.narrow { max-width: 34rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- حسابات الكباتن والإدارة ---------- */

.muted { color: var(--muted); }
.ltr { direction: ltr; unicode-bidi: plaintext; text-align: right; }

.msg {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  background: var(--surface);
}
.msg.is-error { border-color: var(--danger); color: var(--danger); }
.msg.is-ok { border-color: var(--route); }

.avatar {
  width: 72px; height: 72px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 1.75rem;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 48px; height: 48px; font-size: 1.25rem; }

.badge {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  border: 2px solid currentColor;
}
.badge-wait { color: var(--muted); }
.badge-ok { color: var(--route); }
.badge-bad { color: var(--danger); }

#cap-home { display: grid; gap: 16px; margin-top: 8px; }
.cap-card { display: flex; gap: 16px; align-items: center; padding-block: 12px; }
.cap-card-body { display: grid; gap: 4px; min-width: 0; }
.cap-card-body h2 { font-size: 1.5rem; }
.cap-explain { max-width: 34rem; }
#cap-home .btn { justify-self: start; }

.adm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.cap-list { display: grid; gap: 0; }
.cap-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 14px;
  align-items: center;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}
.cap-row:last-child { border-bottom: 1px solid var(--line); }
.cap-row-body { display: grid; gap: 2px; justify-items: start; min-width: 0; }
.row-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- الرحلات ---------- */
.mid { max-width: 48rem; }
.badge-done { color: var(--muted); }
.ltr { direction: ltr; unicode-bidi: isolate; }

.trk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.trk-head h2 { font-size: 1.75rem; }
.trk-steps { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 0; }
.trk-steps li {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  padding: 10px 36px 10px 0;
  color: var(--muted);
}
.trk-steps li::before {
  content: '';
  position: absolute; inset-inline-start: 0; top: 14px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid var(--line); background: var(--bg);
}
.trk-steps li.done { color: var(--fg); }
.trk-steps li.done::before { background: var(--route); border-color: var(--route); }
.trk-steps li.current { color: var(--fg); font-weight: 700; }
.trk-steps li.current::before { background: var(--taxi); border-color: var(--fg); }
.trk-steps small { font-weight: 400; }

.trip-list { display: grid; gap: 16px; }
.trip-list h3 { font-size: 1.25rem; margin-top: 8px; }
.trip-card {
  display: grid; gap: 10px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.trip-card.status-cancelled, .trip-card.status-finished { opacity: .85; }
.trip-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.trip-person { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.trip-places { display: grid; gap: 10px; }
.trip-place { display: grid; gap: 2px; justify-items: start; padding-inline-start: 12px; border-inline-start: 4px solid var(--taxi); }
.trip-place + .trip-place { border-inline-start-color: var(--route); }
.trip-place a, .trip-person a:not(.btn) { color: var(--route); font-weight: 600; text-underline-offset: 3px; }
.trip-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.trip-actions > .btn { flex: 1 1 180px; }
.assign-row { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.assign-row select { flex: 1 1 200px; width: auto; }
.cancel-wrap { display: grid; gap: 8px; }
.cancel-form { display: grid; gap: 8px; min-width: min(100%, 280px); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.tool-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.tool-row select { flex: 0 1 200px; width: auto; }
.tool-row input { flex: 1 1 240px; width: auto; }
select { padding-inline-end: 10px; }

/* بيانات العميل المحفوظة وآخر العناوين */
.saved-box { padding: 12px 16px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.saved-box p { margin: 0 0 8px; }
.saved-box .hint { color: var(--muted); font-size: .875rem; margin: 8px 0 0; }
.recent { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 8px; }
.chip { min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.chip:hover { border-color: var(--route); }
.chip:focus-visible { outline: 3px solid var(--route); outline-offset: 2px; }
.welcome { font-size: 1.25rem; font-weight: 700; margin: 8px 0 0; }

/* أي عنصر عليه hidden لازم يختفي فعلًا حتى لو تنسيقه بيحدد display */
[hidden] { display: none !important; }

/* تفاصيل إضافية (اختيارية) */
.more { margin: 0 0 8px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.more > summary { cursor: pointer; padding: 14px 16px; min-height: 44px; font-weight: 700; }
.more > summary:focus-visible { outline: 3px solid var(--route); outline-offset: 2px; }
.more > .form-block { padding: 0 16px 16px; }

.lead-note { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-sm); border: 2px solid var(--route); background: var(--surface); }

/* مسافات صفحة متابعة الطلب */
#trk-body { display: grid; gap: 16px; }
#trk-body > .cancel-wrap, #trk-body > .btn { margin-top: 0; }
.trip-places { margin-bottom: 4px; }

/* لوحة استقبال الطلبات للكابتن */
.cap-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.cap-stat { display: grid; gap: 2px; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.cap-stat strong { font-size: 1.6rem; }
.btn-block { width: 100%; }
#cap-online.is-online { background: var(--route); color: var(--on-route); }
.radar-wrap { display: grid; justify-items: center; gap: 12px; padding: 16px 0; text-align: center; }
.radar { position: relative; width: 160px; height: 160px; border-radius: 50%; border: 2px solid var(--route);
  background: radial-gradient(circle, transparent 0 28%, var(--line) 28% 29%, transparent 29% 55%, var(--line) 55% 56%, transparent 56%); overflow: hidden; }
.radar-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 270deg, var(--route) 360deg); opacity: .55; animation: radar-spin 2.4s linear infinite; }
.radar-dot { position: absolute; inset: 50% auto auto 50%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: var(--taxi); }
.radar-line { margin: 0; font-weight: 700; min-height: 2.6em; }
@keyframes radar-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .radar-sweep { animation: none; } }
.open-trip { border-color: var(--taxi); }
.late-banner { padding: 12px 14px; border-radius: var(--radius-sm); border: 2px solid var(--danger); color: var(--danger); font-weight: 700; margin-bottom: 8px; }
.avail-line { font-weight: 700; margin: 8px 0; }
.searching { margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); border: 2px dashed var(--route); }

/* اختيار المركبة والسعر */
.veh-grid { grid-template-columns: 1fr 1fr; }
.price-facts { display: grid; gap: 4px; margin: 0 0 12px; }
.price-facts div { display: flex; justify-content: space-between; gap: 12px; }
.price-facts dt { color: var(--muted); }
.price-facts dd { margin: 0; font-weight: 700; }
.stepper { display: grid; grid-template-columns: 64px 1fr 64px; gap: 10px; align-items: center; margin: 8px 0; }
.stepper-btn { min-height: 56px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--surface); color: inherit; font: inherit; font-size: 1.75rem; cursor: pointer; }
.stepper-btn:disabled { opacity: .4; cursor: not-allowed; }
.stepper-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.stepper-val { text-align: center; font-size: 1.75rem; font-weight: 800; padding: 10px; border-radius: var(--radius-sm); background: var(--surface); border: 2px solid var(--taxi); }
.auto-row { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 8px; cursor: pointer; }
.auto-row input { width: 22px; height: 22px; accent-color: var(--route); flex: none; }

.price-sec { display: grid; gap: 10px; }
.offer-card { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.offer-body { display: grid; gap: 2px; }
.offer-price { font-size: 1.25rem; }
.final-price { margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); border: 2px solid var(--route); font-weight: 700; }

.open-price { margin: 0; font-size: 1.75rem; font-weight: 800; }
.price-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.price-custom { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

.price-admin { display: grid; gap: 12px; }
.price-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; align-items: end; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.price-row > strong { grid-column: 1 / -1; }
.price-field { display: grid; gap: 4px; }

/* بطاقات المركبات */
.veh-grid { grid-template-columns: repeat(2, 1fr); }
.veh-grid label { flex-direction: column; justify-content: center; text-align: center; gap: 4px; min-height: 96px; font-weight: 700; }
.veh-grid label::before { display: none; }
.veh-grid label svg { color: var(--muted); }
.veh-grid input:checked + label { border-color: var(--taxi); background: color-mix(in srgb, var(--taxi) 14%, var(--surface)); }
.veh-grid input:checked + label svg { color: var(--fg); }

/* آخر العناوين كقايمة تحت خانة الكتابة */
.field { position: relative; }
.field .recent { position: absolute; inset-inline: 0; top: 100%; z-index: 30; display: grid; gap: 0; margin: 4px 0 0; max-height: 220px; overflow: auto;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.field .recent .chip { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; text-align: start; width: 100%; }
.field .recent .chip:last-child { border-bottom: 0; }

/* شاشة رحلة الكابتن والدردشة */
.trip-screen { display: grid; gap: 12px; }
.trip-map { height: 220px; border-radius: var(--radius-sm); border: 2px solid var(--line); overflow: hidden; background: var(--surface); }
.trip-route p { margin: 4px 0; display: flex; gap: 6px; align-items: baseline; }
.trip-person { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.trip-person strong { flex: 1 1 auto; }
.chat { display: grid; gap: 8px; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.chat-log { display: grid; gap: 6px; max-height: 240px; overflow: auto; align-content: start; }
.bubble { max-width: 85%; padding: 8px 12px; border-radius: 14px; overflow-wrap: anywhere; }
.bubble.mine { justify-self: end; background: var(--taxi); color: var(--on-taxi); }
.bubble.theirs { justify-self: start; background: var(--bg); border: 1px solid var(--line); }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-quick .chip { min-height: 40px; padding: 4px 12px; }
.chat-input { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.chat-badge { margin-inline-start: 6px; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .8125rem; text-align: center; }
.trk-chat { display: grid; gap: 10px; margin-top: 16px; }

.trip-route .dot-a, .trip-route .dot-b { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--fg); display: inline-block; flex: none; align-self: center; }
.trip-route .dot-a { background: var(--taxi); }
.trip-route .dot-b { background: var(--route); }

.veh-grid label svg { color: inherit; width: 96px; height: 60px; filter: saturate(.85) opacity(.9); transition: filter .15s, transform .15s; }
.veh-grid input:checked + label svg { filter: none; transform: scale(1.06); }

/* عدّاد الوصول والتقييم */
.eta-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, var(--taxi) 18%, var(--surface)); border: 2px solid var(--taxi); margin: 8px 0; }
.eta-time { font-size: 1.75rem; font-variant-numeric: tabular-nums; direction: ltr; }
.eta-box.is-soon, .eta-box.is-late { background: color-mix(in srgb, #d32f2f 14%, var(--surface)); border-color: #d32f2f; color: #d32f2f; }
.eta-box.is-soon .eta-time { animation: etapulse 1s infinite; }
.eta-box.is-late { justify-content: center; }
@keyframes etapulse { 50% { opacity: .45; } }
.stars { display: flex; gap: 6px; direction: ltr; justify-content: center; }
.star { font-size: 2rem; line-height: 1; background: none; border: 0; color: #c5c9cf; padding: 4px; cursor: pointer; min-width: 44px; min-height: 44px; }
.star.on { color: #f5b301; }
.star:disabled { cursor: default; }
.rate-sec { text-align: center; margin: 12px 0; display: grid; gap: 6px; }
.cap-row-in { display: flex; gap: 8px; }
.cap-row-in input { flex: 1; min-width: 0; }

.nav-overlay { position: fixed; inset: 0; z-index: 3000; background: var(--bg, #fff); display: flex; flex-direction: column; }
.nav-overlay .nav-map { flex: 1; width: 100%; }
.nav-close { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 3100; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--fg); background: var(--surface, #fff); color: var(--fg); font-size: 1.4rem; font-weight: 700; cursor: pointer; }
.nav-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--surface, #fff); border-top: 2px solid var(--fg); flex-wrap: wrap; }
.nav-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.nav-info .nav-dist { color: var(--muted); font-size: .9375rem; }
body.nav-open { overflow: hidden; }

.chat-toggle-pulse, button.has-new { border-color: var(--danger); animation: msgpulse 1.2s ease-in-out infinite; }
@keyframes msgpulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 45%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
@media (prefers-reduced-motion: reduce) { button.has-new { animation: none; } }

/* ---- الصفحة الرئيسية: زرار الكابتن + خطوات + بابين جنب بعض ---- */
.join-captain { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 18px; margin-bottom: 18px; border-radius: 16px; border: 3px solid var(--fg); background: var(--route); color: var(--on-route); font-weight: 700; font-size: 1.125rem; text-decoration: none; box-shadow: 0 4px 0 var(--fg); }
.join-captain svg { width: 24px; height: 24px; flex: none; }
.join-captain:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--fg); }
.how { list-style: none; margin: 14px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: none; }
.how li { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 12px 8px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); font-size: .9375rem; font-weight: 600; }
.how b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--taxi); color: var(--on-taxi); border: 2px solid var(--fg); }
.doors { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
.door { min-height: 0 !important; padding: 18px 12px !important; text-align: center; justify-items: center; }
.door-icon { width: 44px; height: 44px; }
.door-title { font-size: 1.5rem !important; }
.door-text { font-size: .9375rem; }
.door-cta { font-size: .9375rem; }
@media (max-width: 420px) { .door-text { display: none; } .door-cta svg { display: none; } }
.earn-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.earn-card { display: grid; gap: 2px; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.earn-card strong { font-size: 1.5rem; }
.earn-card.is-main { grid-column: 1 / -1; border-color: var(--route); }
.earn-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.earn-table th, .earn-table td { text-align: start; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.stars-confirm { margin-top: 8px; }
.cap-compact { display: flex; align-items: center; gap: 12px; padding-block: 8px; }
.cap-compact h2 { font-size: 1.25rem; margin: 0; }
.cap-compact .ltr { margin: 0; font-size: .9375rem; color: var(--muted); }
details.past > summary { cursor: pointer; font-weight: 700; padding: 12px 0; font-size: 1.125rem; }
.cap-foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.sound-link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 6px 0; font: inherit; font-size: .875rem; }

/* ثلاث أزرار جنب بعض أصغر */
.doors { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
.door { padding: 14px 6px !important; border-radius: 16px !important; gap: 4px !important; }
.door-icon { width: 34px !important; height: 34px !important; margin-bottom: 2px !important; }
.door-title { font-size: 1.1rem !important; line-height: 1.25; }
.door-cta { font-size: .8125rem !important; gap: 4px; }
.door-cta svg, .door-text { display: none !important; }
.door-captain { background: var(--fg); color: var(--bg); }
.door-captain .door-icon { color: var(--taxi); }
@media (min-width: 720px) { .door-title { font-size: 1.5rem !important; } .door-icon { width: 44px !important; height: 44px !important; } }

.trk-live { margin-block: 16px; }
.trk-live h3 { margin-bottom: 8px; }
.live-info { margin: 8px 0 0; font-weight: 600; }
.live-map { height: 260px; }
.cap-live { background: none; border: 0; }
.cap-live-dot { display: block; width: 26px; height: 26px; border-radius: 50%; background: #0B7A86; border: 4px solid #fff; box-shadow: 0 0 0 3px #0B7A86, 0 2px 6px rgba(0,0,0,.4); animation: livepulse 1.6s ease-out infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(30,111,224,.6); } 100% { box-shadow: 0 0 0 16px rgba(30,111,224,0); } }
@media (prefers-reduced-motion: reduce) { .cap-live-dot { animation: none; } }


/* ===== قايمة الإعدادات (ثلاث شرط) ===== */
.menu-btn { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 46px; height: 46px; padding: 0; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; flex: none; }
.menu-btn span { display: block; width: 22px; height: 3px; border-radius: 2px; background: var(--fg); }
.menu-btn:focus-visible, .menu-x:focus-visible, .menu-seg button:focus-visible, .menu-links a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.menu-btn[aria-expanded="true"] { border-color: var(--taxi); }
.menu-panel { position: fixed; inset: 0; z-index: 90; background: var(--bg); overflow-y: auto; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.menu-panel[hidden] { display: none; }
.menu-inner { max-width: 32rem; padding-block: 12px 32px; display: grid; gap: 14px; }
.menu-head { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 1.25rem; }
.menu-x { width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--fg); font-size: 1.1rem; cursor: pointer; }
.menu-row { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.menu-label { font-weight: 700; font-size: .95rem; color: var(--muted); }
.menu-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.menu-seg button { flex: 1 1 0; min-height: 44px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; }
.menu-seg button.is-on { background: var(--taxi); color: var(--on-taxi); border-color: var(--fg); }
.menu-links { display: grid; gap: 8px; }
.menu-links a { display: block; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 700; text-decoration: none; }

html[data-size="large"] { font-size: 112.5%; }
html[data-size="xlarge"] { font-size: 125%; }

/* ===== الإنجليزي (يسار لليمين) ===== */
html[dir="ltr"] body { font-family: 'IBM Plex Sans', system-ui, 'Segoe UI', Tahoma, sans-serif; }
html[dir="ltr"] .contact .number, html[dir="ltr"] input[type="tel"], html[dir="ltr"] input[type="email"],
html[dir="ltr"] input[type="password"], html[dir="ltr"] .ltr { text-align: left; }
html[dir="ltr"] input[type="tel"]::placeholder, html[dir="ltr"] input[type="email"]::placeholder { direction: ltr; text-align: left; }
html[dir="ltr"] .menu-panel { text-align: left; }
.menu-btn svg { width: 26px; height: 26px; color: var(--fg); }

/* ---------- ألوان محسّنة (نفس الأصفر والتركواز، تباين أوضح وخلفيات أهدى) ---------- */
:root { --bg: #F4F5F2; --muted: #455160; --line: #D3D8DC; --route: #0A6B76; --shadow: 0 1px 2px rgba(18,22,28,.05), 0 8px 24px rgba(18,22,28,.06); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0E1217; --surface: #161B22; --muted: #A3AFBD; --line: #29313B; --route: #3CC6D2; }
}
:root[data-theme="dark"] { --bg: #0E1217; --surface: #161B22; --muted: #A3AFBD; --line: #29313B; --route: #3CC6D2; }
html[dir="ltr"] .door-cta svg { transform: scaleX(-1); }
html[dir="ltr"] .brand-name { white-space: nowrap; font-size: 1.35rem; padding-top: 0; }

.menu-install { display: block; width: 100%; text-align: inherit; padding: 14px; border-radius: var(--radius-sm); border: 2px solid var(--taxi); background: color-mix(in srgb, var(--taxi) 16%, var(--surface)); color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; }
.menu-install[hidden] { display: none; }

.install-bar { position: fixed; inset-inline: 12px; bottom: 12px; z-index: 80; background: var(--surface); border: 2px solid var(--taxi); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: grid; gap: 10px; max-width: 460px; margin-inline: auto; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.install-head { display: flex; align-items: center; gap: 12px; }
.install-ico { border-radius: 10px; flex: none; }
.install-copy { display: grid; gap: 2px; }
.install-copy strong { font-size: 1.1rem; }
.install-copy .muted { font-size: .9rem; }
.btn-install { width: 100%; min-height: 54px; font-size: 1.05rem; font-weight: 800; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.install-later { justify-self: center; }

.menu-share { display: block; width: 100%; text-align: inherit; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; }
.qr-dialog { border: 0; padding: 0; background: transparent; max-width: 92vw; color: var(--fg); }
.qr-dialog::backdrop { background: rgba(0,0,0,.55); }
.qr-box { position: relative; display: grid; gap: 12px; justify-items: center; padding: 20px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); text-align: center; }
.qr-box .menu-x { position: absolute; top: 10px; inset-inline-start: 10px; }
.qr-box h2 { margin-top: 28px; font-size: 1.25rem; }
.qr-box img { background: #fff; border-radius: 12px; padding: 4px; max-width: 100%; height: auto; }

.selfie-hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.selfie-dialog { border: 0; padding: 0; background: transparent; width: min(92vw, 420px); color: var(--fg); }
.selfie-dialog::backdrop { background: rgba(0,0,0,.65); }
.selfie-box { position: relative; display: grid; gap: 12px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.selfie-box h2 { margin-top: 24px; font-size: 1.2rem; text-align: center; }
.selfie-box .menu-x { position: absolute; top: 10px; inset-inline-start: 10px; }
.selfie-frame { aspect-ratio: 1; width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; position: relative; }
.selfie-video, .selfie-canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.selfie-video { transform: scaleX(-1); }
.selfie-msg { text-align: center; font-size: .9rem; }
.selfie-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.selfie-actions [hidden], .selfie-video[hidden], .selfie-canvas[hidden] { display: none; }

/* دليل التثبيت على الآيفون */
.ios-guide { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100%; margin: 0; inset: 0; }
.ios-guide::backdrop { background: rgba(8, 10, 14, .78); }
.ios-box { position: relative; background: var(--surface); color: var(--fg); border: 2px solid var(--taxi); border-radius: 22px; margin: 4vh 14px 0; padding: 22px 16px 16px; display: grid; gap: 14px; max-width: 460px; margin-inline: auto; }
.ios-box h2 { font-size: 1.3rem; line-height: 1.35; margin: 0; padding-inline-end: 38px; }
.ios-x { position: absolute; top: 12px; inset-inline-end: 12px; }
.ios-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ios-steps li { display: flex; gap: 14px; align-items: center; background: color-mix(in srgb, var(--taxi) 12%, var(--surface)); border-radius: 16px; padding: 12px; }
.ios-ico { flex: none; width: 54px; height: 54px; border-radius: 15px; background: var(--taxi); color: #12161C; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; }
.ios-steps strong { display: block; font-size: 1.05rem; }
.ios-steps small { display: block; opacity: .8; margin-top: 2px; line-height: 1.4; }
.ios-arrow { position: fixed; bottom: 6px; left: 50%; transform: translateX(-50%); font-size: 2.6rem; color: var(--taxi); animation: iosBounce 1s ease-in-out infinite; text-shadow: 0 2px 8px rgba(0,0,0,.6); pointer-events: none; }
@keyframes iosBounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10px); } }
@media (prefers-reduced-motion: reduce) { .ios-arrow { animation: none; } }

/* الكباتن: أزرار العرض جنب بعض */
.cap-tabs, .period-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.cap-tab, .period-tab { flex: 1 1 calc(50% - 8px); min-width: 130px; border: 2px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 700; }
.period-tab { flex-basis: calc(33% - 8px); min-width: 90px; }
.cap-tab.is-on, .period-tab.is-on { background: var(--taxi); border-color: var(--taxi); color: var(--on-taxi, #12161C); }
.cap-sub { font-size: 1.05rem; margin: 6px 0; }
.btn-danger { background: transparent; border: 2px solid var(--danger); color: var(--danger); font-weight: 700; }

/* شاشة انتظار الطلبات: الراداي واخد الشاشة كلها */
.radar-full { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: stretch; justify-items: initial; gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); background: radial-gradient(120% 70% at 50% 0%, #2c2f35 0%, #1a1c20 55%, #131518 100%); color: #f3f3f3; overflow: hidden; }
.radar-full[hidden] { display: none; }
.radar-top { display: flex; justify-content: center; }
.radar-pill { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 62%; padding: 10px 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--taxi); color: #12161C; font: inherit; font-weight: 800; font-size: 1.1rem; }
.radar-pill-knob { width: 12px; height: 12px; border-radius: 50%; background: #12161C; animation: radar-blink 1.6s ease-in-out infinite; }
.radar-pill.is-armed { background: #fff; }
.radar-pill.is-armed .radar-pill-knob { animation: none; }
@keyframes radar-blink { 50% { opacity: .25; } }
.radar-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radar-card { display: grid; gap: 14px; padding: 14px 16px; border-radius: 22px; background: #1f2126; }
.radar-card span { font-size: .95rem; opacity: .85; }
.radar-card strong { font-size: 1.9rem; line-height: 1; }
.radar-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; border-radius: 28px; background: #1d1f23; overflow: hidden; }
.radar-full .radar { position: absolute; left: 50%; top: 50%; width: 200vmin; height: 200vmin; max-width: none; transform: translate(-50%, -50%); border: 0; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle closest-side, transparent 0 19.6%, color-mix(in srgb, var(--taxi) 55%, transparent) 19.6% 20.2%, transparent 20.2% 39.6%, color-mix(in srgb, var(--taxi) 45%, transparent) 39.6% 40.2%, transparent 40.2% 59.6%, color-mix(in srgb, var(--taxi) 35%, transparent) 59.6% 60.2%, transparent 60.2% 79.6%, color-mix(in srgb, var(--taxi) 25%, transparent) 79.6% 80.2%, transparent 80.2%); }
.radar-full .radar-sweep { border-radius: 50%; background: conic-gradient(from 0deg, color-mix(in srgb, var(--taxi) 38%, transparent) 0deg, transparent 75deg, transparent 360deg); opacity: 1; animation: radar-spin 3.2s linear infinite; }
.radar-full .radar-dot { width: 22px; height: 22px; margin: -11px; box-shadow: 0 0 0 8px color-mix(in srgb, var(--taxi) 25%, transparent); }
.radar-full .radar-line { position: absolute; inset-inline: 18px; top: 28%; text-align: center; font-size: 1.35rem; line-height: 1.5; color: #fff; min-height: 0; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.radar-sound { align-self: center; background: none; border: 0; color: #cfd3d8; text-decoration: underline; font: inherit; cursor: pointer; padding: 4px 10px; }

/* ---- طلبات الكابتن (زي إنديرايف) ---- */
.pin-ca { --pin-color: #0B7A86; }
.pin-cb { --pin-color: #E0A000; }
.ldot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 800; font-size: .9rem; line-height: 1; }
.ldot-a { background: #0B7A86; }
.ldot-b { background: #E0A000; }
.swipe-row { position: relative; overflow: hidden; border-radius: var(--radius); }
.swipe-actions { position: absolute; left: 0; top: 0; bottom: 0; width: 176px; display: flex; gap: 6px; padding: 6px; direction: rtl; }
.swipe-box { flex: 1; min-height: 0; height: 100%; border-radius: 12px; white-space: normal; line-height: 1.2; padding: 4px; }
.req-card { position: relative; display: grid; gap: 8px; touch-action: pan-y; cursor: pointer; background: var(--surface); user-select: none; -webkit-user-select: none; }
.req-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .875rem; color: var(--muted); }
.req-rate { font-weight: 700; color: var(--fg); }
.req-away { font-weight: 700; color: var(--fair); }
.req-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.req-addr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.req-km { flex: none; font-size: .875rem; }
.req-km-a { color: var(--fair); }
.req-km-b { color: #9A6C00; }
.req-bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.req-price { font-size: 1.5rem; font-weight: 800; }
.req-mine { margin: 0; font-size: .875rem; font-weight: 700; color: var(--route); }
.offer-timer { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.timer-track { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; direction: ltr; }
.timer-track i { display: block; height: 100%; background: var(--route); border-radius: 999px; }
.offer-timer.is-low .timer-track i { background: var(--danger); }
.timer-txt { font-size: .8125rem; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 4.5em; text-align: end; }
.req-sheet .req-map { flex: 1 1 40%; min-height: 160px; }
.req-panel { max-height: 62vh; overflow-y: auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 2px solid var(--fg); display: grid; gap: 10px; }
.sheet-offer { display: grid; gap: 10px; }
.line-tip { font-weight: 800; border: 0; color: #fff; box-shadow: none; padding: 2px 8px; }
.line-tip-a { background: #0B7A86; }
.line-tip-b { background: #FFB800; color: #12161C; }
.line-tip::before { display: none; }
@media (prefers-reduced-motion: reduce) { .timer-track i { transition: none !important; } }

/* ---- قسم قابل للطي في الإدارة ---- */
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2 { margin: 0; }
details.fold > summary::after { content: ""; flex: none; width: 12px; height: 12px; border-inline-end: 3px solid var(--fg); border-bottom: 3px solid var(--fg); transform: rotate(45deg); transition: transform .2s; margin-inline-end: 4px; }
details.fold[open] > summary::after { transform: rotate(-135deg); }
details.fold > summary:focus-visible { outline: 3px solid var(--route); outline-offset: 2px; }
details.fold[open] > summary { margin-bottom: 10px; }
.chip.is-on { border-color: var(--route); background: color-mix(in srgb, var(--route) 14%, var(--surface)); font-weight: 700; }
#price-custom { width: 100%; margin-top: 8px; }

/* ---- شريط العدّ التنازلي زي إنديرايف: خط رفيع بعرض الشاشة فوق زرار القبول ---- */
.offer-timer.thin { display: block; margin: 0 -16px; }
.offer-timer.thin .timer-track { height: 4px; border-radius: 0; direction: rtl; background: color-mix(in srgb, var(--fg) 18%, transparent); }
.offer-timer.thin .timer-track i { background: var(--taxi); border-radius: 0; }
.offer-timer.thin.is-low .timer-track i { background: var(--danger); }
.req-meta { display: inline-flex; align-items: center; gap: 10px; }
.req-elapsed { font-variant-numeric: tabular-nums; direction: ltr; font-weight: 600; font-size: .75rem; color: var(--muted); opacity: .85; }
.offer-btns { display: grid; gap: 6px; }

/* ---- خريطة داكنة: نفس خريطة OpenStreetMap بس بألوان معكوسة، فالشوارع والأسماء بتبان أوضح ---- */
.leaflet-container { background: #1d232b; }
.leaflet-tile-pane { filter: invert(1) hue-rotate(192deg) brightness(1.12) contrast(.92) saturate(.7); }
.leaflet-container { background: #242f3e; }
.leaflet-container .leaflet-control-attribution { background: rgba(18, 22, 28, .72); color: #c5ccd6; }
.leaflet-container .leaflet-control-attribution a { color: #9fc2ff; }
.leaflet-bar { border: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.leaflet-bar a, .leaflet-bar a:hover { width: 34px; height: 34px; line-height: 34px; background: #1b1f26; color: #eef1f4; border-bottom: 1px solid #3a4350; font-size: 20px; }
.leaflet-bar a:hover { background: #2a323c; }
.leaflet-bottom.leaflet-left .leaflet-control-zoom { margin: 0 0 28px 10px; }

/* ---- بوابة الموقع ---- */
body.loc-open { overflow: hidden; }
.loc-gate { position: fixed; inset: 0; z-index: 5000; background: var(--bg); display: grid; place-items: center; padding: 24px var(--gutter); }
.loc-gate[hidden] { display: none; }
.loc-card { max-width: 420px; width: 100%; display: grid; gap: 14px; text-align: center; justify-items: center; }
.loc-pin { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--taxi); color: var(--on-taxi); }
.loc-card h2 { margin: 0; }
.loc-text { margin: 0; color: var(--muted); }
.loc-steps { text-align: start; margin: 0; padding-inline-start: 1.4em; display: grid; gap: 8px; justify-self: stretch; }

/* ---------- إعدادات مختصرة + زرار وضع السائق/الراكب ---------- */
.menu-mode { display: block; width: 100%; padding: 14px; border-radius: var(--radius-sm); border: 2px solid var(--taxi); background: var(--taxi); color: var(--on-taxi); font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.menu-row.fold { padding: 0; gap: 0; overflow: hidden; }
.menu-fold { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 10px 12px; border: 0; background: transparent; color: var(--fg); font: inherit; cursor: pointer; text-align: start; }
.menu-fold .menu-label { color: var(--fg); flex: 1; }
.menu-cur { color: var(--muted); font-weight: 600; font-size: .9rem; }
.menu-chev { transition: transform .15s; flex: none; }
.menu-fold[aria-expanded="true"] .menu-chev { transform: rotate(180deg); }
.menu-row.fold .menu-seg { padding: 0 12px 12px; }
.menu-row.fold .menu-seg[hidden] { display: none; }

.menu-ico { font-size: 1.15rem; line-height: 1; margin-inline-end: 4px; }
.menu-mode { display: flex; align-items: center; justify-content: center; gap: 8px; }
.menu-links a, .menu-share, .menu-install { display: flex; align-items: center; gap: 8px; }

/* زرار وضع السائق/الراكب ثابت تحت، وباقي الإعدادات بتتحرك فوقه */
.menu-panel { display: flex; flex-direction: column; overflow: hidden; }
.menu-panel[hidden] { display: none; }
.menu-panel > .menu-inner { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-bottom: 0; }
.menu-inner > .menu-head, .menu-inner > .menu-row, .menu-inner > .menu-links { flex: none; }
.menu-inner { overflow-y: auto; }
.menu-foot { position: sticky; bottom: 0; margin-top: auto; padding: 10px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }

/* ---------- صفحة دخل الكابتن ---------- */
.earn-open-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 14px; background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; cursor: pointer; }
.radar-card-earn { grid-template-columns: 1fr auto; align-items: end; }
.radar-card-earn span { grid-column: 1 / -1; }
.radar-card-earn .earn-open-btn { grid-column: 2; grid-row: 2; }
.cap-stat-earn { grid-template-columns: 1fr auto; align-items: center; }
.cap-stat-earn > span { grid-column: 1 / -1; }
.cap-stat-earn .earn-open-btn { grid-column: 2; grid-row: 2; width: 40px; height: 40px; }
body.earn-open { overflow: hidden; }
.earn-page { position: fixed; inset: 0; z-index: 200; background: var(--bg); color: var(--fg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.earn-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.earn-head-t { display: grid; gap: 2px; }
.earn-head-t strong { font-size: 1.15rem; }
.earn-back { width: 44px; height: 44px; border: 0; background: transparent; color: var(--fg); display: grid; place-items: center; cursor: pointer; border-radius: 12px; }
html[dir="ltr"] .earn-back svg { transform: scaleX(-1); }
.earn-body { max-width: 34rem; margin: 0 auto; padding: 14px 16px 40px; display: grid; gap: 14px; }
.earn-tabs { display: flex; gap: 8px; justify-content: center; }
.earn-tab { min-height: 44px; padding: 8px 20px; border: 0; border-radius: 999px; background: var(--surface); color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; border: 1px solid var(--line); }
.earn-tab.is-on { background: var(--taxi); color: var(--on-taxi); border-color: var(--taxi); }
.earn-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.earn-label { font-weight: 700; text-align: center; flex: 1; }
.earn-step { width: 44px; height: 44px; border: 0; background: transparent; color: var(--fg); display: grid; place-items: center; border-radius: 12px; cursor: pointer; }
.earn-step:disabled { opacity: .3; cursor: default; }
.earn-big { text-align: center; display: grid; gap: 4px; padding: 10px 0; }
.earn-big strong { font-size: 2.6rem; line-height: 1.1; }
.earn-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; padding: 12px 4px; border-block: 1px solid var(--line); }
.earn-stat { display: grid; gap: 4px; }
.earn-stat strong { font-size: 1.05rem; }
.earn-stat span { font-size: .85rem; }
.earn-sec, .earn-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.earn-sec h3, .earn-card h3 { margin: 0; font-size: 1.05rem; }
.earn-card h2 { margin: 0; font-size: 1.3rem; }
.earn-card p { margin: 0; }
.earn-line { display: flex; justify-content: space-between; gap: 10px; }
.earn-link { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; text-align: start; }
.earn-day { margin: 8px 0 0; font-size: 1rem; }
.earn-trip { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--fg); font: inherit; cursor: pointer; text-align: start; width: 100%; }
.earn-trip-t { flex: 1; display: grid; gap: 2px; min-width: 0; }
.earn-trip-t > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.earn-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--taxi); color: var(--on-taxi); font-weight: 800; flex: none; }
.earn-trip-p { white-space: nowrap; }
.earn-msg { text-align: center; padding: 20px 0; }
.earn-map { height: 220px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.earn-map .leaflet-tile-pane { filter: invert(1) hue-rotate(192deg) brightness(1.12) contrast(.92) saturate(.7); }
.earn-pt { display: flex; align-items: center; gap: 10px; }
.earn-pt-a { flex: 1; font-weight: 700; }
.earn-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.earn-mini > div { display: grid; gap: 2px; }
.earn-cust { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.earn-stars { color: #FFB800; letter-spacing: 2px; font-size: 1.15rem; }
.earn-support .btn { width: 100%; }

/* قايمة الإعدادات من فوق شاشة الرادار */
.radar-top { position: relative; }
.radar-menu { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: #fff; cursor: pointer; }
body.menu-open .radar-full { z-index: 40; }

/* لو المزوّد بيدّي خريطة غامقة جاهزة (tileFilter: false في config.js) منطبّقش الفلتر */
html.tiles-raw .leaflet-tile-pane, html.tiles-raw .earn-map .leaflet-tile-pane { filter: none; }

/* ====== الخريطة أول حاجة في صفحة الطلب ====== */
.map-first { margin-top: 0; position: sticky; top: calc(65px + env(safe-area-inset-top, 0px)); z-index: 30; background: var(--bg); padding-top: 8px; }
@media (max-height: 560px) { .map-first { position: static; } }
.map-first #req-map { height: clamp(230px, 40vh, 400px); border-radius: 0 0 var(--radius) var(--radius); }
.map-first .map-status { padding: 8px 4px 0; }
.map-controls { margin-top: 8px; }
.map-controls .map-tools { margin-block: 10px 6px; }

/* ====== صفحة الـGPS (عند العميل والكابتن) ====== */
.gps-box { position: relative; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--line); background: var(--surface); }
.gps-map { height: clamp(360px, 62vh, 620px); direction: ltr; z-index: 0; isolation: isolate; }
.gps-chip { position: absolute; z-index: 500; inset-inline: 12px; top: 12px; display: grid; gap: 2px; justify-items: center; text-align: center;
  padding: 10px 14px; border-radius: 16px; background: rgba(11, 18, 32, .88); color: #fff; backdrop-filter: blur(6px); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.gps-lbl { font-size: .9375rem; font-weight: 600; opacity: .9; }
.gps-row { display: flex; align-items: baseline; gap: 8px; direction: rtl; }
.gps-num { font-size: clamp(2.25rem, 9vw, 3.25rem); line-height: 1.05; font-weight: 800; font-variant-numeric: tabular-nums; }
.gps-unit { font-size: 1.125rem; font-weight: 700; opacity: .9; }
.gps-sub { font-size: .875rem; opacity: .75; }
.gps-chip.is-here { background: rgba(10, 120, 60, .94); }
.gps-recenter { position: absolute; z-index: 500; right: 12px; left: auto; bottom: 30px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: #0b1220; font-size: 1.5rem; box-shadow: 0 3px 12px rgba(0,0,0,.4); cursor: pointer; }
.cap-live { transition: transform 1.2s linear; }
.trk-gps { margin-block: 8px 12px; }
.trk-page .page-head { display: none; }
.trk-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); margin-block: 8px; }
.trk-banner strong { font-size: 1.125rem; }
.trk-banner-dot { width: 14px; height: 14px; border-radius: 50%; background: #14B85A; box-shadow: 0 0 0 4px rgba(20,184,90,.25); flex: none; }
.trk-banner-arrived .trk-banner-dot, .trk-banner-started .trk-banner-dot { background: #2f86ff; box-shadow: 0 0 0 4px rgba(47,134,255,.25); }
.trk-sub { margin-block: 2px 6px; font-size: .875rem; }
.trip-screen .gps-map { height: clamp(300px, 48vh, 520px); }

/* ====== خريطة الـGPS أصغر وثابتة فوق، والمعلومات بتطلع وتنزل تحتها ====== */
.gps-map { height: clamp(200px, 32vh, 300px); }
.trip-screen .gps-map { height: clamp(200px, 32vh, 300px); }
.gps-chip { inset-inline: 10px; top: 8px; padding: 6px 12px; border-radius: 14px; gap: 0; }
.gps-chip .gps-lbl { font-size: .8125rem; }
.gps-chip .gps-num { font-size: clamp(1.625rem, 7vw, 2.125rem); }
.gps-chip .gps-unit { font-size: 1rem; }
.gps-chip .gps-sub { display: none; }
.gps-recenter { width: 40px; height: 40px; bottom: 26px; font-size: 1.25rem; }
#trk-top { position: sticky; top: calc(65px + env(safe-area-inset-top, 0px)); z-index: 40; background: var(--bg); }
#trk-top .trk-gps { margin: 0; padding-block: 6px 8px; }
.trip-screen .gps-box { position: sticky; top: calc(65px + env(safe-area-inset-top, 0px)); z-index: 40; box-shadow: 0 8px 14px -8px rgba(0,0,0,.45); }

/* ====== بطاقة المسافة: حبّة صغيرة في ركن الخريطة (مش شريط عريض) ومبتمنعش الزوم ولا السحب ====== */
.gps-map { height: clamp(230px, 38vh, 340px); }
.trip-screen .gps-map { height: clamp(230px, 38vh, 340px); }
.gps-chip { inset-inline: auto; inset-inline-start: 8px; top: 8px; width: auto; max-width: 62%; display: flex; flex-direction: row; align-items: baseline; justify-content: center; gap: 8px;
  padding: 4px 10px; border-radius: 12px; background: rgba(11, 18, 32, .72); backdrop-filter: none; box-shadow: 0 2px 8px rgba(0,0,0,.3); pointer-events: none; }
.gps-chip .gps-lbl { font-size: .75rem; font-weight: 600; opacity: .85; white-space: nowrap; }
.gps-chip .gps-row { gap: 4px; }
.gps-chip .gps-num { font-size: 1.25rem; line-height: 1.1; }
.gps-chip .gps-unit { font-size: .8125rem; }
.gps-chip.is-here { background: rgba(10, 120, 60, .85); }

/* رسالة الميكروفون المرفوض: خطوات واضحة */
.call-mic-help { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.08); font-size: .9375rem; line-height: 1.6; text-align: start; }

#price-ui.is-busy{opacity:.45;transition:opacity .15s;pointer-events:none}

/* ===== تصوير المستندات (رخصة + مركبة) ===== */
.doc-field .req { color: var(--taxi); font-size: .78em; font-weight: 700; margin-inline-start: 4px; }
.doc-row { display: flex; gap: 10px; }
.doc-slot { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 8px; border-radius: 14px;
  background: var(--surface); border: 2px dashed var(--line); color: inherit; font: inherit; cursor: pointer; text-align: center; }
.doc-slot:focus-visible { outline: 3px solid var(--taxi); outline-offset: 2px; }
.doc-slot.is-done { border-style: solid; border-color: #14B85A; }
.doc-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 1.586; border-radius: 9px; background: var(--night) center / cover no-repeat; }
.doc-plate .doc-thumb { aspect-ratio: 2.4; }
.doc-slot:only-child .doc-thumb { aspect-ratio: 2.4; }
.doc-cap { font-size: .86rem; line-height: 1.35; }
.doc-slot.is-done .doc-cap { color: var(--wa); font-weight: 600; }
.doc-late { margin-block: 14px; }

.scan-dialog { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; overflow: hidden; }
.scan-dialog::backdrop { background: #000; }
.scan-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.scan-mid { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 150px 18px 150px; pointer-events: none; }
.scan-frame { position: relative; width: min(100%, 560px); max-height: 100%; aspect-ratio: var(--ratio, 1.586); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.62); border: 2px solid rgba(255,255,255,.85); }
.scan-frame i { position: absolute; width: 26px; height: 26px; border: 4px solid #FFB800; }
.scan-frame .c1 { top: -4px; inset-inline-start: -4px; border-width: 4px 0 0 4px; border-radius: 12px 0 0 0; }
.scan-frame .c2 { top: -4px; inset-inline-end: -4px; border-width: 4px 4px 0 0; border-radius: 0 12px 0 0; }
.scan-frame .c3 { bottom: -4px; inset-inline-start: -4px; border-width: 0 0 4px 4px; border-radius: 0 0 0 12px; }
.scan-frame .c4 { bottom: -4px; inset-inline-end: -4px; border-width: 0 4px 4px 0; border-radius: 0 0 12px 0; }
[dir="rtl"] .scan-frame .c1 { border-width: 4px 4px 0 0; border-radius: 0 12px 0 0; }
[dir="rtl"] .scan-frame .c2 { border-width: 4px 0 0 4px; border-radius: 12px 0 0 0; }
[dir="rtl"] .scan-frame .c3 { border-width: 0 4px 4px 0; border-radius: 0 0 12px 0; }
[dir="rtl"] .scan-frame .c4 { border-width: 0 0 4px 4px; border-radius: 0 0 0 12px; }
.scan-top { position: absolute; top: 0; inset-inline: 0; padding: max(12px, env(safe-area-inset-top)) 16px 10px; display: grid; gap: 8px; background: linear-gradient(#000c, #0000); z-index: 2; }
.scan-row { display: flex; align-items: center; gap: 12px; }
.scan-name { gap: 10px; }
.scan-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 1.1rem; cursor: pointer; }
.scan-step { font-size: .85rem; background: rgba(255,255,255,.18); padding: 4px 12px; border-radius: 99px; }
.scan-title { font-size: 1.2rem; }
.scan-ico { display: inline-flex; flex: none; }
.scan-hint { margin: 0; font-size: .92rem; opacity: .92; }
.scan-bottom { position: absolute; bottom: 0; inset-inline: 0; padding: 16px 16px max(22px, env(safe-area-inset-bottom)); display: flex; justify-content: center; background: linear-gradient(#0000, #000b); z-index: 2; }
.scan-shutter { width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: #FFB800; box-shadow: 0 0 0 4px rgba(0,0,0,.35); cursor: pointer; }
.scan-shutter:active { transform: scale(.94); }
.scan-shutter:disabled { opacity: .5; }
.scan-flash { position: absolute; inset-inline: 24px; top: 50%; transform: translateY(-50%); z-index: 3; padding: 18px; border-radius: 16px; background: rgba(20,184,90,.94); color: #fff; font-weight: 700; font-size: 1.1rem; text-align: center; white-space: pre-line; }
.scan-review { position: absolute; inset: 0; z-index: 4; overflow: auto; background: #0b0f14; padding: 20px 16px 28px; display: grid; gap: 14px; align-content: start; }
.scan-review h2 { margin: 0; }
.scan-card { display: grid; gap: 8px; padding: 10px; border-radius: 14px; background: #131a24; justify-items: start; }
.scan-card img { width: 100%; border-radius: 9px; background: #000; }

.doc-view { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.doc-item { display: grid; gap: 4px; width: 130px; text-align: center; color: inherit; text-decoration: none; font-size: .82rem; }
.doc-item img { width: 100%; aspect-ratio: 1.4; object-fit: cover; border-radius: 8px; background: #000; }
.doc-item.is-missing { border: 2px dashed var(--line); border-radius: 8px; padding: 18px 6px; place-content: center; }
.doc-missing { color: var(--danger); font-weight: 700; }
.scan-step:empty { display: none; }
.scan-review .btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); background: transparent; }
.scan-review .muted { color: rgba(255,255,255,.7); }

/* ---- المكالمات داخل التطبيق ---- */
.call-btn { display: inline-flex; align-items: center; gap: 6px; }
.call-btn[hidden] { display: none; }
body.call-open { overflow: hidden; }
.call-overlay { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; padding: 20px;
  background: rgba(8, 12, 17, .94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; }
.call-card { width: min(92vw, 360px); display: grid; justify-items: center; gap: 12px; text-align: center; }
.call-avatar { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; font-size: 3rem; font-weight: 700;
  background: var(--route); color: var(--on-route, #06222a); box-shadow: 0 0 0 10px rgba(60, 198, 210, .15), 0 0 0 22px rgba(60, 198, 210, .07); }
.call-name { font-size: 1.5rem; }
.call-status { min-height: 1.6em; font-size: 1.1rem; color: #C9D2DC; font-variant-numeric: tabular-nums; }
.call-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 22px; }
.call-round { width: 76px; height: 76px; border-radius: 50%; border: 0; font: inherit; font-weight: 700; font-size: .9rem; color: #fff; cursor: pointer; }
.call-round[hidden] { display: none; }
.call-answer { background: #17A34A; animation: callPulse 1.2s ease-in-out infinite; }
.call-end { background: #DC2626; }
.call-mute { background: #3A4552; }
.call-mute.is-on { background: #fff; color: #111; }
.call-round:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@keyframes callPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(23, 163, 74, .55); } 50% { box-shadow: 0 0 0 16px rgba(23, 163, 74, 0); } }
@media (prefers-reduced-motion: reduce) { .call-answer { animation: none; } }

/* ---- أول شاشة في الطلب: صور المركبات بس ---- */
.veh-step { padding: 18px 0 8px; }
.veh-step[hidden] { display: none; }
.veh-step h2 { margin-bottom: 14px; }
.veh-step .veh-grid label { min-height: 150px; }
.veh-chosen { display: flex; align-items: center; gap: 8px; padding: 10px 0 2px; }
.veh-chosen strong { flex: 1 1 auto; }

/* ---------- صفحات السياسة والشروط ---------- */
.legal-page { padding-block: 24px 40px; line-height: 1.9; }
.legal-page h1 { margin-bottom: 4px; }
.legal-page h2 { font-size: 1.2rem; margin: 26px 0 6px; }
.legal-page ul { padding-inline-start: 22px; display: grid; gap: 6px; }
.legal-page a { color: var(--accent, inherit); text-decoration: underline; }

/* فحص المستندات اللحظي */
.scan-chip { position: absolute; bottom: 118px; inset-inline: 16px; margin: 0; text-align: center; font-weight: 700; font-size: .98rem; padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,.66); color: #fff; z-index: 2; }
.scan-chip:empty { display: none; }
.scan-chip[data-state="warn"] { background: rgba(180,60,20,.92); }
.scan-chip[data-state="ok"] { background: rgba(20,150,70,.94); }
.scan-frame { transition: border-color .15s, box-shadow .15s; }
.scan-frame.is-ok { border-color: #22c55e; }
.scan-frame.is-warn { border-color: #f59e0b; }
.scan-frame.is-ok i { border-color: #22c55e; }
.scan-bottom { flex-direction: column; align-items: center; gap: 10px; }
.scan-manual { color: #fff; border-color: rgba(255,255,255,.6); background: rgba(0,0,0,.4); }
.scan-fail { position: absolute; inset: 0; z-index: 5; background: #0b0f14; padding: 28px 20px; display: grid; gap: 14px; align-content: center; text-align: center; }
.scan-fail h2 { margin: 0; }
.scan-fail-msg { margin: 0; line-height: 1.8; color: rgba(255,255,255,.88); }
.scan-fail .btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); background: transparent; }
.doc-slot.is-missing, .doc-item.is-missing { outline: 2px solid #d33; animation: ay-shake .35s; }
@keyframes ay-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.msg-inline { margin: 10px 0 0; }

/* المحفظة */
.wallet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wallet-head > div { display: grid; }
.wallet-bal { font-size: 1.5rem; }
.wallet-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.wallet-note { margin: 8px 0 0; font-size: .85rem; }
.wl-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.wl-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.wl-what { display: grid; }
.wl-amt { font-weight: 800; text-align: end; }
.wl-amt.is-plus { color: #118a43; } .wl-amt.is-minus { color: #c0392b; }
.wl-bal { grid-column: 2; text-align: end; font-size: .8rem; }
.wallet-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.wallet-sum > div { display: grid; gap: 4px; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.wallet-sum b { font-size: 1.25rem; }
.wallet-row { display: grid; gap: 6px; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-top: 10px; }
.wallet-who { display: grid; }
.wl-input { width: 110px; min-height: 40px; padding: 4px 10px; border: 2px solid var(--line); border-radius: var(--radius-sm); font: inherit; }

/* رسومات الأقسام + الخانات القابلة للفتح (صفحة الإدارة) */
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sec-head h2 { margin: 0; }
.sec-ico { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--route); background: color-mix(in srgb, var(--route) 14%, transparent); }
.sec-ico svg { width: 22px; height: 22px; }
details.fold > summary > .sec-ico { margin-inline-end: -2px; }
details.fold > summary h2 { flex: 1; }
.fold-mini { margin-top: 12px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.fold-mini > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; }
.fold-mini > summary::-webkit-details-marker { display: none; }
.fold-mini > summary::after { content: ""; flex: none; width: 11px; height: 11px; border-inline-end: 3px solid var(--fg); border-bottom: 3px solid var(--fg); transform: rotate(45deg); transition: transform .2s; margin-inline-start: 2px; margin-inline-end: 4px; }
.fold-mini[open] > summary::after { transform: rotate(-135deg); }
.fold-mini > summary:focus-visible { outline: 3px solid var(--route); outline-offset: 2px; border-radius: var(--radius); }
.fold-title { font-weight: 800; font-size: 1.05rem; }
.fold-meta { margin-inline-start: auto; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.fold-meta:empty { display: none; }
.fold-body { padding: 4px 12px 14px; display: grid; gap: 10px; }
.fold-mini.is-ok .sec-ico { color: #118a43; background: color-mix(in srgb, #118a43 14%, transparent); }
.fold-mini.is-low .sec-ico { color: #c77700; background: color-mix(in srgb, #FFB800 22%, transparent); }
.fold-mini.is-low { border-color: color-mix(in srgb, #FFB800 55%, var(--line)); }

/* الحركة اليومية */
.dm-row { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.dm-total { background: color-mix(in srgb, var(--route) 8%, transparent); border-color: color-mix(in srgb, var(--route) 40%, var(--line)); }
.dm-name { display: flex; align-items: center; gap: 10px; }
.dm-name .sec-ico { width: 34px; height: 34px; }
.dm-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dm-stat { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.dm-stat span { font-size: .82rem; }
.dm-stat b { font-size: 1.1rem; }
.dm-stat.is-strong b { color: var(--route); }
.dm-note { margin: 0; font-size: .85rem; }

/* المحفظة: خانتين جنب بعض + الإعدادات */
.wallet-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; margin-top: 12px; }
.wallet-groups .fold-mini { margin-top: 0; min-width: 0; }
.wallet-groups .fold-mini[open] { grid-column: 1 / -1; }
.wallet-groups .fold-mini:not([open]) > summary { flex-wrap: wrap; align-content: center; row-gap: 6px; min-height: 104px; }
.wallet-groups .fold-mini:not([open]) > summary .fold-title { flex-basis: 100%; order: 3; }
.wallet-groups .fold-mini:not([open]) > summary::after { margin-inline-start: auto; order: 2; }
.wallet-groups .fold-mini:not([open]) > summary .fold-meta { order: 4; margin-inline-start: 0; font-size: 1.05rem; font-weight: 800; color: var(--fg); }
.wallet-groups .fold-mini:not([open]) > summary .sec-ico { order: 1; }
.wallet-settings { display: grid; gap: 12px; padding: 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-top: 12px; }
.wallet-settings h3 { margin: 0; }
.ws-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.ws-switch input { width: 24px; height: 24px; flex: none; accent-color: var(--taxi); }
.ws-switch-txt { display: grid; gap: 2px; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.ws-field { display: grid; gap: 4px; min-width: 0; }
.ws-field input { width: 100%; min-width: 0; min-height: 44px; padding: 6px 10px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--fg); font: inherit; box-sizing: border-box; }
.wallet-settings .btn { justify-self: start; }
.wallet-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wallet-row { margin-top: 0; }
.wl-input { background: var(--bg); color: var(--fg); box-sizing: border-box; }
@media (max-width: 380px) { .wallet-groups { grid-template-columns: 1fr; } }

/* سعر مقترح (تروسيكل ونقل) */
.price-open { display: grid; gap: 8px; }
.price-open label { font-weight: 800; }
.price-open input { min-height: 48px; padding: 8px 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--fg); font: inherit; box-sizing: border-box; width: 100%; }
.price-open p { margin: 0; }

/* خطوات إذن الكاميرا */
.scan-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: start; }
.scan-steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: #131a24; font-size: 1.02rem; line-height: 1.6; }
.scan-step-n { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #FFB800; color: #12161C; font-weight: 800; }

/* كاميرا الموبايل كبديل من غير إذن */
.scan-native { position: relative; cursor: pointer; }
.scan-native-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.scan-insite { text-align: start; border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); padding: 4px 14px; }
.scan-insite > summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 700; color: rgba(255,255,255,.9); }
.scan-insite[open] { padding-bottom: 14px; display: grid; gap: 12px; }
.scan-insite[open] > summary { margin-bottom: 2px; }

.scan-native.btn-ghost { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.35); font-size: .95rem; }

/* تسجيل الخروج في الإعدادات: بيظهر بس لو في حساب مسجّل دخول */
.menu-out { display: block; width: 100%; text-align: inherit; padding: 14px; border-radius: var(--radius-sm); border: 2px solid var(--danger, #e5484d); background: transparent; color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; }
.menu-out[hidden] { display: none; }
.menu-out:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* تنبيه المستندات الناقصة فوق الرادار */
.docs-banner { position: fixed; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 95; display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--radius); border: 2px solid var(--taxi); background: var(--surface); color: var(--fg); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.docs-banner p { margin: 0; line-height: 1.7; }
body.menu-open .docs-banner { z-index: 30; }

/* زرار تفعيل إشعارات الموبايل */
.push-box { display: grid; gap: 8px; padding: 12px 14px; border: 2px solid var(--taxi); border-radius: var(--radius); background: var(--surface); margin-block: 10px; }
.push-box[hidden] { display: none; }
.push-msg { margin: 0; line-height: 1.7; }
.radar-push { position: absolute; inset-inline: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 3; color: var(--fg); }
.radar-push .push-box { background: color-mix(in srgb, var(--surface) 92%, transparent); }
body:has(#cap-radar:not([hidden]) .push-box:not([hidden])) .docs-banner { bottom: calc(190px + env(safe-area-inset-bottom, 0px)); }

/* شحن الرصيد أونلاين (فوري) */
.wallet-online { display: grid; gap: 8px; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.wallet-online > .muted { font-size: .85rem; }
.wallet-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wallet-chips .chip.is-on { border-color: var(--taxi); background: var(--taxi); color: var(--on-taxi); font-weight: 700; }
.wallet-online-row { display: flex; gap: 8px; align-items: center; }
.wallet-online-row input { flex: 1; min-width: 0; }
.price-row > .row-msg { grid-column: 1 / -1; margin: 0; }

/* ---------- الطوارئ + سجل الإشعارات ---------- */
:root { --on-danger: #FFFFFF; --danger-bg: #B3261E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --on-danger: #3B0A06; --danger-bg: #FF8A80; } }
:root[data-theme="dark"] { --on-danger: #3B0A06; --danger-bg: #FF8A80; }
.menu-badge { margin-inline-start: auto; min-width: 24px; padding: 0 8px; border-radius: 999px; background: var(--danger-bg); color: var(--on-danger); font-size: .8rem; line-height: 24px; text-align: center; font-weight: 800; }
.menu-badge[hidden] { display: none; }
.menu-btn { position: relative; }
.menu-btn.has-unread::after { content: ''; position: absolute; top: 6px; inset-inline-end: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--danger-bg); border: 2px solid var(--bg); }
.menu-links a.menu-sos { border-color: var(--danger-bg); }
.sf-calls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.sf-call { display: grid; gap: 10px; justify-items: start; align-content: space-between; min-height: 132px; padding: 16px; border-radius: 20px; text-decoration: none; background: var(--danger-bg); color: var(--on-danger); }
.sf-call.sf-amb { background: var(--surface); color: var(--fg); border: 2px solid var(--danger-bg); }
.sf-call-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, currentColor 16%, transparent); }
.sf-call-t { display: grid; gap: 0; line-height: 1.3; }
.sf-call-t strong { font-size: 1.1rem; }
.sf-num { font-size: 1.9rem; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.sf-call:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sf-card { display: grid; gap: 12px; padding: 16px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.sf-card h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.1rem; }
.sf-card p { margin: 0; }
.sf-h-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--route) 14%, transparent); color: var(--route); }
.sf-h-ico svg { width: 22px; height: 22px; }
.sf-form { display: grid; gap: 8px; }
.sf-form label { font-weight: 700; font-size: .95rem; }
.sf-who { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sf-who .sf-num { font-size: 1.2rem; }
.sf-actions { display: grid; gap: 10px; }
.sf-actions .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.sf-actions .btn svg { width: 22px; height: 22px; }
.sf-tips ul { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 6px; color: var(--muted); }
.nt-list { display: grid; gap: 10px; margin-bottom: 14px; }
.nt-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--fg); text-decoration: none; }
.nt-item.is-new { border-color: var(--taxi); background: color-mix(in srgb, var(--taxi) 10%, var(--surface)); }
.nt-dot { flex: none; width: 10px; height: 10px; margin-top: 9px; border-radius: 50%; background: var(--line); }
.nt-item.is-new .nt-dot { background: var(--taxi); }
.nt-txt { display: grid; gap: 2px; min-width: 0; }
.nt-txt strong { font-size: 1rem; }
.nt-txt span { color: var(--muted); overflow-wrap: anywhere; }
.nt-txt small { color: var(--muted); font-size: .8rem; }
.nt-item:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* «السعر العادل» بلون واضح في كل مكان (طلب العميل، شاشة الكابتن، كل المركبات) */
.fair-word { color: var(--route); font-weight: 800; }
:root { --fair: #0A6B76; }
.fair-word { color: var(--fair); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --fair: #5ADCE8; } }
:root[data-theme="dark"] { --fair: #5ADCE8; }

/* ---------- حجز سفر ---------- */
.bk-list { display: grid; gap: 12px; margin-top: 14px; }
.bk-card { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--fg); text-decoration: none; }
.bk-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.bk-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bk-route { display: grid; gap: 6px; }
.bk-route p { display: flex; align-items: flex-start; gap: 10px; margin: 0; }
.bk-pin { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-weight: 800; font-size: .8rem; }
.bk-a { background: #2F6BFF; }
.bk-b { background: #1E9E4F; }
.bk-when { font-size: 1.1rem; font-weight: 800; margin: 0; }
.bk-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--route) 12%, var(--surface)); color: var(--fg); }
.bk-empty { margin-top: 14px; }
.booking-when .field input[type="datetime-local"] { width: 100%; min-height: 48px; }

/* ---------- الحجز المبكر على رادار الكابتن ---------- */
:root { --book: #6A3FD0; --on-book: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --book: #B79CFF; --on-book: #1B0F3D; } }
:root[data-theme="dark"] { --book: #B79CFF; --on-book: #1B0F3D; }
.booking-card { border: 2px solid var(--book) !important; background: color-mix(in srgb, var(--book) 14%, var(--surface)) !important; }
.book-tag { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--book); color: var(--on-book); font-weight: 800; font-size: .85rem; }
.book-when { margin: 4px 0; font-weight: 800; font-size: 1.05rem; color: var(--book); }
.my-bookings { display: grid; gap: 10px; margin-top: 14px; }
.my-bookings h3 { margin: 0; }

/* ===== رحلة الرجعة (لون تيل مميز عن الحجز المبكر) ===== */
:root { --ret: #0B7F70; --on-ret: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ret: #4FD6C0; --on-ret: #04302A; } }
:root[data-theme="dark"] { --ret: #4FD6C0; --on-ret: #04302A; }
.ret-tag { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--ret); color: var(--on-ret); font-weight: 800; font-size: .85rem; }
.ret-box { display: grid; gap: 10px; margin-top: 14px; }
.ret-box h3 { margin: 0; color: var(--ret); }
.ret-card { display: grid; gap: 6px; padding: 14px; border: 2px solid var(--ret); border-radius: 18px; background: color-mix(in srgb, var(--ret) 12%, var(--surface)); }
.ret-card.on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ret) 45%, transparent); }
.ret-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ret-when { margin: 2px 0; font-weight: 800; color: var(--ret); }
.ret-card p, .ret-captain p { margin: 0; }
.ret-captain { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--ret); }
.ret-h { color: var(--ret); }
.ret-l { font-weight: 700; }

/* ===== كلمات التقييم ===== */
:root { --tag-pos: #0B7F5A; --tag-pos-bg: #DDF5EB; --tag-neg: #A8481F; --tag-neg-bg: #FBE8DD; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tag-pos: #5FE0B0; --tag-pos-bg: #0F3A2C; --tag-neg: #FFA878; --tag-neg-bg: #43241A; } }
:root[data-theme="dark"] { --tag-pos: #5FE0B0; --tag-pos-bg: #0F3A2C; --tag-neg: #FFA878; --tag-neg-bg: #43241A; }
.rate-ask { margin: 12px 0 6px; font-weight: 800; text-align: center; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 8px; }
.tag-chip { padding: 8px 14px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer; }
.tag-chip.pos { background: var(--tag-pos-bg); color: var(--tag-pos); border-color: color-mix(in srgb, var(--tag-pos) 35%, transparent); }
.tag-chip.neg { background: var(--tag-neg-bg); color: var(--tag-neg); border-color: color-mix(in srgb, var(--tag-neg) 35%, transparent); }
.tag-chip[aria-pressed="true"].pos { background: var(--tag-pos); color: var(--tag-pos-bg); }
.tag-chip[aria-pressed="true"].neg { background: var(--tag-neg); color: var(--tag-neg-bg); }
.tag-chip.static { cursor: default; padding: 5px 12px; font-size: .9rem; }
.rate-skip { display: block; margin: 8px auto 0; }
.tag-line { color: var(--tag-pos); font-weight: 700; font-size: .9rem; }
.cap-fb { display: grid; gap: 6px; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cap-fb h3 { margin: 0; }
.cap-fb p { margin: 0; }
.hs-h { margin: 14px 0 6px; }
.hs-card.is-cancelled { opacity: .85; }

/* ===== أيقونات الكباتن على الخريطة + صفحة متابعة الأهل ===== */
.veh-pin { background: none; border: 0; }
.veh-pin-in { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #FFB800; color: #14161C; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.veh-pin.big .veh-pin-in { box-shadow: 0 0 0 6px rgba(255,184,0,.25), 0 2px 8px rgba(0,0,0,.5); }
.veh-pin svg { display: block; }
.veh-pin:not(.big) svg { width: 20px; height: 13px; }
.pt-pin { background: none; border: 0; }
.pt-pin span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-weight: 800; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.pt-pin.a span { background: #3B6BFF; }
.pt-pin.b span { background: #1FA45B; }
.sh-map { height: 340px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 12px; }
.sh-info { display: grid; gap: 6px; }
.sh-info p { margin: 0; }
.sh-addr { display: flex; align-items: center; gap: 8px; }

/* ===== الأداء + التبويبات + عدّاد الرحلات + قريباً ===== */
:root { --plat: #5B6B86; --plat-2: #8FA3C4; --good: #1E7B3A; --good-bg: #E2F3E7; --warn-bg: #FDECEA; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --plat: #A9BCDD; --plat-2: #6F86AE; --good: #7FD39A; --good-bg: #17301F; --warn-bg: #3A1B19; } }
:root[data-theme="dark"] { --plat: #A9BCDD; --plat-2: #6F86AE; --good: #7FD39A; --good-bg: #17301F; --warn-bg: #3A1B19; }

.avatar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto; }
.cap-count-row { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cap-count { font-size: .78rem; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.2; max-width: 84px; }
.cust-count { font-size: .8rem; font-weight: 700; color: var(--muted); }
.top-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: var(--taxi); color: #12161C; white-space: nowrap; }

.cap-tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 95; display: flex; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -4px 18px rgba(0,0,0,.12); }
.cap-tabbar[hidden] { display: none; }
.cap-tabbtn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 6px 8px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; min-height: 56px; }
.cap-tabbtn.is-on { color: var(--fg); box-shadow: inset 0 3px 0 var(--taxi); }
.cap-tabbtn.is-on svg { color: var(--taxi); }
body.has-captabs { padding-bottom: 72px; }
body.has-captabs .radar-full { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
body.has-captabs .docs-banner { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }

.perf { display: grid; gap: 14px; margin-top: 8px; }
.perf[hidden] { display: none; }
.perf-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.perf-level.is-plat { border-color: var(--plat-2); background: linear-gradient(160deg, var(--surface), color-mix(in srgb, var(--plat-2) 18%, var(--surface))); }
.perf-level-top { display: flex; align-items: center; gap: 12px; }
.perf-level-top h2 { margin: 0; font-size: 1.5rem; color: var(--plat); }
.perf-level-top p { margin: 2px 0 0; }
.perf-gem { font-size: 2rem; color: var(--plat); line-height: 1; }
.perf-bar { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.perf-bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--plat-2), var(--plat)); transition: width .5s ease; }
.perf-bar-meta { display: flex; justify-content: space-between; align-items: baseline; }
.perf-bar-meta strong { font-size: 1.25rem; }
.perf-perks-btn { justify-self: start; border: 0; background: transparent; color: var(--route); font: inherit; font-weight: 800; padding: 6px 0; cursor: pointer; text-decoration: underline; }
.perf-perks { border-top: 1px dashed var(--line); padding-top: 10px; }
.perf-perks[hidden] { display: none; }
.perf-perks h4 { margin: 0 0 6px; }
.perf-perks ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; }
.perf-stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); text-align: center; }
.perf-stat { display: grid; gap: 2px; justify-items: center; align-content: center; }
.perf-stat strong { font-size: 1.5rem; }
.perf-invite { text-align: center; justify-items: center; }
.perf-invite h3 { margin: 0; }
.perf-qr { width: 180px; height: 180px; border-radius: 14px; background: #fff; padding: 8px; }
.perf-invite-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.cap-fb-line { display: grid; gap: 4px; padding: 8px 10px; border-radius: 12px; background: var(--bg); }
.cap-fb-line.is-flag { background: var(--warn-bg); border: 1px solid var(--danger); }
.cap-fb-line .tag-chips { justify-content: flex-start; margin: 0; }
.cap-flag-t { color: var(--danger); }
.cap-row.has-flag { border-inline-start: 4px solid var(--danger); }
.gate-msg { width: 100%; font: inherit; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); resize: vertical; }

.soon { width: calc(100% - 32px); max-width: 520px; margin: 28px auto; padding: 28px 22px; text-align: center; display: grid; gap: 14px; justify-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); }
.soon-ico { font-size: 3rem; line-height: 1; }
.soon h1 { margin: 0; font-size: 1.7rem; }
.soon-msg { margin: 0; font-size: 1.08rem; line-height: 1.8; white-space: pre-line; }
.soon-when { display: grid; gap: 2px; padding: 12px 18px; border-radius: 16px; background: var(--bg); border: 1px dashed var(--taxi); }
.soon-when strong { font-size: 1.15rem; }
.soon-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.perf-week { display: grid; gap: 2px; }
.perf-week .hint, .perf-perks .hint { margin: 0; }
.perf-perks .hint { margin-top: 10px; }
body.menu-open .cap-tabbar { z-index: 30; }

/* ===== صفحة الأداء (على شكل إنداريف) والمستوى المثبّت فوق ===== */
.plat-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: #1d2b4a; color: #cfe0ff; }
.perf-gem { display: inline-block; width: 22px; height: 22px; color: #8FA3C4; flex: 0 0 auto; }
.perf-gem-big { width: 64px; height: 64px; }
.perf-bar { height: auto; border-radius: 0; background: none; overflow: visible; padding: 10px 14px; position: relative; }
.perf-track { display: block; height: 10px; border-radius: 999px; background: rgba(120,130,150,.35); position: relative; }
.perf-bar-fill { display: block; position: relative; height: 100%; border-radius: 999px; background: var(--taxi); min-width: 4px; transition: width .6s ease; }
.perf-knob { position: absolute; inset-inline-end: -14px; top: 50%; width: 28px; height: 28px; transform: translateY(-50%); padding: 4px; border-radius: 50%; background: #fff; color: #5B6BE0; box-shadow: 0 2px 6px rgba(0,0,0,.35); box-sizing: border-box; }
.perf-mini { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--fg); font: inherit; text-align: start; cursor: pointer; }
.perf-mini[hidden] { display: none; }
.perf-mini.is-plat { border-color: var(--plat-2); }
.perf-mini-body { flex: 1; min-width: 0; display: grid; gap: 0; }
.perf-mini-top { display: flex; align-items: center; gap: 6px; }
.perf-mini-top .perf-gem { width: 18px; height: 18px; }
.perf-mini .perf-bar { padding: 8px 10px; }
.perf-mini .perf-track { height: 7px; }
.perf-mini .perf-knob { width: 22px; height: 22px; padding: 3px; inset-inline-end: -11px; }
.perf-mini-txt { font-size: .82rem; color: var(--muted); line-height: 1.4; }
.radar-full .perf-mini { background: #1f2126; border-color: #34373d; color: #f3f3f3; margin: 0; }
.radar-full .perf-mini-txt { color: #b9bcc3; }
.perf-hero { background: linear-gradient(160deg, #0B7A86, #064a53); color: #fff; border-radius: 26px; padding: 18px 16px 16px; display: grid; gap: 14px; }
.perf-hero-top { display: flex; align-items: center; gap: 14px; }
.perf-hero-ph { position: relative; flex: 0 0 auto; }
.perf-hero-ph .avatar { width: 76px; height: 76px; border: 3px solid #fff; }
.perf-rate-pill { position: absolute; left: 50%; transform: translateX(-50%); bottom: -10px; display: inline-flex; gap: 4px; align-items: center; padding: 3px 10px; border-radius: 999px; background: #12161C; color: #fff; font-size: .85rem; white-space: nowrap; }
.perf-rate-pill span { color: #FFB800; }
.perf-hero-name h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1.7rem; }
.perf-hero-name .perf-gem { color: #fff; width: 28px; height: 28px; }
.perf-hero-name p { margin: 2px 0 0; opacity: .9; }
.perf-hero-panel { background: rgba(0,0,0,.22); border-radius: 18px; padding: 12px 14px; display: grid; gap: 4px; }
.perf-hero-msg { margin: 0; font-weight: 800; font-size: 1.05rem; }
.perf-hero-sub { margin: 0; opacity: .92; font-weight: 700; }
.perf-hero .perf-track { background: rgba(0,0,0,.4); }
.perf-hero-btn { border: 0; border-radius: 16px; padding: 14px; background: #12161C; color: #fff; font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.perf-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 4px 0; border: 0; background: transparent; color: var(--fg); font: inherit; text-align: start; cursor: pointer; }
.perf-row-main { display: grid; gap: 2px; flex: 1; }
.perf-income-n { font-size: 2rem; line-height: 1.1; }
.perf-chev { color: var(--muted); display: inline-flex; }
.perf-plus { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.perf-goal-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.perf-goal-bar span { display: block; height: 100%; background: var(--taxi); border-radius: 999px; }
.perf-goal-edit { display: grid; gap: 10px; }
.perf-goal-edit input { font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.perf-goal-edit input.is-bad { border-color: var(--danger); }
.perf-goal-edit .hint { margin: 0; }
.perf-goal-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.perf-invite { text-align: start; justify-items: stretch; }
.perf-invite-body { display: grid; gap: 10px; justify-items: center; text-align: center; padding-top: 6px; }
.perf-detail-top { display: flex; align-items: center; justify-content: space-between; }
.perf-back { border: 0; background: transparent; color: var(--fg); padding: 6px; cursor: pointer; }
.perf.is-detail { gap: 16px; }
.perf-q { margin: 0; font-size: 1.5rem; }
.perf-checks { gap: 18px; }
.perf-checkrow { display: flex; gap: 12px; align-items: flex-start; }
.perf-check { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--muted); color: var(--bg); }
.perf-check.is-ok { background: #A6E22E; color: #12161C; }
.perf-checkbody { flex: 1; display: grid; gap: 4px; min-width: 0; }
.perf-checkbody .perf-bar { padding-inline: 14px; }
.perf-checkbody .perf-track { background: var(--line); }
.perf-good { color: var(--good); font-weight: 800; }
.perf-perks-card h3 { margin: 0 0 6px; }
.perf-perk { display: flex; gap: 14px; align-items: center; padding: 8px 0; }
.perf-perk p { margin: 2px 0 0; }
.perf-perk-ico { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: color-mix(in srgb, var(--plat-2) 30%, var(--surface)); }

.perf-hero-ph .avatar { background: #fff; color: #064a53; display: grid; place-items: center; font-size: 2rem; font-weight: 800; overflow: hidden; }
.perf-hero-ph .avatar img { width: 100%; height: 100%; object-fit: cover; }
.perf-mini .avatar { flex: 0 0 auto; }

/* خلفية هادية ثابتة لصفحات العميل (من غير أي حركة، فمفيش استهلاك بطارية أو نت) */
body.bg-soft::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 45% at 85% 0%, color-mix(in srgb, var(--taxi) 16%, transparent), transparent 70%),
    radial-gradient(60% 40% at 5% 100%, color-mix(in srgb, var(--route) 14%, transparent), transparent 70%); }

/* ألوان صفحة الأداء بألوان الموقع (التركواز والأصفر) على طريقة إنداريف */
.perf-detail-top { background: linear-gradient(160deg, #0B7A86, #064a53); border-radius: 26px; padding: 16px 18px; color: #fff; }
.perf-detail-top .perf-back { color: #fff; }
.perf-detail-top .perf-gem-big { color: #fff; }
.perf-perk-ico { background: linear-gradient(160deg, #0B7A86, #064a53); color: #fff; }
.perf-checks, .perf-perks-card { border-color: color-mix(in srgb, #0B7A86 35%, var(--line)); }
.perf-income-n { color: var(--route); }
.perf-goal-bar span { background: linear-gradient(90deg, var(--taxi), #FFD54A); }

/* الهيدر المتلوّن واخد عرض الشاشة كلها (زي إنداريف) */
.perf-hero, .perf-detail-top { margin-inline: calc(50% - 50vw); width: 100vw; max-width: 100vw; box-sizing: border-box; border-radius: 0 0 30px 30px; padding-inline: 20px; }
.perf-hero { margin-top: -8px; padding-top: 22px; }
.perf-detail-top { margin-top: -8px; }
html, body { overflow-x: clip; }
/* قايمة واحدة بخانات وفواصل بدل كروت منفصلة */
.perf-list { padding: 4px 16px; gap: 0; }
.perf-item { padding: 12px 0; border-top: 1px solid var(--line); }
.perf-item:first-child { border-top: 0; }
.perf-item .perf-row { padding: 0; gap: 14px; }
.perf-item .wallet-card, .perf-item .form-block.wallet-card { margin: 0; padding: 0; border: 0; box-shadow: none; background: none; }
.perf-row-ico { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--route) 14%, var(--surface)); color: var(--route); }
.wallet-head { display: flex; align-items: center; gap: 14px; }
.wallet-head > .perf-row-main { display: grid; gap: 2px; flex: 1; }
.wallet-bal { font-size: 1.6rem; line-height: 1.1; }
.wal-top-btn { border: 0; border-radius: 999px; padding: 10px 18px; background: var(--taxi); color: #12161C; font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; }
.wal-free { margin-top: 8px; }
.wal-page .earn-body { padding: 16px; display: grid; gap: 14px; align-content: start; }
.wal-page-bal { display: grid; gap: 2px; text-align: center; padding: 18px; border-radius: 22px; background: linear-gradient(160deg, #0B7A86, #064a53); color: #fff; }
.wal-page-bal strong { font-size: 2.2rem; }
.wal-page-bal .muted { color: rgba(255,255,255,.85); }
.wal-stmt-h { margin: 6px 0 0; }
/* كروت اليوم فوق الراداي: أصغر شوية عشان الطلبات ياخدوا المساحة */
.radar-card { padding: 9px 14px; gap: 6px; border-radius: 18px; }
.radar-card strong { font-size: 1.5rem; }
.radar-card span { font-size: .88rem; }
.radar-card-earn .earn-open-btn { width: 36px; height: 36px; }

/* خانة الهدف اليومي بلون الموقع الأصفر (خفيف) */
.perf-goal { background: color-mix(in srgb, var(--taxi) 14%, var(--surface)); margin-inline: -16px; padding-inline: 16px; border-top: 0; }
.perf-goal .perf-row-ico { background: var(--taxi); color: #12161C; }

/* شريط تجديد الصورة فوق الشاشة (كل 15 يوم) */
.photo-due { position: fixed; inset-inline: 0; top: 0; z-index: 120; display: grid; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 14px 12px; background: var(--taxi); color: #12161C; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.photo-due.is-blocked { background: #C0392B; color: #fff; }
.photo-due-txt { display: grid; gap: 2px; }
.photo-due-txt span { font-size: .95rem; }
.photo-due .btn { width: 100%; background: #12161C; color: #fff; border-color: #12161C; }
.photo-due .field-error { margin: 0; color: inherit; }
body.has-photo-due { padding-top: 130px; }
body.has-photo-due .radar-full { padding-top: calc(130px + 4px); }
body.menu-open .photo-due { z-index: 30; }

/* مراجعة صورة الكابتن في لوحة الإدارة */
.ph-line { font-size: .85rem; }
.ph-review { display: grid; gap: 8px; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--taxi) 16%, var(--surface)); border: 1px solid var(--taxi); }
.ph-warn { color: var(--fg); }
.ph-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph-fig { margin: 0; display: grid; gap: 4px; text-align: center; }
.ph-fig img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--line); }
.ph-fig figcaption { font-size: .85rem; font-weight: 700; }

/* هيدر الكابتن في لوحة الإعدادات */
.menu-prof { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(160deg, #0B7A86, #064a53); color: #fff; }
.menu-prof[hidden] { display: none; }
.menu-prof .avatar { flex: 0 0 auto; width: 56px; height: 56px; border: 2px solid #fff; background: #fff; color: #064a53; display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; overflow: hidden; border-radius: 50%; }
.menu-prof .avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu-prof-txt { min-width: 0; display: grid; gap: 2px; }
.menu-prof-name { font-weight: 800; font-size: 1.1rem; overflow-wrap: anywhere; }
.menu-prof-rate { display: flex; align-items: center; gap: 6px; font-size: .95rem; }
.menu-prof-n { opacity: .85; }
.menu-prof-stars { color: var(--taxi); letter-spacing: 2px; font-size: .95rem; direction: ltr; }

/* زرار تفعيل التنبيهات ما يتخبّاش ورا شريط (البحث عن رحلات / الأداء) */
body.has-captabs .radar-push { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
body.has-captabs:has(#cap-radar:not([hidden]) .push-box:not([hidden])) .docs-banner { bottom: calc(80px + var(--push-h, 190px) + 10px + env(safe-area-inset-bottom, 0px)); }

/* كارت صحة الموقع (الإدارة) */
.health-box { display: grid; gap: 8px; }
.health-box[hidden] { display: none; }
.health-ok { margin: 0; color: var(--fair); font-weight: 700; }
.health-ok.is-bad { color: var(--danger-bg, #B3261E); }
.health-bad { margin: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--danger-bg, #B3261E); line-height: 1.7; }

/* بانر المستندات (ثابت تحت) ما يغطّيش آخر صفحة الأداء: مساحة فاضية تحت المحتوى */
body.has-captabs:has(.docs-banner) .perf { padding-bottom: 240px; }
body.has-captabs .perf { padding-bottom: 96px; }
.share-trip { display: grid; gap: 4px; justify-items: start; }

.more-btn { margin-top: 8px; width: 100%; justify-content: center; }
.more-btn[hidden] { display: none; }
#health-run { background: var(--taxi); color: var(--on-taxi); border-color: var(--taxi); font-weight: 800; }

/* إرشاد تصوير المركبة (من ورا للموتوسيكل والتروسيكل، من قدام للعربية) */
.doc-guide { display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin-bottom: 8px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.doc-guide-img { flex: none; line-height: 0; background: #1d2630; border-radius: 10px; }
.doc-guide-img svg { width: 96px; height: 61px; }
.doc-guide-cap { font-weight: 700; line-height: 1.6; }

/* ====== شاشة رحلة الكابتن: أزرار التواصل والتنقل ======
   شمال: موبايل ورسايل فوق بعض | نص: زرار الرحلة العريض | يمين: خريطة التنقل والسهم فوق بعض */
.trip-tools { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 8px; align-items: stretch; direction: ltr; margin-block: 10px 6px; }
.tt-col { display: grid; gap: 8px; align-content: start; direction: rtl; }
.tt-left { width: 52px; }
.tt-right { min-width: 112px; }
.tt-main { display: grid; direction: rtl; }
.tt-main .btn { height: 100%; min-height: 108px; border-radius: 18px; white-space: normal; font-size: 1.0625rem; line-height: 1.3; padding-inline: 8px; }
.ic-btn { position: relative; display: inline-grid; place-items: center; width: 52px; height: 50px; padding: 0; border-radius: 14px; }
.tt-right .ic-btn { width: 100%; }
.ic-btn .ic, .nav-open-btn .ic { display: inline-flex; line-height: 0; }
.ic-btn .ic svg { display: block; }
.ic-chat .chat-badge { position: absolute; top: -6px; inset-inline-end: -6px; margin: 0; min-width: 20px; padding: 0 5px; font-size: .75rem; }
.ic-chat.has-new { border-color: var(--danger); }
.nav-open-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 50px; padding-inline: 10px; white-space: nowrap; }
.voice-hold[hidden] { display: none; }
.call-menu { position: absolute; left: 0; top: 56px; z-index: 60; min-width: 190px; display: grid; gap: 2px; padding: 6px; direction: rtl;
  background: var(--surface); border: 2px solid var(--line); border-radius: 14px; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.call-menu[hidden] { display: none; }
.call-menu-item { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--fg); font: inherit; font-weight: 600; text-align: start; text-decoration: none; cursor: pointer; }
.call-menu-item:hover, .call-menu-item:focus-visible { background: color-mix(in srgb, var(--taxi) 16%, transparent); }
.call-menu-item::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
#call-free::before { background: #14B85A; }

/* ====== شاشة رحلة الكابتن (التقسيمة الجديدة): خريطة كاملة + أزرار عايمة + كارت واحد تحت ====== */
.cap-screen { gap: 0; }
.cap-screen .trip-head { margin-bottom: 8px; }
.cap-screen.trip-screen .gps-box { position: relative; top: auto; z-index: 1; box-shadow: none; border-radius: 22px 22px 0 0; border-bottom: 0; }
.cap-screen.trip-screen .gps-map { height: clamp(300px, 50vh, 540px); }
.cs-over { position: absolute; inset: 0; z-index: 500; pointer-events: none; }
.cs-over > * { pointer-events: none; }
.cs-over button, .cs-over a { pointer-events: auto; }
.cs-fabs { position: absolute; top: 10px; inset-inline-end: 10px; display: grid; gap: 10px; }
.cs-fab { display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; background: rgba(20, 24, 30, .88); box-shadow: 0 3px 12px rgba(0, 0, 0, .45); cursor: pointer; }
.cs-fab:disabled { opacity: .6; }
.cs-fab .ic { display: inline-flex; line-height: 0; }
.cs-pills { position: absolute; bottom: 34px; inset-inline: 0; margin-inline: auto; width: max-content; display: grid; gap: 8px; justify-items: stretch; }
.cs-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 0; background: #fff; color: #0b1220; font-weight: 700; white-space: nowrap; text-decoration: none; box-shadow: 0 3px 12px rgba(0, 0, 0, .4); }
.cs-pill .ic { display: inline-flex; line-height: 0; }
.cs-pill .ic svg { width: 22px; height: 22px; }
.cs-sheet { position: relative; z-index: 41; display: grid; gap: 12px; margin-top: -22px; padding: 10px 14px 14px; background: var(--surface); border: 2px solid var(--line); border-radius: 24px 24px 18px 18px; box-shadow: 0 -8px 22px rgba(0, 0, 0, .28); }
.cs-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 2px; }
.cs-who { display: grid; grid-template-columns: 78px minmax(0, 1fr) 54px; gap: 10px; align-items: start; }
.cs-who .trip-person { flex-direction: column; flex-wrap: nowrap; align-items: center; text-align: center; gap: 4px; }
.cs-who .trip-person strong { flex: none; font-size: .9375rem; line-height: 1.25; word-break: break-word; }
.cs-who .trip-route { align-self: center; min-width: 0; }
.cs-who .trip-route p { margin: 6px 0; font-size: 1rem; font-weight: 600; align-items: center; }
.cs-call { position: relative; display: grid; gap: 10px; align-content: start; }
.cs-call .ic-btn { width: 54px; height: 54px; border-radius: 50%; }
.cs-call .call-menu { left: auto; inset-inline-end: 62px; top: 0; }
.cs-price { font-size: 1.5rem; padding-top: 10px; border-top: 1px solid var(--line); }
.cs-main { display: grid; }
.cs-main .btn { min-height: 62px; border-radius: 16px; font-size: 1.25rem; font-weight: 800; }
.cap-screen .trip-actions { margin-top: 0; }

.cs-who .trip-route .dot-a, .cs-who .trip-route .dot-b { width: 26px; height: 26px; border: 0; display: inline-grid; place-items: center; font-size: .8125rem; font-weight: 800; color: #fff; }
.cs-who .trip-route .dot-a { background: #2F6BFF; }
.cs-who .trip-route .dot-b { background: #14B85A; }
.cs-who .trip-route p { gap: 8px; }
.cs-pill { min-height: 42px; padding: 0 14px; font-size: .9375rem; }

/* ====== تواصل العميل مع الكابتن: نفس أيقونات الموبايل والرسايل الملوّنة ====== */
.cust-contact { position: relative; display: flex; gap: 14px; align-items: center; margin-block: 4px 8px; }
.cust-contact .ic-btn { width: 56px; height: 56px; border-radius: 50%; }
.cust-contact .call-menu { left: auto; inset-inline-start: 0; top: 64px; }

/* لوحة الأسعار: الكلام يلف على سطرين بدل ما يركب على بعضه */
.price-row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.price-field > span { line-height: 1.35; overflow-wrap: anywhere; }
.price-field input { min-width: 0; width: 100%; }

/* ====== صفحة «البحث عن رحلات» الهادية (زي إنداريف): شريط ثابت فوق + طلبات من غير زحمة ====== */
.cap-top { display: none; }
body.cap-find .cap-top { position: fixed; top: 0; inset-inline: 0; z-index: 96; display: flex; align-items: center; justify-content: center; padding: max(10px, env(safe-area-inset-top)) 56px 8px; background: var(--bg); }
body.cap-find .site-header .header-row { display: none; }
body.cap-find .site-header { border-bottom: 0; }
body.cap-find .cap-compact, body.cap-find .cap-fb, body.cap-find #cap-online { display: none !important; }
body.cap-find .cap-top .radar-menu { position: absolute; inset-inline-end: 8px; top: calc(max(10px, env(safe-area-inset-top)) + 2px); transform: none; color: var(--fg); }
body.has-photo-due.cap-find .cap-top { top: 126px; }
body.menu-open.cap-find .cap-top { z-index: 30; }
body.cap-find #cap-home { padding-top: calc(66px + env(safe-area-inset-top, 0px)); }
body.cap-find #cap-trips, body.cap-find .dispatch, body.cap-find #cap-active { border: 0; box-shadow: none; }
body.cap-find #cap-active:empty { display: none; }
body.cap-find:not(.has-photo-due) .radar-full { padding-top: calc(76px + env(safe-area-inset-top, 0px)); }

/* زرار متصل / غير متصل: بيظهر الحالة الحالية بس، والمكان الفاضي بيبدّلها */
.cap-sw { position: relative; display: block; direction: ltr; width: min(74%, 300px); height: 52px; padding: 0; border: 0; border-radius: 999px; background: #2b2d33; cursor: pointer; }
.cap-sw-thumb { position: absolute; top: 4px; bottom: 4px; width: 52%; display: grid; place-items: center; border-radius: 999px; font-weight: 800; font-size: 1.0625rem; transition: left .2s ease, right .2s ease, background-color .2s ease; }
.cap-sw.is-on .cap-sw-thumb { left: 4px; background: var(--taxi); color: #12161C; }
.cap-sw.is-off .cap-sw-thumb { right: 4px; background: #FF6B6B; color: #2a1010; }
.cap-offhint { margin: 18px 6px; text-align: center; color: var(--muted); line-height: 1.6; }
.cap-offhint[hidden] { display: none; }
body.cap-find .cap-stats { gap: 8px; margin-bottom: 6px; }
body.cap-find .cap-stat { padding: 7px 10px; border-radius: 12px; }
body.cap-find .cap-stat strong { font-size: 1.15rem; }
body.cap-find .cap-stat .muted { font-size: .75rem; }
body.cap-find .radar-card { padding: 8px 12px; }

/* طلب بشكل إنداريف: صف نضيف بخط فاصل، 3 نقط على الشمال، والسحب بيظهر 3 أزرار جنب بعض */
.swipe-row { border-radius: 0; }
.swipe-actions { width: 252px; padding: 8px 6px; gap: 6px; }
.swipe-box { font-size: .8125rem; font-weight: 700; }
.open-trip.req-card:not(.booking-card) { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--bg); padding: 14px 40px 14px 6px; gap: 6px; box-shadow: none; }
.req-grid { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start; }
.req-who { display: grid; justify-items: center; gap: 2px; text-align: center; font-size: .8125rem; }
.req-ava { display: inline-flex; line-height: 0; }
.req-who .req-rate { font-size: .8125rem; }
.req-main { display: grid; gap: 6px; min-width: 0; }
.req-km-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .8125rem; }
.req-main .req-price { font-size: 1.5rem; line-height: 1.2; }
.req-main .req-line { gap: 8px; }
.req-main .ldot { width: 22px; height: 22px; font-size: .75rem; }
.req-main .req-addr { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.req-dots { position: absolute; inset-inline-end: 4px; top: 8px; width: 36px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: var(--fg); cursor: pointer; border-radius: 10px; }
.req-dots:focus-visible { outline: 2px solid var(--focus); }
.req-menu { position: absolute; inset-inline-end: 8px; top: 50px; z-index: 30; min-width: 150px; display: grid; padding: 6px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; box-shadow: 0 10px 24px rgba(0, 0, 0, .4); }
.req-menu[hidden] { display: none; }
.req-menu-item { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--fg); font: inherit; font-weight: 700; text-align: start; cursor: pointer; }
.req-menu-item:hover, .req-menu-item:focus-visible { background: color-mix(in srgb, var(--taxi) 16%, transparent); }
.req-menu-item.is-fake { color: var(--danger); }
.req-reason { display: grid; gap: 8px; padding: 10px 6px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.req-reason-in { width: 100%; min-height: 46px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--fg); font: inherit; }

.swipe-row.menu-open { overflow: visible; z-index: 40; }
.swipe-row.has-reason .swipe-actions { display: none; }
.open-trip.req-card:not(.booking-card) { padding: 14px 6px 14px 40px; padding-inline: 6px 44px; }
.req-menu { min-width: 170px; }

/* ====== شاشة رحلة الكابتن (زي إنداريف): خريطة ثابتة + شريط فوق + كارت ثابت تحت ====== */
.pay-tag { font-size: .9375rem; font-weight: 700; }
.pay-wallet { color: #B58CFF; }
.pay-insta { color: #FF6FB1; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: .2px; direction: ltr; unicode-bidi: isolate; }
.req-price-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cust-rate { font-size: .8125rem; font-weight: 700; }
body.cap-trip .site-header, body.cap-trip .cap-top, body.cap-trip .cap-tabbar, body.cap-trip #cap-tabbar { display: none !important; }
body.cap-trip { overflow: hidden; padding-top: 0; }
body.cap-trip main, body.cap-trip .wrap { padding: 0; margin: 0; max-width: none; }
.cap-fixed { position: fixed; inset: 0; z-index: 85; display: flex; flex-direction: column; margin: 0; padding: 0; gap: 0; border: 0; border-radius: 0; background: var(--bg); }
body.has-photo-due .cap-fixed { top: 126px; }
.cap-fixed .cs-bar { position: relative; z-index: 60; flex: none; display: grid; gap: 2px; direction: ltr; padding: max(8px, env(safe-area-inset-top)) 12px 8px; background: var(--surface); }
.cs-bar[hidden] { display: none; }
.cs-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cs-cancel-btn { min-height: 40px; padding: 4px 4px; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 1.125rem; font-weight: 800; cursor: pointer; }
.cs-wait { direction: ltr; }
.wait-time { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.wait-time.is-end { color: #FF4D4D; }
.cs-wait-lbl { font-size: 1rem; color: var(--muted); direction: rtl; }
.cs-cancel-dlg { position: absolute; z-index: 70; top: 100%; inset-inline: 10px; direction: rtl; display: grid; gap: 10px; padding: 14px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; box-shadow: 0 12px 28px rgba(0, 0, 0, .5); }
.cs-cancel-opts { display: grid; gap: 8px; }
.cs-cancel-opt { min-height: 48px; font-weight: 700; }
.cs-cancel-form { display: grid; gap: 8px; }
.cs-cancel-form[hidden] { display: none; }
.cs-mapwrap { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; }
.cap-screen.trip-screen.cap-fixed .gps-box { height: 100%; border: 0; border-radius: 0; }
.cap-screen.trip-screen.cap-fixed .gps-map { height: 100%; }
.cap-fixed .cs-over { position: absolute; inset: 0; }
.cap-screen.trip-screen.cap-fixed .gps-chip { top: 44px; padding: 4px 12px; transform: scale(.85); transform-origin: top center; }
.cap-screen.trip-screen.cap-fixed .gps-recenter { right: 12px; bottom: 118px; }
.cap-fixed .cs-pills { inset-inline: auto; margin-inline: 0; right: 12px; left: auto; bottom: 14px; width: max-content; justify-items: stretch; }
.cap-fixed .cs-fabs { top: 12px; inset-inline-end: auto; right: 12px; }
.cs-eta { position: absolute; top: 6px; inset-inline: 0; display: flex; justify-content: center; pointer-events: none; }
.eta-box.eta-plain { padding: 0; border: 0; background: transparent; box-shadow: none; gap: 0; text-shadow: 0 1px 6px rgba(0, 0, 0, .85); color: #fff; }
.eta-box.eta-plain .eta-label { display: none; }
.eta-box.eta-plain .eta-time { font-size: 1.6rem; font-weight: 800; }
.eta-box.eta-plain.is-soon, .eta-box.eta-plain.is-late { background: transparent; border: 0; color: #FF4D4D; }
.cap-screen.trip-screen.cap-fixed .cs-sheet { position: relative; z-index: 61; flex: none; margin: 0; border: 0; border-radius: 22px 22px 0 0; border-top: 2px solid var(--line); max-height: 62vh; overflow: auto; padding: 4px 14px max(12px, env(safe-area-inset-bottom)); gap: 10px; box-shadow: 0 -8px 24px rgba(0, 0, 0, .35); }
.cs-grab { display: block; width: 100%; height: 22px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.cs-grab::after { content: ""; position: absolute; top: 8px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: var(--line); }
.cs-info { display: grid; gap: 8px; }
.cs-sheet.is-min .cs-info { display: none; }
.cs-pay { display: flex; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.cs-money { display: inline-flex; line-height: 0; }
.cs-amt { font-size: 1.375rem; }
.cs-main-btn, .cap-screen.trip-screen.cap-fixed .cs-sheet > .btn-taxi { min-height: 56px; font-size: 1.1875rem; border-radius: 16px; }
.cs-chat { position: absolute; z-index: 80; inset-inline: 0; bottom: 0; max-height: 72%; overflow: auto; padding: 44px 14px 14px; background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .5); }
.cs-chat[hidden] { display: none; }
.cs-chat-close { position: absolute; top: 6px; left: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--bg); color: var(--fg); font-size: 1.1rem; cursor: pointer; }
.call-spk { background: #3A4552; }
.call-spk.is-on { background: #fff; color: #111; }
.cap-screen.trip-screen.cap-fixed .gps-chip { inset-inline: auto; left: 10px; right: auto; top: 44px; transform-origin: top left; }

/* ====== شاشة المكالمة (زي إنداريف) ====== */
.call-overlay { display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; padding: 0; background: #171717; -webkit-backdrop-filter: none; backdrop-filter: none; }
.call-card { width: 100%; margin-top: 12vh; gap: 8px; }
.call-avatar { width: 156px; height: 156px; overflow: hidden; margin-bottom: 18px; border: 4px solid var(--taxi); background: #2b2b2b; color: #fff; box-shadow: 0 0 0 16px color-mix(in srgb, var(--taxi) 22%, transparent); font-size: 3.5rem; }
.call-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.call-name { font-size: 2rem; }
.call-who { margin: 0; font-size: 1.25rem; color: #E6E6E6; }
.call-status { margin: 10px 0 0; font-size: 1.25rem; color: #E6E6E6; }
.call-actions { display: flex; flex-wrap: nowrap; justify-content: space-around; align-items: flex-start; gap: 0; margin: 0; padding: 0 12px max(34px, env(safe-area-inset-bottom)); }
.call-act { display: grid; justify-items: center; gap: 8px; width: 96px; }
.call-act[hidden] { display: none; }
.call-act-lbl { font-size: 1.0625rem; color: #fff; }
.call-round { width: 80px; height: 80px; display: grid; place-items: center; padding: 0; background: #2B2B2B; }
.call-end { background: #D63A33; }
.call-answer { background: #17A34A; }
.call-mute.is-on { background: #fff; }
.call-mute.is-on svg path { stroke: #111; }
.snd-bg { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; background: rgba(0, 0, 0, .55); }
.snd-sheet { width: 100%; background: #fff; color: #111; border-radius: 26px 26px 0 0; padding-bottom: max(10px, env(safe-area-inset-bottom)); direction: rtl; }
.snd-head { position: relative; display: flex; align-items: center; justify-content: center; min-height: 72px; font-size: 1.25rem; }
.snd-x { position: absolute; inset-inline-end: auto; left: 18px; top: 16px; width: 40px; height: 40px; border: 0; background: transparent; color: #111; font-size: 1.5rem; cursor: pointer; }
.snd-row { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 70px; padding: 0 22px; border: 0; background: transparent; color: #111; font: inherit; font-size: 1.25rem; text-align: start; cursor: pointer; }
.snd-row.is-on { background: #D5EDFB; }
.snd-ico { display: inline-flex; line-height: 0; }
.snd-lbl { flex: 1; }
.snd-chk { color: #3D5AFE; font-size: 1.6rem; visibility: hidden; }
.snd-row.is-on .snd-chk { visibility: visible; }

/* قايمة «مكالمة مجانية / مكالمة عادية»: ورقة بعرض الشاشة من تحت */
.call-menu, .cs-call .call-menu, .cust-contact .call-menu { position: fixed; inset: 0; left: 0; top: 0; z-index: 3500; display: flex; align-items: flex-end; min-width: 0; padding: 0; border: 0; border-radius: 0; background: rgba(0, 0, 0, .5); box-shadow: none; }
.call-menu[hidden] { display: none; }
.call-sheet { width: 100%; display: grid; gap: 12px; padding: 18px 16px max(18px, env(safe-area-inset-bottom)); background: var(--surface); color: var(--fg); border-radius: 26px 26px 0 0; direction: rtl; }
.call-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 1.5rem; }
.call-sheet-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--bg); color: var(--fg); font-size: 1.1rem; cursor: pointer; }
.call-sheet-txt { margin: 0; font-size: 1.1875rem; line-height: 1.6; }
.call-sheet .call-menu-item { justify-content: center; min-height: 60px; border-radius: 16px; font-size: 1.25rem; font-weight: 700; }
.call-sheet .call-menu-item::before { display: none; }
.call-sheet .call-free { background: var(--taxi); color: #12161C; }
.call-sheet .call-normal { background: var(--bg); color: var(--fg); }

/* صفحة الطلبات: الصفوف بعرض الشاشة كلها زي إنداريف (من غير فريم على الجنب) */
body.cap-find #cap-open { margin-inline: -16px; }
body.cap-find #cap-open .swipe-row { margin-inline: 0; }
body.cap-find #cap-open .open-trip.req-card:not(.booking-card) { padding: 14px 16px 14px 56px; padding-inline: 16px 56px; }
body.cap-find .req-dots { top: 50%; transform: translateY(-50%); inset-inline-end: 6px; width: 44px; height: 56px; }
body.cap-find .req-dots svg { width: 26px; height: 26px; }
body.cap-find .req-menu { top: calc(50% + 26px); inset-inline-end: 12px; }
body.cap-find #cap-trips, body.cap-find .dispatch { padding-inline: 0; }

/* شاشة تقييم العميل بعد إنهاء الرحلة */
.rate-screen { position: fixed; inset: 0; z-index: 3000; display: flex; flex-direction: column; justify-content: space-between; padding: 0 16px max(24px, env(safe-area-inset-bottom)); background: var(--bg); }
.rate-body { display: grid; justify-items: center; gap: 12px; margin-top: 14vh; text-align: center; }
.rate-body .avatar { width: 120px; height: 120px; font-size: 3rem; }
.rate-name { font-size: 1.75rem; }
.rate-q { margin: 0; font-size: 1.25rem; color: var(--muted); }
.rate-amt { margin: 0; font-size: 1.5rem; font-weight: 800; }
.rate-skip-btn { min-height: 54px; font-size: 1.125rem; }

/* حذف الحساب */
.menu-del { color: var(--danger); }
.del-bg { position: fixed; inset: 0; z-index: 4500; display: flex; align-items: flex-end; background: rgba(0, 0, 0, .55); }
.del-sheet { width: 100%; display: grid; gap: 12px; padding: 20px 16px max(18px, env(safe-area-inset-bottom)); background: var(--surface); color: var(--fg); border-radius: 26px 26px 0 0; }
.del-title { font-size: 1.375rem; }
.del-sheet p { margin: 0; line-height: 1.7; }

/* الفوتر (السياسة والشروط) مخفي في صفحة طلبات الكابتن وصفحة الرحلة عند الكابتن والعميل */
body.cap-find .site-footer, body.cap-trip .site-footer, body[data-route="track"] .site-footer { display: none; }
body.cap-find .cap-foot { display: none; }
/* صفحة الأداء: بلوك الاسم مشال، والجزء الملون ثابت تحت الشريط */
body.cap-perf .cap-compact { display: none; }
/* صفحة الأداء: الجزء الملون لازق تحت الشريط من غير مسافة، والتقييم تحت الصورة مش فوقها */
body.cap-perf #cap-home { margin-top: 0; gap: 0; }
body.cap-perf #cap-home > :not(#cap-trips):not(.cap-foot) { display: none !important; }
body.cap-perf #cap-trips { border: 0; box-shadow: none; background: none; padding-top: 0; }
body.cap-perf .perf { margin-top: 0; }
body.cap-perf .perf-hero { margin-top: 0; }
.perf-hero-ph { display: grid; justify-items: center; gap: 6px; }
.perf-rate-pill { position: static; transform: none; }
/* الجزء الملون ثابت تمامًا لازق تحت الشريط، وتحته بس هو اللي بيتحرك */
body.cap-perf .perf-hero { position: fixed; top: calc(env(safe-area-inset-top, 0px) + var(--hdr-h, 73px)); inset-inline: 0; margin: 0; width: auto; max-width: none; z-index: 40; padding: 12px 16px 12px; gap: 8px; }
body.cap-perf .perf:not(.is-detail) { padding-top: calc(var(--hero-h, 0px) + 14px); }
body.cap-perf .perf-hero-ph .avatar { width: 56px; height: 56px; border-width: 2px; }
body.cap-perf .perf-hero-name h2 { font-size: 1.4rem; }
body.cap-perf .perf-hero-panel { padding: 8px 12px; gap: 2px; }
body.cap-perf .perf-hero-btn { padding: 10px; }
body.cap-perf .perf-hero-ph { gap: 4px; }

/* أيقونات المركبات على الخريطة: صغيرة، من غير فريم. الموتوسيكل أصفر والعربية تركواز */
.veh-pin-in { display: block; width: 100%; height: 100%; background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0; }
.veh-pin.big .veh-pin-in { box-shadow: none !important; }
.veh-pin-in.veh-moto { color: #FFB800; }
.veh-pin-in.veh-car { color: #17B3C2; }
.veh-pin svg, .veh-pin:not(.big) svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 1.2px rgba(0,0,0,.95)) drop-shadow(0 1px 2px rgba(0,0,0,.5)); }

/* صفحة طلب الرحلة: الخريطة أصغر، وزرار التفاصيل (يمين) وطريقة الدفع (شمال) على سطر واحد */
.map-first #req-map { height: clamp(260px, 44vh, 400px); }
.opt-row { display: flex; gap: 10px; margin: 0 0 10px; }
.opt-btn { flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--fg); font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.3; cursor: pointer; text-align: center; }
.opt-btn.is-open { border-color: var(--route); }
.opt-btn:focus-visible { outline: 3px solid var(--route); outline-offset: 2px; }
.opt-arrow { flex: 0 0 auto; transition: transform .15s ease; }
.opt-btn.is-open .opt-arrow { transform: rotate(-90deg); }
.opt-pay { flex-direction: column; gap: 0; }
.opt-pay .opt-cap { font-size: .75rem; font-weight: 600; color: var(--muted); }
.opt-pay strong { font-size: 1rem; }
.opt-panel { margin: 0 0 10px; }
.opt-panel[hidden] { display: none; }

/* صفحة طلبات الكابتن: الكارتين لازقين تحت زرار متصل، وكل حاجة بنفس المسافات */
body.cap-find #cap-home { padding-top: calc(max(10px, env(safe-area-inset-top, 0px)) + 60px); gap: 0; margin-top: 0; }
body.cap-find #cap-trips { padding: 0; }
body.cap-find .dispatch { padding: 0; gap: 12px; }
body.cap-find .cap-stats { margin: 0; gap: 10px; }
body.cap-find #cap-open { margin-top: 0; }
#cap-past { display: none !important; }
.req-note { margin: 6px 0 0; font-size: .95rem; }

/* رسومات المركبات (js/vehicles.js): الألوان هنا. على الخريطة بتتحوّل للون واحد */
.vi { --vb: #D32F2F; overflow: visible; }
.vi-car { --vb: #D32F2F; }
.vi-moto { --vb: #F4F6F8; }
.vi-moto .b { stroke: #aab3bd; stroke-width: .8; }
.veh-pin .vi .b { stroke: none; }
.vi-tricycle { --vb: #1D4ED8; }
.vi-truck { --vb: #F4F6F8; }
.vi .b { fill: var(--vb); }
.vi .d { fill: #1f2227; }
.vi .g { fill: #cfe8ff; }
.vi .h { fill: #d6dbe1; }
.vi .s { fill: #9aa3ad; }
.vi .w { fill: #9aa3ad; }
.vi .ss { stroke: #9aa3ad; fill: none; }
.vi .sd { stroke: #1f2227; fill: none; }
.vi .sb { stroke: var(--vb); fill: none; }
.vi .sk-h { fill: none; stroke: #d6dbe1; stroke-width: 1; }
.vi-truck .b { stroke: #c9d0d6; stroke-width: .8; }
.veh-pin .vi .b, .veh-pin .vi .d, .veh-pin .vi .s { fill: currentColor; }
.veh-pin .vi .g, .veh-pin .vi .h, .veh-pin .vi .w { fill: #0e1116; }
.veh-pin .vi .ss, .veh-pin .vi .sd, .veh-pin .vi .sb { stroke: currentColor; }
.veh-pin .vi .sk-h { stroke: #0e1116; }
.veh-pin .vi .wi { display: none; }

/* دعوة الكباتن */
.perf-ref-note { margin: 0; font-weight: 700; text-align: center; }
.perf-ref-list { width: 100%; margin: 4px 0 0; padding: 0; list-style: none; }
