#lead-form .vehicle-fields{grid-template-columns:repeat(4,minmax(0,1fr));align-items:start}
#lead-form .sales-payment-fields{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
#lead-form .profile-detail-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;grid-column:1/-1}
#lead-form .profile-detail-fields label{min-width:0}
#lead-form .profile-detail-fields textarea{min-height:72px;width:100%}
#lead-form .color-custom{width:100%;min-width:0}
#lead-form .source-note-button{font-size:11px;padding:2px 0;background:none;text-align:left;color:#1464F4;width:max-content}
#lead-form .source-note-button[hidden],#lead-form .color-custom[hidden],#lead-form .profile-detail-fields [hidden]{display:none}
#lead-form .color-source{grid-column:1/-1;margin:0;font-size:10px;color:#718180;font-weight:500}
#lead-form .color-source a{color:#526a92}
#lead-status-modal{width:min(740px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow-y:auto}
#lead-status-form h2{padding-right:24px;overflow-wrap:anywhere}
#lead-status-form .planned-payment-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:16px;align-items:start}
#lead-status-form .payment-schedule{border:0;padding:0;margin:0;min-width:0}
#lead-status-form .payment-schedule legend{padding:0;margin:0 0 7px;font-size:11px;font-weight:800}
#lead-status-form .payment-date-time{display:grid;grid-template-columns:minmax(140px,1.6fr) minmax(58px,.7fr) minmax(58px,.7fr);gap:7px}
#lead-status-form .payment-date-time label{min-width:0;font-size:11px}
#lead-status-form .payment-date-time input,#lead-status-form .payment-date-time select{width:100%;min-width:0;padding:10px 6px;height:40px}
#lead-status-form .expected-payment-entry{display:grid;gap:7px;min-width:0;align-content:start}
#lead-status-form .expected-payment-controls{display:grid;grid-template-columns:minmax(0,1fr) 78px;gap:6px}
#lead-status-form .expected-payment-controls input,#lead-status-form .expected-payment-controls select{width:100%;min-width:0;height:40px;padding:10px 8px}
#lead-status-form .expected-payment-hint{font-size:10px;font-weight:500;color:#718180;margin:0}
@media(max-width:720px){#lead-form .vehicle-fields{grid-template-columns:repeat(2,minmax(0,1fr))}#lead-form .profile-detail-fields,#lead-form .sales-payment-fields{grid-template-columns:1fr}}
@media(max-width:620px){#lead-status-form .planned-payment-grid{grid-template-columns:1fr}#lead-status-form{padding:22px 16px}#lead-status-form .payment-schedule legend{font-size:12px}}
@media(max-width:400px){#lead-form .vehicle-fields{grid-template-columns:1fr}#lead-status-form .payment-date-time{grid-template-columns:minmax(0,1.5fr) 60px 60px;gap:5px}}
#lead-form #payment-progress-panel{grid-column:1/-1;min-width:0;display:grid;gap:14px;border:1px solid #dce7fa;border-radius:10px;padding:16px;background:#f7faff}
#lead-form #payment-progress-panel[hidden],#payment-progress-panel [hidden]{display:none!important}
#payment-progress-panel h3{margin:0 0 12px;font-size:15px;color:#234368}
#lead-payment-editor{display:grid;gap:12px}
#customer-debt-summary .debt-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 16px;margin:0}
.debt-facts div{min-width:0}.debt-facts dt{font-size:11px;color:#66788a;margin-bottom:4px}.debt-facts dd{margin:0;font-size:14px;font-weight:700;color:#1f3247;overflow-wrap:anywhere}
.debt-notes{display:grid;gap:12px;margin-top:16px}.debt-notes section{padding:12px;border:1px solid #dce7fa;background:#fff;border-radius:8px}.debt-notes h4{margin:0 0 6px;font-size:12px;color:#526a80}.debt-notes p{font-size:14px;line-height:1.6;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;color:#1f3247}
.debt-history{margin-top:14px}.debt-history summary,.report-milestones summary{cursor:pointer;font-weight:700;font-size:12px;color:#234368;padding:6px 0}.debt-history .status-history{margin-top:8px}.debt-history .status-history strong{font-size:12px}.debt-history .status-history small{font-size:11px}.debt-history .status-history p,#status-history p,#lead-status-history p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.report-milestones{border-top:1px solid #dce7fa;padding-top:8px}.report-milestones .form-grid{margin-top:8px}.report-milestones .modal-actions{margin-top:10px;padding-top:0;border-top:0}
@media(max-width:900px){#customer-debt-summary .debt-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){#lead-form #payment-progress-panel{padding:12px}.debt-facts dd{font-size:13px}.debt-notes p{font-size:13px}}
