﻿/* =========================================================
   RAPID HMS ENTERPRISE TABLES
   ========================================================= */

/* =========================================================
   TABLE WRAPPER
   ========================================================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 20px;
    background: white;
}

    /* SCROLLBAR */
    .table-responsive::-webkit-scrollbar {
        height: 6px;
    }

    .table-responsive::-webkit-scrollbar-thumb {
        background: rgba(148,163,184,.45);
        border-radius: 20px;
    }

/* =========================================================
   TABLE
   ========================================================= */

.table {
    width: 100%;
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
}

    /* =========================================================
   TABLE HEADER
   ========================================================= */

    .table thead {
        background: #f8fafc;
    }

    /* HEADER CELL */
    .table th {
        padding: 16px 18px;
        text-align: left;
        font-size: 13px;
        font-weight: 700;
        color: #475569;
        border-bottom: 1px solid #e2e8f0;
        white-space: nowrap;
        position: sticky;
        top: 0;
        z-index: 2;
        background: #f8fafc;
    }

        /* FIRST HEADER */
        .table th:first-child {
            border-top-left-radius: 18px;
        }

        /* LAST HEADER */
        .table th:last-child {
            border-top-right-radius: 18px;
        }

    /* =========================================================
   TABLE BODY
   ========================================================= */

    .table tbody tr {
        transition: background .2s ease, transform .15s ease;
    }

        /* HOVER */
        .table tbody tr:hover {
            background: #f8fafc;
        }

    /* CELL */
    .table td {
        padding: 15px 18px;
        font-size: 14px;
        color: #334155;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
        white-space: nowrap;
    }

    /* LAST ROW */
    .table tbody tr:last-child td {
        border-bottom: none;
    }

/* =========================================================
   TABLE USER INFO
   ========================================================= */

.table-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* AVATAR */
.table-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 12px;
    object-fit: cover;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #2563eb;
}

/* INFO */
.table-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* NAME */
.table-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

/* META */
.table-user-meta {
    font-size: 12px;
    color: #64748b;
}

/* =========================================================
   STATUS BADGES
   ========================================================= */

.table-badge {
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* SUCCESS */
.badge-success {
    background: #dcfce7;
    color: #15803d;
}

/* WARNING */
.badge-warning {
    background: #fef3c7;
    color: #d97706;
}

/* DANGER */
.badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

/* INFO */
.badge-info {
    background: #dbeafe;
    color: #2563eb;
}

/* SECONDARY */
.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* =========================================================
   TABLE ACTIONS
   ========================================================= */

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ACTION BUTTON */
.table-action-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s ease;
}

    /* HOVER */
    .table-action-btn:hover {
        background: #eff6ff;
        transform: translateY(-1px);
    }

/* =========================================================
   TABLE EMPTY
   ========================================================= */

.table-empty {
    padding: 60px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* =========================================================
   TABLE FOOTER
   ========================================================= */

.table-footer {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

/* =========================================================
   PAGINATION
   ========================================================= */

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* PAGE BUTTON */
.page-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s ease;
}

    /* HOVER */
    .page-btn:hover {
        background: #eff6ff;
        border-color: #bfdbfe;
    }

    /* ACTIVE */
    .page-btn.active {
        background: linear-gradient( 90deg, #2563eb, #3b82f6 );
        border-color: transparent;
        color: white;
    }

/* =========================================================
   MOBILE
   ========================================================= */

@media(max-width:992px) {

    .table {
        min-width: 700px;
    }

    .table-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .pagination {
        flex-wrap: wrap;
    }
}
