#salesFollowup {max-width:1250px;margin:0 auto;color:#173653} .sf-header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:18px 0} .sf-header h1{font-size:32px;margin:8px 0} .sf-eyebrow{font-size:12px;letter-spacing:2px;color:#2673b7;font-weight:700}.sf-role,.sf-badge{display:inline-block;background:#e8f2ff;color:#245d91;border-radius:8px;padding:6px 10px;font-size:12px}.sf-tabs{display:flex;gap:8px;border-bottom:1px solid #dce5ee;padding-bottom:14px;margin-bottom:22px}.sf-tabs button{border:0;background:transparent;padding:10px 18px}.sf-tabs .selected{background:#1768b0;color:white;border-radius:9px}.sf-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:22px}.sf-stats button{display:flex;flex-direction:column;align-items:flex-start;padding:20px;background:white;border:1px solid #dce5ee;border-radius:12px}.sf-stats strong{font-size:32px;margin-top:10px}.sf-toolbar,.sf-task-top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.sf-toolbar{margin-bottom:18px}.sf-toolbar h2{margin:0 0 8px}.sf-filters{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:18px 0}.sf-filters label{display:flex;align-items:center;gap:8px}.sf-task-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.sf-task{padding:20px;border:1px solid #dce5ee;border-radius:12px}.sf-task h3{margin:12px 0;overflow-wrap:anywhere}.sf-customer-link{border:0;background:transparent;color:#1267ae;font-weight:700;font-size:16px;padding:8px 0;text-align:left;white-space:normal;overflow-wrap:anywhere}.sf-badge.overdue{background:#ffebe7;color:#a93a23}.sf-empty{text-align:center;padding:35px;color:#617589}.sf-error{color:#a52b23;background:#fff3f1;padding:10px;border-radius:6px}.sf-error:empty{display:none}.sf-detail{margin-top:16px}.sf-contact{display:flex;gap:20px;flex-wrap:wrap}.sf-history{display:grid;gap:16px}.sf-history .panel{margin:0}.sf-next,.sf-result{background:#f1f6fc;padding:14px;border-radius:8px}.sf-prewrap{white-space:pre-wrap;overflow-wrap:anywhere}.sf-wide{grid-column:1/-1}.sf-checks{display:flex;gap:20px;flex-wrap:wrap;margin-bottom:22px}.sf-question{display:grid;grid-template-columns:1fr 1.5fr .8fr 1.5fr;gap:12px;padding:15px;border:1px solid #dce5ee;border-radius:10px;margin-bottom:12px}.sf-help{line-height:1.7}.sf-help li{margin-bottom:12px}#sfForm textarea{min-height:90px}#sfSearch{margin-bottom:15px;width:100%;max-width:480px}#sfQuestions input{min-width:0}@media(max-width:800px){.sf-header{align-items:flex-start;flex-direction:column}.sf-header h1{font-size:26px}.sf-task-grid,.sf-question{grid-template-columns:1fr}.sf-stats{gap:8px}.sf-stats button{padding:14px}.sf-tabs button{padding:10px}.sf-filters select{max-width:200px}#sfForm.grid2{grid-template-columns:1fr}}

/* Bilingual field guides stay next to their controls on desktop and mobile. */
.sf-guided-field{position:relative;min-width:0;padding-right:38px}.sf-guided-field>.field{width:100%;margin:0}.sf-info{display:inline-block;vertical-align:top;max-width:100%;margin:4px 0}.sf-guided-field>.sf-info{position:absolute;right:0;top:0}.sf-info summary{list-style:none;cursor:pointer;color:#1768b0;border:1px solid #b6cee5;background:#f0f7ff;border-radius:50%;width:30px;height:30px;display:flex;align-items:center;justify-content:center;font-size:20px}.sf-info summary::-webkit-details-marker{display:none}.sf-info summary:focus-visible{outline:3px solid #1768b0;outline-offset:3px}.sf-info[open]{position:relative;display:block;grid-column:1/-1}.sf-guided-field>.sf-info[open]{position:static;margin-top:8px}.sf-info-body{padding:12px;border:1px solid #c6dbed;border-radius:8px;background:#f4f8fd;line-height:1.6;overflow-wrap:anywhere}.sf-info-body p{margin:8px 0}.sf-guide-th{border-top:1px solid #cbdceb;padding-top:8px;color:#40576c}.sf-help section{margin:22px 0;border-top:1px solid #dce5ee;padding-top:14px}.sf-help h3{margin-bottom:4px}.sf-help h4{margin-top:0;color:#40576c}.sf-filters .sf-guided-field{display:flex;align-items:center;gap:6px}.sf-filters .sf-info[open]{max-width:420px}.sf-question .sf-guided-field{align-self:start}

.sf-guided-field:has(>label.hidden){display:none}
/* Keep reminder checkboxes compact and monetary metrics readable on small screens. */
#salesFollowup input[type=checkbox]{width:auto;min-width:16px;min-height:16px;margin:0 6px 0 0}
.sf-checks label,#v2Dashboard>label,#v2OpportunityWorkspace .panel>label{display:inline-flex;align-items:center;gap:6px;margin-right:14px;margin-bottom:10px}
#v2Dashboard>.sf-info{margin:4px 0 14px}
@media(max-width:600px){.sf-stats{grid-template-columns:1fr}.sf-stats strong{font-size:28px;overflow-wrap:anywhere}}
.sf-filters{align-items:flex-end;padding:12px;background:#f5f8fc;border-radius:10px}.sf-filters .field{display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:140px;max-width:230px}.sf-filters input,.sf-filters select{width:100%;min-height:40px}.sf-pagination{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:16px 0}.sf-pagination button{min-width:38px}.sf-pagination [aria-current=page]{font-weight:700}.sf-tabs{flex-wrap:wrap}.sf-task>button[data-case]{display:block;margin:8px 0}.sf-task .primary{margin-top:8px}.sf-guided-field{min-width:0}.sf-filters .sf-guided-field{max-width:260px;align-items:flex-start}.sf-filters .sf-guided-field>.sf-info[open]{position:static;flex-basis:100%}.sf-filters .sf-guided-field:has(>.sf-info[open]){display:block}.sf-help h3{font-size:20px}@media(max-width:600px){.sf-filters{display:grid;grid-template-columns:1fr}.sf-filters .field,.sf-filters .sf-guided-field{max-width:none;width:100%}.sf-tabs button{padding:10px 8px}.sf-task-grid{grid-template-columns:1fr}.sf-pagination{gap:5px}}

/* PM work queue and compact service dialogs */
#v2PMWorkspace [hidden],.pm-dialog [hidden]{display:none!important}
.pm-title-row,.pm-toolbar,.pm-toolbar>div,.pm-pages,.pm-pages>div{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.pm-title-row p{margin:0}.pm-filters,.pm-extra,.pm-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:end}
.pm-filters{margin:20px 0 10px}.pm-extra{grid-column:1/-1}
.pm-field{display:flex;flex-direction:column;gap:8px;min-width:0;margin:0}
.pm-label{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-height:46px;line-height:1.35;font-weight:600}
.pm-label small,.pm-stats small{display:block;font-size:13px;font-weight:400;color:#60748a;margin-top:3px}
.pm-field input,.pm-field select,.pm-field textarea{box-sizing:border-box;width:100%;min-width:0;min-height:44px;font-size:16px;text-align:left;margin:0}
.pm-info{padding:0!important;min-height:24px!important;width:24px;flex-shrink:0;border:0!important;color:#1768b0;background:transparent!important}
#v2PMWorkspace button,.pm-dialog button{min-height:44px;white-space:normal;line-height:1.35}
.pm-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0}
.pm-stats button{display:flex;align-items:flex-start;justify-content:space-between;text-align:left;border:1px solid #dce5ee;background:#fff;padding:16px;border-radius:12px;gap:10px}
.pm-stats button.selected{border-color:#1768b0;background:#eef6ff}.pm-stats strong{font-size:28px}
.pm-toolbar{margin:18px 0}.pm-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:14px}
.pm-table th{background:#f0f5fa;font-weight:600;text-align:left;vertical-align:top;padding:14px 12px;line-height:1.45}
.pm-table td{vertical-align:top;padding:18px 12px;border-bottom:1px solid #dce5ee;overflow-wrap:anywhere;line-height:1.5;height:140px;box-sizing:border-box}
.pm-table th:nth-child(1){width:12%}.pm-table th:nth-child(2){width:16%}.pm-table th:nth-child(3){width:24%}.pm-table th:nth-child(4){width:16%}.pm-table th:nth-child(5){width:17%}.pm-table th:nth-child(6){width:15%}
.pm-table small{display:block;font-size:13px;color:#60748a;margin-top:8px}.pm-table strong{display:block}
.pm-row-actions{display:flex;flex-direction:column;gap:8px}.pm-row-actions button{width:100%;padding:8px!important}
.pm-badge{display:inline-block;background:#edf2f7;color:#425970;border-radius:8px;padding:8px;font-size:13px;line-height:1.5}
.pm-badge.soon{background:#fff3d8;color:#8a5100}.pm-badge.late{background:#ffebe7;color:#a32922}.pm-badge.done{background:#e5f5ee;color:#17623d}
.pm-pages{margin-top:18px;font-size:14px}.pm-pages>div{gap:6px}.pm-pages button{padding:8px 12px!important}
.pm-empty{padding:30px;text-align:center;color:#60748a}.pm-mobile-rows{display:none}
.pm-dialog{box-sizing:border-box;width:min(680px,calc(100vw - 32px));max-height:90dvh;padding:0;border:1px solid #dce5ee;border-radius:16px;color:#173653;overflow:auto}
.pm-dialog::backdrop{background:rgba(10,28,48,.5)}
.pm-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;border-bottom:1px solid #dce5ee}
.pm-dialog-head h3{margin:0;font-size:20px}.pm-dialog-head button{flex-shrink:0}
.pm-dialog form,.pm-dialog-body{padding:24px}.pm-dialog .pm-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.pm-wide{grid-column:1/-1;min-width:0}.pm-dialog p{overflow-wrap:anywhere}
.pm-job-context{padding:14px;background:#f0f5fa;border-radius:10px}.pm-job-context p{margin:6px 0;font-size:14px}
.pm-dialog footer{display:flex;justify-content:flex-end;gap:12px;margin-top:18px}.pm-dialog-error{color:#a32922}.pm-dialog-error:empty{display:none}
.pm-inline-help{padding:14px;background:#edf6ff;border-radius:10px;margin:16px}.pm-inline-help p{margin:6px 0}
@media(max-width:900px){.pm-table{display:none}.pm-mobile-rows{display:grid;gap:12px}.pm-mobile-rows article{border:1px solid #dce5ee;border-radius:12px;padding:16px;min-width:0}
.pm-card-date{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.pm-card-date strong{flex-shrink:0;font-size:14px}
.pm-mobile-rows h3{font-size:18px;margin:14px 0 6px}.pm-mobile-rows p{font-size:14px;margin:6px 0;overflow-wrap:anywhere}
.pm-row-actions{flex-direction:row;margin-top:14px}.pm-row-actions button{flex:1;min-width:0;font-size:14px}
.pm-filters,.pm-extra{grid-template-columns:repeat(2,minmax(0,1fr))}.pm-stats{gap:8px}.pm-stats button{padding:12px;flex-direction:column}.pm-stats strong{font-size:24px}}
@media(max-width:540px){.pm-filters,.pm-extra{grid-template-columns:minmax(0,1fr)}.pm-stats button{font-size:13px;padding:10px}.pm-stats small{font-size:12px}
.pm-toolbar>div{width:100%}.pm-toolbar>div button{flex:1;min-width:0;font-size:14px}
.pm-dialog{width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}.pm-dialog-head{padding:14px 16px}.pm-dialog form,.pm-dialog-body{padding:16px}
.pm-dialog .pm-form-grid{grid-template-columns:minmax(0,1fr)}.pm-dialog footer button{flex:1}.pm-pages>div{width:100%;justify-content:flex-start}}


.pm-work-tabs{display:flex;gap:8px;margin:0 0 16px;align-items:stretch;max-width:700px}
.pm-work-tabs button{flex:1;min-width:0;text-align:left;border:1px solid #c9d7e7;background:#f4f7fb;color:#29465f;padding:12px 16px;border-radius:10px;line-height:1.4}
.pm-work-tabs button span,.pm-work-tabs button small{display:block}
.pm-work-tabs button small{font-size:13px;margin-top:4px}
.pm-work-tabs button.selected{background:#1767b0;color:#fff;border-color:#1767b0;box-shadow:inset 0 -3px 0 #0e477e}
.pm-work-tabs button:focus-visible{outline:3px solid #75b6ef;outline-offset:2px}
@media(max-width:480px){.pm-work-tabs{gap:6px}.pm-work-tabs button{padding:10px 9px;font-size:13px}.pm-work-tabs button small{font-size:12px}}

.sf-tabs>.pm-work-tabs{margin:0;flex:1;max-width:700px}
.sf-tabs:has(>.pm-work-tabs){align-items:stretch}
@media(max-width:600px){.sf-tabs>.pm-work-tabs{flex-basis:100%;width:100%}}

.pm-label{min-height:24px}
.pm-work-tabs button{min-height:44px}

/* Summary cards also select the three mutually exclusive PM queues. */
.pm-work-tabs{max-width:none}
.sf-tabs>.pm-work-tabs{max-width:none}
.pm-work-tabs button{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:76px}
.pm-work-tabs button small{font-size:28px;font-weight:700;line-height:1;margin:0}
#v2PMOverdueTab:not(.selected){border-color:#f0b5b1;background:#fff4f3;color:#a62220}
@media(max-width:480px){.pm-work-tabs button{flex-direction:column;align-items:flex-start;gap:8px;padding:10px}.pm-work-tabs button small{font-size:24px}}
/* Compact PM workspace, retaining 44px touch targets and readable text. */
#salesFollowup:has(.pm-work-tabs)>.sf-header{padding:8px 0;gap:12px}
#salesFollowup:has(.pm-work-tabs)>.sf-header h1{font-size:28px;margin:4px 0}
#salesFollowup:has(.pm-work-tabs)>.sf-header .muted{margin:4px 0}
.sf-tabs:has(>.pm-work-tabs){margin-bottom:12px;padding-bottom:10px}
.pm-work-tabs button{min-height:64px;padding:10px 12px}
#v2PMWorkspace .pm-filters,#v2PMWorkspace .pm-extra{gap:12px}
#v2PMRange{font-size:13px;margin:8px 0}
#v2PMWorkspace .pm-toolbar{margin:12px 0}
.pm-table td{height:116px;padding:12px 10px}
@media(max-width:540px){#salesFollowup:has(.pm-work-tabs)>.sf-header h1{font-size:24px}.pm-work-tabs button{min-height:72px}}

/* PM queues share the compact BOQ table presentation at every viewport. */
.pm-table-wrap{max-width:100%;overflow-x:auto;border-radius:12px;overscroll-behavior-x:contain}
.pm-table{min-width:860px;font-size:14px}
.pm-table th{background:#f7f9fc;color:#596a80;padding:12px 10px;vertical-align:middle}
.pm-table td{height:auto;padding:10px;vertical-align:middle}
.pm-table small{margin-top:3px}
.pm-table .pm-empty{height:80px;text-align:center}
.pm-closed-table{min-width:1000px}
.pm-closed-table th:nth-child(3){width:20%}
.pm-closed-table th:nth-child(4){width:14%}
.pm-closed-table th:nth-child(5){width:12%}
.pm-closed-table th:nth-child(6){width:14%}
.pm-closed-table th:nth-child(7){width:12%}
.pm-scroll-hint{display:none;font-size:12px;margin:6px 0}
@media(max-width:900px){.pm-table{display:table}.pm-scroll-hint{display:block}.pm-table .pm-row-actions{flex-direction:column;margin:0}.pm-table .pm-row-actions button{flex:none}}

.pm-assignee-list{max-height:180px;overflow:auto;display:grid;gap:8px;padding:10px;border:1px solid #dbe3ef;border-radius:8px}.pm-assignee-list label{display:flex;align-items:center;gap:8px}.pm-assignee-list input[type=checkbox]{width:auto;min-height:20px}

.pm-assignment-other{display:flex;align-items:center;gap:8px;margin-top:10px}.pm-assignment-other input[type=checkbox]{width:auto;min-height:20px;margin:0}
@media(max-width:900px){.pm-dialog{max-width:100vw}.pm-dialog footer{position:sticky;bottom:-16px;z-index:2;background:white;padding:12px 0;border-top:1px solid #dce5ee}}


/* Sales Follow-up uses the same module shell as PM and the rest of Scotty. */
#salesFollowup{max-width:1250px;margin:0 auto}
.sf-module-tabs{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  padding-bottom:14px;
  margin-bottom:22px;
}
.sf-work-tabs{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.sf-module-tabs>button,
.sf-work-tabs>button{
  border:0;
  background:transparent;
  padding:10px 18px;
}
.sf-module-tabs .selected,
.sf-work-tabs .selected{
  background:#1768b0;
  color:#fff;
  border-radius:9px;
}
.sf-guide-tab{margin-left:auto;white-space:nowrap}
.sf-header,.sf-eyebrow,.sf-role{display:none!important}
@media(max-width:800px){
  .sf-module-tabs{align-items:flex-start}
  .sf-work-tabs{width:100%}
  .sf-guide-tab{margin-left:0}
}


/* Sales Follow-up pipeline/activity dashboard */
.sf-record-id{font-size:12px;font-weight:700;letter-spacing:.05em;color:#1768b0;margin:0 0 6px}
.sf-dashboard-filter{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin-bottom:20px}
.sf-dashboard-filter .field{min-width:180px;margin:0}
.sf-dashboard-section{border:1px solid #dce5ee;border-radius:14px;background:#fff;padding:20px;margin:0 0 22px}
.sf-dashboard-opportunity{border-top:4px solid #1768b0}
.sf-dashboard-activity{border-top:4px solid #1f8b65}
.sf-section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}
.sf-section-heading h2{margin:0 0 4px;font-size:23px}
.sf-section-heading h2 span{font-size:16px;color:#617589;font-weight:600;margin-left:6px}
.sf-section-heading p{margin:0;color:#617589}
.sf-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:16px}
.sf-kpi{border:1px solid #dce5ee;border-radius:10px;padding:12px;background:#f8fbfe}
.sf-kpi small{display:block;color:#617589;margin-bottom:6px}
.sf-kpi strong{font-size:24px;color:#173653;overflow-wrap:anywhere}
.sf-dashboard-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:16px}
.sf-mini-chart{display:grid;gap:12px;margin-top:14px}
.sf-chart-row{display:grid;grid-template-columns:minmax(90px,150px) 1fr minmax(70px,auto);gap:10px;align-items:center}
.sf-chart-row>span{font-size:13px;color:#40576c;overflow-wrap:anywhere}
.sf-chart-row>strong{text-align:right;font-size:13px}
.sf-chart-track{height:12px;border-radius:999px;background:#e8eef5;overflow:hidden}
.sf-chart-track i{display:block;height:100%;background:#1768b0;border-radius:999px;min-width:0}
.sf-dashboard-activity .sf-chart-track i{background:#1f8b65}
#v2ActivityForm{margin-bottom:18px}
#v2ActivityForm textarea{width:100%;resize:vertical}
@media(max-width:1000px){
  .sf-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .sf-dashboard-grid{grid-template-columns:1fr}
}
@media(max-width:650px){
  .sf-dashboard-filter{display:grid;grid-template-columns:1fr}
  .sf-dashboard-filter .field{min-width:0}
  .sf-section-heading{align-items:flex-start;flex-direction:column}
  .sf-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sf-chart-row{grid-template-columns:90px 1fr 60px}
}


/* Clear section title before filter controls */
.sf-filters .sf-filter-heading{
  flex:1 0 100%;
  margin:0 0 4px;
}
.sf-filters .sf-filter-heading h3{
  margin:0 0 2px;
  font-size:16px;
}
.sf-filters .sf-filter-heading p{
  margin:0;
  color:#617589;
  font-size:13px;
}


/* Compact customer master and opportunity workflow */
.sf-customer-search{display:flex;align-items:center;gap:10px;margin:12px 0 18px}
.sf-customer-search #sfSearch{margin:0;max-width:520px}
.sf-customer-table{width:100%;border-collapse:collapse;table-layout:fixed}
.sf-customer-table th,.sf-customer-table td{padding:12px;border-bottom:1px solid #dce5ee;vertical-align:top;text-align:left}
.sf-customer-table th>button{border:0;background:transparent;padding:0 0 8px;font-weight:700;color:#173653}
.sf-customer-table th select{display:block;width:100%;min-height:36px;margin-top:6px;font-weight:400}
.sf-customer-table th:nth-child(1){width:24%}.sf-customer-table th:nth-child(2){width:24%}.sf-customer-table th:nth-child(3){width:18%}.sf-customer-table th:nth-child(4){width:12%}.sf-customer-table th:nth-child(5){width:13%}.sf-customer-table th:nth-child(6){width:9%}
.sf-settings-actions{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:18px}
.sf-opportunity-table{width:100%;border-collapse:collapse;table-layout:fixed}
.sf-opportunity-table th,.sf-opportunity-table td{padding:12px;border-bottom:1px solid #dce5ee;vertical-align:top;text-align:left;overflow-wrap:anywhere}
.sf-opportunity-table th{background:#f5f8fc}
.sf-opportunity-table th:nth-child(1){width:14%}.sf-opportunity-table th:nth-child(2){width:25%}.sf-opportunity-table th:nth-child(3){width:11%}.sf-opportunity-table th:nth-child(4){width:12%}.sf-opportunity-table th:nth-child(5){width:11%}.sf-opportunity-table th:nth-child(6){width:15%}.sf-opportunity-table th:nth-child(7){width:12%}
.sf-row-actions{display:flex;gap:6px;flex-wrap:wrap}
.sf-dialog{box-sizing:border-box;width:min(760px,calc(100vw - 32px));max-height:90dvh;border:1px solid #dce5ee;border-radius:14px;padding:0;color:#173653}
.sf-dialog::backdrop{background:rgba(10,28,48,.5)}
.sf-dialog-head{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #dce5ee}
.sf-dialog-head h3{margin:0}.sf-dialog-head button{min-width:42px}
.sf-dialog-body{padding:20px}.sf-dialog-body .field small{font-weight:400;color:#617589;margin-left:4px}
.sf-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}
@media(max-width:800px){
  .sf-customer-search{align-items:stretch;flex-direction:column}.sf-customer-search #sfSearch{max-width:none}
  .sf-customer-table,.sf-opportunity-table{min-width:900px}
  .sf-dialog{width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}
  .sf-dialog-body{grid-template-columns:1fr}
}


/* Sales Follow-up round: aligned filters, tables and monthly dashboard */
.sf-opportunity-filters,
.sf-activity-filters{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  align-items:end;
}
.sf-opportunity-filters .sf-filter-heading,
.sf-activity-filters .sf-filter-heading{grid-column:1/-1}
.sf-opportunity-filters .field,
.sf-activity-filters .field{min-width:0;margin:0}
.sf-filter-actions{display:flex;gap:8px;align-items:end}
.sf-column-filter{display:block;margin-top:6px}
.sf-column-filter span{display:block;font-size:11px;color:#617589;margin:0 0 4px;font-weight:600}
.sf-customer-table th:nth-child(1){width:18%}
.sf-customer-table th:nth-child(2){width:13%}
.sf-customer-table th:nth-child(3){width:15%}
.sf-customer-table th:nth-child(4){width:16%}
.sf-customer-table th:nth-child(5){width:13%}
.sf-customer-table th:nth-child(6){width:15%}
.sf-customer-table th:nth-child(7){width:10%}
.sf-activity-table{width:100%;border-collapse:collapse;table-layout:fixed;min-width:1200px}
.sf-activity-table th,.sf-activity-table td{padding:10px;border-bottom:1px solid #dce5ee;vertical-align:top;text-align:left;overflow-wrap:anywhere}
.sf-activity-table th{background:#f5f8fc}
.sf-detail-list{display:grid;grid-template-columns:170px 1fr;gap:10px 16px;margin:0}
.sf-detail-list dt{font-weight:700;color:#40576c}
.sf-detail-list dd{margin:0}
.sf-dashboard-opportunity .sf-kpi-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.sf-dashboard-opportunity .sf-kpi strong{font-size:18px;line-height:1.35}
#v2UpdateForm [data-status-group]{border:1px solid #e2e8f0;border-radius:10px;padding:14px;background:#f8fbfe}
#v2UpdateForm [data-status-group].hidden{display:none}
@media(max-width:1100px){
  .sf-opportunity-filters,.sf-activity-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sf-filter-actions{grid-column:auto}
}
@media(max-width:900px){
  .sf-opportunity-filters,.sf-activity-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sf-dashboard-opportunity .sf-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sf-customer-table,.sf-opportunity-table,.sf-activity-table{min-width:980px}
  .sf-detail-list{grid-template-columns:1fr}
}
@media(max-width:560px){
  .sf-opportunity-filters,.sf-activity-filters{grid-template-columns:1fr}
  .sf-filter-actions{width:100%}
  .sf-filter-actions button{flex:1}
}


/* Sales Follow-up go-live polish */
.sf-customer-table thead th{vertical-align:top}
.sf-customer-table .sf-column-title{
  min-height:28px;
  display:flex;
  align-items:flex-start;
  font-weight:700;
  color:#173653;
  white-space:nowrap;
}
.sf-customer-table .sf-column-title>button{
  border:0;
  background:transparent;
  padding:0;
  font:inherit;
  color:inherit;
  white-space:nowrap;
}
.sf-customer-table .sf-column-select{
  width:100%;
  min-height:38px;
  margin-top:8px;
  font-weight:400;
}
.sf-customer-table th:nth-child(1){width:18%}
.sf-customer-table th:nth-child(2){width:13%}
.sf-customer-table th:nth-child(3){width:15%}
.sf-customer-table th:nth-child(4){width:15%}
.sf-customer-table th:nth-child(5){width:15%}
.sf-customer-table th:nth-child(6){width:16%}
.sf-customer-table th:nth-child(7){width:8%}
.sf-customer-table td:nth-child(5),
.sf-customer-table td:nth-child(7){text-align:center}
/* Customer search is limited to the existing Sales creation forms. */
.sf-customer-picker{display:block;position:relative;min-width:0;width:100%}
.sf-customer-picker>input{width:100%;min-width:0;box-sizing:border-box;font-weight:400}
.sf-customer-picker>select[hidden],.sf-customer-matches[hidden]{display:none!important}
.sf-customer-picker>small{display:block;margin-top:6px;line-height:1.4;font-weight:400}
.sf-customer-matches{display:block;max-height:260px;overflow-y:auto;overscroll-behavior:contain;margin-top:5px;padding:4px;border:1px solid #c8d7eb;border-radius:8px;background:#fff;box-shadow:0 5px 14px #0a2c5d12}
.sf-customer-matches>button{display:block;width:100%;text-align:left;padding:10px 12px;border:0;border-radius:5px;background:#fff;color:#172231;white-space:normal;overflow-wrap:anywhere}
.sf-customer-matches>button:hover,.sf-customer-matches>button[aria-selected=true]{background:#e7f0fd;color:#0a5bc6}
.sf-customer-matches>button>strong,.sf-customer-matches>button>small{display:block}
.sf-customer-matches>button>small{margin-top:3px;color:#65748a;font-weight:400}
/* Opportunity reconciliation: scoped columns, totals and mobile cards. */
.sf-filter-totals{padding:12px 14px;background:#edf5ff;border:1px solid #cadaec;border-radius:9px;font-weight:600;line-height:1.7;overflow-wrap:anywhere}
.sf-opportunity-columns{margin:12px 0}.sf-opportunity-columns summary{cursor:pointer;font-weight:600}
.sf-opportunity-columns fieldset{display:flex;flex-wrap:wrap;gap:10px 18px;border:1px solid #dce5ee;border-radius:8px;padding:12px}
.sf-opportunity-columns label{display:flex;align-items:center;gap:6px;font-weight:400}.sf-opportunity-columns input[type=checkbox]{width:auto}
.sf-opportunity-results th,.sf-opportunity-results td{width:auto!important;overflow-wrap:anywhere}
.sf-opportunity-results [hidden]{display:none!important}
.sf-followup-age,.sf-value-kind{display:block;margin-top:5px;line-height:1.4}
.sf-followup-overdue,.sf-primary-table .sf-followup-overdue{display:block;color:#b42318;font-weight:700}.sf-followup-today{color:#875400;font-weight:700}
.sf-kpi-link{text-align:left;font:inherit;background:#f6fbff;color:#173653;cursor:pointer}
.sf-kpi-link span{display:block;margin-top:7px;font-size:12px;color:#1768b0}
.sf-kpi-link:hover,.sf-kpi-link:focus-visible{outline:2px solid #1768b0;outline-offset:2px}
@media(min-width:701px){
 .sf-opportunity-results{table-layout:auto;min-width:1350px}
 .sf-opportunity-results th{min-width:105px}
 .sf-opportunity-results th[data-column=id]{min-width:110px}
 .sf-opportunity-results th[data-column=customer]{min-width:220px}
 .sf-opportunity-results th[data-column=followup]{min-width:160px}
 .sf-opportunity-results th[data-column=assigned]{min-width:130px}
 .sf-opportunity-results th[data-column=amount],.sf-opportunity-results th[data-column=quoteamount],.sf-opportunity-results th[data-column=wonamount],.sf-opportunity-results th[data-column=difference]{min-width:105px}
 .sf-opportunity-results td[data-column=id] strong,.sf-opportunity-results .sf-badge{white-space:nowrap}
}
@media(max-width:700px){
 .sf-opportunity-scroll{overflow:visible;min-width:0}
 .sf-opportunity-results,.sf-opportunity-results tbody{display:block;width:100%;min-width:0!important}
 .sf-opportunity-results thead{display:none}
 .sf-opportunity-results tr{display:block;border:1px solid #dce5ee;border-radius:10px;margin-bottom:12px;padding:8px;background:#fff}
 .sf-opportunity-results td{display:block;width:auto!important;border:0;padding:7px 8px;white-space:normal}
 .sf-opportunity-results td:before{content:attr(data-label);display:block;font-size:12px;color:#617589;margin-bottom:3px;font-weight:600}
 .sf-opportunity-results td.sf-empty:before{display:none}
 .sf-opportunity-results .sf-row-actions{flex-wrap:wrap}
 .sf-opportunity-columns fieldset{display:grid;grid-template-columns:1fr 1fr}
 .sf-opportunity-columns label{min-width:0}
}


.sf-opportunity-values{table-layout:auto;min-width:1250px}.sf-opportunity-values th{min-width:105px}.sf-opportunity-values th:nth-child(2){min-width:220px}


/* Quotation identity, amount and date stay aligned as a single document row. */
.sf-quote-lines{min-width:260px;display:grid;gap:6px}
.sf-quote-line{display:grid;grid-template-columns:minmax(70px,1fr) minmax(60px,.8fr) 95px;gap:4px 10px;padding:6px 0;border-bottom:1px solid var(--border,#dce2e8);align-items:baseline}
.sf-quote-line strong{overflow-wrap:anywhere}.sf-quote-line>span{text-align:right;font-variant-numeric:tabular-nums}.sf-quote-line small{grid-column:1/-1;color:#667085}
@media(max-width:700px){.sf-quote-lines{min-width:0;width:100%}.sf-quote-line{grid-template-columns:minmax(0,1fr) auto;}.sf-quote-line time{grid-column:1/-1}.sf-opportunity-results td[data-column=quotation]{display:block}.sf-row-actions{flex-wrap:wrap}}

/* Primary quotation workflow: existing Scotty colors and spacing. */
.sf-status-tabs {display:flex;gap:8px;flex-wrap:wrap}
.sf-primary-table {width:100%;border-collapse:collapse;table-layout:auto}
.sf-primary-table th,.sf-primary-table td {padding:12px;text-align:left;vertical-align:top;border-bottom:1px solid #e3e8ef;overflow-wrap:anywhere}
.sf-primary-table th button {border:0;background:transparent;padding:0;text-align:left;font-weight:600;color:inherit}
.sf-primary-table td:first-child {min-width:220px;max-width:360px}
.sf-primary-table small {line-height:1.6;color:#64748b}
.sf-quote-editor-row {display:grid;grid-template-columns:70px repeat(3,minmax(100px,1fr));gap:12px;margin:12px 0;padding:14px;border:1px solid #dce3ec;border-radius:10px;min-width:0}
.sf-quote-editor-row .sf-row-actions,.sf-quote-editor-row label:has(input[type=file]) {grid-column:span 2}
.sf-quote-editor-row input {max-width:100%;min-width:0}
#v2OpportunityForm [hidden] {display:none!important}
@media(max-width:700px) {
 .sf-primary-table thead {display:block}
 .sf-primary-table thead tr {display:flex;flex-wrap:wrap}
 .sf-primary-table th {display:block;flex:1 1 120px}
 .sf-primary-table,.sf-primary-table tbody,.sf-primary-table tr,.sf-primary-table td {display:block;width:100%;min-width:0!important;max-width:none!important;box-sizing:border-box}
 .sf-primary-table tr {border:1px solid #dce3ec;border-radius:10px;margin:12px 0}
 .sf-primary-table td:before {content:attr(data-label);display:block;font-size:12px;color:#64748b;margin-bottom:4px}
 .sf-quote-editor-row {grid-template-columns:1fr 1fr}
 .sf-quote-editor-row .field,.sf-quote-editor-row .sf-row-actions {min-width:0;grid-column:span 2}
}


/* Sales dashboard and append-only opportunity updates. */
.sf-sales-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;align-items:start}
.sf-sales-dashboard{grid-template-columns:minmax(0,1fr) 270px}
.sf-sales-main{min-width:0}
.sf-summary-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:14px 0}
.sf-summary-cards .sf-kpi strong{font-size:22px;font-variant-numeric:tabular-nums}
.sf-followup-panel{border:1px solid #dce5ee;background:#f8fbfe;border-radius:12px;padding:16px;min-width:0}
.sf-followup-panel article{padding:12px 0;border-top:1px solid #dce5ee;overflow-wrap:anywhere}
.sf-followup-panel article p{margin:6px 0}
.sf-primary-table td[data-label="Selected quotation"] small{display:block}
.sf-primary-table td[data-label="Latest Activity Update"]{min-width:150px;max-width:240px}
.sf-latest-update summary{cursor:pointer;list-style:none;outline-offset:4px}
.sf-latest-update summary>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}
.sf-latest-update summary>small{display:block;color:#1768b0;text-decoration:underline}
.sf-update-full{white-space:pre-wrap;overflow-wrap:anywhere;background:#f0f6fc;border:1px solid #cbdcec;border-radius:8px;padding:10px;margin-top:6px}
.sf-update-full small{display:block;white-space:normal;margin-top:8px}
.sf-activity-timeline{padding-left:22px;max-height:300px;overflow:auto}
.sf-activity-timeline li{border-bottom:1px solid #e3e8ef;padding:8px 0}
.sf-activity-timeline p{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0}
.sf-quote-editor-row{grid-template-columns:64px minmax(120px,1fr) minmax(140px,1fr);align-items:start;gap:10px;padding:12px}
.sf-quote-editor-row .field{margin:0;min-width:0}
.sf-quote-editor-row label:has(input[type=file]){grid-column:2 / -1}
.sf-quote-editor-row .sf-row-actions{grid-column:2 / -1;display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.sf-quote-editor-row .sf-row-actions>a,.sf-quote-editor-row .sf-row-actions>button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:38px;margin:0;padding:8px 12px;line-height:20px;border:1px solid #ccd8e5;border-radius:7px;font:inherit}
.sf-quote-editor-row input[type=file]{width:100%;font-size:13px}
.sf-quote-editor-row input[type=file]::file-selector-button{padding:8px 12px;margin-right:10px;min-height:38px;border:1px solid #ccd8e5;border-radius:7px;background:#fff;color:inherit;font:inherit}
.sf-quote-editor-row input[data-money]{font-variant-numeric:tabular-nums;text-align:right}
@media(max-width:1100px){.sf-sales-dashboard{grid-template-columns:minmax(0,1fr)}.sf-followup-panel{grid-row:2}}
@media(max-width:700px){.sf-quote-editor-row{grid-template-columns:48px minmax(0,1fr)}.sf-quote-editor-row .field{grid-column:2}.sf-quote-editor-row .field:first-of-type{grid-column:1;grid-row:1 / 3}.sf-quote-editor-row .sf-row-actions,.sf-quote-editor-row label:has(input[type=file]){grid-column:1 / -1}.sf-quote-editor-row .sf-row-actions>*{flex:1 1 auto}.sf-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.sf-summary-cards .sf-kpi strong{font-size:18px}}
#v2OpportunityWorkspace>.sf-section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
#v2NewOpportunity{margin-left:auto;flex:0 0 auto}
.sf-primary-quote{display:grid;gap:6px;min-width:170px;padding:4px 12px;justify-items:start}
.sf-primary-quote strong{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.sf-primary-quote .sf-quoted-money{font-weight:600;font-variant-numeric:tabular-nums;min-width:120px;text-align:right}
.sf-primary-quote a{display:inline-flex;padding:8px 12px;min-height:38px;box-sizing:border-box;align-items:center;border:1px solid #b8cce1;border-radius:7px;background:#f0f7ff;margin-top:4px;text-decoration:none}
.sf-list-update{margin-top:14px;max-width:320px}
@media(max-width:700px){.sf-primary-quote{padding:4px 0;min-width:0}.sf-list-update{max-width:none}}
/* Prevent intrinsic form/fieldset widths from overflowing narrow screens. */
.sf-dialog-body,.sf-dialog-body .field,.sf-quote-editor-row{min-width:0}
.sf-dialog-body input,.sf-dialog-body select,.sf-dialog-body textarea{box-sizing:border-box;max-width:100%;min-width:0}
@media(max-width:700px){.sf-dialog .grid2{grid-template-columns:minmax(0,1fr)}.sf-quote-editor-row{width:100%;box-sizing:border-box}.sf-quote-editor-row .sf-row-actions{flex-wrap:wrap}}

/* Summary and follow-ups share a top edge; the list uses the entire workspace. */
.sf-sales-main>.sf-filters{margin-top:0}
.sf-opportunity-list{width:100%;min-width:0;margin-top:20px}
.sf-followup-preview{max-height:250px;overflow:hidden;min-width:0}
.sf-followup-title{display:block;white-space:normal;overflow-wrap:anywhere;line-height:1.5}
.sf-followup-preview .sf-followup-title{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.sf-followup-preview article>p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.sf-followup-panel [data-more-followups]{margin-top:12px;width:100%}
.sf-followup-dialog article{padding:14px 0;border-bottom:1px solid #dce5ee;overflow-wrap:anywhere}
.sf-activity-timeline textarea{width:100%;box-sizing:border-box}

/* Compact correction actions sit directly after the activity author. */
.sf-activity-meta{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px}
.sf-activity-actions{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto}
.sf-activity-timeline .sf-activity-actions button{font-size:12px;line-height:1.2;min-height:26px;min-width:0;width:auto;margin:0;padding:4px 8px;border:1px solid #d4dfe9;border-radius:6px;background:#f8fafc;color:#34546f;box-shadow:none}
.sf-activity-timeline .sf-activity-actions button:hover{background:#eaf1f8;border-color:#a9bfd3}
.sf-activity-timeline .sf-activity-actions [data-delete-update]{color:#a23939}
.sf-activity-timeline .sf-activity-actions button:focus-visible{outline:2px solid #3476b5;outline-offset:2px}
@media(pointer:coarse){.sf-activity-timeline .sf-activity-actions button{min-height:32px;padding:6px 10px}}
