/* CarregaJá — escuro e elétrico. Mobile-first. */
:root {
  --volt: #d2fc35; --volt-ink: #0d0f14;
  --bg: #f4f3ee; --surface: #ffffff; --surface-2: #ecebe5; --ink: #0d0f14; --mut: #6b6e76; --line: rgba(13,15,20,.08);
  --glass: rgba(255,255,255,.86);
  --p0: #9aa0aa; --p1: #6ea8ff; --p2: #1fc8b4; --p3: #ffad1f; --p4: #a970ff;
  --free: #22c55e; --busy: #ff7a1a; --broken: #ff3d71; --unk: #9aa0aa;
  --r: 22px; --r-sm: 14px;
  --shadow: 0 10px 30px -10px rgba(13,15,20,.35), 0 2px 6px rgba(13,15,20,.08);
  --display: "Bricolage Grotesque", ui-rounded, system-ui, sans-serif;
  --tabs-h: 64px; --safe-b: env(safe-area-inset-bottom); --safe-t: env(safe-area-inset-top);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f14; --surface: #171a21; --surface-2: #222630; --ink: #f2f3f5; --mut: #8d929c; --line: rgba(255,255,255,.08);
    --glass: rgba(23,26,33,.88); --shadow: 0 12px 34px -10px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f14; --surface: #171a21; --surface-2: #222630; --ink: #f2f3f5; --mut: #8d929c; --line: rgba(255,255,255,.08);
  --glass: rgba(23,26,33,.88); --shadow: 0 12px 34px -10px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { background: var(--bg); color: var(--ink); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:active { transform: scale(.97); }
:focus-visible { outline: 3px solid var(--volt); outline-offset: 2px; }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i .fillc { fill: currentColor; stroke: none; }
#map { position: fixed; inset: 0; }
.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { display: none; }

/* ---------------------------------------------------------- topo */
.top { position: fixed; z-index: 10; top: 0; left: 0; right: 0; display: flex; gap: 8px; padding: calc(var(--safe-t) + 10px) 12px 0; pointer-events: none; }
.top > * { pointer-events: auto; }
.search { flex: 1; min-width: 0; height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 16px; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 26px; box-shadow: var(--shadow); }
.search > .i { color: var(--mut); width: 20px; height: 20px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; height: 100%; }
.search input::placeholder { color: var(--mut); }
.search input::-webkit-search-cancel-button { display: none; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }
.count { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--volt); color: var(--volt-ink); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.bat { height: 52px; padding: 0 14px; display: flex; align-items: center; gap: 8px; background: var(--volt); color: var(--volt-ink); border-radius: 26px; box-shadow: var(--shadow); font-family: var(--display); font-size: 17px; }
.bat b { font-weight: 800; }
.bat-body { position: relative; width: 26px; height: 14px; border: 2.5px solid currentColor; border-radius: 4px; padding: 1.5px; }
.bat-body::after { content: ""; position: absolute; right: -5px; top: 3px; width: 2.5px; height: 5px; border-radius: 0 2px 2px 0; background: currentColor; }
.bat-fill { display: block; height: 100%; width: 60%; border-radius: 1.5px; background: currentColor; }
.bat.low { background: var(--broken); color: #fff; }

.results { position: fixed; z-index: 11; top: calc(var(--safe-t) + 70px); left: 12px; right: 12px; max-width: 520px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden auto; max-height: 55vh; }
.results button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.results button:last-child { border-bottom: 0; }
.results .ri { width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex: none; font-size: 16px; }
.results small { display: block; color: var(--mut); font-size: 13px; }

.alert { position: fixed; z-index: 9; top: calc(var(--safe-t) + 72px); left: 12px; right: 12px; max-width: 520px; display: flex; gap: 12px; align-items: center; padding: 12px 12px 12px 16px; border-radius: var(--r); background: var(--ink); color: var(--bg); box-shadow: var(--shadow); animation: drop .3s cubic-bezier(.2,.9,.3,1.2); }
.alert .e { font-size: 22px; }
.alert p { margin: 0; flex: 1; font-size: 14px; }
.alert b { font-weight: 700; }
.alert button { background: var(--volt); color: var(--volt-ink); font-weight: 800; border-radius: 14px; padding: 9px 12px; white-space: nowrap; font-size: 13px; }
.alert .x { background: none; color: inherit; opacity: .6; padding: 6px; font-size: 18px; }
@keyframes drop { from { transform: translateY(-16px); opacity: 0; } }

.locate { position: fixed; z-index: 8; right: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + var(--deck-h, 268px) + 12px); width: 48px; height: 48px; border-radius: 50%; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow); display: grid; place-items: center; transition: bottom .3s; }
.locate.on { color: #2f7cf6; }

/* ---------------------------------------------------------- cartões (deck) */
.deck { position: fixed; z-index: 8; left: 0; right: 0; bottom: calc(var(--tabs-h) + var(--safe-b) + 8px); display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 12px 8px; scrollbar-width: none; }
.deck::-webkit-scrollbar { display: none; }
.deck.min { display: none; }
/* Botão para descer/subir as sugestões (só no telemóvel) */
.deck-toggle { position: fixed; z-index: 8; left: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + var(--deck-h, 268px) + 22px); height: 34px; padding: 0 12px 0 9px; border: 0; border-radius: 17px; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 5px; cursor: pointer; transition: bottom .3s; }
.deck-toggle svg { transition: transform .2s; }
.deck-toggle.min svg { transform: rotate(180deg); }
#deck[hidden] + .deck-toggle { display: none; }
.card { flex: none; width: min(86vw, 360px); scroll-snap-align: center; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; text-align: left; display: flex; flex-direction: column; gap: 10px; border: 2px solid transparent; transition: border-color .2s; cursor: pointer; }
.card.active { border-color: var(--volt); }
.card .tag { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--volt); color: var(--volt-ink); padding: 3px 8px; border-radius: 8px; }
.card-head { display: flex; gap: 12px; align-items: center; }
.card-title { flex: 1; min-width: 0; }
.card-title h3 { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title p { margin: 1px 0 4px; font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-stats { display: flex; gap: 6px; }
.card-stats > div { flex: 1; background: var(--surface-2); border-radius: 12px; padding: 7px 8px; min-width: 0; }
.card-stats b { display: block; font-family: var(--display); font-size: 17px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.card-stats span { display: block; font-size: 11px; color: var(--mut); white-space: nowrap; }
.card-stats .warn b { color: var(--broken); }
.card-actions { display: flex; gap: 8px; }
.go { flex: 1; height: 46px; border-radius: 15px; background: var(--volt); color: var(--volt-ink); font-family: var(--display); font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ghost { height: 46px; padding: 0 16px; border-radius: 15px; background: var(--surface-2); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; }
.card.empty { align-items: center; justify-content: center; text-align: center; min-height: 150px; color: var(--mut); cursor: default; }
.card.empty .e { font-size: 34px; }
.card.empty b { color: var(--ink); font-family: var(--display); font-size: 18px; }

/* bloco de potência */
.kw { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-content: center; text-align: center; color: #0d0f14; font-family: var(--display); font-weight: 800; font-size: 20px; line-height: .95; letter-spacing: -.03em; }
.kw small { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0; opacity: .7; }
.kw.big { width: 68px; height: 68px; font-size: 26px; border-radius: 20px; }
.pc0 { background: var(--p0); } .pc1 { background: var(--p1); } .pc2 { background: var(--p2); } .pc3 { background: var(--p3); } .pc4 { background: var(--p4); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-free { color: var(--free); } .s-busy { color: var(--busy); } .s-broken { color: var(--broken); } .s-unk { color: var(--mut); }
.pill .off { font-size: 10px; font-weight: 800; letter-spacing: .02em; opacity: .75; margin-left: 2px; }
/* Estado oficial (MOBI.E) por tipo de ponto */
.official { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 6px; }
.orow { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.orow:last-child { border-bottom: 0; }
.orow small { display: block; color: var(--mut); font-size: 12px; margin-top: 2px; }
.ocs { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; flex: 0 1 auto; max-width: 42%; }
.oc { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.oc.a { color: var(--free); } .oc.c { color: var(--busy); } .oc.o { color: var(--broken); } .oc.u { color: var(--mut); }

/* ---------------------------------------------------------- painel */
.panel { position: fixed; z-index: 12; left: 0; right: 0; bottom: 0; max-height: calc(100% - var(--safe-t) - 70px); background: var(--surface); border-radius: 28px 28px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25); padding: 0 16px calc(var(--tabs-h) + var(--safe-b) + 16px); overflow-y: auto; overscroll-behavior: contain; animation: up .32s cubic-bezier(.2,.9,.3,1); transition: max-height .3s; }
.panel.half { max-height: 60%; }
@keyframes up { from { transform: translateY(40%); opacity: .3; } }
.handle { position: sticky; top: 0; z-index: 2; padding: 10px 0 8px; margin: 0 -16px; background: var(--surface); cursor: grab; touch-action: none; }
.handle::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 3px; background: var(--mut); opacity: .35; margin: 0 auto; }
.p-head { display: flex; gap: 14px; align-items: center; }
.p-head .grow { flex: 1; min-width: 0; }
.p-head h2 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.p-head p { margin: 3px 0 6px; color: var(--mut); font-size: 13px; }
.close { flex: none; align-self: flex-start; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; }
.close .i { width: 18px; height: 18px; }
.h { font-family: var(--display); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); margin: 24px 0 10px; display: flex; justify-content: space-between; align-items: center; }
.mut { color: var(--mut); } .small { font-size: 13px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.stat { background: var(--surface-2); border-radius: 16px; padding: 12px 14px; }
.stat b { display: block; font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.stat span { font-size: 12px; color: var(--mut); }
.stat.warn b { color: var(--broken); }
.cta { display: flex; gap: 8px; margin-top: 12px; }
.cta .go { height: 54px; font-size: 19px; border-radius: 18px; }
.round { width: 54px; height: 54px; border-radius: 18px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.round.on { background: var(--ink); color: var(--bg); }
.heads-up { margin-top: 12px; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--busy) 16%, var(--surface)); }
.heads-up .e { font-size: 22px; }
.heads-up p { margin: 0; flex: 1; font-size: 14px; }
.heads-up button { font-weight: 800; color: var(--volt-ink); background: var(--volt); border-radius: 12px; padding: 9px 11px; font-size: 13px; white-space: nowrap; }
.charging-now { margin-top: 12px; padding: 14px; border-radius: 16px; background: var(--volt); color: var(--volt-ink); display: flex; align-items: center; gap: 12px; font-weight: 700; }
.charging-now button { margin-left: auto; background: var(--volt-ink); color: var(--volt); border-radius: 12px; padding: 9px 12px; font-weight: 800; }

/* reporte de um toque */
.rep-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.rep-row::-webkit-scrollbar { display: none; }
.rep { flex: none; width: 78px; padding: 12px 4px 10px; border-radius: 18px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.rep .e { font-size: 28px; line-height: 1; transition: transform .2s; }
.rep:hover .e { transform: scale(1.15) rotate(-6deg); }
.rep.sent { background: var(--volt); color: var(--volt-ink); }
.feed-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .e { font-size: 22px; }
.feed-item div { flex: 1; min-width: 0; }
.feed-item small { display: block; color: var(--mut); }
.feed-item button { font-size: 12px; font-weight: 700; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); white-space: nowrap; }
.rel { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-transform: none; letter-spacing: 0; font-family: system-ui; color: var(--ink); }
.rel-bar { width: 54px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.rel-bar i { display: block; height: 100%; background: var(--free); }

.plug { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plug:last-child { border-bottom: 0; }
.plug .pi { width: 52px; min-height: 52px; padding: 4px 2px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 9px; font-weight: 800; text-align: center; line-height: 1.1; flex: none; }
.plug .pi .plug-ic { width: 30px; height: 30px; }
.plug.no { opacity: .4; }
.plug > div:nth-child(2) { flex: 1; min-width: 0; }
.plug small { display: block; color: var(--mut); }
.plug .t { text-align: right; font-family: var(--display); font-weight: 800; font-size: 16px; }
.plug .t small { font-family: system-ui; font-weight: 500; font-size: 11px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--mut); } .kv dd { margin: 0; }
.list-item { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item small { color: var(--mut); }
.empty-state { text-align: center; padding: 26px 10px; color: var(--mut); }
.empty-state .e { font-size: 44px; display: block; margin-bottom: 6px; }
.empty-state b { display: block; color: var(--ink); font-family: var(--display); font-size: 19px; margin-bottom: 4px; }

/* viagem */
.field { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 16px; padding: 0 14px; height: 54px; margin-top: 8px; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; }
.field .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.tl { position: relative; display: flex; gap: 14px; padding: 0 0 18px; width: 100%; text-align: left; }
.tl::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .n { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-family: var(--display); z-index: 1; }
.tl .n.start { background: #2f7cf6; color: #fff; } .tl .n.end { background: var(--volt); color: var(--volt-ink); }
.tl .grow { flex: 1; min-width: 0; padding-top: 4px; }
.tl b { display: block; }
.tl small { display: block; color: var(--mut); }
.chipline { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 14px; background: var(--surface-2); font-weight: 600; font-size: 14px; }

/* viagem A → B */
.ab { position: relative; }
.ab .field input { font-weight: 600; }
.swap { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 1; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); font-size: 18px; font-weight: 800; }
.swap:active { transform: translateY(-50%) scale(.95); }
.mini { width: 34px; height: 34px; border-radius: 10px; margin-right: 34px; }
.ab .field:first-child input { padding-right: 4px; }
.trip-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.trip-sum > div { background: var(--surface-2); border-radius: 14px; padding: 9px 8px; min-width: 0; }
.trip-sum b { display: block; font-family: var(--display); font-size: 18px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.trip-sum span { font-size: 11px; color: var(--mut); }
.trip-sum .warn b { color: var(--broken); }
.seg { display: flex; gap: 4px; padding: 4px; margin: 14px 0 12px; border-radius: 16px; background: var(--surface-2); }
.seg button { flex: 1; height: 40px; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--mut); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.chip.on { background: var(--ink); color: var(--bg); }
.along { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); }
.along:last-of-type { border-bottom: 0; }
.along .km { flex: none; width: 40px; text-align: center; font-size: 11px; color: var(--mut); line-height: 1.1; }
.along .km b { display: block; font-family: var(--display); font-size: 17px; color: var(--ink); }
.along .kw { width: 44px; height: 44px; font-size: 16px; border-radius: 13px; }
.along .grow { flex: 1; min-width: 0; }
.along .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.along small { display: block; color: var(--mut); font-size: 12px; margin-bottom: 3px; }
.along.far { opacity: .5; }
.back { font-weight: 700; font-size: 14px; padding: 2px 0 12px; color: var(--mut); }
.route-info { margin-top: 12px; display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 16px; background: color-mix(in srgb, var(--volt) 22%, var(--surface)); font-size: 14px; }
.trip-pin.end { background: var(--volt); color: var(--volt-ink); border-color: var(--ink); font-size: 15px; }

/* carro */
.big-bat { display: flex; align-items: flex-end; gap: 16px; margin: 6px 0 2px; }
.big-bat .v { font-family: var(--display); font-weight: 800; font-size: 60px; letter-spacing: -.05em; line-height: .9; }
.big-bat .r { color: var(--mut); padding-bottom: 4px; font-size: 13px; }
.big-bat .r b { display: block; color: var(--ink); font-family: var(--display); font-size: 22px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: none; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--volt) var(--v, 50%), var(--surface-2) 0); }
[dir=rtl] input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(270deg, var(--volt) var(--v, 50%), var(--surface-2) 0); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -9px; border-radius: 50%; background: var(--ink); border: 4px solid var(--volt); box-shadow: var(--shadow); }
input[type=range]::-moz-range-track { height: 12px; border-radius: 6px; background: var(--surface-2); }
input[type=range]::-moz-range-progress { height: 12px; border-radius: 6px; background: var(--volt); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 4px solid var(--volt); }
.lbl { display: flex; justify-content: space-between; font-size: 14px; margin-top: 16px; }
.lbl b { font-family: var(--display); font-size: 16px; }
.select { width: 100%; height: 54px; border-radius: 16px; border: 0; background: var(--surface-2); padding: 0 14px; font-size: 16px; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.num { width: 100%; height: 48px; border-radius: 14px; border: 0; background: var(--surface-2); padding: 0 12px; font-size: 16px; font-weight: 600; }
.btn { width: 100%; height: 54px; border-radius: 18px; background: var(--volt); color: var(--volt-ink); font-family: var(--display); font-weight: 800; font-size: 18px; margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.sec { background: var(--surface-2); color: var(--ink); }
.about { font-size: 12px; color: var(--mut); line-height: 1.5; margin-top: 18px; }

/* ---------------------------------------------------------- separadores */
.tabs { position: fixed; z-index: 13; left: 0; right: 0; bottom: 0; height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: flex; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--line); }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--mut); position: relative; isolation: isolate; }
.tabs button.on { color: var(--ink); }
.tabs button.on::before { content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 52px; height: 30px; border-radius: 15px; background: var(--volt); z-index: -1; }
.tabs button.on .i { color: var(--volt-ink); }

/* ---------------------------------------------------------- gaveta */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.5); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto; background: var(--surface); border-radius: 28px 28px 0 0; padding: 10px 16px calc(var(--safe-b) + 18px); animation: up .3s cubic-bezier(.2,.9,.3,1); }
.drawer::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 3px; background: var(--mut); opacity: .35; margin: 0 auto 14px; }
.drawer h2 { font-family: var(--display); font-size: 25px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 4px; }
.drawer .sub { color: var(--mut); margin: 0 0 16px; font-size: 14px; }
.pwr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pwr { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 18px; background: var(--surface-2); text-align: left; border: 2px solid transparent; }
.pwr .sw { width: 34px; height: 34px; border-radius: 11px; flex: none; }
.pwr b { display: block; font-family: var(--display); font-size: 16px; }
.pwr small { color: var(--mut); font-size: 12px; }
.pwr[aria-pressed="true"] { border-color: var(--ink); }
.toggle { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.toggle .grow { flex: 1; }
.toggle small { display: block; color: var(--mut); }
.switch { width: 50px; height: 30px; border-radius: 15px; background: var(--surface-2); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .2s; }
[aria-pressed="true"] > .switch { background: var(--volt); }
[aria-pressed="true"] > .switch::after { transform: translateX(20px); }
.choice { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; background: var(--surface-2); margin-top: 8px; font-weight: 700; font-size: 16px; text-decoration: none; color: inherit; text-align: left; }
.choice .ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; background: var(--surface); flex: none; }
.choice small { display: block; font-weight: 500; color: var(--mut); font-size: 13px; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 10px 0; }
.stepper button { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); font-size: 26px; font-weight: 700; }
.stepper b { font-family: var(--display); font-size: 52px; min-width: 80px; text-align: center; }

.toast { position: fixed; z-index: 30; left: 50%; top: calc(var(--safe-t) + 14px); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 18px; box-shadow: var(--shadow); font-weight: 700; max-width: calc(100vw - 32px); width: max-content; text-align: center; animation: drop .3s cubic-bezier(.2,.9,.3,1.2); }

.me { width: 22px; height: 22px; border-radius: 50%; background: #2f7cf6; border: 4px solid #fff; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,124,246,.5); } 70% { box-shadow: 0 0 0 16px rgba(47,124,246,0); } 100% { box-shadow: 0 0 0 0 rgba(47,124,246,0); } }
.trip-pin { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); border: 3px solid var(--volt); display: grid; place-items: center; font-family: var(--display); font-weight: 800; cursor: pointer; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------- tablet / desktop */
@media (min-width: 900px) {
  :root { --side: 400px; }
  .top { right: auto; width: calc(var(--side) + 24px); }
  .results { width: var(--side); right: auto; }
  .alert { left: calc(var(--side) + 36px); right: auto; top: 16px; width: 460px; }
  .deck { left: 12px; right: auto; top: calc(var(--safe-t) + 74px); bottom: 88px; width: var(--side); flex-direction: column; overflow: hidden auto; scroll-snap-type: none; padding: 0 0 8px; }
  .deck.min { display: flex; }
  .deck-toggle { display: none; }
  .card { width: 100%; }
  .panel { left: 12px; right: auto; top: calc(var(--safe-t) + 74px); bottom: 88px; width: var(--side); max-height: none; border-radius: 26px; padding-bottom: 16px; box-shadow: var(--shadow); }
  .panel.half { max-height: none; }
  .handle { display: none; }
  .tabs { left: 12px; right: auto; bottom: 12px; width: var(--side); height: 64px; border-radius: 22px; border: 0; box-shadow: var(--shadow); padding: 0; }
  .locate { bottom: 24px; }
  .drawer { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 460px; border-radius: 28px; animation: fade .2s; padding-top: 22px; }
  .drawer::before { display: none; }
}
.seg-h { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 2px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.seg-h b { font-family: var(--display); font-size: 15px; }
.seg-h span { font-size: 12px; color: var(--mut); }
.more { width: 100%; padding: 10px; margin-top: 4px; border-radius: 12px; background: var(--surface-2); font-weight: 700; font-size: 13px; }

/* score 0–10 (comunidade) */
.score { display: inline-flex; align-items: baseline; gap: 1px; font-family: var(--display); font-weight: 800; font-size: 12px; padding: 2px 7px; border-radius: 8px; color: #0d0f14; vertical-align: middle; }
.score.hi { background: var(--volt); } .score.mid { background: #ffd23f; } .score.lo { background: var(--broken); color: #fff; }
.score.big { font-size: 15px; padding: 3px 9px; border-radius: 10px; }
.score small { font-size: 10px; font-weight: 700; opacity: .7; }
.summary { margin: -2px 0 8px; font-size: 14px; font-weight: 600; }

/* melhor tomada + avisos */
.plug.best { background: color-mix(in srgb, var(--volt) 14%, transparent); border-radius: 14px; padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
.best-tag { font-size: 11px; font-weight: 800; color: var(--volt-ink); background: var(--volt); padding: 1px 7px; border-radius: 7px; white-space: nowrap; }
.heads-up.slow { background: color-mix(in srgb, #ffd23f 22%, var(--surface)); }
.eco { margin: 8px 2px 0; }

/* fotos e comentários */
.link { display: inline-flex; align-items: center; gap: 5px; font-family: system-ui; font-size: 13px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--ink); background: var(--surface-2); padding: 6px 10px; border-radius: 10px; }
.link .i { width: 16px; height: 16px; }
.photos { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.photos::-webkit-scrollbar { display: none; }
.ph { flex: none; width: 112px; height: 112px; border-radius: 16px; background: var(--surface-2) center / cover no-repeat; }
.photo-big { display: block; width: 100%; max-height: 60vh; object-fit: contain; border-radius: 18px; background: var(--surface-2); }
.comment-box { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 8px; }
.comment-box textarea { flex: 1; min-width: 0; resize: none; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface-2); border: 0; border-radius: 14px; padding: 11px 12px; outline: 0; }
.comment-box button { height: 44px; padding: 0 14px; border-radius: 14px; background: var(--volt); color: var(--volt-ink); font-weight: 800; }
.comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment p { margin: 0 0 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment small { color: var(--mut); }
.rename { width: 28px; height: 28px; border-radius: 9px; background: var(--surface-2); display: inline-grid; place-items: center; vertical-align: middle; margin-left: 4px; }
.rename .i { width: 15px; height: 15px; }

/* perfil */
.small-seg { margin: 6px 0 0; }
.small-seg button { height: 36px; font-size: 13px; }
.garage { padding: 8px 0; }
.garage .pick { text-align: left; min-width: 0; }
.garage.on b { color: var(--ink); }
.garage .icon-btn .i { width: 18px; height: 18px; }
#pkChips .chip { font-size: 12px; padding: 6px 10px; }

/* marca AutoGreen */
.brand-mark { width: 92px; height: auto; border-radius: 14px; background: #000; padding: 10px 12px; margin-bottom: 4px; }
.brand-hero { width: 132px; height: auto; border-radius: 22px; background: #000; padding: 16px 18px; box-shadow: var(--shadow); }
.about-brand { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.about-brand img { width: 48px; height: 48px; border-radius: 14px; }
.about-brand b { display: block; font-family: var(--display); font-size: 18px; }
.about-brand small { color: var(--mut); }

/* Pesquisa ativa como filtro do mapa (ex.: só Prio) */
.search.filtering { box-shadow: 0 0 0 2px var(--volt), var(--shadow); }
/* Crédito obrigatório da imagem de satélite, acima da barra de baixo e dos cartões */
.sat-map .maplibregl-ctrl-bottom-left { display: block; bottom: calc(var(--tabs-h) + var(--safe-b) + var(--deck-h, 0px) + 8px); }
.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib { background: rgba(255,255,255,.7); color: #222; font-size: 10px; padding: 1px 6px; border-radius: 6px; margin: 0 0 0 10px; }

/* Navegação dentro da app */
.nav-top { position: fixed; z-index: 20; top: calc(var(--safe-t) + 10px); left: 12px; right: 12px; max-width: 560px; display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: #0d0f14; color: #fff; box-shadow: var(--shadow); }
.nav-top .nav-ic { font-size: 34px; width: 48px; text-align: center; flex: none; }
.nav-top b { display: block; font-family: var(--display); font-size: 26px; line-height: 1.1; color: var(--volt); }
.nav-top span { display: block; font-size: 16px; line-height: 1.3; margin-top: 2px; }
.nav-bar { position: fixed; z-index: 20; bottom: calc(var(--safe-b) + 12px); left: 12px; right: 12px; max-width: 560px; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.nav-bar b { display: block; font-family: var(--display); font-size: 20px; }
.nav-bar small { color: var(--mut); font-size: 14px; }
.nav-bar .round { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); font-size: 18px; }
.nav-end { height: 44px; padding: 0 18px; border-radius: 22px; background: var(--broken); color: #fff; font-weight: 800; }
body.navigating .top, body.navigating #deck, body.navigating #deckToggle, body.navigating .tabs, body.navigating #results, body.navigating #locateBtn { display: none !important; }

/* Os meus cartões */
.cards-list { max-height: 55vh; overflow-y: auto; margin: 6px -4px 10px; padding: 0 4px; }
.cards-list .h.small { font-size: 12px; margin: 14px 0 4px; }
.card-opt { display: flex; gap: 12px; align-items: flex-start; padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.card-opt input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--volt); flex: none; }
.card-opt small { display: block; color: var(--mut); font-size: 12px; margin-top: 2px; }
.orow.ag-card { background: color-mix(in srgb, var(--volt) 14%, transparent); }
.orow .soon { background: var(--volt); color: var(--volt-ink); font-weight: 800; font-size: 12px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.price-v { font-family: var(--display); font-weight: 800; font-size: 17px; white-space: nowrap; }

/* Desenho das tomadas */
.plug-ic { width: 34px; height: 34px; display: block; }
.plug-ic .o { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.plug-ic .p { fill: currentColor; }
.orow .opi { width: 46px; height: 46px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--ink); }
.plug.no .pi { opacity: .45; }
.orow .grow { flex: 1; min-width: 120px; }
.drawer-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); font-size: 16px; font-weight: 700; display: grid; place-items: center; cursor: pointer; }
#drawerBody > h2:first-of-type { padding-right: 44px; }

/* Fontes dos dados no Perfil: fechadas por defeito, uma por linha */
details.sources { margin: 4px 0 0; }
details.sources summary { cursor: pointer; font-weight: 700; }
details.sources div { padding: 3px 0; border-top: 1px solid var(--line, rgba(127,127,127,.15)); line-height: 1.35; }
