/* TVDE+ Driver · app do motorista — dois temas (js/theme.js; menu → Aspeto):
   - Escuro (por omissão): tom intermédio, cinzento-grafite (nem preto, nem branco); mapa noturno
   - Claro: as cores da app do cliente (branco e creme, texto quase preto); mapa diurno
   A apresentação inicial (splash e slides) é sempre escura, como na app do cliente (.theme-dark).
   Mesmas letras, laranja e componentes da app do cliente (client_app/css/app.css). */
:root, .theme-dark {
  color-scheme: dark;
  --bg: #303236;          /* fundo dos ecrãs e painéis (cinzento-grafite) */
  --bg-0: rgba(48, 50, 54, 0); /* o mesmo, transparente (degradês) */
  --surface: #3a3c41;     /* cartões */
  --surface-2: #44474d;   /* campos, botões secundários */
  --surface-3: #50535a;   /* toque / destaque */
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #f6f3ee;        /* creme do site */
  --text-soft: rgba(246, 243, 238, 0.84);
  --muted: rgba(246, 243, 238, 0.64);
  --faint: rgba(246, 243, 238, 0.46);
  --brand: #ff9019;
  --brand-text: #ffad55;  /* laranja legível sobre fundo escuro (textos pequenos) */
  --brand-soft: rgba(255, 144, 25, 0.14);
  --brand-line: rgba(255, 144, 25, 0.28);
  --ok: #34c759;
  --ok-text: #5fe08a;
  --ok-soft: rgba(52, 199, 89, 0.14);
  --warn: #ff9f0a;
  --danger: #ff7268;      /* mais claro que no fundo preto: contraste ≥ 4,5 com o cinzento */
  --danger-soft: rgba(255, 114, 104, 0.16);
  --danger-line: rgba(255, 114, 104, 0.4);
  --info: #6aa8ff;
  --info-soft: rgba(106, 168, 255, 0.14);
  --dest: #ff4b36;
  --pickup: #34c759;      /* recolha: alfinete no mapa (.mk-alf) e bolinha nas listas */
  --timer-red: #e5372b;   /* barra e contador do tempo para aceitar (< 20%), igual nos dois temas */
  /* Peças que mudam com o tema */
  --home-bg: #101012;     /* por trás do mapa (antes de carregar) */
  --map-bg: #09151e;      /* = cor da terra do estilo noturno da HERE: carregar → mapa sem mudança de cor */
  --tile: #26282c;        /* ícones dos alertas */
  --push-bg: rgba(70, 73, 79, 0.95);
  --spin-track: rgba(255, 255, 255, 0.14);
  --spin-head: #ffffff;
  --toast-bg: #f4f1ec;
  --toast-fg: #0b0b0c;
  --pin-label-bg: #ffffff; /* etiquetas "Recolha"/"Destino" no mapa */
  --pin-label-fg: #0b0b0c;
  --scrim: rgba(0, 0, 0, 0.62);
  --behind-dim: 0.4;      /* escurecer o ecrã que fica por trás */
  --shadow-fab: 0 8px 24px -6px rgba(0, 0, 0, 0.6);
  --shadow-panel: 0 -10px 30px -12px rgba(0, 0, 0, 0.7);
  --shadow-card: 0 30px 60px -24px rgba(0, 0, 0, 0.9);
  --shadow-drawer: 20px 0 60px -20px rgba(0, 0, 0, 0.8);
  /* Gráfico dos ganhos (validado: contraste ≥ 3:1 com o cartão e cores bem distintas) */
  --chart-bar: #9fa2a9;
  --chart-today: #ff9019;
  --chart-sel: #e6e3dd;
}
/* Tema claro (as cores da app do cliente) */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-0: rgba(255, 255, 255, 0);
  --surface: #f6f4f0;     /* cartões: creme muito claro */
  --surface-2: #eeebe5;   /* campos (o "cream" do site) */
  --surface-3: #e3dfd7;
  --line: rgba(15, 15, 16, 0.08);
  --line-strong: rgba(15, 15, 16, 0.14);
  --text: #0f0f10;
  --text-soft: #3d3d42;
  --muted: #6b6b72;
  --faint: #8f8b84;
  --brand-text: #8a4a00;
  --brand-soft: #fff1e2;
  --brand-line: #ffd9ae;
  --ok-text: #1e8e4e;
  --ok-soft: #eaf6ee;
  --danger: #c62828;
  --danger-soft: #fdecec;
  --danger-line: rgba(198, 40, 40, 0.3);
  --info: #2f5bd8;
  --info-soft: #eaf0fd;
  --home-bg: #e8ecef;
  --map-bg: #e8ecef;
  --tile: #ffffff;
  --push-bg: rgba(244, 241, 236, 0.96);
  --spin-track: rgba(15, 15, 16, 0.14);
  --spin-head: #0f0f10;
  --toast-bg: #0f0f10;
  --toast-fg: #ffffff;
  --pin-label-bg: #0f0f10;
  --pin-label-fg: #ffffff;
  --scrim: rgba(8, 8, 10, 0.45);
  --behind-dim: 0.18;
  --shadow-fab: 0 8px 24px -6px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-panel: 0 -6px 18px -10px rgba(0, 0, 0, 0.18);
  --shadow-card: 0 24px 50px -24px rgba(0, 0, 0, 0.35);
  --shadow-drawer: 20px 0 60px -20px rgba(0, 0, 0, 0.35);
  --chart-bar: #8a8d94;
  --chart-today: #d96a00;
  --chart-sel: #3d3d42;
}
:root {
  --font: "General Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --dur: 0.44s;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --app-h: 100dvh;
}
/* Dentro da app (BuildNatively) com a "safe area" desativada: mínimos para não ficar por baixo do relógio / Dynamic
   Island nem da barra inicial (classes postas por js/native.js). Teste no computador: ?safe=ios / ios-se / android */
html.is-ios-app { --safe-t: max(env(safe-area-inset-top, 0px), 50px); --safe-b: max(env(safe-area-inset-bottom, 0px), 28px); }
html.is-ios-app.ios-legacy { --safe-t: max(env(safe-area-inset-top, 0px), 22px); --safe-b: max(env(safe-area-inset-bottom, 0px), 10px); }
html.is-android-app { --safe-t: max(env(safe-area-inset-top, 0px), 28px); --safe-b: max(env(safe-area-inset-bottom, 0px), 12px); }
html.kb-up { --kb-safe-b: 0px; }

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; background: var(--bg); }
body {
  position: fixed;
  inset: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input, textarea { -webkit-user-select: text; user-select: text; }
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
input:focus, input:focus-visible, textarea:focus, textarea:focus-visible, select:focus, select:focus-visible { outline: none; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Tipografia ---------- */
.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-text); }
.display { font-size: clamp(36px, 11vw, 46px); font-weight: 600; line-height: 0.98; letter-spacing: -0.045em; }
.headline { margin-top: 10px; font-size: clamp(30px, 8.6vw, 36px); font-weight: 600; line-height: 1.04; letter-spacing: -0.04em; }
.headline-sm { font-size: clamp(26px, 7.4vw, 31px); }
.sub { margin-top: 12px; color: var(--muted); font-size: 16px; }
.sub b { color: var(--text); font-weight: 600; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.link { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }

/* ---------- Botões ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.18s var(--ease), background-color 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}
.btn svg { width: 20px; height: 20px; stroke-width: 2; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.32; cursor: default; }
.btn-block { width: 100%; }
.btn-brand { background: var(--brand); color: #0b0b0c; box-shadow: 0 10px 30px -12px rgba(255, 144, 25, 0.6); }
.btn-light { background: var(--text); color: #0b0b0c; }
.btn-ghost { background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text); }
.btn-plain { color: var(--text-soft); min-height: 48px; }
.btn-accept { background: var(--ok); color: #06210f; box-shadow: 0 10px 30px -12px rgba(52, 199, 89, 0.6); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-line); }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--spin-track);
  border-top-color: var(--spin-head);
  animation: spin 0.7s linear infinite;
}
.btn-brand.is-loading::after, .btn-accept.is-loading::after, .btn-light.is-loading::after { border-color: rgba(11, 11, 12, 0.22); border-top-color: #0b0b0c; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Ecrãs e transições ---------- */
.app { position: absolute; inset: 0 0 auto 0; height: var(--app-h); overflow: hidden; background: var(--bg); }
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  transform: translate3d(100%, 0, 0);
  visibility: hidden;
  transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur), opacity var(--dur) ease;
}
.screen.is-active { transform: none; visibility: visible; transition: transform var(--dur) var(--ease), visibility 0s, opacity var(--dur) ease; z-index: 2; }
.screen.is-behind { transform: translate3d(-28%, 0, 0); z-index: 1; }
.screen::after { content: ""; position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease); }
.screen.is-behind::after { opacity: var(--behind-dim); }
.screen.fade { transform: none !important; opacity: 0; }
.screen.fade.is-active { opacity: 1; }
.screen.screen-up { transform: translate3d(0, 100%, 0); }
.screen.screen-up.is-active { transform: none; z-index: 5; }

.nav { position: relative; flex: none; display: flex; align-items: center; gap: 12px; min-height: calc(var(--safe-t) + 50px); padding: calc(var(--safe-t) + 6px) 12px 0; }
.nav-back { display: grid; place-items: center; width: 44px; height: 44px; margin-right: auto; border-radius: 50%; transition: background-color 0.15s ease; }
.nav-back:active { background: var(--surface-3); }
.nav-back svg { width: 26px; height: 26px; stroke-width: 2; }
.steps { position: absolute; left: 50%; top: calc(var(--safe-t) + 32px); transform: translate(-50%, -50%); display: flex; gap: 6px; }
.steps i { width: 22px; height: 4px; border-radius: 4px; background: var(--line-strong); transition: background-color 0.3s ease; }
.steps i.is-on { background: var(--brand); }

.body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 24px 24px; }
.body-center { display: flex; flex-direction: column; padding-top: calc(var(--safe-t) + 24px); }
.nav:not([hidden]) + .body-center { padding-top: 8px; }
.body-center > :first-child { margin-top: auto; }
.body-center > :last-child { margin-bottom: auto; }
.foot { flex: none; padding: 12px 24px calc(16px + var(--safe-b)); background: linear-gradient(to top, var(--bg) 70%, var(--bg-0)); }
.app.kb-open .foot { padding-bottom: 12px; }
.foot-stack { display: grid; gap: 4px; }

/* ---------- Splash ---------- */
.splash { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.logo { display: block; width: auto; aspect-ratio: 420 / 171; stroke: none; }
.splash-logo { height: 58px; }
.splash-logo .logo-frame { animation: splash-frame 0.9s var(--ease) both; transform-origin: 196px 85px; }
.splash-logo text { animation: splash-in 0.7s var(--ease) 0.1s both; }
.splash-logo .logo-plus { animation: splash-plus 0.8s var(--ease) 0.35s both; transform-origin: 387px 85px; }
@keyframes splash-frame { from { opacity: 0; transform: scaleX(0.6); } }
@keyframes splash-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes splash-plus { from { opacity: 0; transform: rotate(-90deg) scale(0.4); } }
/* Etiqueta "DRIVER" ao lado / por baixo do logótipo */
.driver-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--brand); color: #0b0b0c; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.splash-tag { height: 26px; padding: 0 10px; font-size: 13px; animation: splash-in 0.6s var(--ease) 0.55s both; }

/* ---------- Apresentação ---------- */
.intro {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    radial-gradient(120% 60% at 85% 0%, rgba(255, 144, 25, 0.18), transparent 60%),
    radial-gradient(90% 50% at 0% 35%, rgba(52, 199, 89, 0.10), transparent 65%),
    var(--bg);
}
.intro-top { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 16px) 24px 0; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; }
.intro-logo { height: 30px; }
/* Aviso fixo para passageiros que instalaram a app errada (por cima das páginas da apresentação) */
.rider-alert { flex: none; display: flex; align-items: flex-start; gap: 12px; margin: 16px 24px 0; padding: 12px 14px; border-radius: 18px; background: rgba(255, 144, 25, 0.16); border: 1.5px solid rgba(255, 144, 25, 0.55); color: var(--text); text-align: left; animation: rise 0.5s var(--ease) 0.15s both; transition: transform 0.18s var(--ease); }
.rider-alert:active { transform: scale(0.98); }
.ra-icon { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--brand); color: #0b0b0c; }
.ra-icon svg { width: 20px; height: 20px; stroke-width: 2.2; }
.ra-icon::after { content: ""; position: absolute; inset: -4px; border-radius: 15px; border: 2px solid var(--brand); opacity: 0; animation: ra-ping 2.6s ease-out 0.8s infinite; }
@keyframes ra-ping { 0% { opacity: 0.7; transform: scale(0.85); } 60%, 100% { opacity: 0; transform: scale(1.25); } }
.ra-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ra-txt b { font-size: 15.5px; font-weight: 600; }
.ra-txt i { margin-top: 2px; font-style: normal; font-size: 13.5px; color: var(--text-soft); }
.ra-txt strong { font-weight: 600; color: var(--text); }
.ra-go { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--brand-text); }
.ra-go svg { width: 16px; height: 16px; stroke-width: 2.4; }
.made-in { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.slides { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px 24px 8px; }
.slide .eyebrow { margin-bottom: 14px; color: var(--faint); }
.lead { margin-top: 16px; font-size: 16.5px; line-height: 1.5; color: var(--muted); max-width: 34ch; }
.intro-foot { padding: 18px 24px calc(18px + var(--safe-b)); }
.dots { display: flex; gap: 6px; margin-bottom: 20px; }
.dots i { width: 6px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.22); transition: width 0.35s var(--ease), background-color 0.35s ease; }
.dots i.is-on { width: 22px; background: var(--brand); }
.legal { margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: var(--faint); text-align: center; }
.legal-link { color: var(--text-soft); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; font: inherit; }
.art { position: relative; flex: 1; min-height: 210px; max-height: 340px; margin-bottom: 28px; }
/* Com o aviso "Queres pedir uma viagem?" no topo sobra menos altura: as ilustrações encolhem em ecrãs mais baixos
   e, nos muito baixos (iPhone SE…), saem — fica só o texto */
.art { min-height: 0; } /* o tamanho da ilustração é ajustado à altura livre por js/app.js (fitArt) */
.art.is-hidden > * { visibility: hidden; }
@media (max-height: 780px) { .art { margin-bottom: 16px; } .rider-alert { margin-top: 12px; padding: 10px 12px; } .ra-txt i { font-size: 13px; } }
.dav { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-weight: 600; font-size: 17px; color: #fff; }
.dav-a { background: linear-gradient(135deg, #ff9f3d, #d96a00); }
.dav-lg { width: 76px; height: 76px; font-size: 30px; }
@keyframes rise { from { opacity: 0; translate: 0 18px; } }
@keyframes pop { from { opacity: 0; transform: rotate(-20deg) scale(0.5); } }
@keyframes pop-in { from { opacity: 0; scale: 0.3; } }
/* 1. Recibo: cliente paga − €1 = recebes */
.art-price { display: grid; place-items: center; }
.ticket { display: flex; flex-direction: column; width: min(100%, 290px); padding: 16px 20px 14px; border-radius: 26px; background: linear-gradient(160deg, #46494f, #36383d); border: 1px solid var(--line-strong); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.6); }
.ticket-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ticket-row b { color: var(--text-soft); font-weight: 600; }
.ticket-fee b { color: var(--brand-text); }
.ticket-label { margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line-strong); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.ticket-price { margin-top: 4px; font-size: 50px; font-weight: 600; letter-spacing: -0.05em; line-height: 1; color: #fff; }
.ticket-price small { font-size: 28px; color: rgba(255, 255, 255, 0.6); }
.ticket-foot { margin-top: 10px; font-size: 13px; color: var(--muted); }
.ticket { position: relative; }
.lock { position: absolute; bottom: -18px; right: -14px; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: var(--brand); color: #0b0b0c; box-shadow: 0 16px 40px -10px rgba(255, 144, 25, 0.7); transform: rotate(10deg); }
.lock b { font-size: 21px; font-weight: 700; letter-spacing: -0.03em; }
.slide.is-current .ticket { animation: rise 0.6s var(--ease) both; }
.slide.is-current .lock { animation: pop 0.6s var(--ease) 0.25s both; }
/* 2. Mini pedido de viagem */
.art-offer { display: grid; place-items: center; }
.mini-offer { display: flex; flex-direction: column; gap: 8px; width: min(100%, 300px); padding: 14px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-card); }
.mo-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.mo-top > span:first-child { display: flex; flex-direction: column; }
.mo-top i { font-style: normal; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-text); }
.mo-top b { font-size: 32px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
.mo-rates { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.mo-rates b { font-size: 13.5px; font-weight: 600; letter-spacing: 0; padding: 2px 8px; border-radius: 8px; background: var(--surface-2); }
.mo-stop { display: flex; align-items: center; gap: 10px; }
.mo-stop > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mo-stop b { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mo-stop small { font-size: 12.5px; color: var(--muted); }
.mo-a, .mo-b { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.mo-b { border-radius: 2px; background: var(--dest); }
.mo-bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.mo-bar i { display: block; height: 100%; width: 100%; border-radius: 6px; background: var(--ok); transform-origin: left; }
.slide.is-current .mo-bar i { animation: mo-bar 6s linear infinite; }
@keyframes mo-bar { 0% { transform: scaleX(1); background: var(--ok); } 50% { background: var(--ok); } 51% { background: var(--brand); } 80% { background: var(--brand); } 81% { background: var(--danger); } 100% { transform: scaleX(0); background: var(--danger); } }
.mo-btn { display: grid; place-items: center; height: 38px; border-radius: 999px; background: var(--ok); color: #06210f; font-weight: 600; font-size: 15px; }
.slide.is-current .mini-offer { animation: rise 0.6s var(--ease) both; }
/* 3. Cliente volta a escolher */
.art-again { display: grid; place-items: center; }
.again-ring { position: absolute; width: 230px; height: 230px; border-radius: 50%; border: 1px solid rgba(255, 144, 25, 0.3); animation: ring 3.2s ease-out infinite; }
.again-ring-2 { animation-delay: 1.6s; }
@keyframes ring { from { transform: scale(0.55); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.again-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 28px 20px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-card); }
.again-card b { margin-top: 8px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.again-tag { padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); font-size: 12.5px; font-weight: 600; }
.again-near { margin-top: 2px; font-size: 13px; color: var(--muted); }

/* ---------- Telemóvel, código e campos ---------- */
.phone-field { display: flex; align-items: stretch; margin-top: 28px; height: 64px; border-radius: 18px; background: var(--surface-2); border: 1.5px solid transparent; transition: border-color 0.2s ease, background-color 0.2s ease; }
.phone-field:focus-within { border-color: var(--brand); background: var(--surface); }
.phone-field.is-error { border-color: var(--danger); }
.cc { display: flex; align-items: center; gap: 6px; padding: 0 10px 0 16px; border-right: 1px solid var(--line-strong); font-size: 18px; font-weight: 600; }
.cc-flag { font-size: 22px; line-height: 1; }
.cc svg { width: 18px; height: 18px; color: var(--muted); }
.phone-input { flex: 1; min-width: 0; padding: 0 16px; border: 0; background: transparent; font: 600 21px var(--font); letter-spacing: 0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.phone-input::placeholder { color: var(--faint); font-weight: 500; }
.field-error { min-height: 22px; margin-top: 10px; font-size: 14.5px; color: var(--danger); }
.field-error:empty { min-height: 0; margin: 0; }
.otp { position: relative; display: block; margin-top: 30px; }
.otp-input { position: absolute; inset: 0; width: 100%; opacity: 0; border: 0; font-size: 16px; color: transparent; caret-color: transparent; z-index: 2; }
.otp-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp-cells i { position: relative; display: grid; place-items: center; height: 64px; border-radius: 16px; background: var(--surface-2); border: 1.5px solid transparent; font-style: normal; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.2s var(--ease); }
.otp-cells i.is-filled { background: var(--surface); border-color: var(--line-strong); animation: cell 0.22s var(--ease); }
.otp-cells i.is-caret { border-color: var(--brand); background: var(--surface); }
.otp-cells i.is-caret::after { content: ""; width: 2px; height: 28px; background: var(--brand); animation: blink 1s steps(1) infinite; }
.otp.is-error .otp-cells i { border-color: var(--danger); background: var(--danger-soft); }
.otp.is-ok .otp-cells i { border-color: var(--ok); background: var(--ok-soft); color: var(--ok-text); }
.otp.shake { animation: shake 0.42s ease; }
@keyframes cell { from { transform: scale(0.88); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.otp-meta { margin-top: 4px; }
.chip-btn { min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface-2); font-size: 14.5px; font-weight: 600; transition: opacity 0.2s ease; }
.chip-btn:disabled { opacity: 0.55; cursor: default; color: var(--muted); }
.sim-hint { display: inline-block; margin-top: 24px; padding: 8px 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-text); font-size: 13.5px; }
.sim-hint b { font-family: var(--mono); font-weight: 500; }
.sim-hint .link { color: var(--brand-text); text-decoration-color: rgba(255, 173, 85, 0.4); font-size: inherit; }
.app:not(.is-sim) [data-sim] { display: none !important; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 28px; }
.fields > * { min-width: 0; }
.field { display: block; padding: 10px 16px 8px; border-radius: 18px; background: var(--surface-2); border: 1.5px solid transparent; transition: border-color 0.2s ease, background-color 0.2s ease; }
.field:focus-within { border-color: var(--brand); background: var(--surface); }
.field.is-error { border-color: var(--danger); }
.field > span { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.field input { display: block; width: 100%; height: 34px; padding: 0; border: 0; background: transparent; font: 600 19px var(--font); color: var(--text); }
.field input::placeholder { color: var(--faint); font-weight: 500; }
.field-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.field-note svg { flex: none; width: 17px; height: 17px; margin-top: 1px; }
.notice { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 16px; background: var(--brand-soft); color: var(--brand-text); font-size: 14px; font-weight: 500; }
.notice svg { flex: none; width: 20px; height: 20px; }

/* ---------- Localização "Sempre" ---------- */
.loc-art { position: relative; display: grid; place-items: center; height: clamp(210px, 34vh, 290px); margin-bottom: 22px; }
.la-card { position: relative; z-index: 1; width: min(100%, 290px); padding: 12px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-card); animation: rise 0.6s var(--ease) both; }
.la-title { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; font-weight: 600; font-size: 15px; }
.la-app { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #000; border: 1px solid var(--line-strong); }
.la-app svg { width: 22px; height: auto; }
.la-opt { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 12px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.la-opt svg { width: 20px; height: 20px; stroke-width: 2.6; color: var(--brand); }
.la-on { margin-top: 2px; border: 0; border-radius: 12px; background: var(--brand-soft); color: var(--text); font-weight: 600; animation: la-pick 3.4s var(--ease) 0.6s infinite; }
@keyframes la-pick { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 144, 25, 0); } 12% { box-shadow: 0 0 0 4px rgba(255, 144, 25, 0.35); } 30% { box-shadow: 0 0 0 0 rgba(255, 144, 25, 0); } }
.la-pulse { position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 144, 25, 0.16), transparent 65%); }
.loc-art + .eyebrow { margin-top: 0; }
.loc-steps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.loc-steps li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.loc-steps li > span:last-child { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.loc-steps b { font-size: 15px; font-weight: 600; }
.loc-steps i { font-style: normal; font-size: 13px; color: var(--muted); }
.ls-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); font-size: 13.5px; font-weight: 600; }
.loc-steps li.is-done .ls-n { background: var(--ok); color: #06210f; font-size: 0; }
.loc-steps li.is-done .ls-n::before { content: "✓"; font-size: 14px; font-weight: 700; }
.loc-steps li.is-done b { color: var(--ok-text); }
.loc-steps li.is-active { border-color: rgba(255, 144, 25, 0.45); background: var(--brand-soft); }
@media (max-height: 720px) { .loc-art { height: 180px; margin-bottom: 14px; } .la-opt { min-height: 34px; } }

/* Notificações: exemplos (estilo iOS, escuros) */
.push-demo { display: grid; gap: 8px; margin-bottom: 26px; }
.push { display: flex; align-items: flex-start; gap: 11px; padding: 11px 13px; border-radius: 20px; background: var(--push-bg); border: 1px solid var(--line); box-shadow: 0 10px 26px -14px rgba(0, 0, 0, 0.4); animation: push-in 0.55s var(--ease) both; }
.push:nth-child(1) { animation-delay: 0.15s; }
.push:nth-child(2) { animation-delay: 0.45s; }
.push:nth-child(3) { animation-delay: 0.75s; }
.push:nth-child(4) { animation-delay: 1.05s; }
@keyframes push-in { from { opacity: 0; transform: translateY(-16px) scale(0.97); } }
.push-app { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #000; border: 1px solid var(--line); }
.push-app svg { width: 28px; height: auto; }
.push-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.push-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.push-top b { font-size: 14.5px; font-weight: 600; }
.push-top i { flex: none; font-style: normal; font-size: 12px; color: var(--muted); }
.push-body { font-size: 13.5px; color: var(--text-soft); }
@media (max-height: 720px) { .push:nth-child(4) { display: none; } }

/* ---------- Ecrã principal ---------- */
.screen-home { background: var(--home-bg); --panel-h: 330px; }
/* O mapa termina exatamente onde começa o painel de baixo (js/home.js mede o painel visível → --panel-h) */
.map { position: absolute; inset: 0 0 var(--panel-h) 0; background: var(--map-bg); }
.map-fallback { position: absolute; inset: 0 0 var(--panel-h) 0; display: grid; place-items: center; background: var(--map-bg); transition: opacity 0.4s ease; }
.screen-home.map-ok .map-fallback { opacity: 0; pointer-events: none; }
/* Até o motor da HERE desenhar com o estilo (abrir a app, trocar de aspeto) o desenho do mapa fica escondido:
   vê-se o fundo --map-bg em vez do céu/chão brancos do motor (js/map.js hideUntilStyled) */
.map canvas { transition: opacity 0.2s ease; }
.map.is-styling canvas { opacity: 0; transition: none; }.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--spin-track); border-top-color: var(--brand); animation: spin 0.8s linear infinite; }
.spinner-sm { width: 20px; height: 20px; border-width: 2.5px; }
.H_copyright { opacity: 0.7; }
.home-top { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 12px) 16px 0; pointer-events: none; }
.home-top > * { pointer-events: auto; }
.fab { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); box-shadow: var(--shadow-fab); transition: transform 0.18s var(--ease); }
.fab:active { transform: scale(0.92); }
.fab-icon svg { width: 22px; height: 22px; }
.menu-btn { position: relative; display: flex; align-items: center; justify-content: center; height: 48px; padding: 0 14px; border-radius: 16px; background: #000; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: var(--shadow-fab); transition: transform 0.18s var(--ease); }
.menu-btn:active { transform: scale(0.95); }
.menu-logo { height: 23px; }
.menu-dot { position: absolute; top: -4px; right: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px #000; animation: pop-in 0.3s var(--ease) both; }
@keyframes live-dot { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(52, 199, 89, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); } }
.locate-btn { flex: none; margin-left: auto; }
.locate-btn svg { stroke-width: 2; }
.screen-home.is-centered .locate-btn { opacity: 0; pointer-events: none; }
.locate-btn { transition: transform 0.18s var(--ease), opacity 0.2s ease; }
/* Cancelar (recolha): topo direito sobre o mapa, no lugar do botão de centrar */
.trip-cancel-top { display: none; height: 42px; padding: 0 16px; border-radius: 999px; background: var(--bg); border: 1px solid var(--danger-line); color: var(--danger); font-size: 15px; font-weight: 600; box-shadow: var(--shadow-fab); }
.screen-home.st-pickup .trip-cancel-top { display: inline-flex; align-items: center; }
.screen-home.has-offer .locate-btn { display: none; }
.screen-home.has-offer .menu-btn, .screen-home.has-offer .trip-cancel-top { display: none; }

/* Painéis de baixo: sheet (offline/online), offer (novo pedido), trip (recolha / em viagem) */
.sheet, .offer, .trip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  max-height: calc(100% - var(--safe-t) - 120px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--bg);
  border-top: 1px solid var(--line-strong);
  box-shadow: var(--shadow-panel);
  transition: transform 0.5s var(--ease), visibility 0s;
}
/* Painéis encostados ao fundo: a margem de baixo é só a zona segura do telemóvel (mínimo 14 px fora da app);
   o mapa ocupa o resto do ecrã (acaba onde o painel começa — --panel-h, js/home.js) */
.sheet { padding: 14px 16px max(14px, var(--safe-b)); }
.offer, .trip { z-index: 5; transform: translateY(105%); visibility: hidden; transition: transform 0.5s var(--ease), visibility 0s 0.5s; }
.offer { z-index: 7; }
.screen-home.has-offer .offer, .screen-home.st-pickup .trip, .screen-home.st-ontrip .trip { transform: none; visibility: visible; transition: transform 0.5s var(--ease), visibility 0s; }
.screen-home.has-offer .sheet, .screen-home.st-pickup .sheet, .screen-home.st-ontrip .sheet,
.screen-home.has-offer .trip { transform: translateY(105%); visibility: hidden; transition: transform 0.4s var(--ease), visibility 0s 0.4s; }
.screen-home:not(.is-ready) .sheet { transform: translateY(105%); }

/* Online: faixa com radar */
/* Online: a faixa ocupa o lugar do botão "Ficar online" (em baixo), com a mesma altura (60 px) e a mesma forma */
.online-banner { display: none; align-items: center; gap: 10px; height: 60px; margin-top: 14px; padding: 0 8px 0 14px; border-radius: 999px; background: var(--ok-soft); border: 1px solid rgba(52, 199, 89, 0.35); }
.screen-home.is-online .online-banner { display: flex; animation: fade-in 0.25s ease both; }
.ob-radar { position: relative; flex: none; width: 34px; height: 34px; }
.ob-radar b { position: absolute; inset: 11px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.25); }
.ob-radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ok); opacity: 0; animation: radar 2.4s ease-out infinite; }
.ob-radar i:nth-child(2) { animation-delay: 1.2s; }
@keyframes radar { from { transform: scale(0.35); opacity: 0.9; } to { transform: scale(1.15); opacity: 0; } }
.ob-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
/* "Ficar offline" dentro da faixa (com o motorista online o botão grande não aparece) */
.ob-off { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--danger-line); color: var(--danger); font-size: 14.5px; font-weight: 600; transition: transform 0.15s var(--ease); }
.ob-off:active { transform: scale(0.95); }
.ob-off svg { width: 17px; height: 17px; stroke-width: 2.4; }
/* A ficar offline (pode demorar ~2 s): o botão mostra o indicador de carregamento, como o "Ficar online" */
.ob-off { position: relative; }
.ob-off.is-loading { pointer-events: none; }
.ob-off.is-loading > * { visibility: hidden; }
.ob-off.is-loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2.5px solid var(--danger-line); border-top-color: var(--danger); animation: spin 0.7s linear infinite; }
@media (max-width: 360px) { .ob-off span { display: none; } .ob-off { padding: 0 12px; } }
.ob-txt b { font-size: 16px; font-weight: 600; line-height: 1.2; color: var(--ok-text); }
.ob-txt i { font-style: normal; font-size: 13.5px; line-height: 1.25; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Ganhos de hoje e da semana */
/* Hoje e Esta semana: duas colunas centradas; a seta (à direita) indica que abre os detalhes */
.earn { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; width: 100%; padding: 12px 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-align: center; transition: background-color 0.15s ease; }
.earn:active { background: var(--surface-2); }
.earn-col { display: flex; flex-direction: column; align-items: center; line-height: 1.2; min-width: 0; }
.earn-col + .earn-col { border-left: 1px solid var(--line); }
.earn-col i { font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.earn-col b { margin-top: 4px; font-size: 24px; font-weight: 600; letter-spacing: -0.035em; white-space: nowrap; }
.earn-col small { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.earn-go { position: absolute; right: 8px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--muted); stroke-width: 2.2; }
/* Ganhos atualizados (ao terminar uma viagem — js/earnings.js): a caixa acende a verde, os valores sobem do
   anterior para o novo e ficam verdes por instantes; "+€X,XX" sobe por cima do Hoje e desaparece */
.earn-col { position: relative; }
.earn-col b { font-variant-numeric: tabular-nums; }
/* Olho (à esquerda do valor de hoje): pequeno e em cinzento escuro, para passar quase despercebido. Fica centrado
   no espaço livre entre a margem esquerda da caixa e o valor (left/top calculados em js/earnings.js placeEye);
   o valor continua centrado na coluna */
.earn-eye { position: absolute; left: 0; top: 50%; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--faint); opacity: 0.75; transition: opacity 0.15s ease, transform 0.15s var(--ease); }
.earn-eye:active { opacity: 1; transform: scale(0.88); }
.earn-eye svg { width: 16px; height: 16px; stroke-width: 1.9; }
.earn-eye .eye-off, .earn-eye.is-hidden .eye-on { display: none; }
.earn-eye.is-hidden .eye-off { display: block; }
.earn.is-masked .earn-col b { letter-spacing: 0.04em; }
.earn.is-updated { animation: earn-glow 2.2s ease-out; }
@keyframes earn-glow {
  0% { border-color: var(--line); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
  12% { border-color: var(--ok); box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.32); }
  100% { border-color: var(--line); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}
.earn.is-updated .earn-col b { animation: earn-val 2.2s ease-out; }
@keyframes earn-val { 0%, 55% { color: var(--ok-text); } 100% { color: var(--text); } }
.earn-gain { position: absolute; left: 50%; top: -6px; padding: 2px 9px; border-radius: 999px; background: var(--ok); color: #06210f; font-size: 12.5px; font-weight: 700; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.5); animation: earn-gain 1.9s var(--ease) forwards; }
@keyframes earn-gain {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  70% { opacity: 1; transform: translate(-50%, -4px); }
  100% { opacity: 0; transform: translate(-50%, -14px); }
}
@media (prefers-reduced-motion: reduce) { .earn.is-updated, .earn.is-updated .earn-col b, .earn-gain { animation-duration: 0.01s; } }
/* Veículo em uso */
.veh-pic { flex: none; display: grid; place-items: center; width: 52px; height: 40px; border-radius: 12px; overflow: hidden; background: var(--surface-3); color: var(--muted); }
.veh-pic img { width: 100%; height: 100%; object-fit: cover; }
.veh-pic svg { width: 22px; height: 22px; }
.veh-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.veh-txt b { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.veh-txt i { font-style: normal; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Menu: carro em uso, logo por baixo do nome */
.dr-veh { display: flex; align-items: center; gap: 12px; width: calc(100% - 28px); margin: 12px 14px 4px; padding: 10px 12px 10px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left; transition: background-color 0.15s ease; }
.dr-veh:active { background: var(--surface-2); }
.dr-veh .veh-pic { width: 60px; height: 46px; background: #fff; }
.dr-veh.is-missing .veh-pic { background: var(--surface-3); }
.dr-veh .veh-txt i { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-text); }
.dr-veh.is-missing .veh-txt b { color: var(--brand-text); }
.dr-veh-l2 { display: flex; align-items: center; gap: 8px; margin-top: 3px; min-width: 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-veh-l2 .plate { font-size: 12px; }
.dr-veh-op { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dr-veh-go { flex: none; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--brand-text); }
/* Matrícula portuguesa (como na app do cliente) */
.plate { flex: none; display: inline-flex; align-items: stretch; overflow: hidden; border-radius: 6px; border: 1.5px solid #1d1d1f; background: #fff; font-family: var(--mono); font-size: 13.5px; font-weight: 500; letter-spacing: 0.06em; color: #0f0f10; }
.plate-eu { display: grid; place-items: end center; width: 16px; padding-bottom: 2px; background: #1b3fa0; color: #fff; font: 600 9px var(--font); }
.plate-text { padding: 3px 7px; }
/* Recomendado: cartões que deslizam na horizontal */
.sheet-label { margin: 16px 0 2px; }
.zone-count { color: var(--brand-text); }
.alerts { list-style: none; display: flex; gap: 10px; margin: 8px -16px 0; padding: 0 16px 2px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
.alerts::-webkit-scrollbar { display: none; }
.alerts li { flex: 0 0 86%; scroll-snap-align: start; }
.alerts.is-single li { flex-basis: 100%; }
.alert { display: flex; align-items: center; gap: 12px; width: 100%; height: 100%; min-height: 74px; padding: 12px 12px 12px 14px; border-radius: 20px; background: var(--brand-soft); border: 1px solid var(--brand-line); text-align: left; transition: transform 0.18s var(--ease); }
.alert:active { transform: scale(0.98); }
.alert.is-must { background: var(--danger-soft); border-color: var(--danger-line); }
.alert.is-must .al-icon { color: var(--danger); }
.alert.is-must .al-go { color: var(--danger); }
.alert.is-info { background: var(--info-soft); border-color: rgba(106, 168, 255, 0.3); }
.alert.is-info .al-icon, .alert.is-info .al-go { color: var(--info); }
.al-icon { position: relative; flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--tile); color: var(--brand); border: 1px solid var(--line); }
.al-icon svg { width: 22px; height: 22px; stroke-width: 2; }
.alert-notify .al-icon svg { transform-origin: 50% 12%; animation: al-bell 3.2s ease-in-out 0.6s infinite; }
.alert-gps .al-icon svg { animation: al-pin 3.2s var(--ease) 1.2s infinite; }
@keyframes al-bell { 0%, 34%, 100% { transform: rotate(0); } 4% { transform: rotate(18deg); } 9% { transform: rotate(-15deg); } 14% { transform: rotate(11deg); } 19% { transform: rotate(-7deg); } 24% { transform: rotate(3deg); } }
@keyframes al-pin { 0%, 30%, 100% { transform: translateY(0); } 9% { transform: translateY(-6px); } 16% { transform: translateY(0); } 21% { transform: translateY(-2px); } 25% { transform: translateY(0); } }
.al-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.al-text b { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-text i { font-style: normal; font-size: 13px; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.al-go { flex: none; width: 20px; height: 20px; color: var(--brand-text); stroke-width: 2.2; }
.alert.is-busy { opacity: 0.6; pointer-events: none; }
.go-btn { margin-top: 14px; min-height: 60px; font-size: 18px; }
.go-btn svg { width: 22px; height: 22px; stroke-width: 2.4; }
/* Online: o botão "Ficar online" sai (o "Ficar offline" está na faixa "Estás online") */
.screen-home.is-online .go-btn { display: none; }

/* ---------- Marcadores do mapa ---------- */
/* O motorista: ponto laranja com seta (roda com a direção); online → ondas de radar verdes */
.mk-me { position: relative; width: 0; height: 0; }
.mk-dot { position: absolute; left: -17px; top: -17px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55); }
.mk-arrow { width: 18px; height: 18px; fill: #0b0b0c; stroke: #0b0b0c; stroke-width: 1; transition: transform 0.6s var(--ease); }
.mk-arrow:not(.has-heading) { transform: none !important; }
.mk-radar { position: absolute; left: -70px; top: -70px; width: 140px; height: 140px; pointer-events: none; display: none; }
.mk-radar i { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(52, 199, 89, 0) 30%, rgba(52, 199, 89, 0.28) 70%, rgba(52, 199, 89, 0) 71%); border: 2px solid rgba(52, 199, 89, 0.7); opacity: 0; animation: radar-map 3s ease-out infinite; }
.mk-radar i:nth-child(2) { animation-delay: 1s; }
.mk-radar i:nth-child(3) { animation-delay: 2s; }
@keyframes radar-map { from { transform: scale(0.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.screen-home.is-online:not(.has-trip):not(.has-offer) .mk-radar { display: block; }
/* Recolha (alfinete laranja) e destino (alfinete vermelho), com etiqueta */
.mk-pin { position: relative; width: 0; height: 0; }
.mkp-pin { position: absolute; left: -14px; top: -37px; width: 28px; height: 38px; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); pointer-events: none; }
.mkp-label { position: absolute; left: 0; top: -62px; transform: translateX(-50%); padding: 3px 8px; border-radius: 999px; background: var(--pin-label-bg); color: var(--pin-label-fg); font-size: 11.5px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
/* Recolha: alfinete verde (cabeça redonda com centro branco + haste + sombra) — js/map.js alfMarker */
.mk-alf .mka-head { position: absolute; left: -15px; top: -46px; width: 30px; height: 30px; border-radius: 50%; background: var(--pickup); border: 4px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); }
.mk-alf .mka-head::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.mk-alf .mka-stem { position: absolute; left: -2px; top: -18px; width: 4px; height: 18px; border-radius: 2px; background: var(--pickup); }
.mk-alf .mka-shadow { position: absolute; left: -5px; top: -2px; width: 10px; height: 5px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); }
.mk-alf .mkp-label { top: -74px; }
/* Cliente (a caminho da recolha): ponto azul com pulsação e o primeiro nome por cima */
.mk-client { position: relative; width: 0; height: 0; }
.mkc-dot { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: #2f7bff; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.mkc-pulse { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; background: rgba(47, 123, 255, 0.35); animation: mkc-pulse 2s ease-out infinite; }
@keyframes mkc-pulse { from { transform: scale(0.35); opacity: 1; } to { transform: scale(1.2); opacity: 0; } }
.mkc-label { position: absolute; left: 0; top: -36px; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; background: #2f7bff; color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }

/* ---------- Novo pedido de viagem ---------- */
.offer { padding: 16px 16px max(14px, var(--safe-b)); }
.screen-home.has-offer .offer { animation: offer-in 0.5s var(--ease) both; }
@keyframes offer-in { from { transform: translateY(40px); } }
.of-head { min-width: 0; }
/* "Novo pedido · categoria" à esquerda; rejeitar (✕, só ícone) encostado à direita */
.of-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -6px; }
.of-top .eyebrow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-reject { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-right: -4px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text-soft); transition: transform 0.15s var(--ease), background-color 0.15s ease; }
.of-reject:active { transform: scale(0.9); background: var(--surface-3); }
.of-reject svg { width: 18px; height: 18px; stroke-width: 2.4; }
.of-amount { margin-top: 2px; font-size: 46px; font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.of-amount small { font-size: 28px; color: var(--text-soft); }
/* Cliente paga · €/h · €/km — tudo na mesma linha, texto pequeno */
.of-paid { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.of-paid b { font-weight: 600; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.of-paid .sep { margin: 0 6px; color: var(--faint); }
/* Recolha → destino (também usado no ecrã da viagem) */
.stops { list-style: none; position: relative; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.stops::before { content: ""; position: absolute; left: 5px; top: 22px; bottom: 34px; border-left: 2px dotted var(--line-strong); }
.stop { position: relative; display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
/* Recolha: bolinha verde (a mesma cor do alfinete no mapa); destino: quadrado vermelho */
.stop-dot { position: relative; z-index: 1; flex: none; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--pickup); box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.2); }
.stop-b .stop-dot { border-radius: 3px; background: var(--dest); box-shadow: 0 0 0 4px rgba(255, 75, 54, 0.18); }
.stop-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.stop-meta { font-size: 13px; color: var(--muted); }
.stop-meta b { color: var(--text); font-weight: 600; }
.stop-name { margin-top: 2px; font-size: 16.5px; font-weight: 600; letter-spacing: -0.015em; }
.stop-name:empty { display: none; }
.stop-addr { font-style: normal; font-size: 14px; color: var(--text-soft); }
.stop-name:empty + .stop-addr { margin-top: 2px; font-size: 16px; font-weight: 600; color: var(--text); }
/* Tempo para aceitar: barra que encolhe da direita para a esquerda */
.of-timer { margin-top: 16px; height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.of-bar { display: block; height: 100%; width: 100%; border-radius: 8px; background: var(--ok); transform-origin: left center; transition: background-color 0.3s ease; }
.of-bar.is-mid { background: var(--brand); }
.of-bar.is-low { background: var(--timer-red); }
.of-actions { margin-top: 12px; }
.of-actions .btn { padding: 0 14px; }
/* Contador dos segundos: o fundo acompanha a cor da barra (verde > 50%, laranja 20–50%, vermelho < 20%);
   o botão fica sempre verde — o contorno branco separa o contador verde do botão verde */
.of-secs { display: inline-grid; place-items: center; min-width: 36px; height: 28px; padding: 0 7px; border-radius: 999px; background: var(--ok); color: #06210f; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92); font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; transition: background-color 0.3s ease, color 0.3s ease; }
.of-secs.is-mid { background: var(--brand); color: #0b0b0c; }
.of-secs.is-low { background: var(--timer-red); color: #fff; }

/* ---------- 2 pedidos ao mesmo tempo: um separador por pedido (js/offer.js) ----------
   Cada separador: n.º do pedido, valor, km até à recolha e o seu próprio tempo (segundos + barra fina, mesmas
   cores da barra grande). O selecionado fica laranja; o novo, ainda por ver, pulsa e tem um ponto. */
.of-tabs { display: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: -4px -4px 12px; }
.offer.is-multi .of-tabs { display: grid; animation: of-tabs-in 0.3s var(--ease); }
@keyframes of-tabs-in { from { opacity: 0; transform: translateY(-8px); } }
.offer.is-multi .of-top { margin-top: 0; }
.of-tab { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 8px 9px 12px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--text); text-align: left; transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s var(--ease); }
.of-tab:active { transform: scale(0.97); }
.of-tab.is-active { background: var(--brand-soft); border-color: var(--brand); }
.ot-n { position: relative; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); color: var(--text-soft); font-size: 13px; font-weight: 700; }
.of-tab.is-active .ot-n { background: var(--brand); color: #0b0b0c; }
.ot-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.ot-amount { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ot-sub { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.of-tab:not(.is-active) .ot-amount { color: var(--text-soft); }
.ot-secs { display: grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ok); color: #06210f; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; transition: background-color 0.3s ease, color 0.3s ease; }
.of-tab.is-mid .ot-secs { background: var(--brand); color: #0b0b0c; }
.of-tab.is-low .ot-secs { background: var(--timer-red); color: #fff; }
.ot-bar { position: absolute; left: 10px; right: 10px; bottom: 5px; height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.ot-bar i { display: block; height: 100%; border-radius: 3px; background: var(--ok); transform-origin: left center; transition: background-color 0.3s ease; }
.of-tab.is-mid .ot-bar i { background: var(--brand); }
.of-tab.is-low .ot-bar i { background: var(--timer-red); }
.of-tab.is-new { animation: of-tab-new 1.1s ease-in-out infinite; }
@keyframes of-tab-new { 50% { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-line); } }
.of-tab.is-new .ot-n::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--dest); box-shadow: 0 0 0 2px var(--bg); }
.offer.is-busy .of-tabs { pointer-events: none; opacity: 0.55; }
/* Ao trocar de pedido os dados entram pelo lado da troca (rápido; o mapa já mudou) */
.of-body.is-in-next { animation: of-in-next 0.22s var(--ease); }
.of-body.is-in-prev { animation: of-in-prev 0.22s var(--ease); }
@keyframes of-in-next { from { opacity: 0; transform: translateX(26px); } }
@keyframes of-in-prev { from { opacity: 0; transform: translateX(-26px); } }

/* ---------- Viagem: a caminho da recolha / em viagem ---------- */
/* Painel da viagem: nunca tem scroll — cresce com o conteúdo e o mapa encolhe (acaba onde o painel começa:
   --panel-h, medido em js/home.js), como no novo pedido */
.trip { padding: 14px 16px 0; display: flex; flex-direction: column; max-height: none; overflow: visible; }
/* Novo pedido: nunca tem scroll — o painel cresce com o conteúdo (ex.: moradas compridas em várias linhas)
   e o mapa encolhe (acaba onde o painel começa: --panel-h, medido em js/home.js) */
.offer { max-height: none; overflow-y: visible; overflow-x: clip; } /* clip: a troca de pedido desliza para o lado */
.tp-head { display: flex; align-items: center; gap: 12px; }
.tp-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tp-name { font-size: 22px; font-weight: 600; letter-spacing: -0.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-sub { font-style: normal; font-size: 14px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.tp-sub:empty { display: none; }
/* Online ↔ Pausa (só em viagem) */
.pause-btn { display: none; flex: none; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--ok-soft); border: 1px solid rgba(52, 199, 89, 0.35); color: var(--ok-text); font-size: 14.5px; font-weight: 600; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.pause-btn i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); animation: live-dot 1.8s ease-out infinite; }
.pause-btn.is-paused { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-text); }
.pause-btn.is-paused i { width: 10px; height: 10px; border-radius: 0; background: none; border-left: 3px solid var(--brand); border-right: 3px solid var(--brand); animation: none; }
.pause-btn.is-busy { opacity: 0.6; pointer-events: none; }
.screen-home.st-ontrip .pause-btn { display: inline-flex; }
/* Botões sobre o mapa, nos cantos de baixo (recolha / em viagem): Ligar + Mensagem à esquerda (só ícone),
   "Abrir Waze" (logo + texto) à direita. Ficam logo acima do painel: o mapa acaba em --panel-h. */
.map-acts { position: absolute; left: 0; right: 0; bottom: calc(var(--panel-h) + 12px); z-index: 3; display: none; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 0 14px; pointer-events: none; }
.map-acts > * { pointer-events: auto; }
.screen-home.st-pickup .map-acts, .screen-home.st-ontrip .map-acts { display: flex; }
.screen-home.has-offer .map-acts { display: none; }
.screen-home.st-ontrip .ma-left { visibility: hidden; } /* em viagem: só a navegação para o destino */
.ma-left { display: flex; gap: 10px; }
.ma-ic { position: relative; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-strong); color: var(--brand); box-shadow: var(--shadow-fab); transition: transform 0.15s var(--ease), background-color 0.15s ease; }
.ma-ic:active { transform: scale(0.92); background: var(--surface); }
.ma-ic svg { width: 22px; height: 22px; stroke-width: 2; }
/* "Abrir Waze": o logo ocupa toda a parte esquerda do botão (sem margens nem moldura; o arredondado é o do botão) */
.ma-nav { display: inline-flex; align-items: stretch; gap: 12px; height: 50px; padding: 0 18px 0 0; overflow: hidden; border-radius: 999px; background: var(--bg); color: var(--text); font-size: 15.5px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-fab); transition: transform 0.15s var(--ease), background-color 0.15s ease; }
.ma-nav > span:last-child { align-self: center; }
.ma-nav:active { transform: scale(0.96); background: var(--surface); }
.ma-logo { flex: none; display: block; width: 56px; }
.ma-logo svg { display: block; width: 100%; height: 100%; }
.chat-badge { position: absolute; top: -4px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px var(--bg); animation: pop-in 0.3s var(--ease) both; }
.tp-stops { margin-top: 16px; }
.wait-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 12px; min-height: 46px; padding: 0 12px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-text); font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wait-note::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: live-dot 1.8s ease-out infinite; }
/* Tempo de espera com largura fixa (cabe "59:59"): ao mudar o segundo, a frase não se desloca */
.wait-time { flex: none; display: inline-block; width: 5ch; margin-left: -3px; text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Rodapé da viagem: PIN do cliente (4 caixas) ao lado de "Iniciar viagem" */
.tp-foot-row { display: flex; align-items: flex-end; gap: 10px; }
.tp-foot-row .btn { flex: 1; min-width: 0; padding: 0 14px; }
.tp-foot .field-error { margin: 0 0 8px; }
.pin-row { flex: none; display: flex; flex-direction: column; gap: 4px; }
.pin-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-text); }
.otp-4 { flex: none; margin: 0; width: 176px; }
.otp-4 .otp-cells { grid-template-columns: repeat(4, 1fr); gap: 5px; }
.otp-4 .otp-cells i { height: 56px; border-radius: 14px; font-size: 22px; }
.otp-4 .otp-cells i.is-caret::after { height: 22px; }
@media (max-width: 360px) { .otp-4 { width: 150px; } }
/* Em viagem: "Avaliar a viagem" (opcional, sem o dizer) */
.rate { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.rate-q { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.rate-q b { font-size: 15.5px; font-weight: 600; }
.stars { display: flex; justify-content: center; gap: 2px; margin-top: 4px; }
.stars button { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: var(--surface-3); transition: transform 0.15s var(--ease), color 0.15s ease; }
.stars button svg { width: 32px; height: 32px; fill: currentColor; stroke: currentColor; stroke-width: 1; }
.stars button.is-on { color: var(--brand); }
.stars button:active { transform: scale(0.88); }
.stars button.is-pop { animation: pop-in 0.3s var(--ease) both; }
.next-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: var(--info-soft); color: var(--info); font-size: 14px; font-weight: 600; }
.next-note::before { content: "→"; font-weight: 700; }
.tp-foot { position: sticky; bottom: 0; margin: 14px -16px 0; padding: 10px 16px max(14px, var(--safe-b)); background: linear-gradient(to top, var(--bg) 80%, var(--bg-0)); }
/* O que aparece em cada fase */
.screen-home.st-ontrip #tp-stop-a, .screen-home.st-ontrip .wait-note,
.screen-home.st-ontrip .pin-row { display: none !important; }
.screen-home.st-ontrip .rate { display: block; }
.screen-home.st-ontrip .tp-stops::before { display: none; }
.trip.no-pin .pin-row { display: none; }

/* ---------- Ganhos ---------- */
.earn-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.tile { display: flex; flex-direction: column; line-height: 1.2; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.tile i { font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tile b { margin-top: 6px; font-size: 28px; font-weight: 600; letter-spacing: -0.04em; }
.tile small { margin-top: 2px; font-size: 13px; color: var(--muted); }
.chart-card { margin-top: 12px; padding: 14px 14px 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.chart-total { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.chart-total b { font-size: 17px; font-weight: 600; }
.chart-total span { font-size: 13px; color: var(--muted); }
.chart-pick { margin-top: 6px; min-height: 22px; font-size: 14px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.chart-pick b { color: var(--text); font-weight: 600; }
.chart { position: relative; height: 190px; margin-top: 6px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .grid text, .chart .xlab { fill: var(--muted); font-family: var(--font); font-size: 11px; stroke: none; }
/* Um valor por dia (uma só série): os outros dias em cinzento (#9fa2a9), hoje em laranja da marca — os dois com
   contraste ≥ 3:1 com o fundo do cartão (#3a3c41) e bem distintos entre si (validado); a coluna tocada fica creme */
.chart .bar { fill: var(--chart-bar); stroke: none; transition: fill 0.15s ease; }
.chart .bar.is-today { fill: var(--chart-today); }
.chart .bar.is-sel { fill: var(--chart-sel); }
.chart .bar.is-today.is-sel { fill: var(--chart-today); }
.chart .bar-hit { fill: transparent; stroke: none; cursor: pointer; }
.chart .zero { fill: var(--surface-3); stroke: none; }
.days { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
/* Por dia: os dias com viagens são botões (›) que abrem as viagens desse dia (js/trips.js openDay) */
.day-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-align: left; font-variant-numeric: tabular-nums; }
button.day-row { transition: background-color 0.15s ease, transform 0.15s var(--ease); }
button.day-row:active { background: var(--surface-2); transform: scale(0.985); }
.day-row > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.days b { font-size: 15px; font-weight: 600; }
.days i { font-style: normal; font-size: 12.5px; color: var(--muted); }
.days .d-amt { font-size: 16px; font-weight: 600; }
.day-row.is-zero .d-amt { color: var(--faint); font-weight: 500; }
.d-go { flex: none; width: 16px; height: 16px; margin-right: -4px; color: var(--muted); stroke-width: 2.2; }
div.day-row { padding-right: 26px; } /* sem › : o valor fica alinhado com os dos dias com viagens */
/* Dia escolhido no gráfico: com viagens, toca-se para as ver */
.chart-pick.is-link { display: inline-flex; align-items: center; gap: 2px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chart-pick.is-link:active { opacity: 0.7; }
.pick-go { flex: none; width: 15px; height: 15px; margin-left: 2px; color: var(--brand); stroke-width: 2.4; }
/* As viagens de um dia: resumo por baixo do título */
.trips-sum { margin-top: 4px; font-size: 14.5px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.trips-sum b { color: var(--text); font-weight: 600; }
.pay-label { margin: 24px 0 8px; }

/* ---------- As minhas viagens ---------- */
.trips { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.trips > li { min-width: 0; }
.trips-month { margin: 14px 0 -2px; }
.trips-month:first-child { margin-top: 6px; }
.trip-card { padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; animation: rise 0.35s var(--ease) both; }
/* Imagem da rota (HERE Map Image API), no topo do cartão, 3:1 como na app do cliente; brilho a passar enquanto carrega */
.tc-map { position: relative; margin: -14px -14px 12px; aspect-ratio: 3 / 1; background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: tc-shimmer 1.4s linear infinite; }
.tc-map img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s ease; }
.tc-map img.is-loaded { opacity: 1; }
.tc-map:has(img.is-loaded), .tc-map.is-failed { animation: none; }
@keyframes tc-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.tc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tc-when { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.tc-when b { font-size: 14.5px; font-weight: 600; }
.tc-cat { align-self: flex-start; margin-top: 4px; padding: 2px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-soft); font-size: 12px; font-weight: 600; }
.tc-money { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; text-align: right; }
.tc-amt { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.tc-paid { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tc-tip { margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok-text); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.trip-card .stops { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); gap: 10px; }
.trip-card .stops::before { top: 34px; bottom: 30px; }
.trip-card .stop-name { font-size: 15px; }
.trip-card .stop-addr { font-size: 13px; }
.trip-card .stop-name:empty + .stop-addr { font-size: 15px; }
.trips-more { display: grid; place-items: center; min-height: 64px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 26px; padding: 26px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.empty b { margin-top: 8px; font-size: 16.5px; font-weight: 600; }
.empty span { font-size: 14px; color: var(--muted); }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--surface-3); color: var(--text-soft); }
.empty-icon svg { width: 26px; height: 26px; }

/* ---------- Enviar documento ---------- */
.doc-state { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 5px 11px; border-radius: 999px; font-size: 13.5px; font-weight: 600; }
.doc-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.doc-state:empty { display: none; }
.tone-ok { background: var(--ok-soft); color: var(--ok-text); }
.tone-info { background: var(--info-soft); color: var(--info); }
.tone-warn { background: var(--brand-soft); color: var(--brand-text); }
.tone-bad { background: var(--danger-soft); color: var(--danger); }
.up-grid { display: grid; gap: 14px; margin-top: 20px; }
.up-grid.is-2 { grid-template-columns: 1fr 1fr; gap: 12px; }
.up-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.up-example { display: block; width: 100%; max-width: 230px; margin: 0 auto; border-radius: 9px; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.45); }
.up-example.is-portrait { width: 46%; max-width: 150px; border-radius: 4px; }
.up-grid.is-2 .up-example { max-width: none; }
.upload { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; padding: 14px 10px; overflow: hidden; border-radius: 18px; border: 1.5px dashed var(--line-strong); background: var(--surface); text-align: center; cursor: pointer; transition: border-color 0.2s ease, background-color 0.2s ease; }
.upload:active { background: var(--surface-2); }
.upload-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.3; }
.upload-icon { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.upload-icon svg { width: 22px; height: 22px; stroke-width: 2; }
.upload b { position: relative; font-size: 15px; font-weight: 600; }
.upload-sub { position: relative; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.3; }
.upload.has-file { border-style: solid; border-color: var(--ok); }
.upload.has-file .upload-icon { background: var(--ok); color: #06210f; }
.upload.has-file .upload-sub { color: var(--text); font-weight: 500; }
.upload.is-optional { border-color: var(--line); opacity: 0.6; }
.up-hint { margin-top: -4px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Operadores TVDE ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 22px; padding: 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.seg button { min-height: 42px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--muted); transition: background-color 0.15s ease, color 0.15s ease; }
.seg button.is-on { background: var(--surface-3); color: var(--text); }
.seg-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #0b0b0c; font-size: 12px; font-weight: 700; }
.seg-n:empty { display: none; }
.seg button[data-tab="accepted"] .seg-n { background: var(--surface-3); color: var(--text-soft); }
.ops { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.op { padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); animation: rise 0.35s var(--ease) both; }
.op.is-new { border-color: rgba(255, 144, 25, 0.5); box-shadow: 0 0 0 3px rgba(255, 144, 25, 0.12); }
.op-top { display: flex; align-items: center; gap: 12px; }
.op-logo { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--surface-3); color: var(--text); font-size: 18px; font-weight: 700; }
.op-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.op-txt b { font-size: 16px; font-weight: 600; }
.op-txt i { font-style: normal; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.op-tag { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.op-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.op-actions .btn { min-height: 46px; font-size: 15.5px; }

/* ---------- Veículos ---------- */
.vehs { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.vehs > li, .ops > li { min-width: 0; }
.ops { grid-template-columns: minmax(0, 1fr); }
.vcard { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); text-align: left; transition: border-color 0.15s ease, background-color 0.15s ease; }
.vcard:active:not(:disabled) { background: var(--surface-2); }
.vcard.is-on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.vcard:disabled { cursor: default; }
.vcard.is-busy { opacity: 0.5; pointer-events: none; }
.vc-pic { flex: none; width: 76px; height: 60px; border-radius: 14px; overflow: hidden; background: #fff; }
.vc-pic img { width: 100%; height: 100%; object-fit: cover; }
.vc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; line-height: 1.25; }
.vc-txt b { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-txt i { font-style: normal; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; }
.vc-row .plate { font-size: 12.5px; }
.vc-cats { display: flex; flex-wrap: wrap; gap: 4px; }
.vc-cats span { padding: 1px 7px; border-radius: 999px; background: var(--surface-3); font-size: 11.5px; font-weight: 600; color: var(--text-soft); }
.vc-radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); transition: border 0.15s ease; }
.vcard.is-on .vc-radio { border: 7px solid var(--brand); }

/* ---------- Legal ---------- */
.legal-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.legal-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 10px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: background-color 0.15s ease; }
.legal-row:active { background: var(--surface-2); }
.rs-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); color: var(--text-soft); }
.rs-icon svg { width: 19px; height: 19px; }
.rs-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.rs-text b { font-size: 16px; font-weight: 600; }
.rs-text i { font-style: normal; font-size: 13.5px; color: var(--muted); }
.rc-go { flex: none; width: 20px; height: 20px; color: var(--faint); }
.legal-foot { margin-top: 22px; font-size: 12.5px; color: var(--muted); }
.legal-doc { -webkit-user-select: text; user-select: text; }
.legal-doc .headline { font-size: clamp(28px, 8vw, 34px); }
.legal-doc-content { margin-top: 18px; padding-bottom: calc(24px + var(--safe-b)); }
.ld-section { padding: 18px 0; border-top: 1px solid var(--line); }
.ld-title { display: flex; align-items: baseline; gap: 10px; font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.ld-num { flex: none; font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--brand-text); }
.ld-p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--text-soft); }
.ld-label { margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--text); }
.ld-list { margin: 8px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.55; color: var(--text-soft); }
.ld-list li { margin-top: 4px; }
.ld-list li::marker { color: var(--brand); }

/* ---------- Chat com o cliente ---------- */
.chat-head { flex: none; display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 6px) 12px 10px 6px; border-bottom: 1px solid var(--line); background: var(--bg); }
.chat-head .nav-back { margin-right: 0; }
.chat-head .nav-back svg { width: 22px; height: 22px; }
.chat-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.chat-who b { font-size: 16.5px; font-weight: 600; }
.chat-who i { font-style: normal; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-call { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); color: var(--brand); }
.chat-call svg { width: 21px; height: 21px; }
.chat-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 14px 8px; background: var(--bg); }
.chat-note { margin: 0 auto 14px; max-width: 280px; font-size: 12.5px; line-height: 1.4; color: var(--muted); text-align: center; }
.chat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.chat-msg { max-width: 80%; display: flex; flex-direction: column; animation: rise 0.25s var(--ease) both; }
.chat-msg p { padding: 9px 13px; border-radius: 18px; font-size: 15.5px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg time { margin: 3px 6px 0; font-size: 11.5px; color: var(--muted); }
.chat-msg.is-other { align-self: flex-start; }
.chat-msg.is-other p { background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.chat-msg.is-me { align-self: flex-end; align-items: flex-end; }
.chat-msg.is-me p { background: var(--brand); color: #0b0b0c; border-bottom-right-radius: 6px; }
.chat-msg.is-failed p { opacity: 0.55; }
.chat-msg.is-failed time { color: var(--danger); }
.chat-foot { flex: none; padding: 8px 0 calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg); }
.app.kb-open .chat-foot { padding-bottom: 10px; }
.chat-quick { display: flex; gap: 8px; overflow-x: auto; padding: 0 12px 8px; scrollbar-width: none; }
.chat-quick::-webkit-scrollbar { display: none; }
.chat-quick button { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chat-quick button:active { background: var(--surface-2); }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 0 12px; }
.chat-form textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 120px; padding: 11px 16px; border: 0; border-radius: 22px; background: var(--surface-2); font: inherit; font-size: 16px; line-height: 1.35; color: var(--text); resize: none; outline: none; }
.chat-form textarea::placeholder { color: var(--faint); }
.chat-send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #0b0b0c; transition: opacity 0.15s ease, transform 0.15s ease; }
.chat-send:disabled { opacity: 0.35; }
.chat-send:not(:disabled):active { transform: scale(0.92); }
.chat-send svg { width: 20px; height: 20px; stroke-width: 2; }

/* ---------- Folhas, menu e avisos ---------- */
.scrim { position: absolute; inset: 0; z-index: 20; background: var(--scrim); opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0s 0.35s; }
.scrim.is-on { opacity: 1; visibility: visible; transition: opacity 0.35s ease; }
.bsheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 78%; display: flex; flex-direction: column; padding: 10px 0 calc(8px + var(--safe-b)); border-radius: 28px 28px 0 0; background: var(--surface); border-top: 1px solid var(--line-strong); transform: translateY(105%); transition: transform 0.45s var(--ease); }
.bsheet.is-open { transform: none; }
.grabber { display: block; width: 38px; height: 5px; margin: 0 auto 14px; border-radius: 5px; background: var(--line-strong); }
.bsheet-title { padding: 0 24px 10px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.cc-list { list-style: none; margin: 0; padding: 0 8px; overflow-y: auto; }
.cc-list button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 16px; border-radius: 14px; text-align: left; font-size: 16px; }
.cc-list button:active { background: var(--surface-2); }
.cc-list .f { font-size: 24px; }
.cc-list .n { flex: 1; }
.cc-list .c { color: var(--muted); font-variant-numeric: tabular-nums; }
.cc-list button[aria-selected="true"] { background: var(--surface-2); font-weight: 600; }
.action-sheet { padding-bottom: calc(10px + var(--safe-b)); }
.as-head { padding: 0 24px 8px; }
.as-head .bsheet-title { padding: 0; }
.as-text { margin-top: 4px; font-size: 14.5px; color: var(--muted); }
.as-list { display: grid; gap: 2px; padding: 4px 12px 0; overflow-y: auto; }
.as-rows { margin: 4px 8px 10px; padding: 4px 14px; border-radius: 14px; background: var(--surface-2); }
.as-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 15px; }
.as-row + .as-row { border-top: 1px solid var(--line); }
.as-row dt { color: var(--muted); }
.as-row dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.as-btn { min-height: 54px; padding: 0 12px; border-radius: 14px; font-size: 16.5px; font-weight: 600; text-align: left; }
.as-btn:active { background: var(--surface-2); }
.as-btn.is-danger { color: var(--danger); }
.as-btn.is-check { display: flex; align-items: center; justify-content: space-between; }
.as-btn.is-check::after { content: "✓"; color: var(--brand); font-size: 18px; }
.as-btn.is-cancel { margin-top: 6px; text-align: center; background: var(--surface-2); color: var(--text-soft); }

.drawer { position: absolute; top: 0; bottom: 0; left: 0; z-index: 21; width: min(88%, 370px); display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--line-strong); transform: translateX(-102%); transition: transform 0.45s var(--ease); box-shadow: var(--shadow-drawer); }
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-t) + 22px) 18px 18px; border-bottom: 1px solid var(--line); }
.dr-photo { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--surface-3); color: var(--muted); box-shadow: 0 0 0 2px var(--brand); }
.dr-photo img { width: 100%; height: 100%; object-fit: cover; }
.dr-photo svg { width: 28px; height: 28px; }
.dr-photo.is-empty { box-shadow: 0 0 0 1.5px var(--line-strong); }
.dr-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.drawer-name { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drawer-name.is-empty { color: var(--muted); font-weight: 500; }
.drawer-phone { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.drawer-rating { flex: none; display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.drawer-rating svg { width: 15px; height: 15px; fill: var(--brand); stroke: var(--brand); }
.drawer-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 10px 12px; }
.dr-sec { margin: 14px 12px 4px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.dr-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 7px 10px 7px 12px; border-radius: 14px; text-align: left; transition: background-color 0.15s ease; }
.dr-item:active { background: var(--surface-2); }
.dr-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); color: var(--text-soft); }
.dr-ic svg { width: 20px; height: 20px; }
.dr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.dr-txt b { font-size: 15.5px; font-weight: 500; }
.dr-txt i { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-txt i.tone-ok, .dr-txt i.tone-info, .dr-txt i.tone-warn, .dr-txt i.tone-bad { background: none; font-weight: 500; }
.dr-txt i.tone-ok { color: var(--ok-text); }
.dr-txt i.tone-info { color: var(--info); }
.dr-txt i.tone-warn { color: var(--brand-text); }
.dr-txt i.tone-bad { color: var(--danger); }
.dr-badge { flex: none; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--brand); color: #0b0b0c; font-size: 12px; font-weight: 700; }
.dr-go { flex: none; width: 18px; height: 18px; color: var(--faint); }
.drawer-foot { padding: 12px 18px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); }
.drawer-foot .btn { min-height: 50px; }
.drawer-ver { margin-top: 10px; text-align: center; font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.06em; }
.drawer-legal { min-height: 32px; padding: 0 4px; font: inherit; letter-spacing: inherit; color: var(--text-soft); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }

.toast { position: absolute; left: 16px; right: 16px; top: calc(var(--safe-t) + 12px); z-index: 40; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 18px; background: var(--toast-bg); color: var(--toast-fg); font-size: 15px; font-weight: 500; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5); transform: translateY(calc(-100% - 40px - var(--safe-t))); transition: transform 0.45s var(--ease); pointer-events: none; }
.toast.is-on { transform: none; }
.toast::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.toast.is-ok::before { background: #1e8e4e; }
.toast.is-err::before, .toast.is-error::before { background: #c62828; }
html[data-theme="light"] .toast.is-ok::before { background: #3fd07f; }
html[data-theme="light"] .toast.is-err::before, html[data-theme="light"] .toast.is-error::before { background: #ff5a5a; }

/* Chat de suporte (Tidio) — o mesmo da app do cliente */
body:not(.tidio-open) #tidio-chat { display: none !important; }
.tidio-close { display: none; }
body.tidio-open.tidio-desktop .tidio-close { position: fixed; top: calc(var(--safe-t) + 22px); right: 12px; z-index: 2147483647; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #000; }
.tidio-backdrop { position: fixed; inset: 0; z-index: 999999990; display: grid; place-items: center; background: #000; animation: fade-in 0.15s ease both; }
.tidio-backdrop .spinner { display: none; }
.tidio-backdrop.is-loading .spinner { display: block; }
@keyframes fade-in { from { opacity: 0; } }
.tidio-close svg { width: 22px; height: 22px; stroke-width: 2.2; }

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0.01s; }
  *, *::before, *::after { animation-duration: 0.01s !important; animation-iteration-count: 1 !important; }
}
