/* ==================================================================
   DataTables - tema UI/UX
   Hanya dimuat saat application_theme = 'uiux' (lihat layouts/main*.php).
   Semua selector dibatasi .dataTables_wrapper supaya tabel biasa tidak ikut berubah.
   ================================================================== */

/* ------------------------------------------------------------------ */
/* A0. Tabel scrollX/scrollY yang juga diberi class .table-responsive  */
/*     Bootstrap 4 membuat .table-responsive = display:block +          */
/*     overflow-x:auto. DataTables memecah tabel scroll menjadi tabel   */
/*     header/body/footer terpisah yang semuanya membawa class itu ->   */
/*     tabel header punya scrollbar sendiri (2 scrollbar) dan lebar     */
/*     kolom header tidak sejajar dengan isi. Scroll sudah ditangani    */
/*     .dataTables_scrollBody, jadi kembalikan ke display tabel biasa.  */
/* ------------------------------------------------------------------ */
.dataTables_wrapper .dataTables_scroll table.table-responsive {
    display: table;
    overflow: visible;
}

/* ------------------------------------------------------------------ */
/* A1. Baris lebih rapat, zebra tipis, hover, tanpa garis vertikal     */
/* ------------------------------------------------------------------ */
.dataTables_wrapper table.dataTable {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.dataTables_wrapper table.dataTable > tbody > tr > td {
    padding: 8px 12px;
    vertical-align: middle;
    border-color: #edf0f2;
}
/* Zebra di level <tr> agar warna sel/baris khusus (success, warning, dll) tetap menang */
.dataTables_wrapper table.dataTable.table-striped > tbody > tr:nth-child(odd) > td,
.dataTables_wrapper table.dataTable.table-striped > tbody > tr:nth-child(odd) > th {
    background: transparent;
}
.dataTables_wrapper table.dataTable > tbody > tr.even:not(.selected):not(.child) {
    background-color: #f8fafb;
}
.dataTables_wrapper table.dataTable > tbody > tr:not(.child):hover > td,
.dataTables_wrapper table.dataTable.table-hover > tbody > tr:not(.child):hover > td {
    background-color: rgba(13, 148, 136, .07) !important;
}
/* Garis vertikal antar kolom (table-bordered) tetap dipertahankan: membantu
   pengguna mengikuti kolom pada tabel lebar */
.dataTables_wrapper table.dataTable.table-bordered > thead > tr > th,
.dataTables_wrapper table.dataTable.table-bordered > thead > tr > td {
    border-color: #c9ebe6;
}

/* ------------------------------------------------------------------ */
/* A2. Header: latar teal muda, ikon sort di samping judul             */
/* ------------------------------------------------------------------ */
.dataTables_wrapper table.dataTable > thead > tr > th,
.dataTables_wrapper table.dataTable > thead > tr > td {
    background: #f0fdfa;
    color: #0c4a43;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    vertical-align: middle;
    padding: 10px 12px;
    border-bottom: none !important;
    /* garis bawah lewat shadow: border tidak ikut bergerak pada th sticky */
    box-shadow: inset 0 -2px 0 #99e1d9;
}
.dataTables_wrapper table.dataTable > thead > tr > th.sorting,
.dataTables_wrapper table.dataTable > thead > tr > th.sorting_asc,
.dataTables_wrapper table.dataTable > thead > tr > th.sorting_desc {
    padding-right: 28px;
    cursor: pointer;
}
.dataTables_wrapper table.dataTable > thead > tr > th.sorting:hover {
    background: #e0f7f3;
}
.dataTables_wrapper table.dataTable thead .sorting:after,
.dataTables_wrapper table.dataTable thead .sorting_asc:after,
.dataTables_wrapper table.dataTable thead .sorting_desc:after {
    top: 50% !important;
    bottom: auto !important;
    right: 10px !important;
    transform: translateY(-50%);
    margin-top: 0 !important;
    font-size: 12px;
    color: #94a3b8;
    opacity: .6;
}
.dataTables_wrapper table.dataTable > thead > tr > th.sorting_asc,
.dataTables_wrapper table.dataTable > thead > tr > th.sorting_desc {
    color: #0f766e;
}
.dataTables_wrapper table.dataTable thead .sorting_asc:after,
.dataTables_wrapper table.dataTable thead .sorting_desc:after {
    color: #0d9488;
    opacity: 1;
}
/* ------------------------------------------------------------------ */
/* Ubah lebar kolom (handle dipasang uiux_datatables.js)               */
/* ------------------------------------------------------------------ */
.dataTables_wrapper table.dataTable > thead > tr > th {
    position: relative;
}
.dt-col-resize {
    position: absolute;
    top: 0;
    right: -5px;
    width: 10px;
    height: 100%;
    cursor: col-resize;
    z-index: 3;
    touch-action: none;
}
.dt-col-resize:after {
    content: '';
    position: absolute;
    top: 20%;
    bottom: 20%;
    left: 4px;
    width: 2px;
    border-radius: 2px;
    background: transparent;
    transition: background .15s;
}
.dt-col-resize:hover:after,
.dt-col-resize.aktif:after {
    top: 0;
    bottom: 0;
    background: #0d9488;
}
/* Setelah kolom diatur: lebar dikunci dalam persen, teks panjang dibungkus */
.dataTables_wrapper table.dataTable.dt-resized {
    table-layout: fixed;
    width: 100% !important;
}
/* Tabel scrollX/scrollY: header & body tabel terpisah, lebar px diset JS */
.dataTables_wrapper table.dataTable.dt-resized-x {
    table-layout: fixed;
}
/* Setelah lebar diatur user, semua sel boleh turun baris - termasuk kolom angka,
   kolom .nowrap, dan sel yang mewarisi nowrap dari pembungkus (mis. .scrollmenu).
   Tanpa ini teks menabrak kolom sebelah karena table-layout: fixed. */
.dataTables_wrapper table.dataTable.dt-resized > thead > tr > th,
.dataTables_wrapper table.dataTable.dt-resized > tbody > tr > td,
.dataTables_wrapper table.dataTable.dt-resized-x > thead > tr > th,
.dataTables_wrapper table.dataTable.dt-resized-x > tbody > tr > td {
    white-space: normal;
    overflow-wrap: anywhere;
}
body.dt-sedang-resize,
body.dt-sedang-resize * {
    cursor: col-resize !important;
    user-select: none !important;
}

/* ------------------------------------------------------------------ */
/* A3. Kontrol: show entries, search, info, pagination, empty state    */
/* ------------------------------------------------------------------ */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_info {
    color: #707478;
    font-size: 13px;
}
.dataTables_wrapper .dataTables_info {
    padding-top: 12px;
}
/* Ikon kaca pembesar sebagai background input (bukan label:before), supaya
   tidak menimpa teks label kalau halaman mengisi language.search sendiri */
.dataTables_wrapper .dataTables_filter input {
    min-width: 240px;
    padding-left: 36px;
    border-radius: 999px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 13px center;
    background-size: 14px 14px;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .15);
}
div.dataTables_wrapper div.dataTables_paginate ul.pagination > li > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    margin: 0 2px;
    padding: 0 10px;
    border: none;
    border-radius: 999px !important;
    background: transparent;
    color: #0f766e;
    font-size: 13px;
}
div.dataTables_wrapper div.dataTables_paginate ul.pagination > li > a:hover,
div.dataTables_wrapper div.dataTables_paginate ul.pagination > li > a:focus {
    background: #f0fdfa;
    color: #0f766e;
}
div.dataTables_wrapper div.dataTables_paginate ul.pagination > li.active > a,
div.dataTables_wrapper div.dataTables_paginate ul.pagination > li.active > a:hover {
    background: #0f766e;
    color: #fff;
    font-weight: 600;
}
div.dataTables_wrapper div.dataTables_paginate ul.pagination > li.disabled > a,
div.dataTables_wrapper div.dataTables_paginate ul.pagination > li.disabled > a:hover {
    background: transparent;
    color: #c0c8ce;
}
.dataTables_wrapper table.dataTable td.dataTables_empty {
    padding: 32px 12px;
    background: #fff !important;
}
.dt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 13px;
}
.dt-empty .fa {
    font-size: 32px;
    color: #cbd5e1;
}

/* ------------------------------------------------------------------ */
/* A4. Kolom angka rata kanan                                          */
/* ------------------------------------------------------------------ */
/* .dt-num-auto: dipasang otomatis oleh uiux_datatables.js untuk kolom yang isinya angka.
   .dt-number : manual lewat columnDefs: {className: 'dt-number', targets: [...]} */
.dataTables_wrapper table.dataTable th.dt-number,
.dataTables_wrapper table.dataTable td.dt-number,
.dataTables_wrapper table.dataTable th.dt-num-auto,
.dataTables_wrapper table.dataTable td.dt-num-auto {
    text-align: right;
    white-space: nowrap;
}
.dataTables_wrapper table.dataTable td.text-right {
    white-space: nowrap;
}
/* ------------------------------------------------------------------ */
/* Indikator processing (DataTables 1.13: teks + animasi titik)        */
/* Di atas overlay blockUI yang dipasang layouts/main.php (z 1000)     */
.dataTables_wrapper div.dataTables_processing {
    z-index: 1012;
}
.dataTables_wrapper div.dataTables_processing > div:last-child > div {
    background: #0d9488;
}
