/* Opt-in business tables. Layout only; legacy grids and printed documents stay unchanged. */
.sheet-mobile-tools{display:none}
@media screen{
  .sheet-flex-columns{min-width:0;max-width:100%}
  .sheet-mobile-cards table.sheet td{line-height:1.45;vertical-align:middle}
  .sheet-mobile-cards table.sheet td[data-role="identity"]{white-space:normal;word-break:keep-all;overflow-wrap:break-word;padding:var(--space-2)}
  .sheet-mobile-cards table.sheet td[data-role="input"]{padding:var(--space-1) var(--space-2);overflow:visible}
  .sheet-mobile-cards table.sheet td[data-role="input"] :is(input:not([type=checkbox]),select){min-height:var(--control-h);height:var(--control-h);font-size:var(--text-base);background:var(--ui-input-bg);max-width:100%}
  .sheet-mobile-cards table.sheet th[data-c]{white-space:nowrap;word-break:keep-all;min-height:var(--control-h);height:var(--control-h);line-height:var(--control-h)}
  .sheet-mobile-cards table.sheet th[data-c] .af{height:var(--control-small);line-height:1;margin-top:3px}
  .sheet-mobile-cards table.sheet .sheet-row-details>td{white-space:normal;line-height:1.5;padding:var(--space-2) var(--space-3);height:auto;text-align:left;overflow:visible}
  .sheet-mobile-cards table.sheet .sheet-row-details .rn{background:var(--ui-surface)}
  .sheet-mobile-cards table.sheet .sheet-row-details summary{cursor:pointer;width:fit-content;color:var(--ui-muted)}
}
@media screen and (max-width:767px){
  .sheet-mobile-cards,.sheet-mobile-cards.sheet-wrap{overflow:visible;min-width:0;max-width:100%;border:0;flex:none;height:auto!important;max-height:none!important}
  .sheet-mobile-cards.ui-scrollable::before{display:none}
  .sheet-mobile-cards .sheet-mobile-tools{display:block;margin:var(--space-2) 0}
  .sheet-mobile-cards .sheet-mobile-filter-list{display:flex;flex-wrap:wrap;gap:var(--space-1);margin-top:var(--space-2)}
  .sheet-mobile-cards .sheet-mobile-filter-list .af{float:none;width:auto;height:auto;min-height:var(--control-touch);line-height:1.4;font-size:var(--text-base);padding:var(--space-2);margin:0}
  .sheet-mobile-cards .sheet-mobile-filter-list .af.on{background:var(--ui-selected);border-color:var(--ui-accent);color:var(--ui-text)}
  .sheet-mobile-cards table.sheet{display:block;width:100%!important;min-width:0!important;max-width:100%;table-layout:auto;border:0}
  .sheet-mobile-cards table.sheet>colgroup,.sheet-mobile-cards table.sheet>thead{display:none}
  .sheet-mobile-cards table.sheet>tbody{display:block;width:100%}
  .sheet-mobile-cards table.sheet tr[data-r]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-2);padding:var(--space-3) 0;border-top:1px solid var(--ui-border);width:100%;max-width:100%}
  .sheet-mobile-cards table.sheet tr>th.rn,.sheet-mobile-cards table.sheet tr>td:last-child:not([data-c]),.sheet-mobile-cards table.sheet tr.filler{display:none}
  .sheet-mobile-cards table.sheet tr>td[data-c]{position:static;left:auto;z-index:auto;display:block;width:auto;min-width:0;height:auto;border:0;padding:0;white-space:normal;overflow:visible;overflow-wrap:anywhere;text-align:left;line-height:1.45;background:transparent}
  .sheet-mobile-cards table.sheet td[data-c]::before{content:attr(data-label);display:block;color:var(--ui-muted);font-size:var(--text-small);font-weight:400;margin-bottom:var(--space-1)}
  .sheet-mobile-cards table.sheet td[data-role="identity"]{grid-column:1/-1;order:0;font-weight:600}
  .sheet-mobile-cards table.sheet td[data-role="context"]{order:1}
  .sheet-mobile-cards table.sheet td[data-role="metric"]{order:2;font-variant-numeric:tabular-nums}
  .sheet-mobile-cards table.sheet td[data-role="input"]{order:3}
  .sheet-mobile-cards table.sheet td[data-role="detail"]{grid-column:1/-1;order:4}
  .sheet-mobile-cards table.sheet td[data-role="action"]{grid-column:1/-1;order:5}
  .sheet-mobile-cards table.sheet td[data-label=""]::before{display:none}
  .sheet-mobile-cards table.sheet td[data-c] :is(input:not([type=checkbox]),select,textarea){height:var(--control-touch);min-height:var(--control-touch);width:100%;max-width:100%;font-size:var(--text-input-touch);background:var(--ui-input-bg)}
  .sheet-mobile-cards table.sheet :is(button,summary,a){min-height:var(--control-touch)}
  .sheet-mobile-cards table.sheet button{display:inline-flex;align-items:center;justify-content:center;white-space:normal;height:auto;line-height:1.4}
  .sheet-mobile-cards table.sheet summary{display:flex;align-items:center}
  .sheet-mobile-cards table.sheet tr.sheet-row-details{display:block;width:100%;padding:0 0 var(--space-3);border:0}
  .sheet-mobile-cards table.sheet tr.sheet-row-details>td[colspan]{position:static;display:block;width:100%;height:auto;padding:0;white-space:normal;border:0;overflow:visible;line-height:1.5}
}
@media print{.sheet-mobile-tools,.sheet-row-details{display:none!important}}
