/* 06-components/ledger — config/economy/spec table as console output.
   Monospace, aligned columns, gold figures for money. */
.c-ledger {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-chrome);
  font-size: var(--text-sm);
}
.c-ledger th,
.c-ledger td {
  text-align: left;
  padding: 0.4rem 0.7rem;
  border-bottom: 1px solid var(--rule);
}
.c-ledger th {
  color: var(--ink-dim);
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  font-weight: 400;
}
.c-ledger__num   { text-align: right; font-variant-numeric: tabular-nums; }
.c-ledger__money { text-align: right; font-variant-numeric: tabular-nums; color: var(--value); }

/* The name/identity cell of an admin row — the one an eye lands on first. Nowrap so
   a slug or title never wraps mid-scan and breaks the vertical rails; a code slug
   sits dim beneath the name. */
.c-ledger__name { white-space: nowrap; }
.c-ledger__name code { color: var(--ink-dim); }

/* A phone can't shrink a six-column ledger into legibility, so it scrolls the table
   horizontally inside its own frame — the numeric rails stay aligned rather than
   reflowing into a ragged stack. The wrapper is the scroll port. */
.c-ledger-wrap { overflow-x: auto; }

/* The trailing actions cell: edit/delete (and view) held on one baseline, pushed to
   the right where the operating hand expects them. Composes c-btn--sm ghosts;
   button_to destroys render as inline forms, not block. */
.c-ledger__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-xs);
}
.c-ledger__actions form { display: inline; margin: 0; }

/* The empty resource still reads as a table: one spanning line inside the frame,
   dim and centred, never a blank void. */
.c-ledger__empty {
  color: var(--ink-dim);
  text-align: center;
  padding-block: var(--space-lg);
}

/* Sortable headers (users) carry the sort as a link. The resting header is dim; the
   active column lifts to brand and shows its direction glyph (set in the view and
   mirrored by aria-sort on the th), so the sort never reads by colour alone. */
.c-ledger th a { color: var(--ink-dim); letter-spacing: inherit; }
.c-ledger th a:hover { color: var(--link); text-shadow: none; }
.c-ledger th[aria-sort] a { color: var(--brand); }
