/**
 * SkinCenter Dashboard — tabla→tarjetas en móvil (<640px).
 *
 * Opt-in por tabla: <table class="data sc-cards"> y cada <td> del render lleva
 * data-label="Columna". Celdas sin data-label no muestran etiqueta; la primera
 * celda de cada fila actúa de título de la tarjeta. En escritorio no cambia nada.
 *
 *   <link rel="stylesheet" href="/lib/ui/table-cards.css">
 */
@media (max-width: 640px) {
  table.sc-cards { display: block; }
  table.sc-cards thead { display: none; }
  table.sc-cards tbody { display: block; }
  table.sc-cards tbody tr {
    display: block;
    border: 1px solid var(--sc-border, #e2e8f0);
    border-radius: 12px;
    background: var(--sc-card, #fff);
    margin-bottom: 10px;
    padding: 6px 0;
  }
  table.sc-cards tbody td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    text-align: right !important;
    padding: 3px 14px !important;
    border: none !important;
  }
  table.sc-cards tbody td::before {
    content: attr(data-label);
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sc-text-muted, #64748b);
    text-align: left;
    flex: none;
  }
  table.sc-cards tbody td:not([data-label])::before,
  table.sc-cards tbody td[data-label=""]::before { content: none; }
  table.sc-cards tbody td:first-child {
    justify-content: flex-start;
    text-align: left !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding-bottom: 6px !important;
    border-bottom: 1px dashed var(--sc-border, #e2e8f0) !important;
    margin-bottom: 2px;
  }
  table.sc-cards tbody td:empty { display: none; }
  /* filas colspan ("Cargando...", vacíos): tarjeta simple centrada */
  table.sc-cards tbody td[colspan] { justify-content: center; text-align: center !important; }
}
