/* Estilos Generales */
body {
    font-family: 'Inter', sans-serif;
}

.main-wrapper {
    min-height: 80vh;
}

/* Logo Header */
.logo {
    max-height: 60px;
    width: auto;
}

.nombre-usuario {
  font-size: 1rem;
}

@media (max-width: 767px) {

  .nombre-usuario {
    font-size: 0.8rem;
  }

}

/* Animaciones y Transiciones */
.collapse {
    transition: all 0.3s ease-in-out;
}

/* Sidebar Section Headers */
.sidebar-section-title {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding-top: 1rem;
    color: #adb5bd;
}

/* Listas de Menú (Dashboard) */
.list-group-item-action {
    font-weight: 500;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.list-group-item-action:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
    transform: translateX(5px);
}

.list-group-item-action.active {
    background-color: rgba(13, 110, 253, 0.1) !important;
    color: #0d6efd !important;
    border-left: 4px solid #0d6efd !important;
    border-radius: 0 0.5rem 0.5rem 0 !important;
}

.module-icon i {
    background: rgba(13, 110, 253, 0.1);
    padding: 0.5rem 0.8rem;
    border-radius: 0.75rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .list-group-item-action:hover {
        transform: none;
    }
}

/* Sidebar Navigation Improvements */
.hover-bg-light:hover {
    background-color: #f8f9fa;
}

.list-group-item.active {
    background-color: #e9ecef !important;
    color: #000 !important;
    border-radius: 0.5rem !important;
}

.list-group-item.active i {
    transform: scale(1.1);
}

.sidebar-header a:hover h2 {
    color: #0d6efd !important;
}

.sidebar-titulo-seccion {
    letter-spacing: 0.02em !important;
}

/* Transición suave para la flecha */
a[data-bs-toggle="collapse"] .bi-chevron-down {
    transition: transform 0.3s ease;
}

/* Rotar a la derecha cuando está cerrado (false) */
a[data-bs-toggle="collapse"][aria-expanded="false"] .bi-chevron-down {
    transform: rotate(-90deg);
}

/* Mejoras visuales Tablas Entidades */
#tabla-eps thead th, #tabla-afp thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

/* Registro de Actividad Cards */
#registro-actividad-container .card {
    border-left: 4px solid #dee2e6;
    transition: box-shadow 0.2s ease;
}

#registro-actividad-container .card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

#registro-actividad-container .badge {
    font-size: 0.7rem;
    font-weight: 500;
}

#registro-actividad-container .badge.bg-success {
    background-color: #198754 !important;
}

#registro-actividad-container .badge.bg-primary {
    background-color: #0d6efd !important;
}

#registro-actividad-container .badge.bg-danger {
    background-color: #dc3545 !important;
}

/* Estilo para los autocompletes */
#filter-input-container .list-group-item-action:hover {
    background-color: #e9ecef;
    cursor: pointer;
}

/* Responsive para pagination */
@media (max-width: 768px) {
    #registro-pagination-container {
        flex-direction: column;
        gap: 1rem;
    }
}

/* =========================================
   CONTENEDOR PRINCIPAL DE RESULTADOS PARA CONSULTA NOVEDADES
   ========================================= */
.autocomplete-results {
    position: absolute;
    top: calc(100% + 6px); /* Separación sutil del input para un look flotante */
    left: 0;
    right: 0;
    z-index: 1050;
    background: #ffffff;
    border: 1px solid #e2e8f0; /* Borde mucho más suave */
    border-radius: 0.75rem; /* Bordes redondeados en las 4 esquinas */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05); /* Sombra moderna y difuminada */
    max-height: 280px;
    overflow-y: auto;
    padding: 0.5rem; /* Espaciado interno para que los items respiren */
    font-size: 0.875rem;
}

/* Scrollbar personalizado (Webkit) para elegancia */
.autocomplete-results::-webkit-scrollbar {
    width: 6px;
}
.autocomplete-results::-webkit-scrollbar-track {
    background: transparent;
}
.autocomplete-results::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

/* =========================================
   ELEMENTOS DE LA LISTA (LOS BOTONES)
   ========================================= */
button.autocomplete-item {
    display: block;
    width: 100%; /* Reseteo crucial para <button> */
    border: none; /* Reseteo crucial para <button> */
    background-color: transparent;
    padding: 0.65rem 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    border-radius: 0.5rem; /* Redondeo interno para el efecto hover */
    margin-bottom: 2px; /* Pequeña separación vertical entre opciones */
}

button.autocomplete-item:last-child {
    margin-bottom: 0;
}

/* Estados de interacción */
button.autocomplete-item:hover,
button.autocomplete-item:focus {
    background-color: #f8fafc; /* Gris azulado muy suave y moderno */
    color: #0f172a;
    outline: none;
}

button.autocomplete-item:active {
    background-color: #f1f5f9;
    transform: scale(0.99); /* Pequeño feedback táctil al hacer clic */
}

/* =========================================
   TIPOGRAFÍA INTERNA DE LOS RESULTADOS
   ========================================= */
.autocomplete-item strong {
    color: #1e293b;
    font-weight: 600;
    display: block;
}

.autocomplete-item small {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 0.15rem;
    line-height: 1.4;
}

/* =========================================
   ESTADOS DE NAVEGACIÓN POR TECLADO
   ========================================= */
button.autocomplete-item[aria-selected="true"],
button.autocomplete-item[data-selected="true"] {
    background-color: #eff6ff;
    color: #1d4ed8;
}

button.autocomplete-item[aria-selected="true"] strong,
button.autocomplete-item[data-selected="true"] strong {
    color: #1e3a8a;
}

/* =========================================
   ESTADOS VACÍOS Y DE ERROR (Generados como DIVs en tu JS)
   ========================================= */
div.autocomplete-item.text-muted,
div.autocomplete-item.text-danger {
    padding: 1.5rem 1rem; /* Más espacio para que no se vea aplastado */
    text-align: center;
    background: transparent;
    border: none;
    cursor: default;
}

div.autocomplete-item.text-muted {
    color: #94a3b8 !important; /* Gris suave */
}

div.autocomplete-item.text-danger {
    color: #ef4444 !important; /* Rojo moderno */
    font-weight: 500;
}

/* =========================================
   EXTRAS (Mantenidos de tu código original)
   ========================================= */
.sidebar-section-title {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding-top: 1rem;
    color: #adb5bd;
}

/* =========================================
   ESTILOS PARA MODAL DE REGISTRO CAMBIOS
   ========================================= */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}
.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}
.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 0.125rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px currentColor;
}
.timeline-content {
    background: #f8f9fa;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-left: 0.5rem;
}
.timeline-item-last .timeline-marker::after {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}
