:root {
  --azul: #1a4d8f;
  --cinza-claro: #f4f6f8;
  --cinza-borda: #d8dee5;
  --texto: #202632;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--texto);
  background: #fff;
  margin: 0;
  padding: 0 24px 48px;
}

header {
  padding: 20px 0 12px;
  border-bottom: 2px solid var(--azul);
  margin-bottom: 20px;
}

header a { color: var(--azul); text-decoration: none; }

h1 { margin: 0 0 4px; font-size: 1.5rem; color: var(--azul); }

.info-banco { margin: 0; color: #667; font-size: 0.9rem; }

.filtros {
  background: var(--cinza-claro);
  border: 1px solid var(--cinza-borda);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.filtros .linha {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.filtros label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  font-weight: 600;
  gap: 4px;
  flex: 1 1 200px;
}

.filtros input, .filtros select {
  font-size: 0.95rem;
  padding: 6px 8px;
  border: 1px solid var(--cinza-borda);
  border-radius: 5px;
  font-weight: normal;
}

.filtros button {
  background: var(--azul);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 9px 22px;
  font-size: 0.95rem;
  cursor: pointer;
}

.filtros button:hover { background: #123a6e; }

.filtros .limpar {
  align-self: center;
  color: #667;
  font-size: 0.9rem;
  text-decoration: none;
}

.aviso {
  font-size: 0.8rem;
  color: #7a5b00;
  background: #fff6d8;
  border: 1px solid #f0dd90;
  border-radius: 5px;
  padding: 8px 12px;
  margin: 4px 0 12px;
}

.contagem { font-weight: 600; margin-bottom: 12px; }

.vazio { color: #667; font-style: italic; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--cinza-borda);
  vertical-align: top;
}

thead th {
  background: var(--cinza-claro);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #556;
}

.orgao { color: #667; font-size: 0.8rem; }

a { color: var(--azul); }

.paginacao {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  font-size: 0.9rem;
}

.ficha th {
  width: 220px;
  background: var(--cinza-claro);
}

section.detalhe, section.itens { margin-bottom: 28px; }

/* ---- grupo de valor (mínimo/máximo sob uma legenda) ---- */
.filtros fieldset.grupo-valor {
  flex: 1 1 260px;
  border: 1px solid var(--cinza-borda);
  border-radius: 6px;
  padding: 4px 12px 10px;
  margin: 0;
  display: flex;
  gap: 12px;
}
.filtros fieldset.grupo-valor legend {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0 6px;
}
.filtros label.sub {
  font-weight: normal;
  font-size: 0.8rem;
  color: #556;
  flex: 1 1 0;
}

/* ---- tabela de resultados: larguras fixas + linha de 2 alturas ---- */
table.tabela-resultados { table-layout: fixed; }
table.tabela-resultados th, table.tabela-resultados td { overflow-wrap: anywhere; }

.col-mun  { width: 12%; }
.col-obj  { width: 34%; }
.col-mod  { width: 13%; }
.col-srp  { width: 6%; }
.col-val  { width: 13%; }
.col-data { width: 11%; }
.col-pncp { width: 8%; }

/* trunca o conteúdo em no máximo 2 linhas, padronizando a altura */
table.tabela-resultados .cel {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  max-height: 2.7em;   /* 2 linhas */
}

/* ---- painel lateral (drawer) de detalhe do processo ---- */
body.sem-scroll { overflow: hidden; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 45, 0.45);
  z-index: 40;
  display: none;
}
.overlay.aberto { display: block; }

.painel {
  position: fixed;
  top: 0;
  right: 0;
  width: 75%;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.2);
  z-index: 50;
  display: none;
  flex-direction: column;
}
.painel.aberto { display: flex; }

.painel-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 2px solid var(--azul);
}
.painel-topo h2 { margin: 0; font-size: 1.2rem; color: var(--azul); }

.fechar {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #667;
  line-height: 1;
}
.fechar:hover { color: var(--texto); }

.painel-corpo {
  padding: 16px 20px 40px;
  overflow-y: auto;   /* rolagem só dentro do painel */
  flex: 1;
}

.painel-corpo .carregando { color: #667; font-style: italic; }

.painel-corpo .resumo p { margin: 4px 0; font-size: 0.92rem; }
.painel-corpo h3 { margin: 18px 0 8px; font-size: 1rem; color: var(--azul); }

table.itens-painel { width: 100%; border-collapse: collapse; font-size: 0.88rem; table-layout: fixed; }
table.itens-painel th, table.itens-painel td {
  text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--cinza-borda);
  vertical-align: top; overflow-wrap: anywhere;
}
table.itens-painel th { background: var(--cinza-claro); font-size: 0.75rem; text-transform: uppercase; color: #556; }
/* 6 colunas: [checkbox] [#] [Descrição] [Qtd] [Vlr unit.] [Vlr total] */
table.itens-painel th:nth-child(1), table.itens-painel td:nth-child(1) { width: 6%; }
table.itens-painel th:nth-child(2), table.itens-painel td:nth-child(2) { width: 6%; }
table.itens-painel th:nth-child(3), table.itens-painel td:nth-child(3) { width: 40%; }
table.itens-painel th:nth-child(4), table.itens-painel td:nth-child(4) { width: 16%; }
table.itens-painel th:nth-child(5), table.itens-painel td:nth-child(5) { width: 16%; }
table.itens-painel th:nth-child(6), table.itens-painel td:nth-child(6) { width: 16%; }
/* números (qtd, vlr unit., vlr total) não quebram no meio */
table.itens-painel td:nth-child(4), table.itens-painel td:nth-child(5), table.itens-painel td:nth-child(6) { overflow-wrap: normal; word-break: keep-all; }

@media (max-width: 700px) {
  .painel { width: 100%; }
}

/* ---- modalidade em caixas de seleção ---- */
fieldset.grupo-modalidade {
  flex: 1 1 100%;
  border: 1px solid var(--cinza-borda);
  border-radius: 6px;
  padding: 4px 12px 10px;
  margin: 0;
}
fieldset.grupo-modalidade legend { font-size: 0.85rem; font-weight: 600; padding: 0 6px; }
fieldset.grupo-modalidade .checks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
fieldset.grupo-modalidade .check {
  font-weight: normal;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  white-space: nowrap;
}
fieldset.grupo-modalidade .check input { width: auto; margin: 0; }

/* ---- modalidade: menu suspenso com caixas de marcação ---- */
.dropdown-check { position: relative; }
.dropdown-check > summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--cinza-borda);
  border-radius: 6px;
  background: #fff;
  font-size: 0.9rem;
  position: relative;
}
.dropdown-check > summary::-webkit-details-marker { display: none; }
.dropdown-check > summary::after {
  content: "▾";
  position: absolute;
  right: 10px;
  color: #667;
}
.dropdown-check[open] > summary::after { content: "▴"; }
.dropdown-check .opcoes {
  position: absolute;
  z-index: 30;
  top: calc(100% + 2px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--cinza-borda);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dropdown-check .opcoes .check {
  font-weight: normal;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.dropdown-check .opcoes .check input { width: auto; margin: 0; }

/* ===== Reorganização dos filtros (compacto) — sobrescreve regras anteriores ===== */
.filtros .linha { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 10px; overflow: visible; }
.filtros label { display: flex; flex-direction: column; font-size: 0.78rem; font-weight: 600; gap: 3px; }
.filtros label > input, .filtros label > select {
  width: 100%; box-sizing: border-box; font-weight: normal; font-size: 0.9rem; padding: 5px 7px;
  border: 1px solid #c7ccd4; border-radius: 5px;
}
.filtros .f-txt { flex: 1 1 200px; max-width: 300px; }
.filtros .f-sm  { flex: 0 0 170px; }
.filtros .f-xs  { flex: 0 0 115px; }
.filtros input[type="date"] { width: 140px; }

/* grupo de valor compacto */
.filtros fieldset.grupo-valor {
  flex: 0 0 auto; display: flex; gap: 8px; align-items: flex-end;
  border: 1px solid #c7ccd4; border-radius: 6px; padding: 2px 10px 8px; margin: 0;
}
.filtros fieldset.grupo-valor legend { font-size: 0.76rem; font-weight: 600; padding: 0 4px; }
.filtros .grupo-valor .sub { font-size: 0.7rem; font-weight: normal; color: #556; }
.filtros .grupo-valor .sub input { width: 100px; }

/* ===== Modalidade: menu suspenso com caixas (corrigido) ===== */
.dropdown-check { position: relative; }
.dropdown-check > summary {
  list-style: none; cursor: pointer; white-space: nowrap;
  padding: 6px 26px 6px 9px; border: 1px solid #c7ccd4; border-radius: 5px;
  background: #fff; font-weight: normal; font-size: 0.9rem; position: relative;
}
.dropdown-check > summary::-webkit-details-marker { display: none; }
.dropdown-check > summary::after {
  content: "▾"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: #667;
}
.dropdown-check[open] > summary::after { content: "▴"; }
.dropdown-check .opcoes {
  position: absolute; z-index: 60; top: calc(100% + 3px); left: 0; min-width: 215px;
  background: #fff; border: 1px solid #c7ccd4; border-radius: 6px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.18); padding: 8px; display: flex; flex-direction: column; gap: 5px;
}
.dropdown-check .opcoes .check {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-weight: normal; font-size: 0.9rem; white-space: nowrap; cursor: pointer;
}
.dropdown-check .opcoes .check input { width: auto; margin: 0; flex: none; }
.dropdown-check .opcoes .check span { line-height: 1; }

/* ===== Correção: checkboxes em LINHA (a regra geral dos filtros empilhava) ===== */
.filtros label.check,
.dropdown-check .opcoes label.check {
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-weight: normal;
}
.filtros label.check > input[type="checkbox"],
.dropdown-check .opcoes label.check > input[type="checkbox"] {
  width: auto !important;
  flex: none;
  margin: 0;
}
.dropdown-check .opcoes { gap: 6px; padding: 8px 10px; }
.dropdown-check .opcoes label.check { white-space: nowrap; }

/* ============================================================
   MODALIDADE (versão final, compacta) — sobrescreve tudo acima
   ============================================================ */
.filtros .dropdown-check { position: relative; display: block; }
.filtros .dropdown-check > summary {
  list-style: none; cursor: pointer; white-space: nowrap; display: block;
  padding: 6px 26px 6px 9px; border: 1px solid #c7ccd4; border-radius: 5px;
  background: #fff; font-weight: normal; font-size: 0.9rem; position: relative;
}
.filtros .dropdown-check > summary::-webkit-details-marker { display: none; }
.filtros .dropdown-check > summary::after {
  content: "▾"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: #667;
}
.filtros .dropdown-check[open] > summary::after { content: "▴"; }

.filtros .dropdown-check .opcoes {
  position: absolute; z-index: 60; top: calc(100% + 3px); left: 0;
  width: max-content; min-width: 210px;
  background: #fff; border: 1px solid #c7ccd4; border-radius: 6px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.filtros .dropdown-check .opcoes label.check {
  display: flex !important; flex-direction: row !important; align-items: center;
  gap: 8px; margin: 0; padding: 0; min-height: 0;
  font-weight: normal; font-size: 0.9rem; white-space: nowrap; cursor: pointer;
}
.filtros .dropdown-check .opcoes label.check > input[type="checkbox"] {
  width: auto !important; flex: none; margin: 0;
}
.filtros .dropdown-check .opcoes label.check > span { line-height: 1.1; }

/* ===== Botão/seção "Filtros avançados" + responsivo mobile ===== */
/* Desktop: o botão fica escondido e a seção avançada aparece sempre. */
.toggle-avancado { display: none; }

/* Celular/tablet estreito: só busca principal visível; resto atrás do botão. */
@media (max-width: 760px) {
  .toggle-avancado {
    display: block;
    width: 100%;
    margin: 2px 0 12px;
    padding: 11px 14px;
    border: 1px solid #c7ccd4;
    border-radius: 7px;
    background: #f4f6f9;
    color: #1f4e79;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
  }
  #avancado { display: none; }
  #avancado.aberto { display: block; }

  /* Campos em coluna, ocupando a largura toda, no celular. */
  .filtros .linha { gap: 10px; }
  .filtros label, .filtros .f-txt, .filtros .f-sm, .filtros .f-xs {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }
  .filtros input, .filtros select { width: 100%; }
  .filtros fieldset.grupo-valor { width: 100%; }

  header img { height: 44px; }
}

/* ===== Resultados: tabela no PC, CARTÕES próprios no celular ===== */
.cartoes { display: none; }   /* no desktop, usa a tabela */

@media (max-width: 760px) {
  .tabela-resultados { display: none; }   /* no celular, esconde a tabela */
  .cartoes { display: block; }

  .cartao {
    position: relative;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 13px 14px;
    margin-bottom: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
  }

  /* Estrela de favoritar no canto superior direito */
  .cartao .estrela-cartao {
    position: absolute;
    top: 11px;
    right: 11px;
    cursor: pointer;
    flex: none;
  }

  /* Resumo do objeto: título do cartão, no máximo 3 linhas */
  .cartao-obj {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1f4e79;
    text-decoration: none;
    padding-right: 30px;          /* espaço para a estrela */
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cartao-meta {
    font-size: 0.92rem;
    color: #333;
    line-height: 1.45;
  }
  .cartao-meta b { color: #667; font-weight: 600; }

  .cartao-pncp {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
    font-size: 0.92rem;
  }
}

/* ===== Barra de progresso da busca (topo) + aviso "Buscando…" ===== */
#barra-progresso {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, #1f4e79, #2f6db0);
  box-shadow: 0 0 6px rgba(47,109,176,.6);
  z-index: 9999; opacity: 0;
  transition: width .2s ease, opacity .3s ease;
}
#barra-progresso.ativa { opacity: 1; }

#busca-aviso {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  background: #1f4e79; color: #fff;
  padding: 7px 16px; border-radius: 20px;
  font-size: .9rem; font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  z-index: 9999; opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
#busca-aviso.ativa { opacity: 1; }

/* ---- Exportação: seleção de itens + botões (planilha de custos / proposta) ---- */
.export-barra {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 10px 0 12px; padding: 10px 12px;
  background: #f4f7fb; border: 1px solid #dde3ec; border-radius: 8px;
}
.export-barra .sel-todos { font-size: .9rem; color: #333; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.export-barra .sel-conta { font-size: .82rem; color: #667; }
.export-barra .export-botoes { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.btn-export {
  padding: 9px 14px; font-size: .92rem; cursor: pointer; border-radius: 6px;
  border: 1px solid #1f4e79; background: #1f4e79; color: #fff; font-weight: 600;
}
.btn-export.btn-proposta { background: #fff; color: #1f4e79; }
.btn-export:disabled { opacity: .6; cursor: default; }
.itens-painel .col-chk { width: 34px; text-align: center; }
.itens-painel .item-check { width: 17px; height: 17px; cursor: pointer; }
@media (max-width: 760px) {
  .export-barra .export-botoes { margin-left: 0; width: 100%; }
  .btn-export { flex: 1; }
}

/* ---- Filtro de itens dentro do processo (palavra + faixa de valor) ---- */
.item-filtro {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 2px;
}
.item-filtro input[type="search"] { flex: 2 1 180px; }
.item-filtro input[type="text"] { flex: 1 1 110px; }
.item-filtro input {
  padding: 8px 10px; border: 1px solid #c7ccd4; border-radius: 6px; font-size: .9rem;
  box-sizing: border-box; min-width: 0;
}
.item-filtro-conta { flex-basis: 100%; font-size: .8rem; color: #667; }

/* ========================================================================
   REDESIGN v20 — topo, busca, grade simétrica de filtros e resultados
   ======================================================================== */
.topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 8px 0 14px; margin-bottom: 16px; border-bottom: 1px solid #e7ebf0;
}
.topbar-brand { display: inline-flex; }
.topbar-brand img { height: 46px; width: auto; }
.status-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: #e7f6ec; color: #1b7a3d; border: 1px solid #b7e3c4;
  padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600;
}
.status-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #1fa150; flex: none; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topnav a { padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; color: #33415c; font-size: .95rem; }
.topnav a:hover { background: #eef1f6; }
.topnav a.ativo { color: #1f4e79; }
.topnav a.cfg { font-size: 1.1rem; padding: 7px 10px; color: #5b6676; }

.busca-top {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  background: #f6f8fb; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px; margin-bottom: 10px;
}
.busca-texto {
  flex: 3 1 320px; min-width: 0; height: 52px; padding: 0 18px;
  border: 1px solid #c7ccd4; border-radius: 12px; font-size: 1.05rem; background: #fff;
}
.busca-texto:focus { outline: none; border-color: #1f4e79; box-shadow: 0 0 0 3px rgba(31,78,121,.12); }
.busca-disputa { flex: 1 1 230px; display: flex; flex-direction: column; gap: 5px; }
.btn-buscar {
  flex: 0 0 auto; height: 52px; padding: 0 26px; border: none; border-radius: 12px;
  background: #1f4e79; color: #fff; font-size: 1.05rem; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 9px;
}
.btn-buscar:hover { background: #1a4268; }
.campo-rot { font-size: .78rem; font-weight: 700; color: #45526a; }

.par-data { display: flex; align-items: center; gap: 6px; }
.par-data input[type="date"] {
  flex: 1 1 0; min-width: 0; height: 44px; padding: 0 10px;
  border: 1px solid #c7ccd4; border-radius: 10px; background: #fff; font-size: .9rem;
}
.par-data .ate { color: #778; font-size: .85rem; flex: none; }

.toggle-avancado {
  display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 10px; padding: 10px 16px;
  border: 1px solid #c7ccd4; border-radius: 10px; background: #fff;
  color: #1f4e79; font-weight: 600; font-size: .95rem; cursor: pointer;
}
.toggle-avancado:hover { background: #f4f6f9; }
#avancado { display: none; }
#avancado.aberto { display: block; }

.busca-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 14px 16px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px;
}
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* Contém / Excluir / Data de publicação ocupam o dobro; o resto fica estreito */
.campo.wide { grid-column: span 2; }
.campo > input[type="text"], .campo > select {
  width: 100%; height: 42px; box-sizing: border-box; padding: 0 11px;
  border: 1px solid #c7ccd4; border-radius: 10px; background: #fff; font-size: .92rem;
}
.campo > input[type="text"]:focus, .campo > select:focus {
  outline: none; border-color: #1f4e79; box-shadow: 0 0 0 3px rgba(31,78,121,.1);
}
.campo .par-data input[type="date"] { height: 42px; }

.par-valor { display: flex; gap: 8px; border: none; padding: 0; margin: 0; min-width: 0; }
.par-valor input {
  flex: 1 1 0; min-width: 0; height: 42px; box-sizing: border-box; padding: 0 10px;
  border: 1px solid #c7ccd4; border-radius: 10px; background: #fff; font-size: .9rem;
}

.campo.dd-check { position: relative; }
.dd { position: relative; }
.dd-sum {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  width: 100%; height: 42px; box-sizing: border-box; padding: 0 11px; cursor: pointer;
  border: 1px solid #c7ccd4; border-radius: 10px; background: #fff; font-size: .92rem; color: #222;
}
.dd-sum::-webkit-details-marker { display: none; }
.dd[open] .dd-sum { border-color: #1f4e79; }
.dd-pop {
  position: absolute; z-index: 60; top: calc(100% + 4px); left: 0;
  min-width: 100%; width: max-content; max-width: 320px; max-height: 300px; overflow: auto;
  background: #fff; border: 1px solid #c7ccd4; border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0,0,0,.16); padding: 10px 12px;
}
.dd-acoes { display: flex; gap: 14px; margin-bottom: 8px; font-size: .82rem; }
.dd-acoes a { color: #1f4e79; }
/* IMPORTANTE: especificidade alta (.dd-pop .dd-item) para vencer a regra antiga
   ".filtros label { flex-direction: column }" que empilhava checkbox sobre o texto. */
.dd-pop .dd-item {
  display: flex; flex-direction: row; align-items: center; gap: 8px;
  margin: 0 0 7px; padding: 0; width: auto;
  font-size: .9rem; white-space: nowrap; cursor: pointer; font-weight: normal;
}
.dd-pop .dd-item input[type="checkbox"] {
  width: 15px; height: 15px; min-width: 15px; flex: none; margin: 0; padding: 0;
}
.dd-pop .dd-item span { line-height: 1.15; }
/* UF em 3 colunas compactas; demais listas (modalidade/modo/portal) em 1 coluna */
.dd-ufs { display: grid; grid-template-columns: repeat(3, auto); gap: 6px 18px; }
.dd-ufs .dd-item { margin: 0; }
.dd-pop-lista { min-width: 210px; }

.check-repetidos { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: .92rem; color: #334; }
.check-repetidos input { width: auto; }
.busca-acoes { margin: 12px 0 18px; }
.busca-acoes .limpar { color: #1f4e79; text-decoration: none; font-size: .92rem; }

.tag-mod { display: inline-block; background: #e8effa; color: #1f4e79; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.val-money { color: #1b7a3d; font-weight: 700; white-space: nowrap; }
.val-sig { color: #8a6d00; font-weight: 600; }
.btn-edital { display: inline-block; background: #1f4e79; color: #fff !important; text-decoration: none; padding: 7px 14px; border-radius: 8px; font-size: .86rem; font-weight: 600; white-space: nowrap; }
.btn-edital:hover { background: #1a4268; }

@media (max-width: 560px) {
  .busca-grid { grid-template-columns: 1fr; }
  .campo.wide { grid-column: span 1; }
  .busca-top { flex-direction: column; align-items: stretch; }
  .btn-buscar { width: 100%; justify-content: center; }
  .topnav { width: 100%; margin-left: 0; }
  .dd-pop { max-width: 100%; }
}

/* ---- Linha/cartão do resultado clicável; objeto como texto (não link azul) ---- */
.tabela-resultados tbody tr.linha-proc { cursor: pointer; transition: background .12s ease; }
.tabela-resultados tbody tr.linha-proc:hover { background: #f3f7fc; }
.obj-txt {
  color: #1f2a37; font-weight: 400; line-height: 1.4; text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cartao.linha-proc { cursor: pointer; }
.cartao.linha-proc:hover { box-shadow: 0 2px 10px rgba(0,0,0,.09); }
.cartao .obj-txt { -webkit-line-clamp: 4; margin-bottom: 8px; font-size: 1rem; font-weight: 400; color: #16202b; }

/* Marca para registros sem data de disputa estruturada (nunca somem da busca) */
.sem-data { color: #8a8f98; font-style: italic; }
.ref-abertura { display: block; font-size: .8rem; color: #8a8f98; }

/* Checkbox "incluir processos sem data de disputa" (desmarcado por padrão) */
.check-semdata { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: .92rem; color: #334; }
.check-semdata input { width: auto; }
