#followupGuideStep3Body>.followup-grid,#followupGuideStep3Body>#journeyExecutionHeading,#followup .followup-workboard{display:none!important}
.internal-followup-board{padding:16px;border:1px solid #dbe5f5;border-radius:16px;background:#fff;margin:12px 0}.internal-followup-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.internal-followup-head h3,.internal-followup-head h4{margin:0}.internal-followup-plan{display:grid;gap:10px}.internal-followup-edit{display:grid;grid-template-columns:50px minmax(160px,1.5fr) minmax(180px,1fr) minmax(140px,1fr);align-items:center;gap:10px;padding:10px 0;border-top:1px solid #e2e8f0}.internal-followup-edit label,.internal-task-dialog label{display:grid;gap:5px;font-size:14px}.internal-followup-edit input,.internal-followup-edit select,.internal-task-dialog input,.internal-task-dialog textarea{font:inherit;padding:10px;border:1px solid #b9cce6;border-radius:8px;width:100%;min-width:0;box-sizing:border-box}.internal-followup-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #e2e8f0}.internal-followup-row span{display:block;color:#526880;margin-top:4px}.internal-task-dialog{width:min(560px,calc(100% - 32px));box-sizing:border-box;border:1px solid #cbd5e1;border-radius:16px;padding:20px;color:#173b5c}.internal-task-dialog::backdrop{background:#14203966}.internal-task-dialog label{margin:14px 0}.internal-task-dialog textarea{min-height:90px}.internal-task-actions{display:flex;flex-wrap:wrap;gap:8px}@media(max-width:760px){.internal-followup-edit{grid-template-columns:1fr 1fr}.internal-followup-edit>b,.internal-followup-edit>label:first-of-type{grid-column:1/-1}.internal-followup-row{align-items:flex-start}.internal-task-dialog{padding:14px}}
.internal-followup-row{flex-wrap:wrap}.internal-followup-row>div{flex:1 1 220px;min-width:0;overflow-wrap:anywhere}.clinic-followup-task:has([data-internal-open]){flex-wrap:wrap}.clinic-followup-task:has([data-internal-open])>div{flex:1 1 160px}

#internalFollowupAnalytics .analytics-card{min-width:0;overflow-x:auto}#internalFollowupAnalytics table{width:100%;border-collapse:collapse;font:inherit;font-size:13px}#internalFollowupAnalytics th,#internalFollowupAnalytics td{padding:8px 6px;border-bottom:1px solid #e2e8f0;text-align:right;white-space:nowrap}#internalFollowupAnalytics th:first-child{text-align:left;white-space:normal;overflow-wrap:anywhere}#internalFollowupAnalytics .followup-analytics-kpis{grid-template-columns:repeat(6,minmax(0,1fr))}@media(max-width:650px){#internalFollowupAnalytics .followup-analytics-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}#internalFollowupAnalytics .followup-analytics-grid{grid-template-columns:1fr}}

#followupRecipientPreview{margin-top:16px;min-width:0}
#followupRecipientPreview>.followup-current,#followupRecipientPreview .followup-card-actions-badges,#followupRecipientPreview .followup-focus,#followupRecipientPreview .followup-message-tabs{display:none}
#followupRecipientPreview [hidden]{display:none!important}
#followupRecipientPreview h4{margin:0 0 8px}
#followupRecipientPreview p{margin:6px 0 12px;color:#52657d;font-size:14px}
#followupRecipientPreview .followup-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
#followupRecipientPreview textarea{width:100%;min-height:180px;font:inherit;line-height:1.6;box-sizing:border-box}
#followupRecipientPreview [data-recipient-media]{margin-top:12px}
#followupRecipientPreview [data-recipient-media] img{display:block;width:100%;max-width:360px;height:auto;margin:10px auto;border:1px solid #dbe5f5;border-radius:12px}
#followupRecipientPreview .followup-card-date{white-space:normal;text-align:right}
@media(max-width:700px){#followupRecipientPreview .followup-cards{grid-template-columns:1fr}}

/* Step four: current delivery first, optional history last. */
#followupGuideStep4Body .followup-messaging-head{justify-content:flex-end}
#followupGuideStep4Body .followup-messaging-head>div{display:none}
#followupGuideStep4Body .messaging-grid{margin-top:6px}
#followupGuideStep4Body .messaging-grid>.messaging-card:first-child>p,#followupGuideStep4Body .messaging-fields>.wide>small{display:none}
#followupGuideStep4Body .messaging-grid>.messaging-card:first-child .messaging-fields{grid-template-columns:1.1fr 1.4fr 1fr;align-items:end}
#followupGuideStep4Body .messaging-grid>.messaging-card:first-child .messaging-fields>.wide{grid-column:auto}
#followupGuideStep4Body #followupRecipientPreview{margin-top:12px}
#followupMessageConfirm{padding:12px 0}
#followupMessageConfirm .messaging-consent{margin-top:0}
#followupMessageHistory,#followupMessagePresetDetails{border:1px solid #dbe5f5;border-radius:12px;padding:12px;margin-top:10px;background:#fff}
#followupMessageHistory>summary,#followupMessagePresetDetails>summary,#followupMessageConfirm summary{cursor:pointer;font-size:14px;font-weight:700;line-height:1.6}
#followupMessageHistory>summary #messagingQueueSummary{font-size:13px!important;font-weight:400;margin-left:12px}
#followupMessageHistory .messaging-queue-list{max-height:420px;overflow:auto;overscroll-behavior:contain}
#followupMessageHistory #refreshMessagingJobs{margin-bottom:8px}
#followupMessageConfirm>details{margin-top:10px}
#followupMessagePresetDetails .followup-preset-panel{margin:10px 0 0}
@media(max-width:700px){#followupGuideStep4Body .messaging-grid>.messaging-card:first-child .messaging-fields{grid-template-columns:1fr}#followupMessageHistory>summary #messagingQueueSummary{display:block;margin:4px 0 0}#followupMessageHistory .messaging-queue-list{max-height:55vh}}
#followupGuideStep4Body .messaging-grid>.messaging-card:first-child .messaging-fields>.wide>small{display:none!important}
#guideMessagingIntro{padding:12px!important}
#guideMessagingIntro .eyebrow{display:none}
#guideMessagingIntro .guide-step-head{display:flex;align-items:center;gap:10px;margin-bottom:6px}
#guideMessagingIntro .guide-step-head h4{margin:0 0 4px}
#guideMessagingIntro .guide-callout{border:0;background:transparent;padding:0;margin:0}
#guideMessagingIntro .guide-step-tools{flex-shrink:0}
#followupGuideStep2Body.has-applied-plan:not(.show-plan-browser) #patientJourneyPanel{display:none}
.flow-plan-summary{background:white;border:1px solid #dbe5f5;border-radius:12px;padding:8px 14px;margin-bottom:12px}
.flow-plan-summary>div{display:flex;gap:14px;padding:10px 0;border-bottom:1px solid #eef2f7}.flow-plan-summary>div:last-child{border:0}.flow-plan-summary b{min-width:45px}
#followupGuideShell #scheduleFollowupMessages{display:none}
#followupMobileStepper{grid-template-columns:repeat(5,minmax(0,1fr))}
#followupAnalyticsDetails{padding:12px;margin-top:12px;background:white;border:1px solid #dbe5f5;border-radius:12px}#followupAnalyticsDetails>summary{cursor:pointer;font-weight:700}
#followupPriority{margin-bottom:12px}
#followupGuideStep5Body .guide-final-row{min-width:0}#followupGuideStep5Body p{font-size:14px;line-height:1.6}
#followupOperationHistory{margin-top:12px;border:1px solid #dbe5f5;border-radius:12px;padding:12px;background:white}#followupOperationHistory>summary{font-weight:700;cursor:pointer}.flow-delivery-history{max-height:400px;overflow:auto}.flow-delivery-history>div{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:10px 0;border-bottom:1px solid #eef2f7}
/* Shared typography and spacing for consultation/follow-up. */
#followup{font-family:inherit;font-size:15px;line-height:1.55}
#followup input,#followup select,#followup textarea,#followup button{font-family:inherit}
#followup h3{font-size:20px;font-weight:700}#followup h4{font-size:17px;font-weight:700}
#followup .btn,#followup .followup-guide-mode{font-size:14px!important;font-weight:600;min-height:40px;padding:8px 12px!important;border-radius:10px}
#followup .field-label,#followup .guide-summary-box b,#followup .guide-final-row b{font-size:15px;font-weight:600}
#followup .guide-step-head p,#followup .guide-callout,#followup .followup-guide-status,#followup .guide-final-row span,#followup .guide-summary-box span,#followup .messaging-consent,#followup .messaging-badge,#followup .followup-card-date,#followup .followup-message-editor-head,#followup .followup-message-edit-note{font-size:13px;line-height:1.5}
#followup .followup-guide-step b{font-size:14px;font-weight:600}#followup .followup-guide-step>span:not(.guide-num){font-size:12px}
#followup>.followup-hero,#followup .followup-guide-top>div:first-child,#followup .eyebrow{display:none}
#followup .followup-guide-top{margin:0 0 10px;align-items:center}#followup .followup-guide-mode-tabs{width:100%;align-items:center}
#followupGoBuilder{margin-left:auto}
#followup .followup-guide-shell{padding:12px;border:0;background:transparent}
#followup .guide-step-card{padding:12px;border:0;background:transparent}
#followup .followup-guide-nav{padding:8px 0;margin:8px 0;gap:8px}
#followup .guide-step-head{margin-bottom:8px}#followup .guide-callout{padding:8px 10px;margin-top:8px}
#followup .followup-card,#followup .messaging-card,#followup .internal-followup-board{border-radius:12px;padding:14px}
#followup .followup-card h4{margin-bottom:8px}
#followupRecipientPreview .followup-message-edit-note:not(.edited){display:none}
#followup .guide-final-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#followupPlanHelp{margin-top:10px;font-size:13px;color:#52657d}#followupPlanHelp summary{cursor:pointer;font-weight:600}#followupPlanHelp p{font-size:13px!important;line-height:1.6}
#followup .journey-card b,#followup .journey-detail-desc,#followup .journey-stage-preview-row,#followup .followup-preset-head span{font-size:14px}
#followup .followup-message-failure{grid-template-columns:100px minmax(0,1fr) auto;padding:12px 0;border-bottom:1px solid #e2e8f0}
#followup .followup-work-when,#followup .message-failure-main,#followup .internal-followup-row,#followup .flow-delivery-history{font-size:14px}
#followup .message-failure-main>span{font-size:13px;line-height:1.5}
#followup .followup-operation-overview{padding:12px;margin-bottom:12px}#followup .followup-operation-head p{font-size:13px}
@media(max-width:700px){#followup .guide-final-grid{grid-template-columns:1fr}#followup .followup-guide-shell{padding:0}#followup .followup-guide-mode-tabs{gap:6px}#followupGoBuilder{margin-left:0}#followup .followup-message-failure{grid-template-columns:1fr}#followup .followup-message-failure .followup-work-actions{justify-content:flex-start}#followup .followup-mobile-stepper b{font-size:11px;line-height:1.4}#followup .guide-step-tools{flex-wrap:wrap}}
#followup .messaging-privacy,#followup .messaging-template-help,#followup .messaging-platform,#followup .followup-preset-status,#followup .followup-work-when small,#followup .journey-tag,#followup .journey-detail-desc{font-size:13px;line-height:1.55;color:#52657d}
@media(max-width:700px){#followup .followup-guide-nav{display:grid;grid-template-columns:60px minmax(0,1fr) 100px;gap:8px;align-items:stretch}#followup .followup-guide-nav-left,#followup .followup-guide-nav-right{display:contents}#followup .followup-guide-status{display:none}#followup .followup-guide-nav .btn{min-width:0!important;min-height:44px;width:100%;white-space:normal;padding:8px!important}#followupGuideBack{grid-column:1}#followupGuideSkip{grid-column:2}#followupGuideNext{grid-column:3}}
/* Compact follow-up context and grouped delivery history. */
#followupContextSummary{display:none}
body:has(#followup.active-view) #caseContextBar{padding:8px 12px;min-height:0}
body:has(#followup.active-view) #caseContextBar>:not(#followupContextSummary){display:none!important}
body:has(#followup.active-view) #followupContextSummary{display:block;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
#followup .guide-callout[hidden]{display:none!important}
#followup .guide-summary-box.good{background:#f8fafc;border-color:#dbe5f5}
#followup .guide-summary-box{padding:10px 12px}
#followup .guide-summary-box b{font-weight:500}
#followup .guide-summary-box:first-child b{font-weight:700}
#followup .followup-empty,#followupPriority>div>p{margin:8px 0;font-size:14px;color:#52657d}
#followup .followup-history-patient{padding:8px 0;border-bottom:1px solid #e2e8f0}
#followup .followup-history-patient>summary{cursor:pointer;display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap}
#followup .followup-history-patient>summary b{font-weight:600}
#followup .followup-history-patient>summary span,#followup [data-history-identity]{font-size:13px;color:#52657d}
#followup .followup-history-row{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:8px 0;color:#52657d}
#followup .internal-followup-columns{display:grid;grid-template-columns:50px minmax(160px,1.5fr) minmax(180px,1fr) minmax(140px,1fr);gap:10px;font-size:13px;color:#52657d}
@media(min-width:761px){#followup .internal-field-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#followup .internal-followup-edit{padding:8px 0}}
@media(max-width:760px){#followup .internal-followup-columns{display:none}}
#followup .journey-card b,#followup .followup-card h4{overflow-wrap:anywhere}
#followup .followup-card h4{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer}
#followup .followup-card h4:focus,#followup .followup-card h4:hover{display:block;overflow:visible}
#followup .followup-card h4.expanded{display:block;overflow:visible}
#followup .crm-head p,#followup .crm-foot,#followup .crm-main>span,#followup .crm-kpi>span,#followup .followup-operation-kpi>span,#followup .guardian-survey-head p{font-size:13px;line-height:1.55}
#followup .crm-empty,#followup .guardian-survey-empty,#followup .journey-empty{padding:12px;min-height:0;font-size:14px;line-height:1.55}
#followup .crm-filter,#followup .crm-badge,#followup .crm-case-id,#followup .guardian-survey-foot{font-size:13px;line-height:1.5}
#followup .crm-panel,#followup .guardian-survey-panel{padding:14px;border-radius:12px}
/* Staff workflow controls: optional tasks, delivery consent and readable responses. */
#followup .survey-kpi span,#followup .survey-kpi small,#followup .survey-badge,#followup .survey-when,#followup .survey-when b,#followup .survey-main>span,#followup .survey-comment{font-size:13px;line-height:1.55}
#followup .survey-main>b,#followup .survey-empty{font-size:14px;line-height:1.55}
#followup .survey-empty{padding:12px;min-height:0}
#followup .guide-summary-box.neutral{border-color:#dbe5f5;background:#f8fafc}
#followup .followup-secondary{padding:10px 12px;margin:10px 0;border:1px solid #dbe5f5;border-radius:12px;background:#fff}
#followup .followup-secondary>summary,#followup .followup-method>summary{cursor:pointer;font-size:14px;font-weight:600}
#followup .followup-secondary>div{border:0;padding:12px 0 0;margin:0}
#followup .followup-method{margin-top:10px;font-size:13px}
#followup .followup-operation-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
#followup .followup-operation-kpi:nth-child(n+3){display:none}
#followup .internal-followup-edit,#followup .internal-followup-columns{grid-template-columns:100px minmax(160px,1.5fr) minmax(180px,1fr) minmax(140px,1fr)}
#followup .internal-day-toggle{display:flex;gap:8px;align-items:center;margin:0;cursor:pointer}
#followup .internal-day-toggle input{width:20px;height:20px;flex:none;accent-color:#2854ff;padding:0}
#followup .internal-followup-edit:has([data-task-enabled]:not(:checked)){background:#f5f7fa}
#followup .internal-followup-edit input:disabled,#followup .internal-followup-edit select:disabled{color:#65758b;background:#f1f4f8}
#followupVisibleSender{margin-top:10px;padding-top:8px;border-top:1px solid #dbe5f5}
#followupVisibleSender [data-sender-value]{font-size:14px;padding:5px 0}
#followup .messaging-fields>.wide:has(#followupVisibleSender){grid-column:1/-1}
#followup .messaging-fields .messaging-consent{margin:6px 0 0;padding:10px;font-size:13px}
#followup .messaging-consent label{display:flex;gap:8px;align-items:flex-start;line-height:1.6}
#followup .messaging-consent input{flex:none;margin-top:3px}
#followupFinalReview{font-size:14px;margin-bottom:12px;overflow-wrap:anywhere}
#followupFinalReview b{min-width:95px}
@media(max-width:760px){#followup .internal-followup-edit{grid-template-columns:1fr 1fr}#followup .internal-day-toggle{grid-column:1/-1}#followup .internal-followup-edit>label:nth-of-type(2){grid-column:1/-1}}
@media(max-width:700px){body:has(#followup.active-view.guide-mode-setup) #followupGuideNav{position:fixed;left:0;right:0;bottom:0;z-index:80;background:#fff;border-top:1px solid #dbe5f5;margin:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -3px 12px #173b5c12}#followup.guide-mode-setup{padding-bottom:110px}#followupFinalReview>div{flex-direction:column;gap:4px}}
@media(max-width:700px){body:has(#followup.active-view.guide-mode-setup :is(input:not([type=checkbox]),textarea,select):focus) #followupGuideNav{visibility:hidden;pointer-events:none}#followup :is(input,textarea,select){scroll-margin-block:120px}}

#followupMessageSelection{min-width:0;margin:12px 0 16px;padding:12px;border:1px solid #c7dedb;border-radius:10px;background:#f7fbfa}
#followupMessageSelection legend{padding:0 6px;font-size:14px;font-weight:700;color:#166b65}
.followup-message-selection-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.followup-message-selection-head>div{display:flex;gap:6px}
.followup-message-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:8px}
#followupMessageSelection .followup-message-options label{display:flex;align-items:center;gap:10px;margin:0;padding:10px;min-height:44px;border:1px solid #dae5e3;border-radius:8px;background:white;cursor:pointer}
#followupMessageSelection .followup-message-options label.selected{background:#e8f3f1;border-color:#19776e}
#followupMessageSelection input{width:18px;height:18px;margin:0;accent-color:#19776e;flex:none}
.followup-message-options b,.followup-message-options small{display:block;line-height:1.5}
.followup-message-options small{font-size:12px;color:#52657d}
#followupMessageSelection:disabled{opacity:.75}
#followupMessageSelection p{font-size:13px;margin:10px 0 0}

/* Focused follow-up preparation and unassigned-task controls. */
#followupMessageSelection .date-needs-review{border-color:#b66b37;background:#fff8ef}
#followupMessageSelection .date-warning{color:#914b20}
.followup-date-actions,.internal-followup-bulk{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0;font-size:13px}
.internal-followup-bulk label{display:flex;align-items:center;gap:8px;margin:0}
.internal-followup-bulk select{min-width:130px;max-width:100%;padding:8px;border:1px solid #cadbd8;border-radius:7px;background:#fff;color:inherit;font:inherit}
[data-recipient-preparation]{display:inline-block;margin:6px 8px;color:#52657d;font-size:12px}
[data-recipient-preparation].preparation-failed{color:#a13b2f}
@media(max-width:600px){.internal-followup-bulk label{flex-wrap:wrap}.internal-followup-bulk{align-items:flex-start}.internal-followup-bulk [data-bulk-result]{flex-basis:100%}}
