/* Phone stages only: shared header, actual completion, status at the right edge. */
.stage-view{--crm-stage-done-bg:color-mix(in srgb,var(--green,#2FBF87) 10%,var(--surface,var(--card)));--crm-stage-done-line:color-mix(in srgb,var(--green,#2FBF87) 40%,var(--border));--crm-stage-done-ink:var(--text)}
html body .stage-view :is(.nf-fold>.summary,.nf-fold>summary,.finale-disclosure>summary,.stage-disclosure-head,.closing-bar-head){display:flex!important;align-items:center!important;gap:10px!important;min-height:46px;box-sizing:border-box}
html body .stage-view :is(.nf-fold>summary,.finale-disclosure>summary,.stage-disclosure-head,.closing-bar-head)>:is(strong,h3,div:first-child){min-width:0;flex:1}
html body .stage-view :is(.nf-fold>summary,.finale-disclosure>summary,.stage-disclosure-head,.closing-bar-head)>:is(.nf-success,.ops-status,.disclosure-done,.disclosure-required,.crm-verification-status,.crm-stage-status){margin-left:auto!important;flex:0 0 auto;font-size:var(--fs-sm,12.5px);line-height:1.4;white-space:normal;text-align:right}
html body .stage-view :is(.nf-fold>summary,.finale-disclosure>summary)::after{margin-left:0!important;flex-shrink:0}
html body .stage-view .stage-disclosure-head>.stage-disclosure-toggle{margin-left:0!important}
html body .stage-view :is(.nf-fold.nf-done,.audit-section-complete,.finale-disclosure[data-approved=true],.finale-document.is-confirmed){border-color:var(--crm-stage-done-line)!important}
html body .stage-view :is(.nf-fold.nf-done>summary,.audit-section-complete>.stage-disclosure-head,.finale-disclosure[data-approved=true]>summary,.finale-document.is-confirmed){background:var(--crm-stage-done-bg)!important;color:var(--text)!important;box-shadow:none!important}
html body .stage-view :is(.nf-fold>summary .nf-success,.nf-fold>summary .ops-status.green,.finale-head>.ops-status.green,.finale-doc-head>.ops-status.green,.stage-disclosure-head .disclosure-done,.crm-stage-status.is-complete){background:transparent!important;border:0!important;box-shadow:none!important;color:var(--crm-stage-done-ink)!important;padding:0!important;font-weight:var(--fw-s,600)}
html body .stage-view #auditGapsCard.audit-section-complete #auditGapsDisclosureStatus{background:transparent!important;border:0!important;color:var(--crm-stage-done-ink)!important}
html body .stage-view .finale-doc-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
html body .stage-view .finale-doc-head>.ops-status{margin-left:auto!important}
html body .stage-view .nf-fold.crm-needs-verification>summary{background:var(--crm-review-surface)!important}
html body #savedClosingAppointment:not(.closing-resolved){border:1px solid var(--crm-review-line)!important;background:var(--crm-review-surface)!important;color:var(--text)!important}
html body #savedClosingAppointment.closing-resolved{border:1px solid var(--crm-stage-done-line)!important;background:var(--crm-stage-done-bg)!important;color:var(--text)!important}
#savedClosingAppointment .crm-stage-status.is-pending{color:var(--amber,#E5A83D);font-weight:var(--fw-s,600)}
#savedClosingAppointment .contact-overdue{color:var(--red)!important}
#savedClosingAppointment .closing-result-actions{padding-top:8px;border-top:1px solid var(--border);margin-top:3px}
#savedClosingAppointment [data-closing-contact=call]{color:var(--green)!important;border-color:var(--green)!important;background:color-mix(in srgb,var(--green) 10%,var(--surface))!important}
.closing-resolution-dialog{max-width:560px;width:calc(100vw - 40px);border:1px solid var(--border);border-radius:12px;background:var(--surface,var(--card));color:var(--text);padding:20px}
.closing-resolution-dialog form{display:grid;gap:14px}.closing-resolution-dialog label{display:grid;gap:6px}.closing-resolution-dialog :is(input:not([type=checkbox]),textarea){width:100%;box-sizing:border-box;background:var(--surface2,var(--card));color:var(--text);border:1px solid var(--border);border-radius:7px;padding:9px;font:inherit}.closing-resolution-dialog .closing-stop-contact{display:flex;align-items:start;gap:8px;font-size:var(--fs-md,13.5px)}.closing-resolution-dialog [role=alert]{color:var(--red);margin:0}.closing-resolution-dialog header{display:flex;justify-content:space-between;gap:12px}.closing-resolution-dialog h2{font-size:var(--fs-xl,17px);margin:0}.closing-resolution-dialog p{font-size:var(--fs-lg,14px);line-height:1.6}
html.crm-premium-trial body .stage-view #salesFinaleContent .finale-disclosure[data-approved=true]{border-color:var(--crm-stage-done-line)!important;border-left-color:var(--crm-stage-done-line)!important}
html.crm-premium-trial body .stage-view #salesFinaleContent .finale-disclosure[data-approved=true]>summary{background:var(--crm-stage-done-bg)!important}
html body #auditGapsCard>.stage-disclosure-head{width:100%;box-sizing:border-box}
html body #auditGapsCard>.stage-disclosure-head h3{background:transparent!important;border:0!important;padding:0!important}

/* 118: equal separation of stage sections; margins never stack across wrappers. */
.stage-view{--crm-section-gap:12px}
html body .stage-view>:is(.client-card-layout,.post-grid,.section-grid,.closing-grid,.nf-sales,.saved-contact-bar,#closingFollowupPair,#phoneUnifiedWork,#phoneClientFileShelf){margin:0 0 var(--crm-section-gap)!important;min-width:0;box-sizing:border-box}
html body .stage-view :is(.client-card-layout,.post-grid,.section-grid,.closing-grid){gap:var(--crm-section-gap)!important;align-items:start}
html body .stage-view #phoneUnifiedClientCard>:is(.client-topic,#phoneUnifiedWork,#phoneClientFileShelf){margin:0!important;min-width:0}
html body .stage-view #newFirmClosing{display:grid;gap:var(--crm-section-gap);padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
html body .stage-view #newFirmClosing[hidden]{display:none!important}
html body .stage-view #newFirmClosing>.nf-fold{margin:0!important}
html body .stage-view[data-view=closing] #closingFollowupPair{grid-template-columns:minmax(0,1fr)!important;width:100%;gap:var(--crm-section-gap)!important}
html body .stage-view #closingFollowupPair>.saved-contact-bar{margin:0!important}
/* Native details: a finished plan remains the same compact, reopenable bar. */
html body .stage-view #savedClosingAppointment{display:block;padding:0;gap:0;grid-column:1/-1;min-width:0;width:100%;height:auto;flex-shrink:0;overflow:hidden;box-shadow:none!important;background:var(--surface,var(--card))!important}
html body .stage-view #savedClosingAppointment:not([open])>:not(summary){display:none!important}
html body .stage-view #savedClosingAppointment>.closing-bar-head{min-height:46px;padding:12px 16px;margin:0;background:var(--surface,var(--card))!important;color:var(--text)!important;border:0;cursor:pointer;list-style:none}
html body .stage-view #savedClosingAppointment>.closing-bar-head::-webkit-details-marker{display:none}
html body .stage-view #savedClosingAppointment>.closing-bar-body{display:grid;gap:12px;padding:12px 16px;border-top:1px solid var(--border);background:var(--surface,var(--card));color:var(--text)}
html body .stage-view #savedClosingAppointment .closing-action-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
html body .stage-view #savedClosingAppointment .closing-result-actions{margin:0 0 0 auto;padding:0;border:0}
html body .stage-view #savedClosingAppointment .closing-booking{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border-top:1px solid var(--border);padding-top:12px}
html body .stage-view #savedClosingAppointment .closing-booking [data-edit-contact]{border-color:var(--crm-review-line)!important;color:var(--amber,#E5A83D)!important;background:var(--crm-review-surface)!important}
/* Pending bars have an amber edge/label, without painting all their content. */
html body .stage-view :is(.nf-fold.crm-needs-verification,.nf-fold.crm-needs-verification>summary,#savedClosingAppointment:not(.closing-resolved)){background:var(--surface,var(--card))!important;box-shadow:none!important}
html body .stage-view :is(.nf-fold.nf-done>summary,.commercial-complete>.client-topic-head,#savedClosingAppointment.closing-resolved>.closing-bar-head){background:var(--crm-stage-done-bg)!important;color:var(--crm-stage-done-ink)!important;box-shadow:none!important}
html body .stage-view :is(.nf-fold.nf-done>summary,.commercial-complete>.client-topic-head,#savedClosingAppointment.closing-resolved>.closing-bar-head) :is(strong,h3){color:var(--crm-stage-done-ink)!important}

html body .stage-view #savedClosingAppointment>.closing-bar-head .is-pending{color:var(--amber,#E5A83D)!important}
html body .stage-view .nf-fold.crm-needs-verification>summary :is(.crm-verification-status,.ops-status){color:var(--amber,#E5A83D)!important;background:transparent!important;border:0!important;box-shadow:none!important}

/* 119: one readable type scale for process headers; tasks/notes/files stay unchanged. */
html body:not(#crm-type-a):not(#crm-type-b):not(#crm-type-c) .stage-view :is(.stage-disclosure-head,.evaluation-top,.sales-eval-card>.doc-head,.nf-fold>summary,.finale-disclosure>summary,.closing-bar-head,.client-topic[data-client-topic=now]>.client-topic-head){--crm-type-body:var(--fs-xl,17px);--crm-type-heading:var(--fs-lg,14px);font-family:var(--crm-font,Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif)!important;font-size:var(--fs-xl,17px)!important;line-height:1.45!important;font-weight:var(--fw-s,600)!important}
html body:not(#crm-type-a):not(#crm-type-b):not(#crm-type-c) .stage-view :is(.stage-disclosure-head,.evaluation-top,.sales-eval-card>.doc-head,.nf-fold>summary,.finale-disclosure>summary,.closing-bar-head,.client-topic[data-client-topic=now]>.client-topic-head) :is(h3,strong){--crm-type-body:var(--fs-xl,17px);font-family:inherit!important;font-size:var(--fs-xl,17px)!important;line-height:1.45!important;font-weight:var(--fw-s,600)!important;letter-spacing:normal!important;margin:0!important}
html body:not(#crm-type-a):not(#crm-type-b):not(#crm-type-c) .stage-view .audit-section-complete>:is(.stage-disclosure-head,.evaluation-top,.doc-head){background:var(--crm-stage-done-bg)!important;color:var(--crm-stage-done-ink)!important;border-color:var(--crm-stage-done-line)!important;box-shadow:none!important}
html body:not(#crm-type-a):not(#crm-type-b):not(#crm-type-c) .stage-view .audit-section-complete>:is(.stage-disclosure-head,.evaluation-top,.doc-head) :is(h3,strong,.doc-status,.disclosure-done){color:var(--crm-stage-done-ink)!important;background:transparent!important;box-shadow:none!important}
html body:not(#crm-type-a):not(#crm-type-b):not(#crm-type-c) #salesSplitWork .sales-work-plus{order:-1!important;margin-left:0!important;margin-right:8px!important;justify-content:flex-start!important}
html body:not(#crm-type-a):not(#crm-type-b):not(#crm-type-c) #salesSplitWork .sales-work-plus>small{white-space:nowrap;font-size:var(--fs-sm,12.5px)!important;color:inherit!important}
/* Full-width headers rather than a coloured strip inside a padded evaluation card. */
html body .stage-view :is(#auditEvaluationCard,.sales-eval-card){padding:0!important;overflow:hidden}
html body .stage-view :is(#auditEvaluationBody,#salesEvaluationBody){padding:12px}
html body .stage-view :is(.stage-disclosure-head,#auditEvaluationCard>.evaluation-top,.sales-eval-card>.doc-head){padding:12px 16px!important;min-height:46px;margin:0!important;border-radius:inherit;box-sizing:border-box}
html body .stage-view .audit-section-complete>.doc-head>.doc-status{border:0!important;padding:0!important;text-transform:none!important;background:transparent!important}

/* 121: header lettering follows the theme; state stays in the existing frame/surface. */
html body:not(#crm-type-a):not(#crm-type-b):not(#crm-type-c):not(#crm-header-text) :is(details>summary,.stage-disclosure-head,.evaluation-top,.sales-eval-card>.doc-head,.finale-doc-head,.handoff-document-header,.ops-section-head,.client-topic-head,.closing-bar-head),
html body:not(#crm-type-a):not(#crm-type-b):not(#crm-type-c):not(#crm-header-text) :is(details>summary,.stage-disclosure-head,.evaluation-top,.sales-eval-card>.doc-head,.finale-doc-head,.handoff-document-header,.ops-section-head,.client-topic-head,.closing-bar-head) :is(h2,h3,h4,strong,.nf-success,.ops-status,.doc-status,.disclosure-done,.disclosure-required,.crm-verification-status,.crm-stage-status,.handoff-document-status){color:var(--text)!important}

/* Review128: compact, single-line status on the right; no oversized badge. */
html body:not(#crm-type-a):not(#crm-type-b):not(#crm-type-c) .stage-view :is(.stage-disclosure-head,.doc-head,.evaluation-top,summary) :is(.disclosure-required,.disclosure-done,.doc-status,.crm-verification-status,.crm-stage-status,.ops-status){font-size:var(--fs-sm,12.5px)!important;line-height:1.35!important;white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;flex-shrink:0!important;width:auto!important;max-width:none!important}
html body .stage-view .stage-disclosure-head{flex-wrap:nowrap!important}
html body .stage-view .stage-disclosure-head h3{flex:1 1 auto!important;min-width:0!important}
html body #auditDeliveryOverlay .audit-delivery-channels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:10px;align-items:start}
html body #auditDeliveryOverlay .audit-delivery-channels>:is(.field,label){display:block;min-width:0;margin:0!important}
html body #auditDeliveryOverlay .audit-delivery-channels textarea{display:block;width:100%;box-sizing:border-box;min-height:210px;max-height:380px;overflow:auto;resize:vertical;margin-top:6px;padding:10px;background:var(--surface2);color:var(--text);border:1px solid var(--border);border-radius:7px;font:inherit;line-height:1.5}
html body #auditAppointmentEdit.summary-calendar-edit{grid-template-columns:1fr!important}
html body #auditAppointmentConfirm.editing{display:block!important}
html body #auditAppointmentConfirm.editing .appointment-confirm-actions{margin-top:10px}
html body .summary-calendar-sources{display:none!important}
html body #outcomeOverlay :is(#auditSummaryCalendar,#correctSalesCalendar) .ws-slots{max-height:250px;overflow:auto}
html body #outcomeOverlay :is(#auditSummaryCalendar,#correctSalesCalendar){max-width:560px;width:100%;box-sizing:border-box}
html body .missing-no-deadline{white-space:normal;display:flex!important;align-items:center;gap:8px}
html body .missing-no-deadline input{flex:none;width:auto!important}
@media(max-width:620px){html body #auditDeliveryOverlay .audit-delivery-channels{grid-template-columns:1fr}}
