/* ========================================
   INDICADOR DE CARGA MODERNO PARA LOGIN
   Diseño elegante y profesional
   ======================================== */

/* Overlay de carga */
.login-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.login-loading-overlay.active {
    display: flex;
}

/* Contenedor del loader */
.login-loading-container {
    background: white;
    border-radius: 20px;
    padding: 40px 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: scaleIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 400px;
    width: 90%;
}

/* Spinner moderno - SIMPLIFICADO (UN SOLO CÍRCULO) */
.login-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    position: relative;
}

.login-spinner-circle {
    width: 100%;
    height: 100%;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #7B4397;
    border-right: 5px solid #1E9A8A;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

/* Círculo interior ELIMINADO - causaba doble spinner */
.login-spinner-inner {
    display: none;
}

/* Icono central */
.login-spinner-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: #7B4397;
    animation: pulse 2s ease-in-out infinite;
}

/* Texto de carga */
.login-loading-text {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7B4397 0%, #1E9A8A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-family: 'Poppins', sans-serif;
}

.login-loading-subtext {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

/* Puntos animados */
.loading-dots {
    display: inline-block;
}

.loading-dots span {
    animation: blink 1.4s infinite;
    animation-fill-mode: both;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes blink {
    0%, 80%, 100% {
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
}

/* Barra de progreso */
.login-progress-bar {
    width: 100%;
    height: 4px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.login-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7B4397 0%, #1E9A8A 100%);
    width: 0%;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .login-loading-container {
        padding: 30px 35px;
    }
    
    .login-spinner {
        width: 60px;
        height: 60px;
    }
    
    .login-spinner-icon {
        font-size: 20px;
    }
    
    .login-loading-text {
        font-size: 1.1rem;
    }
    
    .login-loading-subtext {
        font-size: 0.85rem;
    }
}
