/*
 * Cards e gráficos das páginas de licitações.
 * Mantém o padrão verde do portal e usa somente dados agregados fornecidos
 * por api/pesquisa-banco.php. Não altera tabelas, filtros ou resultados.
 */
.pg-painel {
  margin: 0 0 20px;
}

.pg-painel-cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 12px;
}

.pg-painel-titulo {
  margin: 0;
  color: var(--cor-primaria, #1b5e20);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: .01em;
}

.pg-nota-totais,
.pg-vazio,
.pg-carregando {
  color: #5f6f63;
  font-size: 12.5px;
}

.pg-carregando,
.pg-vazio {
  padding: 14px 16px;
  border: 1px solid #cde6d3;
  border-radius: 14px;
  background: #eaf6ed;
}

.pg-cartoes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 14px;
}

.pg-cartao {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid #cde6d3;
  border-radius: 14px;
  background: linear-gradient(145deg, #edf8ef 0%, #e5f3e8 100%);
  box-shadow: 0 7px 18px rgba(27, 94, 32, .07);
}

.pg-cartao-cabecalho {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 13px;
}

.pg-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .68);
  font-size: 18px;
  line-height: 1;
}

.pg-titulo-cartao {
  margin: 0;
  color: var(--cor-primaria, #1b5e20);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.pg-corpo {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.pg-donut-wrap {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.pg-donut-wrap svg {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
  overflow: visible;
}

.pg-legenda {
  min-width: 0;
  flex: 1 1 150px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
}

.pg-legenda li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(27, 94, 32, .08);
}

.pg-legenda li:last-child {
  border-bottom: 0;
}

.pg-bolinha {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
}

.pg-legenda-nome {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: #25372a;
}

.pg-legenda-valor {
  flex: 0 0 auto;
  color: #536458;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pg-cartao-resumo {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pg-resumo-total {
  color: var(--cor-primaria, #1b5e20);
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pg-resumo-texto {
  margin-top: 8px;
  color: #425448;
  font-size: 13px;
}

@media (max-width: 720px) {
  .pg-cartao {
    padding: 16px;
  }

  .pg-corpo {
    align-items: flex-start;
  }

  .pg-donut-wrap svg {
    width: 130px;
  }
}

@media (max-width: 430px) {
  .pg-corpo {
    flex-direction: column;
    align-items: stretch;
  }

  .pg-donut-wrap svg {
    width: 148px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pg-painel *,
  .pg-painel *::before,
  .pg-painel *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .pg-cartao {
    break-inside: avoid;
    box-shadow: none;
  }
}
