:root {
    --dt-primary: rgb(27, 121, 141);
    --dt-primary-light: rgb(230, 246, 250);
    --dt-primary-dark: rgb(20, 95, 110);
    --dt-gray-50: #f9fafb;
    --dt-gray-100: #f3f4f6;
    --dt-gray-200: #e5e7eb;
    --dt-gray-300: #d1d5db;
    --dt-gray-400: #9ca3af;
    --dt-gray-600: #4b5563;
    --dt-gray-700: #374151;
}

#dataTable {
    border-collapse: separate;
    border-spacing: 0;
    width: 100% !important;
    font-size: 0.875rem;
    border: 1px solid var(--dt-gray-200);
    border-radius: 0.5rem;
    overflow: hidden;
}

#dataTable thead {
    background-color: var(--dt-gray-100);
    position: sticky;
    top: 0;
    z-index: 10;
}

#dataTable thead th {
    padding: 0.625rem 1rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dt-gray-700);
    border-bottom: 1px solid var(--dt-gray-200);
    white-space: nowrap;
}

#dataTable thead th.dt-orderable-asc,
#dataTable thead th.dt-orderable-desc {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

#dataTable thead th.dt-orderable-asc:hover,
#dataTable thead th.dt-orderable-desc:hover {
    background-color: var(--dt-primary-light);
}

#dataTable thead th.dt-ordering-asc,
#dataTable thead th.dt-ordering-desc {
    background-color: var(--dt-primary-light);
    color: var(--dt-primary);
}

#dataTable thead th .dt-column-order {
    margin-left: 0.25rem;
    opacity: 0.4;
}

#dataTable thead th.dt-ordering-asc .dt-column-order,
#dataTable thead th.dt-ordering-desc .dt-column-order {
    opacity: 1;
    color: var(--dt-primary);
}

#dataTable tbody tr {
    transition: background-color 0.15s ease;
}

#dataTable tbody tr:hover {
    background-color: var(--dt-primary-light) !important;
}

#dataTable tbody tr.selected,
#dataTable tbody tr.selected:hover {
    background-color: var(--dt-primary) !important;
    color: white;
}

#dataTable tbody tr.selected td {
    color: white;
}

#dataTable tbody tr.selected .time-ago {
    color: rgba(255, 255, 255, 0.8);
}

#dataTable tbody tr.selected i {
    color: white !important;
}

/* Alternating row colors */
#dataTable tbody tr:nth-child(even) {
    background-color: var(--dt-gray-50);
}

#dataTable tbody tr:nth-child(odd) {
    background-color: white;
}

#dataTable tbody td {
    padding: 0.625rem 1rem;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--dt-gray-200);
    color: var(--dt-gray-700);
}

/* Time ago styling */
#dataTable .time-ago {
    color: var(--dt-gray-400);
    font-size: 0.75rem;
}

/* Icons column */
#dataTable .icons {
    white-space: nowrap;
}

#dataTable .icons i {
    margin: 0 0.25rem;
    font-size: 0.875rem;
    color: var(--dt-primary);
    transition: color 0.15s ease;
}

#dataTable .icons i:hover {
    color: var(--dt-primary-dark);
}

#dataTable .icons i[style*="color: #ccc"] {
    color: var(--dt-gray-300) !important;
}

#dataTable td:nth-child(4) {

}

/* Container */
.dt-paging {
    padding: 1rem;
}

.dt-paging nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
}

/* All pagination buttons */
.dt-paging-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem !important;
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: none !important;
}

/* Hover state */
.dt-paging-button:hover:not(.disabled):not(.current) {
    background-color: rgb(230, 246, 250) !important;
    color: rgb(27, 121, 141) !important;
}

/* Current/Active page */
.dt-paging-button.current,
.dt-paging-button.current:hover {
    background-color: rgb(27, 121, 141) !important;
    color: white !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.dt-paging-button.current {
    color: white !important;
}

/* Disabled state */
.dt-paging-button.disabled,
.dt-paging-button.disabled:hover {
    background-color: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
}

/* First/Previous/Next/Last buttons */
.dt-paging-button.first,
.dt-paging-button.previous,
.dt-paging-button.next,
.dt-paging-button.last {
    font-size: 1rem;
}

.dt-paging-button:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(27, 121, 141, 0.2) !important;
}

.dt-paging-button:active:not(.disabled) {
    transform: scale(0.95);
}

.dt-container {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

.dt-layout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.dt-layout-table {
    overflow-x: auto;
}

/* Empty state */
.dt-empty {
    padding: 3rem;
    text-align: center;
    color: var(--dt-gray-400);
}

.search-row input[type="datetime-local"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--dt-gray-300);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.search-row input[type="datetime-local"]:focus {
    outline: none;
    border-color: var(--dt-primary);
    box-shadow: 0 0 0 3px rgba(27, 121, 141, 0.1);
}

@media (max-width: 640px) {
    #dataTable thead th,
    #dataTable tbody td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .dt-paging-button {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }
}

.wrapped-table-for-loading {
    position: relative;
    min-height: 200px;
}

.wrapped-table-for-loading.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}