/* =============================================
   BELANJA / APBDes PAGE STYLES
   ============================================= */

.belanja-bg {
    background: linear-gradient(180deg, var(--grad-blue-start) 0%, var(--grad-blue-end) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Summary Cards */
.apb-summary-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.apb-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
}

.apb-summary-card.pendapatan::before { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.apb-summary-card.belanja-card::before { background: linear-gradient(90deg, #e74c3c, #e84393); }
.apb-summary-card.pembiayaan::before { background: linear-gradient(90deg, #f39c12, #f1c40f); }

.apb-summary-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.apb-summary-card .apb-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.8rem;
    color: white;
}

.apb-summary-card.pendapatan .apb-icon { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.apb-summary-card.belanja-card .apb-icon { background: linear-gradient(135deg, #e74c3c, #e84393); }
.apb-summary-card.pembiayaan .apb-icon { background: linear-gradient(135deg, #f39c12, #f1c40f); }

.apb-summary-card h6 {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.apb-summary-card .apb-amount {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-dark);
}

/* Surplus / Deficit indicator */
.surplus-indicator {
    background: white;
    border-radius: var(--radius-md);
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.surplus-indicator .surplus-value {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 800;
    font-size: 1.8rem;
}

.surplus-indicator .surplus-value.positive { color: #27ae60; }
.surplus-indicator .surplus-value.negative { color: #e74c3c; }

/* Chart Container */
.chart-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.chart-card h5 {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700;
    color: var(--blue-darker);
    border-left: 5px solid var(--blue-desa);
    padding-left: 15px;
    margin-bottom: 25px;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Rincian Table */
.rincian-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.rincian-card h5 {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700;
    color: var(--blue-darker);
    border-left: 5px solid var(--blue-desa);
    padding-left: 15px;
    padding: 25px 30px 15px;
    margin: 0;
}

.rincian-table {
    width: 100%;
    font-family: 'Poppins', sans-serif;
    border-collapse: collapse;
}

.rincian-table thead th {
    background: var(--blue-desa);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.rincian-table tbody td {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.rincian-table tbody tr:hover {
    background: var(--blue-light);
}

.rincian-table .amount {
    font-weight: 700;
    color: var(--blue-desa);
}

.rincian-table tfoot td {
    background: var(--blue-light);
    font-weight: 800;
    color: var(--blue-darker);
    padding: 15px 20px;
    font-size: 1rem;
}

/* Progress bars for budget items */
.budget-bar {
    height: 10px;
    border-radius: 10px;
    background: #f0f0f0;
    overflow: hidden;
    margin-top: 8px;
}

.budget-bar .fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    background: linear-gradient(90deg, var(--blue-desa), var(--sky-accent));
}

/* Year Selector */
.year-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.year-btn {
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid var(--blue-desa);
    background: transparent;
    color: var(--blue-desa);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.year-btn.active,
.year-btn:hover {
    background: var(--blue-desa);
    color: white;
}

@media (max-width: 768px) {
    .apb-summary-card {
        padding: 20px;
    }

    .apb-summary-card .apb-amount {
        font-size: 1.2rem;
    }

    .chart-wrapper {
        height: 250px;
    }

    .rincian-table {
        font-size: 0.8rem;
    }

    .rincian-table thead th,
    .rincian-table tbody td {
        padding: 10px 12px;
    }

    .surplus-indicator .surplus-value {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .rincian-card {
        overflow-x: auto;
    }
    
    .rincian-table {
        min-width: 500px;
    }
}
