/* ================================
   Sistema de carregamento customizado
   ================================ */

/* --- Responsividade --- */
@media (max-width: 768px) {
    .loading-content {
        padding: 20px;
    }

    .loading-text {
        font-size: 16px;
    }

    .custom-pace {
        width: 250px;
    }
}

/* --- Overlay do carregamento --- */
.loading-content {
    text-align: center;
    color: #fff;
    font-family: Arial, sans-serif;
}

/* Spinner central */
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #29d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Texto abaixo do spinner */
.loading-text {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* --- Container da barra de progresso --- */
.custom-pace {
    position: relative;
    width: 300px;
    height: 20px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 3px rgba(0,0,0,0.3);
}

/* --- Barra que cresce --- */
.custom-pace .custom-pace-progress {
    position: relative;
    height: 100%;
    width: 0; /* começa zerada */
    background: linear-gradient(90deg, #29d, #3cf);
    border-radius: 10px 0 0 10px;
    transition: width 0.3s ease;
    text-align: right;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    line-height: 20px;
    padding-right: 8px;
    box-shadow: 0 0 8px rgba(41, 157, 255, 0.6);
}

/* Mostra o percentual no canto direito da barra */
.custom-pace .custom-pace-progress::after {
    content: attr(data-progress-text);
    position: absolute;
    right: 8px;
    top: 0;
}

/* Borda decorativa (atividade) */
.custom-pace .custom-pace-activity {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    box-shadow: inset 0 0 0 2px #29d;
    pointer-events: none;
}

/* --- Animação do conteúdo depois de carregar --- */
.dashboard-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.dashboard-content.loaded {
    opacity: 1;
    transform: translateY(0);
}
