/* Penerima Bantuan Styles */
.penerima-bantuan-container {
    max-width: 100%;
    margin: 20px auto;
    padding: 20px;
    background: #fff !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Force all text to be black except where specifically overridden */
.penerima-bantuan-container,
.penerima-bantuan-container * {
    color: #000 !important;
}

/* Exceptions for white text */
.penerima-bantuan-container .summary-box,
.penerima-bantuan-container .summary-box * {
    color: #fff !important;
}

.penerima-bantuan-container #penerimaBantuanTable thead th {
    color: #fff !important;
}

.penerima-bantuan-header {
    margin-bottom: 30px;
    text-align: center;
}

.penerima-bantuan-header h2 {
    margin: 0 0 10px 0;
    color: #000 !important;
    font-size: 28px;
}

.penerima-bantuan-header .description {
    color: #333 !important;
    font-size: 16px;
    margin: 0;
}

/* Charts Section */
.penerima-bantuan-charts {
    margin-bottom: 30px;
}

.chart-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.chart-container {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    min-height: 450px;
}

.chart-container h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #000 !important;
}

.chart-half {
    flex: 1;
    min-width: 300px;
}

.chart-container canvas {
    height: 400px !important;
    width: 100% !important;
}

/* Filter Section */
.penerima-bantuan-filter {
    margin-bottom: 20px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.penerima-bantuan-filter label {
    margin: 0;
    color: #000 !important;
}

.penerima-bantuan-filter .program-select {
    flex: 1;
    max-width: 400px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff !important;
    color: #000 !important;
    height: 45px;
}

/* Table Wrapper */
.penerima-bantuan-table-wrapper {
    margin-bottom: 30px;
    overflow-x: auto;
    background: #fff !important;
}

/* DataTables Custom Styles */
#penerimaBantuanTable {
    font-size: 14px;
    background: #fff !important;
    color: #000 !important;
}

#penerimaBantuanTable thead th {
    background: #4CAF50 !important;
    color: white !important;
    font-weight: 600;
    padding: 12px 8px;
    text-align: left;
    white-space: nowrap;
}

#penerimaBantuanTable tbody td {
    padding: 10px 8px;
    vertical-align: top;
    color: #000 !important;
    background: #fff !important;
}

#penerimaBantuanTable tbody tr {
    background: #fff !important;
}

#penerimaBantuanTable tbody tr:hover {
    background-color: #f5f5f5 !important;
}

#penerimaBantuanTable tbody tr:hover td {
    background-color: #f5f5f5 !important;
    color: #000 !important;
}

/* Badges */
.program-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #2196F3;
    color: #000 !important;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.dana-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #000 !important;
    /* Background will be set via inline style by JavaScript */
}

/* Summary Section */
.penerima-bantuan-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.summary-box {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.summary-box:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.summary-box:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.summary-icon {
    font-size: 40px;
}

.summary-content {
    flex: 1;
}

.summary-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 32px;
    font-weight: 700;
}

/* DataTables Override */
.dataTables_wrapper {
    background: #fff !important;
    color: #000 !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 10px 0;
    color: #000 !important;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_info {
    color: #000 !important;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-left: 5px;
    background: #fff !important;
    color: #000 !important;
}

.dataTables_wrapper .dataTables_length select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 5px;
    background: #fff !important;
    color: #000 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #000 !important;
    background: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #4CAF50 !important;
    color: #fff !important;
    border-color: #4CAF50 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e0e0e0 !important;
    color: #000 !important;
    border-color: #ddd !important;
}

table.dataTable thead th,
table.dataTable thead td,
table.dataTable tfoot th,
table.dataTable tfoot td {
    color: #000 !important;
}

table.dataTable tfoot th {
    background: #4CAF50 !important;
    color: #fff !important;
}

/* Responsive */
@media (max-width: 768px) {
    .chart-row {
        flex-direction: column;
    }

    .chart-half {
        width: 100%;
    }

    .penerima-bantuan-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .penerima-bantuan-filter .program-select {
        max-width: 100%;
    }

    .penerima-bantuan-summary {
        flex-direction: column;
    }

    .summary-box {
        width: 100%;
    }

    .penerima-bantuan-header h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .penerima-bantuan-container {
        padding: 15px;
    }

    #penerimaBantuanTable {
        font-size: 12px;
    }

    #penerimaBantuanTable thead th,
    #penerimaBantuanTable tbody td {
        padding: 8px 4px;
    }
}