/* DGS Report DataTable - themed for datatables.net */

.report-table-card .report-dt-header-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-left: auto;
}

.report-table-card .report-dt-header-tools .dataTables_length,
.report-table-card .report-dt-header-tools .dataTables_filter,
.report-table-wrapper .dataTables_length,
.report-table-wrapper .dataTables_filter {
    float: none !important;
    margin: 0 !important;
    text-align: left;
}

.report-table-card .report-dt-header-tools .dataTables_length label,
.report-table-card .report-dt-header-tools .dataTables_filter label,
.report-table-wrapper .dataTables_length label,
.report-table-wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--np-muted);
    white-space: nowrap;
}

.report-table-card .report-dt-header-tools .dataTables_filter input,
.report-table-wrapper .dataTables_filter input {
    width: 140px !important;
    max-width: 140px;
    min-width: 110px;
    padding: 0.375rem 0.625rem !important;
    font-size: 0.8125rem !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.25rem !important;
    background: #fff !important;
    margin-left: 0 !important;
}

.report-table-card .report-dt-header-tools .dataTables_filter input:focus,
.report-table-wrapper .dataTables_filter input:focus {
    border-color: var(--np-primary) !important;
    outline: none;
}

.report-table-card .report-dt-header-tools .dataTables_length select,
.report-table-wrapper .dataTables_length select {
    padding: 0.25rem 1.5rem 0.25rem 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    font-size: 0.8125rem;
    background: #fff;
}

.report-table-wrapper .dataTables_wrapper {
    font-family: inherit;
    font-size: 0.875rem;
}

.report-table-wrapper table.report-datatable {
    width: 100% !important;
    border-collapse: collapse;
    table-layout: auto;
}

.report-table-wrapper table.report-datatable thead th {
    position: relative;
    padding: 0.625rem 1.75rem 0.625rem 0.875rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--np-muted);
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    vertical-align: middle;
    text-align: left;
    background-image: none !important;
}

.report-table-wrapper table.report-datatable thead th.sorting,
.report-table-wrapper table.report-datatable thead th.sorting_asc,
.report-table-wrapper table.report-datatable thead th.sorting_desc {
    cursor: pointer;
    padding-right: 1.75rem !important;
}

.report-table-wrapper table.report-datatable thead th.sorting::after,
.report-table-wrapper table.report-datatable thead th.sorting_asc::after,
.report-table-wrapper table.report-datatable thead th.sorting_desc::after {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    line-height: 1;
    color: var(--np-muted);
    opacity: 0.45;
}

.report-table-wrapper table.report-datatable thead th.sorting::after {
    content: '↕';
}

.report-table-wrapper table.report-datatable thead th.sorting_asc::after {
    content: '↑';
    opacity: 1;
    color: var(--np-primary);
}

.report-table-wrapper table.report-datatable thead th.sorting_desc::after {
    content: '↓';
    opacity: 1;
    color: var(--np-primary);
}

.report-table-wrapper table.report-datatable thead th.sorting_disabled {
    cursor: default;
    padding-right: 0.875rem !important;
}

.report-table-wrapper table.report-datatable thead th.sorting_disabled::after {
    display: none;
}

.report-table-wrapper table.report-datatable tbody td {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    color: #1e293b;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    vertical-align: middle;
    text-align: left;
}

.report-table-wrapper table.report-datatable tbody tr:hover td {
    background: rgba(106, 105, 245, 0.04);
}

.report-table-wrapper .dataTables_info {
    font-size: 0.8125rem;
    color: var(--np-muted);
    padding-top: 0.75rem;
}

.report-table-wrapper .dataTables_paginate {
    padding-top: 0.75rem;
}

.report-table-wrapper .dataTables_paginate .paginate_button {
    padding: 0.25rem 0.625rem !important;
    margin: 0 0.125rem !important;
    border-radius: 0.25rem !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: #fff !important;
    color: var(--np-muted) !important;
    font-size: 0.8125rem !important;
}

.report-table-wrapper .dataTables_paginate .paginate_button.current {
    background: var(--np-primary) !important;
    color: #fff !important;
    border-color: var(--np-primary) !important;
}

.report-table-wrapper .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
    background: rgba(106, 105, 245, 0.08) !important;
    color: var(--np-primary) !important;
    border-color: var(--np-primary) !important;
}

.report-table-wrapper .dt-buttons,
.report-table-wrapper .report-dt-export-hidden,
.report-table-wrapper .report-dt-toolbar {
    display: none !important;
}

.dark .report-table-card .report-dt-header-tools .dataTables_filter input,
.dark .report-table-card .report-dt-header-tools .dataTables_length select,
.dark .report-table-wrapper .dataTables_filter input,
.dark .report-table-wrapper .dataTables_length select,
.dark .report-table-wrapper .dataTables_paginate .paginate_button {
    background: var(--np-dark-light) !important;
    border-color: var(--np-dark-border) !important;
    color: #f1f5f9 !important;
}

.dark .report-table-wrapper table.report-datatable thead th {
    background: var(--np-dark);
    color: var(--np-dark-muted);
    border-color: var(--np-dark-border);
}

.dark .report-table-wrapper table.report-datatable tbody td {
    color: #f1f5f9;
    border-color: var(--np-dark-border);
}

/* Report filter card - compact inputs aligned with search button */
.report-filter-card .report-filter-control input,
.report-filter-card .report-filter-control select,
.report-filter-card .report-filter-fields input,
.report-filter-card .report-filter-fields select {
    box-sizing: border-box;
    height: 2rem !important;
    width: 9.5rem !important;
    max-width: 9.5rem !important;
    min-width: 0;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.8125rem !important;
    line-height: 1.25rem !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.25rem !important;
    background: #fff;
    color: #1e293b;
}

.report-filter-card .report-filter-control input:focus,
.report-filter-card .report-filter-control select:focus,
.report-filter-card .report-filter-fields input:focus,
.report-filter-card .report-filter-fields select:focus {
    border-color: var(--np-primary) !important;
    outline: none;
}

.report-filter-card .report-filter-control input[type="date"],
.report-filter-card .report-filter-fields input[type="date"] {
    width: 10.25rem !important;
    max-width: 10.25rem !important;
}

.dark .report-filter-card .report-filter-control input,
.dark .report-filter-card .report-filter-control select,
.dark .report-filter-card .report-filter-fields input,
.dark .report-filter-card .report-filter-fields select {
    background: var(--np-dark-light) !important;
    border-color: var(--np-dark-border) !important;
    color: #f1f5f9 !important;
}
