.mu-app-container {
    font-family: inherit;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.mu-filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.mu-filtros input, .mu-filtros select {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

.mu-btn {
    background-color: #0073aa; /* Azul WordPress, ajústalo al de tu web */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.mu-btn:hover { background-color: #005177; }
.mu-btn-secundario { background-color: #6c757d; }
.mu-btn-secundario:hover { background-color: #5a6268; }
.mu-btn:disabled { background-color: #ccc; cursor: not-allowed; }

.mu-tabla-wrapper { 
    max-height: 900px; /* Aquí ajustas el alto máximo de la tabla */
    overflow-y: auto;  /* Activa el scroll vertical interno */
    overflow-x: auto;  /* Mantiene el scroll horizontal si hace falta */
    margin-bottom: 20px; 
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    position: relative; /* Necesario para el sticky header */
}

#mu-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#mu-tabla th, #mu-tabla td {
    padding: 10px 8px; /* Menos espacio para pantallas más estrechas */
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    font-size: 13px; /* Letra ligeramente más pequeña */
}

#mu-tabla th {
    background-color: #f1f3f5;
    font-weight: bold;
    color: #212529;
    
    /* TRUCO: Hacer que la cabecera se quede fija al hacer scroll */
    position: sticky; 
    top: 0; 
    z-index: 10; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); /* Sombra para dar efecto de profundidad */
}

#mu-tabla tr:hover { background-color: #f8f9fa; }

#mu-tabla a {
    color: #0073aa;
    text-decoration: none;
    font-weight: bold;
}
#mu-tabla a:hover { text-decoration: underline; }

.mu-paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

/* Estilos para los botones rápidos de estadísticas */
.mu-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.mu-btn-insight {
    background-color: #f1f3f5;
    color: #0073aa;
    border: 2px solid #0073aa;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.mu-btn-insight:hover {
    background-color: #0073aa;
    color: #ffffff;
}

/* Estilos para la tabla de datos accesible (SEO / A11y) */
.mu-tabla-datos {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}
.mu-tabla-datos th, .mu-tabla-datos td {
    padding: 8px;
    border: 1px solid #dee2e6;
    text-align: left;
}
.mu-tabla-datos th {
    background-color: #f8f9fa;
}

/* ============================================================
   ESTILOS DEL TÍTULO TRUNCADO Y MODAL (FASE 4)
   ============================================================ */

/* Forzar que la celda del título no crezca demasiado */
.mu-titulo-cell {
    max-width: 250px; /* Ajusta este valor según el ancho de tu columna en Divi */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* Truncar el texto a 1 línea con puntos suspensivos */
.mu-titulo-texto {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    font-weight: 500;
}

/* Botón del ojito */
.mu-btn-ver-titulo {
    background: #e2e8f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 5px 8px;
    font-size: 14px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.mu-btn-ver-titulo:hover {
    background: #cbd5e1;
}

/* --- ESTILOS DEL MODAL --- */
.mu-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85); /* Más oscuro para que no se transparente el fondo */
    z-index: 2147483647; /* El número más alto posible en CSS */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

/* Asegurarse de que el contenido esté por encima del fondo oscuro */
.mu-modal-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    position: relative;
    z-index: 2147483648;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    animation: muFadeIn 0.3s ease;
}

.mu-modal-content h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #1a202c;
    line-height: 1.5;
    padding-right: 20px;
}

.mu-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #a0aec0;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.mu-modal-close:hover {
    color: #e53e3e;
}

@keyframes muFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   BOTONES DE EXPORTACIÓN (Estilo Outline Minimalista)
   ============================================================ */
.mu-export-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mu-btn-outline {
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    color: #4a5568; /* Gris oscuro elegante */
    border: 1.5px solid #cbd5e1;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mu-btn-outline:hover {
    background-color: #f8f9fa;
    border-color: #0073aa;
    color: #0073aa;
}

.mu-btn-outline:active {
    transform: scale(0.98);
}