/* ── Table card ── */
.table-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.table-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
}

.table-card-header strong {
    font-size: 13px;
    font-weight: 600;
    color: #111;
}

.table-card-header span {
    font-size: 12px;
    color: #aaa;
}

/* ── Table ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead tr {
    background: #fafafa;
    border-bottom: 1px solid #e5e5e5;
}

.data-table th {
    padding: 9px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.1s;
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table td {
    padding: 10px 14px;
    font-size: 13px;
    color: #1a1a1a;
}

.td-code {
    font-family: 'SF Mono', 'Fira Code',
                 'Courier New', monospace;
    font-size: 12px;
    color: #555;
}

.td-muted {
    color: #888;
    font-size: 13px;
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-active    { background: #f0fdf4; color: #15803d; }
.badge-inactive  { background: #f3f4f6; color: #6b7280; }
.badge-system    { background: #f1f8e9; color: #2e7d32; }
.badge-draft     { background: #fefce8; color: #92400e; }
.badge-posted    { background: #f0fdf4; color: #15803d; }
.badge-cancelled { background: #fef2f2; color: #991b1b; }
.badge-pending   { background: #fff7ed; color: #c2410c; }
.badge-reopened  { background: #fff7ed; color: #c2410c; }

/* ── Status text ── */
.status-active   { color: #15803d; font-weight: 500; }
.status-inactive { color: #dc2626; font-weight: 500; }
.status-yes      { color: #15803d; }
.status-no       { color: #aaa; }
.status-debit    { color: #1d4ed8; font-weight: 500; }
.status-credit   { color: #7c3aed; font-weight: 500; }

/* ── Table actions ── */
.table-actions a {
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    margin-right: 10px;
}

.action-edit          { color: #2e7d32; }
.action-edit:hover    { text-decoration: underline; }
.action-delete        { color: #dc2626; }
.action-delete:hover  { text-decoration: underline; }

/* ── Empty state ── */
.table-empty {
    padding: 48px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

.table-empty a {
    color: #2e7d32;
    font-weight: 500;
    text-decoration: none;
}

/* ── Info bar ── */
.table-info-bar {
    padding: 10px 16px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #888;
}

/* ── Filter label ── */
.filter-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}
