/* ============================================================
   Security App - Table Styles
   File: public/assets/css/tables.css

   PURPOSE
   ------------------------------------------------------------
   Table wrappers, data tables, badges, empty states,
   pagination, and small admin list components.
   ============================================================ */

.table-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.table th,
.table td {
    padding: 0.85rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e9eef4;
}

.table th {
    background: #f8fbfe;
    color: var(--color-text);
    font-weight: 600;
    white-space: nowrap;
}

.table tbody tr:hover {
    background: #fbfdff;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table--compact th,
.table--compact td {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.table-meta {
    color: var(--color-text-soft);
    font-size: 0.86rem;
}

.cell-muted {
    color: var(--color-text-soft);
}

/* ============================================================
   BADGES / STATUS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}

.badge-success {
    background: #e8f7ee;
    color: #146c43;
}

.badge-danger {
    background: #fdecee;
    color: #b42318;
}

.badge-warning {
    background: #fff7e6;
    color: #9a6700;
}

.badge-info {
    background: #e9f7fd;
    color: #055160;
}

.badge-secondary {
    background: #eef2f6;
    color: #475569;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--color-text-soft);
}

.empty-state__title {
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
    color: var(--color-text);
}

.empty-state__text {
    margin: 0;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid var(--color-border);
    background: #fcfdff;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--color-text);
    text-decoration: none;
}

.pagination a:hover {
    background: #f1f5f9;
    text-decoration: none;
}

.pagination .is-active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ============================================================
   DESCRIPTION LIST / KEY VALUE TABLES
   ============================================================ */
.kv-table {
    width: 100%;
    border-collapse: collapse;
}

.kv-table th,
.kv-table td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid #e9eef4;
    text-align: left;
    vertical-align: top;
}

.kv-table th {
    width: 220px;
    background: #f8fbfe;
    font-weight: 600;
    color: var(--color-text);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
    .table {
        min-width: 640px;
    }
}