/* ==========================================================================
   Tables
   ========================================================================== */

.table {
    color: var(--text-primary);
}

.table thead th {
    background: var(--surface-secondary);
    color: #475569;
    font-weight: 600;
    font-size: var(--font-size-sm);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

[data-bs-theme="dark"] .table thead th {
    color: #cbd5e1;
}

.table tbody td {
    border-color: var(--border);
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: var(--surface-secondary);
}

.table-responsive {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
}

/* Compact action buttons inside grid cells */
.grid-view td .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.grid-view td .btn i {
    width: 16px;
    height: 16px;
}

/* Quiet row actions: no border until hover/focus. */
.app-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
}

.app-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.app-row-action i,
.app-row-action svg {
    width: 16px;
    height: 16px;
}

.app-row-action:hover,
.app-row-action:focus-visible {
    background: var(--surface-secondary);
    color: var(--text-primary);
    text-decoration: none;
}

.app-row-action-danger {
    color: var(--danger);
}

.app-row-action-danger:hover,
.app-row-action-danger:focus-visible {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
}

.app-row-actions-divider {
    width: 1px;
    height: 20px;
    margin: 0 2px;
    background: var(--border);
}

.grid-view td form.d-inline {
    margin: 0;
    display: inline-flex;
    vertical-align: middle;
}

.app-action-column {
    width: 136px;
    text-align: right;
    white-space: nowrap;
}