/* ============================================================
   Serveo — design tokens + primitives
   Shared by customer-app and driver-app.
   These are DESIGN REFERENCE styles: port the tokens into the
   target codebase's theme, don't ship this file as-is.
   ============================================================ */

:root {
  /* colour */
  --ink:            #151515;
  --ink-70:         rgba(21, 21, 21, .70);
  --ink-55:         rgba(21, 21, 21, .55);
  --ink-42:         rgba(21, 21, 21, .42);
  --ink-35:         rgba(21, 21, 21, .35);
  --line:           rgba(21, 21, 21, .09);
  --line-strong:    rgba(21, 21, 21, .18);
  --brand:          #E8661A;   /* Serveo orange — primary actions, active state */
  --brand-dark:     #C4510F;
  --brand-tint:     #FDF1EA;   /* orange 8% — badges, promo, selected rows */
  --gold:           #D98C0F;   /* single accent: loyalty, ratings, surge */
  --gold-tint:      rgba(217, 140, 15, .20);
  --ok:             #3FBF6F;   /* online pill only */
  --page:           #F4F1EC;   /* desktop canvas behind the phones */
  --bg:             #FBF8F5;   /* app background */
  --surface:        #FFFFFF;
  --map-land:       #EDEFE8;
  --map-block:      #E5E9DC;
  --map-block-warm: #E7E4DB;
  --map-park:       #DCE8D8;
  --map-water:      #D9E6EC;
  --map-road:       #FFFFFF;
  --map-road-mid:   #F1DFB8;

  /* type */
  /* Arial across all five surfaces.

     The stack is not just "Arial": Android ships no Arial at all, and Linux
     ships Liberation Sans, which is metric-compatible with it. Naming those
     explicitly means a layout measured in Arial keeps its measurements
     everywhere rather than reflowing on a phone.

     The Arabic names matter as much. Arial carries Arabic on Windows, macOS
     and iOS, but not on Android, where the system Naskh faces are what render
     Arabic text — without them listed, Arabic falls back to whatever the
     browser picks and the two languages stop matching. */
  --font-ui: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", Roboto,
             "Segoe UI", "Noto Naskh Arabic", "Geeza Pro", "Droid Arabic Naskh",
             "Segoe UI Historic", sans-serif;

  /* Headings were a serif in the supplied designs. Kept as a separate token
     so the brand face can come back by changing one line, rather than by
     hunting through every rule that sets a heading. */
  --font-display: var(--font-ui);

  /* Reference codes, timestamps and figures were monospaced so columns lined
     up. Arial is proportional, so tabular figures are switched on wherever
     this token is used — see the rule below. */
  --font-mono: var(--font-ui);

  /* radius */
  --r-sm: 8px;  --r-md: 12px;  --r-lg: 14px;  --r-xl: 15px;  --r-2xl: 20px;  --r-pill: 999px;

  /* spacing scale (px) — 4 / 6 / 8 / 10 / 12 / 14 / 16 / 18 / 20 / 24 / 26 */
  --gap-1: 4px; --gap-2: 8px; --gap-3: 12px; --gap-4: 16px; --gap-5: 20px; --gap-6: 24px;

  /* elevation */
  --sh-card:  0 1px 3px rgba(0, 0, 0, .05);
  --sh-brand: 0 10px 26px rgba(192, 39, 45, .26);
  --sh-float: 0 6px 18px rgba(0, 0, 0, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }

/* ---------- desktop scaffolding (prototype only) ---------- */
.stage { padding: 40px; display: flex; flex-direction: column; gap: 20px; align-items: center; }
.stage-head { width: 402px; display: flex; flex-direction: column; gap: 10px; }
.stage-head img { height: 22px; width: 69px; }
.stage-head h1 { margin: 0; font: 400 26px/1.15 var(--font-display); }
.stage-head p { margin: 0; font: 400 12.5px/1.6 var(--font-ui); color: var(--ink-55); }

/* ---------- device frame (prototype only) ---------- */
.phone {
  position: relative; width: 402px; height: 874px; flex: none;
  background: var(--bg); border-radius: 54px; overflow: hidden;
  box-shadow: 0 0 0 11px #1b1b1d, 0 0 0 13px #3a3a3d, 0 30px 60px rgba(0, 0, 0, .22);
}
.phone__notch { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 126px; height: 37px; border-radius: 24px; background: #000; z-index: 50; }
.phone__status { position: absolute; top: 0; left: 0; right: 0; height: 54px; z-index: 40; display: flex; align-items: center; justify-content: space-between; padding: 20px 30px 0; font: 700 15px/1 var(--font-ui); pointer-events: none; }
.phone__status.on-dark { color: #fff; }
.phone__home { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 139px; height: 5px; border-radius: 100px; background: rgba(0, 0, 0, .25); z-index: 60; pointer-events: none; }
.phone__home.on-dark { background: rgba(255, 255, 255, .7); }
.phone__viewport { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; }
.phone__viewport::-webkit-scrollbar { width: 0; }

/* ---------- screens ---------- */
.screen { display: none; min-height: 100%; flex-direction: column; background: var(--bg); }
.screen.is-active { display: flex; }

.appbar { padding: 60px 20px 14px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; }
.appbar--dark { background: var(--ink); border-bottom: 0; }
.appbar__back { font: 600 20px/1 var(--font-ui); }
.appbar__title { font: 700 16px/1.1 var(--font-ui); }
.appbar__sub { margin-top: 3px; font: 400 11px/1.3 var(--font-ui); color: var(--ink-55); }
.appbar__logo { height: 15px; width: 47px; margin-left: auto; }

.eyebrow { font: 600 9.5px/1 var(--font-mono); letter-spacing: .1em; color: var(--ink-42); text-transform: uppercase; }
.eyebrow--light { color: rgba(255, 255, 255, .45); }
.display { font: 400 25px/1.15 var(--font-display); color: var(--ink); }
.display--lg { font-size: 30px; }
.h2 { font: 700 15px/1 var(--font-ui); }
.h3 { font: 700 13px/1 var(--font-ui); }
.body { font: 400 12.5px/1.5 var(--font-ui); color: var(--ink-55); text-wrap: pretty; }
.small { font: 400 10.5px/1.35 var(--font-ui); color: var(--ink-55); }
.pad { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.spacer { height: 24px; }
.grow { flex: 1; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 15px; display: flex; flex-direction: column; gap: 11px; }
.card--dark { background: var(--ink); border-color: transparent; color: #fff; }
.card--tint { background: var(--brand-tint); border-color: rgba(192, 39, 45, .16); }
.card--dashed { border-style: dashed; border-color: var(--line-strong); }
.card--flat { padding: 14px; gap: 0; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row__k { font: 500 11.5px/1 var(--font-ui); color: var(--ink-55); }
.row__v { font: 600 11.5px/1 var(--font-ui); white-space: nowrap; }
.rule { height: 1px; background: var(--line); }

.stat { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 15px; }
.stat__v { margin-top: 8px; font: 700 19px/1 var(--font-ui); }

.thumb { border-radius: var(--r-md); border: 1px solid var(--line); background: repeating-linear-gradient(135deg, #F1EAE2 0 6px, #EAE0D6 6px 12px); display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px; font: 500 7.5px/1.2 var(--font-mono); color: var(--ink-42); white-space: pre-line; }
.thumb--78 { width: 78px; height: 78px; flex: none; }
.thumb--52 { width: 52px; height: 52px; flex: none; border-radius: 10px; }
.thumb--44 { width: 44px; height: 44px; flex: none; border-radius: 50%; }
.thumb--hero { height: 250px; border: 0; border-radius: 0; font-size: 10px; }

.btn { display: block; width: 100%; padding: 16px; border-radius: 13px; text-align: center; font: 700 14px/1 var(--font-ui); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--sh-brand); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--ghost { background: var(--surface); border: 1px solid var(--line); }
.btn--quiet { background: none; color: var(--ink-42); font-weight: 600; font-size: 12px; padding: 10px; }
.btn:disabled, .btn.is-disabled { background: rgba(21, 21, 21, .14); box-shadow: none; color: #fff; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; }

.bottombar { position: sticky; bottom: 0; margin-top: auto; padding: 14px 20px 30px; background: var(--surface); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }

.tabbar { position: sticky; bottom: 0; margin-top: auto; display: grid; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 8px 30px; }
.tabbar--4 { grid-template-columns: repeat(4, 1fr); }
.tabbar--3 { grid-template-columns: repeat(3, 1fr); }
.tabbar--5 { grid-template-columns: repeat(5, 1fr); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--ink-35); }
.tab span { font: 600 10px/1 var(--font-ui); }
.tab.is-active { color: var(--brand); }
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.chip { flex: none; padding: 9px 14px; border-radius: var(--r-pill); font: 600 12px/1 var(--font-ui); border: 1px solid var(--line); background: var(--surface); color: var(--ink-70); white-space: nowrap; }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-row { display: flex; gap: 8px; padding: 14px 20px; overflow-x: auto; background: var(--surface); border-bottom: 1px solid var(--line); }

.opt { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); }
.opt.is-on { border-color: var(--brand); background: var(--brand-tint); }
.opt__radio { width: 17px; height: 17px; border-radius: 50%; border: 1.8px solid rgba(21, 21, 21, .22); flex: none; display: flex; align-items: center; justify-content: center; }
.opt.is-on .opt__radio { border-color: var(--brand); }
.opt__radio i { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.opt.is-on .opt__radio i { background: var(--brand); }
.opt__check { width: 18px; height: 18px; border-radius: 6px; border: 1.8px solid rgba(21, 21, 21, .22); flex: none; display: flex; align-items: center; justify-content: center; font: 700 11px/1 var(--font-ui); color: transparent; }
.opt.is-on .opt__check { border-color: var(--brand); background: var(--brand); color: #fff; }
.opt__t { font: 600 12.5px/1.2 var(--font-ui); }
.opt__d { margin-top: 4px; font: 400 10.5px/1.3 var(--font-ui); color: var(--ink-55); }
.opt__meta { margin-left: auto; font: 600 12px/1 var(--font-ui); color: var(--ink-70); }
.opt--pill { justify-content: center; padding: 11px 6px; text-align: center; font: 600 11.5px/1 var(--font-ui); }
.opt-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.opt-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opt-stack { display: flex; flex-direction: column; gap: 8px; }

.badge { font: 700 8.5px/1 var(--font-ui); letter-spacing: .06em; padding: 4px 6px; border-radius: 4px; background: var(--brand-tint); color: var(--brand); }
.badge--gold { background: var(--gold-tint); color: var(--gold); }
.badge--dark { background: rgba(255, 255, 255, .09); color: #fff; }

.switch { width: 40px; height: 23px; border-radius: var(--r-pill); background: rgba(21, 21, 21, .16); position: relative; flex: none; }
.switch i { position: absolute; top: 2.5px; left: 2.5px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .18s ease; }
.switch.is-on { background: var(--ink); }
.switch.is-on i { left: 19px; }
.switch.is-on--brand { background: var(--brand); }

.progress { height: 5px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .16); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--gold); border-radius: var(--r-pill); }
.progress--light { background: #F0EBE4; height: 7px; }
.progress--light i { background: var(--brand); }

/* menu / list rows */
.dish { display: flex; gap: 13px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); }
.dish__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dish__name { font: 700 14px/1.2 var(--font-ui); }
.dish__desc { font: 400 11.5px/1.4 var(--font-ui); color: var(--ink-55); }
.dish__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.dish__price { font: 700 13.5px/1 var(--font-ui); }
.dish__add { padding: 7px 13px; border-radius: 9px; background: var(--brand-tint); font: 700 11px/1 var(--font-ui); color: var(--brand); }

.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 30px; height: 30px; border-radius: 9px; background: var(--page); display: flex; align-items: center; justify-content: center; font: 600 16px/1 var(--font-ui); }
.stepper button.is-primary { background: var(--ink); color: #fff; }
.stepper__v { font: 700 15px/1 var(--font-ui); min-width: 16px; text-align: center; }

/* timeline */
.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 13px; }
.step__rail { display: flex; flex-direction: column; align-items: center; width: 18px; flex: none; }
.step__dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid rgba(21, 21, 21, .18); }
.step__line { flex: 1; width: 2px; min-height: 26px; background: var(--line); }
.step__t { font: 600 12.5px/1.2 var(--font-ui); color: var(--ink-35); }
.step__d { margin-top: 3px; font: 400 10.5px/1.3 var(--font-ui); color: var(--ink-42); }
.step__body { padding-bottom: 14px; }
.step.is-done .step__dot { background: var(--brand); border-color: var(--brand); }
.step.is-done .step__line { background: rgba(192, 39, 45, .35); }
.step.is-done .step__t { color: var(--ink); }

/* map — replace with a real SDK (Mapbox / Google Maps / MapKit) in production.
   Layer order: land > blocks/park/water > road casings > route > markers > labels > controls */
.map { position: relative; background: var(--map-land); overflow: hidden; }
.map--tracking { height: 290px; }
.map--nav { height: 340px; }
.map--nav-drop { height: 300px; }
.map--inset { height: 190px; border-radius: var(--r-xl); }
.map__block, .map__park, .map__water, .map__road, .map__route, .map__heat { position: absolute; }
.map__block { background: var(--map-block); border-radius: 8px; }
.map__block--warm { background: var(--map-block-warm); }
.map__park { background: var(--map-park); border-radius: 10px; }
.map__water { background: var(--map-water); }
.map__road { background: var(--map-road); box-shadow: 0 0 0 1px rgba(21, 21, 21, .07); }
.map__road--minor { height: 7px; box-shadow: none; opacity: .95; }
.map__road-mid { position: absolute; height: 2px; background: var(--map-road-mid); }
.map__route { height: 7px; border-radius: 9px; background: var(--brand); box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.map__heat { border-radius: 50%; background: radial-gradient(circle, rgba(192, 39, 45, .34) 0%, rgba(192, 39, 45, .14) 55%, rgba(192, 39, 45, 0) 72%); }
.map__heat--gold { background: radial-gradient(circle, rgba(217, 140, 15, .28) 0%, rgba(217, 140, 15, .10) 55%, rgba(217, 140, 15, 0) 72%); }
.map__pin { position: absolute; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.map__pin--kitchen { width: 26px; height: 26px; background: var(--ink); }
.map__pin--drop { width: 26px; height: 26px; background: var(--brand); }
.map__pin svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map__rider { position: absolute; width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); box-shadow: 0 8px 18px rgba(0, 0, 0, .22); display: flex; align-items: center; justify-content: center; transition: left .9s ease, top .9s ease; }
.map__rider svg { width: 21px; height: 21px; fill: none; stroke: var(--brand); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.map__label { position: absolute; font: 600 9px/1 var(--font-ui); letter-spacing: .04em; color: var(--ink-42); }
.map__label--faint { color: rgba(21, 21, 21, .34); }
.map__controls { position: absolute; right: 14px; top: 58px; display: flex; flex-direction: column; gap: 8px; }
.map__ctrl { width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .95); box-shadow: var(--sh-float); display: flex; align-items: center; justify-content: center; }
.map__ctrl svg { width: 17px; height: 17px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; }
.map__scale { position: absolute; right: 14px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font: 600 8px/1 var(--font-ui); color: rgba(21, 21, 21, .45); }
.map__scale i { width: 44px; height: 4px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.map__banner { position: absolute; left: 16px; bottom: 14px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 11px; background: rgba(21, 21, 21, .92); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); color: #fff; font: 700 10.5px/1 var(--font-ui); }
.map__banner svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map__card { position: absolute; left: 20px; top: 58px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255, 255, 255, .95); box-shadow: var(--sh-float); }
.map__overlay-pill { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; }

/* sheet that overlaps a hero/map */
.sheet { margin-top: -20px; border-radius: var(--r-2xl) var(--r-2xl) 0 0; background: var(--bg); padding: 20px; display: flex; flex-direction: column; gap: 16px; position: relative; }

.floating-cart { position: sticky; bottom: 74px; margin: 0 20px 10px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: space-between; font: 700 13px/1 var(--font-ui); box-shadow: 0 10px 26px rgba(192, 39, 45, .28); }
.floating-cart--bare { bottom: 14px; margin-bottom: 0; }

.otp { display: flex; gap: 10px; justify-content: center; }
.otp__box { width: 54px; height: 64px; border-radius: 13px; background: var(--surface); border: 2px solid rgba(21, 21, 21, .14); display: flex; align-items: center; justify-content: center; font: 700 26px/1 var(--font-ui); }
.otp__box.is-next { border-color: var(--brand); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 18px 28px 0; }
.keypad button { height: 52px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font: 600 19px/1 var(--font-ui); }

.ring { width: 104px; height: 104px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--brand) var(--deg, 360deg), rgba(255, 255, 255, .12) 0); }
.ring i { width: 86px; height: 86px; border-radius: 50%; background: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.ring b { font: 700 30px/1 var(--font-ui); }
.ring span { font: 600 9px/1 var(--font-ui); color: rgba(255, 255, 255, .45); }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 96px; }
.bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bars i { display: block; width: 100%; border-radius: 6px 6px 0 0; background: rgba(255, 255, 255, .22); }
.bars i.is-peak { background: var(--brand); }
.bars span { font: 600 9.5px/1 var(--font-ui); color: rgba(255, 255, 255, .45); }

.pulse { animation: royPulse 1.7s infinite; }
@keyframes royPulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }


/* Arial is proportional, so a column of order references or prices no longer
   lines up by itself. Tabular figures restore that without a second typeface:
   every digit takes the same width, and 1 stops being narrower than 8. */
.eyebrow,
.thumb,
.ocard__ref,
.rstat__k,
.online-head__k,
.earn-head__k,
.due__k,
.dest-card__k,
.leg__k,
.ring__u,
.weekbar__l,
.caller__p,
.phone-input,
.track__ref,
.grid td,
.bill__v,
.row__v,
.stat__v,
.hbar__v,
.payrow__v,
.callline__t,
.axis-label {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* The mono token no longer changes the face, so anything that leaned on it
   for a technical look keeps that through letter-spacing instead. */
.eyebrow,
.track__ref,
.console-nav__group {
  letter-spacing: .1em;
}
