/* AquaFlow V34.2.29 — Debt Action Row Fix
   1) Lock Công nợ phải thu + Thêm nợ + Thu nợ onto one header row.
   2) Lock Chi tiết + Xem lại QR + Thu nợ onto one card action row.
   This layer is intentionally loaded after SePay + V34.2.28 debt UI rules. */

#debts .debt-page-head-new.debt-enterprise-head-v34228{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  justify-content:stretch!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  min-height:58px!important;
  margin:0 0 10px!important;
  padding:0!important;
  flex-direction:row!important;
}
#debts .debt-head-brand-v34228{
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr)!important;
  align-items:center!important;
  gap:7px!important;
  min-width:0!important;
  width:auto!important;
}
#debts .debt-head-logo-v34228{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  flex-basis:38px!important;
  border-radius:11px!important;
  font-size:18px!important;
}
#debts .debt-head-brand-v34228>div{min-width:0!important}
#debts .debt-head-brand-v34228 small{
  margin:0 0 2px!important;
  font-size:8px!important;
  line-height:1!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
#debts .debt-head-brand-v34228 h2{
  margin:0!important;
  font-size:20px!important;
  line-height:1.06!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
#debts .debt-head-brand-v34228 p{display:none!important}
#debts .debt-head-actions-v34228{
  display:grid!important;
  grid-template-columns:auto auto!important;
  align-items:center!important;
  justify-content:end!important;
  gap:6px!important;
  min-width:0!important;
  width:auto!important;
  flex:0 0 auto!important;
}
#debts .debt-head-actions-v34228 .btn{
  width:auto!important;
  min-width:0!important;
  min-height:40px!important;
  height:40px!important;
  margin:0!important;
  padding:0 11px!important;
  border-radius:11px!important;
  font-size:10.5px!important;
  line-height:1!important;
  white-space:nowrap!important;
}

/* Old sepay.css explicitly spans the QR button across all columns.
   Reset that here with higher specificity and a physical last-loaded file. */
body.unified-shell #debts #debt-list .debt-card-v34228 > .debt-card-actions-v34228,
body.management-mode #debts #debt-list .debt-card-v34228 > .debt-card-actions-v34228,
body.staff-mode #debts #debt-list .debt-card-v34228 > .debt-card-actions-v34228,
body[data-role="staff"] #debts #debt-list .debt-card-v34228 > .debt-card-actions-v34228{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  align-items:stretch!important;
  justify-items:stretch!important;
  gap:7px!important;
  width:100%!important;
  min-width:0!important;
  margin:10px 0 0!important;
}
body.unified-shell #debts #debt-list .debt-card-actions-v34228 > .mini-btn,
body.unified-shell #debts #debt-list .debt-card-actions-v34228 > .btn,
body.management-mode #debts #debt-list .debt-card-actions-v34228 > .mini-btn,
body.management-mode #debts #debt-list .debt-card-actions-v34228 > .btn,
body.staff-mode #debts #debt-list .debt-card-actions-v34228 > .mini-btn,
body.staff-mode #debts #debt-list .debt-card-actions-v34228 > .btn,
body[data-role="staff"] #debts #debt-list .debt-card-actions-v34228 > .mini-btn,
body[data-role="staff"] #debts #debt-list .debt-card-actions-v34228 > .btn{
  grid-column:auto!important;
  grid-row:auto!important;
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;
  height:42px!important;
  margin:0!important;
  padding:0 6px!important;
  border-radius:11px!important;
  font-size:10px!important;
  line-height:1!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.unified-shell #debts #debt-list .debt-card-actions-v34228 > .sepay-reopen-button,
body.management-mode #debts #debt-list .debt-card-actions-v34228 > .sepay-reopen-button,
body.staff-mode #debts #debt-list .debt-card-actions-v34228 > .sepay-reopen-button,
body[data-role="staff"] #debts #debt-list .debt-card-actions-v34228 > .sepay-reopen-button{
  grid-column:auto!important;
  width:100%!important;
  margin:0!important;
  white-space:nowrap!important;
}
#debts #debt-list .debt-card-actions-v34228 > .sepay-reopen-button::before{
  content:"▦";
  margin-right:5px;
  font-size:11px;
}

@media(max-width:430px){
  #debts .debt-page-head-new.debt-enterprise-head-v34228{
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:6px!important;
    min-height:54px!important;
  }
  #debts .debt-head-brand-v34228{grid-template-columns:34px minmax(0,1fr)!important;gap:6px!important}
  #debts .debt-head-logo-v34228{width:34px!important;height:34px!important;min-width:34px!important;flex-basis:34px!important;border-radius:10px!important;font-size:16px!important}
  #debts .debt-head-brand-v34228 small{font-size:7.4px!important;letter-spacing:.08em!important}
  #debts .debt-head-brand-v34228 h2{font-size:18px!important;letter-spacing:-.035em!important}
  #debts .debt-head-actions-v34228{gap:5px!important}
  #debts .debt-head-actions-v34228 .btn{height:38px!important;min-height:38px!important;padding:0 8px!important;font-size:9.4px!important;border-radius:10px!important}
  body.unified-shell #debts #debt-list .debt-card-actions-v34228 > .mini-btn,
  body.unified-shell #debts #debt-list .debt-card-actions-v34228 > .btn,
  body.management-mode #debts #debt-list .debt-card-actions-v34228 > .mini-btn,
  body.management-mode #debts #debt-list .debt-card-actions-v34228 > .btn,
  body.staff-mode #debts #debt-list .debt-card-actions-v34228 > .mini-btn,
  body.staff-mode #debts #debt-list .debt-card-actions-v34228 > .btn,
  body[data-role="staff"] #debts #debt-list .debt-card-actions-v34228 > .mini-btn,
  body[data-role="staff"] #debts #debt-list .debt-card-actions-v34228 > .btn{
    min-height:40px!important;
    height:40px!important;
    padding:0 4px!important;
    font-size:9.2px!important;
  }
}

@media(max-width:370px){
  #debts .debt-head-logo-v34228{display:none!important}
  #debts .debt-head-brand-v34228{grid-template-columns:minmax(0,1fr)!important}
  #debts .debt-head-brand-v34228 small{display:none!important}
  #debts .debt-head-brand-v34228 h2{font-size:17.5px!important}
  #debts .debt-head-actions-v34228 .btn{padding:0 7px!important;font-size:9px!important}
  body.unified-shell #debts #debt-list .debt-card-actions-v34228 > .mini-btn,
  body.unified-shell #debts #debt-list .debt-card-actions-v34228 > .btn{font-size:8.7px!important}
}
