/* --- UNIVERSAL RESPONSIVE TABLES (Table-to-Card) --- */

/* Standard Desktop Container */
.table-container {
    background: var(--glass); 
    border-radius: 20px; 
    border: 1px solid var(--glass-border); 
    overflow: hidden; 
    backdrop-filter: blur(10px);
    width: 100%;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

/* --- MOBILE TABLE-TO-CARD RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .table-container {
        background: transparent;
        border: none;
        backdrop-filter: none;
    }

    /* Force table to not behave like a table */
    .table-container table, 
    .table-container thead, 
    .table-container tbody, 
    .table-container th, 
    .table-container td, 
    .table-container tr { 
        display: block; 
        width: 100%;
    }
    
    /* Hide table headers (but keep for accessibility) */
    .table-container thead tr { 
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    /* Turn each row into a sleek card */
    .table-container tr { 
        background: var(--glass);
        border: 1px solid var(--glass-border);
        border-radius: 15px;
        margin-bottom: 20px;
        padding: 15px;
        backdrop-filter: blur(10px);
    }
    
    /* Style the individual "cells" inside the card */
    .table-container td { 
        border: none !important;
        position: relative;
        padding: 10px 0 !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right !important;
    }
    
    /* Automatically generate the labels on the left side using the data-label attribute */
    .table-container td::before { 
        content: attr(data-label);
        font-weight: 900;
        color: var(--primary);
        text-transform: uppercase;
        font-size: 0.7rem;
        letter-spacing: 1px;
        text-align: left;
        flex-basis: 40%;
    }

    /* Add a divider above the actions row */
    .table-container td:last-child {
        margin-top: 10px;
        padding-top: 15px !important;
        border-top: 1px solid rgba(255,255,255,0.05) !important;
        justify-content: flex-end; /* Aligns action buttons neatly */
        gap: 15px;
    }
    
    /* Hide the "Actions" text label on mobile */
    .table-container td:last-child::before {
        display: none;
    }
}