/* Profiles and booking forms must allow long names and controls to fit their columns. */
.modal:has(#classType,#gradingType,#lessonWeek,#quickWeek,#flexWeek,#employmentPay) .school-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.modal:has(#classType,#gradingType,#lessonWeek,#quickWeek,#flexWeek,#employmentPay) .school-form-grid>*{min-width:0}
.modal:has(#classType,#gradingType,#lessonWeek,#quickWeek,#flexWeek,#employmentPay) .school-form-grid select,.modal:has(#classType,#gradingType,#lessonWeek,#quickWeek,#flexWeek,#employmentPay) .school-form-grid input:not([type=checkbox]):not([type=radio]),.modal:has(#classType,#gradingType,#lessonWeek,#quickWeek,#flexWeek,#employmentPay) .school-form-grid textarea{min-width:0;max-width:100%}
.modal .modal-actions>*{max-width:100%;white-space:normal}
.modal .quick-booking-ticket>div,.modal .grading-candidate>span{min-width:0;overflow-wrap:anywhere}
.modal .staff-profile-heading .staff-avatar{flex:none}
.modal .staff-profile-heading>div:last-child{min-width:0}
.modal .staff-profile-heading h2{overflow-wrap:anywhere}
#staffContractForm .staff-contract-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 22px;margin:22px 0}
#staffContractForm .staff-contract-fields>label{display:flex;flex-direction:column;gap:7px;min-width:0;margin:0;font-size:13px;line-height:1.55;color:#53604e}
#staffContractForm .staff-contract-fields>label>input,#staffContractForm .staff-contract-fields>label>select{display:block;width:100%;min-width:0;min-height:44px;box-sizing:border-box;margin:0;padding:11px 12px;border:1px solid #c6d2b9;border-radius:3px;background:#fbfcf5;color:#35462d;line-height:1.4;font-family:inherit;font-size:14px}
#staffContractForm .support-shifts>div{grid-template-columns:minmax(6rem,1.2fr) repeat(2,minmax(0,1fr))}
#staffContractForm .support-shifts label{min-width:0}
#staffContractForm .support-shifts input[type=time]{min-width:0;max-width:100%;min-height:44px;box-sizing:border-box;border:1px solid #c6d2b9;border-radius:3px;background:#fbfcf5;color:#35462d;font-family:inherit;font-size:14px}
@media(max-width:700px){.modal:has(#classType,#gradingType,#lessonWeek,#quickWeek,#flexWeek,#employmentPay) .school-form-grid,#staffContractForm .staff-contract-fields{grid-template-columns:minmax(0,1fr)}#staffContractForm .support-shifts>div{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}#staffContractForm .support-shifts>div>label:first-child{grid-column:1/-1;display:flex;align-items:center;min-height:36px}}
