/* ⭐ v187/3 — «جدولِ دفتر» (ledger_table): همان خانواده‌ی ax_tables.css؛ فقط چیدمانِ صفحه + سلول‌ها.
 * صفحه هرگز افقی اسکرول نمی‌شود — فقط خودِ جدول؛ سرستون چسبان؛ کد و تاریخ یک‌خطی؛ عدد tabular. */
.ax-ledger-page { font-size: 13px; }
.ax-ledger-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ax-ledger-head h2 { margin: 0; font-size: 18px; }
.ax-ledger-back { font-size: 12px; color: #8A6A22; }
.ax-ledger-exports { display: flex; gap: 6px; flex-wrap: wrap; }
.ax-ledger-cards { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ax-card { border: 1px solid #E3D9C5; border-radius: 10px; padding: 8px 12px; background: var(--ax-table-surface, #fff); min-width: 140px; }
.ax-card span { display: block; font-size: 11px; color: #5a6270; }
.ax-card b { font-size: 15px; }
.ax-card em { font-style: normal; font-size: 11px; color: #8A6A22; margin-inline-start: 4px; }
.ax-card-main { border-color: #C9A14A; }
.ax-ledger-active { font-size: 12px; margin: 6px 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ax-pill { background: #FBF8F1; border: 1px solid #E3D9C5; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.ax-ledger-note { font-size: 12px; color: #5a6270; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.ax-ledger-body { display: flex; gap: 12px; align-items: flex-start; }
.ax-ledger-filter { flex: 0 0 230px; border: 1px solid #E3D9C5; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 8px; max-height: 88vh; overflow-y: auto; background: var(--ax-table-surface, #fff); }
.ax-ledger-filter h3 { margin: 0 0 4px; font-size: 13px; }
.ax-ledger-filter label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.ax-ledger-filter input:not([type=checkbox]):not([type=radio]) { padding: 5px 6px; border: 1px solid #d1d5db; border-radius: 6px; font-family: inherit; }
.ax-ledger-filter fieldset { border: 1px solid #eee; border-radius: 8px; padding: 4px 8px; max-height: 180px; overflow-y: auto; }
.ax-ledger-filter legend { font-size: 12px; font-weight: 700; }
.ax-check { flex-direction: row !important; align-items: center; gap: 6px !important; }
.ax-ledger-shortcuts { display: flex; flex-wrap: wrap; gap: 4px; }
.ax-ledger-shortcuts a { font-size: 11px; border: 1px solid #E3D9C5; border-radius: 999px; padding: 1px 8px; text-decoration: none; color: #8A6A22; }
.ax-ledger-shortcuts a.on { background: #20293A; color: #fff; border-color: #20293A; }
.ax-ledger-scroll { flex: 1 1 auto; min-width: 0; max-height: 80vh; overflow: auto; }
table.ax-ledger { width: 100%; border-collapse: collapse; }
table.ax-ledger thead th { position: sticky; top: 0; z-index: 5; background: #20293A; color: #fff; }
table.ax-ledger thead th a { color: #fff; text-decoration: none; }
table.ax-ledger td.ax-num, table.ax-ledger th.ax-num { text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.ax-ledger td.ax-nowrap { white-space: nowrap; }
table.ax-ledger td.ax-desc { max-width: 38ch; white-space: normal; overflow-wrap: anywhere; }
table.ax-ledger .ax-cp { font-size: 11px; color: #5a6270; }
table.ax-ledger .ax-type { border-radius: 999px; padding: 1px 8px; font-size: 11px; white-space: nowrap; }
table.ax-ledger .ax-bal { font-style: normal; font-size: 10.5px; color: #8A6A22; }
table.ax-ledger tr.ax-ledger-opening td { background: #FBF7EF; font-weight: 700; }
table.ax-ledger tfoot td { position: sticky; bottom: 0; background: #F3EAD6; font-weight: 800; }
table.ax-ledger tr[data-href] { cursor: pointer; }
table.ax-ledger .ax-empty { text-align: center; color: #5a6270; padding: 18px; }
.ax-ledger-pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 10px 0; font-size: 12px; }
/* کوچک: صافی بالای جدول، نه کنارش — بی اسکرولِ افقیِ صفحه */
@media (max-width: 900px) {
  .ax-ledger-body { flex-direction: column; }
  .ax-ledger-filter { position: static; flex: 1 1 auto; width: 100%; max-height: none; }
  .ax-ledger-scroll { width: 100%; }
}
/* جدول‌های کوچکِ درونِ کارت/فرم (v187/4): همان ظاهر، بی‌صافی */
table.ax-std-table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
table.ax-std-table th { background: #20293A; color: #fff; padding: 4px 8px; text-align: right; position: sticky; top: 0; }
table.ax-std-table td { padding: 3px 8px; border-bottom: 1px solid #f0ebe0; }
table.ax-std-table td.ax-num, table.ax-std-table th.ax-num { text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.ax-std-table td.ax-nowrap { white-space: nowrap; }
table.ax-std-table tfoot td { background: #F3EAD6; font-weight: 800; }
.ax-card-summary { font-size: 12px; margin: 4px 0; display: flex; gap: 6px; flex-wrap: wrap; }
