/* Desktop: Force table cells to wrap long text (like wallets/txids) */
.table-logs th,
.table-logs td {
    word-break: break-all;
    white-space: normal;
}

.table-logs th:nth-child(2), /* Wallet */
.table-logs th:nth-child(9) { /* Payout ID */
    min-width: 150px;
}
.table-logs th:nth-child(8) { /* Reason */
    min-width: 120px;
}
.table-logs th:nth-child(10) { /* Timestamp */
    min-width: 160px;
}

/* Desktop pagination */
@media (max-width: 576px) {
    .pagination {
        font-size: 0.8rem;
    }
    .pagination .page-item {
        margin: 0 1px;
    }
    .pagination .page-link {
        padding: 0.25rem 0.5rem;
    }
}

/* --- RESPONSIVE TABLE 'CARD' STYLES --- */
@media (max-width: 768px) {
    /* Hide the table header */
    .table-logs thead {
        display: none;
    }
    
    .table-logs,
    .table-logs tbody,
    .table-logs tr,
    .table-logs td {
        display: block;
        width: 100%;
    }

    .table-logs tr {
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        margin-bottom: 1rem;
    }

    .table-logs td {
        border: none;
        border-bottom: 1px solid #eee;
        padding: 0.75rem 1rem;
        text-align: right; 
        padding-left: 50%;
        position: relative;
        min-height: 3rem; 
        display: flex; 
        align-items: center;
        justify-content: flex-end; 
    }
    
    .table-logs tr td:last-child {
        border-bottom: none;
    }

    .table-logs td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem; 
        top: 50%;
        transform: translateY(-50%); 
        font-weight: 600;
        text-align: left;
        width: calc(50% - 1.5rem); 
        white-space: normal;
    }
}


/* --- RESPONSIVE STYLES FOR SHORTLINKS TABLE --- */
@media (max-width: 768px) {
    /* Hide the table header */
    .table-shortlinks thead {
        display: none;
    }
    
    .table-shortlinks,
    .table-shortlinks tbody,
    .table-shortlinks tr,
    .table-shortlinks td {
        display: block;
        width: 100%;
    }

    .table-shortlinks tr {
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        margin-bottom: 1rem;
    }

    .table-shortlinks td {
        border: none;
        border-bottom: 1px solid #eee;
        padding: 0.75rem 1rem;
        text-align: right; 
        padding-left: 50%;
        position: relative;
        min-height: 3rem; 
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    
    .table-shortlinks tr td:last-child {
        border-bottom: none;
    }

    .table-shortlinks td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        text-align: left;
        width: calc(50% - 1.5rem); 
        white-space: normal;
    }

    /* This centers the '2' horizontally in mobile view */
    .table-shortlinks td[data-label="Completed"] {
        justify-content: center;
    }
}

/* Force center alignment for 'Completed' column (header and cell) on all screen sizes */
.table-shortlinks th.text-center,
.table-shortlinks td[data-label="Completed"] {
    text-align: center !important; /* Horizontally centers the text */
    vertical-align: middle !important; /* Vertically centers the text */
}

/* --- NEW: RESPONSIVE STYLES FOR BANNED USERS TABLE --- */
@media (max-width: 768px) {
    /* Hide the table header */
    .table-banned thead {
        display: none;
    }
    
    .table-banned,
    .table-banned tbody,
    .table-banned tr,
    .table-banned td {
        display: block;
        width: 100%;
    }

    .table-banned tr {
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        margin-bottom: 1rem;
    }

    .table-banned td {
        border: none;
        border-bottom: 1px solid #eee;
        padding: 0.75rem 1rem;
        text-align: right; 
        padding-left: 50%;
        position: relative;
        min-height: 3rem; 
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    
    .table-banned tr td:last-child {
        border-bottom: none;
    }

    .table-banned td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        text-align: left;
        width: calc(50% - 1.5rem); 
        white-space: normal;
    }
}
/* --- END NEW STYLES --- */

