<!-- start Simple Custom CSS and JS -->
<style type="text/css">
/* ==========================================================================
   ESTILOS NUEVOS: ESTRUCTURA DE PESTAÑAS HORIZONTALES (FULL WIDTH)
   ========================================================================== */

/* 1. RESET Y PROTECCIÓN */
/* Aplicamos la fuente al CONTENEDOR (los textos la heredarán automáticamente) */
#indicador-app-root {
    font-family: 'Inter', sans-serif;
}

/* El reset se mantiene, pero YA NO forzamos la fuente en cada elemento */
#indicador-app-root * {
    box-sizing: border-box;
    line-height: 1.5;
}

/* 🔥 SEGURO DE VIDA PARA ICONOS: */
/* Esto fuerza a que los iconos SIEMPRE usen su fuente correcta, por si acaso */
#indicador-app-root .fas, 
#indicador-app-root .fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}
#indicador-app-root .fab,
#indicador-app-root .fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

/* 2. CONTENEDOR PRINCIPAL
   Permitimos que se expanda para alojar el reporte de 1500px */
#indicador-app-root.indicador-container {
    width: 100% !important;
    max-width: 100% !important; /* Asegura que ocupe toda la pantalla */
    margin: 0;
    padding: 10px; /* Reducimos padding externo */
    background: #f0f4f8;
    color: #1e293b;
}

/* 3. ENCABEZADO (HEADER) */
#indicador-app-root .indicador-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 50%, #1e40af 100%);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
    /* Forzar texto blanco */
    color: #ffffff !important;
}

#indicador-app-root .indicador-header * { color: #ffffff !important; }

#indicador-app-root .indicador-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
#indicador-app-root .indicador-header h1 i { font-size: 32px; }

/* 4. GRID DE CATEGORÍAS (TARJETAS SUPERIORES) */
#indicador-app-root .indicador-grid {
    display: grid;
    /* Mantiene las tarjetas organizadas */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    max-width: 1600px; /* Centramos un poco las tarjetas */
    margin-left: auto;
    margin-right: auto;
}

/* En pantallas grandes, forzamos 5 columnas */
@media (min-width: 1200px) {
    #indicador-app-root .indicador-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* ESTILO DE LAS TARJETAS */
#indicador-app-root .indicador-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
    transition: all 0.2s ease;
}

#indicador-app-root .indicador-card:hover {
    transform: translateY(-3px);
    border-color: #2563eb;
}

#indicador-app-root .indicador-card.indicador-active {
    border-color: #2563eb;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

#indicador-app-root .indicador-card .indicador-card-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
    color: #2563eb;
}

#indicador-app-root .indicador-card .indicador-card-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #334155;
}
#indicador-app-root .indicador-card .indicador-card-count { display: none; } /* Ocultamos contador para limpiar */

/* Color blanco al activar */
#indicador-app-root .indicador-card.indicador-active * { color: #ffffff !important; }

/* ==========================================================================
   🔥🔥 EL CAMBIO RADICAL: ESTRUCTURA SIN SIDEBAR VERTICAL 🔥🔥
   ========================================================================== */

/* 5. ÁREA DE CONTENIDO */
#indicador-app-root .indicador-content-area {
    display: none;
    background: transparent; /* Quitamos fondo blanco contenedor */
    box-shadow: none;
    margin-top: 10px;
}

/* Ya no usamos grid de columnas, ahora es bloque (uno debajo de otro) */
#indicador-app-root .indicador-content-area.indicador-active {
    display: block; 
}

/* 6. BARRA DE MENÚ (ANTES SIDEBAR, AHORA PESTAÑAS) */
#indicador-app-root .indicador-sidebar {
    background: white;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    
    /* Configuración Flex para poner items en fila */
    display: flex;
    flex-wrap: wrap; /* Si no caben, bajan a siguiente linea */
    gap: 10px;
    justify-content: center; /* Centrados */
    align-items: center;
    width: 100%;
    max-height: none; /* Quitamos limite de altura */
    overflow: visible;
}

/* Título de la sección (ej: "Salud Mental") - Lo ocultamos o hacemos pequeño */
#indicador-app-root .indicador-sidebar-title {
    display: none; /* Mejor ocultarlo para ganar espacio, ya se sabe en qué categoría estamos */
}

/* BOTONES DE SUB-ITEMS (Estilo Píldora/Tab) */
#indicador-app-root .indicador-sub-item {
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 50px; /* Bordes redondos */
    border: 1px solid transparent;
    transition: all 0.2s;
    white-space: nowrap; /* Evita que el texto se parta */
}

#indicador-app-root .indicador-sub-item:hover {
    background: #e0f2fe;
    color: #0284c7;
    transform: translateY(-2px);
}

/* Estado Activo del Sub-item */
#indicador-app-root .indicador-sub-item.indicador-active {
    background: #0ea5e9; /* Azul fuerte */
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

#indicador-app-root .indicador-sub-item.indicador-active i {
    color: white;
}

/* 7. VISOR Y IFRAME (GIGANTE) */
#indicador-app-root .indicador-viewer {
    background: white;
    border-radius: 12px;
    
    /* CAMBIO CLAVE: Eliminamos el padding interno para ganar espacio */
    padding: 0 !important; 
    
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    justify-content: center;
    width: 100%;
}

#indicador-app-root .indicador-iframe {
    border: none;
    display: block;
    
    /* Ocupa el 100% del ancho del contenedor padre */
    width: 100%; 
    
    /* Mantiene la proporción original de Power BI (1500x765) */
    aspect-ratio: 1500 / 765; 
    
    /* Altura automática basada en el ancho, pero con un mínimo de seguridad */
    height: auto; 
    min-height: 600px; 
}

/* Estado Vacío */
#indicador-app-root .indicador-empty-state {
    padding: 100px 20px;
    text-align: center;
    color: #94a3b8;
}
#indicador-app-root .indicador-empty-state i { font-size: 60px; margin-bottom: 20px; opacity: 0.3; }

/* ==========================================================================
   RESPONSIVE (MÓVIL)
   ========================================================================== */
@media (max-width: 768px) {
    #indicador-app-root .indicador-sidebar {
        justify-content: flex-start; /* Alinear a la izquierda */
        overflow-x: auto; /* Scroll horizontal si hay muchos botones */
        flex-wrap: nowrap; /* En una sola linea scrollable */
        padding-bottom: 15px; /* Espacio para el dedo */
    }
    
    #indicador-app-root .indicador-iframe {
        min-height: 500px; /* Menos altura en móvil */
        aspect-ratio: auto; /* Dejar libre la proporción */
        height: 80vh;
    }
}</style>
<!-- end Simple Custom CSS and JS -->
