/* Tampilan Dasar */
body {
    background-color: #f4f7f6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.header-title {
    color: #2c3e50;
    font-weight: 700;
}
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.card-header {
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.table-responsive {
    border-radius: 0 0 8px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 
 * Modifikasi Table agar Word-Wrap Aktif 
 * Menghilangkan pemotongan teks secara horizontal
 */
.table td, .table th {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    vertical-align: middle;
}

/* Lebar Proporsional Kolom */
.col-no { min-width: 50px; max-width: 50px; width: 50px; }
.col-nama { min-width: 220px; max-width: 250px; width: 220px; }
.col-bulan { min-width: 110px; }
.col-keterangan { min-width: 200px; }

/* Styling Header Tabel */
.table thead th {
    background-color: #34495e;
    color: white;
    border-color: #455a64;
    font-size: 0.85rem;
}
.table td {
    text-align: right;
    font-size: 0.9rem;
}
/* Kembalikan text-align left untuk No, Nama, dan Keterangan */
.table td:nth-child(1), .table td:nth-child(2), .table td:last-child {
    text-align: left;
}

/* 
 * Konfigurasi Sticky Column (Fix Horizontal Scroll & Tidak Terpotong)
 */
.sticky-no {
    position: sticky;
    left: 0;
    z-index: 2; /* Di atas sel biasa */
    background-color: #fff;
}
.sticky-nama {
    position: sticky;
    left: 50px; /* Jarak pas disesuaikan dengan lebar col-no (50px) */
    z-index: 2;
    background-color: #fff;
    /* Memberikan efek bayangan lembut sebagai pemisah visual dari tabel yang bergulir */
    box-shadow: inset -3px 0 5px -3px rgba(0,0,0,0.15); 
}

/* Sticky pada Elemen Header harus memiliki z-index tertinggi agar tidak tertimpa body table */
thead th.sticky-no, thead th.sticky-nama {
    background-color: #34495e !important;
    color: white;
    z-index: 4; 
}

/* Sticky pada elemen colspan di baris Tfoot */
.sticky-colspan {
    position: sticky;
    left: 0;
    z-index: 3;
}

/* Menjaga warna hover Bootstrap pada Sticky Columns */
.table-hover tbody tr:hover td {
    background-color: #f1f8ff;
}
.table-hover tbody tr:hover td.sticky-no,
.table-hover tbody tr:hover td.sticky-nama {
    background-color: #f1f8ff !important;
}

/* Footer & Saldo */
.highlight-total {
    font-weight: bold;
    background-color: #e9ecef !important;
}
.saldo-row td {
    font-weight: 700;
    color: #d32f2f;
    background-color: #fee !important;
}
tfoot .highlight-total td.sticky-colspan {
    background-color: #e9ecef !important;
    box-shadow: inset -3px 0 5px -3px rgba(0,0,0,0.15);
}
tfoot .saldo-row td.sticky-colspan {
    background-color: #fee !important;
    box-shadow: inset -3px 0 5px -3px rgba(0,0,0,0.15);
}

/* Efek Tombol Action */
.btn-action {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    transition: all 0.3s ease;
}
.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15) !important;
}