/* Planner-only visual system. PDF, narration and plan data are outside this scope. */
body.compact-workspace.three-step-workspace{--ui-space:8px;--ui-line:#dbe4eb;--ui-muted:#52677c;--ui-surface:#fff;--ui-soft:#f5f8fa;--ui-accent:#007d78;--ui-radius:12px;--ui-control:44px;background:#f4f6f8;color:#20334b}
body.compact-workspace.three-step-workspace main{max-width:1040px;padding-top:20px;padding-bottom:24px}
body.compact-workspace.three-step-workspace :is(button,select,input,summary){box-sizing:border-box}
body.compact-workspace.three-step-workspace main :is(button,.plan-more>summary){min-height:var(--ui-control);border-radius:8px;font-size:13px;line-height:1.35;padding:10px 14px}
body.compact-workspace.three-step-workspace main button.primary{background:#09295a;border:1px solid #09295a;color:#fff;font-weight:650}
body.compact-workspace.three-step-workspace main button.ghost{background:#fff;border:1px solid var(--ui-line);color:#39516b;box-shadow:none}
body.compact-workspace.three-step-workspace main button.text-btn{background:transparent;border-color:transparent;color:var(--ui-accent);padding-inline:8px}
body.compact-workspace.three-step-workspace main :is(button,input,select,summary):focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}
body.compact-workspace.three-step-workspace main button:disabled{opacity:.55;cursor:not-allowed}
body.compact-workspace.three-step-workspace main :is(h2,h3,p){letter-spacing:normal}
body.compact-workspace.three-step-workspace main h2{font-size:18px;line-height:1.4}
body.compact-workspace.three-step-workspace main h3{font-size:15px;line-height:1.4}
/* Keep clinic identity and plan actions on one line where space permits. */
body.compact-workspace.three-step-workspace header{min-height:56px;padding-top:8px;padding-bottom:8px}
body.compact-workspace.three-step-workspace header>.active-clinic-identity{gap:10px;padding-right:0}
body.compact-workspace.three-step-workspace .active-clinic-logo{width:40px;height:40px;flex:0 0 40px}
body.compact-workspace.three-step-workspace .active-clinic-identity strong{font-size:16px;line-height:1.35;overflow-wrap:anywhere}
body.compact-workspace.three-step-workspace .active-clinic-identity small{font-size:11px;letter-spacing:0}
body.compact-workspace.three-step-workspace .active-clinic-identity small[hidden]{display:none}

body.compact-workspace.three-step-workspace .heading{display:flex;flex-flow:row wrap;align-items:flex-start;justify-content:space-between;gap:4px 16px;margin-bottom:10px}
body.compact-workspace.three-step-workspace .plan-heading-title{display:flex;flex-wrap:wrap;align-items:center;gap:0 12px;min-height:44px}
body.compact-workspace.three-step-workspace .heading h1{font-size:24px;line-height:1.25;margin:0}
body.compact-workspace.three-step-workspace .heading #clinicStartup{min-height:44px;padding:8px 12px;background:#edf7f6;border:1px solid #9bbfbb;border-radius:8px;color:#14665f;font-size:12px;font-weight:600;text-align:center;cursor:pointer}
body.compact-workspace.three-step-workspace .heading #clinicStartup:hover{background:#dcefeb;border-color:#438d82;color:#07584f}
body.compact-workspace.three-step-workspace .heading>.patient-actions{display:grid;grid-template-columns:repeat(3,minmax(0,auto));grid-template-areas:none;gap:0 8px;align-items:start;max-width:100%;width:auto}
body.compact-workspace.three-step-workspace .heading .patient-actions>.plan-save-control{display:contents}
body.compact-workspace.three-step-workspace .heading .patient-actions :is(#newPatient,#savePlanRecord){grid-row:1;min-height:44px;margin:0;padding:8px 12px;font-size:13px;border-radius:8px}
body.compact-workspace.three-step-workspace .heading #newPatient{grid-column:1}
body.compact-workspace.three-step-workspace .heading #savePlanRecord{grid-column:2;min-width:0;width:auto}
body.compact-workspace.three-step-workspace .heading .plan-more{grid-column:3;grid-row:1;margin:0;padding:0}
body.compact-workspace.three-step-workspace .heading .plan-more>summary{display:grid;place-items:center;width:44px;height:44px;padding:0;margin:0;font-size:22px;line-height:1;border:1px solid var(--ui-line)}
body.compact-workspace.three-step-workspace .heading .patient-actions #planSaveStatus-savePlanRecord{grid-column:1/-1;grid-row:2;font-size:11px;line-height:18px;letter-spacing:0;display:flex;align-items:center;justify-content:flex-end;gap:6px;margin:4px 0 0;max-width:100%;overflow-wrap:anywhere;color:#805a19}
body.compact-workspace.three-step-workspace .heading .patient-actions #planSaveStatus-savePlanRecord[hidden]{display:none}
body.compact-workspace.three-step-workspace .heading .patient-actions #planSaveStatus-savePlanRecord:before{width:6px;height:6px;flex:none}
body.compact-workspace.three-step-workspace .heading .patient-actions #planSaveStatus-savePlanRecord[data-saved=true]{color:#146452}
body.compact-workspace.three-step-workspace .heading .patient-actions #planSaveFeedback-savePlanRecord{position:static;grid-column:1/-1;grid-row:3;width:100%;margin:4px 0 0;font-size:12px;z-index:auto}
body.compact-workspace.three-step-workspace #simplePlanGuide{gap:8px;margin:0 0 16px;padding:0}
body.compact-workspace.three-step-workspace #simplePlanGuide button{min-width:0;min-height:42px;border-radius:0;border-bottom:2px solid var(--ui-line);padding:8px 4px;background:transparent;font-size:13px;line-height:1.4;color:var(--ui-muted)}
body.compact-workspace.three-step-workspace #simplePlanGuide [aria-current]{border-bottom-color:var(--ui-accent);color:#006b65;font-weight:700;background:#eaf4f3}
body.compact-workspace.three-step-workspace #simplePlanGuide button[data-complete=true]:not([aria-current]):after{content:' ✓';color:#087867}
/* Patient entry: aligned labels, stable fields, a single continuation action. */
body.compact-workspace.three-step-workspace #simpleStep1 .patient-summary-panel{max-width:800px;padding:24px;margin:24px auto;background:#fff;border:1px solid var(--ui-line);border-radius:var(--ui-radius)}
body.compact-workspace.three-step-workspace #simpleStep1 .patient{grid-template-columns:minmax(0,1fr) 120px 200px!important;gap:16px;align-items:start}
body.compact-workspace.three-step-workspace #simpleStep1 .patient :is(small,.shared-patient-language>span){font-size:12px;line-height:18px;letter-spacing:0;font-weight:550;text-transform:none;color:var(--ui-muted)}
body.compact-workspace.three-step-workspace #simpleStep1 .patient :is(input,select){display:block;width:100%;max-width:none;min-height:44px;height:44px;margin:6px 0 0;padding:8px 12px;border:1px solid #cbd8e4;border-radius:8px;background:#fff;color:#20334b;font-size:15px;font-weight:450}
body.compact-workspace.three-step-workspace #simpleStep1 .patient .shared-patient-language{min-width:0;max-width:none;padding:0;border:0;margin:0}
body.compact-workspace.three-step-workspace #simpleStep1 .patient .language-help{font-size:11px;font-weight:400;margin-top:6px;max-width:none}
body.compact-workspace.three-step-workspace #simplePatientNext{margin-top:24px}
/* Compact context and optional shortcuts, then the full-width tooth chart. */
body.compact-workspace.three-step-workspace .simple-patient-bar{margin:0 0 8px;gap:8px;padding:0 0 8px;border-bottom:1px solid var(--ui-line);font-size:13px;min-height:40px}
body.compact-workspace.three-step-workspace #simplePatientLabel{font-weight:600;overflow-wrap:anywhere;min-width:0}
body.compact-workspace.three-step-workspace #simplePatientEdit{min-height:36px;font-size:12px;padding:6px 0}
body.compact-workspace.three-step-workspace #quickPackages{margin:8px 0;border:0;border-bottom:1px solid var(--ui-line);border-radius:0;background:transparent}
body.compact-workspace.three-step-workspace #simplePackagePicker>summary{min-height:40px;padding:8px 30px 8px 0;border:0;border-radius:0;background:transparent;font-size:13px;font-weight:600}
body.compact-workspace.three-step-workspace #simplePackagePicker>summary:after{right:8px}
body.compact-workspace.three-step-workspace #quickPackages>.applied-package-label{padding:8px 10px;margin:0 0 8px;font-size:12px;line-height:1.45;border-radius:6px}
body.compact-workspace.three-step-workspace #simpleCondition{margin:0 0 12px}
body.compact-workspace.three-step-workspace #simpleCondition>summary{min-height:40px;padding:10px 0;font-size:13px}
body.compact-workspace.three-step-workspace .chart{padding:16px;border-radius:var(--ui-radius);border-color:var(--ui-line);box-shadow:none}
body.compact-workspace.three-step-workspace .chart .section-title{align-items:start;gap:12px;margin:0 0 8px}
body.compact-workspace.three-step-workspace .chart .section-title h2{font-size:18px;margin:0 0 4px}
body.compact-workspace.three-step-workspace .chart .section-title p{margin:0;font-size:12px}
body.compact-workspace.three-step-workspace .chart #clear{min-height:36px;padding:7px 10px;font-size:12px}
body.compact-workspace.three-step-workspace .chart .treatment-legend{gap:6px 12px;font-size:11px;padding-top:8px}
body.compact-workspace.three-step-workspace #commonDentalPanel #planAddDock{padding:12px;margin-top:12px;gap:12px;border-color:var(--ui-line);border-radius:var(--ui-radius)}
/* Favourites keep their full identity in an immediate tooltip; labels stay compact. */
body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools{grid-template-columns:minmax(0,1fr) auto;gap:8px}
body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools #quickTreatmentShortcuts{grid-column:1!important;grid-row:1!important;gap:8px}
body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools>.planner-change-treatment{grid-column:2!important;grid-row:1!important;min-height:40px;padding:8px 12px}
body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools>.dock-visit-tools{grid-column:1/-1!important;grid-row:2!important;justify-content:flex-start;border-top:1px solid var(--ui-line);padding-top:8px;min-width:0;gap:8px}
body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools .dock-visit-tools label{display:block;position:static;width:auto;height:auto;clip:auto;clip-path:none;overflow:visible;white-space:normal;font-size:12px;color:var(--ui-muted);letter-spacing:0}
body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools #dockVisit{max-width:200px;min-height:40px;margin:0;font-size:13px}
body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools #dockAddStage{min-height:40px;margin-left:auto;font-size:12px}
body.compact-workspace.three-step-workspace #commonDentalPanel .treatment-shortcut{min-height:40px;max-width:156px;padding:5px 8px;border-color:var(--ui-line)}
body.compact-workspace.three-step-workspace #commonDentalPanel .treatment-shortcut[aria-pressed=true]{border-color:var(--ui-accent);background:#e9f5f2;color:#006b65}
body.compact-workspace.three-step-workspace #commonDentalPanel .treatment-shortcut .shortcut-icon{width:24px;height:28px;flex:none}
body.compact-workspace.three-step-workspace #commonDentalPanel #pendingTreatmentPicker:not([hidden]){padding:12px;gap:8px;background:var(--ui-soft);border-color:var(--ui-line);border-radius:10px}
body.compact-workspace.three-step-workspace #pendingTreatmentResults .pending-treatment-result{border-radius:6px;background:#fff;padding:8px 10px;gap:12px}
body.compact-workspace.three-step-workspace #commonDentalPanel #pendingTreatmentPicker #pendingTreatmentResults{max-height:200px;gap:6px}
body.compact-workspace.three-step-workspace #planAddDock .plan-add-actions{padding-top:12px}
body.compact-workspace.three-step-workspace #planAddDock :is(#commonQuote,#secondQuote,#restorationQuote){border-radius:8px;background:var(--ui-soft)}
/* A visit reads as one card; its metadata is subordinate to treatments. */
body.compact-workspace.three-step-workspace .plan{padding:16px;border:1px solid var(--ui-line);border-radius:var(--ui-radius);background:#fff;box-shadow:none}
body.compact-workspace.three-step-workspace .plan>.section-title{margin-bottom:16px;align-items:center}
body.compact-workspace.three-step-workspace .plan>.section-title h2{margin:0 0 4px}
body.compact-workspace.three-step-workspace .plan>.section-title p{font-size:12px;margin:0}
body.compact-workspace.three-step-workspace #stages .plan-visit{border:1px solid var(--ui-line);border-radius:10px;box-shadow:none;margin:0 0 12px;overflow:visible}
body.compact-workspace.three-step-workspace #stages .plan-visit>summary{min-height:64px;padding:12px 16px;border-radius:10px;background:#f0f6f6}
body.compact-workspace.three-step-workspace #stages .visit-body{padding:16px}
body.compact-workspace.three-step-workspace #stages .simple-visit-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;margin-bottom:12px;align-items:center;gap:8px}
body.compact-workspace.three-step-workspace #stages .simple-visit-toolbar>[data-add-visit-treatment]{grid-column:1;grid-row:1;justify-self:start}
body.compact-workspace.three-step-workspace #stages .simple-visit-toolbar .stage-head{display:contents}
body.compact-workspace.three-step-workspace #stages .simple-visit-toolbar .stage-fields{grid-column:2;grid-row:1;justify-self:end}
body.compact-workspace.three-step-workspace #stages .simple-visit-toolbar .operator-warning-group{grid-column:1/-1;grid-row:2;margin:0}
body.compact-workspace.three-step-workspace #stages .simple-visit-toolbar .operator-warning{margin:0;font-size:12px}
body.compact-workspace.three-step-workspace #stages .simple-visit-toolbar button{font-size:12px;min-height:36px;padding:8px 10px}
body.compact-workspace.three-step-workspace .simple-visit-settings{gap:12px;margin-bottom:16px}
body.compact-workspace.three-step-workspace .simple-visit-settings>.visit-info-tools,body.compact-workspace.three-step-workspace .simple-visit-settings>.visit-service-tools{background:transparent;border:0;border-radius:0;border-bottom:1px solid var(--ui-line);padding:0 0 12px;gap:6px;font-size:12px}
body.compact-workspace.three-step-workspace .simple-visit-settings p{font-size:12px;line-height:1.5;color:var(--ui-muted)}
body.compact-workspace.three-step-workspace .simple-visit-settings button{font-size:12px;min-height:36px;padding:8px 10px}
body.compact-workspace.three-step-workspace #stages .line-item{padding:12px;border:1px solid var(--ui-line);border-radius:8px;background:#fff;margin-top:8px}
body.compact-workspace.three-step-workspace #stages .line-item .item-summary small{font-size:12px;line-height:1.5;letter-spacing:0}
body.compact-workspace.three-step-workspace .simple-plan-footer{margin:16px 0 0;padding:16px 0;gap:12px}
body.compact-workspace.three-step-workspace main>footer{padding-top:16px;font-size:11px;gap:12px}
/* Proposal: total and outputs first, actionable checks next, details underneath. */
body.compact-workspace.three-step-workspace #simpleBackToPlan{min-height:36px;padding:8px 0;border:0;background:transparent;color:var(--ui-accent);font-size:12px}
body.compact-workspace.three-step-workspace #simpleStep3 #planReview{margin:8px 0 16px;padding:24px;background:#fff;color:#20334b;overflow:visible}
body.compact-workspace.three-step-workspace #simpleStep3 .review-title h2{font-size:20px;margin:0}
body.compact-workspace.three-step-workspace #simpleStep3 .review-patient{padding:12px 0;margin:0;display:flex;justify-content:space-between;gap:12px;overflow-wrap:anywhere;font-size:13px}
body.compact-workspace.three-step-workspace .simple-review-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,1fr);gap:24px;align-items:center;padding:20px;background:#f0f6f6;border:1px solid var(--ui-line);border-radius:10px}
.simple-review-amount{display:grid;gap:4px;min-width:0}
.simple-review-amount small{font-size:12px;color:var(--ui-muted);letter-spacing:0}
.simple-review-amount strong{font-size:30px;line-height:1.3;overflow-wrap:anywhere}
.simple-review-amount>span{font-size:12px;color:var(--ui-muted)}
body.compact-workspace.three-step-workspace .simple-review-overview .review-buttons{position:static;padding:0;background:transparent;box-shadow:none;border:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.compact-workspace.three-step-workspace .simple-review-overview .review-buttons>[data-review=proposal]{grid-column:1;grid-row:1}
body.compact-workspace.three-step-workspace .simple-review-overview .review-buttons>[data-review=animation]{grid-column:2;grid-row:1}
body.compact-workspace.three-step-workspace .simple-review-overview .review-buttons>.plan-save-control{display:grid;width:100%;max-width:none;min-width:0}
body.compact-workspace.three-step-workspace .simple-review-overview .review-buttons .plan-save-feedback{grid-column:1/-1}
body.compact-workspace.three-step-workspace #simpleStep3 #reviewSaveStatus{font-size:12px;line-height:1.5;margin:8px 0 12px}
body.compact-workspace.three-step-workspace #simpleStep3 #outputAvailability{padding:10px 0;margin:0;border:0;background:transparent;font-size:12px;color:var(--ui-muted)}
body.compact-workspace.three-step-workspace #outputAvailability p{margin:0;line-height:1.5}
body.compact-workspace.three-step-workspace #outputAvailability[data-video=false]{margin:12px 0;padding:12px;background:#fff7e6;border:1px solid #e5c77f;border-radius:8px;color:#70501a}
body.compact-workspace.three-step-workspace #proposalReadiness{padding:12px 16px;margin:12px 0;border-radius:8px;background:#f7f9fb;font-size:12px;line-height:1.5}
body.compact-workspace.three-step-workspace #proposalReadiness h3{font-size:13px;margin:0 0 8px}
body.compact-workspace.three-step-workspace #proposalReadiness .proposal-review-note{align-items:center;margin:8px 0;padding:10px 0;border-top:1px solid var(--ui-line);gap:12px}
body.compact-workspace.three-step-workspace .proposal-review-help{margin-top:8px;border-top:1px solid var(--ui-line);padding-top:4px}
body.compact-workspace.three-step-workspace .proposal-review-help>summary{min-height:36px;padding:8px 0;color:var(--ui-muted);font-size:12px}
body.compact-workspace.three-step-workspace #patientBrief{margin:12px 0;border-bottom:1px solid var(--ui-line);padding-bottom:8px;font-size:12px}
body.compact-workspace.three-step-workspace #patientBrief>summary{padding:8px 0;min-height:36px;font-size:13px}
body.compact-workspace.three-step-workspace .review-treatment-list>div{padding:16px 0;border-top:1px solid var(--ui-line);margin:0;background:transparent;border-radius:0}
body.compact-workspace.three-step-workspace .review-treatment-list h3{margin:0 0 4px;font-size:15px}
body.compact-workspace.three-step-workspace .review-treatment-list>div>small{font-size:12px;letter-spacing:0;color:var(--ui-muted)}
body.compact-workspace.three-step-workspace .review-treatment-list>div>p{gap:12px;padding:12px 0;margin:0;border-bottom:1px solid #edf1f4;align-items:start;font-size:13px}
body.compact-workspace.three-step-workspace .review-treatment-list>div>p small{font-size:12px;line-height:1.5;letter-spacing:0}
body.compact-workspace.three-step-workspace .simple-review-tools{gap:8px;margin:8px 0 0}
body.compact-workspace.three-step-workspace .simple-review-tools button{font-size:12px;min-height:36px;padding:8px 10px}
body.compact-workspace.three-step-workspace .simple-review-payments{margin-top:8px;padding:16px 0 0;border-top:1px solid var(--ui-line);font-size:13px}
body.compact-workspace.three-step-workspace .simple-review-payments h3{margin:0 0 8px}
body.compact-workspace.three-step-workspace .review-payment{padding:10px 0;margin:0;font-size:13px}
@media(max-width:1100px){
 body.compact-workspace.three-step-workspace header{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:1fr;height:56px;padding:6px 16px;gap:12px}
 body.compact-workspace.three-step-workspace header>.active-clinic-identity{grid-column:1;grid-row:1;padding:0;margin:0;min-width:0}
 body.compact-workspace.three-step-workspace header>.workspace-menu{grid-column:2;grid-row:1;min-height:44px;width:auto;padding:6px 12px;margin:0}
 body.compact-workspace.three-step-workspace .rail{top:56px;height:calc(100dvh - 56px)}
 body.compact-workspace.three-step-workspace .rail .logo{display:block}
 body.compact-workspace.three-step-workspace .workspace-menu-shade{inset:56px 0 0}
}
@media(max-width:850px){body.compact-workspace.three-step-workspace .simple-visit-settings{grid-template-columns:repeat(2,minmax(0,1fr))}body.compact-workspace.three-step-workspace .simple-visit-settings:has(.visit-info-editor),body.compact-workspace.three-step-workspace .simple-visit-settings:has(.visit-service-editor){grid-template-columns:1fr}}
@media(max-width:600px){
 body.compact-workspace.three-step-workspace main{padding:16px 14px 24px}
 body.compact-workspace.three-step-workspace .heading h1{font-size:20px}
 body.compact-workspace.three-step-workspace .heading .patient-actions #savePlanRecord{min-width:0;padding:10px 12px;font-size:12px}
 body.compact-workspace.three-step-workspace .heading>.patient-actions{margin-left:auto}
 body.compact-workspace.three-step-workspace #simplePlanGuide{gap:4px;margin-bottom:12px}
 body.compact-workspace.three-step-workspace #simplePlanGuide button{font-size:11px;padding:8px 3px;min-height:44px}
 body.compact-workspace.three-step-workspace #simpleStep1 .patient-summary-panel{margin:16px auto;padding:16px}
 body.compact-workspace.three-step-workspace #simpleStep1 .patient{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:16px}
 body.compact-workspace.three-step-workspace #simpleStep1 .patient>.patient-name-field{grid-column:1/-1}
 body.compact-workspace.three-step-workspace #simplePatientNext{width:100%;margin-top:20px}
 body.compact-workspace.three-step-workspace .simple-patient-bar{align-items:center}
 body.compact-workspace.three-step-workspace .simple-patient-bar #simplePatientLabel{flex:1 1 160px}
 body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools #quickTreatmentShortcuts{grid-column:1/-1!important}
 body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools>.planner-change-treatment{grid-column:2!important;grid-row:2!important;font-size:12px;padding:8px}
 body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools>.dock-visit-tools{grid-column:1!important;grid-row:2!important;border:0;padding:0;flex-wrap:wrap;gap:6px}
 body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools .dock-visit-tools label{flex-basis:100%;font-size:11px}
 body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools #dockVisit{max-width:140px;min-height:44px}
 body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools #dockAddStage{margin-left:0;padding:8px;min-height:44px}
 body.compact-workspace.three-step-workspace .simple-visit-settings{grid-template-columns:1fr}
 body.compact-workspace.three-step-workspace .chart,body.compact-workspace.three-step-workspace .plan{padding:12px}
 body.compact-workspace.three-step-workspace #stages .visit-body{padding:12px}
 body.compact-workspace.three-step-workspace #simpleStep3 #planReview{padding:16px}
 body.compact-workspace.three-step-workspace .simple-review-overview{grid-template-columns:1fr;padding:16px;gap:16px}
 body.compact-workspace.three-step-workspace .simple-review-overview .review-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.compact-workspace.three-step-workspace .simple-review-overview .review-buttons button{font-size:12px;padding:10px 8px}
 body.compact-workspace.three-step-workspace .review-treatment-list>div>p{flex-wrap:wrap}
 body.compact-workspace.three-step-workspace .review-treatment-list>div>p>span{flex:1 1 65%;min-width:0}
 body.compact-workspace.three-step-workspace .review-treatment-list>div>p>button{margin-left:auto;min-height:36px;font-size:12px}
 body.compact-workspace.three-step-workspace .simple-plan-footer button{flex:0 1 auto}
}
@media(prefers-reduced-motion:reduce){body.compact-workspace.three-step-workspace *{scroll-behavior:auto}}

/* Complete the shared treatment editor controls without changing the tooth chart or dialog workflows. */
body.compact-workspace.three-step-workspace{--ui-field-font:14px;--ui-label-font:12px;--ui-gap:8px;--ui-section-gap:16px}
body.compact-workspace.three-step-workspace :is(#planAddDock,.simple-visit-settings,.payment-quote-editor,.quick-line-editor,.visit-info-editor,.visit-service-editor) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){box-sizing:border-box;min-width:0;max-width:100%;min-height:44px;padding:10px 12px;border:1px solid #cbd8e4;border-radius:8px;background:#fff;color:#20334b;font-family:inherit;font-size:var(--ui-field-font);font-weight:400;line-height:1.4;letter-spacing:0}
body.compact-workspace.three-step-workspace :is(#commonQuote,#secondQuote,#restorationQuote,.quick-line-editor,.visit-info-editor,.visit-service-editor,.payment-quote-editor) label{min-width:0;font-size:var(--ui-label-font);line-height:1.5;letter-spacing:0;color:var(--ui-muted)}
body.compact-workspace.three-step-workspace :is(#commonQuote,#secondQuote,#restorationQuote,.quick-line-editor,.visit-info-editor,.visit-service-editor,.payment-quote-editor) label>small{font-size:11px;letter-spacing:0;line-height:1.45;font-weight:400}
body.compact-workspace.three-step-workspace :is(#planAddDock,.simple-visit-settings,.simple-review-tools,.simple-visit-toolbar,.quick-line-actions) button:not(.text-btn){min-height:44px;line-height:1.4;padding:10px 12px}
body.compact-workspace.three-step-workspace #commonDentalPanel .simple-treatment-tools :is(#dockVisit,#dockAddStage,.planner-change-treatment,.treatment-shortcut){min-height:44px}
body.compact-workspace.three-step-workspace :is(.quick-line-editor,.visit-info-editor,.visit-service-editor,.payment-quote-editor) :is(.editor-actions,.visit-info-actions,.visit-service-actions){gap:var(--ui-gap);margin-top:var(--ui-section-gap);display:flex;flex-wrap:wrap}
body.compact-workspace.three-step-workspace :is(.quick-line-editor,.visit-info-editor,.visit-service-editor,.payment-quote-editor){box-shadow:none;border-radius:8px}
/* The urgency is visible in words as well as a consistent border and colour. */
body.compact-workspace.three-step-workspace #simpleStep3 #outputAvailability[data-tone],
body.compact-workspace.three-step-workspace #proposalReadiness[data-tone],
body.compact-workspace.three-step-workspace .review-issues{padding:12px 16px;margin:12px 0;border:1px solid var(--ui-line);border-inline-start:3px solid #7b93a8;border-radius:8px;background:#f5f8fb;color:#39516b;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
body.compact-workspace.three-step-workspace #simpleStep3 #outputAvailability[data-tone=success]{border-color:#c2ded5;border-inline-start-color:#19806b;background:#f2f9f6;color:#285e50}
body.compact-workspace.three-step-workspace #simpleStep3 #outputAvailability[data-tone=warning],
body.compact-workspace.three-step-workspace #proposalReadiness[data-tone=warning]{border-color:#e5d5a8;border-inline-start-color:#b98121;background:#fffaf0;color:#74521d}
body.compact-workspace.three-step-workspace #simpleStep3 #outputAvailability[data-tone=error],
body.compact-workspace.three-step-workspace .review-issues{border-color:#e9c0c0;border-inline-start-color:#b64046;background:#fff5f5;color:#8b3036}
body.compact-workspace.three-step-workspace .review-issues ul{margin:8px 0;padding-inline-start:18px}
body.compact-workspace.three-step-workspace .review-issues li{margin:6px 0}
body.compact-workspace.three-step-workspace .review-issues button{margin-top:8px;min-height:44px;white-space:normal}
body.compact-workspace.three-step-workspace #outputAvailability button{margin:8px 8px 0 0;min-height:44px;text-align:left;white-space:normal}
body.compact-workspace.three-step-workspace #proposalReadiness .proposal-review-note{border-top-color:#e5d5a8}
body.compact-workspace.three-step-workspace #proposalReadiness .proposal-review-note .text-btn{color:#74521d;text-decoration:underline;text-underline-offset:3px}
body.compact-workspace.three-step-workspace #simpleStep3 #reviewSaveStatus{color:var(--ui-muted);font-size:11px;margin:4px 0 12px}
body.compact-workspace.three-step-workspace #simpleStep3 #reviewSaveStatus[data-saved=true]{color:#146452}
@media(max-width:600px){
 body.compact-workspace.three-step-workspace :is(#planAddDock,.simple-visit-settings,.visit-info-editor,.visit-service-editor,.payment-quote-editor,.quick-line-editor) :is(input:not([type=checkbox]):not([type=radio]),select){font-size:16px!important}
 body.compact-workspace.three-step-workspace #proposalReadiness .proposal-review-note{flex-wrap:wrap;gap:4px}
 body.compact-workspace.three-step-workspace #proposalReadiness .proposal-review-note .text-btn{min-height:44px;padding:10px 0}
 body.compact-workspace.three-step-workspace #commonDentalPanel .treatment-shortcut{min-height:44px}
}

body.compact-workspace.three-step-workspace :is(.visit-info-editor,.visit-service-editor,.quick-line-editor,.payment-quote-editor) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select){height:44px}
body.compact-workspace.three-step-workspace :is(.chart #clear,#pendingTreatmentPicker>button,.simple-review-tools button,.simple-plan-footer button){min-height:44px}

#siteRateReview label{display:grid;gap:6px;margin:14px 0}#siteRateReview label[hidden]{display:none}#siteRateReview [data-site-rate-zero]{display:flex;align-items:flex-start;padding:12px;background:#fff8e7;border:1px solid #dfc57d;border-radius:8px}#siteRateReview input[data-site-rate]{min-height:44px;padding:10px;font-size:16px}#siteRateReview [data-site-rate-error]:empty{display:none}#siteRateReview button{min-height:44px}

/* Audit U06: keep room for actual settings on compact screens. */
@media(max-width:900px){.clinic-settings-mode .setup-nav{padding:12px 18px}.clinic-settings-mode .setup-nav .wordmark{display:none}.clinic-settings-mode .setup-nav nav{display:flex;flex-wrap:wrap;gap:4px}.clinic-settings-mode .setup-nav nav button{padding:8px 10px;min-height:36px;flex:1 1 40%}.clinic-settings-mode .clinic-extra-settings{padding-top:6px;margin-top:6px}.clinic-settings-mode .clinic-extra-settings>small{display:none}.clinic-settings-mode .setup-main{padding-top:16px}}

.activity-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.activity-filters label{display:grid;gap:6px}.package-preview{max-width:760px}.package-preview li{margin:8px 0}

/* Patient form: use the same label and control tracks in each column. */
body.compact-workspace.three-step-workspace #simpleStep1 .patient>:is(.patient-name-field,.patient-currency-field,.shared-patient-language){display:grid;grid-template-rows:18px 44px auto;gap:8px;align-content:start;min-width:0}
body.compact-workspace.three-step-workspace #simpleStep1 .patient :is(input,select){margin:0}
body.compact-workspace.three-step-workspace #simpleStep1 .patient .language-help{margin:0;line-height:1.5;color:var(--ui-muted)}
body.compact-workspace.three-step-workspace #simpleStep1 .patient #patientContinueHint{margin:0;grid-column:1/-1;font-size:12px;line-height:1.5}
body.compact-workspace.three-step-workspace .heading .patient-actions #reset{grid-column:3;grid-row:1;min-height:44px;margin:0;padding:8px 12px;font-size:13px;white-space:nowrap;color:var(--ui-muted)}
@media(max-width:600px){body.compact-workspace.three-step-workspace #simpleStep1 .patient{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}body.compact-workspace.three-step-workspace #simpleStep1 .patient .patient-name-field{grid-column:1/-1}body.compact-workspace.three-step-workspace #simpleStep1 .patient-summary-panel{padding:20px;margin:16px auto}}

/* Patient context, package selection and existing-condition controls. */
body.compact-workspace.three-step-workspace .simple-patient-bar{padding:14px 16px;margin:8px 0 16px;border:1px solid #c5dce0;border-left:4px solid #008d8b;border-radius:12px;background:#edf6f6;gap:12px}
body.compact-workspace.three-step-workspace #simplePatientLabel{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px}
body.compact-workspace.three-step-workspace .simple-patient-name{font-size:18px;line-height:1.35;color:#16364c;font-weight:700;overflow-wrap:anywhere}
body.compact-workspace.three-step-workspace #simplePatientLabel>span{display:inline-flex;align-items:center;padding:5px 9px;border-radius:6px;font-size:12px;line-height:1.3;background:#fff;border:1px solid #cfdfdf;color:#315563;font-weight:600}
body.compact-workspace.three-step-workspace #simplePatientLabel>.simple-patient-currency{background:#dcefeb;color:#075d54;border-color:#b7d9d0}
body.compact-workspace.three-step-workspace #simplePatientEdit{padding:8px 10px;min-height:40px;border:1px solid #bfd6d5;border-radius:7px;background:#fff;white-space:normal}
body.compact-workspace.three-step-workspace #quickPackages{padding:0;margin:0 0 16px;border:1px solid var(--ui-line);border-radius:12px;background:#fff;overflow:hidden}
body.compact-workspace.three-step-workspace #simplePackagePicker>summary{min-height:48px;padding:12px 42px 12px 16px;background:#f7fafb;font-size:14px;border-radius:0}
body.compact-workspace.three-step-workspace #simplePackagePicker>summary:after{right:16px}
body.compact-workspace.three-step-workspace #simplePackagePicker .quick-packages-heading{margin:0 16px;padding:8px 0 0}
body.compact-workspace.three-step-workspace #quickPackageHint{margin:6px 16px 12px;font-size:12px;line-height:1.5}
body.compact-workspace.three-step-workspace #simplePackagePicker #quickPackageList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 16px 16px;padding:0;max-height:280px;overflow:auto}
body.compact-workspace.three-step-workspace #quickPackageList>.quick-package{min-width:0;max-width:none;min-height:52px;padding:12px;white-space:normal;border:1px solid #cedfdf;background:#f6faf9;color:#235b5a;border-radius:8px;line-height:1.45}
body.compact-workspace.three-step-workspace #quickPackages>.applied-package-label{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin:0;padding:12px 16px;border-radius:0;border:0;border-top:1px solid #c8dfd8;background:#eaf5f0;font-size:13px}
body.compact-workspace.three-step-workspace #quickPackages>.applied-package-label[hidden]{display:none}
body.compact-workspace.three-step-workspace #removeAppliedPackage{flex:none;background:#fff;border:1px solid #a8cabe;color:#285e50;padding:8px 12px;min-height:40px}
body.compact-workspace.three-step-workspace #quickPackageStatus:not(:empty){padding:8px 16px;margin:0;font-size:12px}
body.compact-workspace.three-step-workspace #simpleCondition{border:1px solid var(--ui-line);border-radius:12px;background:#fff;overflow:clip;margin-bottom:16px}
body.compact-workspace.three-step-workspace #simpleCondition>summary{padding:12px 16px;font-weight:600;min-height:48px;background:#f7fafb}
body.compact-workspace.three-step-workspace #simpleCondition #common-condition-pane{padding:0;border:0;background:transparent}
body.compact-workspace.three-step-workspace #initialDentalEditor{position:static;margin:0;padding:16px;border:0;border-top:1px solid #dce6e8;border-radius:0;background:#fff;box-shadow:none}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-heading{display:block;margin-bottom:12px}
body.compact-workspace.three-step-workspace #initialDentalEditor h3{font-size:15px;color:#203c50}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-selected-label{margin:6px 0 0;padding:8px 10px;background:#edf6f5;border-radius:6px;font-size:12px;font-weight:500}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-group{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-group>span:not(.initial-blocked-option){display:none}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-group button{width:100%;min-height:44px;margin:0;font-size:13px}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-footer{display:block;margin-top:12px;padding-top:12px;border-top:1px solid #e4ebef}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-footer small{min-width:0;font-size:12px;font-weight:400;margin:0 0 12px;line-height:1.5}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-actions{justify-content:flex-end;gap:8px}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-actions button{min-height:40px;font-size:12px}
@media(max-width:600px){body.compact-workspace.three-step-workspace .simple-patient-bar{padding:12px;align-items:flex-start}body.compact-workspace.three-step-workspace #simplePatientEdit{width:100%}body.compact-workspace.three-step-workspace #simplePackagePicker #quickPackageList{grid-template-columns:minmax(0,1fr)}body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}body.compact-workspace.three-step-workspace #initialDentalEditor #leaveInitialDental{grid-column:1/-1}body.compact-workspace.three-step-workspace #removeAppliedPackage{width:100%}}

/* Completed inputs stay in compact summary rows; the chart comes first. */
body.compact-workspace.three-step-workspace .simple-patient-bar{min-height:42px;margin:4px 0 8px;padding:6px 10px;border-left-width:3px;border-radius:8px;gap:8px}
body.compact-workspace.three-step-workspace #simplePatientLabel{flex:1;min-width:0;gap:6px}
body.compact-workspace.three-step-workspace .simple-patient-name{font-size:17px;font-weight:800;max-width:min(50vw,420px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.compact-workspace.three-step-workspace #simplePatientLabel>span{font-size:13px;font-weight:750;padding:2px 7px}
body.compact-workspace.three-step-workspace #simplePatientEdit{min-height:36px;width:auto;padding:6px 10px;font-size:12px;flex:none}
body.compact-workspace.three-step-workspace #quickPackages{margin:0 0 8px;border-radius:8px}
body.compact-workspace.three-step-workspace #quickPackages:has(#simplePackagePicker:not([open])){display:flex;align-items:center;flex-wrap:wrap;background:#f6faf9;gap:0}
body.compact-workspace.three-step-workspace #quickPackages:has(#simplePackagePicker:not([open])) #simplePackagePicker{flex:0 0 auto;min-width:0}
body.compact-workspace.three-step-workspace #simplePackagePicker:not([open])>summary{min-height:40px;padding:8px 30px 8px 10px;font-size:12px;line-height:1.4;background:transparent}
body.compact-workspace.three-step-workspace #simplePackagePicker:not([open])>summary:after{right:8px}
body.compact-workspace.three-step-workspace #quickPackages>.applied-package-label{flex:1 1 280px;min-width:0;min-height:40px;padding:4px 8px;margin:0;border:0;gap:8px;flex-wrap:nowrap;font-size:12px;background:transparent}
body.compact-workspace.three-step-workspace #quickPackages .applied-package-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.compact-workspace.three-step-workspace #removeAppliedPackage{min-height:36px;width:auto;padding:6px 9px;font-size:12px}
body.compact-workspace.three-step-workspace #simpleCondition{margin:0 0 8px;border-radius:8px}
body.compact-workspace.three-step-workspace #simpleCondition:not([open])>summary{min-height:36px;padding:8px 10px;font-size:12px;line-height:1.45;background:#f8fafb}
body.compact-workspace.three-step-workspace .simple-selection-tools{margin-top:12px}
@media(max-width:600px){body.compact-workspace.three-step-workspace #simplePatientLabel{flex:1 1 200px}body.compact-workspace.three-step-workspace .simple-patient-name{max-width:100%}body.compact-workspace.three-step-workspace #quickPackages>.applied-package-label{flex-basis:100%;border-top:1px solid #e1e9e7}body.compact-workspace.three-step-workspace #simplePatientEdit{width:auto}body.compact-workspace.three-step-workspace #removeAppliedPackage{width:auto}}

/* Compact existing condition editor with a clear return to treatment selection. */
body.compact-workspace.three-step-workspace #initialDentalEditor{padding:10px 12px}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-heading{display:flex;align-items:center;justify-content:space-between;gap:6px 12px;flex-wrap:wrap;margin-bottom:8px}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-selected-label{margin:0;padding:4px 8px}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-footer{display:flex;align-items:center;gap:8px 12px;margin-top:8px;padding-top:8px}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-footer small{flex:1 1 230px;margin:0;line-height:1.4}
body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-actions{flex:0 1 auto;gap:6px}
body.compact-workspace.three-step-workspace #initialDentalEditor #leaveInitialDental{background:#0c2d61;border-color:#0c2d61;color:#fff;font-weight:750;padding:8px 14px;min-height:44px}
body.compact-workspace.three-step-workspace #initialDentalEditor #leaveInitialDental:hover{background:#17477c;border-color:#17477c}
body.compact-workspace.three-step-workspace #initialDentalEditor #leaveInitialDental:focus-visible{outline:3px solid #008d8b;outline-offset:3px}
@media(max-width:600px){body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-actions{width:100%}}

@media(max-width:600px){body.compact-workspace.three-step-workspace #initialDentalEditor .initial-quick-actions{display:flex;justify-content:flex-end}body.compact-workspace.three-step-workspace #initialDentalEditor #leaveInitialDental{flex:1}}

/* Selected audit changes 3/4: compact payments and the original mobile plan tools. */
body.compact-workspace.three-step-workspace .payment-quote-editor{width:100%;max-width:920px;margin:14px auto;padding:20px;gap:14px;background:#fff}
body.compact-workspace.three-step-workspace .payment-quote-editor h3,body.compact-workspace.three-step-workspace .payment-quote-editor p{margin:0}
body.compact-workspace.three-step-workspace .payment-quote-financial-fields,body.compact-workspace.three-step-workspace .payment-quote-visit-amounts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px}
body.compact-workspace.three-step-workspace .payment-quote-financial-fields>small{align-self:center;font-size:12px;line-height:1.5;letter-spacing:normal;color:var(--ui-muted)}
body.compact-workspace.three-step-workspace .payment-quote-editor>.ghost{justify-self:start}
body.compact-workspace.three-step-workspace .payment-quote-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:14px;background:#f0f7f6;border:1px solid #d4e5e2;border-radius:8px}
body.compact-workspace.three-step-workspace .payment-quote-totals>div{display:grid;gap:6px;min-width:0}
body.compact-workspace.three-step-workspace .payment-quote-totals span{font-size:12px;color:var(--ui-muted)}
body.compact-workspace.three-step-workspace .payment-quote-totals strong{font-size:20px;overflow-wrap:anywhere}
.mobile-plan-actions[hidden]{display:none!important}
body.compact-workspace .rail-actions .mobile-plan-actions{display:grid;gap:6px;padding-bottom:12px;margin-bottom:8px;border-bottom:1px solid #ffffff30}
body.compact-workspace .rail-actions .mobile-plan-actions button{width:100%;min-height:44px;text-align:left}
@media(max-width:800px){
 body.compact-workspace.three-step-workspace.mobile-plan-tools .heading{flex-wrap:nowrap;gap:8px;align-items:flex-start}
 body.compact-workspace.three-step-workspace.mobile-plan-tools .plan-heading-title{flex-wrap:nowrap;gap:8px;min-width:0;flex:1}
 body.compact-workspace.three-step-workspace.mobile-plan-tools .heading h1{font-size:18px}
 body.compact-workspace.three-step-workspace.mobile-plan-tools .heading #clinicStartup{min-height:36px;font-size:11px;padding:6px 8px}
 body.compact-workspace.three-step-workspace.mobile-plan-tools .heading>.patient-actions{grid-template-columns:minmax(0,auto);margin-left:0;flex:0 0 auto}
 body.compact-workspace.three-step-workspace.mobile-plan-tools .heading #savePlanRecord{grid-column:1;font-size:12px;padding:8px}
}
@media(max-width:600px){
 body.compact-workspace.three-step-workspace .payment-quote-editor{padding:14px}
 body.compact-workspace.three-step-workspace .payment-quote-financial-fields,body.compact-workspace.three-step-workspace .payment-quote-visit-amounts{grid-template-columns:minmax(0,1fr)}
 body.compact-workspace.three-step-workspace .payment-quote-totals{grid-template-columns:minmax(0,1fr)}
 body.compact-workspace.three-step-workspace .payment-quote-totals>div{display:flex;align-items:center;justify-content:space-between;gap:12px}
 body.compact-workspace.three-step-workspace .payment-quote-totals strong{font-size:18px}
}
@media(max-width:380px){body.compact-workspace.three-step-workspace.mobile-plan-tools .plan-heading-title{flex-wrap:wrap}}

body.compact-workspace.three-step-workspace .payment-quote-editor{scroll-margin-top:80px}

/* Patient information above a consistent action row on compact screens. */
body.compact-workspace.three-step-workspace:is([data-simple-step="2"],[data-simple-step="3"],[data-simple-step="4"]) .heading{display:none!important}
body.compact-workspace.three-step-workspace .simple-patient-bar{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px 12px}
body.compact-workspace.three-step-workspace .simple-patient-bar #simplePatientLabel{min-width:0;align-content:center}
body.compact-workspace.three-step-workspace .simple-patient-bar .simple-patient-name{flex-basis:100%;max-width:100%;white-space:normal;overflow-wrap:anywhere}
body.compact-workspace.three-step-workspace .simple-patient-bar #simplePatientEdit{min-height:44px;padding:8px 14px;align-self:end}
body.compact-workspace.three-step-workspace .simple-patient-bar>.plan-save-control{display:flex;flex-direction:column;align-items:flex-end;gap:4px;max-width:240px;position:relative}
body.compact-workspace.three-step-workspace .simple-patient-bar #savePlanRecord{min-height:44px;padding:8px 14px;background:var(--ui-primary,#09295a);color:white;border:0;border-radius:8px;font-weight:600;white-space:nowrap}
body.compact-workspace.three-step-workspace .simple-patient-bar .plan-save-status{margin:0;font-size:11px;line-height:1.4;letter-spacing:0;text-align:right;overflow-wrap:anywhere}
body.compact-workspace.three-step-workspace .simple-patient-bar .plan-save-feedback{position:static;margin:0;width:auto;font-size:12px}
body.compact-workspace.three-step-workspace #simpleStep3>.simple-patient-bar{background:#f4fbfa;border:1px solid #cbdedc;border-left:3px solid #438d82;border-radius:12px;padding:10px 12px;margin:8px 0 12px}
body.compact-workspace.three-step-workspace #simpleStep3 .review-patient{display:none}
@media(max-width:600px){
 body.compact-workspace.three-step-workspace .simple-patient-bar{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}
 body.compact-workspace.three-step-workspace .simple-patient-bar #simplePatientLabel{grid-column:1/-1;grid-row:1;padding-bottom:10px;border-bottom:1px solid #dce9e7}
 body.compact-workspace.three-step-workspace .simple-patient-bar #simplePatientEdit{grid-column:1;grid-row:2;justify-self:stretch;align-self:end;width:100%;min-height:44px;padding:8px 12px}
 body.compact-workspace.three-step-workspace .simple-patient-bar>.plan-save-control{grid-column:2;grid-row:2;align-self:end;align-items:stretch;width:100%;max-width:none}
 body.compact-workspace.three-step-workspace .simple-patient-bar #savePlanRecord{width:100%;padding:8px 12px;font-size:12px}
}

/* Keep travel reminders discoverable without repeating every visit in the overview. */
body.compact-workspace.three-step-workspace #proposalReadiness .proposal-travel-review>summary{min-height:44px;padding:12px 0;font-weight:600;cursor:pointer;line-height:1.5}
body.compact-workspace.three-step-workspace #proposalReadiness .proposal-travel-review>summary:focus-visible{outline:2px solid currentColor;outline-offset:3px;border-radius:4px}
body.compact-workspace.three-step-workspace #proposalReadiness .proposal-travel-review .proposal-review-note{margin:0;padding:10px 0}

/* Available animation is a clear secondary action beside the primary PDF action. */
body.compact-workspace.three-step-workspace .simple-review-overview .review-buttons>button[data-review=animation]:enabled{background:#edf3fc;border:1px solid #365d91;color:#163b70;font-weight:650;opacity:1;box-shadow:none}
body.compact-workspace.three-step-workspace .simple-review-overview .review-buttons>button[data-review=animation]:enabled:hover{background:#dfeafa;border-color:#163b70}
body.compact-workspace.three-step-workspace .simple-review-overview .review-buttons>button[data-review=animation]:disabled{background:#eef1f4;border:1px dashed #aebbc9;color:#52677c;opacity:1;cursor:not-allowed}

/* Local review: navigation shares the header with a visible clinic identity. */
body.compact-workspace.three-step-workspace.steps-in-header header{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,30%);align-items:center;gap:12px 24px;height:auto;min-height:64px}
body.compact-workspace.three-step-workspace.steps-in-header header #simplePlanGuide{grid-column:1;grid-row:1;min-width:0;gap:8px;margin:0!important;padding:0}
body.compact-workspace.three-step-workspace.steps-in-header header #simplePlanGuide button{flex:1;min-width:0;min-height:44px;font-size:13px;line-height:1.35;padding:8px 6px;cursor:pointer}
body.compact-workspace.three-step-workspace.steps-in-header header #simplePlanGuide button:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}
body.compact-workspace.three-step-workspace.steps-in-header header>.active-clinic-identity{grid-column:2;grid-row:1;justify-self:end;justify-content:flex-end;max-width:100%;min-width:0;width:auto;padding:0;margin:0;text-align:right}
body.compact-workspace.three-step-workspace.steps-in-header .active-clinic-identity strong{white-space:normal;overflow-wrap:anywhere}
body.compact-workspace.three-step-workspace.steps-in-header main{padding-top:12px}
@media(max-width:1100px){
 body.compact-workspace.three-step-workspace.steps-in-header header{grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;gap:8px 12px;padding:8px 16px}
 body.compact-workspace.three-step-workspace.steps-in-header header>.workspace-menu{grid-column:1;grid-row:1;justify-self:start}
 body.compact-workspace.three-step-workspace.steps-in-header header>.active-clinic-identity{grid-column:2;grid-row:1}
 body.compact-workspace.three-step-workspace.steps-in-header header #simplePlanGuide{grid-column:1/-1;grid-row:2;gap:4px}
 body.compact-workspace.three-step-workspace.steps-in-header .rail{top:var(--planner-header-height,112px);height:calc(100dvh - var(--planner-header-height,112px))}
 body.compact-workspace.three-step-workspace.steps-in-header .workspace-menu-shade{top:var(--planner-header-height,112px)}
}
@media(max-width:600px){
 body.compact-workspace.three-step-workspace.steps-in-header header{padding-inline:14px}
 body.compact-workspace.three-step-workspace.steps-in-header header #simplePlanGuide button{font-size:11px;padding:8px 3px}
 body.compact-workspace.three-step-workspace.steps-in-header .active-clinic-identity strong{font-size:14px}
}

/* One compact visit logistics group, with the existing editors and handlers. */
body.compact-workspace.three-step-workspace .simple-visit-settings{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:0 16px;margin:12px 0 0;padding:12px;border:1px solid #dce7e6;border-radius:10px;background:#f7faf9}
body.compact-workspace.three-step-workspace .visit-logistics-title{display:block;grid-column:1/-1;margin:0 0 6px;font-size:13px;color:#244c55;line-height:1.5}
body.compact-workspace.three-step-workspace .simple-visit-settings>:is(.visit-info-tools,.visit-service-tools){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 12px;padding:8px 0;margin:0;border:0;background:transparent}
body.compact-workspace.three-step-workspace .simple-visit-settings>.visit-info-tools{border-right:1px solid #e0e9e7;padding-right:16px}
body.compact-workspace.three-step-workspace .simple-visit-settings>:is(.visit-info-tools,.visit-service-tools)>p{grid-column:1;grid-row:1;margin:0}
body.compact-workspace.three-step-workspace .simple-visit-settings>:is(.visit-info-tools,.visit-service-tools)>button:not(.visit-info-error){grid-column:2;grid-row:1;justify-self:end;min-height:44px;padding:8px 12px;white-space:normal}
body.compact-workspace.three-step-workspace .simple-visit-settings .visit-info-error{grid-column:1/-1}
body.compact-workspace.three-step-workspace .simple-visit-settings :is(.visit-info-editor,.visit-service-editor){grid-column:1/-1;margin:8px 0 0}

body.compact-workspace.three-step-workspace .simple-visit-settings:has(.visit-service-editor){grid-template-columns:minmax(0,1fr)!important}
@media(max-width:650px){
 body.compact-workspace.three-step-workspace .simple-visit-settings{grid-template-columns:minmax(0,1fr)!important}
 body.compact-workspace.three-step-workspace .simple-visit-settings>.visit-info-tools{border-right:0;border-bottom:1px solid #e0e9e7;padding-right:0}
}

/* Visible visit actions; original delegated deletion remains the authority. */
body.compact-workspace.three-step-workspace .plan>.section-title{align-items:center;gap:12px;flex-wrap:wrap}
body.compact-workspace.three-step-workspace .plan>.section-title p{font-weight:600;color:#476874;margin-top:4px}
body.compact-workspace.three-step-workspace #stages .simple-visit-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
body.compact-workspace.three-step-workspace #stages .simple-visit-toolbar>.stage-head{display:none!important}
body.compact-workspace.three-step-workspace #stages .simple-visit-toolbar>[data-add-visit-treatment]{grid-column:1;grid-row:1;justify-self:start;min-height:44px}
body.compact-workspace.three-step-workspace #stages .simple-visit-toolbar>[data-delete-stage]{grid-column:2;grid-row:1;justify-self:end;min-height:44px;color:#a03c3c;background:#fff;border:1px solid #e3caca}
body.compact-workspace.three-step-workspace #stages .simple-visit-toolbar>[data-delete-stage]:disabled{opacity:1;color:#7a6767;background:#faf7f7;border-color:#e2dada;cursor:not-allowed}
body.compact-workspace.three-step-workspace #stages .visit-delete-reason{grid-column:1/-1;font-size:11px;line-height:1.5;color:#6b7078;margin:0}
body.compact-workspace.three-step-workspace #stages .visit-delete-reason[hidden]{display:none!important}
body.compact-workspace.three-step-workspace #stages .plan-visit>.visit-summary{padding-right:44px}

/* Local UI hierarchy: action, selection and supporting information have distinct roles. */
body.compact-workspace.three-step-workspace{--ui-title-size:18px;--ui-subtitle-size:15px;--ui-body-size:13px;--ui-help-size:12px;--ui-card-padding:16px;--ui-card-gap:12px}
body.compact-workspace.three-step-workspace main{font-size:var(--ui-body-size);line-height:1.5}
body.compact-workspace.three-step-workspace main :is(.panel,#planReview){padding:var(--ui-card-padding)}
body.compact-workspace.three-step-workspace main h2{font-size:var(--ui-title-size);line-height:1.4;font-weight:750;margin-top:0}
body.compact-workspace.three-step-workspace main h3{font-size:var(--ui-subtitle-size);line-height:1.4;font-weight:700;margin-top:0}
body.compact-workspace.three-step-workspace main :is(.section-title,.treatment-detail-header){margin-bottom:var(--ui-card-gap)}
body.compact-workspace.three-step-workspace main :is(.section-title p,.item-summary small,.visit-summary small,.visit-info-tools p,.visit-service-tools p){font-size:var(--ui-help-size);line-height:1.5}
body.compact-workspace.three-step-workspace main :is(.line-item,.simple-review-overview,.review-treatment-list>div){padding:var(--ui-card-gap)}
body.compact-workspace.three-step-workspace main :is(.visit-info-editor,.visit-service-editor,.payment-quote-editor,.quick-line-editor){padding:var(--ui-card-padding);gap:var(--ui-card-gap)}
body.compact-workspace.three-step-workspace main button.primary{background:#09295a;border:1px solid #09295a;color:#fff;font-weight:700;box-shadow:0 2px 3px #09295a12}
body.compact-workspace.three-step-workspace main button.primary:enabled:hover{background:#153c70;border-color:#153c70}
body.compact-workspace.three-step-workspace main button.ghost{background:#fff;border:1px solid #cbd8e2;color:#38536a;font-weight:550;box-shadow:none}
body.compact-workspace.three-step-workspace main button.ghost:enabled:hover{background:#f2f6f8;border-color:#9eb4c5}
body.compact-workspace.three-step-workspace .simple-patient-bar #savePlanRecord{background:#fff;color:#075e5b;border:1px solid #82b4ad;font-weight:650;box-shadow:none}
body.compact-workspace.three-step-workspace .simple-patient-bar #savePlanRecord:enabled:hover{background:#eaf5f2;border-color:#317e76}
body.compact-workspace.three-step-workspace #commonDentalPanel .treatment-shortcut{background:#f8fafb;border:1px solid #d4dfe5;color:#38515f;font-weight:550;box-shadow:none}
body.compact-workspace.three-step-workspace #commonDentalPanel .treatment-shortcut[aria-pressed=true]{background:#e3f2ed;border:2px solid #087d70;color:#07594f;font-weight:750;box-shadow:inset 0 0 0 1px #fff}
body.compact-workspace.three-step-workspace #planAddDock .workspace-visit-choices label:has(input:checked){background:#e3f2ed;border-color:#087d70;color:#07594f;font-weight:700}
body.compact-workspace.three-step-workspace #workspaceNavigation .rail-actions>button{color:#c4d1e1;font-size:12px;font-weight:450;min-height:44px}
body.compact-workspace.three-step-workspace #workspaceNavigation .rail-actions>#planPicker{color:#fff;font-size:13px;font-weight:650}
body.compact-workspace.three-step-workspace #workspaceNavigation .rail-actions>.mobile-plan-actions{gap:4px;padding:8px;margin:0 0 12px;border:1px solid #ffffff25;border-radius:10px;background:#ffffff0b}
body.compact-workspace.three-step-workspace #workspaceNavigation .mobile-plan-actions button{min-height:44px;color:#fff;font-size:13px;font-weight:600;border:1px solid transparent;border-radius:7px}
body.compact-workspace.three-step-workspace #workspaceNavigation .mobile-plan-actions #newPatient{background:#ffffff18;border-color:#ffffff28;font-weight:700}
body.compact-workspace.three-step-workspace #workspaceNavigation .rail-actions button:enabled:hover{background:#ffffff13;color:#fff}
body.compact-workspace.three-step-workspace #workspaceNavigation .rail-actions button:focus-visible{outline:2px solid #b8e6dc;outline-offset:2px}
@media(max-width:600px){body.compact-workspace.three-step-workspace{--ui-card-padding:12px;--ui-card-gap:10px}}
body.compact-workspace.three-step-workspace main :is(#commonDentalPanel,#planReview) h2{font-size:var(--ui-title-size);line-height:1.4}

/* The flow header scopes all visits; order controls explain their exact step. */
body.compact-workspace.three-step-workspace .plan>.section-title{padding:12px 14px;background:#eaf0fb;border:1px solid #cad8ee;border-left:4px solid #536fa2;border-radius:9px;margin-bottom:16px}
body.compact-workspace.three-step-workspace .plan>.section-title h2{color:#263f69;margin-bottom:2px}
body.compact-workspace.three-step-workspace .plan>.section-title p{color:#435d83}
body.compact-workspace.three-step-workspace #stages .visit-delete-reason{padding:9px 11px;border-radius:7px;background:#f8f5ee;border:1px solid #e7dfcd;color:#665431;font-size:12px;line-height:1.5;letter-spacing:normal}
body.compact-workspace.three-step-workspace #stages .item-edit-controls>.move{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;grid-column:1/-1;flex:1 1 100%;width:100%;min-width:0;padding:12px;border:1px solid #d6e2e4;border-radius:8px;background:#fff}
body.compact-workspace.three-step-workspace #stages .move>.item-order-title{grid-column:1/-1;font-size:13px;line-height:1.4;color:#294b5d}
body.compact-workspace.three-step-workspace #stages .move>.item-order-hint{grid-column:1/-1;grid-row:3;font-size:12px;line-height:1.5;letter-spacing:normal;color:#52677c}
body.compact-workspace.three-step-workspace #stages .move>button.icon-btn{width:auto;min-width:0;height:auto;min-height:44px;padding:8px 10px;font-size:12px;line-height:1.4;font-weight:600;white-space:normal}

/* Keep removal choices visible beside the content they affect. */
body.compact-workspace.three-step-workspace #quickPackages .quick-packages-heading{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;align-items:center}
body.compact-workspace.three-step-workspace #clearPackageSelection{min-height:44px;max-width:100%;white-space:normal}
body.compact-workspace.three-step-workspace #stages [data-cancel-visit-delete][hidden]{display:none}
body.compact-workspace.three-step-workspace #stages [data-delete-stage][aria-expanded=true]{border-color:#b2535b;color:#9d3845;background:#fff3f3}

/* Payment editing is a dedicated step; confirmation actions belong to their warning. */
body.compact-workspace.three-step-workspace #simplePaymentStep{background:#fff;border:1px solid var(--ui-line);border-radius:12px;padding:20px;margin-top:12px}
body.compact-workspace.three-step-workspace #simplePaymentStep>#simplePaymentTitle{font-size:20px;margin:0 0 8px}
body.compact-workspace.three-step-workspace #simplePaymentStep #paymentQuote{display:grid;margin:16px 0}
body.compact-workspace.three-step-workspace #simplePaymentStep #paymentQuote:has(.payment-quote-editor)>:is(p,button){display:none}
body.compact-workspace.three-step-workspace .simple-payment-navigation{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--ui-line);padding-top:16px}
body.compact-workspace.three-step-workspace #simplePaymentStep>.simple-patient-bar{margin-bottom:18px;padding-bottom:12px;border-bottom:1px solid var(--ui-line)}
body.compact-workspace.three-step-workspace #stages .visit-delete-confirmation{grid-column:1/-1;display:grid;gap:12px;padding:14px;border:1px solid #e2c9bd;background:#fff8f3;border-radius:9px}
body.compact-workspace.three-step-workspace #stages .visit-delete-confirmation[hidden]{display:none}
body.compact-workspace.three-step-workspace #stages .visit-delete-confirmation>.visit-delete-reason{padding:0;margin:0;border:0;background:transparent;font-size:13px;line-height:1.6;color:#624537}
body.compact-workspace.three-step-workspace #stages .visit-delete-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
body.compact-workspace.three-step-workspace #stages .visit-delete-actions>button{width:auto;min-height:44px;margin:0}
@media(max-width:600px){body.compact-workspace.three-step-workspace #simplePaymentStep{padding:12px}body.compact-workspace.three-step-workspace .simple-payment-navigation{flex-wrap:wrap}body.compact-workspace.three-step-workspace .simple-payment-navigation>button{flex:1 1 160px}body.compact-workspace.three-step-workspace #simplePlanGuide button{overflow-wrap:anywhere}}
body.compact-workspace.three-step-workspace #simplePaymentAllocationHint{margin:12px 0 16px;padding:12px 14px;border:1px solid #cedfdf;border-left:3px solid #438d82;border-radius:8px;background:#f3f9f8;color:#365c60;font-size:13px;line-height:1.6}
body.compact-workspace.three-step-workspace .simple-review-payment-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}
body.compact-workspace.three-step-workspace .simple-review-payment-heading>h3{margin:0}
body.compact-workspace.three-step-workspace .simple-review-payment-heading>[data-review=edit]{min-height:44px;width:auto;flex:none}
/* Applying a draft is secondary to continuing the flow. */
body.compact-workspace.three-step-workspace .payment-quote-actions>.payment-quote-apply{background:#fff;color:#075e5b;border:1px solid #82b4ad;box-shadow:none;font-weight:650}
/* The same patient card is reused in payment and review, on the same outer grid. */
body.compact-workspace.three-step-workspace #simplePaymentStep{padding:0;margin:0;border:0;border-radius:0;background:transparent}
body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3)>.simple-patient-bar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px 12px;width:100%;padding:10px 12px;margin:8px 0 12px;background:#f4fbfa;border:1px solid #cbdedc;border-left:3px solid #438d82;border-radius:8px}
body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3) #simplePatientLabel{grid-column:1;grid-row:1;min-width:0;border:0;padding:0}
body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3) .plan-save-control{grid-column:2;grid-row:1;display:flex;flex-direction:row;align-items:center;gap:8px;width:auto;border:0;padding:0}
body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3) #simplePatientEdit{grid-column:3;grid-row:1;width:auto;min-height:44px;margin:0}
body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3) #savePlanRecord{width:auto;min-height:44px}
@media(max-width:600px){
 body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3)>.simple-patient-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 8px;padding:8px;margin:0 0 12px;border-radius:8px}
 body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3) #simplePatientLabel{grid-column:1/-1;grid-row:1;display:flex;flex-wrap:wrap;gap:4px 6px;width:100%;min-width:0;padding:0;border:0}
 body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3) #simplePatientLabel>.simple-patient-name{width:100%;font-size:14px;line-height:1.4}
 body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3) #simplePatientLabel>span{font-size:11px;padding:1px 5px}
 body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3) #simplePatientEdit{grid-column:2;grid-row:2;min-height:44px;margin:0;padding:6px 10px}
 body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3) .plan-save-control{grid-column:1;grid-row:2;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:4px 8px;width:auto;min-width:0;border:0;padding:0}
 body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3) #savePlanRecord{width:auto;min-height:44px;padding:6px 10px}
 body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3) .plan-save-status{font-size:11px;margin:0}
}

/* The flow is primary; visit tint and its continuous edge provide secondary context. */
body.compact-workspace.three-step-workspace .plan{border-right:3px solid var(--navy,#09295a)}
body.compact-workspace.three-step-workspace .plan>.section-title{background:var(--navy,#09295a);border-color:var(--navy,#09295a);border-left-color:var(--navy,#09295a)}
body.compact-workspace.three-step-workspace .plan>.section-title h2{color:#fff;font-size:20px;font-weight:750}
body.compact-workspace.three-step-workspace .plan>.section-title p{color:#e0e8f4}
body.compact-workspace.three-step-workspace .plan>.section-title #addStage{background:#fff;color:var(--navy,#09295a);border-color:#e0e8f4}
body.compact-workspace.three-step-workspace #stages .plan-visit{border-left:3px solid #7f9fa8}
body.compact-workspace.three-step-workspace #stages .plan-visit>summary{background:#d8e7eb;color:#244c55;border-radius:7px 9px 9px 7px}
body.compact-workspace.three-step-workspace #stages .plan-visit[open]>summary{border-radius:7px 9px 0 0}
body.compact-workspace.three-step-workspace #stages .plan-visit>summary>strong{font-size:16px;font-weight:700;color:#244c55}
body.compact-workspace.three-step-workspace #stages .plan-visit>summary>small{color:#536d74}
body.compact-workspace.three-step-workspace #stages .plan-visit>summary>.visit-summary-total{color:#244c55}
body.compact-workspace.three-step-workspace #stages .plan-visit>summary::after{border-color:#527c85}
body.compact-workspace.three-step-workspace #stages .plan-visit .visit-logistics-title{font-size:14px;font-weight:700;color:#365b64}

/* 26 November local review: compact tools and one primary pending action. */
body.compact-workspace.three-step-workspace #proposalPlanTools{grid-column:1/-1;min-width:0;margin:0}
body.compact-workspace.three-step-workspace #proposalPlanTools>summary{cursor:pointer;min-height:44px;padding:10px 8px;color:var(--ui-accent);font-size:13px}
body.compact-workspace.three-step-workspace #proposalPlanTools .proposal-defaults-bar{margin:0;padding:8px;display:flex;flex-wrap:wrap;gap:8px}
body.compact-workspace.three-step-workspace #proposalPlanTools .proposal-defaults-bar>span:empty{display:none}
body.compact-workspace.three-step-workspace :is(#workspaceNavigation,.patient-actions) #reset{color:#a32936;border:1px solid #d4a5ab;background:#fff6f6;margin-top:8px}
body.compact-workspace.three-step-workspace .simple-chart-scroll-hint{font-size:13px;color:#39516b;margin:8px 0}
@media(max-width:800px){
 body.compact-workspace.three-step-workspace .simple-plan-footer:has(.mobile-pending-add:not([hidden])) #simpleReviewPlan{background:white;color:#39516b;border:1px solid #b7c6d0;box-shadow:none;font-weight:500}

}

body.compact-workspace.three-step-workspace .workspace-confirm-dialog[aria-labelledby="resetPlanTitle"] [data-confirm]{background:#a32936;border-color:#a32936;color:white}

/* Patient editing is available through the persistent Patient step. */
body.compact-workspace.three-step-workspace :is(#simplePaymentStep,#simpleStep3)>.simple-patient-bar{grid-template-columns:minmax(0,1fr) auto}

body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px 8px;padding:8px 10px}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext>.simple-patient-bar{display:contents!important}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #simplePatientLabel{grid-column:1/5;grid-row:1;display:flex;flex-wrap:wrap;gap:4px 6px;min-width:0;border:0;padding:0}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #simplePatientLabel>.simple-patient-name{flex-basis:100%;font-size:16px;line-height:1.3;overflow-wrap:anywhere}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext .simple-patient-bar>.plan-save-control{grid-column:5/7;grid-row:1;display:flex;flex-direction:column;align-items:stretch;align-self:end;min-width:0;width:auto;max-width:none;gap:3px}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #savePlanRecord{width:100%;padding:6px 8px;font-size:12px;min-height:44px;white-space:normal}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext .plan-save-status{text-align:right;font-size:11px;line-height:1.2}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext .plan-save-feedback{font-size:12px;overflow-wrap:anywhere}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #proposalPlanTools{display:contents}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #proposalPlanTools::details-content{display:contents}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #proposalPlanTools:not([open])>.proposal-defaults-bar{display:none}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext :is(#simplePackagePicker,#simpleCondition,#proposalPlanTools)>summary{grid-row:2;align-self:end;min-width:0;min-height:44px;padding:5px 7px!important;font-size:12px!important;border:1px solid #d3e2e0;border-radius:7px;background:#fff;display:flex;align-items:center;gap:4px;white-space:normal;overflow-wrap:anywhere}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #simplePackagePicker>summary{grid-column:1/4}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #simpleCondition>summary{grid-column:4/7}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #proposalPlanTools>summary{grid-column:3;margin:0}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext :is(.compact-package-content,#common-condition-pane,.proposal-defaults-bar){grid-column:1/-1;grid-row:auto;min-width:0}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #simpleCondition>.chart{grid-row:auto}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #quickPackages>.applied-package-label{grid-row:auto}

/* Shared expanding patient tools, enclosed by the continuous green context edge. */
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext :is(.compact-package-content,#common-condition-pane,.proposal-defaults-bar){width:100%;box-sizing:border-box;margin:0;padding:12px!important;background:#fff;border:1px solid #d8e4e3;border-radius:8px}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #initialDentalEditor{margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;position:static}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #simpleCondition>.chart{margin:0;border:1px solid #d8e4e3;border-radius:8px}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext :is(#simplePackagePicker,#simpleCondition,#proposalPlanTools)[open]>summary{background:#e4f5ee;border-color:#348f76;color:#174f43;box-shadow:inset 0 0 0 1px #348f76}
body.compact-workspace.three-step-workspace #initialDentalEditor #initial-quick-natural:not([aria-pressed=true]){background:#edf7f1;border-color:#91baa4;color:#235c3d}
body.compact-workspace.three-step-workspace #initialDentalEditor #initial-quick-missing:not([aria-pressed=true]){background:#fff3df;border-color:#c9aa71;color:#79501b}
body.compact-workspace.three-step-workspace #initialDentalEditor #initial-quick-implant:not([aria-pressed=true]){background:#edf4ff;border-color:#9eb8da;color:#2a517d}
body.compact-workspace.three-step-workspace #initialDentalEditor [data-quick-base][aria-pressed=true]{background:#d7eee9;border-color:#098e81;color:#00675e;box-shadow:inset 0 0 0 1px #098e81}
body.compact-workspace.three-step-workspace #initialDentalEditor [data-quick-base]:disabled{opacity:.6;cursor:not-allowed}

/* Service defaults are visible before applying, within the green context card. */
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext{max-width:100%;box-sizing:border-box}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext>*,body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #simpleCondition>.chart{min-width:0;max-width:100%;box-sizing:border-box}
body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #proposalDefaultsBar{display:flex;flex-direction:column;align-items:stretch;gap:10px}
body.compact-workspace.three-step-workspace #proposalDefaultsBar :is(.clinic-service-intro,.clinic-service-explanation){margin:0;font-size:13px;line-height:1.5;color:#39516b}
body.compact-workspace.three-step-workspace #proposalDefaultsBar .clinic-service-defaults{margin:0;display:grid;gap:6px}
body.compact-workspace.three-step-workspace #proposalDefaultsBar .clinic-service-defaults>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 10px;border:1px solid #e0e9e7;border-radius:6px;background:#f8fbfa}
body.compact-workspace.three-step-workspace #proposalDefaultsBar dt{font-size:13px;font-weight:600;min-width:0}
body.compact-workspace.three-step-workspace #proposalDefaultsBar dd{margin:0;font-size:12px;padding:3px 7px;border-radius:5px;background:#edf1f5;color:#455c70}
body.compact-workspace.three-step-workspace #proposalDefaultsBar dd[data-service-status=included]{background:#e1f2e9;color:#205c40}
body.compact-workspace.three-step-workspace #proposalDefaultsBar dd[data-service-status=excluded]{background:#fff1df;color:#79501b}
body.compact-workspace.three-step-workspace #proposalDefaultsBar>button{align-self:flex-start}

/* UI/A11y review: readable footer and narrow controls without clipped labels. */
body.compact-workspace.three-step-workspace main>footer{color:#52677c}
@media(max-width:360px){
 body.compact-workspace.three-step-workspace .chart .chart-catalog-actions{display:flex!important;flex-direction:column;align-items:stretch}
 body.compact-workspace.three-step-workspace .chart :is(.planner-change-treatment,#clear){max-width:100%;white-space:normal;overflow-wrap:normal}
 body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext #simplePatientLabel{grid-column:1}
 body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext .simple-patient-bar>.plan-save-control{grid-column:2}
 body.compact-workspace.three-step-workspace.desktop-treatment-workspace #compactPlanContext :is(#simplePackagePicker,#simpleCondition,#proposalPlanTools)>summary{grid-column:1/-1;grid-row:auto!important;white-space:normal;overflow-wrap:normal;word-break:normal}
}

/* O31: observational usage reports remain readable inside the admin panel. */
.admin-usage .usage-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:14px 0}
.admin-usage .usage-summary p{margin:0;padding:12px;border:1px solid #d4e3e0;border-radius:10px;background:#f0f8f5;color:#163e32;line-height:1.6;overflow-wrap:anywhere}
.admin-usage .usage-table-scroll{max-width:100%;overflow-x:auto;margin:14px 0}
.admin-usage table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}
.admin-usage caption{text-align:left;padding:8px 0;font-weight:600}
.admin-usage th,.admin-usage td{padding:9px 10px;border-bottom:1px solid #dce3e8;vertical-align:top}
.admin-usage thead th{background:#edf2f5;color:#20334b}
.admin-usage .monitor-entry{min-width:0;overflow-wrap:anywhere}
.admin-usage meter{width:100px;max-width:100%}
.admin-usage small{display:block;font-size:12px;line-height:1.6;letter-spacing:normal}
.admin-usage select{max-width:100%}

/* Proposal terms: compact language readiness and clearly separated editing sections. */
#clinicSetup .setup-terms-main>h2{font:700 26px/1.25 Manrope,sans-serif;letter-spacing:-.6px;margin:20px 0 8px}
#clinicSetup .setup-terms-main .setup-subtitle{font-size:13px;line-height:1.6;margin-bottom:20px;max-width:64ch}
#clinicSetup .setup-terms-body{display:grid;gap:18px;align-content:start}
#clinicSetup .setup-terms-body>.setup-info{margin:0;font-size:12px;line-height:1.6}
#clinicSetup #setupTermsReadiness{padding:16px;background:#f5f9f9;border:1px solid #dce8e7;border-radius:12px}
#clinicSetup #setupTermsReadiness>strong{display:block;font-size:13px;color:var(--navy);margin-bottom:12px}
#clinicSetup .terms-language-status{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
#clinicSetup .terms-language-card{display:grid;align-content:start;gap:7px;padding:12px;border:1px solid #dce5e9;border-radius:9px;background:white;min-width:0}
#clinicSetup .terms-language-name{font-size:12px;font-weight:650;line-height:1.5;color:#203b56;overflow-wrap:anywhere}
#clinicSetup .terms-language-result{font-size:12px;line-height:1.5;color:#296b57}
#clinicSetup .terms-language-card[data-selected=true]{border-color:#18877e;box-shadow:inset 0 2px #18877e;background:#f3faf7}
#clinicSetup .terms-language-card[data-ready=false] .terms-language-result{color:#9b442d}
#clinicSetup .setup-terms-body>section:not(#setupTermsReadiness),
#clinicSetup .setup-terms-body>details.setup-optional{margin:0;padding:18px;border:1px solid #dce5eb;border-radius:12px;background:white}
#clinicSetup .setup-terms-body>section h3{margin:0 0 16px;font-size:15px;line-height:1.5;color:var(--navy)}
#clinicSetup .setup-terms-body .setup-field{margin-bottom:0;font-size:13px;line-height:1.5;color:#40586c;gap:8px}
#clinicSetup .setup-terms-body :is(input,select){min-height:44px;font-size:14px}
#clinicSetup .setup-terms-body section>.setup-field{margin-bottom:12px}
#clinicSetup .setup-terms-body section>p{font-size:12px;line-height:1.6;margin:10px 0;color:#576f82}
#clinicSetup .setup-validity{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,.55fr);align-items:end;gap:14px;padding:18px;border:1px solid #dce5eb;border-radius:12px;background:white}
#clinicSetup .setup-terms-body>details.setup-optional>summary{font-weight:650;font-size:14px;line-height:1.5;color:var(--navy);min-height:28px;cursor:pointer}
#clinicSetup .setup-terms-body>details.setup-optional[open]>summary{margin-bottom:16px}
#clinicSetup .setup-terms-body .setup-grid{grid-template-columns:minmax(0,1fr);gap:14px}
#clinicSetup .setup-terms-body textarea{min-height:130px;line-height:1.65;font-size:14px;background:#fbfcfd}
#clinicSetup .setup-terms-body .clinic-translations{margin-top:8px;padding-top:12px;border-top:1px solid #e1e8ed}
#clinicSetup .setup-terms-body .clinic-translations>summary{min-height:36px;font-size:13px;color:#4d6375;cursor:pointer}
#clinicSetup .setup-terms-body .clinic-translations[open]{display:grid;gap:16px}
#clinicSetup .setup-terms-main #setupError:empty{display:none}
#clinicSetup .setup-terms-main .setup-actions{gap:12px;padding-top:16px;margin-top:18px}
#clinicSetup .setup-terms-main .setup-actions button{min-height:44px}
@media(max-width:600px){
 #clinicSetup .terms-language-status{grid-template-columns:repeat(2,minmax(0,1fr))}
 #clinicSetup .terms-language-card[data-selected=true]{grid-column:1/-1;grid-row:1}
 #clinicSetup .setup-terms-body{gap:14px}
 #clinicSetup .setup-validity{grid-template-columns:minmax(0,1fr) minmax(100px,.7fr);gap:10px;padding:14px}
 #clinicSetup .setup-terms-body>section:not(#setupTermsReadiness),#clinicSetup .setup-terms-body>details.setup-optional{padding:14px}
 #clinicSetup .setup-terms-body :is(input,select,textarea){font-size:16px}
}
#clinicSetup .setup-terms-body{grid-template-columns:minmax(0,1fr);min-width:0}
#clinicSetup .setup-terms-body>*{min-width:0;box-sizing:border-box}
#clinicSetup .setup-terms-body .setup-field{min-width:0}
#clinicSetup .setup-terms-body select{width:100%;min-width:0;max-width:100%}
#clinicSetup .service-scope-guide{padding:12px 14px;border-inline-start:3px solid #18877e;background:#f2f8f7;border-radius:0 8px 8px 0;margin:12px 0 16px}
#clinicSetup .service-scope-guide p{font-size:13px;line-height:1.65;margin:0;color:#40586c}
#clinicSetup .service-scope-guide strong{display:block;margin-bottom:4px;color:#203b56}
#clinicSetup .clinic-service-settings:has([data-clinic-field=serviceScope]) [data-scope-help]{display:none}
#clinicSetup .clinic-service-settings:has([data-clinic-field=serviceScope] option[value=""]:checked) [data-scope-help=legacy],
#clinicSetup .clinic-service-settings:has([data-clinic-field=serviceScope] option[value=terms]:checked) [data-scope-help=terms],
#clinicSetup .clinic-service-settings:has([data-clinic-field=serviceScope] option[value=visit]:checked) [data-scope-help=visit]{display:block}
#clinicSetup .clinic-service-settings>details>summary{min-height:40px;font-size:13px;font-weight:650;cursor:pointer}
#clinicSetup .clinic-service-settings>details>p{font-size:12px;line-height:1.65;margin:10px 0 16px;color:#576f82}
#clinicSetup .clinic-service-settings>details>.setup-field{margin-top:14px}

/* Section edit actions share a heading row and wrap to the right on narrow screens. */
body.compact-workspace.three-step-workspace .simple-review-visit-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:12px}
body.compact-workspace.three-step-workspace .simple-review-visit-heading>h3{flex:1 1 auto;min-width:0;margin:0}
body.compact-workspace.three-step-workspace .simple-review-visit-heading>.simple-review-tools{flex:0 1 auto;justify-content:flex-end;margin:0 0 0 auto;max-width:100%}
body.compact-workspace.three-step-workspace .simple-review-visit-heading button{width:auto;max-width:100%;white-space:normal;text-align:center}
body.compact-workspace.three-step-workspace .simple-review-payment-heading>[data-review=edit]{margin-left:auto}
