/* C058: Deposit left, down payment right, invoice reference beside its checkbox. */
#crmBillingCard .crm-billing-summary{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:16px;align-items:stretch}
#crmBillingCard #crmDepositBox{grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:12px!important;margin:0;min-width:0}
#crmBillingCard .v186-deposit-check{justify-content:flex-start;white-space:normal}
#crmBillingCard .crm-billing-down-payment{display:grid;grid-template-columns:1fr;gap:12px;min-width:0}
#crmBillingCard .crm-billing-invoice{display:flex!important;flex-direction:row;align-items:center;flex-wrap:wrap;gap:12px;min-width:0}
#crmBillingCard .crm-billing-invoice-check{display:flex;align-items:center;gap:8px;margin:0;cursor:pointer;flex:0 0 auto;font-size:11px!important;white-space:nowrap}
#crmBillingCard .crm-billing-invoice-number{display:flex;align-items:center;gap:8px;flex:1 1 180px;min-width:0}
#crmBillingCard .crm-billing-invoice-number label{display:block;flex:0 0 auto;margin:0;font-size:11px!important;white-space:nowrap}
#crmBillingCard .crm-billing-invoice-number input[type="text"]{display:block;width:100%!important;min-width:120px!important;max-width:100%;height:38px!important;min-height:38px!important;flex:1 1 160px;margin:0!important;padding:8px 10px!important;font-size:13px!important;font-weight:600;color:#173f7e;background:#fff;border:1px solid #c9d6e8;border-radius:8px;cursor:text}
@media(max-width:760px){#crmBillingCard .crm-billing-summary{grid-template-columns:1fr}}
@media(max-width:480px){#crmBillingCard #crmDepositBox{grid-template-columns:1fr}}
#crmBillingCard[hidden],#crmBillingCard #crmBillingDownPaymentInvoiceBox[hidden]{display:none!important}

/* C061: preserve all columns; match Cases mobile table sizing. */
/* Match Cases: content-sized table, one-line names and horizontal scrolling. */
@media (max-width:1024px) {
  #crmProjectsView .crm-table-wrap {
    overflow-x:auto !important;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
  }
  #crmProjectsView table.crm-projects-proposal-table {
    width:max-content !important;
    min-width:100% !important;
    max-width:none !important;
    table-layout:auto !important;
  }
  #crmProjectsView table.crm-projects-proposal-table th:nth-child(n),
  #crmProjectsView table.crm-projects-proposal-table td:nth-child(n) {
    width:auto !important;
    max-width:none !important;
    white-space:nowrap !important;
  }
  #crmProjectsView table.crm-projects-proposal-table th:nth-child(1),
  #crmProjectsView table.crm-projects-proposal-table td:nth-child(1) { min-width:155px; }
  #crmProjectsView table.crm-projects-proposal-table th:nth-child(2),
  #crmProjectsView table.crm-projects-proposal-table td:nth-child(2) { min-width:125px; }
  #crmProjectsView table.crm-projects-proposal-table .crm-project-client,
  #crmProjectsView table.crm-projects-proposal-table .crm-project-name-link {
    width:auto !important;
    max-width:none !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }
}
