/* Profile workspace */
.bmf-patient-profile-shell{padding:0!important;overflow:visible;min-height:72dvh;background:transparent;border:0;box-shadow:none}
.bmf-patient-profile{display:grid;grid-template-columns:minmax(210px,260px) minmax(0,1fr);gap:22px;align-items:start;min-width:0}
.bmf-patient-profile__sidebar{position:sticky;top:114px;display:grid;gap:16px;max-height:calc(100dvh - 130px);overflow-y:auto;padding:6px 0 14px}
.bmf-patient-profile__group{display:flex;flex-direction:column;gap:2px;padding-bottom:14px;border-bottom:1px solid #e3d8de}
.bmf-patient-profile__group:last-child{border-bottom:0}
.bmf-patient-profile__group>span{font-size:12px;font-weight:650;color:#806a79;margin:0 12px 5px}
.bmf-patient-profile__group a{display:block;padding:9px 12px;border-radius:24px;color:inherit;text-decoration:none;font-size:14px;line-height:1.4}
.bmf-patient-profile__group a:is(:hover,.is-active){background:#ebe3e8;color:#4a3442;font-weight:650}
.bmf-patient-profile__content{background:#fff;border:1px solid #eadfe5;border-radius:20px;padding:clamp(18px,2.5vw,36px);height:calc(100dvh - 150px);min-height:440px;overflow:auto;scrollbar-gutter:stable}
.bmf-patient-profile__content h1{font-size:clamp(22px,2vw,28px);font-weight:700;margin:0 0 24px}
.bmf-patient-profile__content h2{font-size:19px;margin:0 0 12px}
.bmf-patient-profile__content>p{margin:8px 0}
.bmf-patient-profile__heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.bmf-patient-profile__heading h1{margin:0}
.bmf-profile-primary,.bmf-profile-action{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:#b8587d;color:#fff!important;border:1px solid #b8587d;border-radius:11px;text-decoration:none;font:inherit;font-size:14px;font-weight:700;line-height:1.2;padding:10px 16px;cursor:pointer}
.bmf-profile-action{padding:8px 14px}
.bmf-profile-primary:hover,.bmf-profile-action:hover{background:#9f456b;color:#fff}
.bmf-profile-link-danger{border:0;background:transparent;color:#a84765;cursor:pointer;padding:0;font:inherit;text-decoration:underline}
.bmf-profile-icon-action{width:38px;height:38px;display:inline-grid;place-items:center;background:transparent;color:#ae4e72;border:1px solid #e3d4dc;border-radius:11px;cursor:pointer}
.bmf-patient-profile__doctor,.bmf-patient-profile__question{border:1px solid #e5dce1;border-radius:14px;padding:18px;margin:12px 0;min-width:0}
.bmf-patient-profile__doctor-top,.bmf-patient-profile__question-meta{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.bmf-patient-profile__doctor-top strong{font-size:16px;color:#34242f}
.bmf-patient-profile__doctor-top small{display:block;color:#806c78;margin-top:4px}
.bmf-patient-profile__actions{display:flex;flex-wrap:wrap;gap:20px;margin-top:10px;font-size:14px}
.bmf-patient-profile__doctor-compact{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:10px 0;border-bottom:1px solid #ede5e9}
.bmf-patient-profile__add-doctor{margin-top:20px}
.bmf-patient-profile__add-doctor summary,.bmf-patient-profile__edit-question summary{cursor:pointer;color:#a24f75;font-weight:650;margin-bottom:12px}
.bmf-patient-profile__question-form{padding:18px;border:1px solid #e4d9e0;border-radius:14px;margin:14px 0;display:grid;gap:14px}
.bmf-patient-profile__question-form>form,.bmf-patient-profile__doctor-answer{display:grid;gap:14px}
.bmf-patient-profile__question-form .bmf-post-field,.bmf-patient-profile__doctor-answer .bmf-post-field{display:flex;flex-direction:column;gap:7px}
.bmf-patient-profile__question-form textarea,.bmf-patient-profile__doctor-answer textarea{box-sizing:border-box;width:100%}
.bmf-patient-profile__question-form button,.bmf-patient-profile__doctor-answer button{justify-self:start}
.bmf-patient-profile__check{display:flex;align-items:center;gap:8px;font-size:14px}
.bmf-patient-profile__warning{font-size:14px;color:#a84a65;margin:0}
.bmf-patient-profile__question-meta{justify-content:flex-start;font-size:13px;color:#786471;margin-bottom:8px}
.bmf-patient-profile__question>p{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0 12px}
.bmf-patient-profile__answer{border-left:3px solid #b8587d;padding:10px 14px;background:#faf4f7;white-space:pre-wrap;overflow-wrap:anywhere}
.bmf-patient-profile__edit-question{margin:12px 0}
.bmf-patient-profile__edit-question form{display:grid;gap:12px}
.bmf-patient-profile__edit-question button{justify-self:start}
.bmf-patient-profile__account-form{max-width:760px}
.bmf-patient-profile__account-links{border-top:1px solid #e5dae0;margin-top:22px;padding-top:20px;display:flex;gap:22px;flex-wrap:wrap}
.bmf-patient-profile__preferences{border-collapse:collapse;width:100%;max-width:820px;margin-bottom:10px}
.bmf-patient-profile__preferences th,.bmf-patient-profile__preferences td{padding:16px 12px;border-bottom:1px solid #e6dce1;text-align:left}
.bmf-patient-profile__preferences th:not(:first-child),.bmf-patient-profile__preferences td{text-align:center;width:100px}
.bmf-patient-profile__preferences th{font-weight:600}
.bmf-patient-profile__preferences input{width:18px;height:18px;accent-color:#b8587d;cursor:pointer}
.bmf-patient-profile__payment-empty{border:1px dashed #d8c9d3;border-radius:16px;display:grid;justify-items:center;gap:12px;padding:42px 20px;text-align:center}
.bmf-patient-profile__payment-empty p{margin:0}
.bmf-patient-profile__payment-empty button{font:inherit;padding:10px 15px;border:1px solid #ddd0d7;border-radius:9px;cursor:not-allowed}
html[data-bmf-dark-active="true"] .bmf-patient-profile__content{background:var(--bmf-surface);color:var(--bmf-text);border-color:var(--bmf-border)}
html[data-bmf-dark-active="true"] .bmf-patient-profile__group{border-color:var(--bmf-border)}
html[data-bmf-dark-active="true"] .bmf-patient-profile__group a:is(:hover,.is-active){background:var(--bmf-surface-3);color:var(--bmf-text)}
html[data-bmf-dark-active="true"] .bmf-patient-profile__group>span{color:var(--bmf-muted)}
html[data-bmf-dark-active="true"] :is(.bmf-patient-profile__doctor,.bmf-patient-profile__question,.bmf-patient-profile__question-form,.bmf-patient-profile__payment-empty){border-color:var(--bmf-border);background:var(--bmf-surface)}
html[data-bmf-dark-active="true"] :is(.bmf-patient-profile__doctor-top strong,.bmf-patient-profile__content h1,.bmf-patient-profile__content h2){color:var(--bmf-text)}
html[data-bmf-dark-active="true"] :is(.bmf-patient-profile__answer,.bmf-patient-profile__payment-empty button){background:var(--bmf-surface-2);color:var(--bmf-text)}
html[data-bmf-dark-active="true"] :is(.bmf-patient-profile__preferences td,.bmf-patient-profile__preferences th,.bmf-patient-profile__account-links,.bmf-patient-profile__doctor-compact){border-color:var(--bmf-border)}
html[data-bmf-dark-active="true"] .bmf-patient-profile__preferences input{accent-color:var(--bmf-primary)}
@media(max-width:790px){.bmf-patient-profile{grid-template-columns:1fr;gap:12px}.bmf-patient-profile__sidebar{position:static;display:flex;overflow-x:auto;max-height:none;gap:10px;padding:4px 0 8px}.bmf-patient-profile__group{flex:0 0 auto;padding:0;border:0}.bmf-patient-profile__group>span{display:none}.bmf-patient-profile__group a{white-space:nowrap;display:inline-block}.bmf-patient-profile__content{height:auto;max-height:none;min-height:420px;overflow:visible}.bmf-patient-profile__preferences th,.bmf-patient-profile__preferences td{padding:11px 6px}.bmf-patient-profile__preferences th:not(:first-child),.bmf-patient-profile__preferences td{width:56px}}
html[data-bmf-dark-active="true"] .bmf-patient-profile-shell{background:transparent;border:0}

.bmf-patient-profile__location-form { margin-top:24px; padding-top:20px; border-top:1px solid var(--bmf-border); }
.bmf-patient-profile__location-form h2 { margin:0 0 18px; font-size:18px; }
.bmf-patient-profile__location-form .bmf-form-actions { grid-column:1 / -1; }

.bmf-doctor-profile .bmf-patient-profile__content > h1{margin-top:0;}
.bmf-doctor-profile .bmf-management-form {margin-top:20px;}
.bmf-doctor-profile .bmf-image-paste {max-width:580px;}
.bmf-doctor-facility-photo{display:block;width:64px;height:64px;object-fit:cover;border-radius:9px;border:1px solid var(--bmf-border);}

.bmf-doctor-public-photo{width:140px;height:140px;object-fit:cover;border:1px solid var(--bmf-border);border-radius:16px;float:right;margin:0 0 16px 20px;}
@media(max-width:620px){.bmf-doctor-public-photo{float:none;display:block;margin:0 0 18px;}}

/* Scoped loading state for partial patient updates. */
.bmf-patient-profile__content.bmf-patient-fragment--busy { opacity:.68; pointer-events:none; transition:opacity .15s ease; }
