/* --- Base Table --- */
.table-stack {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
}

/* Header */
.table-stack thead th {
    background: #f5f7fa;
    font-weight: 600;
    text-align: center;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #333;
}

/* Cells */
.table-stack td {
    padding: 12px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

/* Row hover */
.table-stack tbody tr:hover {
    background: #fafcff;
}

/* Images */
.table-stack td img {
    max-width: 80px;
    border-radius: 6px;
}

/* Links */
.table-stack td a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}
.table-stack td a:hover {
    text-decoration: underline;
}

/* --- Pagination --- */
.dataTables_wrapper .dataTables_paginate {
    text-align: center;
    margin: 20px 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #007bff !important;
    font-size: 14px;
    transition: all 0.2s;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #007bff;
    color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #007bff;
    color: #fff !important;
    border-color: #007bff;
}

/* --- Search & Length Controls --- */
.dataTables_length,
.dataTables_filter {
    margin: 10px 0;
    font-size: 14px;
    color: #444;
}
.dataTables_filter input,
.dataTables_length select {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 6px 10px;
    margin-left: 6px;
}

/* --- 📱 Mobile View: Card Layout --- */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: hidden !important;
    }

    .table-stack thead { display: none; }

    .table-stack, .table-stack tbody, .table-stack tr, .table-stack td {
        display: block;
        width: 100%;
    }

    .table-stack tr {
        margin: 0 0 16px;
        padding: 14px;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 10px;
        box-shadow: 0 2px 6px rgba(0,0,0,.05);
    }

    .table-stack td {
        border: none;
        padding: 10px;
        margin-bottom: 10px;
        text-align: center;
        background: #f9fafb;
        border-radius: 6px;
    }

    .table-stack td:last-child {
        margin-bottom: 0;
    }

    .table-stack td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        margin-bottom: 4px;
        color: #555;
    }

    .table-stack td img {
        max-width: 100%;
        border-radius: 8px;
    }

    /* Pagination larger on mobile */
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 12px 18px;
        font-size: 15px;
        margin: 6px;
    }
}

/* --- Tabs centered (desktop) --- */
.tabs-wrap {
    display: flex;
    justify-content: center;   /* center wrapper */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tabs-wrap .nav-tabs {
    display: flex;
    justify-content: center;   /* center UL inside */
    border-bottom: 1px solid #eaeaea;
    padding-left: 0;
    margin: 0 auto;           /* keep aligned */
}

.tabs-wrap .nav-tabs > li {
    display: inline-block;
    float: none;
    margin: 0 6px;
}
