/* Start custom CSS *//* =========================================================
   EMENDAS FEDERAIS — CSS COMPLETO
   Versão: 4.0 | Conformidade: Cartilha PNTP 2026 (Atricon)
   Critérios 17.1 e 17.3
   ========================================================= */

/* =========================================================
   VARIÁVEIS DE COR
   ========================================================= */
:root {
  --azul-escuro: #0b3d6e;
  --azul-principal: #0f5ea8;
  --azul-hover: #0b4d89;
  --azul-claro: #dbeafe;
  --azul-suave: #f0f6ff;
  --verde-escuro: #166534;
  --verde-bg: #dcfce7;
  --verde-borda: #4ade80;
  --amarelo-escuro: #854d0e;
  --amarelo-bg: #fef9c3;
  --amarelo-borda: #fbbf24;
  --cinza-escuro: #374151;
  --cinza-bg: #f3f4f6;
  --cinza-borda: #9ca3af;
  --vermelho-bg: #fee2e2;
  --vermelho-borda: #f87171;
  --texto-principal: #1f2937;
  --texto-secundario: #6b7280;
  --borda-padrao: #dbe3ee;
  --fundo-branco: #ffffff;
  --fundo-pagina: #f8fafc;
}

/* =========================================================
   BASE DA PÁGINA
   ========================================================= */
.emendas-wrap {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 28px;
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  color: var(--texto-principal);
  background: var(--fundo-pagina);
}

/* =========================================================
   BREADCRUMB
   ========================================================= */
.emendas-breadcrumbs {
  font-size: 13px;
  color: var(--texto-secundario);
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--fundo-branco);
  border: 1px solid var(--borda-padrao);
  border-radius: 8px;
  display: inline-block;
}

.emendas-breadcrumbs a {
  color: var(--azul-principal);
  text-decoration: none;
  font-weight: 500;
}

.emendas-breadcrumbs a:hover {
  text-decoration: underline;
}

/* =========================================================
   HERO — CABEÇALHO DA PÁGINA
   ========================================================= */
.emendas-hero {
  background: linear-gradient(135deg, #0b3d6e 0%, #0f5ea8 60%, #1a7fd4 100%);
  color: #ffffff;
  padding: 32px 36px;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(11, 61, 110, 0.22);
  position: relative;
  overflow: hidden;
}

.emendas-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.emendas-hero h1 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
}

.emendas-hero p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
  max-width: 820px;
}

/* =========================================================
   TOTALIZADORES DINÂMICOS
   ========================================================= */
.emendas-totalizadores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.total-card {
  background: var(--fundo-branco);
  border: 1px solid var(--borda-padrao);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.05);
  border-left: 4px solid var(--azul-principal);
}

.total-card--verde {
  border-left-color: var(--verde-escuro);
}

.total-card--cinza {
  border-left-color: var(--cinza-borda);
}

.total-numero {
  font-size: 22px;
  font-weight: 700;
  color: var(--azul-escuro);
  line-height: 1;
}

.total-label {
  font-size: 12px;
  color: var(--texto-secundario);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* =========================================================
   CARDS / BLOCOS DA PÁGINA
   ========================================================= */
.emendas-card {
  background: var(--fundo-branco);
  border: 1px solid var(--borda-padrao);
  border-radius: 16px;
  padding: 24px 26px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.emendas-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--azul-escuro);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--azul-claro);
  margin-bottom: 18px;
}

.emendas-nota {
  font-size: 13px;
  color: var(--texto-secundario);
  margin: -10px 0 16px;
  padding: 10px 14px;
  background: var(--azul-suave);
  border-radius: 8px;
  border-left: 3px solid var(--azul-principal);
}

/* =========================================================
   NOTA INSTITUCIONAL / LEGAL
   ========================================================= */
.emendas-nota-legal {
  border-left: 4px solid var(--azul-principal);
  background: var(--azul-suave);
}

.emendas-nota-legal h2 {
  font-size: 17px;
  border-bottom-color: var(--azul-claro);
}

.emendas-nota-legal p {
  font-size: 14px;
  color: var(--texto-principal);
  line-height: 1.6;
  margin: 0 0 10px;
}

.emendas-nota-legal p:last-child {
  margin-bottom: 0;
}

.emendas-atualizacao {
  font-size: 12px !important;
  color: var(--texto-secundario) !important;
  padding-top: 10px;
  border-top: 1px solid var(--borda-padrao);
}

/* =========================================================
   FILTROS
   ========================================================= */
.emendas-filtros {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.filtro-grupo {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filtro-grupo label {
  font-size: 12px;
  font-weight: 600;
  color: var(--texto-secundario);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.emendas-filtros input,
.emendas-filtros select {
  width: 100%;
  height: 42px;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: var(--fundo-branco);
  color: var(--texto-principal);
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}

.emendas-filtros input:focus,
.emendas-filtros select:focus {
  outline: none;
  border-color: var(--azul-principal);
  box-shadow: 0 0 0 3px rgba(15, 94, 168, 0.12);
}

/* =========================================================
   AÇÕES DOS FILTROS
   ========================================================= */
.emendas-acoes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--borda-padrao);
}

.emendas-acoes button {
  min-height: 42px;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#btn-filtrar {
  background: var(--azul-principal);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 94, 168, 0.25);
}

#btn-filtrar:hover {
  background: var(--azul-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 94, 168, 0.3);
}

#btn-limpar,
#btn-csv {
  background: var(--cinza-bg);
  color: var(--cinza-escuro);
  border: 1px solid #d1d5db;
}

#btn-limpar:hover,
#btn-csv:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.resultado-filtro {
  margin-top: 12px;
  font-size: 13px;
  color: var(--azul-principal);
  font-weight: 600;
  padding: 8px 12px;
  background: var(--azul-suave);
  border-radius: 6px;
  border-left: 3px solid var(--azul-principal);
}

/* =========================================================
   RESUMO POR EXERCÍCIO
   ========================================================= */
.resumo-anos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.resumo-ano-card {
  background: var(--fundo-branco);
  border: 1px solid var(--borda-padrao);
  border-left: 4px solid var(--azul-principal);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.05);
}

.resumo-ano-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.resumo-ano-titulo {
  font-size: 18px;
  font-weight: 700;
  color: var(--azul-escuro);
  line-height: 1;
}

.resumo-ano-valor {
  font-size: 16px;
  font-weight: 700;
  color: var(--azul-principal);
}

.resumo-ano-lista {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resumo-ano-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--texto-principal);
}

.resumo-ano-item span:first-child {
  color: var(--texto-secundario);
}

/* =========================================================
   SCROLL SUPERIOR DA TABELA
   ========================================================= */
.emendas-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--borda-padrao);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: var(--fundo-branco);
  box-shadow: 0 2px 8px rgba(15,23,42,0.04);
  height: 18px;
}

.emendas-scroll-top-inner {
  height: 1px;
}

/* =========================================================
   CONTAINER DA TABELA
   ========================================================= */
.emendas-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--borda-padrao);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.04);
}

/* =========================================================
   TABELA PRINCIPAL
   ========================================================= */
#tabela-emendas {
  width: 100%;
  min-width: 1420px;
  border-collapse: collapse;
  background: var(--fundo-branco);
}

#tabela-emendas thead th {
  background: var(--azul-escuro);
  color: #ffffff;
  text-align: left;
  padding: 13px 12px;
  font-size: 12px;
  font-weight: 700;
  border-bottom: 2px solid #072d52;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  vertical-align: middle;
}

#tabela-emendas tbody td {
  padding: 13px 12px;
  font-size: 13.5px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  color: var(--texto-principal);
}

#tabela-emendas tbody tr:nth-child(even) {
  background: #fafcff;
}

#tabela-emendas tbody tr:hover {
  background: #f0f6ff;
  transition: background .15s;
}

/* =========================================================
   LARGURA DAS COLUNAS
   ========================================================= */
#tabela-emendas th:nth-child(1),
#tabela-emendas td:nth-child(1) { width: 60px; white-space: nowrap; }
#tabela-emendas th:nth-child(2),
#tabela-emendas td:nth-child(2) { width: 145px; white-space: nowrap; }
#tabela-emendas th:nth-child(3),
#tabela-emendas td:nth-child(3) { width: 155px; white-space: nowrap; }
#tabela-emendas th:nth-child(4),
#tabela-emendas td:nth-child(4) { width: 175px; }
#tabela-emendas th:nth-child(5),
#tabela-emendas td:nth-child(5) { width: 160px; white-space: nowrap; }
#tabela-emendas th:nth-child(6),
#tabela-emendas td:nth-child(6) { width: 200px; }
#tabela-emendas th:nth-child(7),
#tabela-emendas td:nth-child(7) { width: 140px; white-space: nowrap; }
#tabela-emendas th:nth-child(8),
#tabela-emendas td:nth-child(8) { width: 140px; white-space: nowrap; }
#tabela-emendas th:nth-child(9),
#tabela-emendas td:nth-child(9) { min-width: 240px; }
#tabela-emendas th:nth-child(10),
#tabela-emendas td:nth-child(10) { width: 160px; white-space: nowrap; }
#tabela-emendas th:nth-child(11),
#tabela-emendas td:nth-child(11) { width: 120px; text-align: center; }
#tabela-emendas th:nth-child(12),
#tabela-emendas td:nth-child(12) { width: 80px; text-align: center; white-space: nowrap; }

/* =========================================================
   BADGES DE STATUS
   ========================================================= */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge--verde {
  background: var(--verde-bg);
  color: var(--verde-escuro);
  border: 1px solid var(--verde-borda);
}

.badge--amarelo {
  background: var(--amarelo-bg);
  color: var(--amarelo-escuro);
  border: 1px solid var(--amarelo-borda);
}

.badge--cinza {
  background: var(--cinza-bg);
  color: var(--cinza-escuro);
  border: 1px solid var(--cinza-borda);
}

.badge--vermelho {
  background: var(--vermelho-bg);
  color: #991b1b;
  border: 1px solid var(--vermelho-borda);
}

/* =========================================================
   BOTÃO DETALHAR
   ========================================================= */
.btn-detalhar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--azul-claro);
  color: #1d4ed8;
  text-decoration: none;
  font-size: 17px;
  line-height: 1;
  transition: all .2s ease;
  border: 1px solid #bfdbfe;
}

.btn-detalhar:hover {
  background: #bfdbfe;
  color: #1e3a8a;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.2);
}

/* =========================================================
   MENSAGEM DE SEM RESULTADO
   ========================================================= */
.msg-sem-resultado {
  text-align: center;
  padding: 32px;
  color: var(--texto-secundario);
  font-size: 14px;
}

.msg-sem-resultado a {
  color: var(--azul-principal);
  font-weight: 600;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 900px) {
  .emendas-wrap { padding: 14px 16px; }
  .emendas-hero { padding: 22px 20px; }
  .emendas-hero h1 { font-size: 24px; }
  .emendas-hero p { font-size: 14px; }
  .emendas-card { padding: 18px 16px; }
  .emendas-acoes { flex-direction: column; }
  .emendas-acoes button { width: 100%; justify-content: center; }
  .total-numero { font-size: 20px; }
  .resumo-anos { grid-template-columns: 1fr; }
}

/* =========================================================
   IMPRESSÃO
   ========================================================= */
@media print {
  .emendas-breadcrumbs,
  .emendas-acoes,
  .btn-detalhar,
  .resultado-filtro,
  .msg-sem-resultado,
  .emendas-scroll-top {
    display: none !important;
  }

  .emendas-wrap {
    padding: 0 !important;
    background: white !important;
  }

  .emendas-card,
  .emendas-hero {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }

  .emendas-table-wrap {
    border-radius: 12px !important;
  }

  #tabela-emendas {
    min-width: 100% !important;
    font-size: 11px !important;
  }

  #tabela-emendas thead th {
    background: #1a3a5c !important;
    -webkit-print-color-adjust: exact;
  }
}/* End custom CSS */