/* =============================================================
   Página Licitações — CRC-ES
   ============================================================= */

/* ── Barra de busca ──────────────────────────────────────────── */

.crc-lic-search-wrapper {
  position: relative;
  max-width: 560px;
}

.crc-lic-search-wrapper .bi-search {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #7a8fa8;
  font-size: 1rem;
  pointer-events: none;
}

.crc-lic-search-input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.75rem;
  border: 1.5px solid #d0dae6;
  border-radius: 8px;
  font-size: 0.92rem;
  color: #2d3d50;
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.crc-lic-search-input:focus {
  border-color: var(--crc-primary-navy, #003366);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.12);
}

.crc-lic-search-btn {
  padding: 0.7rem 1.4rem;
  background-color: var(--crc-primary-navy, #003366);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.crc-lic-search-btn:hover {
  background-color: #004080;
}

.crc-lic-clear-btn {
  font-size: 0.82rem;
  color: #7a8fa8;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  transition: color 0.15s;
}

.crc-lic-clear-btn:hover {
  color: #c0392b;
}

/* ── Contador de resultados ──────────────────────────────────── */

.crc-lic-count {
  font-size: 0.83rem;
  color: #7a8fa8;
  font-style: italic;
}

/* ── Tabela de licitações ─────────────────────────────────────── */

.crc-lic-table-wrapper {
  background: #fff;
  border: 1px solid #dce6f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 51, 102, 0.07);
}

.crc-lic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: #2d3d50;
}

.crc-lic-table thead th {
  background-color: var(--crc-primary-navy, #003366);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.85rem 1rem;
  border: none;
  white-space: nowrap;
}

.crc-lic-table thead th:first-child {
  border-radius: 0;
}

.crc-lic-table tbody tr {
  border-bottom: 1px solid #edf2f7;
  transition: background-color 0.15s ease;
}

.crc-lic-table tbody tr:last-child {
  border-bottom: none;
}

.crc-lic-table tbody tr:hover {
  background-color: #f5f8fc;
}

.crc-lic-table td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
}

/* Coluna de processo */
.crc-lic-processo {
  font-weight: 600;
  color: var(--crc-primary-navy-strong, #002244);
  min-width: 120px;
}

/* Coluna de objeto — texto mais longo, com limite */
.crc-lic-objeto {
  max-width: 320px;
}

.crc-lic-objeto-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
}

/* Coluna de data */
.crc-lic-data {
  white-space: nowrap;
  min-width: 90px;
}

/* Badge de situação */
.crc-lic-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background-color: #e9f0fa;
  color: var(--crc-primary-navy, #003366);
}

.crc-lic-badge--encerrada {
  background-color: #fdf0f0;
  color: #c0392b;
}

.crc-lic-badge--andamento {
  background-color: #eafaf1;
  color: #1a7a4a;
}

.crc-lic-badge--suspensa {
  background-color: #fff8e7;
  color: #b7771d;
}

.crc-lic-badge--homologada {
  background-color: #e8f4fd;
  color: #1a5276;
}

/* Botões de ação da tabela */
.crc-lic-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.crc-lic-btn--info {
  background-color: var(--crc-primary-navy, #003366);
  color: #fff;
}

.crc-lic-btn--info:hover {
  background-color: #004080;
  color: #fff;
}

.crc-lic-btn--anexos {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

.crc-lic-btn--anexos:hover {
  background-color: #ffc107;
  color: #212529;
}

.crc-lic-btn--sem-anexo {
  color: #c0ccdb;
  font-size: 0.75rem;
  background: none;
  border: none;
  cursor: default;
  padding: 0;
}

/* ── Paginação ───────────────────────────────────────────────── */

.crc-lic-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
}

.crc-lic-pagination .page-link {
  border-radius: 6px !important;
  font-size: 0.85rem;
  color: var(--crc-primary-navy, #003366);
  border: 1px solid #d0dae6;
  padding: 0.4rem 0.75rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.crc-lic-pagination .page-link:hover {
  background-color: var(--crc-primary-navy, #003366);
  color: #fff;
  border-color: var(--crc-primary-navy, #003366);
}

.crc-lic-pagination .page-item.active .page-link {
  background-color: var(--crc-primary-navy, #003366);
  border-color: var(--crc-primary-navy, #003366);
  color: #fff;
  font-weight: 700;
}

.crc-lic-pagination .page-item.disabled .page-link {
  color: #b0bec5;
  pointer-events: none;
}

/* ── Modal de informações ────────────────────────────────────── */

.crc-lic-modal .modal-header {
  background-color: var(--crc-primary-navy, #003366);
  color: #fff;
  border-radius: 12px 12px 0 0;
  padding: 1.1rem 1.5rem;
}

.crc-lic-modal .modal-header .btn-close {
  filter: brightness(0) invert(1);
}

.crc-lic-modal .modal-title {
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1.4;
}

.crc-lic-modal .modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.crc-lic-modal .modal-body {
  padding: 1.5rem;
}

/* Grade de informações do modal */
.crc-lic-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.crc-lic-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.crc-lic-info-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #7a8fa8;
}

.crc-lic-info-value {
  font-size: 0.9rem;
  color: #2d3d50;
  font-weight: 500;
  word-break: break-word;
}

.crc-lic-info-value--destaque {
  color: var(--crc-primary-navy-strong, #002244);
  font-weight: 700;
  font-size: 1rem;
}

/* Bloco do objeto no modal */
.crc-lic-objeto-full {
  background-color: #f5f8fc;
  border-left: 4px solid var(--crc-secondary-gold, #c9a227);
  border-radius: 6px;
  padding: 1rem 1.15rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #2d3d50;
  margin-bottom: 1.25rem;
}

/* ── Modal de anexos ─────────────────────────────────────────── */

.crc-lic-anexos-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.crc-lic-anexos-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background-color: #f5f8fc;
  transition: background-color 0.15s ease;
}

.crc-lic-anexos-item:hover {
  background-color: #e8f0fb;
}

.crc-lic-anexos-categoria {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7a8fa8;
  padding: 0.5rem 0 0.25rem;
  border-top: 1px solid #e6ecf3;
  margin-top: 0.5rem;
}

.crc-lic-anexos-categoria:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.crc-lic-ext-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0.18rem 0.35rem;
  border-radius: 4px;
  background-color: var(--crc-primary-navy, #003366);
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}

.crc-lic-ext-badge--pdf  { background-color: #c0392b; }
.crc-lic-ext-badge--doc,
.crc-lic-ext-badge--docx { background-color: #2980b9; }
.crc-lic-ext-badge--xls,
.crc-lic-ext-badge--xlsx { background-color: #27ae60; }
.crc-lic-ext-badge--zip,
.crc-lic-ext-badge--rar  { background-color: #8e44ad; }

.crc-lic-anexos-link {
  font-size: 0.875rem;
  color: #2d3d50;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  word-break: break-word;
  transition: color 0.15s;
}

.crc-lic-anexos-link:hover {
  color: var(--crc-primary-navy, #003366);
  text-decoration: underline;
}

/* ── Estado vazio ────────────────────────────────────────────── */

.crc-lic-empty {
  text-align: center;
  padding: 3.5rem 1rem;
  color: #7a8fa8;
}

.crc-lic-empty i {
  font-size: 2.5rem;
  opacity: 0.4;
  display: block;
  margin-bottom: 0.75rem;
}

.crc-lic-empty p {
  font-size: 0.95rem;
  margin: 0;
}

/* ── Responsivo — oculta colunas secundárias em telas pequenas ── */

@media (max-width: 991px) {
  .crc-lic-col-fornecedor {
    display: none;
  }
}

@media (max-width: 767px) {
  .crc-lic-col-numero,
  .crc-lic-col-horario {
    display: none;
  }

  .crc-lic-table td,
  .crc-lic-table th {
    padding: 0.65rem 0.65rem;
  }

  .crc-lic-objeto {
    max-width: 160px;
  }
}

@media (max-width: 575px) {
  .crc-lic-col-modalidade {
    display: none;
  }

  .crc-lic-info-grid {
    grid-template-columns: 1fr;
  }
}
