@font-face { font-family: "Placa"; src: url("/fonts/placa.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; } /* Barlow Condensed (OFL 1.1), só letras e números, ver /fonts/LICENCAS.txt */
/* ===================== Padrão visual da Motor =====================
   Carregado por último no app, no /admin e no painel do parceiro: uma escala só de títulos, textos e botões,
   por cima dos estilos antigos de cada tela. Para algo novo, use só estas classes:
   - .t-page    título da página e da ficha (lead, carro, tarefa...)     - .t-sub   subtítulo da página
   - .t-block   título de uma seção (card, bloco de formulário)          - .t-parte título de uma parte dentro da seção
   - .label     rótulo pequeno acima de um grupo                          - .t-small texto de apoio
   - Botões: .btn + .btn-primary (uma ação principal por tela), .btn-secondary, .btn-tertiary;
     ação que apaga ou cancela de vez: .btn-perigo (no rodapé, fica sempre à esquerda).
   Fichas abrem como página na área central (drawers.js, app.css "Ficha (página)"); só o Consultor de IA fica na lateral. */

/* Título de seção: um tamanho só em todas as telas */
.t-block, .cfg-card h2, .form-section h3, .rel-grupo-t.t-block { font-size: var(--fs-xl); line-height: 24px; font-weight: 700; letter-spacing: 0; margin: 0; }
/* Título de uma parte dentro da seção */
.t-parte, .fc-sub, .form-sub, .pm-gt, .mc-pt { font-size: var(--fs-base); line-height: 22px; font-weight: 700; letter-spacing: 0; }
/* Rótulo pequeno acima de um grupo (cinza) */
.label, .group-title, .fx-lbl, .rel-grupo-t, .rx-t { font: 600 14px/20px var(--font-text); color: var(--ink-muted); letter-spacing: 0; text-transform: none; }
.t-small { font-size: var(--fs-md); line-height: 20px; }

/* Ação que apaga ou cancela de vez: texto vermelho; no rodapé da ficha e dos diálogos, à esquerda das outras */
.btn-perigo { color: var(--danger) !important; }
.drawer-foot .btn-perigo, .dlg-foot .btn-perigo { margin-right: auto; }

/* Cabeçalho da página e da ficha com o mesmo espaçamento */
.page-head .t-sub, .drawer-title .t-sub { margin-top: var(--s1); }

/* ===================== Fichas em telas largas (a partir de 1200 px) =====================
   - data-layout="com-lado": conteúdo principal + painel fixo à direita (lead: conversa + Atendimento e Cliente)
   - formulários (.form direto na ficha): campos curtos lado a lado; textos longos, listas e avisos na linha inteira
   - data-layout="grade": blocos de resumo em colunas, como um painel
   Abaixo de 1200 px tudo volta para uma coluna, como antes. */
@media (min-width: 1200px) {
  /* conversa + painel: cada coluna rola sozinha (sem barra de rolagem da página), rodapés alinhados na mesma altura,
     o painel é uma superfície própria (sem linha separando) e as abas dele são um seletor */
  .drawer[data-layout="com-lado"] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 420px); grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
  .drawer[data-layout="com-lado"] > .drawer-head { grid-column: 1 / -1; }
  .drawer[data-layout="com-lado"] > .drawer-body { grid-column: 1; grid-row: 2; overflow-y: auto; min-height: 0; }
  /* relative (não static): a barra de gravação de áudio (.rec-bar, absoluta) fica na largura da conversa, sem passar por baixo do painel */
  .drawer[data-layout="com-lado"] > .drawer-foot { grid-column: 1; grid-row: 3; position: relative; min-height: var(--pe-h); }
  .drawer[data-layout="com-lado"] .fx-linha:not(:has(.fx-acts > *)) { display: none; } /* a situação já está no painel */
  .drawer[data-layout="com-lado"] .fx-linha .fx-sit { display: none; }
  .drawer-lado { --pe-h: 76px; grid-column: 2; grid-row: 2 / 4; min-height: 0; display: flex; flex-direction: column; background: var(--surface-raised); }
  .drawer[data-layout="com-lado"] { --pe-h: 76px; }
  .drawer-lado > .lado-tabs { flex: none; display: flex; gap: 2px; margin: var(--s4) var(--s5) 0; padding: 3px; border: 0; border-radius: var(--r-sm) 0 var(--r-sm) 0; background: var(--surface-high); }
  .drawer-lado > .lado-tabs .tab { flex: 1; height: 34px; border-radius: var(--r-xs) 0 var(--r-xs) 0; font-size: var(--fs-md); }
  .drawer-lado > .lado-tabs .tab[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
  .drawer-lado > .lado-tabs .tab[aria-selected="true"]::after { display: none; }
  .drawer-lado > .lado-corpo { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s6); }
  .drawer-lado > .lado-pe { flex: none; min-height: var(--pe-h); display: flex; flex-wrap: nowrap; align-items: center; gap: var(--s2); padding: var(--s3) var(--s5); }
  .drawer-lado > .lado-pe .btn { height: 44px; }
  .drawer-lado > .lado-pe .fx-contato { margin-right: auto; }
  /* rodapé de ações no painel (mesmo desenho do rodapé de negócios: um botão principal + ⋮) */
  .drawer-lado > .lado-pe.neg-foot .neg-foot-info { flex: 1 1 auto; }
  .drawer-lado > .lado-pe.neg-foot .neg-mais-btn { flex: none; width: 44px; min-width: 44px; padding: 0; justify-content: center; }
  /* conteúdo principal com painel ao lado: grupos de campos curtos em até 4 colunas */
  .drawer[data-layout="com-lado"] > .drawer-body .fgrid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .drawer[data-layout="com-lado"] > .drawer-body:not(.chat-body) { gap: var(--s7); }
  /* mensagens com largura confortável de leitura, mesmo com a conversa larga */
  .drawer[data-layout="com-lado"] .msg { max-width: min(82%, 680px); }

  /* em telas largas o formulário pode ir até 1440 px (até 5 colunas); a conversa e a grade usam a largura toda */
  .drawer > .drawer-body { max-width: 1440px; }
  .drawer[data-layout] > .drawer-body:is(.chat-body), .drawer[data-layout="grade"] > .drawer-body, .drawer[data-layout="com-lado"] > .drawer-body { max-width: none; }

  /* formulário em colunas: o formulário da ficha e as seções que abrem e fecham (cadastro do carro, ficha da venda) */
  .drawer:not([data-layout="com-lado"]) > .drawer-body > .form, .drawer-body .fc-in { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: var(--s6); row-gap: var(--s5); align-items: start; }
  .drawer:not([data-layout="com-lado"]) > .drawer-body > .form > *, .drawer-body .fc-in > * { grid-column: 1 / -1; margin-top: 0; }
  .drawer:not([data-layout="com-lado"]) > .drawer-body > .form > .fgrid, .drawer-body .fc-in > .fgrid { display: contents; }
  /* meia linha só para campo simples (um texto, número, data ou lista de escolha) */
  :is(.drawer:not([data-layout="com-lado"]) > .drawer-body > .form, .drawer-body .fc-in) > :is(.field, .fgrid > .field):is(:has(> input:not([type=checkbox]):not([type=radio]):not([type=file])), :has(> select), :has(> .select-wrap), :has(> .dp-btn), :has(> button.dp)):not(:has(textarea, .photos, .kinds, .segmented, .radios, .chips, .checks, [role=group])) { grid-column: auto; }
  :is(.drawer:not([data-layout="com-lado"]) > .drawer-body > .form, .drawer-body .fc-in) > .fgrid > .field { grid-column: auto; }

  /* permissões (modelo de acesso e ficha da pessoa): grupos em 2 colunas */
  .drawer-body .pm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s7); align-items: start; }

  /* resumo em grade */
  .drawer[data-layout="grade"] > .drawer-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: var(--s6) var(--s7); max-width: none; align-items: start; }
  .drawer[data-layout="grade"] > .drawer-body > :is(.notice, .note, .vf-resumo, .larga, .empty) { grid-column: 1 / -1; }
}

/* ===================== Menos linhas, mais espaço =====================
   Separação por espaço e por superfície, não por risco: as seções da ficha não têm linha entre elas,
   o rodapé fixo da ficha se separa com uma sombra leve e as barras de rolagem são finas. */
.fx-body > .fx-sec + .fx-sec, .fx-body > .fx-sec + .fx-lgpd { border-top: 0 !important; padding-top: 0 !important; }
.drawer-foot { border-top: 0; box-shadow: 0 -8px 18px -12px rgba(0, 0, 0, .22); }
.drawer[data-layout="com-lado"] > .drawer-foot.chat-foot { box-shadow: none; background: var(--surface); display: flex; flex-direction: column; justify-content: center; }
/* :where() não pesa: assim as faixas que escondem a barra (abas, filtros, seletores) continuam sem barra dentro da ficha */
:where(.drawer, .drawer *, .drawer-lado *) { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

/* Faixas que rolam só para o lado (abas, filtros, seletores): nunca rolam para cima e para baixo e não mostram barra.
   O traço da aba escolhida fica dentro da faixa (antes passava 1 px e criava uma rolagem vertical à toa). */
.ptabs, .mf-tabs, .scroller, .segmented, .fx-tl-f, .neg-pills, .drawer .tabs { overflow-y: hidden; scrollbar-width: none; }
.ptabs::-webkit-scrollbar, .segmented::-webkit-scrollbar { display: none; }
.ptabs .tab[aria-selected="true"]::after, .mf-tabs a.tab[aria-current="page"]::after { bottom: 0; }

/* ===================== Seções que abrem e fecham =====================
   Painel do lead e da avaliação (e as abas Atendimento e Cliente no celular): o título é o botão;
   fechada, a seção mostra só o título (e a ação ao lado dele, como Agendar). */
.sec-tog { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 28px; padding: 0; margin: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 4px; }
.fx-head .sec-tog { width: auto; flex: 1; }
.sec-tog:hover { color: var(--ink); }
.sec-tog:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sec-tog .sec-chev { flex: none; color: var(--ink-muted); transition: transform .15s ease; }
.sec-tog[aria-expanded="false"] .sec-chev { transform: rotate(-90deg); }
section.sec-fechada > :not(h3):not(.fx-head) { display: none !important; }
section.sec-fechada > h3, section.sec-fechada > .fx-head { margin-bottom: 0; }

/* ===================== Campos lado a lado sempre alinhados =====================
   Regra: título, campo e dica de cada coluna ficam na mesma linha da grade (subgrid). Quando um título quebra
   em duas linhas, os vizinhos descem junto e as caixas continuam alinhadas. Vale para toda grade de campos. */
.fgrid > .field:not(:has(> :nth-child(4))),
.drawer-body .fc-in > .fgrid > .field:not(:has(> :nth-child(4))) { display: grid; grid-row: span 3; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); justify-content: normal; row-gap: 6px; align-content: start; }
/* o título encosta no campo só nos campos em grade; campo com mais de uma dica continua em coluna, com o título à esquerda */
.fgrid > .field:not(:has(> :nth-child(4))) > :is(label, .label) { align-self: end; }
/* dois campos juntos numa mesma coluna (Cidade e UF): acompanham as linhas dos vizinhos */
/* só com os dois lado a lado (telas largas); em uma coluna cada campo volta a ter as suas linhas */
@media (min-width: 861px) { .fgrid > .fgrid:not(:has(> :nth-child(3))) { grid-row: span 3; grid-template-rows: subgrid; row-gap: 6px; } }
@media (min-width: 1200px) {
  :is(.drawer:not([data-layout="com-lado"]) > .drawer-body > .form, .drawer-body .fc-in) > .field:not(:has(> :nth-child(4))) { display: grid; grid-row: span 3; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); justify-content: normal; row-gap: 6px; align-content: start; }
  :is(.drawer:not([data-layout="com-lado"]) > .drawer-body > .form, .drawer-body .fc-in) > .field:not(:has(> :nth-child(4))) > label { align-self: end; }
  /* ficha com painel ao lado (carro, avaliação): a coluna do meio é mais estreita, então cabem colunas a partir de 200 px (2 num notebook de 1280) */
  .drawer[data-layout="com-lado"] > .drawer-body .fc-in { grid-template-columns: repeat(auto-fill, minmax(max(200px, 22%), 1fr)); }
}

/* ===================== Estoque em lista =====================
   Mesmas informações do cartão, em linhas: foto, carro, ano e km, placa, situação, dias no pátio e preço. */
.vista-btn { flex: none; }
.vlist { display: flex; flex-direction: column; gap: var(--s2); }
.vl { position: relative; display: grid; grid-template-columns: 96px minmax(0, 2.6fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, .9fr) minmax(0, .7fr) minmax(0, .9fr); align-items: center; gap: var(--s4); padding: var(--s2) var(--s4) var(--s2) var(--s2); background: var(--surface-raised); border-radius: var(--r-sm) 0 var(--r-sm) 0; }
.vl:not(.vl-cab):hover { background: var(--surface-high); }
.vl.sold { opacity: .55; }
.vl-cab { background: none; padding-top: 0; padding-bottom: 0; font-size: var(--fs-sm); line-height: 18px; font-weight: 600; color: var(--ink-muted); }
.vl-ph { width: 96px; aspect-ratio: 16 / 10; border-radius: var(--r-xs) 0 var(--r-xs) 0; overflow: hidden; background: var(--surface-high); display: grid; place-items: center; }
.vl-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vl-ph svg.car { width: 70%; height: auto; color: var(--line); }
.vl-nome { display: grid; min-width: 0; }
.vl-nome b { font-size: var(--fs-base); line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-nome > span, .vl-ano > span { font-size: var(--fs-sm); line-height: 18px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-ano { display: grid; font-size: var(--fs-md); line-height: 20px; }
.vl-placa { font-family: "Placa", var(--font-mono, ui-monospace, monospace); font-weight: 600; font-size: var(--fs-lg); letter-spacing: .05em; }
.vl-dias { font-size: var(--fs-md); color: var(--ink-muted); font-weight: 600; }
.vl-dias.old { color: var(--danger); }
.vl-preco { font-weight: 700; font-size: var(--fs-lg); text-align: right; white-space: nowrap; }
.vl-cab > span:last-child { text-align: right; }
.vl .hit { position: absolute; inset: 0; background: none; border: 0; cursor: pointer; border-radius: inherit; }
@media (max-width: 860px) {
  .vl-cab { display: none; }
  .vl { grid-template-columns: 84px minmax(0, 1fr) auto; grid-template-areas: "ph nome preco" "ph ano dias"; row-gap: 2px; column-gap: var(--s3); padding: var(--s2); }
  .vl-ph { grid-area: ph; width: 84px; }
  .vl-nome { grid-area: nome; }
  .vl-ano { grid-area: ano; display: block; font-size: var(--fs-sm); color: var(--ink-muted); }
  .vl-ano > span::before { content: " · "; }
  .vl-preco { grid-area: preco; font-size: var(--fs-base); }
  .vl-dias { grid-area: dias; text-align: right; font-size: var(--fs-sm); }
  .vl-placa, .vl-st { display: none; }
}

/* ===================== Página do carro (veiculo-pagina.js) ===================== */
.vp-av { width: 104px; height: 78px; border-radius: var(--r-sm) 0 var(--r-sm) 0; overflow: hidden; background: var(--surface-high); display: grid; place-items: center; flex: none; }
.vp-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vp-av svg.car { width: 80%; height: auto; color: var(--line); }
.vp-linha { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); margin: var(--s2) 0 0; }
.drawer-title.has-av:has(.vp-av) { align-items: flex-start; gap: var(--s4); }
@media (max-width: 640px) { .vp-av { width: 76px; height: 57px; } }
/* Placa no padrão Mercosul: faixa azul com BRASIL e a bandeira, letras na fonte condensada da placa (public/fonts/placa.woff2) */
.vp-placa { display: inline-flex; flex-direction: column; width: 112px; border: 1.5px solid #1f2328; border-radius: 5px; background: #fff; overflow: hidden; line-height: 1; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.vp-placa i { font-style: normal; background: #003399; color: #fff; font-size: 7.5px; font-weight: 700; letter-spacing: .16em; padding: 2px 4px 2px; display: grid; grid-template-columns: 13px 1fr 13px; align-items: center; text-align: center; }
.vp-placa i svg { width: 13px; height: 9px; display: block; border-radius: 1px; }
.vp-placa b { font-family: "Placa", var(--font-display); font-weight: 600; font-size: var(--fs-2xl); color: #1f2328; text-align: center; letter-spacing: .05em; padding: 1px 0 1px; }
/* Etiquetas: 4 sentidos fixos em todo o app e no /admin: (sem classe) neutro · good = ok · warn = atenção · danger = atrasado ou problema.
   strong = fechado/final (Vendido, Assinado); rep = destino Repasse */
.badge.warn { background: #fff4d6; color: #8a5a00; }
:root[data-theme="dark"] .badge.warn { background: #3b2f12; color: #f3c766; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.warn { background: #3b2f12; color: #f3c766; } }
/* números do carro numa faixa só, sempre numa linha (no celular, 3 por linha) */
.vp-nums { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s4); background: var(--surface-raised); border-radius: var(--r-md) 0 var(--r-md) 0; padding: var(--s3) var(--s4); }
.vp-num { display: grid; gap: 1px; min-width: 0; align-content: start; }
.vp-num > span { font-size: var(--fs-xs); line-height: 16px; color: var(--ink-muted); font-weight: 600; }
.vp-num b { font-size: var(--fs-lg); line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .vp-nums { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); } .vp-num b { font-size: var(--fs-base); } }
.vp-num small { font-size: var(--fs-xs); line-height: 16px; color: var(--ink-muted); }
.vp-seg { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vp-seg button { height: 38px; padding: 0 var(--s2); font-size: var(--fs-sm); justify-content: center; text-align: center; }
.vp-prog { height: 6px; border-radius: 3px; background: var(--surface-high); overflow: hidden; margin-top: var(--s3); }
.vp-prog i { display: block; height: 100%; background: var(--mark); border-radius: 3px; }
.vp-pends { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.vp-pend { display: flex; align-items: flex-start; gap: var(--s2); }
.vp-pend .vp-chk { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; background: none; color: var(--ink-muted); cursor: pointer; border-radius: 6px; padding: 0; }
.vp-pend .vp-chk:hover { background: var(--surface-high); color: var(--ink); }
.vp-pend .vp-chk svg { width: 20px; height: 20px; }
.vp-pend-tx { flex: 1; min-width: 0; display: grid; gap: 2px; padding-top: 6px; }
.vp-pend-tx b { font-size: var(--fs-md); line-height: 20px; font-weight: 600; }
.vp-pend-tx small { font-size: var(--fs-xs); line-height: 16px; color: var(--ink-muted); }
.vp-pend.feita .vp-pend-tx b { text-decoration: line-through; color: var(--ink-muted); }
.vp-pend-fotos { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.vp-pend-fotos img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; cursor: zoom-in; }
.vp-pend-acts { display: flex; gap: 2px; flex: none; opacity: .7; }
.vp-pend:hover .vp-pend-acts, .vp-pend:focus-within .vp-pend-acts { opacity: 1; }
.vp-feitas summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-muted); margin-top: var(--s2); }
.vp-deb { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.vp-deb-btn { display: grid; place-items: center; height: 52px; padding: var(--s2) var(--s3); background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-sm) 0 var(--r-sm) 0; text-decoration: none; color: #1f2328; transition: border-color .15s, box-shadow .15s; }
.vp-deb-btn:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.vp-deb-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.vp-deb-btn img { max-width: 100%; max-height: 28px; width: auto; height: auto; object-fit: contain; display: block; }
.vp-deb-btn b { font-size: var(--fs-md); }
.vp-nota-nova { display: grid; gap: var(--s2); }
.vp-nota-nova textarea { width: 100%; min-height: 64px; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font: inherit; resize: vertical; }
.vp-nota-nova .btn { justify-self: end; }
.vp-notas { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: var(--s2); }
.vp-notas li { background: var(--surface); border-radius: var(--r-sm) 0 var(--r-sm) 0; padding: var(--s2) var(--s3); }
.vp-notas p { margin: 0; font-size: var(--fs-md); line-height: 20px; }
.vp-notas small { font-size: var(--fs-xs); color: var(--ink-muted); }
.vp-hist li { font-size: var(--fs-sm); }
.vp-prontas { display: flex; flex-wrap: wrap; gap: 6px; }
.vp-prontas .pill { height: 30px; font-size: var(--fs-sm); }
.drawer-foot.vp-pe-cad { justify-content: flex-end; align-items: center; }
.drawer-foot.vp-pe-cad:not(.sujo) { display: none; }
.vp-mudou { margin-right: auto; display: inline-flex; align-items: center; gap: var(--s2); font-weight: 600; font-size: var(--fs-md); }
.vp-mudou svg { width: 16px; height: 16px; }

/* Seletor de opções (.segmented): a opção ativa fica verde, como os botões principais da plataforma */
.segmented button[aria-pressed="true"] { background: var(--action); color: var(--on-action); box-shadow: none; }
.segmented button[aria-pressed="true"]:hover { color: var(--on-action); }

/* Anúncios do carro: tabela com o site e os portais, chave por linha (veiculo-pagina.js, vpAnuncios) */
.vp-an-wrap { background: var(--surface-raised); border-radius: var(--r-md) 0 var(--r-md) 0; overflow: hidden; }
.vp-an { width: 100%; border-collapse: collapse; }
.vp-an thead th { text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-muted); padding: var(--s3) var(--s4) var(--s2); }
.vp-an tbody th, .vp-an tbody td { padding: var(--s3) var(--s4); vertical-align: middle; text-align: left; font-weight: 400; }
.vp-an tbody tr + tr > * { box-shadow: inset 0 1px 0 var(--line-soft); }
.vp-an-nome { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.vp-an-nome > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.vp-an-nome b { font-weight: 600; }
.vp-an-nome > span:last-child > span { font-size: var(--fs-xs); color: var(--ink-muted); }
.vp-an .ml-mark { width: 32px; height: 32px; flex: none; }
.vp-an-ic { display: grid; place-items: center; border-radius: 8px; background: var(--surface-high); color: var(--ink); }
.vp-an-ic svg { width: 18px; height: 18px; }
.vp-an-st { color: var(--ink-muted); font-size: var(--fs-md); }
.vp-an-sit { display: block; }
.vp-an tr.on .vp-an-sit { color: var(--ink); font-weight: 600; }
.vp-an tr.enviando .vp-an-sit { color: var(--ink-muted); font-weight: 400; }
.vp-an-st .ml-erro { display: flex; gap: 6px; align-items: flex-start; margin: 2px 0 0; padding: 0; background: none; font-size: var(--fs-sm); }
.vp-an-st .ml-erro svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.vp-an-links { display: flex; gap: var(--s3); margin-top: 2px; font-size: var(--fs-sm); }
.vp-an-links .textlink { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.vp-an-acao { width: 1%; white-space: nowrap; text-align: right !important; }
@media (max-width: 640px) {
  .vp-an thead { display: none; }
  .vp-an tbody tr { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: var(--s3); row-gap: 2px; padding: var(--s3) var(--s4); }
  .vp-an tbody tr + tr { box-shadow: inset 0 1px 0 var(--line-soft); }
  .vp-an tbody tr > * { box-shadow: none !important; padding: 0; }
  .vp-an tbody th { grid-column: 1; grid-row: 1; }
  .vp-an-st { grid-column: 1; grid-row: 2; padding-left: calc(32px + var(--s3)) !important; font-size: var(--fs-sm); }
  .vp-an-acao { grid-column: 2; grid-row: 1 / span 2; }
}
.vp-an-acao .btn { min-height: 36px; height: 36px; padding: 0 var(--s4); }

/* ===================== Ajustes de experiência (avaliação de layout, dez/2026) ===================== */
/* Primeiros passos: título, barra e "Ver todos" numa linha; fechada (pp-fino), mostra só o que falta */
.passos-ini .pp-head { align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.passos-ini .pp-tit { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px var(--s3); min-width: 0; }
.passos-ini .pp-head .pp-barra { flex: 1 1 140px; min-width: 100px; margin: 0; }
.passos-ini .pp-tog, .agir-mais { flex: none; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; }
.passos-ini .pp-lista { margin-top: var(--s3); }
.passos-ini.pp-fino { padding-top: var(--s3); padding-bottom: var(--s3); }
.passos-ini.pp-fino .pp-lista { margin-top: var(--s1); }
/* "Precisa de você agora": 5 primeiros e o botão para ver o resto */
.agir-mais { display: inline-flex; margin-top: var(--s3); min-height: 32px; }

/* Barra de filtros numa linha só: busca à esquerda, filtros ao lado */
.toolbar.tb-linha { justify-content: flex-start; flex-wrap: wrap; }
.toolbar.tb-linha .search { margin-left: 0; }
.toolbar.tb-linha .scope { margin: 0; }
@media (max-width: 860px) { .toolbar.tb-linha .scope { display: none; } .toolbar.tb-linha:not(:has(.search)) { display: none; } }
/* título de seção com a busca na mesma linha (Equipe) */
.sec-linha { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.sec-linha .group-title { margin: 0; }
.sec-linha .toolbar { margin: 0; flex: 0 1 320px; }
.sec-linha .toolbar .search { flex: 1 1 auto; margin: 0; }

/* Menu ⋮ "Mais opções" (menuMais em core.js): botão quadrado só com o ícone, da altura dos outros botões */
.menu-mais { position: relative; display: inline-flex; }
.btn.btn-icone { width: 44px; padding: 0; flex: none; }
.btn.btn-icone svg.lucide { width: 20px; height: 20px; }
.mm-lista { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 230px; padding: 6px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md) 0 var(--r-md) 0; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); }
.mm-lista[hidden] { display: none; }
.mm-lista :is(a, button) { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: var(--fs-base); font-weight: 500; text-decoration: none; text-align: left; white-space: nowrap; cursor: pointer; }
.mm-lista :is(a, button):hover, .mm-lista :is(a, button):focus-visible { background: var(--surface-raised); outline: none; }
.mm-lista svg { width: 18px; height: 18px; flex: none; color: var(--ink-muted); }
.mm-lista .mm-perigo, .mm-lista .mm-perigo svg { color: var(--danger); }
.mm-lista .mm-perigo:first-of-type:not(:first-child) { margin-top: 6px; }
@media (max-width: 640px) { .loja-acoes .menu-mais .mm-lista { right: auto; left: 0; } }

/* Tela vazia com o botão para começar */
.empty > .btn { display: flex; width: fit-content; margin: var(--s4) auto 0; }

/* Barras com nome comprido (motivos de perda, despesas, uso): o nome aparece inteiro */
.fn-largo .frow { grid-template-columns: minmax(0, 200px) minmax(0, 1fr) minmax(32px, max-content); }
.fn-largo .frow .lbl { white-space: normal; overflow: visible; }
@media (max-width: 640px) { .fn-largo .frow { grid-template-columns: minmax(0, 132px) minmax(0, 1fr) minmax(28px, max-content); } }

/* /admin: auditoria por dia; ficha da loja */
.aud-dia { display: flex; align-items: baseline; gap: var(--s2); margin: var(--s5) 0 var(--s3); font-size: var(--fs-md); line-height: 20px; font-weight: 600; color: var(--ink); }
.aud-dia:first-child { margin-top: 0; }
.aud-dia span { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-muted); }
.dash > .dash-larga { grid-column: 1 / -1; }
.dash > .dash-larga .kv { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
/* Prospecção: Estado estreito, Cidades com o resto da linha, os dois alinhados pelo topo */
.fgrid.pr-g3 { grid-template-columns: 104px minmax(0, 1fr); align-items: start; }
.fgrid.pr-g3 > .field { display: flex; grid-row: auto; }
.fgrid.pr-g3 > .field > :is(label, .label) { align-self: auto; }
/* /admin, Lojas no celular: os botões ficam embaixo do título (sem sair da tela) e cada loja vira um bloco,
   com saúde e pagamento à vista, sem rolar para o lado */
@media (max-width: 640px) {
  .st-table, .st-table tbody { display: block; width: 100%; }
  .st-table thead { display: none; }
  .st-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--s3); align-items: center; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line-soft); }
  .st-table tbody tr:last-child { border-bottom: 0; }
  #stores-table .st-table tbody td { padding: 0; border: 0; height: auto; min-height: 0; white-space: normal; }
  #stores-table .st-table tbody tr { height: auto; }
  .st-table tbody td:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; min-width: 0; }
  .st-table tbody td:nth-child(2) { grid-column: 2; grid-row: 1; justify-self: end; }
  .st-table tbody td:nth-child(4) { grid-column: 2; grid-row: 2; justify-self: end; }
  .st-table tbody td:nth-child(3) { grid-column: 1; grid-row: 3; font-size: var(--fs-sm); color: var(--ink-muted); }
  .st-table tbody td:nth-child(8) { grid-column: 2; grid-row: 3; justify-self: end; color: var(--ink-muted); }
  .st-table tbody td:nth-child(8)::before { content: "acesso "; }
  .st-table tbody td:nth-child(5), .st-table tbody td:nth-child(6), .st-table tbody td:nth-child(7) { display: none; }
}

/* Página do carro: a partir de 1280 px os números ficam no cabeçalho, ao lado do nome (o lado direito ficava vazio),
   e a faixa do começo da aba some. A largura acompanha quantos números há (--n: 5, ou 3 para quem não vê custos).
   Com pouco espaço (1280 a 1439 px com o menu aberto) saem os textos pequenos, que viram dica ao passar o mouse.
   Abaixo de 1280 px e no celular continua a faixa na aba. */
.vp-nums-topo { display: none; }
@media (min-width: 1280px) {
  .drawer-title .vp-nums-topo { display: grid; flex: 2 1 calc(var(--n, 5) * 124px); min-width: calc(var(--n, 5) * 100px); max-width: calc(var(--n, 5) * 176px); margin-left: auto; align-self: stretch; align-content: center; }
  .drawer-title.has-av:has(.vp-nums-topo) .dt-txt { flex: 1 1 280px; }
  .drawer-body > .vp-nums-corpo { display: none; }
}
@media (min-width: 1280px) and (max-width: 1439.98px) {
  body:not(.side-min) .drawer-title .vp-nums-topo { flex: 0 1 calc(var(--n, 5) * 108px); min-width: calc(var(--n, 5) * 96px); max-width: calc(var(--n, 5) * 120px); gap: var(--s3); }
  body:not(.side-min) .drawer-title .vp-nums-topo small { display: none; }
}
/* Página do carro (computador): a foto ocupa a altura toda do bloco do nome (título, versão e placa),
   alinhada em cima e embaixo com o texto e com a faixa de números */
@media (min-width: 861px) {
  .drawer-title.has-av:has(.vp-av) { align-items: stretch; }
  .drawer-title .vp-av { width: 148px; height: auto; min-height: 78px; align-self: stretch; }
}

/* Ficha com painel ao lado (carro, avaliação): as abas ficam na coluna do meio, abaixo da linha do cabeçalho;
   o painel da direita começa na linha, na mesma altura das abas */
.drawer > .drawer-tabs { margin: 0; padding: var(--s3) var(--s6) 0; border-bottom: 0; background: var(--surface); }
@media (min-width: 1200px) {
  .drawer[data-layout="com-lado"] { grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .drawer[data-layout="com-lado"] > .drawer-tabs { grid-column: 1; grid-row: 2; }
  .drawer[data-layout="com-lado"] > .drawer-body { grid-row: 3; }
  .drawer[data-layout="com-lado"] > .drawer-foot { grid-row: 4; }
  .drawer[data-layout="com-lado"] > .drawer-lado { grid-row: 2 / 5; }
}
/* Menu lateral: o logotipo é o botão de recolher e abrir o menu (não há ícone ao lado dele) */
.side-logo { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; transition: opacity .15s; }
.side-logo:hover { opacity: .75; }
.side-logo:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.side .side-top .side-logo .logo { margin: 0; }

/* Ficha com painel ao lado e cabeçalho sem nada à direita (lead, avaliação): o painel ocupa a altura toda,
   do topo da tela ao rodapé, e o cabeçalho fica só na coluna do meio. Na página do carro (números no cabeçalho) não vale. */
@media (min-width: 1200px) {
  .drawer[data-layout="com-lado"][data-lado="alto"] > .drawer-head { grid-column: 1; }
  .drawer[data-layout="com-lado"][data-lado="alto"] > .drawer-lado { grid-row: 1 / 5; }
}

/* ===================== Ficha do lead e da avaliação mais limpa (painel na altura toda) =====================
   Uma superfície só por coluna, sem linhas: a coluna da conversa tem a mesma cor do topo ao rodapé e o painel
   tem a sua. Abas sublinhadas (como na página do carro), aviso de espera numa linha, ações do SDR como lista
   e os dois rodapés na mesma altura. */
@media (min-width: 1200px) {
  .drawer[data-layout="com-lado"][data-lado="alto"] { --pe-h: 76px; background: var(--surface); }
  .drawer[data-lado="alto"] > .drawer-head { border-bottom: 0; background: transparent; position: static; }
  .drawer[data-lado="alto"] > .drawer-body, .drawer[data-lado="alto"] > .drawer-foot { background: transparent; }
  .drawer[data-lado="alto"] > .drawer-foot { box-shadow: none; min-height: var(--pe-h); height: var(--pe-h); padding-top: 0; padding-bottom: 0; display: flex; align-items: center; }
  .drawer[data-lado="alto"] > .drawer-foot .closed-win { width: 100%; padding: 0; flex-wrap: nowrap; }
  .drawer[data-lado="alto"] > .drawer-foot .closed-win span { flex: 1 1 auto; font-size: var(--fs-sm); line-height: 18px; }
  .drawer[data-lado="alto"] > .drawer-foot .closed-win b { display: inline; font-size: var(--fs-md); font-weight: 600; }
  .drawer[data-lado="alto"] > .drawer-foot .closed-win b::after { content: " · "; font-weight: 400; color: var(--ink-muted); }
  .drawer[data-lado="alto"] .drawer-lado > .lado-pe { height: var(--pe-h); }
  /* voltar: só o texto com a seta (no passar do mouse, só muda a cor) */
  .drawer[data-lado="alto"] .drawer-bar .back:hover { background: none; color: var(--ink); }
  /* Atendimento e Cliente: abas sublinhadas */
  .drawer[data-lado="alto"] .drawer-lado > .lado-tabs { gap: var(--s5); margin: var(--s5) var(--s5) 0; padding: 0; background: none; border-radius: 0; }
  .drawer[data-lado="alto"] .drawer-lado > .lado-tabs .tab { flex: none; height: auto; padding: 0 0 var(--s2); border-radius: 0; font-size: var(--fs-base); background: none; box-shadow: none; }
  .drawer[data-lado="alto"] .drawer-lado > .lado-tabs .tab[aria-selected="true"] { background: none; box-shadow: none; }
  .drawer[data-lado="alto"] .drawer-lado > .lado-tabs .tab[aria-selected="true"]::after { display: block; }
  /* aviso de espera: uma linha com um ponto vermelho, sem o bloco rosa */
  .drawer[data-lado="alto"] .drawer-lado .notice { background: none; padding: 0; border-radius: 0; flex-direction: column; align-items: flex-start; gap: 2px; font-weight: 600; }
  .drawer[data-lado="alto"] .drawer-lado .notice > span { display: flex; align-items: center; gap: var(--s2); flex: 0 1 auto; min-width: 0; }
  .drawer[data-lado="alto"] .drawer-lado .notice > span::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
  .drawer[data-lado="alto"] .drawer-lado .notice .btn-tertiary { height: auto; min-height: 24px; padding: 0; margin-left: calc(8px + var(--s2)); color: var(--ink-muted); font-weight: 500; font-size: var(--fs-sm); white-space: nowrap; }
  .drawer[data-lado="alto"] .drawer-lado .notice .btn-tertiary:hover { color: var(--ink); }
  /* ações do SDR: itens de lista com ícone, todos iguais */
  .drawer[data-lado="alto"] .drawer-lado [data-act="sdr-lead"] { width: 100%; justify-content: flex-start; height: 36px; padding: 0; border: 0; background: none; box-shadow: none; font-weight: 500; color: var(--ink); }
  .drawer[data-lado="alto"] .drawer-lado [data-act="sdr-lead"]:hover { color: var(--ink); background: none; text-decoration: underline; text-underline-offset: 3px; }
  .drawer[data-lado="alto"] .drawer-lado [data-act="sdr-lead"] svg { color: var(--ink-muted); }
}

/* ===================== Correções da leitura (dez/2026) ===================== */
/* /admin, Avisos: o formulário e a lista lado a lado em telas largas */
.dash.av-dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .dash.av-dash { grid-template-columns: minmax(0, 1fr); } }
/* Integrações: o rodapé de cada cartão (Conectar, Desconectar) sempre embaixo, na mesma altura entre os cartões */
.igrid > .ic { height: 100%; }
.igrid > .ic > .act { margin-top: auto; }
/* Configurações: títulos de grupo no menu */
.cfg-nav .cfg-grp { display: block; padding: var(--s4) var(--s3) var(--s1); font-size: var(--fs-xs); line-height: 16px; font-weight: 600; color: var(--ink-muted); }
.cfg-nav .cfg-grp:first-child { padding-top: 0; }
@media (max-width: 860px) { .cfg-nav .cfg-grp { padding: var(--s5) 0 var(--s2); } .cfg-nav .cfg-grp + a { border-top: 0; } }
/* Ficha de fechamento: situação das formas de pagamento com ícone e cor */
.fc-ok, .fc-falta { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.fc-ok { color: var(--accent-text); }
.fc-ok svg, .fc-falta svg { width: 16px; height: 16px; flex: none; }
/* Formulário curto (registrar lead, nova tarefa): janela no centro, com a página ao fundo */
@media (min-width: 861px) {
  .pagina.pg-curta { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--s6); background: rgba(10, 12, 8, .45); animation: pop .14s ease; }
  .pagina.pg-curta > .drawer { position: relative; width: min(760px, 100%); height: auto; max-height: min(86vh, 860px); border-radius: var(--r-lg) 0 var(--r-lg) 0; box-shadow: 0 24px 64px rgba(0, 0, 0, .28); overflow: hidden; }
  .pagina.pg-curta > .drawer > .drawer-head { position: static; border-bottom: 0; }
  .pagina.pg-curta > .drawer > .drawer-body { overflow-y: auto; max-width: none; padding-top: var(--s4); }
  .pagina.pg-curta > .drawer > .drawer-foot { position: static; }
  .pagina.pg-curta .drawer-bar .back { display: none; }
  .pagina.pg-curta .drawer-bar { min-height: 0; margin: 0; }
}
/* no celular a janela curta continua tela cheia, como as outras fichas */
@media (max-width: 860px) { body.pg-curta-on #view, body.pg-curta-on #fab-root { display: none; } body.pg-curta-on .tabbar { display: none !important; } }

/* ===================== Central de notificações (notificacoes.js) =====================
   Painel à direita no mesmo vidro dos lembretes do canto da tela (.rem); as conversas com mensagem nova numa lista clara */
.nc-lat { position: fixed; z-index: 56; top: var(--s3); right: var(--s3); bottom: var(--s3); width: 400px; max-width: calc(100% - 2 * var(--s3)); display: flex; flex-direction: column; background: var(--glass-bg); border: 1px solid var(--glass-border); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-radius: var(--r-lg) 0 var(--r-lg) 0; box-shadow: var(--glass-shadow), 0 24px 64px rgba(0, 0, 0, .18); animation: consEntra .24s cubic-bezier(.2, .8, .2, 1); }
.nc-lat[hidden] { display: none; }
.nc-cab { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s4) var(--s2) var(--s5); }
.nc-cab b { font-size: 20px; line-height: 28px; font-weight: 700; }
.nc-corpo { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s2) var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s5); overscroll-behavior: contain; }
.nc-cards { display: flex; flex-direction: column; gap: var(--s2); }
.nc-rem { box-shadow: none; background: var(--surface); }
.nc-rem.novo { border-color: var(--lime); }
.nc-rem .ra button, .nc-rem .ra a { display: inline-flex; align-items: center; height: 36px; padding: 0 var(--s4); border-radius: var(--r-sm) 0 var(--r-sm) 0; font-weight: 700; cursor: pointer; border: 1px solid var(--line); background: transparent; color: inherit; text-decoration: none; font-size: var(--fs-md); }
.nc-rem .ra .go { background: var(--lime); color: var(--on-lime); border-color: var(--lime); }
.nc-rem p { margin-bottom: 0; }
.nc-rem .ra { margin-top: var(--s3); }
.nc-limpar { align-self: center; background: none; border: 0; padding: var(--s2); font: inherit; font-size: var(--fs-sm); color: var(--ink-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.nc-vazio { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: var(--s6) var(--s4) var(--s2); color: var(--ink-muted); font-size: var(--fs-md); line-height: 20px; }
.nc-vazio svg { width: 32px; height: 32px; margin-bottom: var(--s2); }
.nc-vazio b { color: var(--ink); font-size: var(--fs-lg); font-weight: 600; }
.nc-sec h3 { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); padding-left: var(--s1); font-size: var(--fs-sm); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.nc-sec h3 svg { width: 16px; height: 16px; }
.nc-sec h3 span { flex: 1; }
.nc-lista { list-style: none; margin: 0; padding: 4px; background: var(--surface); border-radius: var(--r-md) 0 var(--r-md) 0; border: 1px solid var(--line-soft); }
.nc-conv { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: var(--s3); border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: var(--r-sm) 0 var(--r-sm) 0; }
.nc-conv:hover, .nc-conv:focus-visible { background: var(--surface-raised); outline: none; }
.nc-av { width: 44px; height: 44px; flex: none; border-radius: 50%; }
.nc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nc-l1, .nc-l2 { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.nc-l1 b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: var(--fs-base); }
.nc-hora { flex: none; font-size: var(--fs-sm); color: var(--ink-muted); }
.nc-n { flex: none; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--danger); color: #fff; font-size: var(--fs-xs); font-weight: 700; }
.nc-prev { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-md); font-weight: 600; }
.nc-l2 .mini-av { margin-left: 0; }
@media (max-width: 860px) { .nc-lat { top: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; border-radius: 0; border: 0; background: var(--surface); padding-top: env(safe-area-inset-top, 0px); } .nc-lat .nc-rem, .nc-lat .nc-lista { background: var(--surface-raised); } }
/* menu da conta: Ajuda e Configurações com o ícone num quadrado */
.acct-ic { display: grid; place-items: center; }
.acct-ic svg { width: 18px; height: 18px; }

/* ===================== Listas padrão (dez/2026) =====================
   Dois modelos com o mesmo desenho em toda a plataforma:
   - Lista: marca à esquerda (foto, iniciais ou ícone), título e linha de apoio, situação, valor ou hora à direita, seta
   - Tabela: as mesmas peças com cabeçalho; no celular vira Lista
   Linha com 58 px no mínimo, uma linha fina entre os itens, passar o mouse escurece a linha. */
:root { --lista-h: 58px; --lista-sep: inset 0 1px 0 var(--line-soft); }

/* Lista (.rows .row: painel, configurações, avaliações, contratos, equipe, admin...) */
.rows .row { min-height: var(--lista-h); padding: var(--s2) var(--s3); margin: 0 calc(-1 * var(--s3)); width: calc(100% + 2 * var(--s3)); border-top: 0; box-shadow: var(--lista-sep); border-radius: 0; }
.rows li:first-child .row { box-shadow: none; }
.rows .row:hover { background: var(--surface-high); border-radius: var(--r-sm) 0 var(--r-sm) 0; box-shadow: none; }
.rows li:hover + li .row { box-shadow: none; }
.rows .row .txt b { font-size: var(--fs-base); line-height: 20px; overflow: hidden; text-overflow: ellipsis; }
.rows .row .txt span { font-size: var(--fs-sm); line-height: 18px; }
.rows .row .tag { text-align: right; font-size: var(--fs-md); line-height: 20px; }
.rows .row .tag small { font-size: var(--fs-xs); font-weight: 500; }

/* Agenda (.tlist .task): mesma linha da Lista */
.tlist .task { align-items: center; min-height: var(--lista-h); padding: var(--s2) 0; border-top: 0; box-shadow: var(--lista-sep); }
.tlist li:first-child .task { box-shadow: none; }
.tlist .task .chk { margin-top: 0; }
.tlist .task .tx b { font-size: var(--fs-base); line-height: 20px; }
.tlist .task .tx > span { font-size: var(--fs-sm); line-height: 18px; }

/* Estoque em lista (.vlist .vl): um cartão só com as linhas dentro, cabeçalho como o das tabelas */
.vlist { gap: 0; background: var(--surface-raised); border-radius: var(--r-md) 0 var(--r-md) 0; overflow: hidden; }
.vlist > .vl { background: none; border-radius: 0; min-height: var(--lista-h); padding: var(--s2) var(--s4) var(--s2) var(--s3); grid-template-columns: 72px minmax(0, 2.6fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, .9fr) minmax(0, .7fr) minmax(0, .9fr); }
.vlist > .vl + .vl:not(.vl-cab) { box-shadow: var(--lista-sep); }
.vlist > .vl-cab + .vl { box-shadow: none; }
.vlist > .vl:not(.vl-cab):hover { background: var(--surface-high); }
.vlist > .vl-cab { min-height: 36px; padding-top: 0; padding-bottom: 0; background: var(--surface-high); font-size: var(--fs-xs); line-height: 16px; }
.vlist .vl-ph { width: 72px; }
@media (max-width: 860px) { .vlist > .vl { grid-template-columns: 72px minmax(0, 1fr) auto; padding: var(--s2) var(--s3); } .vlist .vl-ph { width: 72px; } }

/* Tabela (Contatos, Financeiro, Lojas, relatórios): cabeçalho baixo e discreto, linhas com a altura da Lista */
:is(.fin-table, .cli-tab) thead th { height: 36px; padding-top: 0; padding-bottom: 0; vertical-align: middle; font-size: var(--fs-xs); line-height: 16px; font-weight: 600; color: var(--ink-muted); }
:is(.fin-table, .cli-tab) tbody :is(td, th) { height: var(--lista-h); padding-top: var(--s2); padding-bottom: var(--s2); vertical-align: middle; border-top: 0; border-bottom: 0; box-shadow: var(--lista-sep); }
:is(.fin-table, .cli-tab) tbody tr:first-child > * { box-shadow: none; }
:is(.fin-table, .cli-tab) tbody tr[data-href]:hover, :is(.fin-table, .cli-tab) tbody tr[data-act]:hover { background: var(--surface-high); }
.cli-card .cli-tab thead th { background: var(--surface-high); }
/* Contatos no celular: cada contato vira uma linha da Lista (nome e situação em cima; telefone e última conversa embaixo) */
@media (max-width: 640px) {
  .cli-scroll { overflow: visible; }
  .cli-tab, .cli-tab tbody { display: block; width: 100%; }
  .cli-tab thead { display: none; }
  .cli-tab tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s3); align-items: center; padding: var(--s2) var(--s3); min-height: var(--lista-h); box-shadow: var(--lista-sep); }
  .cli-tab tbody tr:first-child { box-shadow: none; }
  .cli-tab tbody tr > * { display: none; height: auto; padding: 0; box-shadow: none !important; }
  .cli-tab tbody tr > th { display: block; grid-column: 1; grid-row: 1 / span 2; min-width: 0; }
  .cli-tab tbody tr > td:nth-child(3) { display: block; grid-column: 2; grid-row: 1; justify-self: end; }
  .cli-tab tbody tr > td:nth-last-child(2) { display: block; grid-column: 2; grid-row: 2; justify-self: end; font-size: var(--fs-xs); color: var(--ink-muted); }
  .cli-pessoa { min-width: 0; }
  .cli-pessoa b { max-width: 100%; }
}
/* Contatos: a faixa de filtros rola para o lado dentro da tela (antes empurrava a página para 1.100 px no celular) */
.cli-tools > .scroller { min-width: 0; max-width: 100%; }

/* ===================== Listas padrão, parte 2: as listas que faltavam e cantos retos =====================
   Avaliações e Contratos (.neg-list), Prospecção (.pr-lista), simulações do lead (.neg-lead-list), itens da ficha (.fx-list),
   tabela simples (.table), anúncios do carro (.vp-an) e mensagens da central (.nc-lista) seguem a mesma linha:
   58 px, linha fina entre os itens, cabeçalho de 36 px. Toda lista tem os quatro cantos retos. */
.neg-row, .pr-row:not(.pr-cab), .neg-lrow { min-height: var(--lista-h); padding-top: var(--s2); padding-bottom: var(--s2); border-top: 0; box-shadow: var(--lista-sep); }
.neg-ul li:first-child .neg-row, .pr-cab + .pr-row, .pr-row:first-child, .neg-lead-list li:first-child .neg-lrow { box-shadow: none; }
.neg-row:hover, .pr-row:not(.pr-cab):hover { background: var(--surface-high); }
.neg-hrow, .pr-row.pr-cab { min-height: 36px; padding-top: 0; padding-bottom: 0; background: var(--surface-high); border: 0; font-size: var(--fs-xs); line-height: 16px; font-weight: 600; color: var(--ink-muted); text-transform: none; letter-spacing: 0; }
.neg-list, .pr-lista { border: 0; background: var(--surface-raised); }
.fx-list > li + li { border-top: 0; box-shadow: var(--lista-sep); }
.table thead th, .vp-an thead th { height: 36px; padding-top: 0; padding-bottom: 0; vertical-align: middle; font-size: var(--fs-xs); line-height: 16px; font-weight: 600; color: var(--ink-muted); }
.table tbody td, .vp-an tbody :is(td, th) { height: var(--lista-h); padding-top: var(--s2); padding-bottom: var(--s2); vertical-align: middle; border-top: 0; }
.table tbody tr + tr td { box-shadow: var(--lista-sep); }
.vp-an thead th { background: var(--surface-high); }
.nc-conv { min-height: var(--lista-h); }
.nc-lista li + li .nc-conv { box-shadow: var(--lista-sep); }
:is(.fin-table, .cli-tab) thead th { background: var(--surface-high); }
.fin-table thead th:first-child, .fin-table tbody td:first-child { padding-left: var(--s3); }

/* cantos retos: a lista, as linhas (também ao passar o mouse) e o cartão que só serve de moldura para uma lista */
.vlist, .neg-list, .pr-lista, .nc-lista, .vp-an-wrap, .table-wrap, .cli-card, .cli-scroll,
.card:has(> :is(.rows, .tlist, .table-wrap, .timeline, table, .neg-list, .pr-lista)),
.rows .row, .rows .row:hover, .row[aria-current="true"], .task .open, .nc-conv, .neg-row, .neg-lrow, .pr-row, .vl, .vl .hit, .vl-ph { border-radius: 0; }

/* Sino das notificações: o número fica em cima do ícone, com o menu aberto ou recolhido
   (com o menu recolhido, a regra que esconde os textos do menu escondia também o número) */
#nc-side .count, body.side-min #nc-side .count { display: block; position: absolute; top: 3px; left: 22px; right: auto; margin: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; border-radius: 8px; }
body.side-min #nc-side .count { left: calc(50% + 2px); }
#nc-side .count[hidden], body.side-min #nc-side .count[hidden] { display: none; }
/* Conversa do lead: o campo de mensagem ocupa a largura toda da coluna (o alinhamento do rodapé o deixava estreito e no meio) */
@media (min-width: 1200px) { .drawer[data-lado="alto"] > .drawer-foot.chat-foot { align-items: stretch; height: auto; min-height: var(--pe-h); } }

/* ===================== Varredura 3 (dez/2026) ===================== */
/* telefone no topo do lead */
.tel-topo { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.tel-topo:hover { text-decoration-color: var(--ink); }
/* agenda da semana: cartão com a hora menor e mais espaço para o texto */
.ag-ev { gap: 4px; padding: 0 5px; }
.ag-ev b { font-size: 11.5px; }
.ag-ev svg { width: 13px; height: 13px; }
/* quadro do CRM com 5 colunas ou mais: colunas mais estreitas para caberem sem rolar para o lado */
.board:has(> .kcol:nth-child(5)) > .kcol:not(.slim) { min-width: 196px; }
/* telas vazias no mesmo cartão liso das listas (sem borda tracejada nem cantos arredondados) */
.empty { border: 0; border-radius: 0; background: var(--surface-raised); }

/* CRM: busca por um telefone que não existe oferece iniciar a conversa */
.lead-iniciar { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s3) var(--s4); margin: 0 0 var(--s3); background: var(--surface-raised); }
.lead-iniciar > svg { width: 22px; height: 22px; flex: none; color: var(--ink-muted); }
.lead-iniciar > span { flex: 1 1 240px; min-width: 0; font-size: var(--fs-md); line-height: 20px; color: var(--ink-muted); }
.lead-iniciar > span b { display: block; color: var(--ink); font-size: var(--fs-base); }

/* ===================== Repasse (destino do carro) ===================== */
.vp-seg.vp-seg2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vp-rep-linha { display: flex; gap: var(--s2); }
.vp-rep-linha input { flex: 1; min-width: 0; }
.badge.rep { background: var(--ink); color: var(--surface); }

/* Repasse nos grupos de WhatsApp (repasse-grupos.js) */
.rg-body { display: flex; flex-direction: column; gap: var(--s4); }
.rg-num { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rg-num button { justify-content: center; text-align: center; font-size: var(--fs-sm); }
.rg-lista { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; background: var(--surface-raised); }
.rg-lista.rg-curta { max-height: 180px; }
.rg-lista li { display: grid; gap: var(--s2); padding: var(--s2) var(--s3); min-height: var(--lista-h); align-content: center; }
.rg-lista li + li { box-shadow: var(--lista-sep); }
.rg-lista .check { display: flex; align-items: center; gap: var(--s3); }
.rg-lista .check span { display: grid; min-width: 0; }
.rg-lista .check b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-lista .check small { color: var(--ink-muted); font-size: var(--fs-xs); }
.rg-cat { height: 36px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm) 0 var(--r-sm) 0; background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-md); width: 100%; }
.rg-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: var(--s2); }
.rg-foto { position: relative; display: block; aspect-ratio: 4 / 3; cursor: pointer; }
.rg-foto img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .45; }
.rg-foto input { position: absolute; top: 4px; left: 4px; z-index: 1; width: 18px; height: 18px; accent-color: var(--ink); }
.rg-foto input:checked + img { opacity: 1; outline: 2px solid var(--lime); outline-offset: -2px; }
.rg-qr { display: flex; gap: var(--s4); align-items: center; }
.rg-qr .qr-img { width: 160px; flex: none; background: #fff; padding: 6px; }
.rg-enviar { width: 100%; justify-content: center; }
.rg-lista:not(.rg-curta) li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.rg-lista .check { background: none; border: 0; padding: 0; min-height: 0; }
@media (max-width: 560px) { .rg-lista:not(.rg-curta) li { grid-template-columns: minmax(0, 1fr); } }

/* ===================== Grupos de WhatsApp (grupos.js) ===================== */
.gp { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: var(--s4); grid-template-rows: minmax(0, 1fr); height: calc(100vh - 150px); min-height: 420px; }
.gp-lado { background: var(--surface); padding: var(--s3); overflow-y: auto; min-width: 0; }
.gp-pills { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s3); }
.gp-rows { margin: 0; padding: 0; list-style: none; }
.gp-row { text-decoration: none; color: inherit; display: flex; align-items: center; gap: var(--s3); }
.gp-row .txt { min-width: 0; flex: 1; display: grid; }
.gp-row .txt b, .gp-row .txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-row .tag { display: grid; justify-items: end; gap: 4px; flex: none; }
.gp-row[aria-current="true"] { background: var(--surface-high); box-shadow: none; }
.gp-row.novo .txt b { font-weight: 700; }
.gp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 1px rgba(0,0,0,.25); display: block; }
.gp-av { width: 36px; height: 36px; flex: none; display: grid; place-items: center; font-size: var(--fs-sm); font-weight: 700; background: var(--surface-raised); color: var(--ink); border-radius: var(--r-sm) 0 var(--r-sm) 0; }
.gp-av.t-repasse { background: var(--ink); color: var(--surface); }
.gp-av.t-avaliacao { background: var(--lime); color: #111; }
.gp-conv { background: var(--surface); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.gp-top { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); box-shadow: var(--lista-sep); }
.gp-tit { display: grid; min-width: 0; }
.gp-tit b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-volta { display: none; color: inherit; }
.gp-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s4) var(--s5) var(--s5); background: var(--chat-bg); }
.gp-msgs .daysep { align-self: center; }
.gp-msg.gp-prim { margin-top: var(--s2); }
.gp-autor { font-size: var(--fs-xs); font-weight: 700; line-height: 16px; margin-bottom: 2px; display: flex; gap: 6px; align-items: baseline; }
.gp-autor small { font-weight: 400; opacity: .7; color: var(--ink-muted); }
.msg.out .gp-autor { opacity: .85; }
.gp-ant { align-self: center; }
.gp-replybar { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s4); background: var(--surface-high); }
.gp-replybar > span { flex: 1; min-width: 0; display: grid; font-size: var(--fs-sm); }
.gp-replybar > span span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-muted); }
.gp-foot { padding: var(--s2) var(--s3) var(--s3); }
.gp-foot .reply-bar { margin-bottom: var(--s2); }
.dlg.dlg-larga { width: min(720px, 100%); }
.gc-lista { list-style: none; margin: 0; padding: 0; background: var(--surface-raised); max-height: 48vh; overflow-y: auto; }
.gc-lista li { padding: var(--s2) var(--s3); }
.gc-lista li + li { box-shadow: var(--lista-sep); }
.gc-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px auto; gap: var(--s3); align-items: center; min-height: var(--lista-h); }
.gc-row .check, .gc-aj .check { background: none; border: 0; padding: 0; min-height: 0; display: flex; align-items: center; gap: var(--s3); }
.gc-row .check span { display: grid; min-width: 0; }
.gc-row .check b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-row .check small { color: var(--ink-muted); font-size: var(--fs-xs); }
.gc-aj { display: grid; gap: var(--s3); padding: var(--s3); margin: var(--s2) 0; background: var(--surface); }
.gc-pessoas { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s2); margin-top: var(--s2); }
@media (max-width: 860px) {
  .gp { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .gp .gp-conv { display: none; }
  .gp.gp-aberto .gp-lado { display: none; }
  .gp.gp-aberto .gp-conv { display: flex; height: calc(100dvh - 190px); min-height: 380px; }
  .gp-volta { display: grid; place-items: center; width: 36px; height: 36px; }
  .gp-msgs { padding: var(--s3) var(--s3) var(--s4); }
  .gc-row { grid-template-columns: minmax(0, 1fr); }
}
.gc-busca { flex: none; margin: 0; width: 100%; }
.gc-busca input { height: 40px; width: 100%; }
.gc-lista li[hidden] { display: none; }

/* Selo Beta (funções em teste) */
.selo-beta { display: inline-block; flex: none; margin-left: 5px; padding: 0 4px; font: 600 9px/13px var(--font-text) !important; font-style: normal; letter-spacing: 0 !important; text-transform: none !important; background: var(--lime); color: #111; border-radius: 3px 0 3px 0; vertical-align: middle; white-space: nowrap; }
.btn-primary .selo-beta { background: #111; color: var(--lime); }
.gp-av.has-img { background: none; padding: 0; overflow: hidden; }
.gp-av.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp-top .gp-av { width: 40px; height: 40px; }

/* ===================== Seletores (caixas de escolha) =====================
   A seta é desenhada pelo próprio seletor, sempre à mesma distância da borda direita que o texto fica da esquerda,
   em qualquer tela e largura (antes ela vinha de fora e encostava ou passava da borda). */
select:not([multiple]):not([size]) {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23777' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 14px center !important; background-size: 12px 12px !important;
  padding-left: 14px !important; padding-right: 38px !important; text-overflow: ellipsis; max-width: 100%;
}
.select-wrap::after { display: none !important; }
.select-wrap { max-width: 100%; }
/* Grupos: a área vai até o fim da tela, sem rolagem da página */
#view[data-route="grupos"] { padding-bottom: var(--s4); }

/* Grupos: busca e filtro numa linha, painel do grupo e conversa vazia */
.gp-tools { display: flex; gap: var(--s2); margin: 0 0 var(--s3); flex-wrap: nowrap; }
.gp-tools .search { flex: 1 1 auto; min-width: 0; margin: 0; }
.gp-tools .search input { height: 40px; width: 100%; }
.gp-tools .select-wrap { flex: none; max-width: 46%; }
.gp-tools .select-wrap select { height: 40px; font-size: var(--fs-md); }
.gp-row .tag { align-items: end; }
.gp-row .tag .count { margin: 0; }
.gp-row .tag svg { width: 15px; height: 15px; }
.gp-top .menu-mais { margin-left: auto; }
.gp-top .menu-mais .btn { width: 36px; height: 36px; padding: 0; }
.gp-info-btn { margin-left: auto; }
.gp-info-btn + .menu-mais { margin-left: 0; }
.gp-info { display: none; background: var(--surface); padding: var(--s4); overflow-y: auto; min-width: 0; flex-direction: column; gap: var(--s5); }
.gp-info .fx-sec { display: grid; gap: var(--s3); }
.gp-info-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.gp-acesso { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.gp-acesso li { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-md); min-width: 0; }
.gp-acesso li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-acesso .av { width: 28px; height: 28px; font-size: 11px; }
.gp-ativos .row { cursor: default; }
.gp-ativos .row .txt { min-width: 0; flex: 1; display: grid; }
.gp-ativos .row .txt b, .gp-ativos .row .txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-fotos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.gp-fotos button { padding: 0; border: 0; background: var(--surface-raised); aspect-ratio: 1; cursor: zoom-in; overflow: hidden; }
.gp-fotos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp-arqs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.gp-arqs a { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-md); color: inherit; min-width: 0; }
.gp-arqs a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-arqs svg { width: 16px; height: 16px; flex: none; }
.gp-info-dlg { display: flex; padding: 0; }
.gp-vazio { margin: auto; max-width: 440px; display: grid; gap: var(--s3); text-align: left; padding: var(--s5); background: var(--surface); }
.gp-vazio > span { color: var(--ink-muted); font-size: var(--fs-md); }
.gp-vazio ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.gp-vazio li { display: flex; gap: var(--s3); align-items: flex-start; font-size: var(--fs-md); line-height: 20px; }
.gp-vazio li svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.gp-vazio small { color: var(--ink-muted); font-size: var(--fs-xs); line-height: 18px; padding-top: var(--s2); box-shadow: var(--lista-sep); }
.gp-msgs:has(> .gp-vazio) { display: flex; }
@media (min-width: 1200px) {
  .gp { grid-template-columns: minmax(250px, 320px) minmax(0, 1fr) minmax(260px, 300px); }
  .gp-info { display: flex; }
  .gp-info-btn { display: none; }
  .gp-info-btn + .menu-mais { margin-left: auto; }
}
.gp-kv { gap: var(--s3) var(--s4); }
.gp-crm { height: 32px; padding: 0 var(--s2); font-size: var(--fs-sm); flex: none; }
.gp-tit { flex: 1 1 auto; }
.gp-tit > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
  .gp-top { gap: var(--s2); padding: var(--s2) var(--s3); }
}

/* ===================== Grupos: uma tela só (lista e conversa coladas, dados do grupo ao clicar) ===================== */
.gp { gap: 0; border: 1px solid var(--line-soft); background: var(--surface); }
.gp-lado { padding: 0; display: flex; flex-direction: column; min-height: 0; background: var(--surface-raised); border-right: 1px solid var(--line-soft); }
.gp-lhead, .gp-top, .gp-ihead { height: 64px; min-height: 64px; box-sizing: border-box; display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s3) 0 var(--s4); border-bottom: 1px solid var(--line-soft); box-shadow: none; }
.gp-ltit { display: flex; align-items: center; font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 26px; letter-spacing: .02em; text-transform: uppercase; }
.gp-lhead .iconbtn { margin-left: auto; }
.gp-tools { padding: var(--s3) var(--s3) var(--s2); margin: 0; }
#gp-lista { flex: 1; min-height: 0; overflow-y: auto; padding: 0 var(--s3) var(--s3); }
.gp-tit { flex: 1 1 auto; min-width: 0; display: grid; background: none; border: 0; padding: 0; margin: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.gp-tit:hover b { text-decoration: underline; text-underline-offset: 3px; }
.gp-top .menu-mais, .gp-info-btn, .gp-info-btn + .menu-mais { margin-left: 0; }
.gp-info-btn[aria-pressed="true"] { background: var(--surface-high); }
.gp-info { padding: 0; gap: 0; background: var(--surface-raised); border-left: 1px solid var(--line-soft); }
.gp-ihead b { flex: 1; font-weight: 600; }
.gp-ibody { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s4); display: flex; flex-direction: column; gap: var(--s5); }
.gp-ativos .iconbtn { width: 36px; height: 36px; }
@media (min-width: 1200px) {
  .gp { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
  .gp.com-info { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) 300px; }
  .gp-info-btn { display: inline-grid; }
}
@media (max-width: 860px) {
  .gp { border: 0; background: none; }
  .gp-lado { border-right: 0; background: none; }
  .gp-lhead { padding: 0; border-bottom: 0; height: 52px; min-height: 52px; }
  .gp-tools { padding: 0 0 var(--s2); }
  #gp-lista { padding: 0; }
  .gp-top { height: 60px; min-height: 60px; padding: 0 var(--s2); }
  .gp.gp-aberto .gp-conv { border: 1px solid var(--line-soft); }
}
#gp-lista { overflow-x: hidden; }
@media (max-width: 860px) { #gp-lista .rows .row { margin: 0; width: 100%; padding-left: 0; padding-right: 0; } }
/* Grupos: separação só pelas cores das colunas (sem linhas nem bordas), como o resto da plataforma */
.gp, .gp-lado, .gp-info, .gp-conv { border: 0 !important; }
.gp-lhead, .gp-top, .gp-ihead { border-bottom: 0; box-shadow: none; }
.gp { background: none; }
.gp-lado, .gp-info { background: var(--surface-raised); }
.gp-conv { background: var(--surface); }
.gp-msgs { background: var(--chat-bg); }
.gp-ativos .row { box-shadow: none; }
.gp-ativos li + li .row { box-shadow: none; }
@media (max-width: 860px) { .gp-lado { background: none; } }
/* Grupos igual às outras páginas: colunas cinzas de ponta a ponta (lista à esquerda, dados à direita),
   conversa no fundo da página, nome do grupo no título grande */
@media (min-width: 861px) {
  #view[data-route="grupos"] { padding: 0 !important; }
  .gp-lado { padding-top: var(--s2); }
  .gp-conv { background: none; }
  .gp-msgs { background: none; padding: var(--s4) var(--s6) var(--s5); }
  .gp-top { height: auto; min-height: 88px; padding: var(--s5) var(--s6) var(--s3); align-items: center; }
  .gp-foot { padding: var(--s2) var(--s6) var(--s5); }
  .gp-info { padding-top: var(--s2); }
  .gp-lhead, .gp-ihead { height: 64px; min-height: 64px; }
}
.gp-nome { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 30px; letter-spacing: .01em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-tit .t-sub { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-tit:hover b { text-decoration: none; }
@media (max-width: 860px) { .gp-nome { font-size: 17px; line-height: 22px; } .gp-tit .t-sub { font-size: var(--fs-sm); } }
/* Lead em tela larga: o campo de mensagem fica na mesma altura dos botões do painel (Registrar contato, Registrar venda) */
.chat-foot > .win:empty { display: none; }

/* Repasse: envio de vários carros */
.rl-faixa { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); margin: 0 0 var(--s4); background: var(--surface-raised); font-size: var(--fs-md); }
.rl-faixa > span { flex: 1; min-width: 0; }
.rl-faixa > svg { flex: none; }
.rl-carros { max-height: 32vh; }
.rl-carros .vthumb { width: 48px; height: 36px; }
@media (max-width: 860px) { .rl-faixa { flex-wrap: wrap; } .rl-faixa .btn { width: 100%; justify-content: center; } }

/* Grupos: campo de mensagem com anexo, emoji e áudio; configuração em seções; reações */
.gp-foot { position: relative; }
.gp-foot .emoji-menu { bottom: calc(100% + 4px); }
.gp-foot.recording .composer, .gp-foot.recording #gp-reply { visibility: hidden; }
.gc-sep { padding: var(--s3) var(--s3) var(--s2) !important; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-muted); text-transform: none; box-shadow: none !important; background: var(--surface); }
.gc-sep[hidden] { display: none; }
.gp-msg.has-rx { margin-bottom: 14px; }
.gp-msg .mreacts small { font-size: 11px; color: var(--ink-muted); margin-left: 2px; }
.nc-av.gp-av { width: 40px; height: 40px; flex: none; }

/* Página do carro: bloco Destino com respiro entre as partes; o envio aos grupos fica por último */
.vp-destino { display: grid; gap: var(--s4); }
.vp-destino > .fx-lbl { margin: 0; }
.vp-destino .vp-dest-dica { margin: calc(-1 * var(--s2)) 0 0; line-height: 18px; }
.vp-destino .field { margin: 0; gap: var(--s2); }
.vp-destino .field > label { margin: 0; }
.rg-envio { display: grid; gap: var(--s2); padding-top: var(--s2); }
.rg-envio > p { text-align: center; }

/* Modelo da mensagem de repasse */
.rm-vars { display: flex; flex-wrap: wrap; gap: var(--s2); }
.rm-vars .pill { height: 32px; font-size: var(--fs-sm); }
.rm-previa { padding: var(--s3) var(--s4); background: var(--out-bg); color: var(--out-ink); font-size: var(--fs-md); line-height: 20px; border-radius: 14px 14px 3px 14px; max-width: 420px; white-space: normal; overflow-wrap: anywhere; }
.rm-padrao { margin-right: auto; }
.rg-mod-link { font-size: var(--fs-sm); margin-left: var(--s2); font-weight: 500; }

/* Central de notificações: X para fechar cada notificação */
.nc-rem .rt { display: flex; align-items: center; gap: var(--s2); }
.nc-rem .rt > span { flex: 1; min-width: 0; }
.nc-x { flex: none; width: 28px; height: 28px; margin: -4px -6px -4px 0; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--ink-muted); cursor: pointer; border-radius: var(--r-sm) 0 var(--r-sm) 0; }
.nc-x:hover, .nc-x:focus-visible { background: var(--surface-high); color: var(--ink); }
.nc-x svg { width: 16px; height: 16px; }

/* Grupos: menu da mensagem com as ações de IA, checks e espera da IA */
.gp-msg { cursor: pointer; }
.gp-menu { max-width: 280px; }
.gp-menu-sep { display: flex; align-items: center; gap: var(--s2); margin: 6px 6px 2px; font-size: 11px; font-weight: 600; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; }
.gp-menu-sep::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.gp-menu-ia svg { color: var(--ink); }
.gp-ia-espera { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) 0; color: var(--ink-muted); }
.gp-ia-espera svg { width: 22px; height: 22px; animation: gp-pulsa 1.2s ease-in-out infinite; color: var(--ink); }
@keyframes gp-pulsa { 50% { opacity: .35; transform: scale(.9); } }
.gp-resumo { font-size: var(--fs-base); line-height: 24px; padding: var(--s3) var(--s4); background: var(--surface-raised); }
.gl-tipo { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.gl-tipo button { justify-content: center; }

/* Links nas mensagens (CRM e grupos) */
.mtext .mlink, .mcap .mlink { color: inherit; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; word-break: break-word; }
.mtext .mlink:hover, .mcap .mlink:hover { opacity: .75; }

/* Grupos: seleção de mensagens, revisão dos cartões, análise por período, resumos e histórico */
.gp-msgs .gp-ck { position: absolute; left: -30px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border: 2px solid var(--ink-muted); border-radius: 50%; display: grid; place-items: center; background: var(--surface); }
.gp-msgs:has(.gp-ck) { padding-left: 52px; }
.gp-msg.gp-marcada { outline: 2px solid var(--lime); outline-offset: 2px; }
.gp-msg.gp-marcada .gp-ck { background: var(--lime); border-color: var(--lime); color: #111; }
.gp-msg.gp-marcada .gp-ck svg { width: 14px; height: 14px; }
.gp-selbar { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4) var(--s3); flex-wrap: wrap; }
.gp-selbar > b { font-size: var(--fs-md); white-space: nowrap; }
.gp-selacoes { display: flex; gap: var(--s2); flex-wrap: wrap; margin-left: auto; }
.gp-selacoes .btn { height: 36px; padding: 0 var(--s3); font-size: var(--fs-sm); }
.rv-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.rv-cartao { display: grid; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--surface-raised); }
.rv-cartao.off { opacity: .55; }
.rv-ck { display: flex; align-items: center; gap: var(--s3); background: none !important; border: 0 !important; padding: 0 !important; }
.rv-ck span { display: grid; }
.rv-ck small { color: var(--ink-muted); font-size: var(--fs-xs); }
.rv-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.rv-cartao .field { margin: 0; }
.rv-fotos { display: flex; gap: 4px; overflow-x: auto; }
.rv-fotos button { flex: none; width: 72px; height: 56px; padding: 0; border: 0; cursor: zoom-in; background: var(--surface); }
.rv-fotos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-juntar { margin-right: auto; }
.gp-analisar { gap: var(--s3) !important; }
.gp-analisar .field { margin: 0; }
.gp-analisar .btn { width: 100%; justify-content: center; }
.gpa-datas { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.gpa-datas[hidden] { display: none; }
.gpa-opcoes { display: grid; gap: var(--s2); }
.gpa-op { display: grid; gap: 2px; text-align: left; padding: var(--s3) var(--s4); border: 1px solid var(--line); background: var(--surface); cursor: pointer; border-radius: var(--r-sm) 0 var(--r-sm) 0; font: inherit; color: inherit; }
.gpa-op:hover, .gpa-op:focus-visible { border-color: var(--ink); background: var(--surface-raised); }
.gpa-op span { font-size: var(--fs-sm); color: var(--ink-muted); }
.gp-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.gp-hist button { width: 100%; display: grid; gap: 1px; text-align: left; padding: var(--s2) 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; }
.gp-hist button:disabled { cursor: default; }
.gp-hist button:not(:disabled):hover b { text-decoration: underline; }
.gp-hist b { font-size: var(--fs-md); font-weight: 600; }
.gp-hist span { font-size: var(--fs-sm); color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-hist small { font-size: var(--fs-xs); color: var(--ink-muted); }

/* Grupos: mídia do painel em Fotos, Documentos e Links */
.gp-mtabs { display: flex; gap: 2px; background: var(--surface); padding: 3px; border-radius: var(--r-sm) 0 var(--r-sm) 0; }
.gp-mtabs button { flex: 1; height: 30px; border: 0; background: none; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-muted); cursor: pointer; border-radius: var(--r-sm) 0 var(--r-sm) 0; white-space: nowrap; }
.gp-mtabs button[aria-selected="true"] { background: var(--surface-raised); color: var(--ink); box-shadow: 0 0 0 1px var(--line-soft); }
.gp-arqs a span { display: grid; min-width: 0; }
.gp-arqs a b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-arqs a small { font-size: 11px; color: var(--ink-muted); }
.gp-arqs li { padding: 4px 0; }

/* Lead: recolher e mostrar o painel da direita */
.drawer-lado { position: relative; }
.drawer-lado > .lado-x { position: absolute; top: var(--s3); right: var(--s2); width: 36px; height: 36px; z-index: 2; color: var(--ink-muted); }
.drawer-lado > .lado-x:hover { color: var(--ink); background: var(--surface-high); }
.lado-abrir { margin-left: auto; height: 36px; padding: 0 var(--s3); font-size: var(--fs-sm); flex: none; }
.lado-abrir svg { width: 18px; height: 18px; }

/* Lead: botão i ao lado do nome abre e recolhe o painel (igual aos grupos) */
.drawer-title .lead-info-btn { margin-left: auto; flex: none; align-self: center; }
.lead-info-btn[aria-pressed="true"] { background: var(--surface-high); }

/* Revisão dos cartões: dados puxados pela placa */
.rv-placa { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); min-height: 20px; }
.rv-placa svg { width: 16px; height: 16px; flex: none; }
.rv-placa-in { text-transform: uppercase; }

/* Mídia (lead e grupos): vídeo na grade de fotos */
.gp-fotos .md-video { position: relative; cursor: pointer; }
.gp-fotos video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; background: #000; }
.md-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.md-play svg { width: 28px; height: 28px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.lightbox video { max-width: 92vw; max-height: 88vh; background: #000; }

/* ============ Celular: topo padrão das páginas com lista ============
   Título; embaixo, a busca ocupando a linha e o botão de filtros ao lado (buscaM em core.js).
   Os filtros abrem no painel de baixo (abrirFiltros em views.js). Página sem busca: filtro no canto do título. */
@media (max-width: 860px) {
  .toolbar.busca-m { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s4); }
  .toolbar.busca-m .search { flex: 1 1 auto; min-width: 0; max-width: none; margin: 0; }
  .toolbar.busca-m .search input { height: 44px; }
  .ltools.gp-tools:has(.busca-m) { display: block; }
  .ltools.gp-tools .busca-m { margin: 0; }
  /* abas que passam da largura: a última some aos poucos, avisando que dá para deslizar */
  .ptabs { padding-right: 28px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
}
/* painel de filtros: datas lado a lado e ordem com o botão de inverter */
.fs-body .fs-datas { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.fs-body .fs-datas .field { margin-bottom: var(--s4); min-width: 0; }
.fs-body .fs-datas input { width: 100%; min-width: 0; }
.fs-body .fs-ordem { display: flex; gap: var(--s2); align-items: center; }
.fs-body .fs-ordem .select-wrap { flex: 1; min-width: 0; }
.fs-body .fs-ordem .iconbtn { flex: none; width: 44px; height: 44px; border: 1px solid var(--line); }
.fs-body .field > label { display: block; margin: 0 0 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .06em; }
/* painel de filtros: as opções rolam e o botão "Ver" fica sempre à vista */
.dlg:has(.fs-body) { overflow: hidden; }
.dlg:has(.fs-body) .fs-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; gap: 0; }
.dlg:has(.fs-body) .dlg-head, .dlg:has(.fs-body) .dlg-foot { flex: none; }
/* Celular: listas de navegação (Relatórios e Configurações) no mesmo formato: ícone, título, descrição e seta, com linha fina entre itens */
@media (max-width: 860px) {
  .rel-cards { display: flex; flex-direction: column; gap: 0; }
  .rel-card { min-height: 72px; padding: var(--s3) 0; background: none; border-radius: 0; border-top: 1px solid var(--line-soft); }
  .rel-card:first-child { border-top: 0; }
  .rel-card:hover { background: none; }
  .rel-ic { width: auto; height: auto; background: none; }
  .rel-ic svg, .rel-ic i { width: 18px; height: 18px; }
  .rel-grupo + .rel-grupo { margin-top: 0; }
  .rel-grupo-t { padding: var(--s5) 0 var(--s2); margin: 0; font-size: var(--fs-xs); line-height: 16px; }
  .rel-grupo:first-of-type .rel-grupo-t { padding-top: 0; }
  .rel-per-m { margin: calc(-1 * var(--s2)) 0 var(--s4); }
}

/* ============ Dois tipos de título dentro das páginas (app, /admin e painel do parceiro) ============
   1) Título de bloco: .t-block (18 px, negrito).
   2) Rótulo de grupo: o nome pequeno acima de uma lista ou de opções (Atendimento, Situação, Período...).
   Os rótulos de grupo têm o mesmo jeito em todo lugar: 14 px, cinza, sem caixa alta. */
.group-title, body.adm .group-title, .cfg-nav .cfg-grp, .rel-grupo-t, .fs-body .fs-tit, .fs-body .field > label {
  font: 600 14px/20px var(--font-text); color: var(--ink-muted); letter-spacing: 0; text-transform: none;
}
@media (max-width: 860px) { .cfg-nav .cfg-grp, .rel-grupo-t { font-size: var(--fs-md); line-height: 20px; } }

/* Carregando (carregando() em core.js): linhas cinza pulsando */
.sk-linhas { gap: var(--s3); padding: var(--s2) 0; }
.sk-linhas .sk-linha { height: 44px; width: 100%; }
.sk-linhas .sk-linha.curta { width: 60%; }

/* Tela vazia: dois tamanhos com o mesmo jeito.
   .empty = a página ou a lista inteira está vazia (título em negrito, uma frase do que fazer e, se fizer sentido, o botão).
   .empty-ok = um bloco dentro da página está vazio (só a frase, cinza). */
.empty-ok { font-size: var(--fs-md); line-height: 20px; color: var(--ink-muted); margin: 0; padding: var(--s2) 0; }
/* painel de filtros do Financeiro da Motor: De e Até lado a lado, como nos outros painéis */
.fs-body .fs-campos { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s3); }
.fs-body .fs-campos > .field { min-width: 0; }
.fs-body .fs-campos > .field:nth-child(n+3) { grid-column: 1 / -1; }
.fs-body .fs-campos input { width: 100%; min-width: 0; }
/* menu ⋮: ação perigosa em vermelho, como no menu "Mais" */
.ph-menu .mm-perigo, .ph-menu .mm-perigo svg { color: var(--danger) !important; }

/* ============ IA na conversa do lead (lead-ia.js): mesma seleção e menu dos grupos ============ */
#chat .msg.sel-modo, #chat .msg.sel-on { cursor: pointer; }
#chat .msg.sel-on { outline: 2px solid var(--lime); outline-offset: 2px; }
#chat .msg.sel-modo .mmenu-btn, #chat .msg.sel-on .mmenu-btn, #chat .msg.sel-modo .mact, #chat .msg.sel-on .mact { display: none; }
.lia-selbar { border-top: 1px solid var(--line-soft); background: var(--surface); }
.lia-opcoes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.lia-opcoes li { display: grid; gap: var(--s2); padding: var(--s3) var(--s4); background: var(--surface-raised); }
.lia-opcoes p { margin: 0; font-size: var(--fs-base); line-height: 22px; }
.lia-opcoes .btn { justify-self: start; }
.lia-carros .rv-fotos img { width: 120px; height: 80px; object-fit: cover; }

/* ============ Barra da lista (barraLista em core.js): busca › filtros › "ver como", sempre nessa ordem ============ */
.toolbar.tb-lista { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: 0 0 var(--s5); }
.tb-lista .search { flex: 0 1 320px; min-width: 220px; margin: 0; }
.tb-lista .search input { height: 40px; }
.tb-rapidos { display: flex; align-items: center; gap: var(--s2); flex: 1 1 0; min-width: 160px; max-width: 100%; overflow: hidden; }
.tb-rapidos > .scroller, .tb-rapidos .neg-pills { margin: 0; padding: 0; min-width: 0; flex-wrap: nowrap; overflow-x: auto; }
.tb-rapidos .pill { height: 36px; padding: 0 var(--s3); font-size: var(--fs-md); }
.tb-rapidos .scope { margin: 0; }
.tb-lista .tb-filtros { height: 40px; position: relative; }
.tb-lista .tb-filtros .fb-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--lime); color: #18191c; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.tb-fim { margin-left: auto; flex: none; }
.vista-sel button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 var(--s3); }
.vista-sel svg { width: 16px; height: 16px; }
@media (max-width: 860px) {
  /* celular: o "ver como" ocupa a linha de baixo da busca, com as opções do mesmo tamanho */
  .tb-vista { margin: calc(-1 * var(--s2)) 0 var(--s4); }
  .tb-vista .vista-sel { display: flex; width: 100%; }
  .tb-vista .vista-sel button { flex: 1; justify-content: center; }
  .page-head .ph-filtro { display: none !important; }
}
/* página sem busca: o filtro mora no canto do título (Painel) */
.page-head .ph-filtro .scope { margin: 0; }
/* pílulas que passam da largura: a última some aos poucos, avisando que dá para deslizar (como nas abas) */
.tb-rapidos > .scroller, .tb-rapidos .neg-pills { padding-right: 24px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }

/* Toque no celular: área de toque de pelo menos 44 px sem mudar o desenho (concluir tarefa, espiar a conversa, links de texto) */
@media (max-width: 860px) {
  .task .chk, .lc-peek, .page-head ~ * .textlink, .block-head .textlink, .linkbtn { position: relative; }
  .task .chk::before, .lc-peek::before, .block-head .textlink::before { content: ""; position: absolute; inset: -10px; }
}

/* Avisos neste aparelho (Configurações → Notificações; avisos-aparelho.js) */
.push-acoes { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.push-nota { margin: var(--s4) 0 0; }

/* Seletor de período (periodoSel em core.js): o mesmo em Relatórios, Financeiro da Motor e Consultor comercial.
   Pílulas numa linha, deslizando para o lado quando não cabem; "Escolher datas" abre De e Até embaixo. */
.periodo-sel { display: flex; gap: var(--s2); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 0 var(--s4); padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.periodo-sel::-webkit-scrollbar { display: none; }
.periodo-sel .pill { flex: none; white-space: nowrap; }
.periodo-datas { display: flex; gap: var(--s3); flex-wrap: wrap; margin: 0 0 var(--s4); }
.periodo-datas label { display: flex; align-items: center; gap: var(--s2); font-weight: 600; font-size: var(--fs-md); color: var(--ink-muted); }
.periodo-datas input { height: 40px; padding: 0 var(--s2); border: 1px solid var(--line); border-radius: var(--r-sm) 0 var(--r-sm) 0; background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-base); min-width: 0; }
@media (max-width: 860px) {
  .main .periodo-sel { margin-left: calc(-1 * var(--s4)); margin-right: calc(-1 * var(--s4)); padding-left: var(--s4); padding-right: var(--s4); }
  .periodo-sel .pill { height: 36px; padding: 0 var(--s3); }
  .periodo-datas label { flex: 1 1 140px; }
  .periodo-datas input { flex: 1; }
}

/* Utilitários (no lugar de style="" escrito à mão nas telas). Valem por cima das regras do componente, como o style fazia
   (!important); m-0 vem antes de mt-* e mb-* para "m-0 mt-3" zerar tudo e deixar só o topo. Espaços: os tokens --s*. */
.m-0 { margin: 0 !important; }
.mt-2 { margin-top: var(--s2) !important; }
.mt-3 { margin-top: var(--s3) !important; }
.mt-4 { margin-top: var(--s4) !important; }
.mt-5 { margin-top: var(--s5) !important; }
.mt-6 { margin-top: var(--s6) !important; }
.mb-2 { margin-bottom: var(--s2) !important; }
.mb-3 { margin-bottom: var(--s3) !important; }
.mb-4 { margin-bottom: var(--s4) !important; }
.mb-5 { margin-bottom: var(--s5) !important; }
.mb-6 { margin-bottom: var(--s6) !important; }
.mr-auto { margin-right: auto !important; }
.self-start { align-self: flex-start !important; }
.sem-clique { cursor: default !important; }
.link-limpo { text-decoration: none !important; color: inherit !important; }
.t-dir { text-align: right !important; }
.pre-wrap { white-space: pre-wrap !important; }

/* Assistente da loja no WhatsApp (assistente.js): convite na lista de grupos e exemplos */
.ast-convite { display: grid; gap: var(--s2); margin: 0 var(--s3) var(--s3); padding: var(--s3) var(--s4); background: var(--surface); border-radius: var(--r-md) 0 var(--r-md) 0; }
.ast-convite b { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-md); }
.ast-convite b svg { width: 16px; height: 16px; color: var(--accent-text); }
.ast-convite span { font-size: var(--fs-sm); color: var(--ink-muted); }
.ast-convite .btn { justify-self: start; height: 36px; padding: 0 var(--s3); font-size: var(--fs-sm); }
.ast-ex { list-style: none; margin: var(--s3) auto 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--ink-muted); font-style: italic; }
.gp-transc { font-style: italic; color: var(--ink-muted); }

/* Conexões de WhatsApp (Configurações → WhatsApp): Repasse e IA, cada uma no número do atendimento ou em outro */
.cx-linha { display: grid; gap: var(--s2); padding-top: var(--s4); }
.cx-linha .segmented { justify-self: start; max-width: 100%; }
.cx-linha .segmented button:disabled { opacity: .45; cursor: not-allowed; }

/* Central de notificações em abas: Notificações, Grupos e Conversas (notificacoes.js) */
.nc-corpo { gap: var(--s3); }
.nc-abas { flex: none; }
.nc-tab-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--danger); color: #fff; font-size: var(--fs-xs); font-weight: 700; }
.nc-barra { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: 0 var(--s1); color: var(--ink-muted); font-size: var(--fs-sm); }
.nc-barra .linkbtn { display: inline-flex; align-items: center; gap: 4px; }
.nc-barra .linkbtn svg { width: 16px; height: 16px; }

/* Ir para (Ctrl+K, irpara.js) e busca nas Configurações */
.ir-side { margin: 0 0 var(--s2); }
.ir-side kbd { margin-left: auto; font: inherit; font-size: var(--fs-xs); color: var(--ink-muted); border: 1px solid var(--line); border-radius: var(--r-sm, 6px); padding: 0 6px; line-height: 20px; }
body.side-min .ir-side kbd { display: none; }
.dlg.dlg-ir { width: min(640px, calc(100vw - 32px)); }
.ir { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); max-height: min(70vh, 620px); }
.ir-busca { width: 100%; flex: none; margin-left: 0; }
.ir-lista { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; flex: 1; }
.ir-g { padding: var(--s3) var(--s2) 4px; font-size: var(--fs-sm); color: var(--ink-muted); }
.ir-item { width: 100%; display: flex; align-items: center; gap: var(--s3); padding: 8px var(--s2); border: 0; background: none; border-radius: var(--r-md); text-align: left; cursor: pointer; color: inherit; font: inherit; }
.ir-lista [aria-selected="true"] .ir-item, .ir-item:hover { background: var(--surface-2, rgba(0, 0, 0, .05)); }
.ir-ic { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--surface-2, rgba(0, 0, 0, .05)); }
.ir-ic svg { width: 18px; height: 18px; }
.ir-av { width: 32px !important; height: 32px !important; flex: none; font-size: var(--fs-xs); }
.ir-txt { display: flex; flex-direction: column; min-width: 0; }
.ir-txt b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ir-txt small { color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ir-vazio { padding: var(--s5) var(--s2); color: var(--ink-muted); text-align: center; }
.ir-dica { display: flex; align-items: center; gap: 6px; margin: 0; font-size: var(--fs-xs); color: var(--ink-muted); }
.ir-dica svg { width: 14px; height: 14px; }
@media (max-width: 860px) { .ir-dica { display: none; } .ir-side { display: none; } }
.cfg-busca { flex: none; margin: 0 0 var(--s2); }

/* Saúde da conta (Painel, saude.js) */
.saude .block-head { margin-bottom: var(--s2); }
.sau-lista .row { gap: var(--s3); }
.sau-ic { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-muted); background: var(--surface-raised); }
.sau-ic.danger { color: var(--danger); }
.sau-ic.warn { color: var(--warn, #b26b00); }
.sau-ic svg { width: 18px; height: 18px; }
.sau-lista .btn { flex: none; }
@media (max-width: 860px) { .sau-lista .row { flex-wrap: wrap; } .sau-lista .btn { margin-left: 44px; } }

/* Ações em vários de uma vez (selecao.js): card marcado e a barra de baixo */
body.sel-modo .lc, body.sel-modo .vc, body.sel-modo .vl { position: relative; }
body.sel-modo .lc::after, body.sel-modo .vc::after, body.sel-modo .vl::after { content: ""; position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line); background: var(--surface); z-index: 2; pointer-events: none; }
.lc.sel-on, .vc.sel-on, .vl.sel-on { outline: 2px solid var(--ink); outline-offset: -2px; }
.lc.sel-on::after, .vc.sel-on::after, .vl.sel-on::after { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat !important; border-color: var(--ink) !important; }
body.sel-modo .lc { cursor: pointer; }
.sel-barra { position: fixed; z-index: 55; left: 50%; bottom: calc(var(--s4) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; flex-wrap: wrap; gap: var(--s3); max-width: calc(100vw - 2 * var(--s4)); padding: var(--s2) var(--s2) var(--s2) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg) 0 var(--r-lg) 0; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); animation: pop .16s ease-out; }
.sel-n { font-size: var(--fs-md); }
.sel-acoes { display: flex; flex-wrap: wrap; gap: var(--s2); }
@media (max-width: 860px) { .sel-barra { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); left: var(--s2); right: var(--s2); transform: none; max-width: none; } .sel-acoes .btn { flex: 1 1 auto; } }

/* Filtros salvos (filtros-salvos.js) */
.fsv-linha { display: flex; justify-content: flex-end; margin: calc(-1 * var(--s2)) 0 var(--s3); }

/* Próximo passo ao mover de etapa (proximo-passo.js) */
.pxp-ops { display: grid; gap: var(--s2); }
.pxp-op { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: var(--s3); border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--surface); text-align: left; cursor: pointer; color: inherit; font: inherit; }
.pxp-op:hover { border-color: var(--line); background: var(--surface-raised); }
.pxp-op svg { flex: none; width: 20px; height: 20px; }
.pxp-op span { display: flex; flex-direction: column; }
.pxp-op small { color: var(--ink-muted); }
body.sel-modo .lc .lc-r { visibility: hidden; }

/* Ver a Motor como esta pessoa (vercomo.js) */
.vc-faixa { position: fixed; z-index: 60; top: var(--s2); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: var(--s3); max-width: calc(100vw - 2 * var(--s3)); padding: 6px 6px 6px var(--s4); background: var(--ink); color: var(--surface); border-radius: var(--r-lg) 0 var(--r-lg) 0; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); font-size: var(--fs-sm); }
.vc-faixa svg { flex: none; width: 18px; height: 18px; }
.vc-faixa .btn { flex: none; }

/* Prévia da mensagem automática no estilo do WhatsApp (config.js, waPrevia) */
.wa-previa { margin-top: var(--s2); padding: var(--s3); border-radius: var(--r-md); background: #efe7dd; display: grid; gap: 6px; justify-items: start; }
.wa-previa-r { font-size: var(--fs-xs); color: #6b6358; }
.wa-previa-b { position: relative; max-width: 85%; padding: 6px 10px 18px; background: #fff; color: #111; border-radius: 0 8px 8px 8px; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); font-size: var(--fs-md); line-height: 20px; white-space: normal; overflow-wrap: anywhere; }
.wa-previa-h { position: absolute; right: 8px; bottom: 3px; font-size: 11px; color: #8a8a8a; }
.wa-previa-b .muted { color: #8a8a8a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wa-previa { background: #0b141a; } :root:not([data-theme="light"]) .wa-previa-r { color: #9aa4aa; } :root:not([data-theme="light"]) .wa-previa-b { background: #202c33; color: #e9edef; } }
:root[data-theme="dark"] .wa-previa { background: #0b141a; } :root[data-theme="dark"] .wa-previa-r { color: #9aa4aa; } :root[data-theme="dark"] .wa-previa-b { background: #202c33; color: #e9edef; }
.cx-grupos { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r-md); background: var(--surface-raised); font-size: var(--fs-sm); color: var(--ink-muted); }
.cx-grupos svg { flex: none; width: 16px; height: 16px; }
.cx-grupos span { flex: 1; min-width: 0; }
.cx-grupos b { color: var(--ink); }
.cx-extras { display: grid; gap: var(--s3); padding-top: var(--s4); }
.cx-extras:empty { display: none; }
/* Grupo da IA: dia e horário dos resumos, logo abaixo da chave */
.ast-quando { display: flex; flex-wrap: wrap; gap: var(--s3); padding: 0 0 var(--s3); }
.ast-quando .field { margin: 0; flex: 0 1 160px; min-width: 120px; }
/* Grupos no celular: a conversa aberta ocupa a tela inteira, igual à conversa do lead (sem a barra de baixo) */
@media (max-width: 860px) {
  /* sem altura fixa: preso nos 4 cantos, ocupa a tela toda (100dvh no app instalado do iPhone fica menor que a tela e sobrava um espaço embaixo) */
  .gp.gp-aberto .gp-conv { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 35; height: auto; min-height: 0; background: var(--surface) !important; padding-top: env(safe-area-inset-top, 0px); }
  .gp.gp-aberto .gp-msgs { background: var(--chat-bg); }
  .gp.gp-aberto .gp-foot { padding: var(--s2) var(--s2) calc(var(--s2) + env(safe-area-inset-bottom, 0px)); }
  body:has(.gp.gp-aberto) .tabbar, body:has(.gp.gp-aberto) #fab-root { display: none !important; }
  body:has(.gp.gp-aberto) { overflow: hidden; }
}

/* ===== Cadastro rápido do carro (veiculo-rapido.js) e opcionais ===== */
.vr-passo { display: grid; gap: var(--s3); }
.vr-passo + .vr-passo { margin-top: var(--s5); }
.vr-envios { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s3); }
.vr-doc { aspect-ratio: auto; min-height: 112px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--s1); }
.vr-doc small { font-weight: 400; font-size: var(--fs-sm); color: var(--ink-muted); overflow-wrap: anywhere; }
.vr-thumbs { display: flex; flex-wrap: wrap; gap: var(--s2); }
.vr-thumb { position: relative; width: 72px; height: 54px; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-raised); }
.vr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vr-thumb .iconbtn { position: absolute; top: 2px; right: 2px; background: rgba(0, 0, 0, .55); color: #fff; }
.vr-dono { margin-top: var(--s1); }
.vr-opcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s2) var(--s4); }
.vr-opcs .check { font-weight: 400; }
.vr-opc-lista { columns: 2; column-gap: var(--s5); margin: 0; padding-left: 1.1em; }
.vp-final { background: var(--surface-raised); border-radius: var(--r-md) 0 var(--r-md) 0; padding: var(--s3) var(--s4); }
.vp-final-b { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }

/* Carro sem foto (carPic em core.js): a imagem padrão, cobrindo o espaço da foto */
img.car-ph { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Nome do grupo do Copiloto: prefixo fixo e o resto digitado */
.ast-nome { display: flex; align-items: center; gap: var(--s2); }
.ast-nome input { flex: 1; min-width: 0; }
