/* Scoped, consistent portal UI. Loaded after legacy styles. */
.auth-error #loginView,.auth-error #appView,.auth-error #passwordRecoveryView{display:none!important}
.auth-error .portal-boot{display:grid;place-content:center;gap:16px;position:fixed;inset:0;background:#faf7fc;color:#5b286c;text-align:center;font:16px system-ui;padding:24px}
.comm-response-row .comm-note-translate{border:0;background:none;padding:4px 0;color:#642574;text-decoration:underline;cursor:pointer;font-size:12px!important;min-height:32px!important;text-align:left}
.comm-inline-translation{padding:10px 12px;margin:6px 0;background:#f7f2fa;border-left:3px solid #b388c2;border-radius:6px;font-size:13px;line-height:1.6;white-space:pre-wrap}
.comm-inline-translation[hidden]{display:none}
.comm-caregiver-note{white-space:pre-wrap;overflow-wrap:anywhere}
.comm-tracking-note{font-size:12px;color:#75677b;margin-top:12px;line-height:1.5}
#commRecentEmpty[aria-busy="true"]{cursor:progress}
#commComposer.email-composer .comm-compose-grid{display:block;max-width:900px;margin:0 auto}
#commComposer.email-composer .comm-plan-column>.comm-form-card,#commComposer.email-composer .comm-live-preview{display:none!important}
#commComposer.email-composer .comm-plan-column .comm-review-bar{margin-top:18px}
#commComposer.email-composer #commCaregiverName{display:block}
.comm-history-filters{display:grid;grid-template-columns:minmax(200px,2fr) minmax(140px,1fr) minmax(140px,1fr) auto;gap:14px;margin:20px 0 10px;align-items:end}
.comm-history-filters label{display:grid;gap:6px;font-size:13px;font-weight:700;color:#5c4567}
.comm-history-filters input,.comm-history-filters select{min-width:0;width:100%;height:44px;padding:10px 12px;border:1px solid #dfd3e5;border-radius:10px;font:14px system-ui;background:white;color:#35223f;box-sizing:border-box}
.comm-history-count{font-size:12px;color:#76667e;margin:8px 0 16px}
.comm-drawer-tools{padding:18px;background:#fff;border:1px solid #e5dbe9;border-radius:14px;margin-bottom:16px}
.comm-drawer-tools h3{font-size:15px;margin:0 0 8px}
.comm-pin-actions{display:flex;gap:8px;flex-wrap:wrap}
.comm-pin-actions button{border:1px solid #dbcbe4;background:#faf7fc;color:#632772;border-radius:9px;padding:9px 12px;cursor:pointer}
.comm-revealed-pin{display:block;font:800 28px/1.4 system-ui;letter-spacing:.15em;margin-top:14px;color:#24653a}
.comm-revealed-pin[hidden],.comm-pin-actions[hidden],.comm-note-translations[hidden]{display:none}
.comm-pin-message{font-size:12px;line-height:1.5;color:#746079}
.comm-drawer-tools .comm-note-translate{font-size:12px;border:0;background:transparent;color:#642574;text-decoration:underline;cursor:pointer;padding:8px 0}
.comm-note-translations article{padding:12px 0;border-top:1px solid #eadfed}.comm-note-translations p{white-space:pre-wrap}
#dashboardRequests .content-icon{display:grid!important;place-items:center!important;line-height:1;padding:0}
#dashboardRequests .content-icon svg{width:22px;height:22px;display:block;flex:none}
@media(max-width:900px){.comm-history-filters{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.comm-history-filters{grid-template-columns:1fr}.comm-history-filters button{width:100%}#commComposer.email-composer{min-width:0}.comm-pin-actions button{flex:1 1 auto}}
#commCaregiverSelect{width:100%;min-width:0;height:46px;border:1px solid #ded5e2;border-radius:10px;padding:10px 12px;background:#fff;color:#35223f;font:600 15px system-ui}
#commCaregiverHint{font-size:12px;font-weight:400;line-height:1.5;color:#75677b}
#communications{font-size:15px;line-height:1.55}
#communications button{font-size:14px;min-height:44px;line-height:1.35}
#communications button:focus-visible,.dashboard-request-link:focus-visible{outline:3px solid #ac78bc;outline-offset:3px}
#commHome .comm-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:none;gap:20px}
#commHome .comm-choice{min-height:142px;width:100%;padding:22px 26px}
#commHome .comm-choice>b{font-size:20px}#commHome .comm-choice>span{font-size:14px}
#commReviewScreen{max-width:1000px;margin:24px auto}
#commReviewScreen .comm-composer-top{justify-content:flex-start;gap:24px;align-items:center;margin-bottom:24px}
#commReviewScreen .comm-composer-top h3{font-size:22px}
#commReviewScreen .comm-composer-top span{font-size:11px}
#commReviewPreview,#commAccessPanel{width:100%;max-width:none;box-sizing:border-box;margin:0 0 20px;border:1px solid #e7dfeb;border-radius:18px;overflow:hidden}
#commReviewPreview .comm-review-preview-head{padding:24px 28px}
#commReviewPreview h3{font-size:28px;line-height:1.2}
#commReviewPreview p,#commReviewPreview span,#commReviewPreview small{font-size:14px}
#commReviewPreview .comm-review-checklist-kicker{font-size:12px;font-weight:800;letter-spacing:.04em}
#commReviewPreview .comm-review-checklist-link{margin:0 24px 24px;padding:22px;background:#faf7fc}
#commReviewPreview .comm-review-checklist-link b{font-size:19px}
#commReviewPreview .comm-review-task-preview{padding-left:24px;margin-top:16px}
#commReviewPreview .comm-review-task-preview li{font-size:15px;line-height:1.6;padding:5px 0}
#commAccessPanel{padding:24px 28px;background:#fff}
#commAccessPanel h3{font-size:20px;margin:0 0 10px}
#commAccessPanel p{font-size:15px;line-height:1.6;margin:10px 0}
#commReviewScreen #commAccessPanel .comm-review-actions{margin:18px 0 0;max-width:none;justify-content:flex-start}
#commReviewScreen>.comm-review-actions{margin:0;gap:12px;padding:4px 0 24px}
#commAccessCodeBox{background:#f0faf4;border:1px solid #c5e4cf;padding:18px 22px;border-radius:12px}
#commAccessCode{font-size:34px;letter-spacing:.18em;color:#24653a}
.caregiver-portal-link{display:block;font-size:17px;font-weight:800;color:#682776;text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere}
#commHome .comm-message-table{min-width:0;width:100%;table-layout:auto}
#commHome .comm-message-table th{font-size:12px;padding:16px 12px;white-space:normal}
#commHome .comm-message-table td{font-size:14px;padding:18px 12px;white-space:normal;width:auto;min-width:0}
#commHome .comm-message-table small{font-size:12px}
#commHome .comm-message-table th:last-child,#commHome .comm-message-table td:last-child{width:auto}
#commHome .comm-view-button{white-space:normal;min-width:120px}
.comm-status-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:min(560px,100vw);height:100dvh;max-height:100dvh;max-width:100vw;border:0;padding:0;background:#faf8fc;color:#35223f;box-sizing:border-box;box-shadow:-12px 0 50px #2c193733}
.comm-status-drawer::backdrop{background:#25142d66}
.comm-drawer-open{overflow:hidden}
.comm-drawer-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:24px;background:#fff;border-bottom:1px solid #e8e0ed;position:sticky;top:0;z-index:1}
.comm-drawer-head span{font-size:11px;font-weight:800;letter-spacing:.08em;color:#795286}
.comm-drawer-head h2{font:700 21px/1.3 system-ui;margin:6px 0 0}
.comm-drawer-close{flex:0 0 44px;width:44px;height:44px;border:1px solid #e4d9e9;border-radius:50%;background:white;color:#54215e;font-size:28px;cursor:pointer}
.comm-drawer-body{padding:22px;font:14px/1.6 system-ui;overflow-wrap:anywhere}
.comm-drawer-body .comm-response-card{margin:0;padding:20px;background:#fff;border-radius:14px;width:auto}
.comm-drawer-body .comm-response-summary,.comm-drawer-body .comm-visit-status{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}
.comm-drawer-body small,.comm-drawer-body .comm-response-card small{font-size:12px}
.comm-drawer-body b{font-size:14px}
.comm-drawer-body button{min-height:44px;font-size:14px;margin:8px 8px 0 0}
.comm-drawer-body .modify-checklist{color:#b42332;border-color:#e7b9c0;background:#fff5f5;font-weight:700}
.comm-drawer-body .comm-response-header{display:none}
.comm-drawer-body .comm-response-row{grid-template-columns:1fr;gap:8px;padding:15px 0}
.comm-drawer-body .comm-responses summary{font-size:14px;padding:12px 0;cursor:pointer}
.comm-drawer-message{white-space:pre-wrap}
.dashboard-request-link{appearance:none;width:100%;border:0;border-top:1px solid #eee7f1;background:#fff;text-align:left;display:flex;align-items:center;gap:14px;padding:17px 0;cursor:pointer;color:#35223f}
.dashboard-request-link:hover{background:#faf7fc}
.dashboard-request-link .content-icon{flex:0 0 40px;width:40px;height:40px;font-size:17px;margin:0;color:#682776}
.dashboard-request-link .dashboard-row-copy b{font-size:15px;color:#3b2d43;font-weight:700}
.dashboard-request-link .dashboard-row-copy span{font-size:13px;line-height:1.5;color:#75677b}
.dashboard-request-link small{flex:0 0 auto;font-size:12px;font-weight:700;background:#f3eaf7;color:#692779;border-radius:20px;padding:6px 10px}
#dashboard .dashboard-grid .panel-head h3{font-size:18px}#dashboard .dashboard-grid .panel-head button{font-size:13px;min-height:44px}
@media(max-width:760px){
 #commHome .comm-choice-grid{grid-template-columns:1fr;gap:12px}
 #commReviewScreen .comm-composer-top{align-items:flex-start;gap:14px}
 #commReviewScreen .comm-composer-top h3{font-size:20px}
 #commAccessPanel{padding:20px}#commReviewPreview .comm-review-preview-head{padding:20px}
 #commReviewPreview .comm-review-checklist-link{margin:0 14px 14px;padding:18px}
 #commReviewScreen>.comm-review-actions>button{flex:1 1 140px}
 #commHome .comm-message-table thead{display:none}
 #commHome .comm-message-table,#commHome .comm-message-table tbody,#commHome .comm-message-table tr{display:block;width:100%}
 #commHome .comm-message-table tr{border-top:1px solid #e6dfea;padding:14px 0}
 #commHome .comm-message-table td{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border:0;flex-wrap:wrap}
 #commHome .comm-message-table td:before{font-weight:700;color:#65536d;font-size:12px}
 #commHome .comm-message-table td:nth-child(1):before{content:'Date & time'}
 #commHome .comm-message-table td:nth-child(2):before{content:'Caregiver'}
 #commHome .comm-message-table td:nth-child(3):before{content:'Opened'}
 #commHome .comm-message-table td:nth-child(4):before{content:'Submitted'}
 #commHome .comm-message-table td:last-child button{width:100%}
 .comm-drawer-body{padding:14px}.comm-drawer-head{padding:18px}.comm-drawer-head h2{font-size:19px}
 .dashboard-request-link{gap:10px;flex-wrap:wrap}.dashboard-request-link .dashboard-row-copy{min-width:140px}
 .caregiver-portal-link{font-size:16px}
}
