/* SpectsVista — Mobile card-layout for wide data tables (2026-06-19)
   Only applies to tables tagged `.sv-cards` by sv-table-cards.js (wide data
   tables, >3 columns, not Rx/totals/layout tables). On phones each row becomes
   a stacked card with the column header shown as a label before each value.
   Desktop/tablet (>640px) = ZERO change. */
@media (max-width: 640px) {
  table.sv-cards { display: block; width: 100%; border: 0; white-space: normal; overflow: visible; }
  table.sv-cards thead { position: absolute; left: -9999px; }   /* header row hidden; labels inline */
  table.sv-cards tbody { display: block; }
  table.sv-cards tbody tr {
    display: block;
    margin: 0 0 10px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 10px;
    padding: 6px 10px;
    background: var(--color-bg, #fff);
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
  }
  table.sv-cards tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border: 0;
    border-bottom: 1px dashed #eef2f7;
    text-align: right;
    white-space: normal;
    min-width: 0;
    font-size: 13px;
  }
  table.sv-cards tbody td:last-child { border-bottom: 0; }
  table.sv-cards tbody td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .02em;
  }
  table.sv-cards tbody td[data-label=""]::before { content: ""; }
  /* let action buttons / inputs inside a card cell stay usable */
  table.sv-cards tbody td > * { max-width: 58%; }
}
