/* =====================================================
   TABLES.CSS
   DocShield AI – Premium Enterprise Table System
   Top 1% Hackathon Winning Data Intelligence Tables
===================================================== */


/* =====================================================
   TABLE WRAPPER
===================================================== */

.table-container {
    width: 100%;
    overflow-x: auto;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255,255,255,0.035);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 20px 60px rgba(0,0,0,0.10);
    margin-bottom: 32px;
}


/* =====================================================
   MAIN TABLE
===================================================== */

table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    border-spacing: 0;
}


/* =====================================================
   TABLE HEAD
===================================================== */

table thead {
    background: rgba(255,255,255,0.02);
}

table thead th {
    padding: 20px 18px;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: rgba(255,255,255,0.88);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
}


/* =====================================================
   TABLE BODY
===================================================== */

table tbody tr {
    transition: all 0.3s ease;
}

table tbody td {
    padding: 18px;
    font-size: 14px;
    color: rgba(255,255,255,0.78);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
    line-height: 1.6;
}

table tbody tr:hover {
    background: rgba(255,255,255,0.03);
    transform: scale(1.002);
}


/* =====================================================
   STATUS BADGES
===================================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}


/* ---------- High Risk ---------- */

.status-badge.high,
.status-badge.critical {
    background: rgba(255, 90, 90, 0.10);
    border: 1px solid rgba(255, 90, 90, 0.20);
    color: #ff8d8d;
}


/* ---------- Medium Risk ---------- */

.status-badge.medium,
.status-badge.warning {
    background: rgba(255, 179, 71, 0.10);
    border: 1px solid rgba(255, 179, 71, 0.20);
    color: #ffc977;
}


/* ---------- Safe ---------- */

.status-badge.low,
.status-badge.safe,
.status-badge.success {
    background: rgba(45, 255, 181, 0.08);
    border: 1px solid rgba(45, 255, 181, 0.18);
    color: #7dffd2;
}


/* =====================================================
   PRIORITY TAGS
===================================================== */

.priority-tag {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
}

.priority-tag.p1 {
    background: rgba(255, 70, 70, 0.12);
}

.priority-tag.p2 {
    background: rgba(255, 170, 70, 0.12);
}

.priority-tag.p3 {
    background: rgba(0, 255, 255, 0.08);
}


/* =====================================================
   ACTION BUTTONS INSIDE TABLE
===================================================== */

.table-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table-btn {
    padding: 10px 14px;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s ease;
}

.table-btn.view {
    background: rgba(0,255,255,0.08);
    color: #7efcff;
}

.table-btn.review {
    background: rgba(255,179,71,0.10);
    color: #ffd78f;
}

.table-btn.reject {
    background: rgba(255,90,90,0.10);
    color: #ff9f9f;
}

.table-btn:hover {
    transform: translateY(-2px);
}


/* =====================================================
   SEARCH + FILTER TABLE BAR
===================================================== */

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.table-search {
    flex: 1;
    min-width: 240px;
}

.table-search input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: white;
}

.table-filters {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}


/* =====================================================
   PAGINATION
===================================================== */

.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 14px;
    opacity: 0.75;
}

.pagination-controls {
    display: flex;
    gap: 10px;
}

.pagination-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    color: white;
    cursor: pointer;
    transition: 0.3s ease;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: rgba(0,255,255,0.10);
}


/* =====================================================
   RESPONSIVE TABLE SUPPORT
===================================================== */

@media (max-width: 992px) {
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .table-filters {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .table-container {
        padding: 16px;
        border-radius: 18px;
    }

    table {
        min-width: 700px;
    }

    .table-pagination {
        flex-direction: column;
        align-items: flex-start;
    }
}