.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 16px;
    overflow: hidden;
}

    .custom-table th,
    .custom-table td {
        border: 1px solid #e5e7eb;
    }

    .custom-table th {
        padding: 8px 16px;
    }

    .custom-table td {
        padding: 6px 12px;
    }

    .custom-table th {
        background: #f0f3f8;
        color: #1e293b;
        font-weight: 500;
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.025em;
    }

    .custom-table tr:nth-child(odd) {
        background-color: #f9fafb;
    }

    .custom-table tr:hover {
        background-color: #f1f5f9;
        outline: 1px solid #94a3b8;
    }

    .custom-table tr.disabled-row {
        opacity: 0.4;
        background-color: transparent;
    }

    .custom-table tr.checked-row {
        background-color: #e6f7f0;
        outline: 2px solid #2d9d78;
    }

    .custom-table tr.disabled-row td {
        position: relative;
    }

        .custom-table tr.disabled-row td::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 0;
            width: 100%;
            height: 1px;
            background: #b91c1c;
            transform: translateY(-50%);
        }

    .custom-table .d-small {
        display: none;
    }

.custom-table-btn {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    text-align: center;
    padding: 3px 20px;
    border-radius: 8px;
    min-width: 70px;
    min-height: 25px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

button.custom-table-btn:hover,
a.custom-table-btn:hover {
    color: #ffffff;
    background: #1e293b;
    border-color: #1e293b;
}

.custom-table-btn.custom-table-btn-add {
    color: #ffffff;
    background: #2d9d78;
    border: none;
}

    .custom-table-btn.custom-table-btn-add:hover {
        background: #247a5c;
    }

.custom-table-btn.custom-table-btn-edit {
    color: #ffffff;
    background: #4f7eb3;
    border: none;
}

    .custom-table-btn.custom-table-btn-edit:hover {
        background: #3d628a;
    }

.custom-table-btn.custom-table-btn-delete {
    color: #ffffff;
    background: #c24242;
    border: none;
}

    .custom-table-btn.custom-table-btn-delete:hover {
        background: #9e3535;
    }

.custom-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
}

.custom-table-options {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

[data-theme="dark"] .custom-table {
    box-shadow: 0 10px 30px -5px rgba(0, 150, 255, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

    [data-theme="dark"] .custom-table th {
        background: #1a1f2b;
        color: #e0e7ff;
        border-color: #2d3440;
    }

    [data-theme="dark"] .custom-table td {
        border-color: #2d3440;
    }

    [data-theme="dark"] .custom-table tr:nth-child(odd) {
        background-color: #1e232f;
    }

    [data-theme="dark"] .custom-table tr:nth-child(even) {
        background-color: #262c3a;
        color: #e2e8f0;
    }

    [data-theme="dark"] .custom-table tr:hover {
        background-color: #2f3646;
        outline: 1px solid #5f6b7f;
    }

    [data-theme="dark"] .custom-table tr.checked-row {
        background-color: #1a2f28;
        outline: 2px solid #2d9d78;
    }

[data-theme="dark"] .custom-table-btn {
    color: #e2e8f0;
    background: #262c3a;
    border: 1px solid #404754;
}

    [data-theme="dark"] .custom-table-btn.custom-table-btn-add {
        background: #1d5a47;
    }

        [data-theme="dark"] .custom-table-btn.custom-table-btn-add:hover {
            background: #154b3a;
        }

    [data-theme="dark"] .custom-table-btn.custom-table-btn-edit {
        background: #2c4563;
    }

        [data-theme="dark"] .custom-table-btn.custom-table-btn-edit:hover {
            background: #1f3650;
        }

    [data-theme="dark"] .custom-table-btn.custom-table-btn-delete {
        background: #6b3131;
    }

        [data-theme="dark"] .custom-table-btn.custom-table-btn-delete:hover {
            background: #542727;
        }

[data-theme="dark"] button.custom-table-btn:hover,
[data-theme="dark"] a.custom-table-btn:hover {
    color: #ffffff;
    background: #404754;
    border-color: #5f6b7f;
}

.custom-table th:first-child {
    border-top-left-radius: 16px;
}

.custom-table th:last-child {
    border-top-right-radius: 16px;
}

.custom-table tr:last-child td:first-child {
    border-bottom-left-radius: 16px;
}

.custom-table tr:last-child td:last-child {
    border-bottom-right-radius: 16px;
}

@media (min-width: 992px) {
    .custom-table-options {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 1rem;
    }

    .custom-table .head-visibility {
        display: contents;
    }

    .custom-table tr.checked-row td,
    .custom-table tr.checked-row th {
        outline: 1px solid #2d9d78;
    }
}

@media (max-width: 991.9px) {
    * {
        box-sizing: border-box;
    }

    .custom-table,
    .custom-table thead,
    .custom-table tbody,
    .custom-table th,
    .custom-table td,
    .custom-table tr {
        display: block;
        width: 100%;
    }

    .custom-table {
        border-radius: 0;
        box-shadow: none;
    }

        .custom-table thead th:not([active]) {
            display: none;
        }

        .custom-table thead tr {
            background: #f0f3f8;
            color: #1e293b;
            border-radius: 12px;
            margin-bottom: 16px;
            display: block;
            width: 100%;
        }

        .custom-table thead th {
            padding: 12px 0;
            border: none;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 12px !important;
        }

        .custom-table .head-visibility {
            display: none;
        }

        .custom-table .d-small {
            display: inline;
        }

        .custom-table tr {
            background: #f9fafb;
            margin-bottom: 1.5rem;
            padding: 16px;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            width: 100%;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        .custom-table td {
            border: none;
            padding: 10px 12px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            text-align: end;
            gap: 12px;
            width: 100%;
            border-bottom: 1px solid #e5e7eb;
        }

            .custom-table td:last-child {
                border-bottom: none;
            }

            .custom-table td[data-label]::before {
                content: attr(data-label) ": ";
                font-weight: 600;
                flex-shrink: 0;
                color: #4b5563;
            }

            .custom-table td:not([data-label]) {
                display: block;
                width: 100%;
                text-align: left;
            }

        .custom-table tr:nth-child(odd) {
            background-color: #f9fafb;
        }

        .custom-table tr:nth-child(even) {
            background-color: #f3f6fc;
            color: #1f2937;
        }

        .custom-table tr:hover {
            background-color: #eef2f6;
            outline: 0;
        }

    [data-theme="dark"] .custom-table thead tr {
        background: #1a1f2b;
        color: #e0e7ff;
    }

    [data-theme="dark"] .custom-table tr {
        background: #1e232f;
        border-color: #2d3440;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    [data-theme="dark"] .custom-table td {
        border-bottom-color: #2d3440;
    }

        [data-theme="dark"] .custom-table td[data-label]::before {
            color: #9aa4b8;
        }

    [data-theme="dark"] .custom-table tr:nth-child(odd) {
        background-color: #1e232f;
    }

    [data-theme="dark"] .custom-table tr:nth-child(even) {
        background-color: #262c3a;
        color: #e2e8f0;
    }

    [data-theme="dark"] .custom-table tr:hover {
        background-color: #2f3646;
    }
}

[dir="rtl"] .custom-table td {
    text-align: right;
}

    [dir="rtl"] .custom-table td[data-label]::before {
        margin-left: 8px;
        margin-right: 0;
    }

[dir="rtl"] .custom-table th:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 16px;
}

[dir="rtl"] .custom-table th:last-child {
    border-top-right-radius: 0;
    border-top-left-radius: 16px;
}

[dir="rtl"] .custom-table tr:last-child td:first-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 16px;
}

[dir="rtl"] .custom-table tr:last-child td:last-child {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 16px;
}

.custom-table .text-center {
    text-align: center !important;
}
