/* ================= واجهة الراكب ================= */

/* ---------- تسجيل الدخول ---------- */
.auth {
  position: fixed; inset: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center;
  background: var(--bg);
  padding: calc(64px + env(safe-area-inset-top)) 16px 24px;
}
.auth::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 290px; background: var(--brand); border-radius: 0 0 40px 40px; }
[data-theme="dark"] .auth::before { background: var(--c-navy-900); }
.auth > * { position: relative; flex-shrink: 0; } /* الشاشات القصيرة: المحتوى ينزل بالتمرير بدل ما ينضغط وينقص */
.auth-card .muted b { white-space: nowrap; display: inline-block; }
.auth-hero { text-align: center; color: var(--on-brand); margin-bottom: 26px; }
[data-theme="dark"] .auth-hero { color: var(--text); }
.logo-badge { width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 26px; background: var(--surface); display: grid; place-items: center; font-size: 44px; box-shadow: var(--shadow); animation: pop .6s var(--ease); }
.auth-hero h1 { font-size: 32px; font-weight: 800; }
.auth-hero p { font-weight: 600; opacity: .8; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 26px; padding: 26px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.auth-card h2 { font-size: 22px; font-weight: 800; }
.slide-up { animation: slideUp .45s var(--ease); }
.phone-field { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface-2); overflow: hidden; transition: border-color .2s; margin-top: 6px; }
.phone-field:focus-within { border-color: var(--brand); background: var(--surface); }
.phone-field .cc { padding: 0 14px; font-weight: 700; border-right: 1.5px solid var(--border); height: 54px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.phone-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 54px; padding: 0 14px; font-size: 19px; font-weight: 700; letter-spacing: 1px; }
.field-hint { font-size: 13px; color: var(--muted); min-height: 20px; }
.field-hint.err { color: var(--danger); }
.field-hint.ok { color: var(--success); font-weight: 600; }
.terms { font-size: 12px; color: var(--muted); text-align: center; }
.back-link { align-self: flex-start; color: var(--muted); font-weight: 600; }
.otp { display: flex; gap: 12px; justify-content: center; margin: 8px 0 0; }
.otp input { width: 58px; height: 64px; text-align: center; font-size: 26px; font-weight: 800; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface-2); outline: 0; transition: all .2s; }
.otp input:focus { border-color: var(--brand); background: var(--surface); transform: translateY(-2px); box-shadow: 0 6px 16px color-mix(in srgb, var(--c-gold) 25%, transparent); }
.otp.shake { animation: shake .4s; }
.resend { text-align: center; font-size: 14px; color: var(--muted); }
.sms-banner {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; z-index: 2500; width: min(94vw, 420px);
  display: flex; gap: 12px; align-items: flex-start; text-align: start; padding: 12px 14px; border-radius: 18px;
  background: color-mix(in srgb, var(--c-navy-900) 92%, transparent); color: var(--c-white); backdrop-filter: blur(12px); box-shadow: var(--shadow);
  transform: translate(-50%, -140%); transition: transform .45s var(--ease); font-size: 14px; line-height: 1.6;
}
.sms-banner.show { transform: translate(-50%, 0); }
.sms-banner .sms-ic { font-size: 22px; }
.sms-banner .code { color: var(--brand); font-size: 17px; letter-spacing: 2px; }
.sms-banner small { opacity: .65; }

/* ---------- الخريطة ---------- */
#main { position: fixed; inset: 0; }
#map { position: absolute; inset: 0; direction: ltr; background: var(--surface-3); }
.leaflet-container { font-family: var(--font); }
[data-theme="dark"] .leaflet-bar a { background: var(--surface); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .leaflet-tooltip { background: var(--surface); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.6); }
.leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, var(--c-white) 70%, transparent) !important; }
[data-theme="dark"] .leaflet-control-attribution { background: color-mix(in srgb, var(--c-black) 50%, transparent) !important; color: var(--c-grey-400); }
[data-theme="dark"] .leaflet-control-attribution a { color: var(--c-grey-300); }
.leaflet-bottom { bottom: var(--sheet-visible); transition: bottom .3s var(--ease); }

.mk { background: none; border: 0; }
.mk-user span { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--c-blue-user); border: 3px solid var(--c-white); box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-blue-user) 50%, transparent); animation: userPulse 2s infinite; }
.pin { position: relative; width: 34px; height: 44px; }
.pin::before { content: ''; position: absolute; left: 3px; top: 0; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pin-c); box-shadow: 0 4px 10px color-mix(in srgb, var(--c-black) 30%, transparent); }
.pin span { position: absolute; left: 12px; top: 9px; width: 10px; height: 10px; background: var(--c-white); border-radius: 50%; }
.pin-pickup { --pin-c: var(--pickup); }
.pin-dropoff { --pin-c: var(--c-navy); }
.pin-dropoff span { border-radius: 2px; }
.mk-pickup, .mk-dropoff { animation: drop .4s var(--ease); }
.mk-car .car-rot { width: 100%; height: 100%; transition: transform .25s linear; filter: drop-shadow(0 2px 3px color-mix(in srgb, var(--c-black) 30%, transparent)); }
.mk-car-sm { opacity: .9; }
.mk-pulse span { position: absolute; inset: 0; border-radius: 50%; background: color-mix(in srgb, var(--c-gold) 35%, transparent); border: 2px solid color-mix(in srgb, var(--c-gold) 60%, transparent); animation: radar 2.2s infinite ease-out; }
.mk-pulse span:nth-child(2) { animation-delay: 1.1s; }
.route-line { stroke: var(--route); }
.route-line.muted { stroke: var(--muted); opacity: .5; }
.route-line.dashed { stroke: var(--brand-strong); stroke-dasharray: 2 10; }
.route-casing { stroke: var(--surface); opacity: .9; }

.center-pin { position: absolute; left: 50%; top: 50%; z-index: 500; pointer-events: none; transform: translate(-50%, -100%); }
.center-pin .pin { transition: transform .2s var(--ease); }
.center-pin.pickup .pin { --pin-c: var(--pickup); }
.center-pin.dropoff .pin { --pin-c: var(--c-navy); }
.center-pin.lift .pin { transform: translateY(-12px); }
.pin-shadow { position: absolute; left: 50%; bottom: -3px; width: 12px; height: 5px; margin-left: -6px; border-radius: 50%; background: color-mix(in srgb, var(--c-black) 35%, transparent); }

/* ---------- الشريط العلوي والأزرار العائمة ---------- */
.topbar { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 16px; left: 16px; z-index: 600; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.fab { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; transition: transform .15s, background .3s; }
.fab:active { transform: scale(.92); }
.brand-chip { display: flex; align-items: center; gap: 6px; background: var(--surface); padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); font-size: 15px; }
.brand-chip .tb-logo { display: inline-flex; }
.brand-chip .tb-logo .art-logo { display: block; border-radius: 8px; }
.locate-btn { position: absolute; inset-inline-end: 16px; bottom: calc(var(--sheet-visible) + 14px); z-index: 600; transition: bottom .3s var(--ease), transform .15s; }
body[data-mode="ride"] .locate-btn, body[data-mode="pickmap"] .locate-btn { display: none; }

/* ---------- القائمة السفلية ---------- */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 700;
  background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: 0 -8px 30px color-mix(in srgb, var(--c-navy) 15%, transparent);
  max-height: 82vh; display: flex; flex-direction: column;
  transition: transform .32s var(--ease), background .3s;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.collapsed { transform: translateY(calc(100% - 96px)); }
body[data-mode="services"] .sheet { max-height: 66vh; }
.sheet.dragging { transition: none; }
.sheet-handle { padding: 10px 0 6px; display: flex; justify-content: center; cursor: grab; touch-action: none; flex: none; }
.sheet-handle span { width: 42px; height: 5px; border-radius: 3px; background: var(--surface-3); }
.sheet-body { overflow-y: auto; padding: 4px 18px 18px; animation: fadeIn .3s var(--ease); overscroll-behavior: contain; }
@media (min-width: 768px) {
  .sheet { inset-inline: 16px auto; bottom: 16px; width: 420px; border-radius: 26px; max-height: calc(100vh - 100px); }
  .sheet.collapsed { transform: translateY(calc(100% - 96px)); }
  .locate-btn { bottom: 24px; inset-inline-end: 24px; }
  .leaflet-bottom { bottom: 0; }
}

.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sheet-head h3 { font-size: 18px; font-weight: 800; }
.sec-title { font-size: 13px; font-weight: 700; color: var(--muted); margin: 16px 0 6px; }
.sec-title.between { display: flex; justify-content: space-between; align-items: center; }

/* الرئيسية */
.greet { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.greet small { color: var(--muted); font-weight: 600; }
.greet h2 { font-size: 22px; font-weight: 800; line-height: 1.3; }
.city-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; background: var(--surface-2); padding: 6px 12px; border-radius: 999px; }
.city-chip .ic { width: 16px; height: 16px; color: var(--pickup); }
.where-to { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface-2); font-size: 17px; font-weight: 700; text-align: start; transition: transform .15s, background .2s; }
.where-to:active { transform: scale(.98); background: var(--surface-3); }
.where-to .ic { width: 22px; height: 22px; color: var(--brand-strong); }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.quick-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 16px; text-align: start; min-width: 0; transition: border-color .2s; }
.quick-chip:active { border-color: var(--brand); }
.quick-chip > span:last-child { min-width: 0; }
.quick-chip b { display: block; font-size: 14px; }
.quick-chip small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qc-ic { width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.empty-hint { display: flex; gap: 10px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface-2); color: var(--muted); font-size: 14px; }

/* القوائم */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-radius: 14px; text-align: start; width: 100%; transition: background .15s; }
.row:active, .row:hover { background: var(--surface-2); }
.row-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.row-ic .emoji { font-size: 19px; }
.row-txt { flex: 1; min-width: 0; }
.row-txt b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-txt small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-go { color: var(--muted); width: 18px; height: 18px; }

/* حقول البحث */
.route-inputs { position: relative; display: flex; flex-direction: column; gap: 8px; padding-inline-end: 50px; }
.route-inputs.single { padding-inline-end: 0; }
.ri { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1.5px solid transparent; border-radius: 14px; padding: 0 12px; transition: border-color .2s, background .2s; }
.ri.active { border-color: var(--brand); background: var(--surface); }
.ri input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 48px; font-weight: 600; }
.ri-clear { color: var(--muted); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; }
.ri-clear .ic { width: 16px; height: 16px; }
.ri:not(.active) .ri-clear { display: none; }
.ri-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.ri-dot.green { background: var(--pickup); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-green) 18%, transparent); }
.ri-dot.dark { background: var(--dropoff); border-radius: 3px; }
.ri-dot.bookmark { background: var(--brand); }
.swap-btn { position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; transition: transform .3s var(--ease); }
.swap-btn:active { transform: translateY(-50%) rotate(180deg); }
.tools { display: flex; gap: 8px; margin: 12px 0 2px; overflow-x: auto; }
.tool { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.tool .ic { width: 17px; height: 17px; }

.pick-addr { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 14px; padding: 14px; margin-bottom: 12px; }

/* ملخص الرحلة */
.trip-mini { display: block; width: 100%; text-align: start; background: var(--surface-2); border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
.tm-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-weight: 600; min-width: 0; }
.tm-row span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 8px; }
.tm-meta .ic { width: 15px; height: 15px; }
.tm-meta em { font-style: normal; opacity: .8; }

/* أنواع الخدمة */
.svc-list { display: flex; flex-direction: column; gap: 8px; }
.svc { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 16px; border: 2px solid transparent; background: var(--surface-2); text-align: start; transition: all .2s var(--ease); }
.svc.selected { border-color: var(--brand); background: color-mix(in srgb, var(--c-gold) 12%, transparent); transform: scale(1.01); }
.svc.disabled { opacity: .45; }
.svc.skeleton { height: 70px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.svc-ic { font-size: 28px; width: 42px; text-align: center; flex: none; }
.svc-info { flex: 1; min-width: 0; }
.svc-info b { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.svc-info b em { font-style: normal; font-size: 11px; background: var(--text); color: var(--surface); padding: 1px 8px; border-radius: 999px; }
.svc-info small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-meta { display: flex !important; align-items: center; gap: 4px; }
.svc-meta .ic { width: 14px; height: 14px; }
.svc-price { font-weight: 800; font-size: 15.5px; white-space: nowrap; }
.pay-row { display: flex; align-items: center; gap: 10px; margin: 12px 0; padding: 10px 12px; border-radius: 14px; border: 1.5px dashed var(--border); }
.pay-row > span { flex: 1; }
.pay-row b { display: block; font-size: 14px; }
.pay-row small { color: var(--muted); font-size: 11.5px; }
.pay-row > .ic { color: var(--success); }
.drag-tip { display: flex; gap: 6px; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); margin-top: 10px; }
.drag-tip .ic { width: 14px; height: 14px; }

.receipt { background: var(--surface-2); border-radius: 14px; padding: 6px 14px; }
.rc-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px dashed var(--border); gap: 12px; }
.rc-line:last-child { border-bottom: 0; }
.rc-line.total { font-weight: 800; font-size: 16px; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv span { color: var(--muted); }

/* ---------- البحث عن سائق ---------- */
.searching { text-align: center; padding: 6px 0 14px; }
.searching h3 { font-size: 18px; font-weight: 800; margin-top: 8px; }
.radar { position: relative; width: 130px; height: 130px; margin: 0 auto; }
.radar span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: radar 2.4s infinite ease-out; }
.radar span:nth-child(2) { animation-delay: .8s; }
.radar span:nth-child(3) { animation-delay: 1.6s; }
.radar-core { position: absolute; inset: 35px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; font-size: 30px; box-shadow: 0 8px 24px color-mix(in srgb, var(--c-gold) 45%, transparent); animation: bob 1.4s infinite ease-in-out; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: dot 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }

/* ---------- تتبع السائق ---------- */
.trip-status { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; animation: slideUp .4s var(--ease); }
.trip-status b { font-size: 19px; font-weight: 800; display: block; }
.trip-status small { color: var(--muted); font-size: 13px; }
.trip-status.arrived b { color: var(--success); }
.eta-badge { background: var(--brand); color: var(--on-brand); border-radius: 16px; padding: 6px 14px; text-align: center; min-width: 70px; }
.eta-badge b { font-size: 22px; line-height: 1.1; color: inherit !important; }
.eta-badge small { color: inherit; font-weight: 700; font-size: 11px; }
.eta-badge.wait { background: var(--success); color: var(--c-white); }
.wait-note { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.wait-note .ic { width: 15px; height: 15px; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-bottom: 12px; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .25s linear; }
.driver-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--surface-2); margin-bottom: 12px; animation: slideUp .45s var(--ease); }
.dc-photo { position: relative; flex: none; }
.dc-photo .avatar { border-radius: 50%; display: block; border: 3px solid var(--surface); }
.dc-rate { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); background: var(--surface); border-radius: 999px; padding: 0 6px; font-size: 12px; font-weight: 800; box-shadow: var(--shadow-sm); white-space: nowrap; }
.stars-inline { display: inline-flex; align-items: center; gap: 2px; }
.stars-inline .ic { width: 12px; height: 12px; color: var(--brand-strong); }
.dc-info { flex: 1; min-width: 0; }
.dc-info b { display: block; font-size: 16px; }
.dc-info small { display: block; color: var(--muted); font-size: 12.5px; }
.dc-car { display: flex !important; align-items: center; gap: 5px; }
.color-dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--c-black) 25%, transparent); flex: none; }
.plate { display: flex; flex-direction: column; align-items: center; border: 2px solid var(--c-grey-800); border-radius: 8px; background: var(--c-white); color: var(--c-grey-900); overflow: hidden; min-width: 78px; flex: none; }
.plate-gov { display: flex; justify-content: space-between; gap: 6px; width: 100%; background: var(--c-blue-plate); color: var(--c-white); font-size: 10px; font-weight: 700; padding: 0 6px; }
.plate-gov i { font-style: normal; }
.plate-num { font-size: 17px; font-weight: 800; letter-spacing: 1px; line-height: 1.3; }
.plate-letter { font-size: 12px; font-weight: 800; line-height: 1; padding-bottom: 3px; }
.trip-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 16px; background: var(--surface-2); font-size: 13px; font-weight: 700; transition: transform .15s; }
.act:active { transform: scale(.95); }
.act span { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.act:first-child span { background: var(--success); color: var(--c-white); }
.act.danger { color: var(--danger); }
.act.danger span { background: var(--danger-soft); }

/* ---------- الإلغاء ---------- */
.reasons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.reason { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); cursor: pointer; border: 1.5px solid transparent; font-weight: 600; }
.reason:has(input:checked) { border-color: var(--danger); background: var(--danger-soft); }
.reason input { accent-color: var(--danger); width: 18px; height: 18px; }
.fee-note { display: flex; gap: 6px; align-items: center; font-size: 13px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c-green) 10%, transparent); color: var(--success); margin-top: 8px; }
.fee-note.warn { background: color-mix(in srgb, var(--c-amber) 12%, transparent); color: var(--warn); }
.fee-note .ic { width: 16px; height: 16px; }

/* ---------- الاتصال ---------- */
.call-modal .modal { background: linear-gradient(180deg, var(--c-grey-800), var(--c-navy-950)); color: var(--c-white); }
.call { text-align: center; padding: 10px 0; }
.call h3 { font-size: 22px; margin-top: 16px; }
.call .muted { color: var(--c-grey-300); }
.call-photo { position: relative; width: 96px; height: 96px; margin: 10px auto 0; }
.call-photo .avatar { border-radius: 50%; position: relative; z-index: 1; }
.call-photo .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--c-white) 50%, transparent); animation: radar 1.8s infinite ease-out; }
.call-photo .ring.r2 { animation-delay: .9s; }
.call.connected .ring { display: none; }
.call-note { display: flex; gap: 6px; justify-content: center; align-items: center; font-size: 12px; color: var(--c-grey-400); margin-top: 8px; }
.call-note .ic { width: 14px; height: 14px; }
.call-btns { display: flex; justify-content: center; gap: 24px; margin-top: 18px; }
.call-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--c-white); }
.call-opt .ic { width: 52px; height: 52px; padding: 14px; border-radius: 50%; background: color-mix(in srgb, var(--c-white) 12%, transparent); }
.call-opt.on .ic { background: var(--c-white); color: var(--c-grey-900); }

/* ---------- التقييم ---------- */
.rating { text-align: center; }
.done-badge { width: 64px; height: 64px; margin: 4px auto 8px; border-radius: 50%; background: var(--success); color: var(--c-white); display: grid; place-items: center; animation: pop .5s var(--ease); }
.done-badge .ic { width: 32px; height: 32px; stroke-width: 3; }
.rating h3 { font-size: 21px; font-weight: 800; }
.fare-big { font-size: 34px; font-weight: 800; margin: 2px 0 6px; }
.rc-details { text-align: start; margin-bottom: 8px; }
.rc-details summary { cursor: pointer; color: var(--muted); font-weight: 700; font-size: 13px; text-align: center; padding: 4px; }
.rate-driver { display: flex; align-items: center; gap: 12px; text-align: start; margin: 12px 0 4px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); }
.rate-driver .avatar { border-radius: 50%; flex: none; }
.rate-driver b { display: block; }
.rate-driver small { display: block; color: var(--muted); font-size: 12.5px; }
.stars { display: flex; justify-content: center; gap: 6px; margin-top: 10px; direction: ltr; }
.stars button .ic { width: 42px; height: 42px; fill: var(--surface-3); stroke: none; transition: transform .2s var(--ease), fill .2s; }
.stars button.on .ic { fill: var(--brand); transform: scale(1.1); }
.stars button:active .ic { transform: scale(.85); }
.star-label { font-weight: 700; color: var(--muted); min-height: 24px; margin: 4px 0; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
.tags .sec-title { width: 100%; margin: 4px 0 0; }
.tag { padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--border); font-size: 13px; font-weight: 700; transition: all .2s; }
.tag.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.rating textarea { margin-bottom: 12px; }
.my-rating { color: var(--brand-strong); font-size: 22px; letter-spacing: 2px; }
.note-q { color: var(--muted); font-style: italic; }

/* ---------- القائمة الجانبية ---------- */
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 1500; width: min(82vw, 320px);
  background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .32s var(--ease);
  padding: calc(20px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
}
.drawer-scrim { position: fixed; inset: 0; z-index: 1400; background: color-mix(in srgb, var(--c-black) 40%, transparent); opacity: 0; pointer-events: none; transition: opacity .3s; }
html[dir="ltr"] .drawer { transform: translateX(-105%); }
html[dir="ltr"] .page:not(.open) { transform: translateX(100%); }
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 8px 4px 20px; border-bottom: 1px solid var(--border); }
.drawer-head b { display: block; font-size: 17px; }
.drawer-head small { color: var(--muted); }
.user-badge { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }
.drawer-nav { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; flex: 1; }
.drawer-nav button { display: flex; align-items: center; gap: 14px; padding: 13px 12px; border-radius: 14px; font-weight: 700; font-size: 16px; text-align: start; }
.drawer-nav button:hover, .drawer-nav button:active { background: var(--surface-2); }
.drawer-nav .danger { color: var(--danger); margin-top: auto; }
.drawer-foot { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.8; }

/* ---------- الصفحات ---------- */
.page {
  position: fixed; inset: 0; z-index: 1300; background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform .35s var(--ease); visibility: hidden;
}
.page.open { transform: none; visibility: visible; }
.page-head { display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 16px 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.page-head h2 { font-size: 19px; font-weight: 800; }
.page-body { flex: 1; overflow-y: auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); width: 100%; max-width: 640px; margin: 0 auto; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stats > div { background: var(--surface); border-radius: 16px; padding: 12px 8px; text-align: center; box-shadow: var(--shadow-sm); }
.stats b { display: block; font-size: 15px; font-weight: 800; white-space: nowrap; }
.stats small { color: var(--muted); font-size: 11.5px; }
.segmented { display: flex; background: var(--surface-3); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.seg { flex: 1; padding: 9px 6px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted); transition: all .2s; }
.seg.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.h-item { display: block; width: 100%; text-align: start; background: var(--surface); border-radius: 18px; padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm); transition: transform .15s; }
.h-item:active { transform: scale(.98); }
.h-top { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.h-svc { font-weight: 800; }
.h-date { color: var(--muted); }
.h-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.h-rate { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.h-rate .ic { width: 16px; height: 16px; color: var(--brand-strong); }
.badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.empty-page { text-align: center; padding: 40px 20px; }
.empty-emoji { font-size: 54px; margin-bottom: 8px; }
.card { background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: var(--shadow-sm); margin-bottom: 8px; }
.card-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.lbl { display: block; font-size: 13px; color: var(--muted); font-weight: 700; margin: 6px 0; }
.inline-form { display: flex; gap: 8px; margin-bottom: 8px; }
.readonly { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-weight: 700; text-align: end; }

/* ---------- حركات ---------- */
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes drop { from { transform: translateY(-20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes radar { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes dot { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes userPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-blue-user) 50%, transparent); } 100% { box-shadow: 0 0 0 18px transparent; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ================= المرحلة 2: ميزات الراكب المتقدمة ================= */

/* الشريط العلوي */
.top-actions { display: flex; gap: 10px; }
.fab { position: relative; }
.fab-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: var(--c-white); font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.sos-fab { display: none !important; background: var(--danger); color: var(--c-white); font-weight: 800; font-size: 13px; letter-spacing: .5px; animation: sosPulse 2s infinite; }
body[data-ride-status="accepted"] .sos-fab, body[data-ride-status="arrived"] .sos-fab, body[data-ride-status="in_progress"] .sos-fab { display: grid !important; }
body[data-mode="track"] .topbar { justify-content: center; }

/* المحطات */
.pin-stop { --pin-c: var(--c-midnight-2); }
.pin-stop b { position: absolute; left: 3px; top: 3px; width: 28px; text-align: center; color: var(--c-white); font-size: 13px; line-height: 22px; font-weight: 800; }
.mk-stop { animation: drop .4s var(--ease); }
.ri-dot.stop { width: 18px; height: 18px; background: var(--c-midnight-2); color: var(--c-white); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.ri-remove { color: var(--danger); display: grid; place-items: center; width: 28px; height: 28px; cursor: pointer; }
.ri-remove .ic { width: 16px; height: 16px; }

/* الرئيسية */
.promo-banner { width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: 16px; text-align: start; background: linear-gradient(135deg, var(--c-midnight-2), var(--c-coral)); color: var(--c-white); }
.promo-banner b { display: block; }
.promo-banner small { opacity: .85; }
.pb-ic { font-size: 26px; }
.rebook-pill { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 12.5px; font-weight: 800; white-space: nowrap; flex: none; }
.rebook-pill .ic { width: 14px; height: 14px; }
.rebook-pill.danger { background: var(--danger-soft); color: var(--danger); }

/* الذروة */
.surge-banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; margin-bottom: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--c-amber-light) 18%, transparent), color-mix(in srgb, var(--c-red) 15%, transparent)); border: 1.5px solid color-mix(in srgb, var(--c-amber-light) 50%, transparent); font-size: 13.5px; line-height: 1.5; }
.surge-banner.sm { margin: 10px 0 0; }
.surge-dot { font-style: normal; font-size: 12px; }
.surge-hero { text-align: center; margin-bottom: 10px; }
.surge-hero b { display: block; font-size: 44px; color: var(--warn); line-height: 1.1; }
.surge-hero span { font-weight: 700; }
.svc-price { text-align: end; }
.svc-price s { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* خيارات الطلب */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--border); font-size: 13px; font-weight: 700; white-space: nowrap; flex: none; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.chip .ic { width: 16px; height: 16px; }
.chip.on { border-color: var(--brand); background: color-mix(in srgb, var(--c-gold) 15%, transparent); }
.chip.warn { border-color: var(--warn); color: var(--warn); }
.pay-ic { font-size: 22px; width: 32px; text-align: center; flex: none; }
.pay-ic.big { font-size: 26px; width: 40px; }
.pay-row .icon-btn .ic { width: 18px; height: 18px; }
.warn-note { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--warn); margin: -4px 0 10px; }
.warn-note .ic { width: 15px; height: 15px; }
.seg-toggle { display: flex; gap: 6px; background: var(--surface-3); padding: 4px; border-radius: 14px; margin-bottom: 12px; }
.seg-toggle .seg { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg-toggle .ic { width: 16px; height: 16px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; font-weight: 700; }
.switch-row:last-of-type { border-bottom: 0; }
.switch-row small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 46px; height: 28px; border-radius: 14px; background: var(--surface-3); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--c-white); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch-row input:checked + .switch { background: var(--success); }
.switch-row input:checked + .switch::after { transform: translateX(-18px); }
html[dir="ltr"] .switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--brand); outline-offset: 2px; }
.tags.left { justify-content: flex-start; margin-top: 8px; }
.promo-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.promo-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1.5px dashed var(--brand); background: color-mix(in srgb, var(--c-gold) 8%, transparent); text-align: start; }
.promo-card.big { flex-direction: row; justify-content: space-between; align-items: center; }
.promo-card b { font-size: 16px; letter-spacing: 1px; direction: ltr; }
.promo-card small { color: var(--muted); display: block; }
.promo-card.used { opacity: .5; border-color: var(--border); }
.opt-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--border); text-align: start; cursor: pointer; }
.opt > span:nth-child(2), .opt > span:nth-child(3) { flex: 1; }
.opt b { display: block; }
.opt small { color: var(--muted); font-size: 12px; }
.opt.on, .opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--c-gold) 10%, transparent); }
.opt-check { color: var(--success); display: none; }
.opt.on .opt-check, .opt:has(input:checked) .opt-check { display: block; }

/* أثناء الرحلة */
.trip-actions.four { grid-template-columns: repeat(4, 1fr); }
.act span { position: relative; }
.badge-dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger); color: var(--c-white); font-size: 10px; font-style: normal; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
.fee-hint { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: -4px 0 10px; }
.fee-hint:empty { display: none; }
.fee-hint .ic { width: 14px; height: 14px; }
.saved-pill { display: inline-block; margin: 2px 4px 8px; padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--c-green) 12%, transparent); color: var(--success); font-weight: 800; font-size: 13px; }
.saved-pill.gold { background: color-mix(in srgb, var(--c-amber-light) 15%, transparent); color: var(--warn); }
.center-block { display: flex; margin: 4px auto 6px; justify-content: center; }
.tip-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; }
.tip { padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--border); font-weight: 700; font-size: 13.5px; transition: all .15s; }
.tip.on { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
#tipCustom { margin-bottom: 10px; text-align: center; }

/* الفاتورة */
.invoice .inv-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 2px dashed var(--border); }
.inv-head b { display: block; font-size: 17px; }
.inv-head small { color: var(--muted); display: block; font-size: 12px; }
.inv-no { text-align: end; }
.rc-line.solo { padding: 10px 14px; }
.rc-line.grand { padding: 12px 14px; margin-top: 8px; border-radius: 12px; background: var(--brand); color: var(--on-brand); font-weight: 800; font-size: 17px; border: 0; }
.rc-line.discount span:last-child { color: var(--success); font-weight: 700; }
.rc-line.surge span:last-child { color: var(--warn); font-weight: 700; }

/* المشاركة و SOS */
.link-box { display: flex; gap: 8px; margin: 12px 0; }
.link-box .input { font-size: 12px; padding: 10px; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-bottom: 12px; }
.share-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 14px; background: var(--surface-2); color: inherit; text-decoration: none; font-weight: 700; font-size: 13px; }
.share-opt span { font-size: 22px; }
.share-opt.wa { background: color-mix(in srgb, var(--c-wa) 15%, transparent); }
.card-row.link { text-decoration: none; color: inherit; width: 100%; text-align: start; }
.card-row.flat { box-shadow: none; background: var(--surface-2); }
.sos-modal .modal { border-top: 4px solid var(--danger); }
.sos { text-align: center; }
.sos h3 { font-size: 22px; margin: 12px 0 6px; }
.sos p { color: var(--muted); margin-bottom: 14px; }
.sos-ring { width: 110px; height: 110px; margin: 4px auto 0; border-radius: 50%; background: var(--danger); color: var(--c-white); display: grid; place-items: center; font-weight: 800; font-size: 26px; cursor: pointer; animation: sosPulse 1.2s infinite; }
.sos-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 12px; }
.sos-row .btn { font-size: 14px; padding: 0 8px; }
.btn.big { min-height: 60px; font-size: 18px; }
a.btn { text-decoration: none; }
a.btn.ghost { color: var(--text); }

/* المحادثة */
.chat-page .page-body { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 80%; display: flex; flex-direction: column; animation: fadeIn .25s var(--ease); }
.msg span { padding: 10px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); white-space: pre-wrap; word-break: break-word; }
.msg small { font-size: 11px; color: var(--muted); margin: 2px 8px 0; }
.msg em { font-style: normal; font-size: 11px; color: var(--muted); margin: 0 8px 2px; }
.msg.me { align-self: flex-start; }
.msg.me span { background: var(--brand); color: var(--on-brand); border-end-start-radius: 6px; }
.msg.them { align-self: flex-end; }
.msg.them span { border-end-end-radius: 6px; }
.quick-replies { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px; scrollbar-width: none; flex: none; }
.quick-replies .tag { white-space: nowrap; background: var(--surface); }
.chat-input { display: flex; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); flex: none; }
.chat-input .send { background: var(--brand); color: var(--on-brand); width: 48px; height: 48px; }
.chat-input .send .ic { transform: scaleX(-1); }

/* القائمة الجانبية والصفحات */
.drawer-head { width: 100%; text-align: start; }
.drawer-head small { display: block; }
.tier-line { color: var(--brand-strong) !important; font-weight: 700; font-size: 12px; }
.user-photo { border-radius: 50%; object-fit: cover; flex: none; display: block; }
.user-badge { font-size: 18px; }
.drawer { overflow-y: auto; }
.drawer-nav { gap: 0; }
.drawer-nav button { padding: 11px 12px; font-size: 15px; }
.drawer-nav button > span { flex: 1; }
.nav-val { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 700; }
.nav-new { font-style: normal; font-size: 11px; background: var(--success); color: var(--c-white); padding: 1px 8px; border-radius: 999px; }
.nav-badge { font-style: normal; font-size: 11px; background: var(--danger); color: var(--c-white); min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
.badge.info { background: color-mix(in srgb, var(--c-blue) 14%, transparent); color: var(--c-blue); }
[data-theme="dark"] .badge.info { color: var(--c-blue-light); }
.h-item { cursor: pointer; }
.h-bottom { gap: 8px; }
.h-btns { display: flex; gap: 6px; }
.tools.wrap { flex-wrap: wrap; margin-top: 14px; }
.empty-page.small { padding: 20px; }
.input.center { text-align: center; letter-spacing: 4px; font-size: 20px; font-weight: 800; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.profile-photo { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 14px; position: relative; }
.profile-photo #photoBox .user-badge { font-size: 32px; }
.photo-btn { position: absolute; top: 66px; margin-inline-start: -70px; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; cursor: pointer; border: 3px solid var(--bg); }
.photo-btn .ic { width: 18px; height: 18px; }
.contact-form { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.contact-form .phone-field { margin: 0; }
.contact-form .phone-field .cc, .contact-form .phone-field input { height: 46px; font-size: 16px; }

.wallet-card { border-radius: 22px; padding: 22px; color: var(--c-white); background: linear-gradient(135deg, var(--c-grey-900), var(--c-grey-700)); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; position: relative; overflow: hidden; }
.wallet-card::after { content: '👛'; position: absolute; inset-inline-end: 16px; top: 12px; font-size: 64px; opacity: .15; }
.wallet-card small { opacity: .75; }
.wallet-card b { font-size: 32px; font-weight: 800; }
.dark-btn { background: var(--brand); color: var(--on-brand); align-self: flex-start; margin-top: 8px; }
.quick-amounts { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.quick-amounts .tag { white-space: nowrap; background: var(--surface); }
.tx { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface); border-radius: 14px; margin-bottom: 6px; }
.tx-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; }
.tx.credit .tx-ic { background: color-mix(in srgb, var(--c-green) 14%, transparent); color: var(--success); }
.tx.debit .tx-ic { background: var(--danger-soft); color: var(--danger); }
.tx.credit .tx-amt { color: var(--success); }
.tx-amt { white-space: nowrap; }
.add-pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.add-pay button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 700; font-size: 12.5px; }
.add-pay span { font-size: 24px; }
.def-pill { font-style: normal; font-size: 10.5px; background: var(--success); color: var(--c-white); padding: 1px 8px; border-radius: 999px; vertical-align: middle; }
.amount-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.processing { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0; text-align: center; }
.spinner.big { width: 48px; height: 48px; border-width: 4px; border-color: var(--surface-3); border-top-color: var(--brand); }
.card-preview { border-radius: 18px; padding: 18px; color: var(--c-white); background: linear-gradient(135deg, var(--c-midnight), var(--c-midnight-2)); display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; min-height: 130px; }
.card-preview b { font-size: 19px; letter-spacing: 2px; }
.card-preview small { opacity: .8; letter-spacing: 1px; }
.card-preview span { font-weight: 800; }

.tier-card { border-radius: 22px; padding: 18px; color: var(--c-white); display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; box-shadow: var(--shadow); background: linear-gradient(135deg, var(--c-amber-deep), var(--c-amber)); }
.tier-silver { background: linear-gradient(135deg, var(--c-slate), var(--c-grey-400)); }
.tier-gold { background: linear-gradient(135deg, var(--c-amber-deep), var(--c-gold)); }
.tier-platinum { background: linear-gradient(135deg, var(--c-navy), var(--c-midnight-2)); }
.tier-top { display: flex; align-items: center; gap: 12px; }
.tier-top > div:nth-child(2) { flex: 1; }
.tier-top b { display: block; font-size: 20px; }
.tier-ic { font-size: 40px; }
.pts { text-align: center; }
.pts b { font-size: 28px; line-height: 1; }
.progress.light { background: color-mix(in srgb, var(--c-white) 25%, transparent); margin: 0; }
.progress.light span { background: var(--c-white); }
.invite-hero { text-align: center; background: var(--surface); border-radius: 22px; padding: 20px 16px; box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.invite-hero h3 { font-size: 19px; margin-bottom: 6px; }
.code-box { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px auto; padding: 10px 18px; border: 2px dashed var(--brand); border-radius: 16px; width: fit-content; }
.code-box b { font-size: 24px; letter-spacing: 3px; }
.stats.two { grid-template-columns: 1fr 1fr; }
.help-actions { margin: 12px 0; }
.faq-item { background: var(--surface); border-radius: 14px; margin-bottom: 8px; box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-item summary { padding: 14px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.faq-item summary::after { content: '+'; font-size: 20px; color: var(--muted); line-height: 1; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 14px 14px; color: var(--muted); }
.notif { display: flex; gap: 12px; padding: 14px; background: var(--surface); border-radius: 16px; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.notif.unread { border-inline-start: 4px solid var(--brand); }
.notif-ic { font-size: 22px; flex: none; }
.notif p { color: var(--muted); font-size: 13.5px; margin: 2px 0; }
.notif small { color: var(--muted); font-size: 11.5px; }
.notif .link-btn { margin-top: 6px; }

/* صفحة التتبع */
.track-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.track-head > div:nth-child(2) { flex: 1; }
.track-head small { color: var(--muted); display: block; }
.track-head b { font-size: 18px; }
.track-ic { font-size: 30px; }
.brand-chip small { color: var(--muted); font-weight: 600; }

@keyframes sosPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-red) 55%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }

/* ================= المرحلة 3: مبدّل الراكب / السائق ================= */
.role-switch { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 4px; box-shadow: var(--shadow-sm); gap: 2px; }
.role-switch a { padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.role-switch a.on { background: var(--brand); color: var(--on-brand); }
.lang-select { position: relative; display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.lang-select:hover, .lang-select:focus-within { color: var(--text); background: var(--surface-2); }
.lang-select select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.lang-seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.lang-seg button { flex: 1; padding: 8px 6px; border-radius: 10px; font-weight: 800; font-size: 13px; color: var(--muted); }
.lang-seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.lang-seg button[lang="ckb"] { font-family: 'Noto Sans Arabic', var(--font); }
.drawer-lang { margin: 10px 0 4px; }
/* الهاتف: شريط الأعلى ضيق، فاللغة تُختار من القائمة الجانبية */
@media (max-width: 520px) { .topbar .lang-select { display: none; } }
.rs-ic { font-style: normal; }
/* هواتف ضيقة: نخفي رموز التبديل حتى لا تزاحم أزرار SOS والإشعارات (خصوصاً بالإنكليزية) */
@media (max-width: 420px) { .topbar .rs-ic { display: none; } .topbar .role-switch a { padding: 6px 9px; } }
.role-float { position: fixed; top: calc(10px + env(safe-area-inset-top)); inset-inline-end: 12px; z-index: 900; }
.role-float[hidden] { display: none; }

/* ================= المرحلة 4: ردود الإدارة والحالات ================= */
.warn-box { background: color-mix(in srgb, var(--c-red) 10%, transparent); color: var(--danger); border-radius: 12px; padding: 10px 14px; font-weight: 700; margin-bottom: 10px; }
.badge.warn { background: color-mix(in srgb, var(--c-amber-light) 16%, transparent); color: var(--warn); }
.badge.ok { background: color-mix(in srgb, var(--c-green) 14%, transparent); color: var(--success); }
.review-badge.rejected { background: var(--danger-soft); color: var(--danger); }
.ticket-reply { margin: -4px 12px 10px; }
.role-switch a { padding: 6px 10px; }

/* ---------- الإبلاغ عن السائق ---------- */
.report-link { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin: 10px 0 2px; padding: 8px; border-radius: 12px; font-size: 13.5px; font-weight: 700; color: var(--danger); background: transparent; }
.report-link .ic { width: 16px; height: 16px; }
.report-link:hover { background: var(--danger-soft); }
.reason.top span { font-weight: 800; }
.ask-q { font-size: 17px; font-weight: 800; text-align: center; margin: 4px 0 8px; }
.tool.danger { color: var(--danger); background: var(--danger-soft); }

/* ---------- تأكيد مكان الالتقاط والبحث ---------- */
.cp-addr { align-items: flex-start; }
.cp-addr .row-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cp-addr .row-txt small { color: var(--muted); font-size: 12px; }
.acc-note { font-size: 12.5px; font-weight: 700; margin: 6px 0 2px; }
.acc-note.ok { color: var(--success); }
.acc-note.warn { color: var(--warn); }
.pk-note { color: var(--brand-strong); font-weight: 700; }
.geo-wait { display: flex; align-items: center; gap: 8px; padding: 10px 4px; color: var(--muted); font-size: 13px; }
.geo-wait .ic { width: 16px; height: 16px; }
