/* Afaq unified tables — Phase 3. Scoped to the existing /system layout. */
.afaq-system-body{
 --afaq-table-row-height:52px;
 --afaq-table-header-bg:#f5f8f7;
 --afaq-table-hover-bg:#fbfdfd;
 --afaq-table-divider:#e2eae7;
}
.afaq-system-body .afaq-table-wrap{
 width:100%;max-width:100%;min-width:0;
 overflow-x:auto;
 border:1px solid var(--afaq-table-divider);
 border-radius:var(--afaq-ui-radius-card);
 background:var(--afaq-ui-surface);
 overscroll-behavior-inline:contain;
 -webkit-overflow-scrolling:touch;
}
.afaq-system-body .afaq-table{
 width:100%;max-width:none;border-collapse:separate;border-spacing:0;
 margin:0;font-variant-numeric:tabular-nums;
}
.afaq-system-body .afaq-table thead th{
 background:var(--afaq-table-header-bg);
 color:var(--afaq-ui-text);
 font-size:.8rem;font-weight:800;line-height:1.55;
 padding:12px 14px;text-align:start;
 border-bottom:1px solid var(--afaq-table-divider);
 vertical-align:middle;
}
.afaq-system-body .afaq-table tbody td{
 padding:12px 14px;min-height:var(--afaq-table-row-height);
 line-height:1.65;text-align:start;vertical-align:middle;
 border-bottom:1px solid var(--afaq-table-divider);
}
.afaq-system-body .afaq-table tbody tr:last-child td{border-bottom:0;}
@media (hover:hover){.afaq-system-body .afaq-table tbody tr:hover td{background:var(--afaq-table-hover-bg);}}
.afaq-system-body .afaq-table :is(th,td) :is(a,button):focus-visible{
 outline:2px solid var(--afaq-ui-primary);outline-offset:2px;
}
.afaq-system-body .afaq-table .afaq-status{white-space:nowrap;}
.afaq-system-body .afaq-table td :is(.afaq-btn,.afaq-row-action){vertical-align:middle;}
.afaq-system-body .afaq-filter-bar{min-width:0;max-width:100%;}
.afaq-system-body .afaq-filter-bar > *{min-width:0;max-width:100%;}
.afaq-system-body .afaq-filter-bar :is(input,select,button){font:inherit;min-height:44px;}
.afaq-system-body .afaq-table-wrap :is([dir=ltr],.afaq-invoice-number,.afaq-qr-code){unicode-bidi:isolate;}
@media(max-width:767px){
 .afaq-system-body .afaq-table-wrap{max-width:100%;}
 .afaq-system-body .afaq-table{width:max-content;min-width:100%;}
 .afaq-system-body .afaq-table :is(th,td){padding:11px 12px;}
 .afaq-system-body .afaq-filter-bar{grid-template-columns:minmax(0,1fr);}
}
@media print{
 .afaq-system-body .afaq-table-wrap{overflow:visible;border-color:#ddd;}
 .afaq-system-body .afaq-table{width:100%;}
 .afaq-system-body .afaq-table thead{display:table-header-group;}
}
