/* CUEVA Credit Accounts v702 — Settings-aware repayments and redesigned ledger. */
@media(max-width:820px){
  #creditPaymentMethod[hidden],#creditLedgerFilter[hidden]{display:none!important}
  #creditDetailModal.payment-mode .credit-payment-form label:nth-of-type(1),
  #creditDetailModal.payment-mode .credit-payment-form label:nth-of-type(2){grid-column:1/-1!important}
  .credit-payment-method-grid{
    display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:8px;width:100%
  }
  .credit-payment-method-grid button{
    position:relative;display:flex;min-width:0;min-height:52px;align-items:center;justify-content:flex-start;gap:8px;
    padding:0 11px;border:1px solid #dfe1e5;border-radius:14px;background:#fff;color:#666a72;
    font:inherit;font-size:10px;font-weight:800;text-align:left
  }
  .credit-payment-method-grid button>i:first-child{display:grid;width:27px;height:27px;flex:0 0 27px;place-items:center;border-radius:9px;background:#f1f2f4;color:#737780;font-size:10px}
  .credit-payment-method-grid button span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .credit-payment-method-grid button.selected{border-color:#bd963a;background:#faf5e8;color:#73591c;box-shadow:0 4px 12px rgba(155,113,23,.06)}
  .credit-payment-method-grid button.selected>i:first-child{background:#f1e5c5;color:#8b691d}
  .credit-payment-method-check{display:none;margin-left:auto;font-size:9px}.credit-payment-method-grid button.selected .credit-payment-method-check{display:block}
  .credit-payment-method-empty{
    grid-column:1/-1;display:flex;align-items:flex-start;gap:8px;padding:11px 12px;border:1px solid #efd7d3;
    border-radius:13px;background:#fdf3f1;color:#a54b40;font-size:9px;line-height:1.4;font-weight:750
  }

  #creditDetailModal.account-mode .credit-ledger-panel{padding:14px!important}
  #creditDetailModal.account-mode .credit-section-title{display:block!important;padding-bottom:11px;border-bottom:1px solid #eceef0}
  .credit-ledger-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:11px}
  .credit-ledger-filter-grid button{
    display:flex;min-width:0;min-height:38px;align-items:center;justify-content:center;gap:5px;padding:0 7px;
    border:1px solid #e0e2e5;border-radius:11px;background:#fff;color:#767980;font:inherit;font-size:8px;font-weight:800
  }
  .credit-ledger-filter-grid button i{font-size:8px}.credit-ledger-filter-grid button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .credit-ledger-filter-grid button.selected{border-color:#b99339;background:#f8f1e2;color:#785c1a}

  #creditLedger.credit-ledger{gap:8px!important;margin-top:11px!important}
  #creditLedger .credit-ledger-row{
    display:grid!important;grid-template-columns:38px minmax(0,1fr) auto!important;grid-template-rows:auto!important;gap:10px!important;
    align-items:center!important;padding:12px!important;border:1px solid #e2e4e7!important;border-radius:15px!important;background:#fff!important
  }
  #creditLedger .credit-ledger-icon{
    grid-column:1!important;grid-row:1!important;display:grid!important;width:38px;height:38px;place-items:center;
    border-radius:12px;background:#fff0ed;color:#b23e33;font-size:11px
  }
  #creditLedger .credit-ledger-row.payment .credit-ledger-icon{background:#eaf7ee;color:#317c4b}
  #creditLedger .credit-ledger-row.adjustment .credit-ledger-icon{background:#faf2df;color:#91701f}
  #creditLedger .credit-ledger-content{grid-column:2!important;grid-row:1!important;display:grid!important;min-width:0!important}
  #creditLedger .credit-ledger-title-row{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;min-width:0}
  #creditLedger .credit-ledger-title-row>strong{overflow:hidden;color:#282a2f!important;font-size:10px!important;font-weight:850!important;text-overflow:ellipsis;white-space:nowrap}
  #creditLedger .credit-ledger-title-row time{flex:0 0 auto;color:#9a9da3;font-size:7px;font-weight:650;white-space:nowrap}
  #creditLedger .credit-ledger-content p{margin:4px 0 0;overflow:hidden;color:#6f737a;font-size:9px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
  #creditLedger .credit-ledger-meta{margin-top:4px!important;overflow:hidden!important;color:#a0a3a9!important;font-size:7px!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  #creditLedger .credit-ledger-amount{
    grid-column:3!important;grid-row:1!important;align-self:center!important;color:#b23e33!important;font-size:12px!important;font-weight:900!important;white-space:nowrap!important
  }
  #creditLedger .credit-ledger-row.payment .credit-ledger-amount{color:#317c4b!important}
  #creditLedger .credit-ledger-row.adjustment .credit-ledger-amount{color:#91701f!important}
}

@media(max-width:430px){
  .credit-ledger-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  #creditLedger .credit-ledger-row{grid-template-columns:36px minmax(0,1fr)!important}
  #creditLedger .credit-ledger-icon{width:36px;height:36px}
  #creditLedger .credit-ledger-amount{grid-column:2!important;grid-row:2!important;justify-self:start!important;margin-top:1px}
}
