/* Painel da placa — Pesquisa em Massa (public/painel-placa.js).
   Classes com prefixo pp- para não colidir com ppm- (lote) nem ipu- (inteligência). */

.pp-sem-rolagem { overflow: hidden; }

.pp-fundo {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(15, 23, 42, 0);
  pointer-events: none;
  transition: background .25s ease;
}
.pp-fundo.pp-aberto { background: rgba(15, 23, 42, .28); pointer-events: auto; }

.pp-painel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(560px, 100vw);
  background: #f8fafc;
  box-shadow: -18px 0 40px rgba(15, 23, 42, .16);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #0f172a;
}
.pp-fundo.pp-aberto .pp-painel { transform: translateX(0); }

/* ------------------------------------------------------------ cabeçalho */
.pp-cabecalho {
  position: relative;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 22px 52px 16px 22px;
  background: #fff; border-bottom: 1px solid #e2e8f0;
}
.pp-identidade { display: flex; gap: 12px; flex: 1; min-width: 0; }
.pp-icone-carro {
  width: 46px; height: 46px; flex: none; border-radius: 12px;
  background: #eef2ff; color: #4338ca;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.pp-placa-linha { display: flex; align-items: center; gap: 8px; }
.pp-placa { font-size: 22px; font-weight: 800; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.pp-uf {
  font-size: 10px; font-weight: 700; color: #475569;
  background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; padding: 2px 6px;
}
.pp-veiculo { font-size: 12px; color: #64748b; margin-top: 2px; }
.pp-lote-linha { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 12px; }
.pp-rank { color: #64748b; font-weight: 600; }
.pp-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: #4f46e5; font-weight: 600; font-size: 12px;
}
.pp-link:hover { text-decoration: underline; }
.pp-fechar {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 8px; border: 0;
  background: transparent; color: #64748b; cursor: pointer; font-size: 18px;
}
.pp-fechar:hover { background: #f1f5f9; color: #0f172a; }

/* ------------------------------------------------------------ score */
.pp-score {
  flex: none; text-align: center; padding: 8px 12px;
  border: 1px solid #e2e8f0; border-radius: 12px; background: #fff;
}
.pp-score-rotulo { font-size: 10px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.pp-score-corpo { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.pp-gauge {
  --pp-cor: #10b981;
  width: 62px; height: 62px; border-radius: 50%;
  background: conic-gradient(var(--pp-cor) calc(var(--pp-valor) * 1%), #e2e8f0 0);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.pp-gauge::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.pp-gauge span { position: relative; font-size: 17px; font-weight: 800; line-height: 1; }
.pp-gauge small { font-size: 9px; color: #64748b; font-weight: 600; }
.pp-faixa { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.pp-faixa-muito-alto { --pp-cor: #059669; color: #047857; background: #d1fae5; }
.pp-faixa-alto { --pp-cor: #10b981; color: #059669; background: #ecfdf5; }
.pp-faixa-medio { --pp-cor: #ca8a04; color: #a16207; background: #fef9c3; }
.pp-faixa-baixo { --pp-cor: #dc2626; color: #b91c1c; background: #fee2e2; }
.pp-gauge.pp-faixa-muito-alto, .pp-gauge.pp-faixa-alto, .pp-gauge.pp-faixa-medio, .pp-gauge.pp-faixa-baixo { background: conic-gradient(var(--pp-cor) calc(var(--pp-valor) * 1%), #e2e8f0 0); }
.pp-faixa-vazia { color: #64748b; background: #f1f5f9; }
.pp-score-vazio .pp-gauge span { color: #94a3b8; }

/* ------------------------------------------------------------ meta */
.pp-meta {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  padding: 14px 22px; background: #fff; border-bottom: 1px solid #e2e8f0;
}
.pp-meta-item { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.pp-meta-item > i { color: #94a3b8; margin-top: 2px; font-size: 13px; }
/* sem isto o texto longo (processo, devedor) passa por cima da coluna vizinha:
   o filho flex nao encolhe abaixo do conteudo e a reticencia nunca aparece */
.pp-painel .min-w-0 { min-width: 0; flex: 1 1 auto; }
.pp-meta-rotulo { font-size: 10px; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.pp-meta-valor { font-size: 12px; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------ abas */
.pp-abas {
  display: flex; gap: 20px; padding: 0 22px; background: #fff;
  border-bottom: 1px solid #e2e8f0; overflow-x: auto;
  position: sticky; top: 0; z-index: 2;
}
.pp-aba {
  background: none; border: 0; cursor: pointer; white-space: nowrap;
  padding: 13px 0 11px; font-size: 13px; font-weight: 600; color: #64748b;
  border-bottom: 2px solid transparent;
}
.pp-aba:hover { color: #1e293b; }
.pp-aba-ativa { color: #4f46e5; border-bottom-color: #4f46e5; }

/* ------------------------------------------------------------ conteúdo */
.pp-conteudo { padding: 16px 16px 28px; display: flex; flex-direction: column; gap: 12px; }
.pp-carregando { padding: 60px 20px; text-align: center; color: #64748b; font-size: 13px; }
.pp-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px 16px; }
.pp-card-titulo {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 14px; font-weight: 700; color: #0f172a; margin-bottom: 12px;
}
.pp-card-titulo > span > i { color: #6366f1; margin-right: 6px; }
.pp-selo {
  font-size: 11px; font-weight: 600; color: #475569;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 3px 8px;
}
.pp-selo i { color: #94a3b8; margin-right: 4px; }

.pp-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pp-num { border: 1px solid #f1f5f9; border-radius: 10px; padding: 10px 12px; background: #fcfcfd; }
.pp-num-valor { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pp-num-rotulo { font-size: 11px; color: #64748b; margin-top: 2px; }
.pp-rodape-resumo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.pp-rodape-resumo > div {
  display: flex; gap: 10px; align-items: center;
  border: 1px solid #f1f5f9; border-radius: 10px; padding: 10px 12px; background: #fcfcfd;
}
.pp-rodape-resumo i { color: #6366f1; font-size: 16px; }
.pp-destaque { font-size: 14px; font-weight: 700; color: #0f172a; }
.pp-nota { margin: 10px 0 0; font-size: 11px; color: #64748b; }
.pp-nota i { color: #94a3b8; margin-right: 4px; }

/* ------------------------------------------------------------ recorrência */
.pp-recorrencia { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px; align-items: stretch; }
.pp-cidades { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-cidades li {
  display: flex; align-items: center; gap: 10px; padding: 8px 4px;
  border-bottom: 1px solid #f1f5f9; font-size: 12px;
}
.pp-cidades li:last-child { border-bottom: 0; }
.pp-cidades li > i { color: #6366f1; width: 14px; text-align: center; }
.pp-cidade-nome { font-weight: 600; color: #1e293b; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-cidade-qtd { color: #64748b; font-weight: 600; white-space: nowrap; }
.pp-mapa { min-height: 210px; border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; background: #eef2f7; }
.pp-mapa-grande { min-height: 340px; }
.pp-mapa-vazio { height: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #94a3b8; font-size: 12px; }

/* ------------------------------------------------------------ histórico com foto */
.pp-passagens { list-style: none; margin: 0; padding: 0; }
.pp-passagem {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) 104px; gap: 10px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #f1f5f9;
}
.pp-passagem:last-child { border-bottom: 0; }
.pp-passagem-quando { font-size: 12px; font-weight: 700; color: #1e293b; font-variant-numeric: tabular-nums; }
.pp-passagem-onde { font-size: 12px; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-camera { display: block; font-size: 10px; color: #94a3b8; margin-top: 1px; }

/* A FOTO — onde ficavam os botões "Passagem" do desenho */
.pp-foto {
  position: relative; display: block; width: 104px; height: 62px;
  border-radius: 8px; overflow: hidden; padding: 0;
  border: 1px solid #cbd5e1; background: #0f172a; cursor: zoom-in;
}
.pp-foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.pp-foto:hover img { transform: scale(1.06); }
.pp-foto-lupa {
  position: absolute; right: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 6px;
  background: rgba(15, 23, 42, .7); color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}
.pp-foto-sem {
  cursor: default; background: #f1f5f9; border-style: dashed; color: #94a3b8;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px;
}
.pp-foto-sem i { font-size: 15px; }

/* ------------------------------------------------------------ ações */
.pp-acoes-bloco { padding: 4px 2px 0; }
.pp-acoes-titulo { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.pp-acoes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pp-botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid #c7d2fe;
  background: #fff; color: #3730a3; font-size: 12px; font-weight: 700; cursor: pointer;
}
.pp-botao:hover:not(:disabled) { background: #eef2ff; }
.pp-botao:disabled { opacity: .5; cursor: not-allowed; }
.pp-botao-primario { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.pp-botao-primario:hover:not(:disabled) { background: #1e40af; }

/* ------------------------------------------------------------ vazios */
.pp-vazio { text-align: center; padding: 34px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pp-vazio > i { font-size: 28px; color: #a5b4fc; }
.pp-vazio .pp-cidade-nome { white-space: normal; flex: none; }
.pp-vazio-pequeno { font-size: 12px; color: #64748b; margin: 0; }
.pp-vazio .pp-botao { margin-top: 6px; }

/* a linha do lote quando se volta a ela pelo "Ver no lote" */
.pp-linha-destacada td { background: #eef2ff !important; transition: background .4s ease; }

/* ------------------------------------------------------------ foto em tela cheia */
.pp-lightbox {
  position: fixed; inset: 0; z-index: 1300; background: rgba(2, 6, 23, .9);
  display: flex; align-items: center; justify-content: center; padding: 30px 70px;
}
.pp-lb-figura { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.pp-lb-figura img { max-width: 100%; max-height: calc(100vh - 130px); border-radius: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); background: #0f172a; }
.pp-lb-figura figcaption { color: #e2e8f0; font-size: 13px; margin-top: 12px; text-align: center; }
.pp-lb-contador { display: block; font-size: 11px; color: #94a3b8; margin-top: 3px; }
.pp-lb-fechar, .pp-lb-nav {
  position: absolute; border: 0; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, .12); border-radius: 50%;
  width: 44px; height: 44px; font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.pp-lb-fechar:hover, .pp-lb-nav:hover { background: rgba(255, 255, 255, .24); }
.pp-lb-fechar { top: 18px; right: 18px; }
.pp-lb-ant { left: 16px; top: 50%; transform: translateY(-50%); }
.pp-lb-prox { right: 16px; top: 50%; transform: translateY(-50%); }

/* ------------------------------------------------------------ telas estreitas */
@media (max-width: 560px) {
  .pp-cabecalho { flex-wrap: wrap; }
  .pp-score { width: 100%; }
  .pp-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-recorrencia { grid-template-columns: 1fr; }
  .pp-passagem { grid-template-columns: 70px minmax(0, 1fr) 88px; }
  .pp-foto { width: 88px; height: 54px; }
  .pp-acoes { grid-template-columns: 1fr; }
  .pp-lightbox { padding: 20px 10px; }
}

/* ------------------------------------------------------------ origem, score explicado, documentos */
.pp-origem { margin-top: 3px; font-size: 11px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-link i { margin-right: 3px; }
.pp-fatores { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.pp-fator-topo { display: grid; grid-template-columns: 1fr auto 62px; gap: 8px; align-items: baseline; font-size: 12px; }
.pp-fator-nome { color: #334155; font-weight: 600; }
.pp-fator-valor { color: #64748b; }
.pp-fator-pontos { color: #1e293b; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.pp-fator-barra { height: 5px; border-radius: 999px; background: #e2e8f0; margin-top: 4px; overflow: hidden; }
.pp-fator-barra span { display: block; height: 100%; background: #6366f1; border-radius: 999px; }
.pp-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pp-doc { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 10px; }
.pp-doc > i { color: #6366f1; font-size: 16px; text-align: center; }
.pp-doc a { color: #1e293b; text-decoration: none; }
.pp-doc .pp-meta-rotulo { text-transform: none; letter-spacing: 0; font-weight: 500; }
.pp-doc a:hover { color: #1d4ed8; text-decoration: underline; }
.pp-doc-excluir { border: 0; background: transparent; color: #94a3b8; cursor: pointer; padding: 6px; border-radius: 8px; }
.pp-doc-excluir:hover { color: #dc2626; background: #fef2f2; }
.pp-doc-enviar { padding: 6px 10px; font-size: 12px; cursor: pointer; }
.pp-desligado { opacity: .6; pointer-events: none; }
.pp-nota-erro { color: #b91c1c; }
.pp-nota-erro i { color: #dc2626; }
