/* --- CENTRALIZAÇÃO GLOBAL --- */
.page-wrap{
  width:100%;
  display:flex;
  justify-content:center;     /* centraliza o conteúdo */
  padding:24px 0;
  background:#fff;
}
.centered{
  width:100%;
  max-width:1180px;           
  margin:0 auto;
  padding:0 20px;             
}

/* Título e formulário */
.page-title{
  margin:0 0 16px 0;
  text-align:left;
  color:#123b2b;
  font-size: 2rem;
  font-weight: 700;
}

/* ==========================
   TÍTULO DE CATEGORIA
========================== */
.titulo {
  background: linear-gradient(90deg, var(--primary-color) 50%, rgba(16,137,87,0) 100%);
  color: white;
  width: fit-content;
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 8px 158px 8px 16px;
  font-weight: 800;
  font-size: larger;
}

/* --- LISTA DE CARTILHAS (MESMO ESTILO DA LISTA DE LICITAÇÕES) --- */
.cartilhas-list{
  display:flex; flex-direction:column; gap:16px;
}

/* cartilha-card = licit-card */
.cartilha-card{
  display:flex; justify-content:space-between; align-items:flex-start; gap:24px;
  background:#e6f1ea;                 /* verde claro igual ARP */
  border-radius:16px;
  padding:20px 24px;
  box-shadow:0 8px 18px rgba(0,0,0,.10), inset 0 0 0 1px rgba(0,0,0,.03);
  border:1px solid rgba(22,101,52,.08);
}

/* coluna esquerda = conteúdo da cartilha */
.cartilha-content{
  flex:1 1 auto; min-width:0;
}

/* título igual ao .licit-title */
.cartilha-titulo{
  margin:0 0 10px 0;
  color:#1f3f33;
  font-size:20px;
  font-weight:800;
  letter-spacing:.2px;
  text-transform:uppercase;
}

/* descrição no mesmo espírito de .licit-desc */
.cartilha-descricao{
  margin:.25rem 0 .35rem 0;
  color:#2f4037;
  font-size: 0.95rem;
  line-height:1.35;
}

/* garantir quebra bonita de texto, igual licitações */
.cartilha-descricao,
.cartilha-titulo {
  white-space: normal;          
  overflow-wrap: anywhere;      
  word-break: break-word;       
  hyphens: auto;                
}

/* coluna direita = ações da cartilha (download/visualizar) */
.cartilha-actions{
  flex:0 0 300px;
  display:flex; flex-direction:column; align-items:flex-end; gap:10px;
}

/* botões principais da cartilha (não mexe nos anexos) */
.cartilha-actions .btn-download,
.cartilha-actions .btn-view{
  display:inline-block;
  padding:10px 18px;
  background:#1f4b3b;
  color:#fff;
  text-decoration:none;
  border-radius:8px;
  font-weight:600;
  box-shadow:0 2px 0 rgba(0,0,0,.06);
  border: none;
  cursor:pointer;
}
.cartilha-actions .btn-download:hover,
.cartilha-actions .btn-view:hover{
  filter:brightness(1.05);
}


/* --- ARQUIVOS DA CARTILHA (MESMO ESTILO DOS DOCUMENTOS DE LICITAÇÕES) --- */

.cartilha-anexos {
  margin-top: 12px;
}

.cartilha-anexos-titulo {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 6px;
}

/* DOCUMENTOS (título + botão Baixar) – copiado do estilo de licitações */
.anexos-list{
  list-style:none; padding-left:0; margin:8px 0 0 0;
}
.anexos-list li{
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 14px;
  border:1px solid rgba(0,0,0,.06);
  border-radius:10px;
  background:#fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.anexos-list li + li{ margin-top:12px; }
.anexos-list li:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.doc-title{
  font-weight:700; color: var(--secondary-color);
  max-width:70%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* botão dos anexos escopado pra não afetar o botão principal da cartilha */
.anexos-list .btn-download{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 14px; border-radius:20px;
  background: var(--primary-color);
  color:#fff; font-weight:700; text-decoration:none;
  border: 1px solid transparent;
}
.anexos-list .btn-download:hover{
  background: var(--secondary-color);
  box-shadow: 0 4px 12px rgba(var(--primary-color-rbg) / 0.3);
}

/* --- ESTADO VAZIO --- */
.empty-state {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:60px 20px;
  text-align:center;
}
.empty-state i {
  font-size:4rem;
  color:#cbd5e0;
  margin-bottom:16px;
}
.empty-state p {
  margin:0;
  font-size:1.1rem;
  color:#718096;
}

/* --- Paginação (se usar na página de cartilhas) --- */
.pagination-wrap{
  display:flex; gap:12px; align-items:center; justify-content:flex-end;
  margin-top:14px;
}
.pg-link{
  padding:6px 12px; border-radius:10px; background:#eef5f1; color:#0f3b2e; text-decoration:none;
  border:1px solid #dbe7e1;
}
.pg-link:hover{ background:#e4efe9; }
.pg-status{ color:#334155; }

/* responsivo */
@media (max-width: 768px){
  .cartilha-card{ flex-direction:column; }
  .cartilha-actions{ align-items:flex-start; width:100%; }
  .cartilha-actions .btn-download,
  .cartilha-actions .btn-view{ width:100%; text-align:center; }
  .pagination-wrap{ justify-content:center; }

  .anexos-list li{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }
}
