/* listas: estilos desta frente (carregado depois de extra.css) */

/* ---------- Menu de baixo (celular): o ícone da aba tocada dá um pulinho ---------- */
@keyframes tab-pop { 0% { transform: scale(1); } 35% { transform: scale(1.22) translateY(-3px); } 65% { transform: scale(.94); } 100% { transform: scale(1); } }
.tabbar a.tab-pop svg, .tabbar a.tab-pop i { animation: tab-pop .42s cubic-bezier(.3, 1.4, .5, 1) both; transform-origin: 50% 60%; }
@media (prefers-reduced-motion: reduce) { .tabbar a.tab-pop svg, .tabbar a.tab-pop i { animation: none; } }

/* ---------- Painel: "Precisa de você agora" com botão de ação em cada item ---------- */
.agir-lista .row.agir { cursor: default; gap: var(--s2); }
.agir-main { display: flex; align-items: center; gap: var(--s3); flex: 1 1 auto; min-width: 0; padding: 0; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.agir-main .txt { flex: 1; min-width: 0; }
.agir-main .txt b, .agir-main .txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agir-main .tag { white-space: nowrap; }
.agir-btn { flex: none; white-space: nowrap; gap: 6px; }
.agir-btn svg, .agir-btn i { width: 16px; height: 16px; }
@media (max-width: 860px) {
  .agir-main .tag { display: none; }
  .agir-btn { padding: 0 var(--s3); }
}
@media (max-width: 400px) {
  .agir-btn span { display: none; } /* tela bem estreita: só o ícone (o nome fica no aria-label) */
  .agir-btn { width: 40px; padding: 0; justify-content: center; }
}

/* ---------- Funil: cartões sem texto vazando ---------- */
.lc .top { flex-wrap: nowrap; }
.lc .top .who { flex: 1 1 auto; min-width: 0; }
.lc .lc-r { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.lc .car { min-width: 0; }
.lc .car span { min-width: 0; flex: 1 1 auto; }
.lc .foot { min-width: 0; flex-wrap: nowrap; }
.lc .foot .src { flex: 1 1 auto; min-width: 0; }
.lc .foot .badge { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.lc .lstep { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: block; }
.lc .lstep::before { display: inline-block; margin-right: 6px; vertical-align: -1px; }
.lc .lc-etapa { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lc .lc-volta { align-self: flex-start; max-width: 100%; gap: 4px; font-size: var(--fs-xs); line-height: 16px; margin-top: 2px; overflow: hidden; }
.lc .lc-volta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lc .lc-volta svg, .lc .lc-volta i { width: 13px; height: 13px; flex: none; }

/* ---------- Listas com badges no título (Equipe, Clientes) ---------- */
.row .txt b.eq-nome { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.row .txt b.eq-nome .eq-n { display: inline; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: inherit; line-height: inherit; color: inherit; }
.row .txt b.eq-nome .badge { margin-left: 0; }
.member-row .txt > span { overflow-wrap: anywhere; }

/* ---------- Clientes ---------- */
.cli-tools { flex-wrap: wrap; }
.cli-tools .search { flex: 0 1 300px; min-width: 200px; margin-left: 0; }
.cli-tools .scroller { flex: 1 1 100%; min-width: 0; }
.cli-periodo { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cli-periodo label { display: flex; align-items: center; gap: 4px; font-size: var(--fs-md); color: var(--ink-muted); }
.cli-periodo select, .cli-periodo input { height: 36px; padding: 0 var(--s2); border: 1px solid var(--line-soft); border-radius: var(--r-sm) 0 var(--r-sm) 0; background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-md); }
.cli-periodo .iconbtn { width: 36px; height: 36px; }
.cli-origem select { height: 36px; padding: 0 var(--s3); border: 1px solid var(--line-soft); border-radius: var(--r-sm) 0 var(--r-sm) 0; background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-md); }
.cli-tools .pill { height: 36px; padding: 0 var(--s3); font-size: var(--fs-md); }
.cli-conta { margin: 0 0 var(--s2); }
.cli-row { gap: var(--s3); }
.cli-row .txt { display: flex; flex-direction: column; min-width: 0; }
.cli-l1 { display: flex !important; align-items: center; gap: 6px; min-width: 0; }
.cli-nome { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-row .txt .cli-l1 .cli-n { display: inline-flex; flex: none; font-size: var(--fs-xs); line-height: 16px; color: var(--ink-muted); }
.cli-row .txt .cli-l2 { font-size: var(--fs-md); line-height: 20px; color: var(--ink-muted); }
.cli-l2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-dir { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 45%; }
.cli-dir .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cli-valor { font-weight: 600; white-space: nowrap; }
@media (max-width: 860px) {
  .cli-tools .search { flex: 1 1 100%; }
  .cli-tools .scroller { flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .cli-tools .scroller::-webkit-scrollbar { display: none; }
  .cli-tools .pill { flex: none; }
  /* celular: cartão em duas linhas (nome e situação; carro, data e telefone) */
  .cli-card { padding: 0 var(--s3); }
  .cli-row { min-height: 60px; }
  .cli-row > svg:last-child, .cli-row > i:last-child { display: none; }
  .cli-valor { display: none; }
  .cli-dir { max-width: 40%; }
}

/* ---------- Busca e ferramentas: nada vazando no celular ---------- */
@media (max-width: 860px) {
  #ag-results, #eq-results, #fin-results, #cli-results, #arq-results { min-width: 0; }
  .toolbar .search { min-width: 0; }
}

/* Contatos em tabela: colunas com rolagem para o lado no celular */
.cli-ordem { display: flex; align-items: center; gap: 6px; flex: none; }
.cli-ordem label { font-size: var(--fs-md); color: var(--ink-muted); white-space: nowrap; }
.cli-ordem select { height: 36px; padding: 0 var(--s3); border: 1px solid var(--line-soft); border-radius: var(--r-sm) 0 var(--r-sm) 0; background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-md); }
.cli-inv { width: 36px; height: 36px; border: 1px solid var(--line-soft); border-radius: var(--r-sm) 0 var(--r-sm) 0; }
.cli-card { padding: 0; overflow: hidden; }
.cli-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cli-tab { width: 100%; border-collapse: collapse; font-size: var(--fs-md); line-height: 20px; }
.cli-tab th, .cli-tab td { padding: 10px var(--s3); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line-soft); }
.cli-tab thead th { position: sticky; top: 0; background: var(--surface-raised); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-muted); white-space: nowrap; z-index: 1; }
.cli-tab tbody tr { cursor: pointer; }
.cli-tab tbody tr:hover, .cli-tab tbody tr:focus-visible { background: var(--surface-high); outline: none; }
.cli-tab tbody tr:last-child th, .cli-tab tbody tr:last-child td { border-bottom: 0; }
.cli-tab tbody th { font-weight: 400; }
.cli-pessoa { display: flex; align-items: center; gap: var(--s2); min-width: 160px; }
.cli-tel small { display: block; color: var(--ink-muted); font-size: var(--fs-xs); }
.cli-pessoa .av { width: 32px; height: 32px; flex: none; }
.cli-pessoa b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.cli-pessoa small, .cli-carro small { display: block; color: var(--ink-muted); font-size: var(--fs-xs); }
.cli-carro { min-width: 130px; }
.cli-nw { white-space: nowrap; }
.cli-th { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.cli-th svg { width: 14px; height: 14px; }
.cli-tab th[aria-sort="ascending"], .cli-tab th[aria-sort="descending"] { color: var(--ink); }
.cli-tab .badge { white-space: nowrap; }

.cli-topo { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin: 0 0 var(--s2); }
.cli-topo .cli-conta { margin: 0; }
.cli-topo .cli-ordem { margin-left: auto; }
@media (max-width: 860px) { .cli-topo .cli-ordem { flex: 0 1 auto; } }
/* Primeira linha de Contatos: busca, origem, período e limpar com a mesma altura e o mesmo contorno */
.cli-tools .cli-origem select, .cli-tools .cli-periodo select, .cli-tools .cli-periodo .dp-btn, .cli-tools .cli-periodo input { height: 44px; border: 1px solid var(--line); font-size: var(--fs-base); }
.cli-tools .cli-periodo .iconbtn { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm) 0 var(--r-sm) 0; }
