/* 📊 KPI Card - Estilos Isolados */

/* === CARD PRINCIPAL === */
.kpi-card-premium {
    position: relative;
    overflow: hidden;
}

.kpi-card-premium::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

.kpi-card-premium:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 8px 32px rgba(255, 255, 255, 0.15) inset;
}

/* === HEADER === */
.kpi-header-premium {
    position: relative;
    z-index: 2;
}

/* === SEÇÃO DE VALOR === */
.kpi-value-section {
    position: relative;
    z-index: 2;
}

/* === PROGRESSO === */
.progress-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* === SPARKLINE SIMULATION === */
.sparkline-simulation {
    display: flex;
    align-items: end;
    gap: 2px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 4px;
    backdrop-filter: blur(5px);
}

.spark-bar {
    width: 3px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.6), white);
    border-radius: 1px;
    animation: sparkGrow 1s ease-out forwards;
    transform: scaleY(0);
    transform-origin: bottom;
}

/* === AÇÕES === */
.kpi-actions {
    position: relative;
    z-index: 2;
}

/* === EXPLICAÇÃO DO KPI === */
.kpi-title-with-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kpi-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.kpi-info-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.kpi-explanation-panel {
    animation: slideDown 0.3s ease-out;
}

.explanation-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
}

.explanation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.explanation-close {
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.explanation-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.explanation-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.formula-section,
.target-section {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.5rem 0;
}

.formula-label,
.target-label {
    display: flex;
    align-items: center;
}

.formula-content {
    margin-left: 1.3rem;
}

/* === ANIMAÇÕES === */
@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sparkGrow {
    from {
        transform: scaleY(0);
        opacity: 0;
    }
    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === RESPONSIVIDADE === */
@media (max-width: 768px) {
    .kpi-card-premium {
        min-height: 160px;
    }
    
    .kpi-title-section h4 {
        font-size: 0.9rem;
    }
    
    .sparkline-simulation {
        height: 25px;
    }
    
    .explanation-container {
        padding: 0.75rem;
    }
    
    .kpi-title-with-info {
        gap: 0.3rem;
    }
} 