/* ================================================================
   table.css — data tables that collapse to cards on mobile
   ================================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--panel); -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data thead th {
  text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 600; padding: .7rem .9rem;
  background: var(--panel-alt); border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data tbody td { padding: .7rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--bg); }
table.data td.actions { text-align: right; white-space: nowrap; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data a.row-link { font-weight: 600; color: var(--dark); }

.line-items td, .line-items th { padding: .5rem .6rem; }
.line-items input, .line-items select { padding: .4rem .5rem; font-size: .85rem; margin-top: .25rem; }
.line-items .lt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

@media (max-width: 768px) {
  table.data.responsive thead { display: none; }
  table.data.responsive, table.data.responsive tbody, table.data.responsive tr, table.data.responsive td { display: block; width: 100%; }
  table.data.responsive tr {
    border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: var(--sp-md);
    padding: .3rem .2rem; background: var(--panel);
  }
  table.data.responsive td {
    border: none; display: flex; justify-content: space-between; gap: 1rem;
    padding: .45rem .8rem; text-align: right;
  }
  table.data.responsive td::before {
    content: attr(data-label); font-weight: 600; color: var(--muted);
    text-transform: uppercase; font-size: .72rem; letter-spacing: .03em; text-align: left;
  }
  table.data.responsive td.actions { justify-content: flex-end; }
  table.data.responsive td.actions::before { content: ''; }
}
