/* Patient record: Órbita, compact reading and generous touch targets. */
#drawer{background:#fcf9ff;color:#38223f}
#drawer .patient-workspace-head{background:linear-gradient(120deg,#fffafa,#f3ebfc);padding:16px 20px 12px}
#drawer .patient-workspace-head::after{background:linear-gradient(90deg,#d482af,#ad76ce,#b7a0dc)}
#drawer #dName,#drawer .patient-kpi strong{font-family:inherit;font-weight:750;letter-spacing:-.03em}
#drawer #dName{font-size:clamp(1.15rem,2.1vw,1.65rem)}
#drawer #dMeta button{min-height:44px;min-width:44px}
#drawer #dNextAppt button{min-height:44px;min-width:44px;white-space:normal;text-align:left;background:transparent;border:0;color:#73428c;border-radius:10px;padding:6px;font:inherit;font-weight:650}
#waGenModal:has(#prepActions,#pcfFields) > div{width:min(720px,95vw)!important}
#waGenModal .sub{font-size:.87rem;line-height:1.6;color:#796380;margin:12px 0}
#waGenModal .patient-section{padding:16px;border:1px solid #e8dcef;border-radius:16px;background:#faf6fe;box-shadow:none;margin-bottom:16px}
#waGenModal .patient-section h3{margin:0 0 8px;color:#43234f;letter-spacing:-.03em}
#waGenModal .patient-section p{line-height:1.5;margin:8px 0}
#waGenModal .patient-inline-actions{gap:10px;flex-wrap:wrap}
#waGenModal .btn.prim{background:linear-gradient(110deg,#b7388a,#8350b7);color:white;border:0}
#waGenModal .btn{border-radius:12px;padding:10px 14px;line-height:1.3}
#drawer .patient-head-metric{font:inherit;text-align:left}
#drawer .patient-head-metric strong{font-size:.84rem}
#drawer .patient-tabs{padding:6px 16px;gap:3px;background:#fffafd}
#drawer .patient-tab{min-height:44px;font-size:.84rem;color:#766080}
#drawer .patient-tab.on{background:#eee2fa;color:#73428c;box-shadow:inset 0 0 0 1px #e4d3f2}
#drawer .patient-workspace-body{padding:16px 20px 28px}
#drawer .patient-section{border-color:#e9dff1;border-radius:20px;box-shadow:0 5px 20px #43245205;padding:16px}
#drawer .patient-section-head h3{color:#42264b;font-size:1rem}
#drawer .patient-section-head p,#drawer .patient-empty{font-size:.82rem;line-height:1.5;color:#786782}
#drawer .patient-item-row{padding:12px 0;align-items:center;flex-wrap:wrap}
#drawer .patient-item-row>div:first-child{min-width:min(230px,100%);overflow-wrap:anywhere}
#drawer .patient-item-row>div>div{font-size:.77rem!important;line-height:1.5}
#drawer .patient-status{font-size:.72rem;padding:6px 10px}
#drawer .btn,#drawer .x{min-height:44px;min-width:44px;padding:9px 13px!important;font-size:.8rem!important}
#drawer .btn.prim,#drawer .patient-action-primary{background:linear-gradient(110deg,#b7388a,#8350b7);color:white}
#drawer .patient-roadmap{background:linear-gradient(120deg,#fff5f8,#f4edfd);border-color:#e8d9f2}
#drawer .patient-roadmap-step.current .patient-roadmap-dot{background:#8856b7}
#drawer .patient-roadmap p{font-size:.78rem}
#drawer .patient-document-intro{background:#43234f;color:#fff6ff;display:flex;align-items:center;justify-content:space-between;gap:16px}
#drawer .patient-document-intro p{color:#e1cce9;margin:5px 0 0;font-size:.83rem;line-height:1.5}
#drawer .patient-document-intro h3{margin:0}
#drawer .patient-document-intro .btn{background:#fff9ff;color:#73428c;white-space:nowrap}
#drawer [data-patient-pane=documents]>.patient-grid-2{grid-template-columns:1fr}
#drawer .patient-access-row{border-top:1px solid #e9dff1;padding:12px 0 0}
#drawer .patient-access-row-head{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:6px;color:#43234f;font-size:.87rem}
#drawer .patient-access-row-head>span,#drawer .patient-access-row small{font-size:.76rem;color:#756178}
#drawer .patient-access-docs{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:10px;font-size:.8rem;color:#624b6a}
#drawer .patient-access-row p,#drawer .patient-access-warning p{font-size:.8rem;line-height:1.55;margin:8px 0;color:#624b6a}
#drawer .patient-access-warning{padding:12px 14px;border:1px solid #e2c5a1;background:#fff8ef;border-radius:12px;margin-bottom:12px}
#drawer .patient-access-warning strong{font-size:.88rem;color:#795227}
#drawer .patient-access-note{font-size:.75rem;line-height:1.5;color:#756178;margin:10px 0 0}
#drawer :is(.patient-access-reference,.patient-access-history)>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;font-size:.8rem;font-weight:650;color:#73428c}
#drawer :is(.patient-access-reference,.patient-access-history)>summary::before{content:'+';font-size:1rem}
#drawer :is(.patient-access-reference,.patient-access-history)[open]>summary::before{content:'−'}
#drawer :is(.patient-access-reference,.patient-access-history)>summary:focus-visible{outline:3px solid #a979d0;outline-offset:2px;border-radius:8px}
#drawer .patient-access-reference code{display:block;font-size:.75rem;overflow-wrap:anywhere;color:#624b6a;margin-bottom:8px}
#drawer .patient-access-reference ul{padding-left:18px;font-size:.78rem;color:#624b6a}
:is(#csOv,#consentDetailOv,#chOv,#consentTemplateOv,#consentTemplateEditOv,#consentTemplateDetailOv,#patientDocumentUploadOv,#waGenModal) .patient-item-row{flex-wrap:wrap;gap:10px}
:is(#csOv,#consentDetailOv,#chOv,#consentTemplateOv,#consentTemplateEditOv,#consentTemplateDetailOv,#patientDocumentUploadOv,#waGenModal) .btn{min-height:44px;font-size:.84rem!important}
:is(#csOv,#consentDetailOv,#chOv,#consentTemplateOv,#consentTemplateEditOv,#consentTemplateDetailOv,#patientDocumentUploadOv) .billing-modal{border:1px solid #e6d8f0;background:#fffcff;border-radius:24px;box-shadow:0 24px 80px #3b1c4938}
:is(#csOv,#consentDetailOv,#chOv,#consentTemplateOv,#consentTemplateEditOv,#consentTemplateDetailOv,#patientDocumentUploadOv) h3{font-family:inherit;color:#42264b}
#pcfFields{grid-template-columns:1fr;gap:18px}
#pcfFields label{font-size:.9rem;line-height:1.5}
#pcfFields input:not([type=checkbox]):not([type=radio]),#pcfFields select,#pcfFields textarea{font-size:16px;min-height:44px}
#pcfFields .patient-choice-list{display:flex;gap:10px;flex-wrap:wrap}
#pcfFields .patient-choice-list label{border:1px solid #e6d9f0;border-radius:12px;padding:12px;display:flex;align-items:center;gap:10px;min-height:44px}
#pcfFields input[type=checkbox],#pcfFields input[type=radio]{width:20px;height:20px;accent-color:#8451b7}
#pcfFields .patient-answer{padding:14px;border:1px solid #e9dff1;border-radius:14px;white-space:pre-wrap;overflow-wrap:anywhere}
#pcfFields .patient-answer strong{display:block;margin-bottom:8px}
#drawer button:focus-visible,#waGenModal button:focus-visible{outline:3px solid #a979d0;outline-offset:3px}
#clinicalTemplatesOverlay{background:#2d183a66;backdrop-filter:blur(5px)}
#clinicalTemplatesOverlay .billing-modal{border:1px solid #e6d8f0;background:#fffcff;border-radius:24px;box-shadow:0 24px 80px #3b1c4938;color:#43234f}
#clinicalTemplatesOverlay h3,#clinicalTemplatesOverlay h4{font-family:inherit;letter-spacing:-.025em;color:#43234f}
#clinicalTemplatesOverlay .billing-modal-head{background:linear-gradient(120deg,#fff7fa,#f1e8fc)}
#clinicalTemplatesOverlay .billing-modal-close{width:44px;height:44px;min-width:44px;min-height:44px}
#clinicalTemplatesOverlay .btn{min-height:44px;min-width:44px;padding:10px 14px;font-size:.84rem;border-radius:12px;white-space:normal}
#clinicalTemplatesOverlay .btn.prim{background:linear-gradient(110deg,#b7388a,#8350b7);color:#fff;border:0}
#clinicalTemplatesOverlay .sub,#clinicalTemplatesOverlay .billing-inline-note{font-size:.87rem;line-height:1.6;color:#796380}
#clinicalTemplatesOverlay .patient-section{border:1px solid #e8dcef;border-radius:16px;padding:16px;background:#fcf8ff;margin-block:16px;min-width:0}
#clinicalTemplatesOverlay .check-row{display:flex;align-items:center;gap:10px;min-height:44px;font-size:.9rem;line-height:1.5;padding:8px 0}
#clinicalTemplatesOverlay input[type=checkbox]{width:20px;height:20px;min-width:20px;accent-color:#8451b7}
#clinicalTemplatesOverlay input:not([type=checkbox]),#clinicalTemplatesOverlay select,#clinicalTemplatesOverlay textarea{min-height:44px;font-size:16px}
#clinicalTemplatesOverlay summary{min-height:44px;display:flex;align-items:center;cursor:pointer}
#clinicalTemplatesOverlay :is(button,input,select,textarea,summary):focus-visible{outline:3px solid #a979d0;outline-offset:3px}
@media(max-width:700px){
 #clinicalTemplatesOverlay .billing-form-grid{grid-template-columns:1fr}
 #drawer .patient-workspace-head{padding:12px}
 #drawer .patient-workspace-body{padding:12px 12px calc(28px + env(safe-area-inset-bottom))}
 #drawer .patient-health-strip{grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}
 #drawer .patient-health-strip>.patient-head-metric:last-child{display:none}
 #drawer .patient-health-alerts{grid-column:1/-1}
 #drawer .patient-document-intro{display:block}
 #drawer .patient-document-intro .btn{margin-top:14px;width:100%}
 #drawer .patient-section-head{flex-wrap:wrap}
 #drawer .patient-head-actions{gap:6px}
 #drawer .patient-roadmap-action{grid-template-columns:1fr}
 #drawer .patient-roadmap-action .btn{white-space:normal}
 :is(#csOv,#consentDetailOv,#chOv,#consentTemplateOv,#consentTemplateEditOv) .billing-form-grid{grid-template-columns:1fr}
 :is(#csOv,#consentTemplateOv,#consentTemplateEditOv) input,:is(#csOv,#consentTemplateOv,#consentTemplateEditOv) textarea,:is(#csOv,#consentTemplateOv,#consentTemplateEditOv) select{font-size:16px}
}
