/* جدول‌های کارتی در موبایل (static/js/table-cards.js) */
@media (max-width: 640px) {
  table.has-mobile-cards { min-width: 0 !important; width: 100% !important; border: 0 !important; background: transparent !important; }
  table.has-mobile-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.has-mobile-cards, table.has-mobile-cards tbody, table.has-mobile-cards tfoot,
  table.has-mobile-cards tr { display: block; }
  table.has-mobile-cards tr { margin: 0 0 10px; padding: 6px 12px; border: 1px solid #dce7ef; border-radius: 12px; background: #fff; box-shadow: 0 3px 10px rgba(16, 51, 77, .04); }
  table.has-mobile-cards tfoot tr { background: #eef5fa; border-color: #c9dceb; }
  table.has-mobile-cards td, table.has-mobile-cards tbody th, table.has-mobile-cards tfoot th {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    width: auto !important; min-width: 0 !important; max-width: none !important; padding: 6px 0 !important;
    border: 0 !important; border-bottom: 1px dashed #e6eef4 !important; background: transparent !important;
    text-align: left !important; white-space: normal !important; position: static !important;
  }
  table.has-mobile-cards td:last-child, table.has-mobile-cards th:last-child { border-bottom: 0 !important; }
  table.has-mobile-cards td[data-label]:not([data-label=""])::before,
  table.has-mobile-cards th[data-label]:not([data-label=""])::before {
    content: attr(data-label); flex: 0 1 45%; color: #6b7f8f; font-size: 0.8233rem; font-weight: 700; text-align: right;
  }
  table.has-mobile-cards td.tc-span, table.has-mobile-cards th.tc-span { display: block; text-align: right !important; font-weight: 900; color: #173a55; }
  table.has-mobile-cards td.tc-empty { display: none; }
  /* خانهٔ عنوانِ چندستونی (مثلاً «جمع») خودش عنوان است؛ برچسب تکراری کنارش نیاید («جمعجمع») */
  table.has-mobile-cards td.tc-span::before, table.has-mobile-cards th.tc-span::before { content: none !important; }
  :has(> table.has-mobile-cards) { overflow-x: visible !important; }
}
