.table-responsive,
.app-table-scroll {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    overflow: auto;
}

.table {
    --bs-table-border-color: var(--app-border);
    color: var(--app-text);
    font-size: var(--app-font-size);
    margin-bottom: 0;
}

.app-data-table {
    width: 100% !important;
}

.datatable-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--app-space-2);
    justify-content: flex-end;
}

.table > :not(caption) > * > * {
    border-color: var(--app-border);
}

.table thead th {
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-size: var(--app-font-size-sm);
    font-weight: 600;
    vertical-align: middle;
}

/* DataTables use a clean header surface; specialized accounting tables keep their own header fill. */
.dataTables_wrapper table.dataTable thead th,
.dataTables_wrapper .dataTables_scrollHead table.dataTable thead th {
    background-color: transparent !important;
}

.dataTables_wrapper table.dataTable thead tr:first-child th,
.dataTables_wrapper .dataTables_scrollHead table.dataTable thead tr:first-child th {
    font-weight: 600 !important;
}

.dataTables_wrapper table.dataTable thead tr:not(:first-child) th,
.dataTables_wrapper .dataTables_scrollHead table.dataTable thead tr:not(:first-child) th {
    font-weight: 400;
}

.table tbody td {
    vertical-align: middle;
}

.table-header-fixed,
.table-footer-fixed {
    border-bottom: 1px solid var(--app-border-strong);
    border-top: 1px solid var(--app-border-strong);
    position: sticky;
    z-index: var(--app-z-sticky) !important;
}

.table-header-fixed {
    background: var(--app-table-header-bg) !important;
    box-shadow: 0 1px 0 var(--app-border-strong);
    top: 0;
}

.table-footer-fixed {
    background: var(--app-table-footer-bg) !important;
    bottom: 0;
    box-shadow: 0 -1px 0 var(--app-border-strong);
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--app-text-muted);
    font-size: var(--app-font-size-sm);
}

.dataTables_wrapper .app-search .form-control {
    background: var(--app-surface-muted) !important;
    color: var(--app-text) !important;
}

.dataTables_wrapper .app-search span,
.dataTables_wrapper .app-search .form-control::placeholder {
    color: var(--app-text-muted) !important;
}

.app-table-empty {
    color: var(--app-text-muted);
    padding: 2rem 1rem !important;
    text-align: center;
}

.app-col-rate {
    width: 7.5rem;
}

.app-col-period {
    width: 12.5rem;
}

.app-col-sequence {
    width: 2.5rem;
}

#dtEmpPayroll_wrapper .dataTable-top,
#dtStockTransfer_wrapper .action-deletemultiple {
    display: none !important;
}

#formBook #billTermsTable {
    table-layout: auto;
    width: 100%;
}

#formBook #billTermsTable td,
#formBook #billTermsTable th {
    padding: 0.3125rem;
    vertical-align: middle;
    white-space: nowrap;
}

#formBook .nav-tabs .nav-link {
    font-weight: 500;
    padding: 0.75rem 1.25rem;
}

#formBook .tab-content {
    padding: 1.5rem 0 0;
}
