.patient-picker { position: relative; margin-bottom: 20px; }
.sidebar .patient-picker .patient-card { width: 100%; margin: 0; padding: 8px; border: 0; border-radius: 9px; background: transparent; color: inherit; text-align: left; }
.sidebar .patient-picker .patient-card:not(:disabled):hover, .sidebar .patient-picker .patient-card[aria-expanded="true"] { background: #ffffff0c; }
.sidebar .patient-picker .patient-card.patient-picker-static { cursor: default; opacity: 1; }
.patient-picker-copy { flex: 1; min-width: 0; }
.patient-picker-copy strong { overflow-wrap: anywhere; }
.patient-picker-arrow { flex: 0 0 16px; width: 16px; height: 16px; color: var(--sidebar-muted, #a1a19c); }
.patient-picker-menu { position: absolute; left: 0; right: 0; top: calc(100% + 5px); z-index: 90; padding: 5px; border: 1px solid #ffffff20; border-radius: 10px; background: #32322e; box-shadow: 0 8px 24px #0005; }
.patient-picker-menu[hidden], .patient-picker-arrow[hidden], #profilesButton[hidden] { display: none; }
.patient-picker-list { max-height: min(360px, 48dvh); overflow-y: auto; }
.patient-picker-menu button { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 6px; background: transparent; color: #eeeee9; text-align: left; font-size: 16px; overflow-wrap: anywhere; }
.patient-picker-menu button:hover, .patient-picker-menu button:focus-visible { background: #ffffff12; }
.patient-picker-menu button[aria-checked="true"] { background: #ffffff1b; font-weight: 700; }
.patient-picker-menu .patient-picker-add { margin-top: 5px; border-top: 1px solid #ffffff20; border-radius: 0 0 6px 6px; color: #a4d7cc; }
.patient-dialog { width: min(440px, calc(100vw - 30px)); }
.patient-dialog-note, .profiles-description { color: var(--muted); font-size: var(--font-small); line-height: 1.5; }
.patient-dialog-note { margin: 7px 0 18px; }
.patient-dialog .form-error:empty { display: none; }
.profiles-dialog { width: min(760px, calc(100vw - 30px)); max-height: calc(100dvh - 40px); padding: 24px; overflow-y: auto; }
.profiles-dialog .dialog-head { position: sticky; top: -24px; z-index: 1; background: var(--surface); padding-block: 5px; }
.profiles-list { display: grid; gap: 0; }
.profiles-dialog .profile-account-row { display: grid; grid-template-columns: minmax(120px, 1fr) auto auto; min-width: 0; align-items: center; column-gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.profile-account-identity { display: grid; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.profile-account-identity small { color: var(--muted); font-size: var(--font-caption); }
.profile-account-roles { display: grid; gap: 10px; }
.profile-account-roles label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--font-small); }
.form-dialog .profile-account-roles input { appearance: auto; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: var(--teal); }
.profile-account-message { grid-column: 1 / -1; min-height: 0; margin: 8px 0 0; }
.profile-account-message:empty { display: none; }
.profile-account-saved { color: var(--teal); }
.patient-empty-workspace { max-width: 600px; padding: 40px; }
.patient-empty-workspace p { color: var(--muted); line-height: 1.6; }
@media (max-width: 600px) {
  .profiles-dialog .profile-account-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .profile-account-identity { grid-column: 1 / -1; }
  .profile-account-row > button { justify-self: end; }
  .profiles-dialog { padding: 20px; }
}
