/** TABLE **/

.table.rounded {
    border-collapse: separate;
    margin: 0 !important;
    border-radius: calc(var(--bs-border-radius) - var(--bs-border-width)) !important;
    border-spacing: 0;

    > thead:first-of-type {
        border-top-left-radius: calc(var(--bs-border-radius) - var(--bs-border-width)) !important;
        border-top-right-radius: calc(var(--bs-border-radius) - var(--bs-border-width)) !important;

        > tr:first-child {
            border-top-left-radius: calc(var(--bs-border-radius) - var(--bs-border-width)) !important;
            border-top-right-radius: calc(var(--bs-border-radius) - var(--bs-border-width)) !important;

            > th:first-child {
                border-top-left-radius: calc(var(--bs-border-radius) - 2 * var(--bs-border-width)) !important;
            }

            > th:last-child {
                border-top-right-radius: calc(var(--bs-border-radius) - 2 * var(--bs-border-width)) !important;
            }
        }
    }

    > tbody:last-of-type > tr:last-child {
        > td:first-child {
            border-bottom-left-radius: calc(var(--bs-border-radius) - 2 * var(--bs-border-width)) !important;
        }

        > td:last-child {
            border-bottom-right-radius: calc(var(--bs-border-radius) - 2 * var(--bs-border-width)) !important;
        }
    }
}

.table.rounded-bottom {
    border-collapse: separate;
    margin: 0 !important;
    border-radius: calc(var(--bs-border-radius) - var(--bs-border-width)) !important;
    border-spacing: 0;

    > tbody:last-of-type > tr:last-child {
        > td:first-child {
            border-bottom-left-radius: calc(var(--bs-border-radius) - var(--bs-border-width)) !important;
        }

        > td:last-child {
            border-bottom-right-radius: calc(var(--bs-border-radius) - var(--bs-border-width)) !important;
        }
    }
}

.table.rounded th, .table.rounded td,
.table.rounded-bottom th, .table.rounded-bottom td {
    background-clip: border-box;
}

.table > thead:not(:first-of-type) > tr > th {
    border-top-width: var(--bs-border-width);
}

.table > tbody > tr > * {
    border-color: var(--bs-gray-400) !important;
}

.table > tbody > tr:last-child > * {
    border-bottom-width: 0 !important;
}

.table:has(> thead.table-dark) {
    border-color: #4d5154 !important;
}