:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --text: #1c1b19;
  --muted: #6b6760;
  --line: #e3e0d9;
  --accent: #111111;
  --accent-text: #ffffff;
  --gold: #a07a2c;
  --ok: #1f7a4d;
  --warn: #9a5b00;
  --bad: #b3261e;
  --chip: #efece6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --card: #1c1b1a;
    --text: #f1efea;
    --muted: #a19d95;
    --line: #2f2d2a;
    --accent: #e9c46a;
    --accent-text: #121211;
    --gold: #e9c46a;
    --ok: #5ccf94;
    --warn: #f0b45a;
    --bad: #ff8a80;
    --chip: #2a2826;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }
header {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--card);
}
header .brand { font-weight: 700; letter-spacing: .02em; text-decoration: none; }
header .brand span { color: var(--gold); }
header nav { display: flex; gap: 16px; flex-wrap: wrap; }
header nav a { text-decoration: none; color: var(--muted); }
header nav a[aria-current] { color: var(--text); font-weight: 600; }
main { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
.lede { color: var(--muted); margin: 0 0 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
label { display: block; font-size: .85rem; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: 4px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
textarea { min-height: 70px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: flex-start; color: var(--text); }
.check input { width: auto; margin-top: 4px; }
button, .btn {
  display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
button.ghost, .btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
button.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
button:disabled { opacity: .5; cursor: wait; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.price { font-size: 1.4rem; font-weight: 700; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--chip); font-size: .8rem; }
.status { font-weight: 600; }
.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }
.status.bad { color: var(--bad); }
.notice { padding: 12px 14px; border-radius: 8px; background: var(--chip); margin-bottom: 16px; }
.notice.error { color: var(--bad); }
.notice.warn { background: #fff4dc; color: #6b4300; border: 1px solid #f0c674; }
.notice.alert { background: #fde8e6; color: #8c1d16; border: 2px solid var(--bad); }
.notice.alert a, .notice.warn a { color: inherit; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .notice.warn { background: #3a2c10; color: #f6d48a; border-color: #8a6a1e; }
  .notice.alert { background: #3d1513; color: #ffb4ab; }
}
.doc { border-top: 1px solid var(--line); padding: 10px 0; }
.doc:first-of-type { border-top: 0; }
.doc summary { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.doc summary::-webkit-details-marker { display: none; }
.doc form { margin-top: 10px; }
.star-input { display: flex; gap: 4px; margin: 4px 0 12px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 2.2rem; line-height: 1; color: var(--line); cursor: pointer; padding: 0 2px; }
.star-input:has(input:checked) label { color: var(--gold); }
.star-input label:has(input:checked) ~ label { color: var(--line); }
.star-input label:has(input:focus-visible) { outline: 2px solid var(--gold); border-radius: 4px; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag-input label { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); cursor: pointer; font-size: .85rem; }
.tag-input input { width: auto; margin: 0; }
.tag-input label.good:has(input:checked) { border-color: var(--ok); color: var(--ok); }
.tag-input label.bad:has(input:checked) { border-color: var(--bad); color: var(--bad); }
.stars-inline { color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.stars-big { font-size: 1.6rem; color: var(--gold); margin: 0 0 8px; letter-spacing: 2px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .78rem; font-weight: 600; border: 1px solid var(--line); }
.pill.ok { color: var(--ok); border-color: var(--ok); }
.pill.warn { color: var(--warn); border-color: var(--warn); }
.pill.bad { color: #fff; background: var(--bad); border-color: var(--bad); }
.steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 12px 0 0; }
.steps li { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.steps li.done { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.log { font-size: .85rem; color: var(--muted); padding-left: 18px; margin: 0; }
.empty { text-align: center; color: var(--muted); padding: 32px 16px; }
@media (max-width: 520px) {
  dl.kv { grid-template-columns: 1fr; gap: 0 0; }
  dl.kv dd { margin-bottom: 8px; }
}

.chat {
  position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column;
  background: var(--bg); border-left: 1px solid var(--line);
}
@media (min-width: 720px) {
  .chat { left: auto; width: 420px; box-shadow: -8px 0 24px rgba(0, 0, 0, .12); }
}
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.chat-form { display: flex; gap: 8px; padding: 12px 16px; background: var(--card); border-top: 1px solid var(--line); }
.bubble { max-width: 80%; padding: 8px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-text); border-color: var(--accent); border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble .who { font-size: .75rem; font-weight: 600; color: var(--gold); }
.bubble .time { display: block; font-size: .7rem; opacity: .7; text-align: right; margin-top: 2px; }
.chat-sys { align-self: center; margin: 4px 0; padding: 4px 10px; border-radius: 8px; background: var(--chip); font-size: .8rem; color: var(--muted); text-align: center; }
.btn.wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.seg label { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); cursor: pointer; }
.seg input { width: auto; margin: 0; }
.seg label:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.filled { box-shadow: 0 0 0 2px var(--gold); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .03em; background: var(--bad); color: #fff; }
.reqs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.reqs li { padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); font-size: .8rem; }
.offer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.offer:first-of-type { border-top: 0; }

/* Admin dashboard */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 12px 0 16px; border-bottom: 1px solid var(--line); }
.tabs button { background: transparent; color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 12px; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 8px 0 16px; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg); }
.kpi .k { font-size: .8rem; color: var(--muted); }
.kpi .v { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
h3 { font-size: .95rem; margin: 16px 0 8px; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr[data-job] { cursor: pointer; }
tr[data-job]:hover, tr[data-job]:focus { background: var(--chip); outline: none; }
.city { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
code { font-size: .85em; background: var(--chip); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
body.admin main { max-width: 1180px; }
.doc-review { border-top: 1px solid var(--line); padding: 14px 0; }
.doc-review form { margin-top: 10px; }
.preview img { display: block; max-width: 100%; max-height: 520px; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; }
.qr { display:block; width:220px; height:220px; margin:10px 0; border-radius:8px; background:#fff; padding:6px; }

.site-footer { max-width: 960px; margin: 0 auto; padding: 0 16px 32px; font-size: .8rem; color: var(--muted); }
.site-footer a { color: inherit; }
.receipt { max-width: 720px; }
.receipt table td:last-child, .receipt table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.receipt .total td { font-weight: 700; border-top: 2px solid var(--text); }
@media print {
  header, .site-footer, .no-print, .notice { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 0; }
}

.map { height: 320px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 8px; }
.sharing { display: inline-flex; align-items: center; gap: 6px; }
.sharing::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .sharing::before { animation: none; } }

.stops { margin: 0; padding-left: 18px; }

.badge.early { background: var(--gold); color: #fff; }

.lang-pick { width: auto; padding: 4px 8px; font-size: .85rem; }
[dir="rtl"] .chat .bubble.me { border-bottom-right-radius: 14px; border-bottom-left-radius: 4px; }

/* ── Account tabs: a bar on top on wide screens, an app-style icon bar at the bottom on phones ── */
.acct-head { margin-bottom: 14px; }
.acct-head h1 { font-size: 1.5rem; letter-spacing: -.01em; }
.acct-head .lede { margin-bottom: 0; font-size: .9rem; }
.acct-tabs { display: flex; gap: 4px; margin: 0 0 18px; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  position: sticky; top: 8px; z-index: 20; box-shadow: 0 6px 20px rgba(0, 0, 0, .06); }
.acct-tabs button { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 6px; position: relative;
  background: transparent; color: var(--muted); border: 0; border-radius: 10px; padding: 10px 8px; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.acct-tabs button:hover { color: var(--text); background: var(--chip); }
.acct-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-text); }
.ico { width: 18px; height: 18px; flex: none; }
.tab-badge { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #111; font-size: .7rem; line-height: 18px; text-align: center; }
.tab-badge.warn { background: var(--bad); color: #fff; }
@media (max-width: 700px) {
  main { padding-bottom: 92px; }
  .acct-head .row { display: none; }
  .acct-head h1 { font-size: 1.3rem; }
  .acct-tabs { position: fixed; top: auto; bottom: 0; left: 0; right: 0; margin: 0; border-radius: 16px 16px 0 0; border-width: 1px 0 0;
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom)); gap: 0; box-shadow: 0 -6px 24px rgba(0, 0, 0, .18); }
  .acct-tabs button { flex-direction: column; gap: 3px; padding: 6px 0; font-size: .64rem; font-weight: 600; border-radius: 10px; min-width: 0; }
  .acct-tabs button[aria-selected="true"] { background: transparent; color: var(--gold); }
  .acct-tabs .ico { width: 22px; height: 22px; }
  .acct-tabs .tab-badge { position: absolute; top: 2px; left: calc(50% + 6px); }
}

/* ── The trip under way: time and payout up top, progress, route, one big next step, action tiles ── */
.trip.hero { border: 1px solid var(--gold); box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.trip-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.trip-when { margin: 4px 0 2px; line-height: 1.15; }
.trip-when strong { font-size: 1.9rem; letter-spacing: -.02em; }
.trip-when span { color: var(--muted); margin-left: 4px; }
.trip-pay { text-align: right; }
.trip-pay .price { font-size: 1.6rem; }
.progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; list-style: none; padding: 0; margin: 16px 0 4px; }
.progress li { font-size: .7rem; color: var(--muted); text-align: center; }
.progress li span { display: block; height: 5px; border-radius: 3px; background: var(--line); margin-bottom: 6px; }
.progress li.done span { background: var(--ok); }
.progress li.now span { background: var(--gold); }
.progress li.now { color: var(--text); font-weight: 700; }
.route { list-style: none; padding: 0; margin: 14px 0 0; position: relative; }
.route li { display: flex; gap: 12px; padding: 6px 0; position: relative; }
.route li:not(:last-child)::after { content: ''; position: absolute; left: 5px; top: 22px; bottom: -6px; width: 2px; background: var(--line); }
.route .dot { flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; border: 2px solid var(--muted); background: var(--card); }
.route .dot.a { border-color: var(--gold); background: var(--gold); }
.route .dot.b { border-color: var(--text); }
.trip .actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 6px; }
button.big { flex: 1 1 260px; padding: 16px 20px; font-size: 1.12rem; border-radius: 14px; letter-spacing: .01em; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); }
button.skip { flex: 0 0 auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 12px 0 6px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 6px; min-height: 76px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font-size: .8rem; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; }
.tile:hover { border-color: var(--gold); }
.tile .ico { width: 22px; height: 22px; color: var(--gold); }
.tile.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.tile.primary .ico { color: var(--accent-text); }
.trip .hint { margin: 4px 0 0; }
.trip-map { height: 240px; border-radius: 12px; border: 1px solid var(--line); margin: 12px 0; }
.trip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 14px; }
.panel { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.panel h3 { margin: 0 0 6px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.panel p { margin: 4px 0; }
.big-line { font-size: 1.1rem; }
.trip .foot { margin: 14px 0 0; border-top: 1px solid var(--line); padding-top: 10px; }
.card.compact { cursor: pointer; transition: border-color .15s; }
.card.compact:hover { border-color: var(--gold); }
@media (max-width: 700px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .trip-when strong { font-size: 1.6rem; }
}

/* Big choice cards (account type) */
.choice { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.choice label { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); cursor: pointer; }
.choice input { width: auto; margin-top: 4px; }
.choice small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.choice label:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
fieldset.plain { border: 0; padding: 0; margin: 14px 0 0; }
fieldset.plain legend { font-weight: 600; margin-bottom: 8px; padding: 0; }

/* Messages next to the button that caused them, and text-styled buttons */
.inline-msg { margin: 10px 0 0; font-size: .9rem; }
.inline-msg.ok { color: var(--ok); }
button.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.danger-text { color: var(--bad) !important; }
.report-dialog form label { margin-bottom: 4px; }

/* Help centre */
.help-search { margin: 0 0 12px; font-size: .9rem; }
.help-search input { font-size: 1rem; padding: 12px 14px; }
.help-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.help-toc a { text-decoration: none; }
.help-body { padding: 8px 0 4px; }
.help-body ol, .help-body ul { padding-left: 20px; margin: 6px 0; }
@media (max-width: 700px) {
  .trip-head { flex-wrap: nowrap; }
  .trip-pay .price { font-size: 1.35rem; }
}
.reschedule { margin-top: 12px; } .reschedule label { flex: 1 1 220px; }
.chip.promo { background: var(--gold); color: #111; font-weight: 600; margin-left: 6px; }

/* Offer comparison and job conditions */
.reqs li.rule { border-color: var(--gold); color: var(--gold); font-weight: 600; }
.terms { color: var(--ok); font-weight: 600; margin: 4px 0; }
.badge-best { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 6px; background: var(--ok); color: #fff; font-size: .75rem; font-weight: 700; }
.photos { display: flex; gap: 6px; margin-top: 8px; }
.photos img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.no-contact { padding: 10px 12px; border: 1px solid var(--gold); border-radius: 10px; }
.vehicle-check .calc { margin: 8px 0; align-items: end; }

/* Phone fields: country flag + dial code in front of the number */
.tel-wrap { display: flex; gap: 6px; }
.tel-wrap .dial { flex: 0 0 auto; width: 7.5em; padding-right: 4px; }
.tel-wrap input { flex: 1 1 auto; min-width: 0; }

/* Post form: the no-contact rule, always on */
.seg label.locked { border-color: var(--gold); color: var(--gold); font-weight: 600; cursor: default; }
.seg label.locked input { accent-color: var(--gold); }

/* Download the app */
.nav-dl { font-weight: 700; color: var(--gold) !important; }
.install-sheet { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.install-card { position: relative; width: 100%; max-width: 440px; background: var(--card); color: var(--text); border-radius: 18px; padding: 24px 22px 20px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.4); font-size: 1.02rem; }
.install-card img { border-radius: 14px; }
.install-card h2 { margin: 10px 0 8px; font-size: 1.25rem; }
.install-card ol { text-align: left; padding-left: 22px; line-height: 1.7; }
.install-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--muted); cursor: pointer; }
.install-go { width: 100%; padding: 14px; border-radius: 12px; border: 0; background: var(--gold); color: #111; font: inherit; font-weight: 800; cursor: pointer; margin: 4px 0 6px; }
.ios-share { display: inline-block; border: 1.5px solid currentColor; border-radius: 4px; padding: 0 4px; font-size: .85em; }
@media (min-width: 700px) { .install-sheet { align-items: center; } }
.app-banner { position: fixed; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 900; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--gold); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.app-banner img { border-radius: 10px; }
.app-banner span { flex: 1; min-width: 0; }
.app-banner b, .app-banner small { display: block; }
.app-banner small { color: var(--muted); }
.app-banner .btn { padding: 8px 14px; }
.app-banner-x { background: none; border: 0; font-size: 1.5rem; color: var(--muted); cursor: pointer; }
