/* Phase E – dense financial/customer tables become readable cards on small screens.
   Structural CSS only; desktop native table and all search/filter behavior remain. */
@media(max-width:1100px) {
 .bw-v18-app .admin-table-wrap:has(table.bw-v22-card-table){
   overflow:visible!important;width:100%;max-width:100%;border:0!important;
 }
 .bw-v18-app table.bw-v22-card-table {
   width:100%!important;max-width:100%!important;min-width:0!important;
   display:block!important;border:0!important;background:transparent!important;
   border-collapse:separate!important;table-layout:auto!important;
 }
 .bw-v18-app table.bw-v22-card-table thead{
   position:absolute!important;width:1px!important;height:1px!important;
   padding:0!important;margin:-1px!important;overflow:hidden!important;
   clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important;
 }
 .bw-v18-app table.bw-v22-card-table tbody{
   display:grid!important;width:100%!important;gap:12px;
 }
 .bw-v18-app table.bw-v22-card-table tbody tr{
   display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
   align-items:start;gap:13px 14px;max-width:100%!important;min-width:0!important;
   padding:16px!important;background:#fff!important;
   border:1px solid #dfe9ec!important;border-radius:9px!important;
   box-shadow:0 2px 9px #17384707;
 }
 .bw-v18-app table.bw-v22-card-table tbody tr>td{
   display:flex!important;flex-direction:column;align-items:flex-start;
   justify-content:flex-start;gap:4px;min-width:0!important;max-width:100%!important;
   width:auto!important;min-height:0!important;
   padding:0!important;margin:0!important;
   border:0!important;white-space:normal!important;
   word-break:normal!important;overflow-wrap:anywhere!important;
   text-align:left!important;font-size:14px!important;line-height:1.45!important;
   color:#294957!important;
 }
 .bw-v18-app table.bw-v22-card-table tbody tr>td::before{
   content:attr(data-label);
   display:block;min-height:15px;
   color:#587382;font-size:11px;font-weight:710;line-height:1.45;letter-spacing:.01em;
 }
 .bw-v18-app table.bw-v22-card-table tbody tr>td:first-child{
   grid-column:1/-1;font-size:15px!important;font-weight:740!important;color:#163747!important;
   padding-bottom:10px!important;border-bottom:1px solid #e8eff0!important;
 }
 .bw-v18-app table.bw-v22-card-table tbody tr>td[data-empty=true]{display:none!important}
 .bw-v18-app table.bw-v22-card-table tbody tr>td.bw-v22-card-actions{
   grid-column:1/-1!important;align-items:stretch;
   margin-top:2px!important;padding-top:9px!important;border-top:1px solid #edf2f3!important;
 }
 .bw-v18-app table.bw-v22-card-table tbody tr>td.bw-v22-card-actions::before{display:none}
 .bw-v18-app table.bw-v22-card-table tbody tr>td.bw-v22-card-actions>a,
 .bw-v18-app table.bw-v22-card-table tbody tr>td.bw-v22-card-actions>button{
   display:inline-flex;align-items:center;justify-content:center;min-height:44px;
   text-align:center;padding:10px 16px;border:1px solid #cadfe3;background:#f1f8f8;
   color:#076e7e!important;border-radius:7px;font-size:13px;font-weight:740;
   text-decoration:none!important;width:100%;
 }
 .bw-v18-app table.bw-v22-card-table tbody tr>td :is(a,button):focus-visible{
   outline:3px solid #3f9bb1!important;outline-offset:2px;
 }
 .bw-v18-app table.bw-v22-card-table tbody tr>td :is(.admin-badge,.bw-v21-status){
   max-width:100%;white-space:normal;overflow-wrap:anywhere;
 }
 .bw-v18-app table.bw-v22-card-table tbody tr:has(td[colspan]){
    display:block!important;min-height:80px;padding:18px!important;
 }
 .bw-v18-app table.bw-v22-card-table tbody tr>td[colspan]{
    display:block!important;border:0!important;padding:0!important;
 }
 .bw-v18-app table.bw-v22-card-table tbody tr>td[colspan]::before{display:none}
}
@media(max-width:420px){
 .bw-v18-app table.bw-v22-card-table tbody tr{gap:11px;padding:14px!important}
 .bw-v18-app table.bw-v22-card-table tbody tr>td:nth-child(n+2){
    font-size:13px!important;
 }
}
/* Customer names deserve equal prominence without forcing an extra tall card. */
@media(max-width:1100px){
 .bw-v18-app table.bw-v22-card-table:has(#customer-results) tbody tr>td:first-child{
   grid-column:1;line-height:1.35;border-bottom:0!important;padding-bottom:0!important;
 }
 .bw-v18-app table.bw-v22-card-table:has(#customer-results) tbody tr>td:nth-child(2){
   grid-column:2;color:#183c4d!important;font-weight:750!important;font-size:15px!important;
 }
 .bw-v18-app table.bw-v22-card-table:has(#customer-results) tbody tr>td:nth-child(4){
   grid-column:1/-1;
 }
}
