:root {
    --table-surface: #ffffff;
    --table-surface-alt: #fbf8f2;
    --table-border: #eadfca;
    --table-border-strong: #dcc9aa;
    --table-text: #243022;
    --table-muted: #6e7a69;
    --table-accent: #17311d;
    --table-accent-soft: #edf4ef;
    --table-shadow: 0 18px 36px rgba(36, 49, 30, 0.08);
}

.table-responsive,
.detail-table.table-responsive,
.weight_table,
.card .table-responsive {
    border: 1px solid var(--table-border);
    border-radius: 22px;
    background: linear-gradient(180deg, #fffdfa 0%, #ffffff 100%);
    box-shadow: var(--table-shadow);
    overflow: hidden;
    overflow-x: auto;
}

.table,
table.dataTable {
    margin-bottom: 0;
    color: var(--table-text);
    background: transparent;
}

.table thead th,
table.dataTable thead th,
table.dataTable thead td {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, #f7f1e5 0%, #fdfaf4 100%);
    color: var(--table-accent);
    border-top: none;
    border-bottom: 1px solid var(--table-border-strong);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1rem 0.9rem;
}

.table td,
.table th,
table.dataTable tbody td,
table.dataTable tbody th {
    border-color: rgba(234, 223, 202, 0.8);
    padding: 0.95rem 0.9rem;
    vertical-align: middle;
}

.table tbody tr,
table.dataTable tbody tr {
    background: transparent;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.table-striped tbody tr:nth-of-type(odd),
table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd {
    background: rgba(251, 248, 242, 0.78);
}

.table-hover tbody tr:hover,
table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover {
    background: var(--table-accent-soft);
}

.table td a,
.table th a,
table.dataTable td a,
table.dataTable th a {
    font-weight: 700;
}

.table .badge,
table.dataTable .badge {
    border-radius: 999px;
    padding: 0.4rem 0.65rem;
    font-weight: 700;
}

div.dataTables_wrapper div.dataTables_length,
div.dataTables_wrapper div.dataTables_filter,
div.dataTables_wrapper div.dataTables_info,
div.dataTables_wrapper div.dataTables_paginate {
    color: var(--table-muted);
    font-size: 0.92rem;
    padding: 0.9rem 1rem;
}

div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label {
    font-weight: 700;
    color: var(--table-muted);
}

div.dataTables_wrapper div.dataTables_length select,
div.dataTables_wrapper div.dataTables_filter input {
    min-height: 42px;
    border: 1px solid var(--table-border);
    border-radius: 12px;
    background: #fff;
    color: var(--table-text);
    box-shadow: none;
}

div.dataTables_wrapper div.dataTables_filter input {
    margin-left: 0.5rem;
    padding: 0.45rem 0.75rem;
}

div.dataTables_wrapper div.dataTables_length select {
    margin: 0 0.4rem;
    padding: 0.35rem 1.8rem 0.35rem 0.7rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0 !important;
    margin: 0 0.15rem;
    border: none !important;
    background: transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button .page-link,
.page-item .page-link {
    min-width: 42px;
    min-height: 42px;
    border: 1px solid var(--table-border);
    border-radius: 12px;
    color: var(--table-accent);
    background: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current .page-link,
.page-item.active .page-link {
    background: var(--table-accent);
    border-color: var(--table-accent);
    color: #fff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover .page-link,
.page-item .page-link:hover {
    background: var(--table-accent-soft);
    border-color: var(--table-border-strong);
    color: var(--table-accent);
}

.table-responsive::-webkit-scrollbar {
    height: 10px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1ece2;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c8b38c;
    border-radius: 999px;
}

@media (max-width: 767.98px) {
    .table-responsive,
    .detail-table.table-responsive,
    .weight_table,
    .card .table-responsive {
        border-radius: 18px;
    }

    .table thead th,
    table.dataTable thead th,
    table.dataTable thead td {
        font-size: 0.68rem;
        padding: 0.8rem 0.7rem;
    }

    .table td,
    .table th,
    table.dataTable tbody td,
    table.dataTable tbody th {
        padding: 0.8rem 0.7rem;
        font-size: 0.9rem;
    }

    div.dataTables_wrapper div.dataTables_length,
    div.dataTables_wrapper div.dataTables_filter,
    div.dataTables_wrapper div.dataTables_info,
    div.dataTables_wrapper div.dataTables_paginate {
        padding: 0.75rem;
        text-align: left;
    }

    div.dataTables_wrapper div.dataTables_filter input {
        width: 100%;
        margin: 0.5rem 0 0;
    }

    .dataTables_wrapper .dataTables_paginate {
        overflow-x: auto;
        white-space: nowrap;
    }
}
