body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif;
}

/* Contenedor principal: Look clínico premium de centro médico u hospital digital */
.layout-preloader-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    background-color: #0a111e; /* Fondo oscuro institucional de alta gama */
    overflow: hidden;
}

.ece-platform-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
}

/* El Hub Central del Expediente */
.ece-core-hub {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* El núcleo interno: Representa la base de datos única del paciente */
.hub-pulse {
    width: 16px;
    height: 16px;
    background-color: #10b981; /* Verde esmeralda (Salud y Diagnóstico) */
    border-radius: 50%;
    box-shadow: 0 0 20px #10b981;
    animation: pulse-grow 1s ease-in-out infinite alternate;
}

/* Anillos orbitales de procesamiento (Representan flujos de Lab, Imagen, etc.) */
.hub-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid transparent;
}

.ring-fast {
    width: 50px;
    height: 50px;
    border-top-color: #0d82c1; /* Tu azul corporativo */
    border-bottom-color: #0d82c1;
    animation: spin-clockwise 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.ring-slow {
    width: 82px;
    height: 82px;
    border-left-color: rgba(16, 185, 129, 0.4);
    border-right-color: rgba(13, 130, 193, 0.4);
    animation: spin-counter 2.2s linear infinite;
}

/* Micro-hilos de datos (Simulan módulos asíncronos viajando al centro) */
.data-stream {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0;
}

/* Flujo 1: Somatometría / Consultas */
.stream-1 { background-color: #0d82c1; animation: stream-in-top 1.6s infinite ease-in-out 0s; }
/* Flujo 2: Laboratorio / Imagen */
.stream-2 { background-color: #10b981; animation: stream-in-right 1.6s infinite ease-in-out 0.4s; }
/* Flujo 3: Interpretación / Reportes */
.stream-3 { background-color: #0d82c1; animation: stream-in-bottom 1.6s infinite ease-in-out 0.8s; }
/* Flujo 4: Dashboards / Analíticos */
.stream-4 { background-color: #10b981; animation: stream-in-left 1.6s infinite ease-in-out 1.2s; }

/* Bloque de Textos y Ticker Corporativo */
.ece-brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* Nombre de la plataforma macro */
h4 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    color: #f1f5f9; /* Blanco clínico nítido */
    text-align: center;
}

/* Contenedor del ticker ejecutivo */
.ece-module-ticker {
    height: 18px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Texto ejecutivo que simula carga de capas del sistema */
.ticker-text {
    font-size: 0.68rem;
    color: #64748b; /* Slate 500 */
    letter-spacing: 0.08em;
    font-weight: 500;
    text-transform: uppercase;
    animation: ticker-fade 2.5s ease-in-out infinite;
}

/* ================================================= */
/* ANIMACIONES ESTRUCTURALES */
/* ================================================= */

/* Latido del núcleo del Expediente */
@keyframes pulse-grow {
    0% { transform: scale(0.85); box-shadow: 0 0 12px rgba(16, 185, 129, 0.4); }
    100% { transform: scale(1.15); box-shadow: 0 0 24px rgba(16, 185, 129, 0.8); }
}

/* Órbitas cruzadas de alta velocidad */
@keyframes spin-clockwise {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes spin-counter {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

/* Animaciones de convergencia de datos periféricos (4 puntos cardinales) */
@keyframes stream-in-top {
    0% { top: -20px; opacity: 0; transform: scale(0.5); }
    30% { opacity: 1; transform: scale(1); }
    70% { top: 35px; opacity: 0; transform: scale(0.3); }
    100% { top: 35px; opacity: 0; }
}
@keyframes stream-in-right {
    0% { right: -20px; opacity: 0; transform: scale(0.5); }
    30% { opacity: 1; transform: scale(1); }
    70% { right: 35px; opacity: 0; transform: scale(0.3); }
    100% { right: 35px; opacity: 0; }
}
@keyframes stream-in-bottom {
    0% { bottom: -20px; opacity: 0; transform: scale(0.5); }
    30% { opacity: 1; transform: scale(1); }
    70% { bottom: 35px; opacity: 0; transform: scale(0.3); }
    100% { bottom: 35px; opacity: 0; }
}
@keyframes stream-in-left {
    0% { left: -20px; opacity: 0; transform: scale(0.5); }
    30% { opacity: 1; transform: scale(1); }
    70% { left: 35px; opacity: 0; transform: scale(0.3); }
    100% { left: 35px; opacity: 0; }
}

/* Transición limpia para el ticker institucional */
@keyframes ticker-fade {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; color: #94a3b8; }
}
