/* Scoped form refinements; preserve the established application design. */
#recordForm .wizard-step { min-width:0; }
#recordForm .wizard-step > legend { width:100%; max-width:none; white-space:normal; margin-bottom:20px; padding:0; float:left; grid-column:1/-1; }
#recordForm .wizard-step > label,.kh-purchase-form label { min-width:0; }
#recordForm .applicants-block,#recordForm .partner-company-block,#recordForm .loan-connector-commercials { grid-column:1/-1; min-width:0; width:100%; }
#recordForm .applicant-card { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
#recordForm .applicant-card h4 { grid-column:1/-1; margin:0; }
.kh-tax-grid,.kh-brokerage-tax { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:end; min-width:0; }
.kh-purchase-form .kh-tax-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
body #recordForm label.kh-compact-check,body label.kh-compact-check { display:flex; flex-direction:row; align-items:center; justify-content:flex-start; gap:10px; padding:12px; min-height:46px; width:auto; }
body #recordForm .kh-compact-check input[type=checkbox],body .kh-compact-check input[type=checkbox] { flex:0 0 18px; width:18px; height:18px; min-height:0; margin:0; }
.kh-compact-check span { line-height:1.4; }
.kh-tax-grid label,.kh-brokerage-tax label { margin:0; min-width:0; }
.kh-invoice-filters,.loan-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; align-items:end; }
.kh-invoice-filters .record-search { min-width:0; }
.kh-form-error { color:#b42d22; padding:12px; border:1px solid currentColor; border-radius:12px; }
.transaction-invoice-list { max-height:280px; overflow:auto; overscroll-behavior:contain; }
.transaction-invoice-list label { display:grid; grid-template-columns:20px minmax(0,1fr) 130px; gap:12px; align-items:center; }
.transaction-invoice-list input[type=checkbox] { width:18px; height:18px; min-height:0; }
.transaction-invoice-list small { letter-spacing:normal; line-height:1.5; }
.kh-invoice-help { font-size:12px; line-height:1.6; }
[data-invoice-filters] ~ .v09-invoice-register tr[hidden] { display:none!important; }
@media(max-width:760px){
  .kh-tax-grid,.kh-brokerage-tax,.kh-purchase-form .kh-tax-grid,#recordForm .applicant-card { grid-template-columns:1fr 1fr; }
  .kh-brokerage-tax>label:first-child { grid-column:1/-1; }
  .transaction-invoice-list label { grid-template-columns:20px minmax(0,1fr); }
  .transaction-invoice-list input[type=number] { grid-column:2; width:100%; }
}
@media(max-width:480px){.kh-tax-grid,.kh-brokerage-tax,#recordForm .applicant-card {grid-template-columns:1fr;}}
