/* charts.css - Styles untuk grafik dan chart infografis - WARNA BERBEDA TETAP */

/* Container Grafik */
.chart-container {
    background: var(--white);
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 15px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    border-left: 3px solid var(--primary);
}

.chart-title {
    color: var(--primary);
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Program Stats Chart */
.program-stats-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.program-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    transition: all 0.2s ease;
    margin: 0 10px;
}

/* Total Item Styling - Hanya untuk total-item, bukan first-child */
.program-stat-item.total-item {
    background: linear-gradient(135deg, #ffffff, #858687);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 5px;
}

.program-stat-item.total-item .program-name {
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
}

.program-stat-item.total-item .total-count {
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
}

.program-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.program-info {
    min-width: 140px;
    flex-shrink: 0;
}

.program-name {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.8rem;
    line-height: 1.2;
}

.total-count {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.8rem;
}

/* Progress Bar - UKURAN SAMA UNTUK SEMUA */
.progress-container {
    flex: 1;
    min-width: 200px;
    max-width: 200px;
}

.progress-bar {
    width: 100%;
    height: 32px;
    background: #f1f3f4;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 1px solid #e1e5e9;
}

.progress-fill {
    height: 100%;
    border-radius: 16px;
    position: relative;
    display: flex;
    align-items: center;
    min-width: fit-content;
    transition: width 0.6s ease-in-out;
}

/* Teks di dalam progress bar */
.progress-text {
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    pointer-events: none;
    padding: 0 12px;
    letter-spacing: 0.3px;
}

/* WARNA TETAP UNTUK SETIAP PROGRAM */
/* BANTU JUAL - Merah */
.fill-akselerasi {
    background: linear-gradient(90deg, #F44336, #D32F2F);
    box-shadow: 2px 0 8px rgba(244, 67, 54, 0.3);
}

/* BANTU MODAL - Biru */
.fill-konsultasi {
    background: linear-gradient(90deg, #2196F3, #1976D2);
    box-shadow: 2px 0 8px rgba(33, 150, 243, 0.3);
}

/* KELAS AKSELERASI BISNIS - Hijau */
.fill-modal {
    background: linear-gradient(90deg, #4CAF50, #45a049);
    box-shadow: 2px 0 8px rgba(76, 175, 80, 0.3);
}

/* KONSULTASI BISNIS - Ungu */
.fill-jual {
    background: linear-gradient(90deg, #9C27B0, #7B1FA2);
    box-shadow: 2px 0 8px rgba(156, 39, 176, 0.3);
}

/* Warna untuk icon juga sesuai program */
.program-stat-item:nth-child(2) .program-icon { /* BANTU JUAL */
    background: linear-gradient(135deg, #F44336, #D32F2F);
}

.program-stat-item:nth-child(3) .program-icon { /* BANTU MODAL */
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.program-stat-item:nth-child(4) .program-icon { /* KELAS AKSELERASI */
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.program-stat-item:nth-child(5) .program-icon { /* KONSULTASI */
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

/* Untuk statistik grid yang ada */
.statistik-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 15px;
}

.statistik-item {
    background: var(--white);
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid #eaeaea;
}

.statistik-item h4 {
    background: var(--primary);
    color: var(--white);
    padding: 10px 12px;
    margin: 0;
    font-size: 0.9rem;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.statistik-placeholder {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-style: italic;
    padding: 15px;
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .program-stat-item {
        gap: 10px;
        padding: 6px 8px;
        margin: 0 8px;
    }
    
    .progress-container {
        min-width: 180px;
        max-width: 180px;
    }
    
    .program-info {
        min-width: 120px;
    }
    
    .program-name {
        font-size: 0.75rem;
    }
    
    .progress-bar {
        height: 28px;
        border-radius: 14px;
    }
    
    .progress-text {
        font-size: 0.7rem;
        padding: 0 10px;
    }
    
    .program-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .statistik-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .chart-container {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .program-stat-item {
        flex-wrap: wrap;
        gap: 8px;
        margin: 0 5px;
    }
    
    .program-info {
        min-width: 100px;
    }
    
    .progress-container {
        min-width: 100%;
        max-width: 100%;
        order: 3;
        margin-top: 4px;
    }
    
    .program-stat-item.total-item {
        flex-wrap: nowrap;
    }
    
    .progress-bar {
        height: 26px;
        border-radius: 13px;
    }
    
    .progress-text {
        font-size: 0.65rem;
        padding: 0 8px;
    }
}

/* Hover effects */
.program-stat-item:not(.total-item):hover .progress-fill {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

/* Alignment yang konsisten */
.program-stats-chart {
    align-items: stretch;
}

.program-stat-item {
    justify-content: space-between;
}