/* Frontend Styles */
.dpd-statistik {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin: 20px 0;
}

.dpd-statistik h3 {
    margin-top: 0;
    color: #2271b1;
    font-size: 24px;
}

.dpd-stat-section {
    margin: 20px 0;
}

.dpd-stat-section h4 {
    color: #333;
    font-size: 18px;
    margin-bottom: 10px;
}

.dpd-statistik ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dpd-statistik ul li {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.3s;
}

.dpd-statistik ul li:hover {
    background: #fff;
}

.dpd-statistik ul li:last-child {
    border-bottom: none;
}

.dpd-update-time {
    font-size: 12px;
    color: #999;
    margin-top: 20px;
    text-align: right;
}

.dpd-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px;
    border-radius: 5px;
    color: #856404;
}

/* Anggaran Chart Styles */
.dpd-anggaran-chart-wrapper {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.dpd-anggaran-chart-wrapper h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
    font-size: 24px;
}

.dpd-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0 30px 0;
}

.dpd-summary-card {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dpd-summary-card.dpd-success {
    background: linear-gradient(135deg, #00a32a 0%, #00c853 100%);
    color: white;
}

.dpd-summary-card.dpd-danger {
    background: linear-gradient(135deg, #d63638 0%, #f44336 100%);
    color: white;
}

.dpd-summary-card.dpd-warning {
    background: linear-gradient(135deg, #dba617 0%, #ffc107 100%);
    color: white;
}

.dpd-summary-card .dpd-label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.dpd-summary-card .dpd-value {
    display: block;
    font-size: 20px;
    font-weight: bold;
}

.dpd-chart-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .dpd-summary-cards {
        grid-template-columns: 1fr;
    }
}

/* Existing styles... */

/* Pie Chart Wrapper */
.dpd-pie-chart-wrapper {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 25px 0;
    border: 1px solid #e5e7eb;
}

.dpd-pie-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3f4f6;
}

.dpd-pie-header h3 {
    margin: 0 0 10px 0;
    color: #1f2937;
    font-size: 24px;
    font-weight: 600;
}

.dpd-pie-total {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.dpd-total-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.dpd-total-value {
    font-size: 20px;
    color: #2271b1;
    font-weight: 700;
}

/* Pie Chart Container */
.dpd-pie-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.dpd-pie-canvas-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

/* Legend */
.dpd-pie-legend h4 {
    margin: 0 0 15px 0;
    color: #374151;
    font-size: 16px;
    font-weight: 600;
}

.dpd-legend-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dpd-legend-list li {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #f9fafb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dpd-legend-list li:hover {
    background: #f3f4f6;
    transform: translateX(5px);
}

.dpd-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 10px;
    flex-shrink: 0;
}

.dpd-legend-label {
    flex: 1;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.dpd-legend-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
    text-align: right;
}

.dpd-legend-value small {
    display: block;
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .dpd-pie-container {
        grid-template-columns: 1fr;
    }

    .dpd-pie-canvas-wrapper {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .dpd-pie-header h3 {
        font-size: 20px;
    }

    .dpd-total-value {
        font-size: 18px;
    }
}

/* Multiple pie charts in one page */
.dpd-pie-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.dpd-pie-charts-grid .dpd-pie-chart-wrapper {
    margin: 0;
}

/* Compact mode for grid layout */
.dpd-pie-charts-grid .dpd-pie-container {
    grid-template-columns: 1fr;
}

.dpd-pie-charts-grid .dpd-pie-legend {
    margin-top: 20px;
}