/* Mobile presentation for data-heavy screens. Desktop tables remain unchanged. */
@media (max-width:650px){
  .mobile-card-wrap{
    overflow:visible!important;
    padding:10px 12px 14px;
    background:#f5f7fa;
  }
  table.mobile-card-table{
    display:block;
    width:100%;
    min-width:0!important;
    border-collapse:separate;
  }
  .mobile-card-table thead{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:-1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
    border:0!important;
  }
  .mobile-card-table tbody{
    display:grid;
    gap:12px;
    width:100%;
  }
  .mobile-card-table tbody tr{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
    overflow:hidden;
    background:#fff;
    border:1px solid #dfe5ec;
    border-radius:12px;
    box-shadow:0 4px 14px rgba(20,38,61,.055);
  }
  .mobile-card-table tbody td{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    padding:10px 12px!important;
    border:0!important;
    border-right:1px solid #edf0f4!important;
    border-bottom:1px solid #edf0f4!important;
    color:#263b54;
    text-align:left;
    overflow-wrap:anywhere;
  }
  .mobile-card-table tbody td:nth-child(even){border-right:0!important}
  .mobile-card-table tbody td:first-child,
  .mobile-card-table tbody td:last-child{grid-column:1/-1;border-right:0!important}
  .mobile-card-table tbody td:last-child{border-bottom:0!important}
  .mobile-card-table tbody td::before{
    content:attr(data-mobile-label);
    display:block;
    color:#68798e;
    font-size:9px;
    font-weight:700;
    line-height:1.35;
    letter-spacing:.35px;
    text-align:left;
    text-transform:uppercase;
    margin-bottom:5px;
  }
  .mobile-card-table tbody td:first-child{
    padding-top:12px!important;
    padding-bottom:12px!important;
    background:#fbfcfd;
  }
  .mobile-card-table tbody td:first-child strong{font-size:13px;color:#1e334c}
  .mobile-card-table tbody td>*{max-width:100%}
  .mobile-card-table tbody td .person{text-align:left}
  .mobile-card-table tbody td .person>div{min-width:0}
  .mobile-card-table tbody td .person small{white-space:normal}
  .mobile-card-table .badge{white-space:normal;text-align:center}
  .mobile-card-table input,.mobile-card-table select{max-width:170px}
  .mobile-card-table .inventory-actions,
  .mobile-card-table .inline-actions,
  .mobile-card-table .client-row-actions{
    justify-content:stretch;
    flex-wrap:wrap;
  }
  .mobile-card-table .inventory-actions button,
  .mobile-card-table .inline-actions button,
  .mobile-card-table .client-row-actions button{
    min-height:38px;
    flex:1 1 90px;
  }
  .mobile-card-table .inventory-actions .row-action,
  .mobile-card-table .inline-actions .row-action{
    border:1px solid #dfe3e9;
    background:#f7f8fa;
    padding:7px 8px;
    color:#445970;
  }
  .inventory-table tbody tr:has(td[data-mobile-label="SITUAÇÃO"]){grid-template-columns:minmax(0,1.25fr) minmax(112px,.75fr)}
  .inventory-table tbody tr:has(td[data-mobile-label="SITUAÇÃO"]) td[data-mobile-label="PRODUTO"],
  .inventory-table tbody tr:has(td[data-mobile-label="SITUAÇÃO"]) td[data-mobile-label="PRODUTO / LOTE"]{
    grid-column:1;
    grid-row:1;
    border-right:1px solid #edf0f4!important;
  }
  .inventory-table tbody tr:has(td[data-mobile-label="SITUAÇÃO"]) td[data-mobile-label="SITUAÇÃO"]{
    grid-column:2;
    grid-row:1;
    display:flex!important;
    align-items:center;
    justify-content:center;
    padding:10px!important;
    background:#fbfcfd;
    border-right:0!important;
  }
  .inventory-table tbody tr:has(td[data-mobile-label="SITUAÇÃO"]) td[data-mobile-label="SITUAÇÃO"]::before{content:none}
  .inventory-table tbody tr:has(td[data-mobile-label="SITUAÇÃO"]) td[data-mobile-label="REPOSIÇÃO"]{grid-column:1/-1;border-right:0!important}
  .inventory-table tbody tr:has(td[data-mobile-label="SITUAÇÃO"]) td[data-mobile-label="AÇÕES"]{grid-column:1/-1}
  .mobile-card-table td.mobile-table-full{
    display:block!important;
    padding:28px 18px!important;
    text-align:center;
  }
  .mobile-card-table td.mobile-table-full::before{content:none}
  .mobile-card-table td.mobile-table-full .empty{padding:0}
  .inventory-details-section .mobile-card-wrap{max-height:none}
  .tablefoot{gap:8px;align-items:flex-start;flex-wrap:wrap;padding-inline:14px}
}
