.document-table-wrapper .document-table-toolbar,
.document-table-wrapper .document-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.document-table-wrapper .document-table-toolbar {
    border-bottom: 1px solid #eef0f6;
}

.document-table-wrapper .document-table-footer {
    justify-content: flex-end;
    border-top: 1px solid #eef0f6;
}

.document-table-wrapper .dataTables_length,
.document-table-wrapper .dataTables_info,
.document-table-wrapper .dataTables_paginate {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.document-table-wrapper .dataTables_length label {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0;
    color: #52627a;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
}

.document-table-wrapper .dataTables_length select {
    min-width: 76px;
    height: 38px;
    margin: 0 !important;
    padding: .35rem 1.9rem .35rem .7rem;
    border: 1px solid #dfe5ee !important;
    border-radius: 10px !important;
    color: #1a2d4a;
    background-color: #fff;
    font-size: .8rem;
    font-weight: 700;
    box-shadow: 0 2px 7px rgba(13, 63, 143, .04);
}

.document-table-wrapper .dataTables_info {
    display: block !important;
    color: #77849a;
    font-size: .78rem;
    font-weight: 500;
}

.document-table-wrapper .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0;
}

.document-table-wrapper .pagination .page-item {
    margin: 0 !important;
}

.document-table-wrapper .pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: .35rem .65rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px !important;
    color: #52627a;
    background: #fff;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 7px rgba(13, 63, 143, .04);
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.document-table-wrapper .pagination .page-link:hover {
    z-index: 2;
    border-color: #a9c4eb;
    color: #0d3f8f;
    background: #e8f0fc;
    box-shadow: 0 5px 12px rgba(26, 95, 200, .12);
    transform: translateY(-1px);
}

.document-table-wrapper .pagination .page-item.active .page-link {
    border-color: #1a5fc8;
    color: #fff;
    background: linear-gradient(135deg, #1a5fc8, #0d3f8f);
    box-shadow: 0 5px 14px rgba(26, 95, 200, .24);
}

.document-table-wrapper .pagination .page-item.disabled .page-link {
    border-color: #edf0f4;
    color: #aeb7c5;
    background: #f8fafc;
    box-shadow: none;
    opacity: .72;
    transform: none;
}

.document-table-wrapper .document-datatable tfoot th {
    border-top: 2px solid #dfe7f2 !important;
    background: #f8fafc !important;
    color: #1a2d4a !important;
}

html[data-theme="dark"] .document-table-wrapper .document-table-toolbar,
html[data-theme="dark"] .document-table-wrapper .document-table-footer {
    border-color: var(--dk-border);
}

html[data-theme="dark"] .document-table-wrapper .dataTables_length label,
html[data-theme="dark"] .document-table-wrapper .dataTables_info {
    color: var(--dk-muted);
}

html[data-theme="dark"] .document-table-wrapper .dataTables_length select,
html[data-theme="dark"] .document-table-wrapper .pagination .page-link {
    border-color: var(--dk-border) !important;
    color: var(--dk-text);
    background-color: var(--dk-card-alt);
}

html[data-theme="dark"] .document-table-wrapper .pagination .page-link:hover {
    color: #fff;
    background-color: var(--dk-accent-lt);
}

html[data-theme="dark"] .document-table-wrapper .pagination .page-item.active .page-link {
    border-color: var(--dk-accent) !important;
    color: #fff;
    background: linear-gradient(135deg, #1a5fc8, #0d3f8f);
}

html[data-theme="dark"] .document-table-wrapper .pagination .page-item.disabled .page-link {
    color: #596276;
    background-color: var(--dk-surface);
}

html[data-theme="dark"] .document-table-wrapper .document-datatable tfoot th {
    border-color: var(--dk-border) !important;
    color: var(--dk-text) !important;
    background: var(--dk-card-alt) !important;
}

@media (max-width: 767.98px) {
    .document-table-wrapper .document-table-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .document-table-wrapper .document-table-footer {
        justify-content: center;
    }

    .document-table-wrapper .dataTables_paginate,
    .document-table-wrapper .pagination {
        justify-content: center !important;
        width: 100% !important;
    }
}
