/* Keep tables as tables on mobile and enable smooth horizontal scrolling. */
@media only screen and (max-width: 991.98px) {
    .table-responsive {
        border: 1px solid #d9e1ee;
        border-radius: 12px;
        background-color: #fff;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        margin-bottom: 0;
    }

    .table-responsive .table thead th {
        position: sticky;
        top: 0;
        z-index: 3;
        background-color: #f5f8ff;
        box-shadow: inset 0 -1px 0 #d9e1ee;
    }

    .table-responsive .table th:first-child,
    .table-responsive .table td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background-color: #fff;
        box-shadow: 1px 0 0 #d9e1ee;
    }

    .table-responsive .table thead th:first-child {
        z-index: 4;
        background-color: #eef4ff;
    }

    .table-responsive .table.table-striped > tbody > tr:nth-of-type(odd) > td:first-child,
    .table-responsive .table.table-striped > tbody > tr:nth-of-type(odd) > th:first-child {
        background-color: rgba(0, 0, 0, 0.04);
    }

    .table th,
    .table td {
        white-space: nowrap;
        vertical-align: middle;
        padding: 0.6rem 0.7rem;
    }
}

@media only screen and (max-width: 767.98px) {

    .table-responsive {
        border: none;
        border-radius: 0;
        background: transparent;
        overflow-x: visible;
    }

    .table-responsive .table thead {
        display: none;
    }

    .table-responsive .table,
    .table-responsive .table tbody,
    .table-responsive .table tr {
        display: block;
    }

    .table-responsive .table tr {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        border: 1px solid #d9e1ee;
        border-radius: 12px;
        background: #fff;
        font-size: 0.86rem;
    }

    .table-responsive .table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.35rem 0;
        border: none;
        white-space: normal;
        overflow-wrap: break-word;
    }

    .table-responsive .table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.72rem;
        color: #62708a;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        flex-shrink: 0;
    }

    .table-responsive .table td.text-end {
        text-align: left;
        justify-content: space-between;
    }

    .table-responsive .table td[colspan] {
        display: block;
        text-align: center;
        justify-content: center;
        padding: 0.75rem 0;
    }

    .table-responsive .table td[colspan]::before {
        display: none;
    }

    .table-responsive .table.table-striped > tbody > tr:nth-of-type(odd) {
        --bs-table-bg-type: transparent;
    }

    .table .btn,
    .table .btn-sm {
        padding: 0.2rem 0.45rem;
        font-size: 0.76rem;
        line-height: 1.1;
    }
}

@media screen and (max-width: 1200px)  {
  .nav .d-none {
    display: block !important;
  }
}

.pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-bottom: 0;
}

.pagination .page-link {
        padding: 0.35rem 0.65rem;
        font-size: 0.875rem;
        line-height: 1.2;
}

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
        min-width: 2.25rem;
        text-align: center;
}

.card-footer .pagination,
.card-body .pagination {
        justify-content: center;
}
