/* =============================================================================
   SOUB design system — loaded LAST, after every other stylesheet.

   Purpose: one consistent look (spacing, radius, tap targets, type scale) on top
   of the existing SOUB identity (navy #12324a, orange #f47726, teal #1aa99c).
   Presentation only: no element is removed from the DOM, no handler changes,
   no business rule changes. Hidden duplicates stay reachable another way.

   Sections
     1. Tokens
     2. Base: tap targets, focus, buttons, inputs
     3. App header (compact on phones)
     4. Home: hero + service choices
     5. Dialogs (sheet style on phones)
     6. Request form
     7. Offers & agreement
     8. Chat composer
     9. Carrier: vehicles & opportunities
    10. Night theme adjustments
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --soub-navy: #12324a;
  --soub-navy-soft: #2a4a63;
  --soub-orange: #f47726;
  --soub-orange-strong: #d9480f;
  --soub-orange-tint: #fff3ea;
  --soub-teal: #1aa99c;
  --soub-teal-tint: #e7f7f5;
  --soub-bg: #f6f7f9;
  --soub-surface: #ffffff;
  --soub-line: #e3e8ef;
  --soub-muted: #5b6b7f;
  --soub-danger: #c92a2a;
  /* Every second card or offer in a list (V99): a clearly darker step than the surface. */
  --soub-zebra: #e9eef5;

  --soub-radius-lg: 18px;
  --soub-radius: 14px;
  --soub-radius-sm: 10px;
  --soub-tap: 48px;
  --soub-gap: 12px;
  --soub-shadow: 0 1px 2px rgba(18, 50, 74, 0.06), 0 6px 18px rgba(18, 50, 74, 0.07);
  --soub-shadow-lift: 0 10px 30px rgba(18, 50, 74, 0.16);
  --soub-font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* 2. Base ------------------------------------------------------------------ */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  -webkit-tap-highlight-color: transparent;
}
:where(button, [role='button'], input, select, textarea, a):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--soub-orange) 70%, white);
  outline-offset: 2px;
}
/* Comfortable, consistent tap targets on touch screens. */
@media (pointer: coarse) {
  :where(dialog, main, header)
    :where(button, select, input:not([type='checkbox'], [type='radio'], [type='range'])) {
    min-height: 44px;
  }
}
:where(input, select, textarea) {
  border-radius: var(--soub-radius-sm);
}
/* Native file pickers: hide the unstyled "No file chosen" text, style the button. */
input[type='file'] {
  width: 100%;
  padding: 10px;
  border: 1.5px dashed #c9d3df;
  border-radius: var(--soub-radius);
  background: #fafbfc;
  color: var(--soub-muted);
  font-size: 14px;
  cursor: pointer;
}
input[type='file']::file-selector-button {
  margin-inline-end: 12px;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--soub-radius-sm);
  background: var(--soub-navy);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* 3. App header ------------------------------------------------------------ */
@media (max-width: 720px) {
  html body > header {
    display: grid;
    grid-template-columns: auto 1fr repeat(4, auto);
    grid-template-areas:
      'brand . home lang theme bell'
      'nav nav nav nav nav nav'
      'user user user user user user';
    align-items: center;
    gap: 8px 6px;
    padding: 10px 12px 8px;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 1px 0 var(--soub-line);
  }
  html body > header > .brand.soubBrand {
    grid-area: brand;
    width: auto;
    height: 40px;
    flex: none;
    max-width: none;
    justify-content: flex-start;
  }
  html body > header .soubWordmark {
    width: auto;
  }
  html body > header .soubBrandLine {
    min-height: 40px;
    gap: 6px;
    justify-content: flex-start;
  }
  html body > header .soubWordmark .soubBrandLine > b {
    font-size: 30px;
    letter-spacing: 1px;
  }
  html body > header .soubDirections {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }
  /* The decorative road strip doubles the header height on phones. */
  html body > header .roadMark,
  html body > header .brandRoad {
    display: none;
  }
  html body > header > #switchRole {
    grid-area: home;
  }
  html body > header > .siteLanguageControl {
    grid-area: lang;
  }
  html body > header > #themeToggle {
    grid-area: theme;
  }
  html body > header > .notificationArea {
    grid-area: bell;
  }
  html body > header > nav {
    grid-area: nav;
  }
  html body > header > .connectionStatus {
    grid-area: user;
    justify-self: start;
  }
  /* Uniform 42px round icon buttons. Labels stay for screen readers. */
  html body > header > #switchRole,
  html body > header > .siteLanguageControl,
  html body > header .notificationBell {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--soub-surface);
    border: 1px solid var(--soub-line);
    box-shadow: none;
    position: relative;
    overflow: visible;
  }
  html body > header > #switchRole .homeSwitchLabel {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  html body > header > #switchRole .roleSwitchIcon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
  }
  html body > header > #switchRole .roleSwitchIcon svg {
    width: 22px;
    height: 22px;
  }
  /* Language: show the globe; the native select covers the button invisibly. */
  html body > header > .siteLanguageControl svg {
    display: block !important;
    width: 22px;
    height: 22px;
    color: var(--soub-navy);
  }
  html body > header > .siteLanguageControl select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
  }
  /* Keep the designed day/night slider; only make it smaller. */
  html body > header > #themeToggle {
    zoom: 0.72;
  }
  html body > header .notificationBell svg {
    width: 22px;
    height: 22px;
  }
  html body > header .notificationBadge {
    top: -3px;
    right: -3px;
    left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    font-size: 11px;
    line-height: 20px;
    border: 2px solid var(--soub-surface);
  }
  html body > header > .connectionStatus #syncStatus {
    min-height: 34px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
  }
  /* Role tabs: one tidy segmented row that can scroll if it must. */
  html body > header > nav:not([hidden]) {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0;
    margin: 0;
  }
  html body > header > nav::-webkit-scrollbar {
    display: none;
  }
  html body > header > nav > button:not([hidden]) {
    flex: 1 0 auto;
    min-height: 40px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--soub-line);
    background: var(--soub-surface);
    color: var(--soub-navy-soft);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: none;
  }
  html body > header > nav > button.active,
  html body > header > nav > button[aria-current='page'] {
    background: var(--soub-navy);
    border-color: var(--soub-navy);
    color: #fff;
  }
  html body > header > nav > button::after {
    display: none;
  }
}

@media (max-width: 374px) {
  html body > header {
    gap: 8px 4px;
    padding-inline: 8px;
  }
  html body > header .soubWordmark .soubBrandLine > b {
    font-size: 25px;
  }
  html body > header .soubDirections {
    display: none;
  }
  html body > header > #switchRole,
  html body > header > .siteLanguageControl,
  html body > header .notificationBell {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }
  html body > header > #themeToggle {
    zoom: 0.6;
  }
}

/* 4. Home ------------------------------------------------------------------ */
@media (max-width: 720px) {
  #homeSurface .roleLanding {
    border-radius: var(--soub-radius-lg);
    overflow: hidden;
  }
  #homeSurface .landingScene {
    height: 210px;
    min-height: 0;
    aspect-ratio: auto;
    background-position: center 62%;
    background-size: cover;
  }
  #homeSurface .landingChoices {
    padding: 18px 14px 16px;
  }
  #homeSurface .landingTitle h2 {
    font-size: 24px;
    margin: 0 0 4px;
  }
  #homeSurface .landingTitle p {
    margin: 0 0 14px;
  }
  /* One service per row: text and picture never overlap. */
  #homeSurface .roleLanding .roleChoiceGrid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  #homeSurface .roleChoice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 100px;
    padding: 12px 16px;
    border-radius: var(--soub-radius);
    text-align: start;
    grid-column: auto !important;
    overflow: hidden;
  }
  #homeSurface .roleChoice .serviceCopy {
    display: grid;
    gap: 4px;
    position: static;
    width: auto;
    min-width: 0;
  }
  #homeSurface .roleChoice .serviceCopy b {
    font-size: 21px !important;
    line-height: 1.25;
    white-space: normal;
  }
  #homeSurface .roleChoice .serviceCopy small {
    font-size: 14px !important;
    line-height: 1.5;
    margin-top: 0;
  }
  /* The pictures are sprite crops: keep their size/position, only place them. */
  #homeSurface .roleChoice .serviceArt {
    position: static;
    justify-self: end;
  }
}

/* 5. Dialogs --------------------------------------------------------------- */
/* Every dialog already has a close (×) button in its header. The extra
   "إغلاق" button pinned at the bottom duplicated it and cost ~80px of height.
   It stays in the DOM (dialog-layout.js still manages it); Esc / back / × close. */
dialog:has(.dialoghead .close)
  > .dialogPinnedFooter:not(.soubDealFooter):not(:has(> :not(.dialogBottomClose))) {
  display: none;
}
dialog:has(.dialoghead .close) .dialogBottomClose {
  display: none;
}
dialog .dialoghead .close {
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}
@media (max-width: 720px) {
  dialog[open] {
    border-radius: var(--soub-radius-lg) var(--soub-radius-lg) 0 0;
  }
  dialog .dialoghead h2 {
    font-size: 19px;
  }
}

/* 7. Offers & agreement ---------------------------------------------------- */
/* Agreement footer: the two real decisions, confirm clearly primary. */
.soubDealFooter {
  display: grid !important;
  grid-template-columns: 1fr 1.6fr;
  gap: 10px;
  align-items: stretch;
}
.soubDealFooter > #endNegotiation {
  order: 1;
}
.soubDealFooter > #confirmFinalAgreement {
  order: 2;
}
.soubDealFooter > .soubDealAction {
  min-height: 48px;
  margin: 0;
  border-radius: var(--soub-radius);
  font-size: 15px;
  font-weight: 800;
}
.soubDealFooter > #negotiationError {
  grid-column: 1 / -1;
  order: 3;
  margin: 0;
}
.soubDealFooter > #negotiationError:empty {
  display: none;
}

/* Offer card (requester comparing quotes):
     [photo] carrier · rating · vehicle · distance
     price ………………………………… fixed / negotiable
     [ choose this offer ………… ] [reject]                                   */
@media (max-width: 720px) {
  dialog .offer {
    display: grid !important;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    grid-template-areas:
      'thumb info info'
      'price price price'
      'accept accept reject'
      'edit edit edit';
    gap: 10px 12px;
    align-items: start;
    padding: 14px !important;
    border-radius: var(--soub-radius) !important;
    text-align: start;
  }
  dialog .offer > .carrierThumbnail {
    grid-area: thumb;
    width: 76px;
    margin: 0;
    padding: 4px;
    border-radius: var(--soub-radius-sm);
  }
  dialog .offer > .carrierThumbnail img {
    width: 100%;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
  }
  dialog .offer > .carrierThumbnail small {
    font-size: 11px;
  }
  dialog .offer > div:not(.price):not(.editOfferActions) {
    grid-area: info;
    display: grid;
    gap: 2px;
    min-width: 0;
    font-size: 13px;
  }
  dialog .offer > div:not(.price) > b {
    font-size: 17px;
  }
  dialog .offer > .price {
    grid-area: price;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid var(--soub-line);
    font-size: 26px;
  }
  dialog .offer > .price .offerPricePolicy {
    margin-inline-start: auto;
  }
  dialog .offer > .primary {
    grid-area: accept;
    min-height: 48px;
    margin: 0;
    border-radius: var(--soub-radius);
    font-size: 16px;
    font-weight: 800;
  }
  /* The carrier's own offer: edit price / withdraw on their own row. */
  dialog .offer > .editOfferActions {
    grid-area: edit;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0;
  }
  dialog .offer > .editOfferActions > button {
    min-height: 46px;
    margin: 0;
    border-radius: var(--soub-radius);
    font-weight: 800;
  }
  dialog .offer > .cancelButton {
    grid-area: reject;
    min-height: 48px;
    margin: 0;
    padding-inline: 14px;
    border-radius: var(--soub-radius);
  }
}

/* 8. Chat composer --------------------------------------------------------- */
/* One row like any messenger: [attach][camera][mic]  [ message ……… ]  [send]
   Drafts (voice/image preview) and status lines take full rows above/below. */
dialog #agreementMessageForm {
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    'voiceDraft voiceDraft voiceDraft voiceDraft'
    'imageDraft imageDraft imageDraft imageDraft'
    'image voice input send'
    'status status status status';
  align-items: end;
  gap: 6px 8px;
  padding: 10px 0 4px;
}
dialog #agreementMessageForm > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
dialog #agreementMessageForm > textarea {
  grid-area: input;
  min-height: 44px;
  max-height: 120px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 22px;
  resize: none;
  font-size: 16px; /* 16px stops iOS from zooming into the field */
  line-height: 1.45;
}
dialog #agreementMessageForm > button[type='submit'] {
  grid-area: send;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  border-radius: 22px;
  white-space: nowrap;
  font-weight: 800;
}
dialog #agreementMessageForm > .imageComposer {
  grid-area: image;
  display: flex;
  gap: 6px;
  margin: 0;
}
dialog #agreementMessageForm > .voiceComposer {
  grid-area: voice;
  display: contents;
}
dialog #agreementMessageForm > .voiceComposer > .voiceRecord {
  grid-area: voice;
}
dialog #agreementMessageForm > .voiceComposer > .voiceStatus,
dialog #agreementMessageForm > .voiceComposer > .voiceError {
  grid-area: status;
  margin: 0;
  font-size: 12px;
  color: var(--soub-muted);
}
dialog #agreementMessageForm > .voiceComposer > .voiceError:empty {
  display: none;
}
dialog #agreementMessageForm :is(.imageChoose, .imageCapture, .voiceRecord) {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 19px;
}
dialog #agreementMessageForm .voiceRecord svg {
  width: 21px;
  height: 21px;
}
dialog #agreementMessageForm > .voiceDraft {
  grid-area: voiceDraft;
}
dialog #agreementMessageForm > .imageDraft {
  grid-area: imageDraft;
}
dialog #agreementMessageForm > p:not(.voiceError) {
  grid-area: status;
  margin: 0;
  font-size: 12px;
}
dialog #agreementMessageForm > p:empty {
  display: none;
}
/* Very narrow phones (≤ 360px): the camera joins the attach button's row
   position by shrinking all round buttons slightly. */
@media (max-width: 360px) {
  dialog #agreementMessageForm :is(.imageChoose, .imageCapture, .voiceRecord) {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }
  dialog #agreementMessageForm > button[type='submit'] {
    padding: 0 12px;
  }
}

/* 6. Request form ---------------------------------------------------------- */
/* Steps guide: three clear numbered chips instead of a tiny breadcrumb line. */
dialog .soubV88Flow {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 14px;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
}
dialog .soubV88Flow > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: var(--soub-radius-sm);
  background: var(--soub-teal-tint);
  color: #0d6e65;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}
dialog .soubV88Flow > span::before,
dialog .soubV88Flow > span::after {
  display: none !important;
}
/* Loading / delivery points: each one a card, with the map button as the
   obvious main action (the exact point is what carriers need most). */
dialog .routeLocationField {
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius);
  background: #fbfcfd;
  border-inline-start: 4px solid var(--soub-teal);
}
dialog .routeLocationField + .routeLocationField {
  border-inline-start-color: var(--soub-orange);
}
dialog .routeLocationField > label {
  margin-bottom: 8px;
}
dialog .pointButton {
  width: 100%;
  min-height: 48px;
  margin: 0;
  border: 1.5px dashed color-mix(in srgb, var(--soub-navy) 35%, white) !important;
  border-radius: var(--soub-radius-sm);
  background: #fff !important;
  color: var(--soub-navy) !important;
  font-size: 15px;
  font-weight: 800;
}
dialog .routeLocationField + .routeLocationField .pointButton {
  border-color: color-mix(in srgb, var(--soub-orange) 55%, white) !important;
}
dialog .routeLocationField small,
dialog .routeLocationField [id$='Status'] {
  display: block;
  margin-top: 6px;
  color: var(--soub-muted);
  font-size: 13px;
}
/* Help text under fields: smaller and quieter than the field labels. */
dialog form label > small,
dialog form .full > small,
dialog form p.full:not(.editError) {
  font-size: 13px;
  line-height: 1.6;
  color: var(--soub-muted);
}
dialog form :is(label, .full) {
  font-weight: 700;
}
/* Contact details (pre-filled from the account) as a quiet, tidy panel. */
dialog .soubV88Contact {
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius);
  background: #fbfcfd;
  padding: 4px 12px;
}
dialog .soubV88Contact > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
/* Form action bar: primary action fills the row. */
dialog form > .actions {
  display: grid !important;
  grid-template-columns: auto 1fr;
  gap: 10px;
}
dialog form > .actions > .primary {
  order: 2;
  min-height: 50px;
  border-radius: var(--soub-radius);
  font-size: 16px;
  font-weight: 800;
}
dialog form > .actions > .outline {
  order: 1;
  min-height: 50px;
  border-radius: var(--soub-radius);
  padding-inline: 18px;
}

/* 9. Carrier: vehicles & opportunities ------------------------------------- */
/* Confirmation checkboxes: the whole row is the tap target. */
dialog form label:has(> input[type='checkbox']) {
  display: flex !important;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius);
  background: #fbfcfd;
  cursor: pointer;
  font-weight: 700;
}
dialog form label:has(> input[type='checkbox']:checked) {
  border-color: var(--soub-teal);
  background: var(--soub-teal-tint);
}
dialog form label > input[type='checkbox'] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex: 0 0 22px;
  margin: 0;
  accent-color: var(--soub-teal);
}
/* Single primary action forms (vehicles, account, driver profile): full width. */
dialog form > .actions:has(> .primary:only-child),
dialog form > .actions:not(:has(> .outline)) {
  grid-template-columns: 1fr;
}
dialog form > .actions > .primary:only-child {
  width: 100%;
}
/* "Add another vehicle": a clear secondary action. */
dialog #addFleetVehicle {
  width: 100%;
  min-height: 50px;
  border-radius: var(--soub-radius);
  font-weight: 800;
}

/* 10. Night theme ---------------------------------------------------------- */
html[data-theme='night'] {
  --soub-zebra: #22384c;
  --soub-surface: #13212d;
  --soub-line: #2a3b4a;
  --soub-muted: #9fb0c0;
  --soub-teal-tint: #12302e;
}
html[data-theme='night'] dialog :is(.routeLocationField, .soubV88Contact),
html[data-theme='night'] dialog form label:has(> input[type='checkbox']),
html[data-theme='night'] input[type='file'] {
  background: #182937;
}
html[data-theme='night'] dialog .pointButton {
  background: #13212d !important;
  color: #e8eef3 !important;
}
html[data-theme='night'] dialog .soubV88Flow > span {
  color: #7fe0d5;
}

/* Respect users who ask the system for less motion. */
@media (prefers-reduced-motion: reduce) {
  html body > header *,
  #homeSurface * {
    animation: none !important;
    transition: none !important;
  }
}

/* 11. Calls to action ------------------------------------------------------ */
/* An offer waiting for the requester: orange, with a gently moving arrow. */
body.requesterWorkspace #cards .rqOfferBottom button.rqOfferCta,
#cards .rqOfferCta,
.rqOfferCta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1.5px solid var(--soub-orange);
  border-radius: var(--soub-radius);
  background: var(--soub-orange-tint);
  color: var(--soub-orange-strong);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
body.requesterWorkspace #cards .rqOfferBottom button.rqOfferCta.rqOfferCtaBest,
#cards .rqOfferCta.rqOfferCtaBest,
.rqOfferCta.rqOfferCtaBest {
  background: var(--soub-orange);
  border-color: var(--soub-orange);
  color: #fff;
  box-shadow: 0 6px 16px rgba(244, 119, 38, 0.32);
}
.rqOfferCta .ctaArrow {
  display: inline-block;
  font-size: 1.15em;
  line-height: 1;
}
.rqOfferCtaBest .ctaArrow {
  animation: soubNudge 1.1s ease-in-out infinite;
}
@keyframes soubNudge {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-6px);
  }
}
[dir='ltr'] .rqOfferCta .ctaArrow {
  transform: scaleX(-1);
}
[dir='ltr'] .rqOfferCtaBest .ctaArrow {
  animation-name: soubNudgeLtr;
}
@keyframes soubNudgeLtr {
  0%,
  100% {
    transform: scaleX(-1) translateX(0);
  }
  50% {
    transform: scaleX(-1) translateX(-6px);
  }
}
/* Carrier: own offer waiting for the requester's decision. */
.awaitingApproval {
  border-color: #e5b143 !important;
  background: #fff8e6 !important;
  color: #8a5a00 !important;
  font-weight: 800;
}
html[data-theme='night'] body.requesterWorkspace #cards .rqOfferBottom button.rqOfferCta:not(.rqOfferCtaBest),
html[data-theme='night'] #cards .rqOfferCta:not(.rqOfferCtaBest) {
  background: #3a2414;
  color: #ffb27a;
}
html[data-theme='night'] .awaitingApproval {
  background: #3a2d10 !important;
  color: #ffd27a !important;
}

/* 12. Route section -------------------------------------------------------- */
/* Pickup / delivery map links are the useful part; licence credits stay but quiet. */
.requestPointLinks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.requestPointLinks .mapPointLink {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius-sm);
  background: var(--soub-surface);
  color: var(--soub-navy);
  font-weight: 800;
  text-decoration: none;
}
.requestPointLinks .mapPointLink small {
  color: var(--soub-muted);
  font-weight: 600;
  font-size: 12px;
}
.requestPointLinks .areaPointLink {
  border-style: dashed;
}
.areaPrivacyNote {
  margin: 6px 0 0;
  color: var(--soub-muted);
  font-size: 12px;
}
.routeEstimate .routeCredits,
.routeEstimate .routeCredits a {
  font-size: 10.5px;
  color: color-mix(in srgb, var(--soub-muted) 80%, transparent);
  text-decoration: none;
}
#showSavedTripMap.routeTextButton {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 16px;
  border: 1.5px solid var(--soub-teal);
  border-radius: var(--soub-radius-sm);
  background: var(--soub-teal-tint);
  color: #0d6e65;
  font-weight: 800;
  text-decoration: none;
}

/* 13. Carrier page: compact intro, commission chip next to the name -------- */
/* `flex: 1 1 240px` was meant as a minimum width; in the phone's column
   layout it became a 240px-tall empty block under the heading. */
@media (max-width: 720px) {
  main > .intro > div:first-child {
    flex: 0 0 auto !important;
  }
  main:has(.carrierSignup) > .intro {
    gap: 4px;
    margin-bottom: 8px;
  }
}
html body > header > .connectionStatus:has(.headerCommission) {
  display: flex;
  align-items: center;
  gap: 8px;
  position: static; /* the panel anchors to the (sticky) header, full width */
  width: auto;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
html body > header > .connectionStatus:has(.headerCommission) #syncStatus {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 62vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.headerCommission > details > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  border: 1px solid #e5b143;
  border-radius: 999px;
  background: #fff8e6;
  color: #8a5a00;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.headerCommission > details > summary::-webkit-details-marker {
  display: none;
}
.headerCommission > details[open] > summary {
  background: #8a5a00;
  border-color: #8a5a00;
  color: #fff;
}
.headerCommissionPanel {
  position: absolute;
  inset-inline: 10px;
  top: calc(100% + 6px);
  z-index: 40;
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius);
  background: var(--soub-surface);
  box-shadow: var(--soub-shadow-lift);
  text-align: start;
}
html[data-theme='night'] .headerCommission > details > summary {
  background: #3a2d10;
  color: #ffd27a;
}
html[data-theme='night'] .headerCommissionPanel {
  background: #13212d;
}
html body > header .topCommission.headerCommission {
  width: auto;
  min-width: 0;
  min-height: 0;
  max-width: none;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
html body > header .headerCommission > details.soubV92Commission {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  min-height: 0;
}

/* 14. Fleet editor: map visibility always visible (no "advanced options"). */
#carrierDialog .fleetEditor .fleetMapOptions {
  padding: 12px;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius);
  background: #fbfcfd;
}
#carrierDialog .fleetMapOptions .fleetMapTitle {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--soub-navy);
}
html[data-theme='night'] #carrierDialog .fleetEditor .fleetMapOptions {
  background: #182937;
}
html[data-theme='night'] #carrierDialog .fleetMapOptions .fleetMapTitle {
  color: #e8eef3;
}

/* 15. Drivers: explicit search action under the filters. */
.driverFilters .driverSearchActions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.driverFilters .driverSearchActions > button {
  min-height: 48px;
  margin: 0;
  border-radius: var(--soub-radius);
  font-weight: 800;
}

/* 16. Night theme: lit headlights + readable header icons ------------------ */
/* Dedicated night photos (tools: lit headlights placed on each vehicle) replace
   the old CSS glow points, which no longer matched the current photo. */
html[data-theme='night'] .roleLanding.designLanding .landingScene {
  background-image: url('/assets/soub-hero-night-v95.jpg');
  background-blend-mode: normal;
  background-color: #0e1a26;
}
@media (max-width: 700px) {
  html[data-theme='night'] .roleLanding.designLanding .landingScene {
    background-image: url('/assets/soub-hero-mobile-night-v95.jpg');
  }
}
html[data-theme='night'] .roleLanding.designLanding .landingScene::after,
html[data-theme='night'] .roleLanding.designLanding .landingScene::before {
  display: none;
}
html[data-theme='night'] body > header > #switchRole,
html[data-theme='night'] body > header > .siteLanguageControl,
html[data-theme='night'] body > header .notificationBell {
  background: #1b2b3a;
  border-color: #33475a;
}
html[data-theme='night'] body > header > .siteLanguageControl svg,
html[data-theme='night'] body > header .notificationBell svg {
  color: #e8eef3;
  stroke: currentColor;
}
@media (max-width: 720px) {
  #homeSurface .roleChoice .serviceArt.carrierArt {
    width: min(130px, 38vw);
    max-width: 38vw;
  }
}
/* Text and picture are both <span>s; an old `.roleChoice span {grid-column: 1}`
   put them in the same cell, so the picture covered the text. */
@media (max-width: 720px) {
  #homeSurface .roleChoice > .serviceCopy {
    grid-column: 1;
    grid-row: 1;
  }
  #homeSurface .roleChoice > .serviceArt {
    grid-column: 2;
    grid-row: 1;
  }
}

/* 17. Date picker: past days greyed out and not selectable ----------------- */
/* The native date input stays in the form (validation/submit), visually hidden. */
.soubNativeDate {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  clip-path: inset(50%) !important;
  pointer-events: none;
}
.soubDatePicker {
  position: relative;
  width: 100%;
}
.soubDateToggle {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid #c9d3df;
  border-radius: var(--soub-radius-sm);
  background: var(--soub-surface);
  color: var(--soub-navy);
  font: inherit;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
}
.soubDateToggle::after {
  content: '📅';
  float: inline-end;
}
.soubDateToggle.soubDateEmpty {
  color: var(--soub-muted);
  font-weight: 600;
}
.soubDatePanel {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius);
  background: var(--soub-surface);
  box-shadow: var(--soub-shadow);
}
.soubDateQuick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.soubDateChip {
  min-width: 0;
  padding: 0 6px;
  margin: 0;
  min-height: 40px;
  border: 1px solid var(--soub-teal);
  border-radius: 999px;
  background: var(--soub-teal-tint);
  color: #0d6e65;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.soubDateHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.soubDateHead b {
  font-size: 16px;
}
.soubDateNav {
  width: 40px;
  height: 40px;
  border: 1px solid var(--soub-line);
  border-radius: 50%;
  background: var(--soub-surface);
  font-size: 20px;
  cursor: pointer;
}
.soubDateNav:disabled {
  opacity: 0.3;
  cursor: default;
}
.soubDateGrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  text-align: center;
}
.soubDateWeekday {
  font-size: 12px;
  color: var(--soub-muted);
  padding: 4px 0;
}
.soubDateDay {
  min-width: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  min-height: 40px;
  border: 0;
  border-radius: var(--soub-radius-sm);
  background: transparent;
  color: var(--soub-navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.soubDateDay:hover:not(:disabled) {
  background: var(--soub-orange-tint);
}
.soubDateDay.soubDatePast {
  color: #b8c1cc;
  background: #f1f3f6;
  text-decoration: line-through;
  cursor: not-allowed;
}
.soubDateDay.soubDateToday {
  box-shadow: inset 0 0 0 1.5px var(--soub-teal);
}
.soubDateDay.soubDateSelected {
  background: var(--soub-orange);
  color: #fff;
}
html[data-theme='night'] .soubDateDay.soubDatePast {
  background: #1b2734;
  color: #4f6273;
}
html[data-theme='night'] .soubDateToggle,
html[data-theme='night'] .soubDatePanel,
html[data-theme='night'] .soubDateNav {
  background: #13212d;
  color: #e8eef3;
}
html[data-theme='night'] .soubDateDay {
  color: #e8eef3;
}

/* V96 — drafts, repeat, offer tags, cancellation policy, carrier quick actions,
   service cities, trip timeline and live location. */
.draftNotice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: var(--soub-radius-sm);
  background: var(--soub-teal-tint);
  color: var(--soub-navy);
  font-size: 13px;
}

.offerHighlights {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}
.offerHighlight {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soub-orange-tint);
  color: var(--soub-orange-strong);
  font-size: 11.5px;
  font-weight: 800;
}
.cancellationPolicy {
  margin: 10px 0;
  padding: 8px 12px;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius-sm);
  background: var(--soub-surface);
  font-size: 13px;
}
.cancellationPolicy summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--soub-navy);
}
.cancellationPolicy ul {
  margin: 8px 0 0;
  padding-inline-start: 18px;
  color: var(--soub-muted);
  line-height: 1.8;
}
.carrierAvailability {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius);
  background: var(--soub-surface);
}
.carrierAvailability.isAvailable {
  border-color: var(--soub-teal);
  background: var(--soub-teal-tint);
}
.carrierAvailability > div:first-child {
  display: grid;
  gap: 2px;
  flex: 1 1 200px;
}
.carrierAvailability small {
  color: var(--soub-muted);
}
.carrierAvailabilityActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.carrierEarnings h3 {
  margin: 14px 0 6px;
  font-size: 15px;
}
.serviceCities {
  margin: 14px 0;
  padding: 12px;
  border: 1px dashed var(--soub-line);
  border-radius: var(--soub-radius-sm);
}
.serviceCities h4 {
  margin: 0 0 4px;
}
.serviceCities p {
  margin: 0 0 8px;
  color: var(--soub-muted);
  font-size: 13px;
}
.serviceCityChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.serviceCityChips .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.serviceCityChips .chip button {
  min-width: 24px;
  min-height: 24px;
  border: 0;
  background: transparent;
  color: var(--soub-danger);
  font-weight: 800;
  cursor: pointer;
}
.tripTimeline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}
.tripTimeline li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--soub-line);
  border-radius: 999px;
  color: var(--soub-muted);
  font-size: 12.5px;
}
.tripTimeline li span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--soub-line);
  color: var(--soub-navy);
  font-size: 11px;
  font-weight: 800;
}
.tripTimeline li.done {
  border-color: var(--soub-teal);
  color: var(--soub-navy);
}
.tripTimeline li.done span {
  background: var(--soub-teal);
  color: #fff;
}
.tripTimeline li.current {
  border-color: var(--soub-orange);
  color: var(--soub-navy);
  font-weight: 800;
}
.tripTimeline li.current span {
  background: var(--soub-orange);
  color: #fff;
}
.liveLocation {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius-sm);
  background: var(--soub-surface);
}
.liveLocation small {
  color: var(--soub-muted);
}
.liveLocation .mapPointLink {
  color: var(--soub-navy);
  font-weight: 800;
  text-decoration: none;
}

/* V98 — Location picker in the style of ride apps (presentation only): the map
   fills the phone screen, the pin lifts while the map moves and drops onto its
   shadow when it stops, "my location" floats on the map, and a bottom card holds
   the status and a large confirm button. Picking and saving are unchanged. */
.locationPickerPin {
  transition: transform 160ms ease-out;
}
.locationPickerPin path {
  fill: var(--soub-orange);
}
.locationPickerMap.isMoving .locationPickerPin {
  transform: translate(-50%, calc(-100% - 14px));
}
.locationPickerPinShadow {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 14px;
  height: 6px;
  border-radius: 50%;
  background: #0c203b59;
  transform: translate(-50%, -50%);
  transition:
    transform 160ms ease-out,
    opacity 160ms ease-out;
  pointer-events: none;
}
.locationPickerMap.isMoving .locationPickerPinShadow {
  transform: translate(-50%, -50%) scale(1.7);
  opacity: 0.55;
}
.locationPickerMap .locationPickerGpsFloating {
  position: absolute;
  left: 10px;
  bottom: 40px;
  z-index: 4;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--soub-surface);
  color: var(--soub-navy);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: var(--soub-shadow-lift);
  direction: rtl;
}
.locationPickerSheet {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
  padding: 12px 14px;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius-lg);
  background: var(--soub-surface);
  box-shadow: 0 -6px 22px #0c203b1f;
}
.locationPickerSheet .locationPickerStatus {
  color: var(--soub-navy);
  font-size: 14px;
  font-weight: 700;
}
.locationPickerSheet .locationPickerFooter {
  padding-top: 0;
  background: transparent;
}
.locationPickerSheet .locationPickerFooter .primary {
  min-height: 52px;
  border-radius: var(--soub-radius);
  font-size: 16px;
  font-weight: 800;
}
@media (max-width: 600px) {
  dialog.locationPickerDialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  /* theme.css pads every pinned dialog with !important on phones. */
  dialog.locationPickerDialog.dialogPinnedLayout {
    padding: 0 !important;
    border: 0;
  }
  .locationPickerBody {
    padding: 0;
    gap: 0;
  }
  .locationPickerToolbar {
    padding: 8px 12px;
  }
  .locationPickerMap {
    border: 0;
    border-radius: 0;
  }
  /* Keep the map credits and "my location" above the overlapping card. */
  .locationPickerMap .locationPickerAttribution {
    bottom: 18px;
  }
  .locationPickerMap .locationPickerGpsFloating {
    bottom: 58px;
  }
  .locationPickerTileError {
    margin: 8px 12px 0;
  }
  .locationPickerSheet {
    position: relative;
    z-index: 6;
    margin-top: -18px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    border-bottom: 0;
    border-radius: var(--soub-radius-lg) var(--soub-radius-lg) 0 0;
  }
}

/* V99 · Request cards in the carrier lists (opportunities, my offers & agreements):
   each card stands alone with its own frame and space, so one offer is clearly
   separated from the next. */
#cards > article.card {
  background: var(--soub-surface);
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius-lg);
  box-shadow: var(--soub-shadow);
  padding: 16px;
  margin: 0 0 14px;
}
#cards > article.card:last-child {
  margin-bottom: 0;
}
/* Finished, cancelled or ended requests look inactive (grey, no accent colours),
   but stay tappable so past chats can still be opened. */
#cards > article.card.cardClosed {
  background: color-mix(in srgb, var(--soub-bg) 70%, var(--soub-line));
  border-style: dashed;
  box-shadow: none;
  filter: grayscale(1);
  opacity: 0.78;
}
#cards > article.card.cardClosed:is(:hover, :focus-within) {
  opacity: 1;
}
html[data-theme='night'] #cards > article.card.cardClosed {
  background: #0f1a24;
}

/* V99 · Approximate route map: the 1 km pickup and delivery areas as soft circles. */
.locationPickerRoute circle.locationPickerArea {
  fill: color-mix(in srgb, var(--soub-orange) 18%, transparent);
  stroke: var(--soub-orange-strong);
  stroke-width: 2;
  stroke-dasharray: 6 5;
}

/* V99 · Vehicle form (مركباتي ومعداتي): compact layout, same fields and behaviour.
   Less nesting, tighter spacing, smaller help text, type and count side by side. */
#carrierDialog #carrierForm .soubSteps {
  margin: 2px 0 10px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.6;
}
#carrierDialog #carrierForm .fleetEditor {
  margin: 8px 0;
  padding: 12px;
}
#carrierDialog #carrierForm .fleetEditor > .dialoghead {
  margin-bottom: 8px;
}
#carrierDialog #carrierForm .fleetEditor > .fields {
  gap: 10px;
}
#carrierDialog #carrierForm .fleetEditor :is(input:not([type='checkbox']):not([type='file']), select) {
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 10px;
}
#carrierDialog #carrierForm .fleetEditor label > small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.5;
}
/* Map visibility: one flat box, two short buttons in a row. */
#carrierDialog #carrierForm .fleetMapOptions {
  margin-top: 2px;
  padding: 10px;
}
#carrierDialog #carrierForm .fleetMapTitle {
  margin-bottom: 6px;
  font-size: 14px;
}
#carrierDialog #carrierForm .vehicleMapSetup {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
#carrierDialog #carrierForm .vehicleMapActions {
  gap: 8px;
}
#carrierDialog #carrierForm .mapVisibilityButton {
  flex-direction: row;
  justify-content: center;
  min-height: 44px;
  padding: 6px 10px;
  gap: 6px;
  white-space: nowrap;
}
#carrierDialog #carrierForm .mapVisibilityButton span {
  line-height: 1.3;
}
#carrierDialog #carrierForm .vehicleMapSetup > p {
  margin: 8px 0 4px;
  font-size: 13px;
  line-height: 1.5;
}
#carrierDialog #carrierForm .vehicleMapSetup > small {
  font-size: 12px;
  line-height: 1.5;
}
/* Photos: a slimmer picker and help text. */
#carrierDialog #carrierForm .fleetEditor label.full:has(input[type='file']) {
  padding: 10px;
}
#carrierDialog #carrierForm .fleetEditor input[type='file'] {
  margin-top: 4px;
  padding: 8px;
}
/* Extra service cities and the closing rows. */
#carrierDialog #carrierForm .serviceCities {
  margin: 10px 0;
  padding: 10px 12px;
}
#carrierDialog #carrierForm .serviceCities h4 {
  margin-bottom: 2px;
  font-size: 14px;
}
#carrierDialog #carrierForm .serviceCities > p {
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.5;
}
#carrierDialog #carrierForm .serviceCities select {
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 10px;
}
#carrierDialog #carrierForm #addFleetVehicle {
  min-height: 44px;
  padding: 8px 14px;
}
#carrierDialog #carrierForm > label:has(input[type='checkbox']) {
  margin-top: 10px;
  padding: 8px 12px;
}
#carrierDialog #carrierForm > .actions {
  margin-top: 8px;
  padding-block: 8px;
}
/* Type and count share a row from 360px up; the name, map and photos stay full width. */
@media (min-width: 360px) {
  /* Overrides the phone rule `dialog .fields { 1 column !important }` for this form only. */
  #carrierDialog #carrierForm .fleetEditor > .fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
  #carrierDialog #carrierForm .fleetEditor > .fields > label {
    grid-column: auto;
  }
  #carrierDialog #carrierForm .fleetEditor > .fields > :is(label:first-child, .full) {
    grid-column: 1 / -1;
  }
}
#carrierDialog #carrierForm .fleetEditor > .cargoGallery:empty {
  display: none;
}

/* V99 · Trip map (owner design): labelled pins, a road with direction arrows, and the
   carrier's live arrow. Pins: navy truck for loading, orange house for delivery. */
:is(.locationPickerDialog, .tripMiniMap) .locationPickerEndpoint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: none;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  transform: translate(-50%, -100%);
  --pin: var(--soub-navy);
}
:is(.locationPickerDialog, .tripMiniMap) .locationPickerDestination {
  --pin: var(--soub-orange-strong);
}
:is(.locationPickerDialog, .tripMiniMap) .locationPickerEndpointLabel {
  padding: 4px 10px;
  background: #fff;
  color: var(--soub-navy);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(18, 50, 74, 0.22);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
:is(.locationPickerDialog, .tripMiniMap) .locationPickerEndpointPin {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  background: var(--pin);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 3px 8px rgba(18, 50, 74, 0.35);
}
:is(.locationPickerDialog, .tripMiniMap) .locationPickerEndpointPin svg {
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
:is(.locationPickerDialog, .tripMiniMap) .locationPickerEndpointPin svg circle {
  fill: #fff;
  stroke: none;
}
.locationPickerRoute polyline.locationPickerCasing {
  fill: none;
  stroke: #fff;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none;
}
:is(.locationPickerDialog, .tripMiniMap)
  .locationPickerRoute
  polyline:not(.locationPickerCasing):not(.locationPickerConnector) {
  stroke: var(--soub-navy);
  stroke-width: 5;
  filter: none;
}
.locationPickerRoute .locationPickerChevrons path {
  fill: none;
  stroke: var(--soub-orange);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.locationPickerRoute polyline.locationPickerConnector {
  fill: none;
  stroke: var(--soub-navy);
  stroke-width: 2.5;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
  filter: none;
}
/* The car: a blue navigation arrow in a soft halo, turned with the direction of travel. */
:is(.locationPickerDialog, .tripMiniMap) .locationPickerCar {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: rgba(7, 94, 229, 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
/* Glide only on a live update, never while the map is dragged. */
:is(.locationPickerDialog, .tripMiniMap) .locationPickerCar.isGliding {
  transition:
    left 0.8s ease,
    top 0.8s ease;
}
:is(.locationPickerDialog, .tripMiniMap) .locationPickerCar svg {
  width: 28px;
  height: 28px;
  transform: rotate(0deg);
  transition: transform 0.8s ease;
  fill: #075ee5;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(18, 50, 74, 0.4));
}
@media (prefers-reduced-motion: reduce) {
  .locationPickerDialog .locationPickerCar,
  .locationPickerDialog .locationPickerCar svg {
    transition: none;
  }
}
.liveLocation .liveMapButton {
  width: 100%;
  margin-block: 6px;
}

/* V99 · Alternating lists (owner request): light, darker, light… so each request card
   and each offer stands apart from the next. Closed cards keep their grey style. */
#cards > article.card:nth-child(even of article.card):not(.cardClosed) {
  background: var(--soub-zebra);
}
dialog .offer:nth-child(even of .offer):not(.requesterFocusedOffer) {
  background: var(--soub-zebra);
}
dialog .offer:nth-child(odd of .offer):not(.requesterFocusedOffer) {
  background: var(--soub-surface);
}

/* V99 · Home: a house icon on the home button, and the SOUB logo itself goes home. */
#switchRole .roleSwitchIcon svg path {
  fill: none;
  stroke: var(--soub-navy);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#switchRole .roleSwitchIcon .homeIconRoof {
  stroke: var(--soub-orange-strong);
}
html[data-theme='night'] #switchRole .roleSwitchIcon .homeIconBody {
  stroke: #e8eef3;
}
html[data-theme='night'] #switchRole .roleSwitchIcon .homeIconRoof {
  stroke: #ff9b5c;
}
body > header .brand[role='button'] {
  cursor: pointer;
  border-radius: var(--soub-radius-sm);
}
body > header .brand[role='button']:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--soub-orange) 70%, white);
  outline-offset: 3px;
}

/* V99 · Night mode readability (owner request). Found by a contrast scan of the main
   screens; each rule brings text to at least 4.5:1 against its real background. */
html[data-theme='night'] {
  --soub-night-text: #e8eef3;
  --soub-night-muted: #a9b8c8;
  --soub-night-link: #8cc2ff;
  --soub-night-accent: #ffa36b;
}
/* Vehicle form: boxes that stayed white or pale. */
html[data-theme='night'] #carrierDialog #carrierForm .fleetEditor,
html[data-theme='night'] #carrierDialog #carrierForm .fleetEditor label.full,
html[data-theme='night'] #carrierDialog #carrierForm .fleetEditor input[type='file'] {
  background: var(--soub-surface);
  color: var(--soub-night-text);
}
html[data-theme='night'] #carrierDialog #carrierForm .fleetEditor :is(h3, label) {
  color: var(--soub-night-text);
}
html[data-theme='night'] #carrierDialog #carrierForm .soubSteps {
  background: #18324a;
  color: var(--soub-night-text);
  border-color: #2a4a63;
}
html[data-theme='night']
  #carrierDialog
  #carrierForm
  :is(.vehicleMapSetup small, label > small, .serviceCities > p) {
  color: var(--soub-night-muted);
}
html[data-theme='night'] #carrierDialog #carrierForm #addFleetVehicle {
  color: var(--soub-night-link);
  background: #18324a;
}
/* Offer photo button in the details. */
html[data-theme='night'] dialog .offer .carrierThumbnail {
  background: #182937;
  color: var(--soub-night-text);
}
html[data-theme='night'] dialog .offer .carrierThumbnail small {
  color: var(--soub-night-muted);
}
/* Text buttons and small notes in dialogs and forms. */
html[data-theme='night'] .routeTextButton {
  color: var(--soub-night-accent);
}
html[data-theme='night'] :is(#requestLocationStatus, #requestDropoffStatus, form .fields label.full > small) {
  color: var(--soub-night-muted);
}
html[data-theme='night'] details.soubV88Contact > summary {
  color: var(--soub-night-link);
}
/* Carrier home figures. */
html[data-theme='night'] .miniStat b {
  color: var(--soub-night-link);
}
/* Notifications. */
html[data-theme='night'] .notificationItem strong {
  color: var(--soub-night-text);
}
html[data-theme='night'] .notificationItem .notificationAction {
  color: var(--soub-night-link);
}
/* Landing: white text on the orange «طلب ناقل» card, with a deeper orange behind it. */
html[data-theme='night'] .designLanding .requestChoice {
  background: linear-gradient(110deg, #d9480f, #b93d0c);
}
html[data-theme='night'] .designLanding .requestChoice :is(.serviceCopy b, .serviceCopy small) {
  color: #fff;
}
/* Night: experience.css paints every card one colour with !important; the alternating
   step and the closed (inactive) look must win over it. */
html[data-theme='night'] #cards > article.card:nth-child(even of article.card):not(.cardClosed) {
  background: var(--soub-zebra) !important;
}
html[data-theme='night'] #cards > article.card.cardClosed {
  background: #0f1a24 !important;
}

/* V99 · Agreement chat: the open details keep a visible way back to the chat. */
#detailsDialog.soubAgreementChat .soubDealMore[open] > summary {
  position: sticky;
  top: -8px;
  z-index: 4;
  margin: -8px -10px 6px;
  padding: 10px 12px;
  background: var(--soub-navy);
  color: #fff;
  border-radius: 10px;
  justify-content: center;
}
#detailsDialog.soubAgreementChat .soubDealFooter > .soubDealWait {
  flex: 1 1 auto;
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--soub-radius-sm);
  background: var(--soub-teal-tint);
  color: #0d5c55;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}
html[data-theme='night'] #detailsDialog.soubAgreementChat .soubDealFooter > .soubDealWait {
  color: #9fe7dd;
}
/* Carrier: navigation to the exact points. */
.liveLocation .tripNavigation {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.liveLocation .tripNavigation .navigateButton {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: var(--soub-radius);
  font-weight: 700;
  text-decoration: none;
}
.liveLocation .tripNavigation .navigateButton.primary {
  background: var(--soub-navy);
  color: #fff;
}
.liveLocation .tripNavigation .navigateButton.outline {
  background: var(--soub-surface);
  color: var(--soub-navy);
  border: 1.5px solid var(--soub-navy);
}
.liveLocation .tripNavigation small {
  color: var(--soub-muted);
  text-align: center;
}
html[data-theme='night'] .liveLocation .tripNavigation .navigateButton.primary {
  background: #2f6fd6;
}
html[data-theme='night'] .liveLocation .tripNavigation .navigateButton.outline {
  color: #e8eef3;
  border-color: #8cc2ff;
}

/* V99 · Night mode in the agreement chat (owner screenshots + contrast scan). */
html[data-theme='night'] #detailsDialog.soubAgreementChat {
  --deal-text: #e8eef3;
  --deal-muted: #a9b8c8;
}
html[data-theme='night'] #detailsDialog .soubDealRoute strong {
  color: var(--deal-text);
}
html[data-theme='night'] #detailsDialog .soubDealPrice strong {
  color: #7be0a8;
}
html[data-theme='night'] #detailsDialog :is(.soubDealHint, .soubDealPrice small, .soubDealRoute small) {
  color: var(--deal-muted);
}
/* Trip stages. */
html[data-theme='night'] .tripTimeline li {
  color: #e8eef3;
}
html[data-theme='night'] .tripTimeline li > span {
  color: #e8eef3;
  background: #2a3b4a;
}
html[data-theme='night'] .tripTimeline li.done > span {
  color: #fff;
  background: #0f7f74;
}
html[data-theme='night'] .tripTimeline li.current > span {
  color: #fff;
  background: #c2410c;
}
/* Chat: a dark wall, blue bubbles for my messages, readable names and times. */
html[data-theme='night'] #detailsDialog.soubAgreementChat .messageThread > .messageList {
  background-color: #0f1a24 !important;
}
html[data-theme='night'] #detailsDialog .messageList article.mineMessage {
  background: #1e4a73 !important;
  color: var(--deal-text, #e8eef3);
}
html[data-theme='night'] #detailsDialog .messageList article.otherMessage {
  background: #22344a !important;
  color: var(--deal-text, #e8eef3);
}
html[data-theme='night'] #detailsDialog .messageList article > b,
html[data-theme='night'] #detailsDialog .messageList article > b span {
  color: #8cc2ff;
}
html[data-theme='night'] #detailsDialog .messageList article > time {
  color: #b5c3d1;
}
html[data-theme='night'] #detailsDialog.soubAgreementChat form#agreementMessageForm {
  background: var(--soub-surface) !important;
}
html[data-theme='night']
  #detailsDialog
  form#agreementMessageForm
  :is(.imageComposer, .voiceComposer)
  button.outline {
  background: #1d3142 !important;
  color: #e8eef3;
  border-color: #2a4a63;
}
/* The details panel. */
html[data-theme='night'] #detailsDialog.soubAgreementChat .soubDealMore {
  background: var(--soub-surface) !important;
  border-color: var(--soub-line);
  color: var(--deal-text);
}
html[data-theme='night'] #detailsDialog.soubAgreementChat .soubDealMore > summary {
  color: #8cc2ff;
}
html[data-theme='night'] #detailsDialog.soubAgreementChat .soubDealMore[open] > summary {
  background: #2f6fd6;
  color: #fff;
}
html[data-theme='night'] #detailsDialog.soubAgreementChat .soubDealMore :is(h2, p, small, .ratingSummary) {
  color: var(--deal-text);
}
html[data-theme='night'] .documentationEmphasis {
  color: #ff8a9a !important;
}
/* Card badge «جاري التوصيل». */
html[data-theme='night'] .deliveryProgress,
html[data-theme='night'] .deliveryProgress .deliveryArrow {
  color: #f0b37e;
}
html[data-theme='night'] #detailsDialog.soubAgreementChat > .dialoghead > h2 {
  color: var(--deal-muted);
}

/* V99 · «الأجهزة المسجلة» in the account page. */
#accountSurface .deviceList {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--soub-line);
}
#accountSurface .deviceList h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
#accountSurface .deviceList ul {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}
#accountSurface .deviceList li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--soub-surface);
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius);
}
#accountSurface .deviceList li.currentDevice {
  border-color: var(--soub-teal);
  background: var(--soub-teal-tint);
}
#accountSurface .deviceList li > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
#accountSurface .deviceList .thisDevice {
  justify-self: start;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--soub-teal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
#accountSurface .deviceList small {
  color: var(--soub-muted);
}
#accountSurface .deviceList li button {
  min-height: 40px;
}
html[data-theme='night'] #accountSurface .deviceList li.currentDevice {
  background: #12302e;
}
html[data-theme='night'] #accountSurface .deviceList .thisDevice {
  background: #0f7f74;
}
html[data-theme='night'] #accountSurface .deviceList small {
  color: #a9b8c8;
}

/* V99 · Trip map inside the agreement: always visible, tap to open the full map. */
.tripMiniMap {
  position: relative;
  height: 190px;
  margin: 8px 0;
  overflow: hidden;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius);
  background: #e8edf2;
  cursor: pointer;
  flex: 0 0 auto;
}
.tripMiniMap:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--soub-orange) 70%, white);
  outline-offset: 2px;
}
.tripMiniMap .tripMiniCanvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.tripMiniMap :is(.locationPickerEndpoint, .locationPickerCar) {
  position: absolute;
}
.tripMiniMap .tripMiniHint {
  position: absolute;
  inset-inline-end: 8px;
  top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(18, 50, 74, 0.86);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.tripMiniMap .tripMiniCredit {
  position: absolute;
  inset-inline-start: 4px;
  bottom: 2px;
  padding: 0 4px;
  background: rgba(255, 255, 255, 0.8);
  color: #333;
  font-size: 10px;
  direction: ltr;
}

/* V99 · Bottom tab bar (owner request): phones only, thumb reach, icon + word. */
#bottomNav {
  display: none;
}
@media (max-width: 760px) {
  body.hasBottomNav #bottomNav:not([hidden]) {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: end;
    gap: 2px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--soub-surface);
    border-top: 1px solid var(--soub-line);
    box-shadow: 0 -6px 18px rgba(18, 50, 74, 0.08);
  }
  /* The top row of links moves down here; logo, bell, language and theme stay up. */
  body.hasBottomNav > header > nav {
    display: none !important;
  }
  body.hasBottomNav main {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  /* Out of the way while typing or while a window is open. */
  body.hasBottomNav.isTyping #bottomNav,
  body.hasBottomNav:has(dialog[open]) #bottomNav {
    display: none !important;
  }
  #bottomNav > button {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 2px;
    min-width: 0;
    min-height: 54px;
    padding: 4px 2px;
    margin: 0;
    background: none;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
    color: var(--soub-muted);
    font: inherit;
    cursor: pointer;
  }
  #bottomNav .bottomNavIcon {
    position: relative;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
  }
  #bottomNav svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  #bottomNav .bottomNavLabel {
    max-width: 100%;
    overflow: hidden;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #bottomNav > button.isActive {
    color: var(--soub-orange-strong);
  }
  #bottomNav > button.isActive .bottomNavLabel {
    font-weight: 800;
  }
  /* The middle action: a raised round button in SOUB orange (green when shown on the map). */
  #bottomNav > button.bottomNavCenter .bottomNavIcon {
    width: 52px;
    height: 52px;
    margin-top: -24px;
    border: 4px solid var(--soub-surface);
    border-radius: 50%;
    background: var(--soub-orange-strong);
    color: #fff;
    box-shadow: 0 6px 14px rgba(217, 72, 15, 0.35);
  }
  #bottomNav > button.bottomNavCenter.isOn .bottomNavIcon {
    background: #138a5b;
    box-shadow: 0 6px 14px rgba(19, 138, 91, 0.35);
  }
  #bottomNav > button.bottomNavCenter {
    color: var(--soub-navy);
  }
  #bottomNav .bottomNavBadge {
    position: absolute;
    top: -4px;
    inset-inline-end: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #d92f2f;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
  }
  #bottomNav > button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--soub-orange) 70%, white);
    outline-offset: -2px;
  }
  /* «طلب جديد» choices above the bar. */
  #bottomNav .bottomNavSheet:not([hidden]) {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    display: grid;
    gap: 8px;
    width: min(260px, calc(100vw - 32px));
    padding: 10px;
    transform: translateX(-50%);
    background: var(--soub-surface);
    border: 1px solid var(--soub-line);
    border-radius: var(--soub-radius-lg);
    box-shadow: var(--soub-shadow-lift);
  }
  #bottomNav .bottomNavSheet button {
    min-height: 48px;
    border-radius: var(--soub-radius);
    background: var(--soub-orange-tint);
    color: var(--soub-navy);
    border: 1px solid #f7c9a8;
    font-weight: 700;
  }
  html[data-theme='night'] #bottomNav > button {
    color: #a9b8c8;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  html[data-theme='night'] #bottomNav > button.isActive {
    color: #ffa36b;
  }
  html[data-theme='night'] #bottomNav > button.bottomNavCenter {
    color: #e8eef3;
  }
  html[data-theme='night'] #bottomNav .bottomNavSheet button {
    background: #22344a;
    color: #e8eef3;
    border-color: #2a4a63;
  }
}

/* V100 · Phone fixes (owner report). Helpers that are positioned absolutely (the hidden
   native city/date controls) stay inside the scrolling body, so the browser never
   scrolls the dialog frame itself and leaves the form stuck with a blank area. */
dialog > .dialogScrollBody {
  position: relative;
}
/* Readable message under a field that still needs a value. */
.soubFieldProblem {
  display: block;
  margin: 6px 2px 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
.soubFieldProblem::before {
  content: '⚠ ';
}
.soubHasProblem,
.soubHasProblem > .soubV89CityToggle,
.soubHasProblem > .soubDateToggle,
:is(input, select, textarea)[aria-invalid='true'] {
  border-color: #d92f2f !important;
  box-shadow: 0 0 0 3px rgba(217, 47, 47, 0.14) !important;
}
.soubV92CityPicker.soubHasProblem,
.soubDatePicker.soubHasProblem {
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme='night'] .soubFieldProblem {
  color: #ff8a80;
}
@media (max-width: 760px) {
  /* Short messages appear above the bottom bar, not under it. */
  body.hasBottomNav .toast {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    z-index: 45;
  }
}

/* V102 · Ease of use (owner request) ----------------------------------------- */
/* Carrier: opportunities first; fleet, hiring and counters below the list. */
#carrierExtras {
  display: grid;
  gap: 14px;
  margin: 18px 0 8px;
  /* main is a flex column (heading 1 … footer 10): after the list, before the footer. */
  order: 8;
}
#carrierExtras[hidden] {
  display: none;
}
@media (max-width: 760px) {
  /* The «+» in the bottom bar opens both kinds of request; the map search stays. */
  body.hasBottomNav.requesterWorkspace .requestActions :is(#newRequest, #newEquipment) {
    display: none !important;
  }
  /* «فرص النقل / عروضي» are the bottom bar's first two tabs. */
  body.hasBottomNav #carrierOfferTabs {
    display: none !important;
  }
}
/* Requester tabs: one row that scrolls sideways instead of wrapping. */
body.requesterWorkspace #requesterFilters .rqRequesterTabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
body.requesterWorkspace #requesterFilters .rqRequesterTabs::-webkit-scrollbar {
  display: none;
}
body.requesterWorkspace #requesterFilters .rqRequesterTab {
  flex: 0 0 auto !important;
  white-space: nowrap;
}
/* Request details: managing the request comes last, cancelling is quiet. */
.requestManage {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--soub-line);
}
.requestManage h3 {
  margin: 0;
  font-size: 15px;
  color: var(--soub-muted);
}
.requestManage :is(.repeatActions, .editActions) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.requestManage .cancelButton {
  background: none !important;
  border: 1px solid #f0c4c4 !important;
  color: #b42318 !important;
  box-shadow: none !important;
}
.shareRequest {
  min-height: 46px;
  font-weight: 700;
  border-color: #25d366 !important;
  color: #0f7a3d !important;
}
/* Vehicle type from pictures; the native select stays for validation. */
.soubNativeVehicle {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  clip-path: inset(50%) !important;
  pointer-events: none;
}
.vehicleGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.vehicleGrid > button {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  min-height: 92px;
  padding: 6px 4px 8px;
  margin: 0;
  background: var(--soub-surface);
  border: 1.5px solid var(--soub-line);
  border-radius: 12px;
  box-shadow: none;
  color: var(--soub-navy);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}
.vehicleGrid > button img {
  width: 100%;
  height: 52px;
  object-fit: contain;
}
.vehicleGrid .vehicleGridIcon {
  font-size: 30px;
  line-height: 52px;
}
.vehicleGrid > button.isChosen {
  border-color: var(--soub-orange-strong);
  background: var(--soub-orange-tint);
  box-shadow: 0 0 0 3px rgba(217, 72, 15, 0.15);
}
.vehicleGrid.soubHasProblem {
  outline: 2px solid #d92f2f;
  outline-offset: 4px;
  border-radius: 12px;
}
:is(#requestVehiclePreview, #equipmentPreview) {
  display: none !important;
}
html[data-theme='night'] .vehicleGrid > button {
  background: #1b2b3c;
  border-color: #2a4a63;
  color: #e8eef3;
}
html[data-theme='night'] .vehicleGrid > button.isChosen {
  background: #3a2616;
  border-color: #ffa36b;
}
/* One-tap loading point from GPS. */
.hereButton {
  margin-top: 6px;
  border-style: solid !important;
}
/* Offer cards: newcomer badge and completed trips. */
.ratingSummary .newBadge {
  padding: 1px 7px;
  border-radius: 999px;
  background: #e7f6ee;
  color: #0f7a3d;
  font-size: 11.5px;
}
.tripCount {
  display: inline-block;
  margin-inline-start: 6px;
  color: var(--soub-muted);
  font-size: 12px;
  font-weight: 700;
}
/* Unread messages on a conversation. */
.unreadBadge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  margin-inline-start: 4px;
  border-radius: 999px;
  background: #d92f2f;
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}
html[data-theme='night'] .ratingSummary .newBadge {
  background: #173826;
  color: #8be0b0;
}

/* V103 smart delivery check: requester sees whether delivery was confirmed at the spot. */
.deliveryCheck {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1.6;
}
.deliveryCheck.isNear {
  background: #e8f6ee;
  color: #135c33;
}
.deliveryCheck.isAway {
  background: #fff4e0;
  color: #7a4300;
  border: 1px solid #f0c77a;
}
.deliveryCheck q {
  font-weight: 700;
}
html[data-theme='night'] .deliveryCheck.isNear {
  background: #12351f;
  color: #bfeccf;
}
html[data-theme='night'] .deliveryCheck.isAway {
  background: #3a2a0c;
  color: #ffd99a;
  border-color: #7a5a1c;
}

/* V104: request places are fixed once offers arrive. */
.placesLocked {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2, #f4f1ec);
  font-weight: 600;
  line-height: 1.6;
}
.placesLocked small {
  font-weight: 400;
  opacity: 0.85;
}
html[data-theme='night'] .placesLocked {
  background: #22262e;
}

/* V105 · Owner review of the request screens -------------------------------- */
/* Route box: the route button and both map links share one compact row. */
.routeActions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin-top: 10px;
}
.routeActions > .requestPointLinks {
  display: contents;
}
.routeActions > .routeTextButton,
.routeActions > #showSavedTripMap.routeTextButton {
  margin-top: 0;
  min-height: 44px;
}
.routeActions .requestPointLinks .mapPointLink {
  flex: 1 1 0;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 14px;
}
.routeActions .requestPointLinks .mapPointLink small {
  font-size: 11px;
}
.routeEstimate b > span {
  color: var(--soub-muted);
  font-weight: 600;
}
/* Phones: the first letter of a line was clipped at the right edge (1px side padding),
   and «الرئيسية» is already in the bottom tab bar, so the header home button hides
   while that bar is on screen and has a home tab (the carrier bar has none, and the
   button returns when a window hides the bar). */
@media (max-width: 760px) {
  dialog > .dialogScrollBody {
    padding-inline: 10px;
  }
  body.hasBottomNav:has(#bottomNav [data-bottom-tab='home']):not(.isTyping):not(:has(dialog[open])) #switchRole {
    display: none;
  }
}

/* V106 — Agreement chat stays readable when panels sit above it (stages, trip map,
   navigation, live location): the panels keep their size and the window scrolls down
   to a full-height chat, instead of squeezing the messages to a sliver. */
#detailsDialog.soubAgreementChat > .dialogScrollBody {
  overflow-y: auto;
}
#detailsDialog.soubAgreementChat .contact {
  flex: 1 0 auto;
}
#detailsDialog.soubAgreementChat .contact > :not(.messageThread) {
  flex-shrink: 0;
}
#detailsDialog.soubAgreementChat .messageThread {
  flex: 1 0 auto;
  overflow: visible;
}
#detailsDialog.soubAgreementChat .messageThread > .messageList {
  flex-shrink: 0;
  /* overrides the V9x !important rules that let the list collapse to 0 */
  min-height: clamp(220px, 45dvh, 420px) !important;
  max-height: 70dvh !important;
  overscroll-behavior: auto;
}

/* V107 — «المحادثات»: one list of every agreement conversation (owner request). */
#chatsSurface .chatsPanel {
  padding: 10px;
}
.chatList {
  display: grid;
  gap: 8px;
}
.chatRow {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: var(--soub-tap);
  padding: 11px 12px;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius);
  background: var(--soub-surface);
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.chatRow:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--soub-orange) 70%, white);
  outline-offset: 2px;
}
.chatRow.needsYou {
  border-inline-start: 4px solid var(--soub-orange);
}
.chatRow .chatTop,
.chatRow .chatBottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.chatRow .chatRoute {
  color: var(--soub-navy);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chatRow time,
.chatRow .chatWho {
  color: var(--soub-muted);
  font-size: 12px;
}
.chatRow time {
  flex: 0 0 auto;
}
.chatRow .chatLast {
  min-width: 0;
  color: var(--soub-muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chatRow.hasUnread .chatLast {
  color: var(--soub-navy);
  font-weight: 700;
}
.chatRow .chatStage {
  justify-self: start;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--soub-zebra);
  color: var(--soub-muted);
}
.chatRow .chatStage.is-action {
  background: var(--soub-orange-tint);
  color: var(--soub-orange-strong);
}
.chatRow .chatStage.is-live {
  background: var(--soub-teal-tint);
  color: #0f7a70;
}
.chatsDoneTitle {
  margin: 16px 2px 8px;
  color: var(--soub-muted);
  font-size: 14px;
}
.chatListDone .chatRow {
  opacity: 0.85;
}
.chatsNone {
  color: var(--soub-muted);
  text-align: center;
}
html[data-theme='night'] .chatRow .chatRoute,
html[data-theme='night'] .chatRow.hasUnread .chatLast {
  color: var(--soub-night-text);
}
html[data-theme='night'] .chatRow .chatStage.is-action {
  background: #3a2414;
  color: var(--soub-night-accent);
}
html[data-theme='night'] .chatRow .chatStage.is-live {
  color: #7fe0d5;
}

/* V107b — «📞 اتصال» under the agreed price (opens the phone dialer). */
#detailsDialog .soubDealPrice .soubCallButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--soub-teal);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
#detailsDialog .soubDealPrice .soubCallButton:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--soub-teal) 60%, white);
  outline-offset: 2px;
}
html[data-theme='night'] #detailsDialog .soubDealPrice .soubCallButton {
  background: #158a7f;
  color: #fff;
}

/* V108 — Phone header: one tidy row (owner request). Logo · home · language · theme ·
   bell · avatar with the first letter of the name (the full name stays in the button
   for screen readers and in «حسابي»). With the carrier's «٪ العمولة» chip, or before
   sign-in, the account control keeps its own row as before. Presentation only. */
@media (max-width: 720px) {
  html body > header {
    grid-template-columns: auto 1fr repeat(5, auto);
    grid-template-areas:
      'brand . home lang theme bell user'
      'nav nav nav nav nav nav nav';
    gap: 6px;
    min-height: 58px;
    padding: 9px 12px;
    background: var(--soub-surface);
    box-shadow:
      0 1px 0 var(--soub-line),
      0 4px 14px rgba(18, 50, 74, 0.05);
  }
  html body > header:has(.headerCommission),
  html body > header:has(#syncStatus:not([data-initial])) {
    grid-template-areas:
      'brand . home lang theme bell bell'
      'nav nav nav nav nav nav nav'
      'user user user user user user user';
  }
  html body > header .soubWordmark .soubBrandLine > b {
    font-size: 27px;
  }
  html body > header .soubBrandLine {
    min-height: 38px;
  }
  html body > header > .brand.soubBrand {
    height: 38px;
  }
  html body > header > .connectionStatus {
    justify-self: end;
  }
  html body > header:has(.headerCommission) > .connectionStatus,
  html body > header:has(#syncStatus:not([data-initial])) > .connectionStatus {
    justify-self: start;
  }
  html body > header > #switchRole,
  html body > header > .siteLanguageControl,
  html body > header .notificationBell {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    border-color: var(--soub-line);
    background: var(--soub-surface);
    color: var(--soub-navy);
  }
  html body > header > #switchRole .roleSwitchIcon svg,
  html body > header > .siteLanguageControl svg,
  html body > header .notificationBell svg {
    width: 20px;
    height: 20px;
  }
  html body > header > #themeToggle {
    zoom: 0.64;
  }
  html body > header:not(:has(.headerCommission)) #syncStatus[data-initial] {
    position: relative;
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    gap: 0;
    border: 0;
    border-radius: 50%;
    background: var(--soub-navy);
    color: #fff;
    font-size: 0;
    overflow: visible;
  }
  html body > header:not(:has(.headerCommission)) #syncStatus[data-initial] > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  html body > header:not(:has(.headerCommission)) #syncStatus[data-initial]::after {
    content: attr(data-initial);
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
  }
  /* The green «connected» dot becomes a small badge on the avatar. */
  html body > header:not(:has(.headerCommission)) #syncStatus[data-initial]::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--soub-teal);
    border: 2px solid var(--soub-surface);
  }
  html[data-theme='night'] body > header:not(:has(.headerCommission)) #syncStatus[data-initial] {
    background: #2f6fd6;
  }
}
@media (max-width: 374px) {
  html body > header {
    gap: 4px;
    padding-inline: 8px;
  }
  html body > header > #switchRole,
  html body > header > .siteLanguageControl,
  html body > header .notificationBell,
  html body > header:not(:has(.headerCommission)) #syncStatus[data-initial] {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    min-height: 36px;
  }
}
@media (max-width: 374px) {
  html body > header > #themeToggle {
    zoom: 0.56;
  }
}
@media (max-width: 374px) {
  html body > header .soubWordmark .soubBrandLine > b {
    font-size: 23px;
    letter-spacing: 0.5px;
  }
}
@media (max-width: 340px) {
  html body > header {
    gap: 3px;
    padding-inline: 6px;
  }
  html body > header > #switchRole,
  html body > header > .siteLanguageControl,
  html body > header .notificationBell,
  html body > header:not(:has(.headerCommission)) #syncStatus[data-initial] {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 32px;
    min-height: 32px;
  }
  html body > header > #themeToggle {
    zoom: 0.5;
  }
  html body > header .soubWordmark .soubBrandLine > b {
    font-size: 21px;
  }
}
/* V108: older layers give header items left/right margins that only show in English
   (LTR) and pushed the avatar off-screen; the grid gap is the only spacing now, and the
   logo column may shrink rather than widen the page. */
@media (max-width: 720px) {
  html
    body
    > header
    > :is(.brand, #switchRole, .siteLanguageControl, #themeToggle, .notificationArea, .connectionStatus) {
    margin: 0;
  }
  html body > header {
    grid-template-columns: minmax(0, auto) 1fr repeat(5, auto);
  }
  html body > header > .brand.soubBrand {
    min-width: 0;
    overflow: hidden;
  }
}

/* V112 (owner report): the app lock is a full screen with the Soub mark, not a sheet. */
html body dialog#deviceUnlockDialog[open] {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none !important;
  height: 100dvh;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  border-radius: 0 !important;
  background: radial-gradient(120% 70% at 50% 0%, #1d4a6b 0%, #12324a 45%, #0b1f2f 100%);
  color: #fff;
  display: grid;
  place-items: center;
}
#deviceUnlockDialog::backdrop {
  background: #0b1f2f;
}
#deviceUnlockDialog .unlockScreen {
  width: min(360px, 100% - 32px);
  padding: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px), 24px) 0
    max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px), 24px);
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
}
#deviceUnlockDialog .unlockBrand {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font: 700 22px/1 var(--soub-font);
  letter-spacing: 0.02em;
}
#deviceUnlockDialog .unlockBrand svg {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(245, 107, 23, 0.35);
}
#deviceUnlockDialog h2 {
  margin: 0;
  color: #fff;
  font: 700 24px/1.3 var(--soub-font);
}
#deviceUnlockDialog .unlockLead {
  margin: 0 0 22px;
  color: #c3d2df;
  font-size: 15px;
  line-height: 1.7;
}
#deviceUnlockDialog .unlockDevice {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: 600 16px/1.2 var(--soub-font);
  box-shadow: none;
  cursor: pointer;
}
#deviceUnlockDialog .unlockDevice svg {
  width: 84px;
  height: 84px;
  padding: 18px;
  border-radius: 50%;
  background: var(--soub-orange);
  color: #fff;
  box-shadow:
    0 0 0 10px rgba(244, 119, 38, 0.16),
    0 14px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}
#deviceUnlockDialog .unlockDevice:active svg {
  transform: scale(0.94);
}
#deviceUnlockDialog .unlockDevice:disabled {
  opacity: 0.7;
}
#deviceUnlockDialog .unlockDevice:focus-visible svg {
  outline: 3px solid #ffbd21;
  outline-offset: 4px;
}
#deviceUnlockDialog .authError {
  min-height: 1.5em;
  margin: 6px 0 0;
  color: #ffb4a1;
  font-size: 14px;
}
#deviceUnlockDialog .unlockLogout {
  width: auto;
  min-height: var(--soub-tap);
  margin-top: 26px;
  padding: 8px 14px;
  border: 0;
  background: none;
  color: #9fc4e6;
  font: 500 14px/1.4 var(--soub-font);
  text-decoration: underline;
  text-underline-offset: 4px;
  box-shadow: none;
}
#deviceUnlockDialog h2:focus,
#deviceUnlockDialog .unlockDevice:focus-visible {
  outline: none;
}
/* V112 (owner report): tapping the night-mode switch opened the language list. The
   invisible <select> over the globe was 84px wide and covered the neighbouring icons;
   keep it inside the globe's own circle. */
html body header .siteLanguageControl {
  overflow: hidden;
}
html body header .siteLanguageControl select {
  inset: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* V112 (owner report): the account «تسجيل الخروج» link was white on white in night mode. */
html[data-theme='night'] #accountSurface .actions a.outline {
  background: var(--soub-surface);
  color: var(--soub-night-text, #e8eef3);
  border: 1px solid var(--soub-line);
  text-decoration: none;
}
/* V113 (owner request): map visibility is one slim line above the carrier's requests. */
html body .carrierAvailability.carrierAvailabilityLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius);
  background: var(--soub-surface);
  box-shadow: none;
}
.carrierAvailabilityLine > div:first-child {
  display: grid;
  gap: 2px;
}
.carrierAvailabilityLine b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.carrierAvailabilityLine b small {
  color: var(--soub-muted);
  font-weight: 500;
}
.carrierAvailabilityLine #carrierAvailabilityStatus:empty {
  display: none;
}
.carrierAvailabilityLine .availabilityDot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9aa5b1;
  flex: none;
}
.carrierAvailabilityLine.isAvailable .availabilityDot {
  background: #138a5b;
  box-shadow: 0 0 0 4px rgba(19, 138, 91, 0.15);
}
html body .carrierAvailabilityLine .carrierAvailabilityActions {
  display: flex;
  gap: 8px;
  margin: 0;
}
html body .carrierAvailabilityLine .carrierAvailabilityActions button {
  width: auto;
  min-height: 40px;
  padding: 6px 14px;
  font-size: 14px;
}
/* The centre «متاح الآن» switch: grey while hidden, green while shown on the map. */
@media (max-width: 850px) {
  html body #bottomNav > button.bottomNavCenter[data-bottom-tab='available']:not(.isOn) .bottomNavIcon {
    background: #8a97a6;
    box-shadow: 0 6px 14px rgba(60, 72, 88, 0.25);
  }
}
/* «حسابي» → «نشاطي» for carriers (V113). */
.carrierActivity {
  display: grid;
  gap: 16px;
}
.carrierActivity .carrierSignup {
  margin: 0;
}
/* The commission figures were designed on the dark card; keep them on one. */
.carrierActivityCommission {
  padding: 18px;
  border-radius: var(--soub-radius-lg);
  background: var(--soub-navy);
  color: #fff;
}
.carrierActivityCommission h3 {
  margin: 0 0 4px;
  color: #fff;
}
.carrierActivityCommission p {
  margin: 0 0 10px;
  color: #c3d2df;
}
main > .intro[hidden] {
  display: none !important;
}

/* V114: note shown above the opportunities when every vehicle is on a trip. */
html body .carrierBusyNote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 10px;
  padding: 10px 14px;
  border: 1px solid #f3c98f;
  border-radius: var(--soub-radius);
  background: #fff6e8;
  color: #6b4300;
}
html body .carrierBusyNote p {
  flex: 1 1 220px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
html body .carrierBusyNote button {
  width: auto;
  min-height: 40px;
  padding: 6px 14px;
  font-size: 14px;
}
html[data-theme='night'] body .carrierBusyNote {
  border-color: #6b4f1d;
  background: #2b2416;
  color: #f3d9a8;
}

/* V115 (owner request): in «نشاطي» the vehicles come first (older rules give them
   order 2–5), then the month, then the commission card. */
.carrierActivity > .carrierEarnings {
  order: 8;
}
.carrierActivity > .carrierActivityCommission {
  order: 9;
}

/* V118 (owner request): compact «اتفاقاتي» cards for carriers. */
html body #cards .agreementCard {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--soub-line);
  border-radius: var(--soub-radius);
  box-shadow: var(--soub-shadow);
}
html body #cards .agreementCard + .agreementCard {
  margin-top: 10px;
}
html body #cards .agreementCard .agTop {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 10px;
}
html body #cards .agreementCard .agRoute {
  margin: 0;
  color: var(--soub-navy);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}
html body #cards .agreementCard .agArrow {
  color: var(--soub-muted);
  font-weight: 400;
}
html body #cards .agreementCard .agStatus .agreementJourney {
  align-items: flex-end;
  margin: 0;
}
html body #cards .agreementCard .agStatus .agreementStatus {
  font-size: 13px;
}
html body #cards .agreementCard .agMeta {
  margin: 0;
  color: var(--soub-muted);
  font-size: 14px;
  line-height: 1.5;
}
html body #cards .agreementCard .agDeal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--soub-radius-sm);
  background: var(--soub-bg);
  font-size: 14px;
}
html body #cards .agreementCard .agDeal b {
  color: var(--soub-navy);
}
html body #cards .agreementCard .agPrice {
  color: var(--soub-orange-strong);
  font-size: 17px;
  white-space: nowrap;
}
html body #cards .agreementCard .agDate {
  margin: -4px 0 0;
  color: var(--soub-muted);
  font-size: 12px;
}
html body #cards .agreementCard > button {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 6px 16px;
  font-size: 15px;
}
html[data-theme='night'] body #cards .agreementCard .agRoute,
html[data-theme='night'] body #cards .agreementCard .agDeal b {
  color: var(--soub-night-text, #e8eef3);
}
html[data-theme='night'] body #cards .agreementCard .agDeal {
  background: rgba(255, 255, 255, 0.05);
}
/* One frame per card: the board around them is dropped here (zebra rows stay, V99). */
html body .board:has(> #cards .agreementCard),
html body .board:has(#cards > .agreementCard) {
  border: 0;
  background: transparent;
  box-shadow: none;
}
html body #cards:has(> .agreementCard) {
  padding: 0;
}
html[data-theme='night'] body #cards .agreementCard > .awaitingApproval {
  border-color: #6b4f1d;
  background: #2b2416;
  color: #f3d9a8;
}

/* V118 (owner request): «الأحدث / الأقرب» for the carrier's requests. */
html body .carrierSort {
  display: inline-flex;
  gap: 0;
  padding: 3px;
  border: 1px solid var(--soub-line);
  border-radius: 999px;
  background: var(--soub-surface);
}
html body .carrierSort[hidden] {
  display: none;
}
html body #carrierSort button {
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 4px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--soub-muted);
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
}
html body #carrierSort button[aria-pressed='true'] {
  background: var(--soub-navy);
  color: #fff;
}
html body #cards .carrierNear {
  margin: 0 0 6px;
  color: var(--soub-orange-strong);
  font-size: 13px;
  font-weight: 700;
}
html body #cards .agreementCard .distanceInfo {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin: -2px 0 0;
  font-size: 13px;
}
html body #cards .agreementCard .distanceInfo small {
  color: var(--soub-muted);
  font-size: 11px;
}
html[data-theme='night'] body #carrierSort button[aria-pressed='true'] {
  background: var(--soub-orange);
  color: #fff;
}

/* V119 (owner request): «حذف حسابي» — quiet link at the end of «حسابي», plain window. */
html body .accountDeleteRow {
  margin: 18px 0 4px;
  text-align: center;
}
html body .accountDeleteRow .accountDeleteLink {
  width: auto;
  min-height: 40px;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--soub-danger);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
}
html body #accountDeleteDialog .accountDeleteBody {
  display: grid;
  gap: 10px;
  padding: 0 4px 4px;
  font-size: 14px;
  line-height: 1.7;
}
html body #accountDeleteDialog .accountDeleteBody p {
  margin: 0;
}
html body #accountDeleteDialog .accountDeleteWarn {
  color: var(--soub-danger);
  font-weight: 700;
}
html body #accountDeleteDialog .accountDeleteSubmit {
  border-color: var(--soub-danger);
  background: var(--soub-danger);
  color: #fff;
}
html body #accountDeleteDialog .accountDeleteSubmit:disabled {
  opacity: 0.45;
}
html[data-theme='night'] body .accountDeleteRow .accountDeleteLink,
html[data-theme='night'] body #accountDeleteDialog .accountDeleteWarn {
  color: #ff8a8a;
}
