/* ==========================================================
   Counter Doodle — Table
   ========================================================== */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-md);
}

.table th {
    padding: var(--space-8) var(--space-12);
    background: var(--color-surface-alt);
    border-bottom: var(--border-width) solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-bold);
    text-align: left;
    white-space: nowrap;
}

.table th:first-child { border-top-left-radius: var(--radius-sm); }
.table th:last-child { border-top-right-radius: var(--radius-sm); }

.table td {
    height: var(--table-row-height);
    padding: var(--space-6) var(--space-12);
    border-bottom: var(--border-width) solid var(--color-border);
    color: var(--color-text);
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}

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

.table tbody tr:hover td {
    background: var(--color-table-row-hover);
}

.table-empty {
    height: auto !important;
    padding: var(--space-36) var(--space-16) !important;
    text-align: center;
    color: var(--color-text-muted);
}

.table-wrap {
    overflow-x: auto;
}

.link-strong {
    font-weight: var(--font-bold);
    color: var(--color-text);
    cursor: pointer;
}

.link-strong:hover {
    color: var(--color-primary);
}

.table td .btn-icon + form,
.table td .btn-icon {
    vertical-align: middle;
}

/* baris form yang muncul di bawah baris data (ubah cepat) */
.table tr.row-form td {
    background: var(--color-surface-alt);
}

/* angka (kolom rata kanan) tidak terlipat: "Rp 156.500" tetap satu baris */
.table td.text-right,
.table th.text-right,
.table .tfoot-val {
    white-space: nowrap;
}
