.gestao-navegacao,
.gestao-painel {
  --gestao-azul: #0055d4;
  --gestao-marinho: #0b2347;
  --gestao-texto: #314762;
  --gestao-suave: #f4f7fb;
  --gestao-borda: #dbe5f2;
  box-sizing: border-box;
  margin-inline: clamp(12px, 2.6vw, 30px);
}

.gestao-navegacao {
  margin-top: 22px;
  margin-bottom: 18px;
}

.gestao-navegacao .gestao-abas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.gestao-abas .editais-tab {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--gestao-borda);
  border-radius: 10px;
  background: #fff;
  color: var(--gestao-marinho);
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}

.gestao-abas .editais-tab:hover,
.gestao-abas .editais-tab--ativa {
  background: #eaf2ff;
  color: #0047b8;
  border-color: #79a7f2;
}

.gestao-painel {
  margin-bottom: 28px;
  padding: clamp(16px, 2.45vw, 28px);
  border: 1px solid #e4ebf4;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 42, 82, .06);
  color: var(--gestao-marinho);
}

.gestao-cabecalho,
.gestao-toolbar,
.gestao-botoes,
.gestao-feedback {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gestao-cabecalho {
  justify-content: space-between;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e7edf5;
}

.gestao-cabecalho h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 1.8rem);
  letter-spacing: -.025em;
  line-height: 1.2;
}

.gestao-cabecalho p {
  margin: 6px 0 0;
  color: var(--gestao-texto);
  font-size: .9rem;
  line-height: 1.5;
}

.gestao-toolbar {
  justify-content: space-between;
  margin-bottom: 16px;
}

.gestao-contagem {
  color: #17487e;
  background: #edf4ff;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
}

.gestao-painel fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.gestao-painel label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-weight: 600;
  font-size: .875rem;
}

.gestao-painel .gestao-filtro {
  width: min(100%, 360px);
  margin: 0;
}

.gestao-painel input,
.gestao-painel textarea,
.gestao-painel select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #c8d7e9;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-weight: 400;
}

.gestao-painel input::placeholder {
  color: #536881;
}

.gestao-painel textarea {
  min-height: 84px;
  resize: vertical;
}

.gestao-painel button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--gestao-azul);
  border-radius: 8px;
  background: var(--gestao-azul);
  color: #fff;
  font: inherit;
  font-size: .825rem;
  font-weight: 600;
  cursor: pointer;
}

.gestao-painel button:not(:disabled):hover {
  filter: brightness(.94);
}

.gestao-painel button:disabled {
  opacity: .55;
  cursor: default;
}

.gestao-painel .gestao-secundario {
  border-color: var(--gestao-borda);
  background: #fff;
  color: #0048b5;
}

.gestao-painel .gestao-restricao {
  border-color: #a32336;
  background: #a32336;
}

.gestao-mais {
  margin-right: 4px;
  font-size: 1.05rem;
  line-height: 1;
}

.gestao-painel :focus-visible,
.gestao-abas :focus-visible {
  outline: 2px solid #1366d9;
  outline-offset: 2px;
}

.gestao-form {
  max-width: 740px;
  margin: 0 0 22px;
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid var(--gestao-borda);
  border-radius: 12px;
  background: #f8faff;
}

.gestao-form h2 {
  margin: 0 0 14px;
  font-size: 1.125rem;
}

.gestao-campos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.gestao-campo-largo {
  grid-column: 1 / -1;
}

.gestao-botoes {
  margin-top: 16px;
}

.gestao-tabela {
  overflow-x: auto;
  border: 1px solid var(--gestao-borda);
  border-radius: 11px;
}

.gestao-tabela table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  color: var(--gestao-texto);
  text-align: left;
}

.gestao-tabela th,
.gestao-tabela td {
  padding: 13px 14px;
  border-bottom: 1px solid #e7edf5;
  font-size: .85rem;
  vertical-align: middle;
}

.gestao-tabela th {
  background: var(--gestao-suave);
  color: #173758;
  font-size: .8rem;
  white-space: nowrap;
}

.gestao-tabela tr:last-child td {
  border-bottom: 0;
}

.gestao-tabela tbody tr:hover {
  background: #fbfdff;
}

.gestao-tabela td strong {
  color: var(--gestao-marinho);
  font-weight: 650;
}

.gestao-tabela th:last-child,
.gestao-tabela td:last-child {
  text-align: right;
}

.gestao-meta {
  display: block;
  margin: 3px 0 0;
  color: #526980;
  font-size: .8rem;
  overflow-wrap: anywhere;
}

.gestao-form > .gestao-meta {
  margin-bottom: 14px;
}

.gestao-selo {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: .75rem;
  font-weight: 650;
  white-space: nowrap;
}

.gestao-selo::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.gestao-selo--positivo { color: #176341; background: #e9f8ef; }
.gestao-selo--andamento { color: #174e9b; background: #eaf3ff; }
.gestao-selo--neutro { color: #465b72; background: #edf2f7; }

.gestao-estado,
.gestao-feedback {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 9px;
  font-size: .85rem;
  line-height: 1.4;
}

.gestao-estado {
  color: var(--gestao-texto);
  background: var(--gestao-suave);
}

.gestao-tabela .gestao-estado {
  margin: 0;
}

.gestao-feedback { color: #8a2036; background: #fff0f2; }
.gestao-feedback--ok { color: #176341; background: #e9f8ef; }
.gestao-feedback--aviso { color: #754708; background: #fff6e6; }

.gestao-historico {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gestao-historico li {
  padding: 10px 0;
  border-top: 1px solid #dae6f4;
  font-size: .85rem;
}

.gestao-historico span {
  display: block;
  margin-top: 4px;
}

.gestao-historico p {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .gestao-navegacao { margin-top: 14px; margin-bottom: 12px; }
  .gestao-campos { grid-template-columns: 1fr; }
  .gestao-cabecalho { align-items: flex-start; }
}
