/* ---------- tokens ---------- */
:root{
  --brand: #0D9488;
  --brand-dark: #0F766E;
  --brand-light: #CCFBF1;
  --accent: #F59E0B;
  --success: #16A34A;
  --danger: #DC2626;
  --warning-bg: #FEF3C7;
  --warning-ink: #92400E;
  --push-bg: rgba(255,255,255,.92);
  --push-border: rgba(11,15,25,.06);
  --ink: #0B0F19;
  --ink-soft: #5B6472;
  --ink-faint: #9AA3AF;
  --line: #E7EAEE;
  --surface: #FFFFFF;
  --bg: #EEF1F4;
  --sheet-radius: 22px;
  --shadow-sm: 0 1px 2px rgba(11,15,25,.06), 0 1px 1px rgba(11,15,25,.04);
  --shadow-md: 0 8px 24px rgba(11,15,25,.12);
  --shadow-lg: 0 16px 48px rgba(11,15,25,.22);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark){
  :root{
    --ink: #F1F3F5;
    --ink-soft: #B4BBC4;
    --ink-faint: #767F8A;
    --line: #262B33;
    --surface: #171A20;
    --bg: #0B0D11;
    --brand-light: #113A36;
    --warning-bg: #3A2E12;
    --warning-ink: #FBBF24;
    --push-bg: rgba(23,26,32,.92);
    --push-border: rgba(255,255,255,.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,.45);
    --shadow-lg: 0 16px 48px rgba(0,0,0,.55);
    color-scheme: dark;
  }
}

*, *::before, *::after{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button{ font-family: inherit; }
input{ font-family: inherit; }
ul{ list-style: none; margin: 0; padding: 0; }
h1,h2,h3,p{ margin: 0; }
svg{ width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- viewport / phone frame ---------- */
.viewport{
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1200px 600px at 15% -10%, #d5f3ee 0%, transparent 60%),
    radial-gradient(1000px 700px at 100% 100%, #e7e2fb 0%, transparent 55%),
    var(--bg);
}
.app{
  position: relative;
  width: 100%;
  height: 100dvh;
  background: var(--surface);
  overflow: hidden;
}
@media (min-width: 560px){
  .viewport{ padding: 32px 16px; }
  .app{
    width: 412px;
    height: min(880px, 92dvh);
    border-radius: 44px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(11,15,25,.06);
  }
}

/* ---------- screens ---------- */
.screen{
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--surface);
  transition: opacity .18s ease;
}
.shell{ position: absolute; inset: 0; transition: opacity .18s ease; }
.screen.is-hidden, .shell.is-hidden{ opacity: 0; visibility: hidden; pointer-events: none; }

/* ---------- onboarding ---------- */
.screen--onboarding{
  background: linear-gradient(165deg, var(--brand) 0%, var(--brand-dark) 68%);
  color: #fff;
  padding: 0 28px 34px;
  justify-content: flex-end;
}
.onboarding-art{
  position: absolute; inset: 0 0 40% 0;
  overflow: hidden;
}
.onboarding-blob{
  position: absolute; width: 480px; height: 480px; right: -160px; top: -140px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.22), rgba(255,255,255,0) 65%);
  border-radius: 50%;
}
.onboarding-mark{
  position: absolute; left: 32px; top: 78px; width: 46px; height: 46px;
  stroke: #fff; opacity: .9;
}
.onboarding-mark::after{ content:''; }
.onboarding-copy{ position: relative; z-index: 1; margin-bottom: 28px; }
.onboarding-copy h1{ font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.onboarding-copy p{ font-size: 15.5px; line-height: 1.5; color: rgba(255,255,255,.88); max-width: 30ch; }
.onboarding-actions{ position: relative; z-index: 1; }
.onboarding-legal{ font-size: 11.5px; color: rgba(255,255,255,.72); text-align: center; margin-top: 12px; line-height: 1.5; }

/* ---------- buttons ---------- */
.btn{
  appearance: none; border: none; cursor: pointer;
  font-weight: 700; font-size: 15.5px; letter-spacing: -.01em;
  border-radius: 14px; padding: 15px 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s ease, opacity .12s ease, background-color .12s ease;
}
.btn:active{ transform: scale(.97); }
.btn--block{ width: 100%; }
.btn--primary{ background: #fff; color: var(--brand-dark); }
.screen--onboarding .btn--primary{ background: #fff; color: var(--brand-dark); }
.shell .btn--primary, .modal-card .btn--primary, .receipt-scroll .btn--primary{
  background: var(--brand); color: #fff;
}
.btn--primary:disabled{ opacity: .45; cursor: not-allowed; }
.btn--ghost{ background: transparent; color: var(--ink-soft); }
.btn--danger-text{ background: transparent; color: var(--danger); font-weight: 600; }
.btn--danger{ background: var(--danger); color: #fff; }
.btn--sm{ padding: 9px 14px; font-size: 13.5px; border-radius: 11px; }
.btn--pill{ border-radius: 999px; }
.btn--outline{ background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }

.icon-btn{
  width: 38px; height: 38px; border-radius: 12px; border: none; cursor: pointer;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.icon-btn svg{ width: 19px; height: 19px; }

/* ---------- shell: map + topbar + fab ---------- */
.map{ position: absolute; inset: 0; background: #dfe7ea; }
.maplibregl-ctrl-attrib{ font-size: 9px !important; }
.maplibregl-ctrl-bottom-right{ bottom: 4px !important; right: 4px !important; }
.maplibregl-ctrl-logo{ display: none !important; }

.topbar{
  position: absolute; top: 0; left: 0; right: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 0;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
  z-index: 5;
}
.topbar > *{ pointer-events: auto; }
.topbar-row{ display: flex; align-items: center; gap: 10px; }

.search-pill{
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: 16px; padding: 14px 16px;
  box-shadow: var(--shadow-md); cursor: pointer; border: none; text-align: left;
  color: var(--ink-soft); font-size: 14.5px; font-weight: 600;
}
.search-pill svg{ color: var(--brand); width: 18px; height: 18px; flex: none; }
.avatar-btn{
  width: 44px; height: 44px; border-radius: 14px; border: none; cursor: pointer;
  background: var(--surface); box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center; color: var(--ink-soft);
  flex: none;
}

.mode-toggle{
  display: inline-flex; gap: 4px; background: var(--surface); padding: 4px;
  border-radius: 13px; box-shadow: var(--shadow-md); width: max-content;
}
.mode-toggle button{
  border: none; background: transparent; padding: 8px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 700; color: var(--ink-soft); cursor: pointer;
}
.mode-toggle button.is-active{ background: var(--brand); color: #fff; }

.topbar-context{
  display: flex; align-items: center; gap: 12px;
}
.topbar-context .icon-btn{ background: var(--surface); }
.topbar-context-label{
  background: var(--surface); box-shadow: var(--shadow-md); border-radius: 14px;
  padding: 10px 16px; font-size: 13.5px; font-weight: 700; color: var(--ink);
}

.fab-stack{
  position: absolute; right: 16px; z-index: 5;
  display: flex; flex-direction: column; gap: 10px;
  transition: bottom .28s cubic-bezier(.2,.8,.2,1);
}
.fab{
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
}
.fab svg{ width: 19px; height: 19px; }

/* ---------- bottom sheet ---------- */
.sheet{
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  background: var(--surface);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  box-shadow: 0 -8px 30px rgba(11,15,25,.14);
  padding: 10px 18px calc(env(safe-area-inset-bottom,0px) + 18px);
  transition: max-height .32s cubic-bezier(.2,.8,.2,1), padding .32s ease;
  max-height: 46%;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.sheet[data-size="peek"]{ max-height: 42%; }
.sheet[data-size="tall"]{ max-height: 62%; }
.sheet[data-size="full"]{ max-height: 82%; }
.sheet[data-size="mini"]{ max-height: 32%; }
.sheet-inner{ overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-handle{
  width: 38px; height: 4px; border-radius: 3px; background: var(--line);
  margin: 2px auto 12px;
}

/* home sheet content */
.quick-actions{ display: flex; gap: 10px; margin-bottom: 18px; }
.quick-chip{
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px;
  padding: 12px 6px; cursor: pointer; color: var(--ink);
}
.quick-chip svg{ width: 18px; height: 18px; color: var(--brand); }
.quick-chip span{ font-size: 11.5px; font-weight: 700; }
.section-title{ font-size: 12.5px; font-weight: 800; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.recent-item{
  display: flex; align-items: center; gap: 12px; padding: 11px 4px;
  border-bottom: 1px solid var(--line); cursor: pointer; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left;
}
.recent-item:last-child{ border-bottom: none; }
.recent-item svg{ width: 17px; height: 17px; color: var(--ink-faint); flex: none; }
.recent-item strong{ display: block; font-size: 14px; font-weight: 700; }
.recent-item span{ font-size: 12px; color: var(--ink-soft); }
.promo-card{
  margin-top: 14px; background: linear-gradient(120deg, var(--brand-light), transparent);
  border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; gap: 12px; align-items: center;
}
.promo-card .promo-icon{
  width: 38px; height: 38px; border-radius: 11px; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.promo-card .promo-icon svg{ width: 18px; height: 18px; }
.promo-card strong{ font-size: 13px; display:block; }
.promo-card span{ font-size: 12px; color: var(--ink-soft); }

/* route confirm / choose category sheet */
.route-summary{ display: flex; gap: 12px; margin-bottom: 14px; }
.route-line-icons{ display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.route-dot{ width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.route-dot--dest{ background: var(--brand); border-radius: 3px; }
.route-connector{ width: 1.5px; flex: 1; background: var(--line); margin: 3px 0; min-height: 18px; }
.route-fields{ flex: 1; display: flex; flex-direction: column; gap: 14px; }
.route-fields strong{ display: block; font-size: 13.5px; font-weight: 700; }
.route-fields span{ font-size: 11.5px; color: var(--ink-soft); }
.route-meta{ display: flex; gap: 14px; font-size: 12px; color: var(--ink-soft); font-weight: 600; margin: -2px 0 14px 0; }
.peak-note{
  display: flex; align-items: center; gap: 8px; background: var(--warning-bg); color: var(--warning-ink);
  border-radius: 12px; padding: 9px 12px; font-size: 11.5px; font-weight: 700; margin-bottom: 14px;
}
.peak-note svg{ width: 15px; height: 15px; flex: none; }
.package-note{
  display: flex; align-items: center; gap: 8px; background: var(--brand-light); color: var(--brand-dark);
  border-radius: 12px; padding: 9px 12px; font-size: 11.5px; font-weight: 700; margin-bottom: 14px;
}
.package-note svg{ width: 15px; height: 15px; flex: none; }

.category-list{ display: flex; flex-direction: column; gap: 8px; }
.category-card{
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface);
}
.category-card.is-selected{ border-color: var(--brand); background: var(--brand-light); }
.category-icon{
  width: 42px; height: 42px; border-radius: 12px; background: var(--bg);
  display: flex; align-items: center; justify-content: center; flex: none; color: var(--ink);
}
.category-card.is-selected .category-icon{ background: #fff; color: var(--brand-dark); }
.category-icon svg{ width: 22px; height: 22px; }
.category-info{ flex: 1; min-width: 0; }
.category-info strong{ font-size: 14px; font-weight: 700; display: block; }
.category-info span{ font-size: 11.5px; color: var(--ink-soft); }
.category-price{ text-align: right; flex: none; }
.category-price strong{ font-size: 14px; font-weight: 800; display: block; }
.category-price span{ font-size: 10.5px; color: var(--success); font-weight: 700; }

.checkout-bar{ margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.pay-row{
  display: flex; align-items: center; gap: 10px; width: 100%; background: var(--bg);
  border: none; border-radius: 13px; padding: 11px 12px; cursor: pointer; margin-bottom: 12px;
}
.pay-row svg{ width: 18px; height: 18px; color: var(--brand); }
.pay-row-copy{ flex: 1; text-align: left; }
.pay-row-copy strong{ display: block; font-size: 12.5px; font-weight: 700; }
.pay-row-copy span{ font-size: 11px; color: var(--ink-soft); }
.pay-row .i-chevron-right{ color: var(--ink-faint); }

/* requesting */
.requesting-body{ display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 6px 4px; }
.requesting-body strong{ font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.requesting-body span{ font-size: 12.5px; color: var(--ink-soft); }
.requesting-timer{ font-size: 12px; color: var(--ink-faint); margin-top: 10px; font-variant-numeric: tabular-nums; }

/* driver card */
.driver-card{ display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.driver-avatar{
  width: 54px; height: 54px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg,#c9c4f7,#9d95ea); display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px;
}
.driver-info{ flex: 1; min-width: 0; }
.driver-info strong{ font-size: 15.5px; font-weight: 800; display: block; }
.driver-rating{ display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-top: 2px; }
.driver-rating svg{ width: 12px; height: 12px; color: var(--accent); fill: var(--accent); }
.driver-vehicle{ font-size: 12px; color: var(--ink-soft); margin-top: 1px; }
.driver-eta{ text-align: right; flex: none; }
.driver-eta strong{ font-size: 17px; font-weight: 800; display: block; color: var(--brand-dark); }
.driver-eta span{ font-size: 10.5px; color: var(--ink-faint); }
.driver-actions{ display: flex; gap: 10px; margin-bottom: 8px; }
.driver-actions .btn{ flex: 1; }
.driver-actions .btn svg{ width: 16px; height: 16px; }

.plate-chip{
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--line); border-radius: 7px; padding: 1px 7px;
  font-weight: 800; font-size: 11px; letter-spacing: .05em; margin-left: 6px;
}

/* trip progress */
.trip-dest-row{ display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.trip-dest-row svg{ width: 20px; height: 20px; color: var(--brand); flex: none; }
.trip-dest-row strong{ display: block; font-size: 14px; }
.trip-dest-row span{ font-size: 11.5px; color: var(--ink-soft); }
.progress-track{ height: 5px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.progress-fill{ height: 100%; background: var(--brand); border-radius: 4px; transition: width .3s linear; }
.trip-meta-row{ display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-bottom: 14px; }

/* banner (arrived) */
.arrived-banner{
  display: flex; align-items: center; gap: 10px; background: var(--brand-light);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 4px;
}
.arrived-banner svg{ width: 20px; height: 20px; color: var(--brand-dark); flex: none; }
.arrived-banner strong{ font-size: 13.5px; display: block; }
.arrived-banner span{ font-size: 11.5px; color: var(--ink-soft); }

.late-banner{
  display: flex; align-items: center; gap: 10px; background: var(--warning-bg);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 14px;
}
.late-banner svg{ width: 20px; height: 20px; color: var(--warning-ink); flex: none; }
.late-banner strong{ font-size: 13.5px; display: block; color: var(--warning-ink); }
.late-banner span{ font-size: 11.5px; color: var(--ink-soft); }
.cancel-hint{ text-align: center; font-size: 11.5px; color: var(--ink-faint); margin: 0 0 8px; }

/* tab full-screens (activity / wallet / profile) reuse .screen--tabpage — acessadas pelos ícones
   do topbar (Atividade, Perfil) e não mais por um menu fixo no rodapé */
.screen--tabpage{ position: absolute; inset: 0; background: var(--surface); z-index: 8; display: none; flex-direction: column; }
.screen--tabpage.is-open{ display: flex; }
.tabpage-header{
  padding: calc(env(safe-area-inset-top,0px) + 16px) 18px 12px; font-size: 20px; font-weight: 800;
  border-bottom: 1px solid var(--line);
}
.tabpage-body{ flex: 1; overflow-y: auto; padding: 16px 18px calc(72px + env(safe-area-inset-bottom,0px)); }

.trip-history-card{ border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; margin-bottom: 10px; display: flex; gap: 12px; align-items: flex-start; }
.trip-history-card svg{ width: 18px; height: 18px; color: var(--ink-faint); margin-top: 2px; flex: none; }
.trip-history-card strong{ display: block; font-size: 13.5px; }
.trip-history-card .thc-meta{ font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.trip-history-card .thc-price{ margin-left: auto; font-weight: 800; font-size: 14px; text-align: right; }

.wallet-balance-card{
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff;
  border-radius: 20px; padding: 22px; margin-bottom: 18px;
}
.wallet-balance-card span{ font-size: 12px; opacity: .85; font-weight: 600; }
.wallet-balance-card strong{ display: block; font-size: 30px; font-weight: 800; margin: 4px 0 16px; letter-spacing: -.02em; }

.list-row{ display: flex; align-items: center; gap: 13px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.list-row:last-child{ border-bottom: none; }
.list-row svg{ width: 18px; height: 18px; color: var(--brand); flex: none; }
.list-row-copy{ flex: 1; }
.list-row-copy strong{ display: block; font-size: 13.5px; font-weight: 700; }
.list-row-copy span{ font-size: 11.5px; color: var(--ink-soft); }
.list-row-value{ font-weight: 800; font-size: 13.5px; }
.list-row-value.is-pos{ color: var(--success); }
.stop-row{ cursor: pointer; border-radius: 12px; padding-left: 8px; padding-right: 4px; }
.stop-row.is-active{ background: var(--brand-light); }

.profile-head{ display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.profile-head .driver-avatar{ width: 62px; height: 62px; font-size: 20px; }
.profile-head strong{ font-size: 17px; }
.profile-head .driver-rating{ margin-top: 4px; }

.switch{ position: relative; width: 42px; height: 25px; flex: none; }
.switch input{ opacity: 0; width: 0; height: 0; }
.switch-track{ position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .15s; }
.switch-track::before{ content:''; position: absolute; width: 19px; height: 19px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: var(--shadow-sm); }
.switch input:checked + .switch-track{ background: var(--brand); }
.switch input:checked + .switch-track::before{ transform: translateX(17px); }

.apikey-box{
  margin-top: 10px; background: var(--bg); border: 1px dashed var(--line); border-radius: 12px;
  padding: 12px; font-size: 11.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink-soft); word-break: break-all; display: none;
}
.apikey-box.is-visible{ display: block; }

/* ---------- search screen ---------- */
.screen--search{ z-index: 9; }
.search-header{ display: flex; gap: 12px; padding: calc(env(safe-area-inset-top,0px) + 14px) 16px 16px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.search-fields{ flex: 1; background: var(--bg); border-radius: 14px; padding: 4px 12px; }
.search-field{ display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.search-field + .search-field{ border-top: 1px solid var(--line); }
.search-field input{ border: none; background: none; outline: none; font-size: 14.5px; flex: 1; color: var(--ink); font-weight: 600; }
.search-field input::placeholder{ color: var(--ink-faint); font-weight: 600; }
.field-icon{ width: 16px; height: 16px; color: var(--brand); flex: none; }
.dot{ width: 9px; height: 9px; border-radius: 50%; background: var(--ink); flex: none; margin: 0 3.5px; }
.dot--origin{ background: var(--ink); }
.search-body{ flex: 1; overflow-y: auto; padding: 16px; }
.search-section-title{ font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin-bottom: 6px; }
.place-list li{ }
.place-row{
  width: 100%; display: flex; align-items: center; gap: 13px; padding: 12px 4px;
  border: none; background: none; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left;
}
.place-row svg{ width: 18px; height: 18px; color: var(--ink-faint); flex: none; }
.place-row strong{ display: block; font-size: 14px; font-weight: 700; }
.place-row span{ font-size: 12px; color: var(--ink-soft); }

/* ---------- receipt screen ---------- */
.screen--receipt{ z-index: 9; background: var(--bg); }
.receipt-scroll{ flex: 1; overflow-y: auto; padding: calc(env(safe-area-inset-top,0px) + 22px) 20px calc(env(safe-area-inset-bottom,0px) + 26px); }
.receipt-check{
  width: 58px; height: 58px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.receipt-check svg{ width: 28px; height: 28px; }
.receipt-scroll h2{ text-align: center; font-size: 19px; font-weight: 800; margin-bottom: 3px; }
.receipt-scroll .receipt-sub{ text-align: center; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 22px; display: block; }
.receipt-card{ background: var(--surface); border-radius: 18px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.receipt-row{ display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 7px 0; color: var(--ink-soft); }
.receipt-row strong{ color: var(--ink); font-weight: 600; }
.receipt-row.is-total{ border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; font-size: 15px; }
.receipt-row.is-total strong{ font-weight: 800; font-size: 16px; }
.rating-stars{ display: flex; justify-content: center; gap: 10px; margin: 6px 0 18px; }
.rating-stars button{ background: none; border: none; cursor: pointer; padding: 4px; }
.rating-stars svg{ width: 34px; height: 34px; color: var(--line); fill: var(--line); transition: color .1s, fill .1s; }
.rating-stars button.is-active svg{ color: var(--accent); fill: var(--accent); }
.tip-row{ display: flex; gap: 8px; margin-bottom: 20px; }
.tip-chip{
  flex: 1; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: 10px 4px; text-align: center; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink);
}
.tip-chip.is-selected{ border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); }
.receipt-comment{
  width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; font-size: 13.5px;
  font-family: inherit; resize: none; margin-bottom: 18px; color: var(--ink); background: var(--surface);
}

.photo-box{
  border: 1.5px dashed var(--line); border-radius: 16px; padding: 22px 16px; text-align: center;
  margin-bottom: 14px; cursor: pointer; background: var(--bg);
}
.photo-box svg{ width: 26px; height: 26px; color: var(--ink-faint); margin-bottom: 8px; }
.photo-box strong{ display: block; font-size: 13px; }
.photo-box span{ font-size: 11px; color: var(--ink-soft); }
.photo-box.is-done{ border-style: solid; border-color: var(--success); background: rgba(22,163,74,.08); }
.photo-box.is-done svg{ color: var(--success); }

/* ---------- pagamento via pix ---------- */
.pix-charge{ padding: 2px 2px 4px; }
.pix-amount{ text-align: center; margin-bottom: 4px; }
.pix-amount span{ font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.pix-amount strong{ display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.qr-box{
  width: 168px; height: 168px; margin: 14px auto 14px; border-radius: 16px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.pix-hint{ font-size: 12px; color: var(--ink-soft); text-align: center; line-height: 1.5; margin-bottom: 14px; padding: 0 6px; }
.pix-copy-row{
  display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px dashed var(--line);
  border-radius: 12px; padding: 10px 10px 10px 14px; margin-bottom: 16px;
}
.pix-copy-row span{
  flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pix-verify{ display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 6px 20px; }
.pix-verify-icon{
  width: 56px; height: 56px; border-radius: 50%; background: var(--brand-light); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
  animation: pix-pulse 1.8s ease-in-out infinite;
}
.pix-verify-icon svg{ width: 26px; height: 26px; }
.pix-verify strong{ font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.pix-verify span{ font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; max-width: 30ch; }
@keyframes pix-pulse{ 0%,100%{ box-shadow: 0 0 0 0 rgba(13,148,136,.28); } 50%{ box-shadow: 0 0 0 10px rgba(13,148,136,0); } }
.pix-breakdown{
  display: flex; justify-content: space-between; align-items: center; font-size: 12.5px;
  color: var(--ink-soft); font-weight: 600; background: var(--bg); border-radius: 12px; padding: 11px 14px; margin-bottom: 4px;
}
.pix-breakdown strong{ color: var(--ink); font-weight: 800; }

/* ---------- modal ---------- */
.modal-backdrop{
  position: fixed; inset: 0; background: rgba(11,15,25,.5); z-index: 40;
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
  backdrop-filter: blur(2px);
}
.modal-backdrop[hidden]{ display: none; }
.modal-card{
  width: 100%; max-width: 412px; background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 22px 22px calc(env(safe-area-inset-bottom,0px) + 22px); box-shadow: var(--shadow-lg);
  animation: sheet-up .28s cubic-bezier(.2,.8,.2,1);
}
@media (min-width: 560px){
  .modal-backdrop{ align-items: center; }
  .modal-card{ border-radius: 24px; }
}
.modal-card h2{ font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.modal-brand{ display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; color: var(--ink-faint); margin-bottom: 14px; }
.modal-lock{ width: 14px; height: 14px; }
.field-label{ font-size: 12px; font-weight: 700; color: var(--ink-soft); display: block; margin-bottom: 6px; }
.text-input{
  width: 100%; border: 1.5px solid var(--line); border-radius: 13px; padding: 13px 14px;
  font-size: 14.5px; margin-bottom: 16px; outline: none; color: var(--ink); background: var(--surface);
}
.text-input:focus{ border-color: var(--brand); }
.modal-card .btn + .btn{ margin-top: 8px; }

.pay-option{
  display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 12px; margin-bottom: 8px; cursor: pointer;
}
.pay-option.is-selected{ border-color: var(--brand); background: var(--brand-light); }
.pay-option svg{ width: 19px; height: 19px; color: var(--brand-dark); flex: none; }
.pay-option-copy{ flex: 1; }
.pay-option-copy strong{ display: block; font-size: 13.5px; }
.pay-option-copy span{ font-size: 11.5px; color: var(--ink-soft); }
.pay-check{ width: 17px !important; height: 17px !important; color: var(--brand) !important; display: none; }
.pay-option.is-selected .pay-check{ display: block; }
.pay-note{ font-size: 11.5px; color: var(--ink-soft); background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: 4px 0 16px; line-height: 1.5; }

@keyframes sheet-up{ from{ transform: translateY(24px); opacity:.4; } to{ transform: translateY(0); opacity: 1; } }

/* ---------- toast ---------- */
.toast{
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px);
  background: var(--ink); color: var(--surface); padding: 11px 18px; border-radius: 12px;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.is-visible{ opacity: 1; transform: translate(-50%, 0); }

/* ---------- push notification (simulada) ---------- */
.push-stack{
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center;
  padding-top: max(env(safe-area-inset-top,0px), 10px);
  pointer-events: none;
}
.push-banner{
  pointer-events: auto; cursor: pointer;
  width: calc(100% - 20px); max-width: 392px;
  background: var(--push-bg); border: 1px solid var(--push-border);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 12px 14px; margin-bottom: 8px;
  display: flex; gap: 10px; align-items: flex-start;
  animation: push-in .32s cubic-bezier(.2,.8,.2,1);
}
.push-banner.is-leaving{ animation: push-out .2s ease forwards; }
.push-icon{
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.push-icon svg{ width: 17px; height: 17px; }
.push-copy{ flex: 1; min-width: 0; }
.push-meta{ display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.push-meta strong{ font-size: 10.5px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.push-meta span{ font-size: 10.5px; color: var(--ink-faint); flex: none; }
.push-title{ font-size: 13.5px; font-weight: 800; color: var(--ink); margin-bottom: 1px; }
.push-body{ font-size: 12px; color: var(--ink-soft); line-height: 1.4; }
@keyframes push-in{ from{ transform: translateY(-18px); opacity: 0; } to{ transform: translateY(0); opacity: 1; } }
@keyframes push-out{ to{ transform: translateY(-14px); opacity: 0; } }

/* ---------- map markers ---------- */
.mk-you{ width: 20px; height: 20px; position: relative; }
.mk-you::before{
  content:''; position: absolute; inset: -14px; border-radius: 50%; background: rgba(13,148,136,.22);
  animation: pulse-ring 2.2s ease-out infinite;
}
.mk-you::after{
  content:''; position: absolute; inset: 3px; border-radius: 50%; background: var(--brand);
  border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
@keyframes pulse-ring{ 0%{ transform: scale(.4); opacity: .8; } 100%{ transform: scale(1); opacity: 0; } }

.mk-pin{ width: 30px; height: 30px; }
.mk-pin svg{ width: 30px; height: 30px; color: var(--ink); filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); }
.mk-pin--dest svg{ color: var(--brand); }

.mk-driver{ width: 30px; height: 30px; }
.mk-driver-icon{
  width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(0,0,0,.35);
  transition: transform .12s linear;
}
.mk-driver-icon svg{ width: 17px; height: 17px; }

/* ---------- lista de paradas: arrastar pra reordenar + botão Smart Trip ---------- */
.stop-row{ display: flex; align-items: center; gap: 10px; }
.stop-drag-handle{
  appearance: none; border: none; background: none; cursor: grab; padding: 6px; margin: -6px;
  color: var(--ink-faint); flex: none; touch-action: none;
}
.stop-drag-handle svg{ width: 18px; height: 18px; display: block; }
.stop-row.is-dragging{ opacity: .5; }
.stop-row.is-drop-target{ box-shadow: inset 0 2px 0 var(--brand); }
.btn--smart-trip{ display: flex; align-items: center; justify-content: center; gap: 7px; }
.btn--smart-trip svg{ width: 16px; height: 16px; }

/* ---------- botão de arrastar (slide-to-confirm) ---------- */
.slide-confirm{ position: relative; width: 100%; height: 54px; border-radius: 27px; background: var(--line); overflow: hidden; margin-bottom: 8px; user-select: none; }
.slide-confirm-fill{ position: absolute; inset: 0; width: 0; background: var(--brand-light); border-radius: 27px; pointer-events: none; }
.slide-confirm-label{ position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 58px; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); pointer-events: none; }
.slide-confirm-thumb{
  position: absolute; left: 4px; top: 4px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: grab; touch-action: none; box-shadow: var(--shadow-sm); transition: left .25s ease;
}
.slide-confirm-thumb.is-dragging{ transition: none; cursor: grabbing; }
.slide-confirm-thumb svg{ width: 20px; height: 20px; }
.slide-confirm.is-complete{ background: var(--brand-light); }
.slide-confirm.is-complete .slide-confirm-thumb{ background: var(--success); }

/* ---------- misc ---------- */
[hidden]{ display: none !important; }
::selection{ background: var(--brand-light); }
