/**
 * ═══════════════════════════════════════════════════════════════
 *  ARYGATO SYSTEM — Pantalla de Carga (Clean & Professional)
 * ═══════════════════════════════════════════════════════════════
 */

.loading-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    animation: fadeIn 0.3s ease-out;
}

.loading-screen.active {
    display: flex;
}

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

.loading-container {
    text-align: center;
    background: #1e293b;
    padding: 44px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
    max-width: 380px;
    width: 90%;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Spinner animado limpio */
.loading-spinner-wrapper {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3.5px solid rgba(255, 255, 255, 0.1);
    border-top: 3.5px solid #f97316;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.loading-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    z-index: 2;
    border-radius: 50%;
    background: #ffffff;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.loading-container h2 {
    color: #f8fafc;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}

.loading-container p {
    color: #94a3b8;
    font-size: 13.5px;
    margin: 0 0 20px 0;
    font-weight: 500;
}

/* Barra de progreso limpia */
.loading-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.loading-progress .progress-bar {
    height: 100%;
    background: #f97316;
    width: 0%;
    animation: progressFill 1.8s ease-in-out forwards;
    border-radius: 4px;
}

@keyframes progressFill {
    0% { width: 0%; }
    50% { width: 65%; }
    100% { width: 100%; }
}

@media (max-width: 768px) {
    .loading-container {
        padding: 32px 24px;
    }
}
