#customerInvoiceDialog,#invoicePaymentDialog{width:min(820px,92vw);max-height:88vh;overflow:auto;box-sizing:border-box;border:1px solid #bdd0c4;border-radius:16px;padding:24px;color:#18372c}
#customerInvoiceForm label,#invoicePaymentDialog label{display:flex;flex-direction:column;gap:6px;margin:12px 0}
#customerInvoiceForm input,#customerInvoiceForm textarea,#customerInvoiceForm select,#invoicePaymentDialog input{max-width:100%;box-sizing:border-box}
#customerInvoiceForm .invoice-item-row{display:grid;grid-template-columns:minmax(0,1fr) 90px 130px auto;align-items:center;gap:12px;border-bottom:1px solid #bdd0c4}
#invoicePaymentDialog label:has([type=checkbox]){flex-direction:row;align-items:center}
#customerInvoices small{overflow-wrap:anywhere}
@media(max-width:640px){#customerInvoiceForm .invoice-item-row{grid-template-columns:1fr 1fr}#customerInvoiceForm .invoice-item-row label:first-child{grid-column:1/-1}#customerInvoiceForm .customer-form-grid{grid-template-columns:1fr}}

/* Invoice cards have no job thumbnail; use the full card width for actions. */
#customerInvoices .crm-history-card{padding:18px;min-width:0}
#customerInvoices .customer-actions{display:flex;flex-wrap:wrap;align-items:stretch;gap:10px;margin-top:12px}
#customerInvoices .customer-actions>button,#customerInvoices .customer-actions>a{box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex:0 1 auto;min-width:0;max-width:100%;min-height:44px;width:auto;padding:12px 16px;border-radius:10px;font:inherit;font-size:14px;font-weight:600;line-height:1.4;text-align:center;text-decoration:none;white-space:normal;word-break:normal;overflow-wrap:normal}
#customerInvoices .customer-actions>a.secondary{background:#edf3ef;color:#155b45}
@media(max-width:640px){
 #customerInvoices .customer-actions{display:grid;grid-template-columns:minmax(0,1fr)}
 #customerInvoices .customer-actions>button,#customerInvoices .customer-actions>a{width:100%}
}
