.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.dataTable {
    width: 100% !important;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0 4px;
    font-size: 14px;
    background: #ffffff;
    --bs-table-striped-bg: #ffffff;
}

table.dataTable thead {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #ffffff;
}

table.dataTable thead th {
    padding: 14px 18px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #ffffff;
    background: #1c266a;
    white-space: nowrap;
}

table.dataTable tbody tr {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

table.dataTable tbody tr:hover {
    background: rgb(250, 241, 171) !important;
    transform: translateY(-2px);
}

table.dataTable tbody tr:nth-child(even) {
    background: rgba(220, 227, 251, 0.28);
}

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

table.dataTable td {
    padding: 8px 12px;
    font-size: 14px;
    color: #111827;
    border-bottom: 1px solid #eef2f6;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

table.dataTable td.numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    table.dataTable thead th,
    table.dataTable td {
        padding: 10px 12px;
        font-size: 14px;
    }

    table.dataTable td {
        white-space: normal;
        word-break: break-word;
    }
}

.dataTables_processing.card {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    padding: 1rem 1.5rem;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-family: Arial, sans-serif;
    color: #333;
    font-size: 0.95rem;
}

.dataTables_processing.card::after {
    content: "";
    display: block;
    margin: 0.5rem auto 0;
    width: 20px;
    height: 20px;
    border: 3px solid #4CAF50;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.dataTables_scrollBody::-webkit-scrollbar {
    height: 10px;
}

.dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #cbd5e1, rgba(42, 42, 87, 0.4));
}

table.dataTable td .d-flex > .btn {
    padding: 2px 6px;
    font-size: 14px;
    line-height: 1.2;
}

table.dataTable td > .btn {
    padding: 2px 6px;
    font-size: 14px;
    line-height: 1.2;
}