.cnec-editais-lista {
  overflow-x: auto;
  border: 1px solid #e3eaf4;
  border-radius: 12px;
}

.cnec-editais-lista table { width: 100%; min-width: 570px; margin: 0; }
.cnec-editais-lista :is(td, th) { padding: 14px 16px; }
.cnec-editais-lista thead th { color: #264467; background: #f5f8fc; }
.cnec-editais-lista tbody th { text-align: left; font-weight: 650; color: #102d50; }
.cnec-editais-lista :is(tbody th, tbody td) { border-bottom: 1px solid #edf1f6; }
.cnec-editais-lista tr:last-child :is(th, td) { border-bottom: 0; }
.cnec-editais-lista tbody tr:hover { background: #f7faff; }
.cnec-editais-lista td:not(:first-child) { white-space: nowrap; }

.cnec-edital-detalhes {
  width: min(850px, calc(100% - 28px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: #102d50;
  background: #fff;
  box-shadow: 0 20px 70px #0b234355;
}

.cnec-edital-detalhes::backdrop { background: #14253d84; }
.cnec-edital-detalhes__painel { display: flex; flex-direction: column; max-height: 90vh; max-height: 90dvh; }
.cnec-edital-detalhes__cabecalho {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border-top: 4px solid #0958d0;
  border-bottom: 1px solid #e4ebf5;
}

.cnec-edital-detalhes__cabecalho h2 {
  margin: 0 0 8px;
  font-size: clamp(1rem, 0.9rem + 0.55vw, 1.28rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cnec-edital-detalhes__fechar {
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #e0e9f6;
  border-radius: 10px;
  background: #f3f7fc;
  color: #25476e;
  cursor: pointer;
}

.cnec-edital-detalhes__conteudo { min-height: 0; overflow: auto; padding: 18px 24px; }
.cnec-edital-detalhes__resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 12px 18px;
  padding: 14px 16px;
  margin: 0;
  background: #f4f8fd;
  border-radius: 10px;
}
.cnec-edital-detalhes dt { font-size: 0.8rem; color: #496583; }
.cnec-edital-detalhes dd { margin: 4px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.cnec-edital-detalhes h3 { font-size: 0.98rem; margin: 0 0 8px; }
.cnec-edital-detalhes p, .cnec-edital-detalhes small { margin: 0; color: #435770; }
.cnec-edital-detalhes section { padding-top: 16px; }
.cnec-edital-detalhes section + section { border-top: 1px solid #edf1f6; margin-top: 16px; }
.cnec-edital-detalhes__descricao { white-space: pre-line; line-height: 1.65; overflow-wrap: anywhere; }
.cnec-edital-detalhes__lista { margin: 0; padding-left: 18px; }
.cnec-edital-detalhes__lista li + li { margin-top: 5px; }
.cnec-edital-detalhes__arquivos, .cnec-edital-detalhes__historico { list-style: none; margin: 0; padding: 0; }
.cnec-edital-detalhes__arquivos { display: flex; flex-wrap: wrap; gap: 8px; }
.cnec-edital-detalhes__arquivos li { max-width: 100%; overflow-wrap: anywhere; }
.cnec-edital-detalhes :is(.text-action, .btn-primary) { display: inline-flex; align-items: center; gap: 7px; }
.cnec-edital-detalhes__historico li {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background: #f7faff;
  border: 1px solid #e4ecf7;
  border-radius: 10px;
}
.cnec-edital-detalhes__historico li + li { margin-top: 8px; }
.cnec-edital-detalhes__historico li > div { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.cnec-edital-detalhes__historico small { display: block; margin-top: 3px; }
.cnec-edital-detalhes__historico p { margin-top: 7px; white-space: pre-line; }
.cnec-edital-detalhes__rodape, .cnec-edital-detalhes__gestao { display: flex; flex-wrap: wrap; gap: 8px; }
.cnec-edital-detalhes__rodape { border-top: 1px solid #e4ebf5; padding: 12px 24px; justify-content: flex-end; }
.cnec-edital-detalhes__gestao { margin-right: auto; }

@media (max-width: 640px) {
  .cnec-edital-detalhes__cabecalho, .cnec-edital-detalhes__conteudo, .cnec-edital-detalhes__rodape { padding-left: 14px; padding-right: 14px; }
  .cnec-editais-lista :is(td, th) { padding: 11px 10px; }
}

.cnec-editais-lista thead tr:last-child th { border-bottom: 1px solid #e3eaf4; }
.cnec-edital-detalhes .btn-primary {
  border: 1px solid #0054cc;
  border-radius: 8px;
  padding: 9px 13px;
  background: #0054cc;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}
.cnec-edital-detalhes .btn-primary:hover { background: #0348ae; }

@media (max-width: 560px) {
  .cnec-editais-lista table { min-width: 0; }
  .cnec-editais-lista thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cnec-editais-lista tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    padding: 12px;
    border-bottom: 1px solid #edf1f6;
  }
  .cnec-editais-lista tbody tr:last-child { border-bottom: 0; }
  .cnec-editais-lista tbody :is(th, td) { padding: 0; border: 0; }
  .cnec-editais-lista tbody th { grid-column: 1 / -1; }
  .cnec-editais-lista td.cnec-editais-periodo { white-space: normal; }
  .cnec-editais-lista td:last-child:not([colspan]) { grid-column: 1 / -1; }
  .cnec-editais-lista td[colspan] { grid-column: 1 / -1; }
}
