/* A single underline geometry for every navigation tab and page. */
html body .main-nav>a{position:relative!important;height:44px!important;min-height:44px!important;align-self:center!important;display:inline-flex!important;align-items:center!important;border-bottom:0!important;padding-block:0!important;margin-block:0!important}
html body .main-nav>a::after{content:''!important;position:absolute!important;left:0!important;right:0!important;top:auto!important;bottom:0!important;width:100%!important;height:2px!important;border:0!important;transform:none!important;background:transparent!important}
html body .main-nav>a.active::after{background:var(--sd-purple)!important}
/* Square controls/cards and avatars; semantic pills and timeline nodes retain shape. */
html body button:not(.followup-pill),html body input,html body select,html body textarea,html body .btn,html body .pipeline-card,html body .dl-mobile-card,html body .panel,html body .stage-swipe-box,html body .deal-type-box,html body .deal-type-picker-input,html body .salesdesk-confirm-dialog,html body .brand-mark,html body [class*="avatar"],html body .user-dot{border-radius:0!important}
html body #deal-stage-nav .stage-nav-arrows button,html body #deal-editor-content .stage-swipe-box,html body #deal-editor-content :is(input,select,textarea,button:not(.followup-pill),.btn),html body .pipeline-card .btn,html body .customer-followup textarea,html body .customer-followup .followup-later>summary{border-radius:0!important}
html body #theme-icon{display:flex!important;align-items:center;justify-content:center;width:24px;height:24px;font-size:23px!important;line-height:1!important}
html body #theme-icon svg{width:22px!important;height:22px!important}
/* Real separators share the text baseline; no generated dots can drift. */
html body #deal-stage-nav .stage-nav-identity>strong::after,html body #deal-stage-nav .stage-nav-identity>small::before,html body #deal-stage-nav .stage-nav-location::before{content:none!important}
html body #deal-stage-nav .stage-nav-identity>small{gap:0!important}
.stage-identity-dot{display:inline-block;margin:0 .35em;vertical-align:baseline;font-weight:400}
.stage-title-dot{display:none}
html body #deal-stage-nav.is-slim .stage-title-dot{display:inline-block}
/* Anchor the identity title and controls to the circles, not their caption. */
:root{--stage-circle-hit:30px}
@media(pointer:coarse){:root{--stage-circle-hit:44px}}
@media(min-width:1024px){
 html body #deal-stage-nav{grid-template-columns:minmax(0,1fr) minmax(360px,min(520px,42%)) minmax(0,1fr)!important;grid-template-rows:var(--stage-circle-hit)!important;align-items:center!important;padding:10px 0 29px!important;min-height:0!important}
 html body #deal-stage-nav .stage-nav-identity{grid-column:1;grid-row:1;align-self:center!important;position:relative;display:block!important;line-height:24px}
 html body #deal-stage-nav .stage-nav-identity>strong{display:block!important;font-size:18px!important;line-height:24px!important}
 html body #deal-stage-nav .stage-nav-identity>small{position:absolute;top:100%;left:0;display:block!important;width:max-content;max-width:100%;font-size:13px!important;line-height:18px!important;margin:1px 0 0!important}
 html body #deal-stage-nav .stage-nav-timeline{grid-column:2;grid-row:1;align-self:center!important;padding-bottom:0!important;margin:0!important;width:100%!important;max-width:none!important;height:var(--stage-circle-hit)!important}
 html body #deal-stage-nav .stage-nav-arrows{grid-column:3;grid-row:1;align-self:center!important;justify-self:end!important}
 html body #deal-stage-nav.is-slim{grid-template-rows:var(--stage-circle-hit)!important;padding:6px 0 24px!important;min-height:0!important}
 html body #deal-stage-nav.is-slim .stage-nav-identity{position:static;line-height:18px!important;display:block!important}
 html body #deal-stage-nav.is-slim .stage-nav-identity>strong,html body #deal-stage-nav.is-slim .stage-nav-identity>small{position:static;display:inline!important;font-size:13px!important;line-height:18px!important;width:auto;max-width:none;margin:0!important}
 html body #deal-stage-nav .stage-followup-trigger{grid-column:3;grid-row:1;align-self:center;justify-self:end;margin-right:90px}
}
html body #deal-stage-nav .stage-nav-viewing{color:var(--sd-purple)!important}
html body .stage-followup-trigger{min-height:30px!important;height:30px;padding:4px 8px;font-family:inherit;font-size:12px;font-weight:600;white-space:nowrap;border:1px solid var(--sd-rule);background:var(--sd-canvas);color:var(--sd-ink)}
html body .stage-followup-trigger.overdue{background:var(--followup-red-bg)!important;color:var(--followup-red-ink)!important}
html body .stage-followup-trigger.soon{background:var(--followup-orange-bg)!important;color:var(--followup-orange-ink)!important}
html body .stage-followup-trigger[hidden]{display:none!important}
.sticky-followup-dialog{width:min(760px,calc(100% - 24px));padding:12px}.followup-dialog-close{margin-bottom:10px;float:right}.sticky-followup-content{clear:both}.sticky-followup-content:empty{display:none}
/* A shared, comfortable note input and two adjacent primary actions. */
html body .customer-followup .followup-controls{max-width:960px;width:100%;margin:6px 0 0;display:grid;gap:8px}
html body .customer-followup .followup-controls>form.followup-action{display:none!important}
html body .customer-followup textarea{box-sizing:border-box;width:100%;min-width:0;min-height:62px!important;max-height:180px;resize:vertical;padding:9px 11px!important;font-size:14px!important;font-weight:400!important;line-height:1.4!important;background:var(--sd-canvas);color:var(--sd-ink);border:1px solid var(--sd-rule);margin:0!important}
html body .customer-followup textarea::placeholder{font-size:14px;font-weight:400}
html body .customer-followup .followup-buttons{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap}
html body .customer-followup .followup-buttons>button,html body .customer-followup .followup-buttons>.followup-later{flex:1;min-width:0}
html body .customer-followup .followup-buttons>button,html body .customer-followup .followup-later>summary{font-family:inherit!important;font-size:14px!important;font-weight:600!important;line-height:1.3!important;min-height:44px!important;padding:10px!important}
html body .customer-followup .followup-later[open]{flex-basis:100%}
.followup-schedule{padding-top:8px;display:grid;gap:8px;min-width:0}
.followup-presets{display:flex;gap:8px;flex-wrap:wrap}.followup-presets>.btn{flex:1;min-width:0;font-size:12px;white-space:normal}
.followup-custom{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap}.followup-custom>label{display:grid;gap:4px;flex:1 1 210px;min-width:0;font-size:12px}.followup-custom input{box-sizing:border-box;min-width:0;width:100%;min-height:42px;font-size:14px;padding:7px;border:1px solid var(--sd-rule);color:var(--sd-ink);background:var(--sd-canvas)}
.followup-local-error{color:var(--followup-red-ink)!important}
html body .customer-followup .followup-action>textarea{flex:1 0 100%}
@media(min-width:1024px){html body .customer-followup .followup-controls{grid-template-columns:minmax(0,1fr) 360px;align-items:start}html body .customer-followup .followup-controls>textarea{grid-column:1}html body .customer-followup .followup-buttons{grid-column:2}}
/* Pair short fields on mobile; preserve every field and its existing name. */
@media(max-width:767px){
 html body #deal-editor-content #deal-form .form-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px 10px!important}
 html body #deal-editor-content #deal-form .form-grid>*,html body #deal-editor-content #deal-form .form-grid>label,html body #deal-editor-content #deal-form .form-grid>.documents-columns,html body #deal-editor-content #deal-form .form-grid>.customer-snapshot,html body #deal-editor-content #deal-form .form-grid>.value-difference{grid-column:1/-1}
 html body #deal-editor-content #deal-form .form-grid>label:has([name=attention]),html body #deal-editor-content #deal-form .form-grid>label:has([name=site_visit_status]),html body #deal-editor-content #deal-form .form-grid>label:has([name=site_visit_date]),html body #deal-editor-content #deal-form .form-grid>label:has([name=site_visit_time]),html body #deal-editor-content #deal-form [data-stage-index="2"]>.form-grid>label:has([name=title]),html body #deal-editor-content #deal-form [data-stage-index="2"]>.form-grid>label:has([name=customer_budget]),html body #deal-editor-content #deal-form [data-stage-index="3"]>.form-grid>label,html body #deal-editor-content #deal-form [data-stage-index="4"]>.form-grid>label{grid-column:span 1}
 html body #deal-editor-content #deal-form label{min-width:0;gap:5px!important;font-size:12px!important}
 html body #deal-editor-content #deal-form :is(input,select,textarea){box-sizing:border-box;min-width:0;max-width:100%;width:100%}
 html body #deal-editor-content #deal-form input[type=checkbox]{width:17px}
 html body #deal-editor-content .document-column{gap:9px!important}
 html body #deal-editor-content .document-column .documents-field{gap:8px!important;padding-top:0!important;margin-top:0!important}
 html body #deal-editor-content .documents-field>strong{margin-top:0!important}
 html body #deal-editor-content .quote-reference-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 html body #deal-editor-content .mobile-quote-pairs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 html body #deal-editor-content .mobile-quote-pairs>.quote-reference-grid{grid-column:1/-1}
 html body #deal-editor-content .mobile-quote-pairs>label{grid-column:span 1}
 html body #deal-editor-content #deal-form .stage-swipe-box>details.stage-section{padding:12px!important}
 html body #deal-editor-content .documents-columns{gap:16px!important}
 html body .customer-followup textarea{font-size:16px!important;min-height:68px!important}
}
@media(max-width:1023px){
 html body #deal-stage-nav{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px!important}
 html body #deal-stage-nav .stage-nav-heading{display:contents!important}
 html body #deal-stage-nav .stage-nav-identity{grid-column:1;grid-row:1;min-width:0}
 html body #deal-stage-nav .stage-nav-arrows{grid-column:2;grid-row:1;align-self:center}
 html body #deal-stage-nav .stage-nav-timeline{grid-column:1/-1;grid-row:2;min-width:0;width:100%!important;max-width:none!important}
 html body #deal-stage-nav.has-sticky-followup .stage-nav-timeline{grid-column:1}
 html body #deal-stage-nav .stage-followup-trigger{grid-column:2;grid-row:2;align-self:start;margin-top:calc((var(--stage-circle-hit) - 30px)/2)}
 html body #deal-stage-nav.is-slim .stage-nav-identity{display:block!important}
 html body #deal-stage-nav.is-slim .stage-nav-identity>strong,html body #deal-stage-nav.is-slim .stage-nav-identity>small{display:inline!important;line-height:1.4!important;white-space:normal!important}
}
html body #deal-editor-content .assignment-save-status{min-height:0!important;margin:2px 0 0!important}
html body #deal-editor-content .assignment-save-status:empty{display:none!important}
html body #deal-editor-content .quotation-detail-fields{margin-top:8px!important}
@media(min-width:1024px){
 html body #deal-stage-nav.is-slim .stage-nav-timeline{padding-bottom:0!important;height:var(--stage-circle-hit)!important}
 html body #deal-stage-nav.is-slim .stage-nav-identity{white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
 html body #deal-stage-nav.is-slim .stage-nav-identity>small{white-space:nowrap!important}
 html body #deal-stage-nav.is-slim .stage-nav-arrows button{width:36px!important;height:36px!important;min-height:36px!important}
}
html body #deal-stage-nav.is-slim .stage-nav-identity>strong::after,html body #deal-stage-nav.is-slim .stage-nav-identity>small::before{content:none!important}
/* Disclosure contents flow below the two actions, without moving either action. */
html body .customer-followup .followup-later,html body .customer-followup .followup-later[open]{display:contents!important}
html body .customer-followup .followup-later>summary{flex:1;min-width:0}
html body .customer-followup .followup-schedule{flex:1 0 100%;width:100%;min-width:0;order:3}
html body .customer-followup .followup-later:not([open])>.followup-schedule{display:none!important}
html body .customer-followup .followup-schedule{grid-template-columns:repeat(2,minmax(0,1fr))}
html body .customer-followup .followup-schedule>.followup-presets,html body .customer-followup .followup-schedule>.followup-custom,html body .customer-followup .followup-schedule>input,html body .customer-followup .followup-schedule>.btn:last-child{grid-column:1/-1}
/* Important declarations in this layer consistently override older rounded rules. */
@layer salesdesk-shapes{
 html body button:not(.followup-pill),html body input,html body select,html body textarea,html body .btn,html body .pipeline-card,html body .dl-mobile-card,html body .panel,html body .stage-swipe-box,html body .deal-type-box,html body .deal-type-picker-input,html body .salesdesk-confirm-dialog,html body .brand-mark,html body [class*="avatar"],html body .user-dot,html body .customer-followup .followup-later>summary{border-radius:6px!important}
}
html body .customer-followup .followup-buttons{align-items:stretch}
html body .customer-followup .followup-buttons .followup-later>summary{padding:10px 6px!important;white-space:normal!important}
@media(max-width:767px){
 html body #deal-editor-content #deal-form .form-grid>label,html body #deal-editor-content .quote-reference-grid>label,html body #deal-editor-content .mobile-quote-pairs>label{display:flex!important;flex-direction:column!important}
 html body #deal-editor-content #deal-form .form-grid>label>input,html body #deal-editor-content #deal-form .form-grid>label>select,html body #deal-editor-content .quote-reference-grid>label>input,html body #deal-editor-content .mobile-quote-pairs>label>input,html body #deal-editor-content .mobile-quote-pairs>label>select{margin-top:auto!important}
 .sticky-followup-dialog{width:calc(100% - 12px);max-width:calc(100% - 12px);padding:8px}
}
