/* Minha Garagem — tema claro e minimalista */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f1f3f6; --line: #e7eaef; --line-2: #dfe3ea;
  --text: #0f172a; --text-2: #334155; --muted: #64748b; --soft: #94a3b8;
  --accent: #0d9488; --accent-2: #0f766e; --accent-soft: #e7f6f4; --accent-ring: rgba(13, 148, 136, .22);
  --fuel: #f59e0b; --maint: #8b5cf6; --exp: #f43f5e; --km: #0ea5e9; --ok: #10b981; --warn: #f59e0b; --late: #ef4444;
  --r: 18px; --r-sm: 12px;
  --sh-1: 0 1px 2px rgba(15, 23, 42, .04); --sh-2: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --ease: cubic-bezier(.22, .8, .24, 1); --spring: cubic-bezier(.32, 1.25, .45, 1);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0f17; --surface: #121826; --surface-2: #1a2232; --line: #222b3d; --line-2: #2b354a;
  --text: #e8edf6; --text-2: #c7cfdd; --muted: #93a0b6; --soft: #66738a;
  --accent: #2dd4bf; --accent-2: #5eead4; --accent-soft: rgba(45, 212, 191, .12); --accent-ring: rgba(45, 212, 191, .25);
  --sh-1: none; --sh-2: 0 10px 30px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; }
body.app { padding-bottom: calc(88px + var(--safe-b)); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: var(--text); }
a { color: var(--accent-2); }
.num { font-variant-numeric: tabular-nums; }
.ic { width: 22px; height: 22px; flex: none; }
.ic.sm { width: 17px; height: 17px; } .ic.xs { width: 14px; height: 14px; } .ic.lg { width: 28px; height: 28px; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .soft { color: var(--soft); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.center { text-align: center; }
.mt { margin-top: 12px; } .mt2 { margin-top: 20px; } .mt3 { margin-top: 28px; }
.flex { display: flex; gap: 8px; align-items: center; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }

/* ---------- Topo ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 16px 10px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); }
.topbar.scrolled { box-shadow: 0 1px 0 var(--line); }
.veh-chip { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 16px; text-align: left; transition: background .2s; }
.veh-chip:active { background: var(--surface-2); }
.veh-ava { width: 40px; height: 40px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; overflow: hidden; flex: none; }
.veh-ava img { width: 100%; height: 100%; object-fit: cover; }
.veh-chip .t { display: flex; flex-direction: column; min-width: 0; }
.veh-chip small { font-size: 12px; color: var(--muted); line-height: 1.2; }
.veh-chip strong { font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.veh-chip .chev { color: var(--soft); }
.top-btn { position: relative; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: var(--text-2); background: var(--surface); box-shadow: var(--sh-1); border: 1px solid var(--line); }
.top-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--late); box-shadow: 0 0 0 2px var(--surface); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; margin-left: 6px; vertical-align: middle; transition: background .3s; }
.sync-dot.pend { background: var(--warn); } .sync-dot.off { background: var(--soft); } .sync-dot.err { background: var(--late); }

/* ---------- Conteúdo e transições ---------- */
.view { padding: 6px 16px 32px; max-width: 720px; margin: 0 auto; }
.view.enter { animation: viewIn .34s var(--ease) both; }
.view.enter-l { animation: viewInL .34s var(--ease) both; }
.view.enter-r { animation: viewInR .34s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes viewInL { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes viewInR { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: itemIn .42s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes itemIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.page-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 6px 2px 4px; }
.page-sub { color: var(--muted); margin: 0 2px 14px; font-size: 14px; }
h2.sec { font-size: 13px; font-weight: 650; color: var(--muted); margin: 26px 4px 10px; display: flex; align-items: center; justify-content: space-between; letter-spacing: .01em; }
h2.sec button { color: var(--accent-2); font-weight: 600; font-size: 13.5px; }

/* ---------- Cartões ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--sh-1); }
.card + .card { margin-top: 10px; }
.card.pad-lg { padding: 20px; }
.hero { padding: 20px; }
.hero .lbl { font-size: 13px; color: var(--muted); }
.hero .big { font-size: 44px; font-weight: 720; letter-spacing: -.035em; line-height: 1.05; margin-top: 2px; }
.hero .big small { font-size: 16px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.trend { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.trend.up { color: #047857; background: #ecfdf5; } .trend.down { color: #b91c1c; background: #fef2f2; }
:root[data-theme="dark"] .trend.up { color: #6ee7b7; background: rgba(16,185,129,.12); } :root[data-theme="dark"] .trend.down { color: #fca5a5; background: rgba(239,68,68,.12); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; margin-top: 16px; border: 1px solid var(--line); }
.trio > div { background: var(--surface); padding: 10px 12px; }
.trio b { display: block; font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.trio span { font-size: 11.5px; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; box-shadow: var(--sh-1); }
.kpi .t { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .t i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--accent)); display: inline-block; }
.kpi .v { font-size: 20px; font-weight: 680; letter-spacing: -.02em; margin-top: 3px; }
.kpi .v small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 2px; letter-spacing: 0; }
.kpi .s { font-size: 12px; color: var(--soft); margin-top: 1px; }

.next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.next { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-align: left; box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: 6px; transition: transform .15s; }
.next:active { transform: scale(.98); }
.next .ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c); }
.next b { font-size: 15px; font-weight: 650; }
.next span { font-size: 12.5px; color: var(--muted); }

/* ---------- Listas ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-1); }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; background: var(--surface); transition: background .15s; }
.row:last-child { border-bottom: 0; }
button.row:active { background: var(--surface-2); }
.ico-c { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c, var(--accent)) 12%, transparent); color: var(--c, var(--accent)); }
.row .main { flex: 1; min-width: 0; }
.row .main b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .main span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .end { text-align: right; flex: none; }
.row .end b { display: block; font-weight: 650; }
.row .end span { font-size: 12px; color: var(--muted); }
.row .chev { color: var(--soft); }
.group-h { padding: 9px 14px; font-size: 12px; font-weight: 650; color: var(--muted); display: flex; justify-content: space-between; background: var(--surface-2); text-transform: capitalize; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.ok { background: #ecfdf5; color: #047857; } .chip.soon { background: #fffbeb; color: #b45309; } .chip.late { background: #fef2f2; color: #b91c1c; } .chip.info { background: var(--accent-soft); color: var(--accent-2); }
:root[data-theme="dark"] .chip.ok { background: rgba(16,185,129,.14); color: #6ee7b7; } :root[data-theme="dark"] .chip.soon { background: rgba(245,158,11,.14); color: #fcd34d; } :root[data-theme="dark"] .chip.late { background: rgba(239,68,68,.14); color: #fca5a5; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; border-radius: 99px; background: var(--ok); transform-origin: left; animation: grow .8s var(--ease) both; }
.progress.soon i { background: var(--warn); } .progress.late i { background: var(--late); }
@keyframes grow { from { transform: scaleX(0); } }
.plan-item { padding: 14px; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-top b { font-weight: 600; }
.plan-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.plan-meta strong { color: var(--text); font-weight: 600; }

.alert { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: #fef2f2; border: 1px solid #fecaca; margin-bottom: 8px; width: 100%; text-align: left; }
.alert.soon { background: #fffbeb; border-color: #fde68a; }
.alert.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
:root[data-theme="dark"] .alert { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.25); } :root[data-theme="dark"] .alert.soon { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.25); }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 18px; border-radius: 14px; font-weight: 600; background: var(--surface); color: var(--text); border: 1px solid var(--line-2); transition: transform .12s, background .2s, box-shadow .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -8px var(--accent); }
.btn.primary:active { background: var(--accent-2); }
.btn.dark { background: var(--text); color: var(--bg); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent-2); }
.btn.danger { color: #dc2626; }
.btn.block { width: 100%; }
.btn.small { min-height: 38px; padding: 8px 12px; font-size: 13.5px; border-radius: 11px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 10px; margin-top: 18px; }
.btn-row .btn { flex: 1; }
.btn-row .btn.icon { flex: 0 0 52px; }
.seg { display: flex; background: var(--surface-2); border-radius: 13px; padding: 3px; gap: 2px; overflow-x: auto; scrollbar-width: none; position: relative; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; padding: 8px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .2s, background .2s, box-shadow .2s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; transition: .2s; }
.chips button.on { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ---------- Barra inferior ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + var(--safe-b)); }
.tabbar .in { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 720px; margin: 0 auto; align-items: center; }
.tabbar button.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--soft); padding: 6px 0; transition: color .2s; }
.tabbar button.tab .ic { transition: transform .3s var(--spring); }
.tabbar button.tab.active { color: var(--text); }
.tabbar button.tab.active .ic { transform: translateY(-1px) scale(1.08); color: var(--accent); }
.tabbar .add { justify-self: center; width: 54px; height: 54px; border-radius: 18px; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 22px -10px var(--accent); transition: transform .2s var(--spring); }
.tabbar .add:active { transform: scale(.92) rotate(90deg); }
.tabbar .add .ic { width: 26px; height: 26px; }

/* ---------- Folhas (modais) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .32); opacity: 0; transition: opacity .28s var(--ease); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 26px 26px 0 0; padding: 6px 18px calc(22px + var(--safe-b)); transform: translateY(104%); transition: transform .42s var(--spring), visibility 0s .42s; max-width: 720px; margin: 0 auto; visibility: hidden; box-shadow: 0 -10px 40px -20px rgba(15, 23, 42, .35); }
.sheet-wrap.open { pointer-events: auto; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; visibility: visible; transition: transform .42s var(--spring), visibility 0s; }
.sheet .grab { width: 38px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 6px auto 8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; position: sticky; top: -6px; background: var(--bg); padding: 8px 0; z-index: 3; }
.sheet-head h3 { margin: 0; font-size: 20px; font-weight: 680; letter-spacing: -.015em; }
.x-btn { width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }

/* ---------- Formulários ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 13px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--surface); outline: none; min-height: 50px; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.field .hint { font-size: 12px; color: var(--soft); min-height: 1em; }
.field.big input { font-size: 22px; font-weight: 650; letter-spacing: -.01em; min-height: 58px; }
.field.calc input { background: var(--surface-2); color: var(--text-2); }
.field .pre { position: relative; }
.field .pre input { padding-left: 40px; }
.field .pre em { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--soft); font-weight: 600; font-size: 14px; pointer-events: none; }
.field.big .pre em { font-size: 16px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line-2); min-height: 50px; }
.switch input { width: 46px; height: 28px; appearance: none; -webkit-appearance: none; border-radius: 99px; background: var(--line-2); position: relative; transition: background .25s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .3s var(--spring); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.pick { display: flex; flex-wrap: wrap; gap: 7px; }
.pick label { display: inline-flex; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { padding: 8px 12px; border-radius: 99px; font-size: 13.5px; border: 1px solid var(--line-2); background: var(--surface); transition: .2s; font-weight: 500; }
.pick input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.items-box { display: flex; flex-direction: column; gap: 8px; }
.item-row { display: grid; grid-template-columns: 1fr 64px 96px 34px; gap: 6px; align-items: center; background: var(--surface); padding: 8px; border-radius: 13px; border: 1px solid var(--line); animation: itemIn .3s var(--ease); }
.item-row input, .item-row select { padding: 9px 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); min-width: 0; width: 100%; font-size: 14px; }
.item-row .wide { grid-column: 1 / -2; }
.item-row .x { color: var(--late); display: grid; place-items: center; height: 36px; }
.live { padding: 14px; border-radius: 16px; background: var(--accent-soft); color: var(--text-2); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; transition: background .3s; }
.live b { color: var(--text); }
.live .ic { color: var(--accent-2); margin-top: 1px; }
.more-toggle { display: flex; align-items: center; gap: 6px; color: var(--accent-2); font-weight: 600; font-size: 14px; padding: 6px 0; }
.more-toggle .ic { transition: transform .3s var(--ease); }
.more-toggle.open .ic { transform: rotate(180deg); }
.collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.collapse > div { overflow: hidden; }
.collapse.open { grid-template-rows: 1fr; }

/* ---------- Menu rápido ---------- */
.quick-voice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px; border-radius: 20px; background: var(--text); color: var(--bg); text-align: left; transition: transform .15s; }
.quick-voice:active { transform: scale(.98); }
.quick-voice .mic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.quick-voice small { display: block; opacity: .65; font-size: 13px; margin-top: 2px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.quick { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left; transition: transform .15s; }
.quick:active { transform: scale(.97); }
.quick b { font-size: 15px; font-weight: 650; }
.quick span { font-size: 12.5px; color: var(--muted); margin-top: -6px; }

/* ---------- Voz ---------- */
.mic-big { width: 96px; height: 96px; border-radius: 50%; margin: 4px auto 6px; display: grid; place-items: center; color: #fff; background: var(--accent); box-shadow: 0 16px 34px -16px var(--accent); position: relative; transition: transform .2s var(--spring); }
.mic-big:active { transform: scale(.94); }
.mic-big .ic { width: 38px; height: 38px; }
.mic-big.rec { background: var(--late); }
.mic-big.rec::before, .mic-big.rec::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--late); animation: ripple 1.6s infinite var(--ease); }
.mic-big.rec::after { animation-delay: .8s; }
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(1.7); opacity: 0; } }
.eq { display: flex; gap: 3px; justify-content: center; height: 18px; align-items: center; margin-bottom: 4px; }
.eq i { width: 3px; border-radius: 3px; background: var(--late); animation: eq 0.9s infinite ease-in-out; }
.eq i:nth-child(2) { animation-delay: .15s; } .eq i:nth-child(3) { animation-delay: .3s; } .eq i:nth-child(4) { animation-delay: .45s; } .eq i:nth-child(5) { animation-delay: .6s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 18px; } }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 13px; animation: itemIn .35s var(--ease) both; }
.pcard + .pcard { margin-top: 8px; }
.kv { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.kv span { font-size: 12.5px; background: var(--surface-2); padding: 4px 9px; border-radius: 8px; }
.kv span.miss { color: #b91c1c; background: #fef2f2; }
.example { font-size: 13px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); padding: 10px 12px; border-radius: 12px; text-align: left; width: 100%; }

/* ---------- Resultado ---------- */
.result-top { text-align: center; padding: 8px 0 4px; }
.check { width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; animation: pop .5s var(--spring) both; }
.check svg { width: 38px; height: 38px; }
.check path { stroke: var(--accent); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .25s var(--ease) forwards; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.result-big { font-size: 52px; font-weight: 750; letter-spacing: -.04em; line-height: 1; margin-top: 6px; }
.result-big small { font-size: 18px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.result-list { margin-top: 18px; }
.result-list .row { animation: itemIn .45s var(--ease) both; }

/* ---------- Gráficos e tabelas ---------- */
.chart-card { padding: 14px 12px 10px; }
.chart-card h4 { margin: 0 4px 10px; font-size: 14.5px; font-weight: 650; display: flex; justify-content: space-between; align-items: baseline; }
.chart-card h4 small { color: var(--muted); font-weight: 500; font-size: 12px; }
.chart-box { position: relative; height: 210px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare .side { border-radius: 14px; padding: 12px; background: var(--surface-2); }
.compare .side.win { box-shadow: inset 0 0 0 2px var(--ok); background: #ecfdf5; }
:root[data-theme="dark"] .compare .side.win { background: rgba(16,185,129,.1); }
.compare .side b { font-size: 18px; display: block; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.callout { padding: 13px 14px; border-radius: 14px; background: var(--accent-soft); font-size: 13.5px; color: var(--text-2); }

/* ---------- Dicas, ajuda e tutorial ---------- */
.tip { position: relative; display: flex; gap: 12px; padding: 14px 40px 14px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); margin-bottom: 10px; animation: itemIn .4s var(--ease) both; }
.tip .ico-c { width: 34px; height: 34px; border-radius: 11px; }
.tip b { display: block; font-size: 14px; }
.tip p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.tip .x { position: absolute; top: 10px; right: 10px; color: var(--soft); width: 26px; height: 26px; display: grid; place-items: center; }
.install-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--text); color: var(--bg); margin-bottom: 12px; animation: itemIn .4s var(--ease) both; }
.install-card img { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.install-card b { display: block; font-size: 14.5px; }
.install-card span { font-size: 12.5px; opacity: .7; }
.install-card .btn { min-height: 38px; padding: 8px 14px; background: var(--bg); color: var(--text); border: 0; }
.help-item { border-bottom: 1px solid var(--line); }
.help-item:last-child { border-bottom: 0; }
.help-item summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; font-weight: 600; }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary .chev { margin-left: auto; color: var(--soft); transition: transform .3s var(--ease); }
.help-item[open] summary .chev { transform: rotate(90deg); }
.help-item .body { padding: 0 14px 16px 64px; font-size: 14px; color: var(--text-2); animation: itemIn .3s var(--ease); }
.help-item .body p { margin: 0 0 8px; }
.help-item .body ol, .help-item .body ul { margin: 0 0 8px; padding-left: 18px; }
.onb { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; flex-direction: column; padding: calc(20px + var(--safe-t)) 24px calc(24px + var(--safe-b)); animation: viewIn .4s var(--ease); }
.onb-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -24px; }
.onb-track::-webkit-scrollbar { display: none; }
.onb-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 28px; }
.onb-art { width: 150px; height: 150px; border-radius: 44px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent-2); margin-bottom: 28px; }
.onb-art .ic { width: 64px; height: 64px; stroke-width: 1.5; }
.onb-slide h2 { font-size: 25px; letter-spacing: -.02em; margin: 0 0 10px; }
.onb-slide p { color: var(--muted); margin: 0; max-width: 340px; font-size: 15.5px; }
.dots { display: flex; gap: 6px; justify-content: center; margin: 18px 0; }
.dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--line-2); transition: width .3s var(--ease), background .3s; }
.dots i.on { width: 22px; background: var(--accent); }

/* ---------- Autenticação ---------- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: calc(24px + var(--safe-t)) 22px calc(24px + var(--safe-b)); max-width: 440px; margin: 0 auto; animation: viewIn .45s var(--ease); }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brand img { width: 52px; height: 52px; border-radius: 16px; }
.brand b { font-size: 22px; letter-spacing: -.02em; display: block; }
.brand span { color: var(--muted); font-size: 13.5px; }
.auth h1 { font-size: 30px; letter-spacing: -.03em; margin: 0 0 6px; line-height: 1.15; }
.auth .lead { color: var(--muted); margin: 0 0 22px; }
.auth form { display: flex; flex-direction: column; gap: 12px; }
.auth .err { color: #b91c1c; font-size: 13.5px; min-height: 18px; }
.auth .switch-link { text-align: center; margin-top: 16px; color: var(--muted); font-size: 14px; }
.auth .switch-link button { color: var(--accent-2); font-weight: 650; }
.perks { display: grid; gap: 10px; margin: 0 0 22px; }
.perks div { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text-2); }
.perks .ic { color: var(--accent); }
.pw { position: relative; }
.pw button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 6px 8px; }

/* ---------- Assinatura ---------- */
.plan-card { border-radius: 20px; padding: 18px; background: var(--surface); border: 1px solid var(--line); }
.plan-card.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.plan-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-opt { padding: 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); text-align: left; transition: .2s; position: relative; }
.plan-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.plan-opt b { font-size: 20px; display: block; letter-spacing: -.02em; }
.plan-opt span { font-size: 12.5px; color: var(--muted); }
.plan-opt em { position: absolute; top: -9px; right: 10px; font-style: normal; font-size: 11px; font-weight: 700; background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 99px; }
.qr { width: 220px; height: 220px; margin: 6px auto; background: #fff; border-radius: 16px; padding: 10px; border: 1px solid var(--line); }
.qr img, .qr svg { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.copy-box { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 8px 8px 8px 12px; font-size: 12px; color: var(--muted); }
.copy-box code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, monospace; }
.ro-bar { position: sticky; top: calc(60px + var(--safe-t)); z-index: 20; margin: 0 16px 10px; }

.empty { text-align: center; padding: 30px 18px; color: var(--muted); }
.empty .ico-c { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 10px; }
.empty b { display: block; color: var(--text); font-size: 16.5px; margin-bottom: 4px; }
.veh-card { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; }
.veh-card .pic { width: 58px; height: 58px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; overflow: hidden; flex: none; }
.veh-card .pic img { width: 100%; height: 100%; object-fit: cover; }
.veh-card.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translate(-50%, 16px) scale(.96); background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-size: 14px; opacity: 0; pointer-events: none; transition: .35s var(--spring); z-index: 100; max-width: 92vw; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); display: flex; gap: 12px; align-items: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
.toast button { color: var(--accent); font-weight: 700; filter: brightness(1.4); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }
.field .switch input { min-height: 0; padding: 0; width: 46px; height: 28px; border: 0; border-radius: 99px; box-shadow: none; }
.field .switch input:focus { box-shadow: 0 0 0 4px var(--accent-ring); }
