.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.75rem;
}

div.dataTables_wrapper {
    width: 100%;
}

.manager-filter-bar {
    width: 100%;
    margin: 0;
}

.manager-filter-form {
    width: 100%;
}

.manager-filter-form .select2-container {
    width: 100% !important;
}

.manager-filter-form .select2-selection--single {
    min-height: 38px;
    border: 1px solid #d9dee3 !important;
    border-radius: 0.5rem !important;
    padding: 0.2rem 0.35rem;
}

.manager-filter-form .select2-selection__rendered {
    line-height: 32px !important;
    color: #566a7f !important;
}

.manager-filter-form .select2-selection__arrow {
    height: 36px !important;
}

.datatable-header-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.datatable-header-title,
.datatable-header-action {
    flex: 0 0 auto;
}

.datatable-toolbar-target {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
}

.datatable-length-slot,
.datatable-manager-slot,
.datatable-search-slot {
    flex: 0 1 auto;
    min-width: 0;
}

.datatable-manager-slot:empty {
    display: none;
}

.datatable-length-slot {
    width: 130px;
}

.datatable-manager-slot {
    width: 260px;
}

.datatable-search-slot {
    width: 190px;
}

.datatable-toolbar-target .dataTables_length,
.datatable-toolbar-target .dataTables_filter,
.datatable-toolbar-target .dt-length,
.datatable-toolbar-target .dt-search {
    width: 100%;
    margin: 0 !important;
}

.datatable-toolbar-target .dataTables_filter,
.datatable-toolbar-target .dt-search {
    text-align: left;
}

.datatable-toolbar-target .dataTables_length label,
.datatable-toolbar-target .dataTables_filter label,
.datatable-toolbar-target .dt-length label,
.datatable-toolbar-target .dt-search label {
    display: block;
    margin: 0;
}

.datatable-toolbar-target .dataTables_length select,
.datatable-toolbar-target .dataTables_filter input,
.datatable-toolbar-target .dt-length select,
.datatable-toolbar-target .dt-search input {
    width: 100% !important;
    margin: 0 !important;
}

.global-datatable-toolbar {
    width: 100%;
    margin-top: 1rem;
}

.global-datatable-toolbar.row,
.global-datatable-toolbar.dt-layout-row {
    align-items: center;
    row-gap: 0.75rem;
}

.datatable-card-header {
    border-bottom: 0 !important;
}

.datatable-header-divider {
    margin: 1rem 0 0;
    border: 0;
    border-top: 1px solid #d9dee3;
    opacity: 1;
}

.global-datatable-toolbar .dataTables_length,
.global-datatable-toolbar .dataTables_filter,
.global-datatable-toolbar .dt-length,
.global-datatable-toolbar .dt-search {
    margin: 0 !important;
}

.global-datatable-toolbar .dataTables_filter,
.global-datatable-toolbar .dt-search {
    text-align: right;
}

.global-datatable-toolbar .dataTables_filter,
.global-datatable-toolbar .dt-search,
.global-datatable-toolbar .dt-layout-end {
    margin-left: auto !important;
}

.global-datatable-toolbar .dataTables_length label,
.global-datatable-toolbar .dataTables_filter label,
.global-datatable-toolbar .dt-length label,
.global-datatable-toolbar .dt-search label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.global-datatable-toolbar .dataTables_filter input,
.global-datatable-toolbar .dt-search input {
    margin-left: 0 !important;
}

.table {
    width: 100%;
    margin-bottom: 0;
    border-color: #d9dee3;
    vertical-align: middle;
    border-collapse: collapse;
}

.table > :not(caption) > * > * {
    padding: 0.85rem 0.95rem;
    white-space: nowrap;
    vertical-align: middle;
    box-shadow: none;
    box-sizing: border-box;
    border: 1px solid #d9dee3 !important;
}

.table thead th {
    background: #f7f8fa;
    color: #566a7f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border-bottom-width: 1px;
}

.table tbody td {
    font-size: 13px;
    color: #697a8d;
}

.table tbody tr:nth-child(odd) td {
    background-color: #ffffff;
}

.table tbody tr:nth-child(even) td {
    background-color: #f9fafb;
}

.table tbody tr:hover td {
    background-color: #eef2f6;
}

.table img {
    width: 44px;
    height: 48px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid #edf0f4;
}

.action-icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    white-space: nowrap;
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.action-icon:hover {
    transform: scale(1.08);
    opacity: 0.8;
}

.action-icon i {
    vertical-align: middle;
}

table.dataTable {
    margin: 0 !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

table.dataTable thead th,
table.dataTable thead td,
table.dataTable tbody th,
table.dataTable tbody td {
    box-sizing: border-box !important;
    border: 1px solid #d9dee3 !important;
    border-color: #d9dee3 !important;
}

div.dataTables_wrapper div.dataTables_length select,
div.dataTables_wrapper div.dataTables_filter input {
    min-height: 38px;
    border: 1px solid #d9dee3;
    border-radius: 0.5rem;
    padding: 0.45rem 0.75rem;
    font-size: 13px;
    color: #566a7f;
    background-color: #fff;
}

div.dataTables_wrapper div.dataTables_filter input {
    margin-left: 0.5rem;
}

div.dataTables_wrapper div.dataTables_info,
div.dataTables_wrapper div.dataTables_length,
div.dataTables_wrapper div.dataTables_filter,
div.dataTables_wrapper div.dataTables_paginate {
    margin-top: 0.75rem;
    font-size: 13px;
    color: #697a8d;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button {
    padding: 0.35rem 0.75rem !important;
    border-radius: 0.5rem !important;
}

div.dataTables_wrapper div.dataTables_scroll {
    clear: both;
}

div.dataTables_wrapper div.dataTables_scrollHead {
    border: 1px solid #d9dee3;
    border-bottom: 0;
    border-radius: 0.75rem 0.75rem 0 0;
    background: #f7f8fa;
}

div.dataTables_wrapper div.dataTables_scrollHeadInner,
div.dataTables_wrapper div.dataTables_scrollHeadInner > table {
    min-width: 0 !important;
}

div.dataTables_wrapper div.dataTables_scrollHead table.dataTable,
div.dataTables_wrapper div.dataTables_scrollBody table.dataTable {
    margin: 0 !important;
    table-layout: auto !important;
}

div.dataTables_wrapper div.dataTables_scrollBody {
    border: 1px solid #d9dee3;
    border-top: 0;
    border-radius: 0 0 0.75rem 0.75rem;
}

div.dataTables_wrapper div.dataTables_scrollBody > table.dataTable {
    border-top: 0 !important;
}

div.dataTables_wrapper div.dataTables_scrollBody > table.dataTable > thead > tr > th,
div.dataTables_wrapper div.dataTables_scrollBody > table.dataTable > thead > tr > td {
    border-top: 0 !important;
}

@media (max-width: 768px) {
    .datatable-header-top,
    .datatable-toolbar-target {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .datatable-toolbar-target {
        width: 100%;
    }

    .datatable-header-title,
    .datatable-header-action,
    .datatable-length-slot,
    .datatable-manager-slot,
    .datatable-search-slot {
        width: 100%;
    }

    .global-datatable-toolbar .dataTables_filter,
    .global-datatable-toolbar .dt-search,
    .global-datatable-toolbar .dt-layout-end {
        margin-left: 0 !important;
        text-align: left;
    }

    .table > :not(caption) > * > * {
        padding: 0.7rem;
    }

    .table thead th,
    .table tbody td {
        font-size: 12px;
    }
}
