/* Scoped workflow improvements; clinical values and validation are unchanged. */
.doctor-polish-form { line-height: 1.55; }
.doctor-polish-form h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.doctor-polish-form h2 { font-size: 1.1rem; font-weight: 700; }
.doctor-polish-form .card-header.text-white h1 { color: #fff !important; }
.doctor-polish-form .form-group { margin-bottom: 1.25rem; }
.doctor-polish-form label { font-weight: 600; margin-bottom: .4rem; }
.doctor-polish-form .card-header { gap: .75rem; flex-wrap: wrap; }
.doctor-polish-form .form-section-title {
    font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 1rem;
    padding-bottom: .5rem; border-bottom: 1px solid #a8b6c3;
}
.appointment-reason-pick { min-height: 44px; padding: .45rem .7rem; white-space: normal; }
.doctor-polish-form :focus-visible, #patientSearchModal :focus-visible,
.patient-search-result:focus-visible { outline: 3px solid #287fce; outline-offset: 3px; }
#patientSearchModal { padding: 24px 12px !important; overflow-y: auto; }
#patientSearchModal > div { max-height: calc(100dvh - 48px); display: flex; flex-direction: column; }
#patientSearchModal [data-close-search] { width: 44px; height: 44px; }
#patientSearchModal label { margin-top: .5rem; }
#patientSearchModal, #patientSearchModal h2, #patientSearchModal label {
    color: #152d46 !important;
}
#patientSearchResults { margin-top: 12px; overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.patient-search-result {
    display: flex; flex-direction: column; gap: .3rem; padding: 14px 8px;
    border-bottom: 1px solid #c9d4df; color: #152d46; min-height: 60px; overflow-wrap: anywhere;
}
.patient-search-result span { font-size: .9rem; line-height: 1.5; color: #42566c; }
.patient-search-result:hover { background: #eaf3ff; color: #123459; }
.patient-search-message { font-size: 1rem; color: #42566c; padding: .5rem; }
body[data-bg-mode="dark"] .doctor-polish-form .form-section-title { color: #e2e8f0; }
body[data-bg-mode="dark"] .patient-search-result span,
body[data-bg-mode="dark"] .patient-search-message { color: #cbd5e1; }
#patientSearchModal .patient-search-result,
#patientSearchModal .patient-search-result span,
#patientSearchModal .patient-search-message { color: #152d46 !important; }
@media (max-width: 767.98px) {
    .doctor-polish-form .card-body { padding: 1rem !important; }
    .doctor-polish-form .card-header > div { display: flex; flex-wrap: wrap; gap: .4rem; }
    .doctor-polish-form input, .doctor-polish-form select, .doctor-polish-form textarea { font-size: 16px; }
    .doctor-polish-form .btn { min-height: 44px; }
    /* Both FABs previously occupied the same bottom-right position. */
    #floatingPatientSearch { right: 96px !important; }
    /* Floating controls otherwise occupy the same row as the form action bar. */
    body:has(.mobile-action-bar) #floatingPatientSearch,
    body:has(.mobile-action-bar) #float-ai-btn {
        bottom: calc(156px + env(safe-area-inset-bottom, 0px)) !important;
    }
    body.clinical-keyboard-open #mobileBottomNav,
    body.clinical-keyboard-open .mobile-action-bar,
    body.clinical-keyboard-open #floatingPatientSearch,
    body.clinical-keyboard-open #float-ai-btn,
    body.clinical-keyboard-open #float-ai-tooltip {
        display: none !important;
    }
    body.clinical-keyboard-open #patientSearchModal > div {
        max-height: calc(var(--clinical-visible-height, 100dvh) - 24px);
    }
    body.clinical-keyboard-open #patientSearchModal { padding: 12px !important; }
}
