/* 1) El “contenedor” del buscador, con fondo & border redondeado */
.search-box {
  display: flex;
  align-items: center;
  width: 100%;              
  max-width: 600px;          
  margin: 0 auto;            
  background: rgba(226,240,217,0.3); 
  border: 2px solid #9c27b0;          
  border-radius: 24px;       /* pill-shape */
  padding: 4px 12px;         
}

/* 2) La lupa, a la izquierda */
.search-box .bi-search {
  font-size: 20px;
  color: #9c27b9;            
  margin-right: 8px;
  flex-shrink: 0;
}

/* 3) El input sin sus bordes internos y ocupando todo el espacio sobrante */
.search-box input {
  border: none;
  background: transparent;
  flex: 1;                   
  font-size: 16px;          
  color: #212529;
  padding: 4px 0;            
  min-width: 0;              
  outline: none;             
}

/* 4) El botón a la derecha */
.search-box button {
  margin-left: 8px;
  flex-shrink: 0;
}

.TextoTitulo{
    font-size: 18px;
    font-weight: bold;
    color: #6a1b9a; /* morado */

    margin-left: 60px;
}

.botonbuscar {
  background-color: #6a1b9a; /* morado */
  border: none;
  border-radius: 12px;
  color: white;
  padding: 6px 12px;
  transition: background-color 0.3s;
}

.botonbuscar:hover {
  background-color: #9c27b0; /* morado más claro */
}

/* Contenedor con borde y esquinas */
.table-responsive.iem-table-wrapper {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
}

/* Reset de bordes de Bootstrap */
#tablaDocsGlobal {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Header morado con texto blanco */
#tablaDocsGlobal thead th {
  background-color: #6a1b9a;
  color: #fff;
  font-weight: 600;
  text-align: center;
  padding: 0.75rem 1rem;
  border: none;
}

/* Esquinas redondeadas en el header */
#tablaDocsGlobal thead th:first-child  { border-top-left-radius: 8px; }
#tablaDocsGlobal thead th:last-child   { border-top-right-radius: 8px; }

/* Filas alternadas suaves */
#tablaDocsGlobal tbody tr:nth-child(odd)  { background-color: #fbf7ff; }
#tablaDocsGlobal tbody tr:nth-child(even) { background-color: #fff;    }

/* Hover ligero en fila */
#tablaDocsGlobal tbody tr:hover {
  background-color: rgba(156, 39, 176, 0.1);
}


#tablaDocsGlobal td {
  padding: 0.75rem 1rem;
  border-top: 1px solid #eee;
  vertical-align: middle;
  color: #333;
  
}


#tablaDocsGlobal tbody tr:last-child td:first-child  { border-bottom-left-radius: 8px; }
#tablaDocsGlobal tbody tr:last-child td:last-child   { border-bottom-right-radius: 8px; }

/* Links dentro de PDF */
#tablaDocsGlobal td a {
  color: #6a1b9a;
  font-weight: 500;
}
#tablaDocsGlobal td a:hover {
  color: #9c27b0;
  text-decoration: none;
}

.table-responsive.iem-table-wrapper {
  position: relative; 
}

#tablaDocsGlobal thead th {
  position: sticky;
  top: 0;
  z-index: 10;                
}


#tablaDocsGlobal {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;        
}

#tablaDocsGlobal th,
#tablaDocsGlobal td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  text-align: center;           
  overflow-wrap: break-word;
}


#tablaDocsGlobal thead th:nth-child(4),
#tablaDocsGlobal tbody td:nth-child(4) {
  text-align: center;
}


.table-responsive.iem-table-wrapper {
  overflow-y: auto;
}

#tablaDocsGlobal td a.btn {
  padding: .25rem .75rem;
  font-size: .875rem;
  border-radius: .375rem;
}


/* ================================
   Compactar espacio buscador→tabla
   ================================ */

/* 1) Al contenedor que envuelve al buscador (antes .mb-5) */
.container-fluid.px-0.my-5 {
  margin-top: 1rem !important;    /* antes era 3rem (my-5) */
  margin-bottom: 0.5rem !important;
}

/* 2) Si tu buscador está dentro de un row con mb-4 */
.row.mb-4 {
  margin-bottom: 0.5rem !important;
}

/* 3) Al wrapper de la tabla */
.table-responsive.iem-table-wrapper {
  margin-top: 0.5rem !important;   /* baja la tabla hacia arriba */
  margin-bottom: 1.5rem;           /* puedes mantener algo de espacio abajo */
}

/* 4) Para pantallas pequeñas igual */
@media (max-width: 575.98px) {
  .container-fluid.px-0.my-5 {
    margin-top: 0.85rem !important;
    margin-bottom: 0.5rem !important;
  }
  .row.mb-4 {
    margin-bottom: 0.25rem !important;
  }
  .table-responsive.iem-table-wrapper {
    margin-top: 0.25rem !important;
    margin-bottom: 1rem;
  }
}
