/* ShahrVam v764 — reconciliation filter-bar layout root fix
   Root cause: v628 desktop toolbar defined three grid tracks although the middle
   filter-trigger is display:none above 900px. The unused third track still kept
   a 420px minimum width, while .pv-filters used a no-wrap horizontal scroller
   with hidden scrollbar. On common desktop widths this pushed several status
   filters outside the visible toolbar, making them look missing/cut off.
   This layer changes presentation only. No workflow, API, permission or DB logic. */

/* Wide desktop: exactly two real columns — search + all status filters. */
@media (min-width:1251px){
  body[data-page="reconciliation"] .pv-toolbar-v628{
    grid-template-columns:minmax(300px,380px) minmax(0,1fr)!important;
    grid-auto-columns:unset!important;
    column-gap:9px!important;
    row-gap:7px!important;
  }
  body[data-page="reconciliation"] .pv-search{
    grid-column:1!important;
    min-width:0!important;
    width:100%!important;
  }
  body[data-page="reconciliation"] .pv-filter-trigger{
    display:none!important;
  }
  body[data-page="reconciliation"] .pv-filters{
    grid-column:2!important;
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
    flex-wrap:wrap!important;
    justify-content:flex-start!important;
    align-content:center!important;
  }
}

/* Medium desktop/tablet landscape: put filters on their own complete row.
   Never hide half of the filter set behind a scrollbar. */
@media (min-width:901px) and (max-width:1250px){
  body[data-page="reconciliation"] .pv-toolbar-v628{
    grid-template-columns:minmax(250px,380px) minmax(0,1fr)!important;
    row-gap:7px!important;
  }
  body[data-page="reconciliation"] .pv-search{
    grid-column:1/-1!important;
    min-width:0!important;
    width:100%!important;
  }
  body[data-page="reconciliation"] .pv-filter-trigger{
    display:none!important;
  }
  body[data-page="reconciliation"] .pv-filters{
    grid-column:1/-1!important;
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
    flex-wrap:wrap!important;
    justify-content:flex-start!important;
  }
}

/* Mobile behavior remains the existing collapsible filter control. */
@media (max-width:900px){
  body[data-page="reconciliation"] .pv-filters.is-open{
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
    flex-wrap:wrap!important;
  }
}
