/* Global DataTables theme: soft, modern, and shared by admin/public layouts. */
.dataTables_wrapper {
    color: #475569;
    font-size: .875rem;
}

.dataTables_wrapper::after {
    display: block;
    clear: both;
    content: "";
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin: 0 0 1rem;
    color: #64748b;
    font-weight: 500;
}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
}

.dataTables_wrapper select,
.dataTables_wrapper .dataTables_filter input {
    min-height: 40px;
    padding: .5rem .75rem;
    border: 1px solid #dbe3ed;
    border-radius: .625rem;
    background-color: #fff;
    color: #334155;
    line-height: 1.25;
    outline: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.dataTables_wrapper .dataTables_filter input {
    width: min(18rem, 55vw);
    margin-left: 0;
}

.dataTables_wrapper select:hover,
.dataTables_wrapper .dataTables_filter input:hover {
    border-color: #c2cfdd;
}

.dataTables_wrapper select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #7c93d6;
    box-shadow: 0 0 0 3px rgba(99, 121, 190, .12);
}

table.dataTable {
    width: 100% !important;
    margin: .25rem 0 1rem !important;
    border-collapse: separate !important;
    border-spacing: 0;
    border: 1px solid #e7edf4;
    border-radius: .75rem;
    background: #fff;
    overflow: hidden;
}

table.dataTable thead th,
table.dataTable thead td {
    padding: .8rem .9rem;
    border: 0;
    border-bottom: 1px solid #dfe7f0;
    background-color: #f8fafc;
    color: #334155;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .025em;
    line-height: 1.35;
    text-transform: uppercase;
    white-space: nowrap;
}

table.dataTable tbody th,
table.dataTable tbody td {
    padding: .75rem .9rem;
    border: 0;
    border-bottom: 1px solid #edf1f5;
    background-color: transparent;
    color: #475569;
    line-height: 1.45;
    vertical-align: middle;
}

table.dataTable tbody tr {
    background-color: #fff;
    transition: background-color .15s ease, box-shadow .15s ease;
}

table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd {
    background-color: #fbfcfe;
}

table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover,
table.dataTable tbody tr:hover {
    background-color: #f3f7fb !important;
}

table.dataTable tbody tr:last-child td,
table.dataTable tbody tr:last-child th,
table.dataTable.no-footer {
    border-bottom-color: #e7edf4;
}

.dataTables_wrapper .dataTables_info {
    padding-top: .75rem;
    color: #64748b;
    font-size: .82rem;
}

.dataTables_wrapper .dataTables_paginate {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding-top: .55rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 2.25rem;
    margin: 0;
    padding: .45rem .7rem;
    border: 1px solid transparent !important;
    border-radius: .5rem;
    background: transparent !important;
    color: #64748b !important;
    font-weight: 600;
    line-height: 1.25;
    box-shadow: none !important;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    border-color: #dbe3ed !important;
    background: #f1f5f9 !important;
    color: #334155 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    border-color: #5f76be !important;
    background: #667fc9 !important;
    color: #fff !important;
    box-shadow: 0 3px 8px rgba(79, 101, 170, .2) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    border-color: transparent !important;
    background: transparent !important;
    color: #b5c0ce !important;
    cursor: default;
}

.dataTables_wrapper .dataTables_processing {
    padding: .8rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: .625rem;
    background: rgba(255, 255, 255, .96);
    color: #475569;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .1);
}

.dataTables_wrapper .dataTables_scroll {
    overflow: hidden;
    border: 1px solid #e7edf4;
    border-radius: .75rem;
    background: #fff;
}

/* Dalam mode scrollX, DataTables memisahkan header dan body menjadi dua
   tabel. Bingkai ditempatkan di wrapper agar keduanya tetap terlihat sebagai
   satu tabel, bukan dua kartu rounded yang terpisah. */
.dataTables_wrapper .dataTables_scroll table.dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border: 0;
    border-radius: 0;
}

.dataTables_wrapper .dataTables_scrollHead {
    overflow: hidden !important;
    border: 0 !important;
    background: #f8fafc;
}

.dataTables_wrapper .dataTables_scrollBody {
    border-top: 0 !important;
}

/* Header tiruan di tabel body hanya dipakai DataTables untuk menghitung lebar
   kolom. Padding global tidak boleh membuatnya muncul sebagai baris kedua. */
.dataTables_wrapper .dataTables_scrollBody table.dataTable thead th,
.dataTables_wrapper .dataTables_scrollBody table.dataTable thead td {
    height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border: 0 !important;
    line-height: 0 !important;
}

.dataTables_wrapper .dataTables_scrollBody table.dataTable thead .sorting::before,
.dataTables_wrapper .dataTables_scrollBody table.dataTable thead .sorting::after,
.dataTables_wrapper .dataTables_scrollBody table.dataTable thead .sorting_asc::before,
.dataTables_wrapper .dataTables_scrollBody table.dataTable thead .sorting_asc::after,
.dataTables_wrapper .dataTables_scrollBody table.dataTable thead .sorting_desc::before,
.dataTables_wrapper .dataTables_scrollBody table.dataTable thead .sorting_desc::after {
    display: none !important;
}

.dataTables_wrapper .dataTables_scrollBody {
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-width: thin;
}

.dataTables_wrapper .dataTables_scrollBody::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.dataTables_wrapper .dataTables_scrollBody::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #cbd5e1;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child::before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child::before {
    border: 0 !important;
    background-color: #667fc9 !important;
    box-shadow: 0 2px 5px rgba(79, 101, 170, .2);
}

/* Keep action menus above subsequent table rows. */
table.dataTable tbody tr.dropdown-row-active {
    position: relative;
    z-index: 1000;
}

@media (max-width: 767px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: left;
    }

    .dataTables_wrapper .dataTables_filter label,
    .dataTables_wrapper .dataTables_length label {
        width: 100%;
    }

    .dataTables_wrapper .dataTables_filter input {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none;
        justify-content: flex-start;
        text-align: left;
    }

    table.dataTable thead th,
    table.dataTable thead td,
    table.dataTable tbody th,
    table.dataTable tbody td {
        padding: .65rem .7rem;
    }
}
