body[data-page-key="roofing_workflow"] {
  --roofing-ink: #08233f;
  --roofing-muted: #5b6d82;
  --roofing-line: #d8e4ee;
  --roofing-surface: #ffffff;
  --roofing-canvas: #f1f7fa;
  --roofing-deep: #004751;
  --roofing-deeper: #00363f;
  --roofing-teal: #079ca3;
  --roofing-bright: #18c6c8;
  --roofing-soft: #e8fbfb;
  background:
    radial-gradient(circle at 80% 0%, rgba(24, 198, 200, 0.13), transparent 28%),
    linear-gradient(180deg, #f7fbfd 0%, var(--roofing-canvas) 100%);
}

body[data-page-key="roofing_workflow"]:not(.portal-passcode-locked) .roofing-modern-shell {
  width: 100% !important;
  margin: 0 !important;
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .shell-header {
  position: sticky !important;
  z-index: 40;
  top: 0 !important;
  width: 100% !important;
  min-height: 86px !important;
  height: auto !important;
  max-height: none !important;
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(520px, 1.7fr) minmax(220px, 0.55fr);
  align-items: center;
  gap: 24px;
  padding: 14px clamp(20px, 3vw, 48px) !important;
  overflow: visible !important;
  border: 0;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 48% -80%, rgba(24, 198, 200, 0.28), transparent 46%),
    linear-gradient(100deg, var(--roofing-deeper), var(--roofing-deep));
  box-shadow: 0 12px 36px rgba(0, 54, 63, 0.16);
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .header-top {
  min-height: 0;
  padding: 0;
  border: 0;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .brand-mark {
  width: 144px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .brand-mark img {
  width: 100%;
  height: 100% !important;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 20, 24, 0.24));
}

.roofing-progress-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(60px, 1fr));
  align-items: start;
  gap: 0;
}

.roofing-progress-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  color: rgba(223, 250, 249, 0.72);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.roofing-progress-step::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 15px;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.roofing-progress-step:first-child::before {
  left: 50%;
  width: 50%;
}

.roofing-progress-step:last-child::before {
  width: 50%;
}

.roofing-progress-step span:first-child {
  position: relative;
  z-index: 1;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 66, 75, 0.65);
}

.roofing-progress-step.is-active,
.roofing-progress-step.is-complete {
  color: #ffffff;
}

.roofing-progress-step.is-active span:first-child,
.roofing-progress-step.is-complete span:first-child {
  border-color: #62f1ed;
  background: linear-gradient(135deg, var(--roofing-teal), var(--roofing-bright));
  box-shadow: 0 0 0 4px rgba(0, 83, 91, 0.72), 0 5px 16px rgba(24, 198, 200, 0.25);
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-workflow-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px !important;
  margin-top: 0 !important;
  padding: 0 !important;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-workflow-actions .nav-link {
  min-height: 40px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-workflow-actions .nav-link:hover {
  border-color: rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.14);
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell > .shell-header > .sidebar-utilities,
body[data-page-key="roofing_workflow"] .roofing-modern-shell > .shell-header > .pwa-back-button {
  display: none !important;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .shell-main {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 0 clamp(18px, 3vw, 46px) 44px;
}

.roofing-modern-shell .roofing-dashboard-header {
  position: relative;
  max-width: 1510px;
  min-height: 158px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 34px 0 28px;
}


.roofing-modern-shell .roofing-dashboard-header h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--roofing-ink);
  font-size: clamp(36px, 4vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.roofing-modern-shell .roofing-dashboard-header p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--roofing-muted);
  font-size: 17px;
}

.roofing-modern-shell .roofing-dashboard-layout {
  max-width: 1510px;
  margin: 0 auto;
}

.roofing-modern-shell .roofing-dashboard-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
  gap: 22px;
  align-items: start;
}

.roofing-modern-shell .roofing-start-panel {
  grid-column: 1 / -1;
}

.roofing-modern-shell .roofing-estimate-builder {
  grid-column: 1;
  grid-row: 2 / span 2;
}

.roofing-modern-shell .roofing-live-estimate-panel {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: 108px;
}

.roofing-modern-shell .roofing-quote-actions-panel {
  grid-column: 2;
  grid-row: 3;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-panel,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-estimate-card {
  border: 1px solid var(--roofing-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 36px rgba(21, 54, 78, 0.075);
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-panel {
  padding: 24px;
}

.roofing-modern-shell .roofing-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.roofing-modern-shell .roofing-panel-head > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 11px;
  align-items: center;
}

.roofing-modern-shell .roofing-panel-head h2 {
  margin: 0;
  color: var(--roofing-ink);
  font-size: 21px;
}

.roofing-modern-shell .roofing-panel-head p {
  grid-column: 2;
  margin: 0;
  color: var(--roofing-muted);
  font-size: 14px;
}

.roofing-modern-shell .roofing-step-badge {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  grid-row: 1 / span 2;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--roofing-teal), var(--roofing-bright));
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(7, 156, 163, 0.2);
}

.roofing-modern-shell .roofing-status-pill {
  border-color: rgba(7, 156, 163, 0.2);
  background: var(--roofing-soft);
  color: #087981;
}

.roofing-modern-shell .roofing-start-grid {
  display: grid;
  grid-template-columns: minmax(270px, 1.3fr) minmax(120px, 0.42fr) minmax(190px, 0.6fr);
  gap: 15px;
}

.roofing-modern-shell .roofing-start-grid > label[data-roofing-selected-field] {
  grid-column: span 1;
}

.roofing-modern-shell .roofing-start-grid label > span,
.roofing-modern-shell .roofing-preview-card > span,
.roofing-modern-shell .roofing-action-grid > div > span {
  color: #2d435c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.roofing-modern-shell input,
.roofing-modern-shell select {
  border-color: #cadbe8;
  border-radius: 13px;
  background: #ffffff;
  color: var(--roofing-ink);
}

.roofing-modern-shell input:focus,
.roofing-modern-shell select:focus {
  border-color: var(--roofing-bright);
  box-shadow: 0 0 0 4px rgba(24, 198, 200, 0.12);
}

.roofing-modern-shell .roofing-inline-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.roofing-modern-shell .resource-link.secondary {
  border-color: #cfdeea;
  border-radius: 12px;
  background: #ffffff;
  color: #27425d;
  box-shadow: none;
}

.roofing-modern-shell .resource-link.secondary:hover {
  border-color: #86d9da;
  background: #f0ffff;
  color: #006e75;
}

.roofing-modern-shell .roofing-distance-tiers {
  margin-top: 18px;
  gap: 8px;
}

.roofing-modern-shell .roofing-distance-tier {
  min-width: 0;
  border-radius: 13px;
  box-shadow: none;
}

.roofing-modern-shell .roofing-estimate-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px;
}

.roofing-modern-shell .roofing-estimate-builder::before {
  content: "Roof Configuration";
  grid-column: 1 / -1;
  color: var(--roofing-ink);
  font-size: 25px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.roofing-modern-shell .roofing-estimate-card {
  grid-column: span 2;
  min-width: 0;
  padding: 20px;
}

.roofing-modern-shell .roofing-estimate-card:nth-of-type(n + 4) {
  grid-column: span 3;
}

.roofing-modern-shell .roofing-section-title {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.roofing-modern-shell .roofing-section-title h2 {
  font-size: 17px;
}

.roofing-modern-shell .roofing-estimate-card > p {
  min-height: 40px;
  color: var(--roofing-muted);
  font-size: 13px;
}

.roofing-modern-shell .roofing-choice-row {
  gap: 8px;
}

.roofing-modern-shell .roofing-choice {
  min-height: 62px;
  border-color: #cfdeea;
  border-radius: 13px;
  background: #ffffff;
}

.roofing-modern-shell .roofing-choice:has(input:checked) {
  border-color: var(--roofing-bright);
  background: var(--roofing-soft);
  color: #006f76;
  box-shadow: 0 0 0 3px rgba(24, 198, 200, 0.1);
}

.roofing-modern-shell .roofing-addon-card {
  position: relative;
  overflow: hidden;
}

.roofing-modern-shell .roofing-addon-card::after {
  content: "Optional";
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #607188;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.roofing-modern-shell .roofing-sqft-input {
  border-radius: 13px;
}

.roofing-modern-shell .roofing-live-estimate-panel {
  overflow: hidden;
  padding: 0 !important;
  border: 0 !important;
  background:
    radial-gradient(circle at 84% -8%, rgba(24, 198, 200, 0.26), transparent 38%),
    linear-gradient(150deg, var(--roofing-deeper), var(--roofing-deep)) !important;
  color: #ffffff;
  box-shadow: 0 22px 54px rgba(0, 54, 63, 0.22) !important;
}

.roofing-live-estimate-head {
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.roofing-live-estimate-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.roofing-live-estimate-title h2 {
  margin: 0;
  color: #ffffff;
  font-size: 21px;
}

.roofing-live-estimate-title .roofing-status-pill {
  border-color: rgba(132, 255, 249, 0.26);
  background: rgba(132, 255, 249, 0.12);
  color: #aefbf8;
}

.roofing-homeowner-total-label {
  display: block;
  margin-top: 22px;
  color: rgba(227, 255, 253, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.roofing-homeowner-total {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: clamp(40px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.roofing-live-estimate-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 20px 24px 24px;
}

.roofing-live-estimate-body > * {
  min-width: 0;
  grid-column: 1 !important;
  grid-row: auto !important;
}

.roofing-live-price-list {
  display: grid;
  gap: 2px;
}

.roofing-live-price-row {
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.roofing-live-price-row span {
  color: rgba(231, 255, 254, 0.74);
  font-size: 13px;
}

.roofing-live-price-row strong {
  color: #ffffff;
  font-size: 14px;
}

.roofing-live-price-row.total {
  margin-top: 4px;
  border-bottom: 0;
}

.roofing-live-price-row.total span {
  color: rgba(239, 255, 254, 0.88);
  font-size: 15px;
  font-weight: 850;
}

.roofing-live-price-row.total strong {
  color: #67efeb;
  font-size: 15px;
  font-weight: 950;
}

.roofing-rate-section {
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.roofing-rate-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.roofing-rate-section-head h3 {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
}

.roofing-rate-section-head span {
  color: rgba(227, 255, 253, 0.62);
  font-size: 11px;
}

.roofing-rate-list {
  display: grid;
  gap: 4px;
}

.roofing-rate-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.roofing-rate-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.roofing-rate-copy span {
  overflow: hidden;
  color: rgba(236, 255, 254, 0.74);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roofing-rate-copy strong {
  color: #ffffff;
  font-size: 13px;
}

.roofing-rate-custom {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(103, 239, 235, 0.14);
  color: #75f5f1;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.roofing-rate-edit {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
}

.roofing-rate-edit:hover:not(:disabled) {
  border-color: rgba(117, 245, 241, 0.6);
  background: rgba(117, 245, 241, 0.12);
  color: #75f5f1;
}

.roofing-rate-edit:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.roofing-rate-edit svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roofing-readiness {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.roofing-readiness h3 {
  margin: 0 0 2px;
  color: #ffffff;
  font-size: 14px;
}

.roofing-readiness-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(229, 255, 253, 0.62);
  font-size: 12px;
}

.roofing-readiness-item::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
}

.roofing-readiness-item.is-complete {
  color: #eafffe;
}

.roofing-readiness-item.is-complete::before {
  border-color: #67efeb;
  background:
    radial-gradient(circle, #67efeb 0 40%, transparent 44%),
    rgba(103, 239, 235, 0.12);
}

.roofing-live-estimate-panel .roofing-files-card,
.roofing-live-estimate-panel .roofing-commission-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.roofing-live-estimate-panel .roofing-files-card > span,
.roofing-live-estimate-panel .roofing-commission-card > span {
  color: #ffffff;
}

.roofing-live-estimate-panel .roofing-files-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.roofing-live-estimate-panel .roofing-file-slot {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.roofing-live-estimate-panel .roofing-file-slot > span,
.roofing-live-estimate-panel .roofing-file-list,
.roofing-live-estimate-panel .roofing-muted {
  color: rgba(234, 255, 254, 0.72);
}

.roofing-live-estimate-panel .roofing-commission-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.roofing-live-estimate-panel .roofing-commission-card input {
  min-height: 44px;
}

.roofing-modern-shell .roofing-quote-actions-panel {
  padding: 20px !important;
}

.roofing-modern-shell .roofing-action-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

.roofing-modern-shell .roofing-action-grid > div {
  padding: 0;
  border: 0;
  background: transparent;
}

.roofing-modern-shell .roofing-primary-button {
  border-radius: 13px;
  background: linear-gradient(135deg, var(--roofing-teal), var(--roofing-bright));
  box-shadow: 0 12px 24px rgba(7, 156, 163, 0.22);
}

.roofing-modern-shell .roofing-primary-button:hover {
  box-shadow: 0 16px 30px rgba(7, 156, 163, 0.3);
}

.roofing-rate-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #bcd5df;
  border-radius: 22px;
  background: #ffffff;
  color: var(--roofing-ink);
  box-shadow: 0 30px 90px rgba(0, 44, 52, 0.3);
}

.roofing-rate-dialog::backdrop {
  background: rgba(0, 35, 42, 0.56);
  backdrop-filter: none;
}

.roofing-rate-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid #dbe7ec;
}

.roofing-rate-dialog-head h2 {
  margin: 0;
  color: var(--roofing-ink);
  font-size: 21px;
}

.roofing-rate-dialog-head p {
  margin: 6px 0 0;
  color: var(--roofing-muted);
  font-size: 13px;
}

.roofing-rate-dialog-close {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d3e0e7;
  border-radius: 50%;
  background: #f7fafb;
  color: #345063;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
}

.roofing-rate-dialog-close::before,
.roofing-rate-dialog-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
}

.roofing-rate-dialog-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.roofing-rate-dialog-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.roofing-rate-dialog-body {
  display: grid;
  gap: 16px;
  padding: 20px 22px 22px;
}

.roofing-rate-default {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 13px;
  background: #edf8f8;
  color: #315765;
  font-size: 13px;
}

.roofing-rate-dialog label {
  display: grid;
  gap: 8px;
  color: #254153;
  font-size: 12px;
  font-weight: 900;
}

.roofing-rate-input-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #c9dce4;
  border-radius: 13px;
}

.roofing-rate-input-shell input {
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.roofing-rate-input-shell span {
  color: #607587;
  font-size: 13px;
  font-weight: 800;
}

.roofing-rate-dialog-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.roofing-rate-dialog-actions button {
  min-height: 44px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}

.roofing-rate-reset {
  border: 1px solid #d1dfe6;
  background: #ffffff;
  color: #3c5668;
}

.roofing-rate-save {
  border: 0;
  background: linear-gradient(135deg, var(--roofing-teal), var(--roofing-bright));
  color: #ffffff;
}

@media (max-width: 1180px) {
  body[data-page-key="roofing_workflow"] .roofing-modern-shell .shell-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .roofing-progress-step span:last-child {
    display: none;
  }

  .roofing-modern-shell .roofing-dashboard-main {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .roofing-modern-shell .roofing-estimate-builder {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .roofing-modern-shell .roofing-estimate-card,
  .roofing-modern-shell .roofing-estimate-card:nth-of-type(n + 4) {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  body[data-page-key="roofing_workflow"] .roofing-modern-shell .shell-header {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }

  .roofing-progress-nav {
    grid-column: 1 / -1 !important;
    grid-row: 2;
  }

  body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-workflow-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .roofing-modern-shell .roofing-dashboard-main {
    grid-template-columns: 1fr !important;
  }

  .roofing-modern-shell .roofing-start-panel,
  .roofing-modern-shell .roofing-estimate-builder,
  .roofing-modern-shell .roofing-live-estimate-panel,
  .roofing-modern-shell .roofing-quote-actions-panel {
    grid-column: 1 !important;
    grid-row: auto;
  }

  .roofing-modern-shell .roofing-live-estimate-panel {
    position: static;
  }

  .roofing-modern-shell .roofing-start-grid {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 0.4fr);
  }

  .roofing-modern-shell .roofing-template-field {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 620px) {
  body[data-page-key="roofing_workflow"] .roofing-modern-shell .shell-header {
    padding: 12px 14px;
  }

  body[data-page-key="roofing_workflow"] .roofing-modern-shell .brand-mark {
    width: 112px;
    height: 46px;
  }

  body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-workflow-actions .nav-link:last-child {
    display: none;
  }

  .roofing-progress-step {
    font-size: 9px;
  }

  .roofing-progress-step span:first-child {
    width: 27px;
    height: 27px;
  }

  .roofing-progress-step::before {
    top: 13px;
  }

  body[data-page-key="roofing_workflow"] .roofing-modern-shell .shell-main {
    padding-inline: 12px;
  }

  .roofing-modern-shell .roofing-dashboard-header {
    min-height: 128px;
    padding: 28px 4px 22px;
  }

  .roofing-modern-shell .roofing-dashboard-header p {
    font-size: 14px;
  }

  body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-panel {
    padding: 18px;
  }

  .roofing-modern-shell .roofing-start-grid,
  .roofing-modern-shell .roofing-estimate-builder {
    grid-template-columns: 1fr !important;
  }

  .roofing-modern-shell .roofing-estimate-card,
  .roofing-modern-shell .roofing-estimate-card:nth-of-type(n + 4) {
    grid-column: 1 !important;
  }

  .roofing-modern-shell .roofing-choice-row,
  .roofing-modern-shell .roofing-choice-row.three {
    grid-template-columns: 1fr !important;
  }

  .roofing-rate-dialog-actions {
    grid-template-columns: 1fr !important;
  }
}

/* Roofing workflow v3: compact proposal-builder hierarchy */
@media (min-width: 901px) {
  .roofing-modern-shell .roofing-dashboard-main {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 430px);
    gap: 28px;
  }

  .roofing-modern-shell .roofing-start-panel {
    grid-column: 1 !important;
    grid-row: 1;
  }

  .roofing-modern-shell .roofing-estimate-builder {
    grid-column: 1 !important;
    grid-row: 2;
  }

  .roofing-modern-shell .roofing-live-estimate-panel {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: -126px;
    top: 128px;
  }

  .roofing-modern-shell .roofing-quote-actions-panel {
    grid-column: 1 !important;
    grid-row: 3;
  }
}

.roofing-modern-shell .roofing-dashboard-header {
  min-height: 150px;
  align-items: flex-start;
  padding-top: 34px;
}

.roofing-modern-shell .roofing-dashboard-header h1 {
  font-size: clamp(42px, 4vw, 58px);
}

.roofing-modern-shell .roofing-start-panel,
.roofing-modern-shell .roofing-unified-panel {
  grid-column: 1 !important;
  border: 1px solid #d7e2eb;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(22, 49, 71, 0.055);
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-panel {
  padding: 22px;
}

.roofing-modern-shell .roofing-start-panel .roofing-status-pill {
  display: none;
}

.roofing-modern-shell .roofing-start-panel .roofing-panel-head {
  margin-bottom: 18px;
}

.roofing-modern-shell .roofing-start-panel .roofing-panel-head p {
  display: none;
}

.roofing-modern-shell .roofing-start-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.roofing-modern-shell .roofing-start-grid > label,
.roofing-modern-shell .roofing-start-grid > label[data-roofing-selected-field] {
  grid-column: auto;
}

.roofing-modern-shell .roofing-start-actions {
  margin-top: 18px;
}

.roofing-modern-shell .roofing-start-actions .roofing-inline-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.roofing-modern-shell .roofing-start-actions .resource-link {
  min-height: 54px;
  justify-content: center;
}

.roofing-modern-shell .roofing-estimate-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px;
}

.roofing-modern-shell .roofing-estimate-builder::before {
  display: none;
}

.roofing-modern-shell .roofing-unified-panel {
  grid-column: 1 !important;
  min-width: 0;
  padding: 22px;
}

.roofing-unified-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.roofing-unified-heading h2 {
  margin: 0;
  color: var(--roofing-ink);
  font-size: 21px;
}

.roofing-unified-heading p {
  margin: 3px 0 0;
  color: var(--roofing-muted);
  font-size: 13px;
}

.roofing-heading-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #079ca3, #00606c);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 8px 18px rgba(0,91,101,.16);
}

.roofing-heading-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roofing-configuration-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr .8fr !important;
  gap: 28px;
  align-items: end;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-configuration-grid > .roofing-estimate-card {
  grid-column: auto !important;
  min-height: 0 !important;
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.roofing-configuration-grid .roofing-step-badge,
.roofing-configuration-grid .roofing-section-title > svg {
  display: none;
}

.roofing-configuration-grid .roofing-section-title {
  display: block;
  margin-bottom: 10px;
}

.roofing-configuration-grid .roofing-section-title h2 {
  font-size: 14px;
}

.roofing-configuration-grid .roofing-estimate-card > p {
  display: none;
}

.roofing-configuration-grid .roofing-choice {
  min-height: 96px;
}

.roofing-configuration-grid .roofing-choice-stack small {
  display: none;
}

.roofing-configuration-grid .roofing-sqft-input {
  min-height: 96px;
}

.roofing-configuration-grid .roofing-sqft-input input {
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.roofing-addons-panel .roofing-unified-heading {
  margin-bottom: 16px;
}

.roofing-addons-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  gap: 12px;
  align-items: stretch;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-addons-grid > .roofing-addon-card {
  grid-column: auto !important;
  min-height: 66px !important;
  min-width: 0;
  width: 100%;
  padding: 14px;
  border: 1px solid #cfdae5;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.roofing-addons-grid .roofing-addon-card::after { content: none; }

.roofing-addons-grid .roofing-section-title {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  pointer-events: none;
}

.roofing-addon-heading {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.roofing-addon-heading strong {
  margin: 0;
  color: #082841;
  font-size: 14px;
  white-space: nowrap;
}

.roofing-addon-heading span {
  overflow: hidden;
  color: #6c7d8f;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-addons-grid > .roofing-addon-card.is-open {
  border-color: #09b9bb;
  background: #eafafa;
  box-shadow: 0 10px 24px rgba(5, 120, 126, .13);
  transform: translateY(-2px);
}

.roofing-addons-grid .roofing-addon-card.has-value:not(.is-open) {
  border-color: rgba(9, 185, 187, .48);
  background: #f4fdfd;
}

.roofing-addon-details { margin-top: 12px; }

.roofing-addon-detail-panel {
  padding: 18px;
  border: 1px solid #c9e2e4;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f5fbfc);
  box-shadow: 0 14px 30px rgba(21, 72, 84, .08);
}

.roofing-addon-detail-panel[hidden] { display: none !important; }

.roofing-addon-detail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.roofing-addon-detail-heading strong { color: #082841; font-size: 15px; }
.roofing-addon-detail-heading span { color: #64788d; font-size: 12px; }
.roofing-addon-detail-panel .roofing-choice-row { margin-top: 0; }

.roofing-addon-detail-panel .roofing-sqft-input {
  min-height: 54px;
  margin-top: 12px;
}

.roofing-addon-detail-panel.roofing-addon-quantity-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 34%);
  align-items: center;
  gap: 18px;
}

.roofing-addon-detail-panel.roofing-addon-quantity-panel .roofing-addon-detail-heading,
.roofing-addon-detail-panel.roofing-addon-quantity-panel .roofing-sqft-input { margin: 0; }
.roofing-modern-shell .roofing-live-estimate-panel {
  border-radius: 16px !important;
  box-shadow: 0 22px 48px rgba(0, 50, 59, 0.22) !important;
}

.roofing-live-estimate-head {
  padding: 28px 30px 22px;
}

.roofing-live-estimate-title {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.38);
}

.roofing-live-estimate-title h2 {
  font-size: 23px;
}

.roofing-homeowner-total {
  font-size: 58px;
}

.roofing-live-estimate-body {
  gap: 16px;
  padding: 18px 30px 28px;
}

.roofing-project-controls {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
}

.roofing-project-controls summary {
  padding: 13px 14px;
  color: #dffdfc;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.roofing-project-controls-body {
  display: grid;
  gap: 16px;
  padding: 0 14px 14px;
}

.roofing-readiness {
  padding: 2px 0 4px;
}

.roofing-modern-shell .roofing-live-estimate-panel .roofing-primary-button {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 24px;
  font-size: 17px;
}

@media (max-width: 1100px) {
  .roofing-configuration-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .roofing-configuration-grid > :last-child {
    grid-column: 1 / -1 !important;
  }
  .roofing-addons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .roofing-modern-shell .roofing-dashboard-header {
    min-height: 132px;
  }
  .roofing-modern-shell .roofing-dashboard-main {
    display: grid;
    grid-template-columns: 1fr !important;
  }
  .roofing-modern-shell .roofing-start-panel,
  .roofing-modern-shell .roofing-estimate-builder,
  .roofing-modern-shell .roofing-live-estimate-panel,
  .roofing-modern-shell .roofing-quote-actions-panel {
    grid-column: 1 !important;
    grid-row: auto;
    margin-top: 0;
  }
}

@media (max-width: 680px) {
  .roofing-modern-shell .roofing-start-grid,
  .roofing-modern-shell .roofing-start-actions .roofing-inline-actions,
  .roofing-configuration-grid,
  .roofing-addons-grid {
    grid-template-columns: 1fr !important;
  }
  .roofing-configuration-grid > :last-child {
    grid-column: 1 !important;
  }
  .roofing-addon-detail-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .roofing-addon-detail-panel.roofing-addon-quantity-panel {
    grid-template-columns: 1fr;
  }
  .roofing-modern-shell .roofing-unified-panel,
  body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-panel {
    padding: 16px;
  }
}
.roofing-draft-saved {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(235,255,254,.86);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.roofing-draft-saved > span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid #34d9d5;
  border-radius: 50%;
  color: #5cf3ef;
  font-size: 12px;
}

.roofing-workflow-actions .nav-link {
  min-width: 190px;
}

@media (max-width: 680px) {
  .roofing-draft-saved { display: none; }
  .roofing-workflow-actions .nav-link { min-width: 0; }
}
/* Roofing workflow v4: simplified masthead and project-style contact picker */
body[data-page-key="roofing_workflow"] .roofing-modern-shell .shell-header {
  min-height: 88px !important;
  height: 88px !important;
  max-height: 88px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: center !important;
  padding: 7px clamp(24px, 3vw, 48px) !important;
  overflow: hidden !important;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .header-top {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .brand-mark {
  width: 190px !important;
  height: 72px !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .brand-mark img {
  width: 178px !important;
  height: 66px !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: left center;
}

.roofing-modern-shell .roofing-dashboard-header {
  width: 100% !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

.roofing-modern-shell .roofing-dashboard-header > div {
  width: 100%;
  min-width: 0;
  text-align: left !important;
}

.roofing-modern-shell .roofing-dashboard-header h1,
.roofing-modern-shell .roofing-dashboard-header p {
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: left !important;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-panel {
  position: relative;
  z-index: 20;
  overflow: visible !important;
}

body[data-page-key="roofing_workflow"] .roofing-contact-combobox {
  z-index: 80;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu {
  top: calc(100% + 10px);
  left: 0;
  right: auto;
  width: min(500px, calc(100vw - 56px));
  max-height: 330px;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(22, 60, 82, .13);
  border-radius: 16px;
  background: rgba(248, 251, 253, .96);
  box-shadow: 0 22px 52px rgba(8, 35, 53, .18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #a9becb transparent;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu button {
  position: relative;
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(37, 82, 111, .12);
  border-radius: 13px;
  background: rgba(255, 255, 255, .96);
  color: #0b2940;
  box-shadow: 0 5px 14px rgba(20, 46, 67, .045);
  overflow: hidden;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu button::before {
  content: none;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu button:hover,
body[data-page-key="roofing_workflow"] .roofing-contact-menu button:focus-visible {
  border-color: rgba(7, 156, 163, .42);
  background: #f1fbfb;
  box-shadow: 0 8px 20px rgba(7, 106, 113, .1);
  transform: translateY(-1px);
  outline: none;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu button.is-selected {
  border-color: #16b8ba;
  background: linear-gradient(135deg, #ecfdfc, #f8ffff);
  box-shadow: inset 3px 0 0 #11aeb1, 0 8px 20px rgba(7, 106, 113, .1);
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu .people-avatar {
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--people-product-color, #079ca3) 24%, #d8e6ec);
  background: color-mix(in srgb, var(--people-product-color, #079ca3) 9%, #fff);
  box-shadow: none;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu .people-avatar svg {
  width: 19px;
  height: 19px;
}

body[data-page-key="roofing_workflow"] .people-row-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu .people-row-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #0b2940;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page-key="roofing_workflow"] .people-row-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #64788a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu .people-row-icons {
  gap: 5px;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu .people-row-icons .product-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--product-color, #079ca3) 10%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--product-color, #079ca3) 18%, transparent);
}

@media (max-width: 620px) {
  body[data-page-key="roofing_workflow"] .roofing-modern-shell .shell-header {
    min-height: 78px !important;
    height: 78px !important;
    max-height: 78px !important;
    padding-inline: 18px !important;
  }
  body[data-page-key="roofing_workflow"] .roofing-modern-shell .brand-mark {
    width: 152px !important;
    height: 62px !important;
  }
  body[data-page-key="roofing_workflow"] .roofing-modern-shell .brand-mark img {
    width: 146px !important;
    height: 58px !important;
  }
  body[data-page-key="roofing_workflow"] .roofing-contact-menu {
    width: min(500px, calc(100vw - 48px));
  }
}
/* Roofing workflow v5: contextual pricing, calculated squares, compact handoff */
.roofing-unified-heading {
  position: relative;
}

.roofing-container-pencil {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin-left: auto;
  padding: 0;
  border: 1px solid #c6d9e2;
  border-radius: 11px;
  background: #f8fcfd;
  color: #087e84;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.roofing-container-pencil:hover,
.roofing-container-pencil:focus-visible,
.roofing-container-pencil[aria-expanded="true"] {
  border-color: #12b9bb;
  background: #e9fbfb;
  outline: none;
  transform: translateY(-1px);
}

.roofing-container-pencil svg,
.roofing-addon-rate-panel .roofing-rate-edit svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roofing-configuration-grid {
  grid-template-columns: 1fr 1.15fr 1.15fr !important;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-size-card {
  display: block;
}

.roofing-size-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.roofing-size-field {
  min-width: 0;
  display: grid;
  gap: 10px;
  color: #102d46;
  font-size: 13px;
  font-weight: 900;
}

.roofing-configuration-grid .roofing-size-field .roofing-sqft-input {
  min-width: 0;
  min-height: 88px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.roofing-configuration-grid .roofing-size-field .roofing-sqft-input input {
  width: 100%;
  min-width: 0;
  padding-inline: 8px;
  font-size: 22px;
}

.roofing-configuration-grid .roofing-size-field .roofing-sqft-input > span {
  padding-right: 10px;
  font-size: 11px;
}

.roofing-squares-output {
  background: #f1f8fa !important;
}

.roofing-squares-output input {
  color: #087a81 !important;
}

.roofing-addon-rate-panel[hidden] {
  display: none !important;
}

.roofing-addon-rate-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: -4px 0 16px;
  padding: 12px;
  border: 1px solid #d2e1e7;
  border-radius: 13px;
  background: linear-gradient(135deg, #f6fbfc, #edf8f9);
}

.roofing-addon-rate-panel .roofing-rate-row {
  min-width: 0;
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px 9px;
  border: 1px solid #d9e5ea;
  border-radius: 10px;
  background: #fff;
}

.roofing-addon-rate-panel .roofing-rate-copy span {
  color: #687b8b;
}

.roofing-addon-rate-panel .roofing-rate-copy strong {
  overflow: hidden;
  color: #102d46;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roofing-addon-rate-panel .roofing-rate-custom {
  grid-column: 1 / -1;
  width: max-content;
  background: #dcf8f7;
  color: #087a81;
}

.roofing-addon-rate-panel .roofing-rate-edit {
  width: 32px;
  height: 32px;
  border-color: #bfd7df;
  background: #f5fbfc;
  color: #087a81;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-quote-actions-panel {
  padding: 22px !important;
  border-radius: 14px;
}

.roofing-review-heading {
  margin-bottom: 16px !important;
}

.roofing-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: stretch;
}

.roofing-review-files,
.roofing-review-commission,
.roofing-review-actions {
  min-width: 0;
  border: 1px solid #d5e2e9;
  border-radius: 12px;
  background: #f9fcfd;
}

.roofing-review-files {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.roofing-review-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.roofing-review-section-title h3 {
  margin: 0;
  color: #102d46;
  font-size: 15px;
}

.roofing-review-section-title p {
  margin: 3px 0 0;
  color: #6a7c8c;
  font-size: 12px;
}

.roofing-review-section-title .resource-link {
  min-height: 38px;
  flex: 0 0 auto;
  padding-inline: 14px;
}

.roofing-file-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.roofing-review-files .roofing-file-slot {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px dashed #bfd3dd;
  border-radius: 10px;
  background: #fff;
}

.roofing-review-files .roofing-file-slot > span {
  color: #536b7c;
  font-size: 11px;
  font-weight: 900;
}

.roofing-review-files .roofing-file-slot input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 4px;
  border-radius: 8px;
  font-size: 10px;
}

.roofing-review-files .roofing-file-list {
  max-height: 92px;
  overflow: auto;
  color: #5f7484;
  font-size: 12px;
}

.roofing-review-commission {
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 14px;
}

.roofing-review-commission > span,
.roofing-review-actions > div > span {
  color: #304c62;
  font-size: 12px;
  font-weight: 900;
}

.roofing-review-commission input {
  min-height: 46px;
}

.roofing-review-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
}

.roofing-review-actions > div {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.roofing-review-actions .roofing-preview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.roofing-review-actions .resource-link,
.roofing-review-actions .roofing-primary-button {
  min-height: 44px;
}

.roofing-review-actions .roofing-small-status {
  margin: 0;
}

@media (max-width: 1100px) {
  .roofing-configuration-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .roofing-size-card {
    grid-column: 1 / -1 !important;
  }
  .roofing-addon-rate-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .roofing-configuration-grid { grid-template-columns: 1fr !important; }
  .roofing-size-pair,
  .roofing-review-grid,
  .roofing-review-actions,
  .roofing-file-slot-grid,
  .roofing-addon-rate-panel {
    grid-template-columns: 1fr;
  }
  .roofing-review-actions {
    grid-column: 1;
  }
  .roofing-size-card {
    grid-column: 1 !important;
  }
}
.roofing-review-files .roofing-file-slot input::file-selector-button {
  min-height: 26px;
  margin-right: 6px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: #e8f7f8;
  color: #087a81;
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
/* Roofing workflow v6: modern proposal package and handoff */
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-quote-actions-panel {
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid #d4e2e8;
  border-radius: 18px;
  background:
    radial-gradient(circle at 96% 0%, rgba(24,198,200,.1), transparent 32%),
    linear-gradient(180deg, #ffffff, #f7fbfc);
  box-shadow: 0 18px 42px rgba(15, 52, 72, .08);
}

.roofing-review-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid #dbe7ec;
  background: rgba(255,255,255,.78);
}

.roofing-review-hero-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #079ca3, #005c68);
  color: #fff;
  box-shadow: 0 9px 20px rgba(0,94,104,.2);
}

.roofing-review-hero-icon svg,
.roofing-file-drop-icon svg,
.roofing-upload-button svg,
.roofing-handoff-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roofing-review-hero h2 {
  margin: 0;
  color: #0b2940;
  font-size: 21px;
}

.roofing-review-hero p {
  margin: 4px 0 0;
  color: #64798a;
  font-size: 13px;
}

.roofing-review-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 14px;
  padding: 18px 18px 12px;
}

.roofing-proposal-package {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d6e3e9;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 50, 70, .05);
}

.roofing-package-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.roofing-package-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #079398;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.roofing-package-heading h3 {
  margin: 0;
  color: #0d2b42;
  font-size: 17px;
}

.roofing-package-heading p {
  margin: 4px 0 0;
  color: #687d8e;
  font-size: 12px;
}

.roofing-package-limit {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf8f9;
  color: #087c82;
  font-size: 10px;
  font-weight: 900;
}

.roofing-file-drop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.roofing-file-drop {
  position: relative;
  min-width: 0;
  min-height: 92px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 5px 10px;
  padding: 13px;
  border: 1px dashed #b8cfd9;
  border-radius: 13px;
  background: linear-gradient(145deg, #fbfefe, #f4f9fa);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.roofing-file-drop:hover,
.roofing-file-drop:focus-within {
  border-color: #1ab7b8;
  background: #f0fdfc;
  box-shadow: 0 10px 22px rgba(5,120,126,.1);
  transform: translateY(-2px);
}

.roofing-file-drop.has-file {
  border-style: solid;
  border-color: #17b8b9;
  background: linear-gradient(145deg, #effdfc, #faffff);
  box-shadow: inset 3px 0 0 #11aeb1;
}

.roofing-file-drop input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none;
}

.roofing-file-drop-icon {
  width: 38px;
  height: 38px;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #e7f7f8;
  color: #07888e;
}

.roofing-file-drop.has-file .roofing-file-drop-icon {
  background: #11aeb1;
  color: #fff;
}

.roofing-file-drop-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.roofing-file-drop-copy strong {
  color: #17344a;
  font-size: 12px;
}

.roofing-file-drop-copy small {
  overflow: hidden;
  color: #718493;
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roofing-file-drop.has-file .roofing-file-drop-copy small {
  color: #087b80;
}

.roofing-file-drop-action {
  color: #07858b;
  font-size: 10px;
  font-weight: 900;
}

.roofing-package-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 2px;
}

.roofing-package-footer .roofing-file-list {
  min-width: 0;
  max-height: 76px;
  overflow: auto;
  color: #627887;
  font-size: 11px;
}

.roofing-package-footer .roofing-file-list p {
  margin: 0;
}

.roofing-upload-button {
  width: 150px;
  min-height: 42px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #079ca3, #17c3c2);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 9px 20px rgba(7,156,163,.2);
  cursor: pointer;
}

.roofing-upload-button svg {
  width: 17px;
  height: 17px;
}

.roofing-commission-panel {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 15px;
  background:
    radial-gradient(circle at 90% 0%, rgba(31,211,210,.3), transparent 38%),
    linear-gradient(155deg, #004a55, #006c75);
  color: #fff;
  box-shadow: 0 14px 30px rgba(0,70,80,.18);
}

.roofing-commission-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 11px;
  background: rgba(255,255,255,.1);
  color: #77f3ef;
  font-size: 20px;
  font-weight: 900;
}

.roofing-commission-copy {
  display: grid;
  gap: 3px;
}

.roofing-commission-copy strong {
  color: #fff;
  font-size: 16px;
}

.roofing-commission-copy small {
  color: rgba(231,255,254,.7);
  font-size: 11px;
  line-height: 1.4;
}

.roofing-commission-input {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 11px;
  background: rgba(255,255,255,.96);
  color: #087c82;
  font-size: 18px;
  font-weight: 900;
}

.roofing-commission-input input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  color: #0c3046 !important;
  font-size: 18px;
  font-weight: 900;
  box-shadow: none !important;
}

.roofing-handoff-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.roofing-handoff-actions.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.roofing-handoff-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid #d5e3e9;
  border-radius: 14px;
  background: rgba(255,255,255,.9);
}

.roofing-handoff-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 11px;
}

.roofing-handoff-card > div:first-child > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.roofing-handoff-card strong {
  color: #143248;
  font-size: 13px;
}

.roofing-handoff-card small {
  color: #6b7e8d;
  font-size: 10px;
}

.roofing-handoff-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eaf8f9;
  color: #07888e;
}

.roofing-handoff-icon svg {
  width: 18px;
  height: 18px;
}

.roofing-handoff-card .roofing-preview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.roofing-handoff-card .resource-link,
.roofing-handoff-card .roofing-primary-button {
  min-height: 42px;
}

.roofing-closer-card {
  background: linear-gradient(145deg, #f8fefe, #effafa);
}

.roofing-closer-card .roofing-small-status {
  margin: -5px 0 0;
}

@media (max-width: 900px) {
  .roofing-review-workspace,
  .roofing-handoff-actions {
    grid-template-columns: 1fr;
  }
  .roofing-commission-panel {
    grid-template-columns: auto minmax(0, 1fr) minmax(150px, .75fr);
    align-items: center;
  }
  .roofing-commission-input {
    margin-top: 0;
  }
}

@media (max-width: 680px) {
  .roofing-review-workspace,
  .roofing-handoff-actions {
    padding-inline: 12px;
  }
  .roofing-file-drop-grid,
  .roofing-commission-panel {
    grid-template-columns: 1fr;
  }
  .roofing-file-drop {
    min-height: 78px;
  }
  .roofing-package-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .roofing-upload-button {
    width: 100%;
  }
}
/* Roofing workflow v7: balanced handoff and stable estimate spacing */
@media (min-width: 901px) {
  .roofing-modern-shell .roofing-live-estimate-panel {
    margin-top: -142px;
    top: 128px;
  }

  .roofing-modern-shell .roofing-quote-actions-panel {
    grid-column: 1 / -1 !important;
  }
}

.roofing-review-workspace {
  grid-template-columns: minmax(0, 1fr) 290px;
}

.roofing-commission-panel {
  align-content: stretch;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 6px 12px;
  padding: 18px 18px 16px;
  border: 1px solid #d6e3e9;
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 190, 190, .09), transparent 42%),
    linear-gradient(145deg, #ffffff, #f5fafb);
  color: #143248;
  box-shadow: 0 8px 22px rgba(16, 50, 70, .05);
}

.roofing-commission-icon {
  width: 44px;
  height: 44px;
  grid-row: 1;
  align-self: center;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #079ca3, #006671);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(5, 126, 133, .18);
}

.roofing-commission-copy {
  grid-column: 2;
  grid-row: 1;
}

.roofing-commission-copy strong {
  color: #143248;
  font-size: 15px;
}

.roofing-commission-copy small {
  color: #6b7e8d;
}

.roofing-commission-input {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: center;
  margin-top: 0;
  border: 1px solid #c5d9e1;
  background: #ffffff;
  color: #07858b;
  box-shadow: inset 0 1px 2px rgba(15, 52, 72, .04);
}

.roofing-commission-input:focus-within {
  border-color: #11aeb1;
  box-shadow: 0 0 0 3px rgba(17, 174, 177, .12);
}
.roofing-commission-save-button {
  width: 150px;
  min-height: 42px;
  display: inline-flex;
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: end;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 9px;
  margin-top: 8px;
  padding: 0 16px;
  border: 1px solid #078f95;
  border-radius: 11px;
  background: linear-gradient(135deg, #057f87, #0aa9ad);
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(5, 126, 133, .18);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.roofing-commission-save-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.roofing-commission-save-button:hover:not(:disabled),
.roofing-commission-save-button:focus-visible {
  border-color: #006e75;
  box-shadow: 0 11px 22px rgba(5, 126, 133, .24);
  transform: translateY(-1px);
}
.roofing-commission-save-button:disabled {
  cursor: not-allowed;
  opacity: .58;
}
.roofing-commission-save-button[data-state="saved"] {
  border-color: #19875e;
  background: linear-gradient(135deg, #187a58, #25a36e);
}
.roofing-commission-save-button[data-state="error"] {
  border-color: #b8443d;
  background: linear-gradient(135deg, #a93631, #d65b50);
}
.roofing-commission-proposal-button {
  display: grid;
  min-height: 64px;
  grid-column: 1 / -1;
  grid-row: 3;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-top: 9px;
  padding: 11px 12px;
  border: 1px solid #c6dce3;
  border-radius: 13px;
  background: linear-gradient(145deg, #f0fbfb, #ffffff);
  color: #143248;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.roofing-commission-proposal-button:hover,
.roofing-commission-proposal-button:focus-visible {
  border-color: #16a8ad;
  box-shadow: 0 8px 20px rgba(8, 125, 130, .12);
  transform: translateY(-1px);
}
.roofing-commission-proposal-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #0b959a;
  color: #fff;
}
.roofing-commission-proposal-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.roofing-commission-proposal-button > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.roofing-commission-proposal-button strong { color: #143248; font-size: 13px; }
.roofing-commission-proposal-button small { color: #6b7e8d; font-size: 11px; }
.roofing-commission-proposal-button > b {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #dff6f5;
  color: #087d82;
  font-size: 11px;
}

@media (max-width: 900px) {
  .roofing-review-workspace {
    grid-template-columns: 1fr;
  }

  .roofing-commission-panel {
    grid-template-columns: 44px minmax(0, 1fr) minmax(150px, .75fr);
    grid-template-rows: auto;
    align-content: center;
  }

  .roofing-commission-icon,
  .roofing-commission-copy,
  .roofing-commission-input {
    grid-row: 1;
  }

  .roofing-commission-icon { grid-column: 1; }
  .roofing-commission-copy { grid-column: 2; }

  .roofing-commission-input {
    grid-column: 3;
    margin-top: 0;
  }

  .roofing-commission-save-button {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .roofing-commission-proposal-button {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 680px) {
  .roofing-commission-panel {
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .roofing-commission-icon,
  .roofing-commission-copy { grid-row: 1; }

  .roofing-commission-input {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 8px;
  }

  .roofing-commission-save-button {
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: stretch;
  }

  .roofing-commission-proposal-button {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}
/* Roofing workflow v9: seamless estimate-to-handoff transition */
@media (min-width: 901px) {
  .roofing-modern-shell .roofing-live-estimate-panel {
    min-height: 844px;
  }

  .roofing-modern-shell .roofing-quote-actions-panel {
    position: relative;
    z-index: 3;
  }
}
/* Roofing workflow v10: compact roof size and responsive choice tiles */
.roofing-modern-shell input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.roofing-modern-shell input[type="number"]::-webkit-inner-spin-button,
.roofing-modern-shell input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-size-card {
  align-self: start;
}

.roofing-configuration-grid .roofing-size-field .roofing-sqft-input {
  min-height: 54px;
  grid-template-columns: minmax(0, 1fr);
  padding: 6px 10px;
}

.roofing-configuration-grid .roofing-squares-output input {
  background: transparent !important;
  box-shadow: none !important;
}

.roofing-configuration-grid .roofing-size-field .roofing-sqft-input input {
  min-height: 40px;
  padding-inline: 6px;
  font-size: 22px;
}

.roofing-configuration-grid .roofing-choice,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-addons-grid > .roofing-addon-card {
  transition:
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

.roofing-configuration-grid .roofing-choice:hover,
.roofing-configuration-grid .roofing-choice:focus-within,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-addons-grid > .roofing-addon-card:not(.is-open):hover,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-addons-grid > .roofing-addon-card:not(.is-open):focus-within {
  border-color: #1ab7b8;
  background: #f0fdfc;
  box-shadow: 0 10px 22px rgba(5, 120, 126, .1);
  transform: translateY(-2px);
}

.roofing-configuration-grid .roofing-choice:has(input:checked):hover,
.roofing-configuration-grid .roofing-choice:has(input:checked):focus-within {
  border-color: var(--roofing-bright);
  background: var(--roofing-soft);
  box-shadow: 0 10px 22px rgba(5, 120, 126, .14);
}
/* Roofing workflow v11: unified setup heading and control heights */
.roofing-modern-shell .roofing-project-setup-heading {
  margin-bottom: 18px;
}

.roofing-modern-shell .roofing-start-grid .roofing-contact-combobox,
.roofing-modern-shell .roofing-start-grid .roofing-input-shell {
  height: 52px;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-grid .roofing-contact-combobox input,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-grid .roofing-input-shell input,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-grid .roofing-input-shell select {
  height: 52px !important;
  min-height: 52px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-radius: 14px;
}
/* Roofing workflow v12: keep estimate above handoff without overlap */
@media (min-width: 901px) {
  .roofing-modern-shell .roofing-live-estimate-panel {
    position: relative;
    top: 9px;
    margin-top: -142px;
    min-height: 854px;
  }

  .roofing-modern-shell .roofing-quote-actions-panel {
    z-index: 1;
  }
}
/* Roofing workflow v13: Projects division icons in contact picker */
body[data-page-key="roofing_workflow"] .roofing-contact-menu button {
  grid-template-columns: 40px minmax(0, 1fr);
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu .people-avatar,
body[data-page-key="roofing_workflow"] .roofing-contact-menu .people-row-icons {
  display: none;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu .people-project-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: var(--project-avatar-icon-color);
  background: var(--project-avatar-icon-bg);
  box-shadow: inset 0 0 0 1px var(--project-avatar-icon-border);
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu .people-project-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu .people-project-icon.is-pv {
  --project-avatar-icon-color: #f5a000;
  --project-avatar-icon-bg: #fff8e8;
  --project-avatar-icon-border: #ffd58a;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu .people-project-icon.is-battery {
  --project-avatar-icon-color: #f97316;
  --project-avatar-icon-bg: #fff4ec;
  --project-avatar-icon-border: #ffc9a8;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu .people-project-icon.is-hes {
  --project-avatar-icon-color: #047c70;
  --project-avatar-icon-bg: #edf9f7;
  --project-avatar-icon-border: #a9ddd6;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu .people-project-icon.is-hes img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
/* Roofing workflow v14: keep handoff in the work column */
@media (min-width: 901px) {
  .roofing-modern-shell .roofing-live-estimate-panel {
    grid-column: 2;
    grid-row: 1 / span 3;
    position: sticky;
    top: 128px;
    margin-top: -142px;
  }

  .roofing-modern-shell .roofing-quote-actions-panel {
    grid-column: 1 !important;
    grid-row: 3;
    z-index: auto;
  }
}

@media (min-width: 901px) and (max-width: 1250px) {
  .roofing-review-workspace {
    grid-template-columns: 1fr;
  }

  .roofing-commission-panel {
    grid-template-columns: 44px minmax(0, 1fr) minmax(150px, .75fr);
    grid-template-rows: auto;
    align-content: center;
  }

  .roofing-commission-icon,
  .roofing-commission-copy,
  .roofing-commission-input {
    grid-row: 1;
  }

  .roofing-commission-icon { grid-column: 1; }
  .roofing-commission-copy { grid-column: 2; }

  .roofing-commission-input {
    grid-column: 3;
    margin-top: 0;
  }

  .roofing-commission-save-button {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Roofing workflow v15: viewport-fit estimate and quiet field focus */
.roofing-modern-shell input:focus,
.roofing-modern-shell select:focus,
.roofing-commission-input:focus-within {
  outline: none !important;
  border-color: #11aeb1;
  box-shadow: 0 0 0 2px rgba(17, 174, 177, .08);
}

.roofing-modern-shell .roofing-sqft-input:focus-within {
  outline: none !important;
  border-color: #11aeb1;
  box-shadow: 0 0 0 2px rgba(17, 174, 177, .08);
}

@media (min-width: 901px) {
  .roofing-modern-shell .roofing-live-estimate-panel {
    min-height: 0;
    max-height: calc(100vh - 152px);
    align-self: start;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(174, 251, 248, .45) transparent;
  }

  .roofing-live-estimate-head {
    padding-block: 22px 18px;
  }

  .roofing-live-estimate-body {
    gap: 9px;
    padding-block: 16px 20px;
  }

  .roofing-live-price-row {
    min-height: 36px;
  }

  .roofing-modern-shell .roofing-live-estimate-panel .roofing-primary-button {
    min-height: 54px;
  }
}
.roofing-modern-shell [data-roofing-home-sqft]:focus,
.roofing-modern-shell [data-roofing-commission]:focus {
  outline: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.roofing-modern-shell .roofing-live-estimate-panel::-webkit-scrollbar {
  width: 7px;
}

.roofing-modern-shell .roofing-live-estimate-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(174, 251, 248, .36);
}
/* Roofing workflow v17: keep Story guidance inside its aligned tile */
.roofing-configuration-grid {
  align-items: start;
}

.roofing-configuration-grid .roofing-choice-stack {
  display: block;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-configuration-grid .roofing-choice,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-configuration-grid .roofing-size-field .roofing-sqft-input {
  box-sizing: border-box;
  min-height: 72px !important;
  height: 72px !important;
}

.roofing-configuration-grid .roofing-choice-stack-with-note {
  position: relative;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-configuration-grid .roofing-story-card-note {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: calc(100% + 5px);
  left: 0;
  display: block !important;
  visibility: visible;
  opacity: 1;
  min-height: 0;
  margin: 0;
  color: #53657c;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

/* Roofing workflow v18: compact setup, contact context, and distance pricing */
.roofing-project-setup-heading .roofing-selected-contact-summary {
  min-width: 0;
  max-width: min(420px, 42vw);
  display: grid;
  justify-items: end;
  gap: 3px;
  margin-left: auto;
  text-align: right;
}

.roofing-project-setup-heading .roofing-selected-contact-summary[hidden] {
  display: none;
}

.roofing-selected-contact-summary strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--roofing-ink);
  font-size: 15px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roofing-selected-contact-summary span {
  max-width: 100%;
  overflow: hidden;
  color: var(--roofing-muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roofing-project-setup-heading .roofing-container-pencil {
  margin-left: 0;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu {
  width: min(430px, calc(100vw - 56px));
  max-height: 260px;
}

body[data-page-key="roofing_workflow"] .roofing-contact-menu button {
  min-height: 58px;
  padding: 8px 10px;
}

.roofing-rate-dialog.is-distance-rate {
  width: min(680px, calc(100vw - 32px));
}

.roofing-distance-rate-summary[hidden],
.roofing-distance-tier-list[hidden] {
  display: none;
}

.roofing-distance-rate-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.roofing-distance-rate-summary > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #d7e5ea;
  border-radius: 12px;
  background: #f8fbfc;
}

.roofing-distance-rate-summary span,
.roofing-distance-tier-list span {
  color: #607587;
  font-size: 11px;
  font-weight: 800;
}

.roofing-distance-rate-summary strong {
  overflow: hidden;
  color: #17394a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roofing-distance-tier-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.roofing-distance-tier-list > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #d9e5ea;
  border-radius: 10px;
  background: #ffffff;
}

.roofing-distance-tier-list > div.is-active {
  border-color: #12b9bb;
  background: #eafafa;
  box-shadow: inset 0 0 0 1px rgba(18, 185, 187, .18);
}

.roofing-distance-tier-list strong {
  color: #17394a;
  font-size: 12px;
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-actions {
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
}

.roofing-rate-temporary {
  border: 1px solid #9fcfd2;
  background: #effbfb;
  color: #087e84;
}

.roofing-rate-dialog-actions button:disabled,
.roofing-rate-input-shell input:disabled {
  cursor: not-allowed;
  opacity: .48;
}

@media (min-width: 901px) {
  .roofing-modern-shell .roofing-start-grid {
    grid-template-columns: minmax(250px, .85fr) minmax(150px, .48fr) minmax(180px, .58fr) minmax(150px, .42fr);
    gap: 14px;
  }
}

@media (max-width: 900px) and (min-width: 681px) {
  .roofing-modern-shell .roofing-start-grid {
    grid-template-columns: minmax(240px, 1fr) minmax(170px, .65fr) !important;
  }

  .roofing-modern-shell .roofing-template-field,
  .roofing-modern-shell .roofing-start-grid .roofing-metric-row {
    grid-column: auto !important;
  }
}

@media (max-width: 680px) {
  .roofing-project-setup-heading {
    flex-wrap: wrap;
  }

  .roofing-project-setup-heading .roofing-selected-contact-summary {
    order: 3;
    width: 100%;
    max-width: none;
    margin-left: 56px;
    justify-items: start;
    text-align: left;
  }

  .roofing-project-setup-heading .roofing-container-pencil {
    margin-left: auto;
  }

  .roofing-distance-rate-summary,
  .roofing-distance-tier-list,
  .roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* Distance pricing editor */
.roofing-rate-dialog-head {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.roofing-rate-dialog.is-dragging .roofing-rate-dialog-head {
  cursor: grabbing;
}

.roofing-rate-dialog-head button {
  cursor: pointer;
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-default,
.roofing-rate-dialog.is-distance-rate [data-roofing-rate-editor-field],
.roofing-rate-dialog.is-distance-rate [data-roofing-rate-save-temporary],
.roofing-rate-dialog.is-distance-rate [data-roofing-rate-save] {
  display: none;
}

.roofing-distance-tier-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.roofing-distance-tier-edit {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #c7dde4;
  border-radius: 9px;
  background: #f2f9fa;
  color: #087f87;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.roofing-distance-tier-edit:hover {
  transform: translateY(-1px);
  border-color: #12b9bb;
  background: #e6f8f8;
}

.roofing-distance-tier-edit svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roofing-distance-tier-list > div.is-editing {
  border-color: #12b9bb;
  background: #f3fcfc;
  box-shadow: inset 0 0 0 1px rgba(18, 185, 187, .16);
}

.roofing-distance-tier-list > div.is-editing > strong {
  display: none;
}

.roofing-distance-tier-inline-editor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 7px;
  border: 1px solid #9fd9dc;
  border-radius: 8px;
  background: #ffffff;
}

.roofing-distance-tier-inline-editor[hidden] {
  display: none;
}

.roofing-distance-tier-inline-editor span {
  color: #087f87;
  font-size: 12px;
  font-weight: 900;
}

.roofing-distance-tier-inline-editor input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #17394a;
  font: inherit;
  font-weight: 900;
}

.roofing-distance-tier-inline-editor input::-webkit-inner-spin-button,
.roofing-distance-tier-inline-editor input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-actions {
  grid-template-columns: max-content;
  justify-content: end;
}

@media (max-width: 680px) {
  .roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Modern distance rate schedule */
.roofing-rate-dialog.is-distance-rate {
  width: min(760px, calc(100vw - 32px));
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid #d7e8ec;
  border-radius: 18px;
  background: linear-gradient(145deg, #f7fbfc, #eef7f8);
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-intro {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
  padding: 0 2px 10px;
  border-bottom: 1px solid #d8e7ea;
}

.roofing-distance-tier-intro > div {
  display: grid;
  gap: 2px;
}

.roofing-distance-tier-intro strong {
  color: #123746;
  font-size: 14px;
}

.roofing-distance-tier-intro span {
  color: #6c8190;
  font-size: 11px;
}

.roofing-distance-tier-intro .roofing-distance-tier-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dff5f5;
  color: #067e84;
  font-weight: 900;
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-list > label {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #d8e5e9;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 7px 18px rgba(18, 55, 70, .05);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-list > label:hover {
  transform: translateY(-1px);
  border-color: #9edadd;
  box-shadow: 0 10px 22px rgba(18, 55, 70, .08);
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-list > label.is-active {
  border-color: #12b9bb;
  background: linear-gradient(145deg, #effcfc, #e4f8f8);
  box-shadow: inset 0 0 0 1px rgba(18, 185, 187, .14), 0 9px 20px rgba(18, 185, 187, .1);
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-heading small {
  padding: 3px 6px;
  border-radius: 999px;
  background: #0baeb1;
  color: #ffffff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-inline-editor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #c9dde2;
  border-radius: 10px;
  background: #ffffff;
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-inline-editor:focus-within {
  border-color: #10b9bb;
  box-shadow: 0 0 0 3px rgba(16, 185, 187, .12);
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-inline-editor span {
  color: #087f87;
  font-size: 11px;
  font-weight: 900;
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-inline-editor input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #17394a;
  font: inherit;
  font-weight: 900;
}

.roofing-rate-dialog.is-distance-rate [data-roofing-rate-save] {
  display: inline-flex;
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-actions {
  grid-template-columns: max-content minmax(180px, 240px);
  justify-content: space-between;
}

@media (max-width: 700px) {
  .roofing-rate-dialog.is-distance-rate .roofing-distance-tier-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .roofing-rate-dialog.is-distance-rate .roofing-distance-tier-list,
  .roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-actions {
    grid-template-columns: 1fr;
  }
}
/* Mileage pricing modal — Live Activity appointment treatment */
.roofing-rate-dialog.is-distance-rate {
  --mileage-teal-deep: #003d46;
  --mileage-teal: #008b8f;
  --mileage-teal-bright: #05bfc4;
  width: min(780px, calc(100vw - 28px));
  overflow: hidden;
  border-color: rgba(0, 139, 143, .28);
  background: linear-gradient(180deg, #ffffff 0%, #f0fbfb 100%);
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-head {
  margin: 0;
  padding: 20px 24px;
  border-bottom: 0;
  background:
    radial-gradient(circle at 82% 10%, rgba(5, 191, 196, .28), transparent 32%),
    linear-gradient(135deg, var(--mileage-teal-deep), var(--mileage-teal));
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-head h2 {
  color: #ffffff;
  font-size: 24px;
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-head p {
  color: #a7f3ef;
  font-size: 13px;
  font-weight: 700;
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-close {
  border-color: rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-close:hover,
.roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-close:focus-visible {
  background: rgba(255, 255, 255, .2);
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-body {
  gap: 18px;
  padding: 20px 22px 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f0fbfb 100%);
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-list > label {
  min-height: 92px;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(0, 139, 143, .2);
  border-radius: 13px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 20px rgba(0, 61, 70, .06);
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-list > label:hover {
  border-color: rgba(0, 139, 143, .42);
  box-shadow: 0 11px 24px rgba(0, 61, 70, .1);
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-list > label.is-active {
  border-color: var(--mileage-teal-bright);
  background: linear-gradient(145deg, #effdfc, #e6f9f9);
  box-shadow: inset 0 0 0 1px rgba(5, 191, 196, .12), 0 10px 22px rgba(0, 139, 143, .1);
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-heading > span {
  color: #007d84;
  font-size: 12px;
  font-weight: 950;
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-inline-editor {
  min-height: 42px;
  padding: 0 11px;
  border-color: rgba(0, 139, 143, .2);
  background: #f8fdfd;
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-inline-editor:focus-within {
  border-color: var(--mileage-teal-bright);
  box-shadow: 0 0 0 3px rgba(0, 139, 143, .12);
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-inline-editor input {
  height: 40px;
  appearance: textfield;
  -moz-appearance: textfield;
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-inline-editor input::-webkit-inner-spin-button,
.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-inline-editor input::-webkit-outer-spin-button {
  display: none;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  justify-content: stretch;
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 0 18px;
  font-size: 15px;
  line-height: 1;
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-reset {
  border-color: rgba(0, 139, 143, .24);
  background: #ffffff;
  color: #17626a;
}

.roofing-rate-dialog.is-distance-rate .roofing-rate-save {
  justify-content: center;
  border-color: var(--mileage-teal);
  background: linear-gradient(135deg, var(--mileage-teal), var(--mileage-teal-bright));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 139, 143, .18);
}

@media (max-width: 700px) {
  .roofing-rate-dialog.is-distance-rate .roofing-distance-tier-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .roofing-rate-dialog.is-distance-rate .roofing-distance-tier-list,
  .roofing-rate-dialog.is-distance-rate .roofing-rate-dialog-actions {
    grid-template-columns: 1fr;
  }
}
/* Admin-only live estimate detail toggle */
.roofing-homeowner-price-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.roofing-homeowner-price-heading .roofing-homeowner-total-label {
  margin-top: 0;
}

.roofing-homeowner-price-toggle {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  padding: 0;
  border: 1px solid rgba(174, 251, 248, .42);
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
  color: #aefbf8;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.roofing-homeowner-price-toggle:hover,
.roofing-homeowner-price-toggle:focus-visible,
.roofing-homeowner-price-toggle[aria-expanded="true"] {
  border-color: rgba(174, 251, 248, .8);
  background: rgba(103, 239, 235, .18);
  box-shadow: 0 8px 18px rgba(0, 30, 36, .2);
}

.roofing-homeowner-price-toggle:hover {
  transform: translateY(-1px);
}

.roofing-homeowner-price-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.roofing-rate-dialog.is-distance-rate::backdrop {
  background: transparent;
  backdrop-filter: none;
}
/* Keep the editable mileage number visually primary. */
.roofing-rate-dialog.is-distance-rate .roofing-distance-tier-inline-editor input {
  font-size: 16px;
  line-height: 1;
  letter-spacing: -.01em;
}
/* Mileage modal price-per-square visibility control */
.roofing-rate-dialog.is-distance-rate .roofing-distance-price-visibility {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px dashed rgba(0, 139, 143, .42);
  border-radius: 13px;
  background: rgba(236, 251, 251, .72);
  color: #007d84;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-price-visibility:hover,
.roofing-rate-dialog.is-distance-rate .roofing-distance-price-visibility:focus-visible {
  transform: translateY(-1px);
  border-color: var(--mileage-teal-bright);
  background: #e7fafa;
  box-shadow: 0 10px 22px rgba(0, 139, 143, .1);
  outline: none;
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-price-visibility[aria-pressed="true"] {
  border-style: solid;
  border-color: var(--mileage-teal-bright);
  background: linear-gradient(145deg, #effdfc, #e6f9f9);
}

.roofing-rate-dialog.is-distance-rate .roofing-distance-price-visibility:disabled {
  cursor: not-allowed;
  opacity: .48;
  transform: none;
  box-shadow: none;
}
/* Keep admin pricing pencils beside their section titles. */
.roofing-project-setup-heading .roofing-container-pencil,
.roofing-configuration-panel > .roofing-unified-heading .roofing-container-pencil,
.roofing-addons-panel > .roofing-unified-heading .roofing-container-pencil {
  margin-left: 0;
}
/* Selected-contact editor */
.roofing-selected-contact-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.roofing-selected-contact-copy {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 3px;
}

.roofing-contact-edit-pencil {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #c6d9e2;
  border-radius: 10px;
  background: #f8fcfd;
  color: #087e84;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.roofing-contact-edit-pencil:hover,
.roofing-contact-edit-pencil:focus-visible,
.roofing-contact-edit-pencil[aria-expanded="true"] {
  transform: translateY(-1px);
  border-color: #12b9bb;
  background: #e9fbfb;
  box-shadow: 0 8px 18px rgba(5, 120, 126, .12);
  outline: none;
}

.roofing-contact-edit-pencil svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roofing-contact-editor {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  right: 0;
  width: min(440px, calc(100vw - 48px));
  padding: 18px;
  border: 1px solid #b9dadd;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, #f3fbfb);
  box-shadow: 0 22px 55px rgba(0, 57, 65, .2);
}

.roofing-contact-editor[hidden] {
  display: none;
}

.roofing-contact-editor form,
.roofing-contact-editor label {
  display: grid;
}

.roofing-contact-editor form {
  gap: 14px;
}

.roofing-contact-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.roofing-contact-editor-head > div > span {
  color: #008b8f;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .12em;
}

.roofing-contact-editor-head h3 {
  margin: 3px 0 0;
  color: #082841;
  font-size: 18px;
}

.roofing-contact-editor-head > button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #c9dde2;
  border-radius: 50%;
  background: #ffffff;
  color: #345063;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.roofing-contact-editor label {
  gap: 6px;
  color: #244159;
  font-size: 11px;
  font-weight: 900;
}

.roofing-contact-editor input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #c7dbe4;
  border-radius: 12px;
  background: #ffffff;
  color: #0b2943;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  outline: none;
}

.roofing-contact-editor input:focus {
  border-color: #12b9bb;
  box-shadow: 0 0 0 3px rgba(18, 185, 187, .12);
}

.roofing-contact-editor-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.roofing-contact-editor-actions button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.roofing-contact-editor-actions button:first-child {
  border: 1px solid #c7dbe4;
  background: #ffffff;
  color: #345063;
}

.roofing-contact-editor-actions button[type="submit"] {
  border: 1px solid #08aeb2;
  background: linear-gradient(135deg, #008b8f, #08bec3);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(0, 139, 143, .18);
}

.roofing-contact-editor-actions button:disabled {
  cursor: wait;
  opacity: .58;
}

@media (max-width: 680px) {
  .roofing-selected-contact-copy {
    justify-items: start;
    text-align: left;
  }

  .roofing-contact-editor {
    right: auto;
    left: 0;
  }
}
/* Selected-contact structured fields */
.roofing-contact-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.roofing-contact-editor-wide {
  grid-column: 1 / -1;
}

@media (max-width: 680px) {
  .roofing-contact-editor-fields {
    grid-template-columns: 1fr;
  }

  .roofing-contact-editor-wide {
    grid-column: 1;
  }
}

/* Contact editor — Live Activity appointment modal treatment */
.roofing-selected-contact-summary { gap: 6px; }
.roofing-project-setup-heading .roofing-selected-contact-summary {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: flex-end;
}
.roofing-project-setup-heading .roofing-contact-edit-pencil {
  align-self: flex-start;
}
.roofing-contact-edit-pencil {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: #087e84;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}
.roofing-contact-edit-pencil:hover,
.roofing-contact-edit-pencil:focus-visible,
.roofing-contact-edit-pencil[aria-expanded="true"] {
  border: 0;
  background: rgba(8, 139, 143, .1);
  box-shadow: none;
  color: #00aeb3;
}
.roofing-contact-edit-pencil svg { width: 14px; height: 14px; }
.roofing-contact-editor {
  position: fixed;
  z-index: 1000;
  top: 50%;
  left: 50%;
  right: auto;
  width: min(780px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 0;
  border: 1px solid rgba(0, 139, 143, .28);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f0fbfb 100%);
  box-shadow: 0 28px 80px rgba(7, 27, 56, .24);
  transform: translate(-50%, -50%);
}
.roofing-contact-editor form { gap: 0; }
.roofing-contact-editor-head {
  padding: 20px 22px;
  background: radial-gradient(circle at 82% 10%, rgba(5, 191, 196, .28), transparent 32%), linear-gradient(135deg, #003d46, #008b8f);
}
.roofing-contact-editor-head > div > span { color: #a7f3ef; font-size: 12px; }
.roofing-contact-editor-head h3 { margin: 6px 0 0; color: #fff; font-size: 23px; font-weight: 950; }
.roofing-contact-editor-head p { margin: 5px 0 0; color: rgba(255,255,255,.8); font-size: 13px; font-weight: 700; }
.roofing-contact-editor-head > button {
  width: 40px;
  height: 40px;
  border-color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.12);
  color: #fff;
}
.roofing-contact-editor-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 20px 22px;
}
.roofing-contact-editor-wide { grid-column: span 2; }
.roofing-contact-editor label {
  gap: 7px;
  min-width: 0;
  min-height: 76px;
  padding: 13px 14px;
  border: 1px solid rgba(0,139,143,.2);
  border-radius: 12px;
  background: #fff;
  color: #007d84;
  font-size: 12px;
  font-weight: 950;
}
.roofing-contact-editor input {
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #071b38;
  font-size: 15px;
  font-weight: 900;
  box-shadow: none;
}
.roofing-contact-editor label:has(input:focus-visible) { border-color: #67cbd0; box-shadow: 0 0 0 3px rgba(0,139,143,.12); }
.roofing-contact-editor input:focus { border: 0; box-shadow: none; }
.roofing-contact-editor-actions { padding: 0 22px 22px; }
.roofing-contact-editor-actions button[type="submit"] { background: linear-gradient(135deg, #008b8f, #05bfc4); }
@media (max-width: 680px) {
  .roofing-contact-editor { left: 50%; width: calc(100vw - 20px); }
  .roofing-contact-editor-fields { grid-template-columns: 1fr; }
  .roofing-contact-editor-wide { grid-column: 1; }
}
/* Keep the selected contact edit control attached to the name, not the full summary width. */
.roofing-project-setup-heading .roofing-selected-contact-summary {
  display: grid;
  justify-items: end;
  gap: 3px;
}
.roofing-selected-contact-name-row {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  max-width: 100%;
  overflow: visible !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}
.roofing-project-setup-heading .roofing-selected-contact-name-row .roofing-contact-edit-pencil {
  align-self: center;
  margin: 0;
}
/* Add-on pricing modal */
.roofing-rate-dialog.is-addon-rate {
  width: min(1180px, calc(100vw - 28px));
  max-height: calc(100vh - 20px);
  overflow: hidden;
  border-color: rgba(0, 139, 143, .28);
  background: #f3fbfb;
}
.roofing-rate-dialog.is-addon-rate.is-config-rate {
  width: min(920px, calc(100vw - 28px));
}
.roofing-rate-dialog.is-config-rate .roofing-rate-dialog-body {
  padding-inline: 18px;
}
.roofing-rate-dialog.is-config-rate .roofing-addon-pricing-list {
  gap: 12px;
}
.roofing-rate-dialog.is-config-rate .roofing-addon-pricing-row {
  grid-template-columns: minmax(0, 1fr) minmax(105px, .8fr);
  padding-inline: 12px;
}.roofing-rate-dialog.is-addon-rate::backdrop {
  background: transparent;
  backdrop-filter: none;
}
.roofing-rate-dialog.is-addon-rate form {
  max-height: calc(100vh - 20px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.roofing-rate-dialog.is-addon-rate .roofing-rate-dialog-head {
  padding: 20px 24px;
  border-bottom: 0;
  background: radial-gradient(circle at 82% 10%, rgba(5, 191, 196, .3), transparent 32%), linear-gradient(135deg, #003d46, #008b8f);
  color: #fff;
}
.roofing-rate-dialog.is-addon-rate .roofing-rate-dialog-head h2 {
  color: #fff;
  font-size: 24px;
}
.roofing-rate-dialog.is-addon-rate .roofing-rate-dialog-head p {
  color: rgba(255, 255, 255, .8);
}
.roofing-rate-dialog.is-addon-rate .roofing-rate-dialog-close {
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .12);
  color: #fff;
}
.roofing-rate-dialog.is-addon-rate .roofing-rate-dialog-body {
  min-height: 0;
  overflow: auto;
  gap: 18px;
  padding: 20px 22px 22px;
  background: linear-gradient(180deg, #fff 0%, #f0fbfb 100%);
}
.roofing-rate-dialog.is-addon-rate .roofing-rate-default,
.roofing-rate-dialog.is-addon-rate [data-roofing-rate-editor-field],
.roofing-rate-dialog.is-addon-rate [data-roofing-rate-save-temporary] {
  display: none !important;
}
.roofing-addon-pricing-list[hidden] {
  display: none !important;
}
.roofing-addon-pricing-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}
.roofing-addon-pricing-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 139, 143, .2);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 70, 78, .07);
}
.roofing-addon-pricing-group-head {
  padding: 14px 16px;
  border-bottom: 1px solid #e1eef0;
  background: linear-gradient(135deg, #f7fdfd, #edf9f9);
}
.roofing-addon-pricing-group-head h3 {
  margin: 0;
  color: #062b43;
  font-size: 16px;
  font-weight: 950;
}
.roofing-addon-pricing-rows {
  display: grid;
}
.roofing-rate-dialog.is-addon-rate .roofing-addon-pricing-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, .95fr);
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid #edf3f5;
  border-radius: 0;
  color: #173651;
  font-size: 12px;
  font-weight: 900;
}
.roofing-rate-dialog.is-addon-rate .roofing-addon-pricing-row:last-child {
  border-bottom: 0;
}
.roofing-addon-pricing-input {
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #c7dde3;
  border-radius: 10px;
  background: #fbfefe;
  color: #087e84;
}
.roofing-addon-pricing-input:focus-within {
  border-color: #11b8bc;
  box-shadow: 0 0 0 3px rgba(17, 184, 188, .12);
}
.roofing-addon-pricing-input b,
.roofing-addon-pricing-input small {
  color: #087e84;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}
.roofing-addon-pricing-input input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #071b38;
  font-size: 15px;
  font-weight: 950;
  box-shadow: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
.roofing-addon-pricing-input input::-webkit-inner-spin-button,
.roofing-addon-pricing-input input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}
.roofing-rate-dialog.is-addon-rate .roofing-rate-dialog-actions {
  grid-template-columns: minmax(190px, .8fr) minmax(0, 1.7fr);
}
.roofing-rate-dialog.is-addon-rate .roofing-rate-dialog-actions button {
  min-height: 48px;
}
@media (max-width: 720px) {
  .roofing-rate-dialog.is-addon-rate {
    width: calc(100vw - 18px);
  }
  .roofing-addon-pricing-list {
    grid-template-columns: 1fr;
  }
  .roofing-rate-dialog.is-addon-rate .roofing-addon-pricing-row {
    grid-template-columns: minmax(0, 1fr) minmax(132px, .8fr);
  }
  .roofing-rate-dialog.is-addon-rate .roofing-rate-dialog-actions {
    grid-template-columns: 1fr;
  }
}
/* Roofing workflow v16: modern project setup toolbar */
.roofing-modern-shell .roofing-start-grid {
  grid-template-columns: minmax(270px, 1.45fr) minmax(150px, .72fr) minmax(190px, 1fr);
  gap: 12px;
  align-items: end;
}

.roofing-modern-shell .roofing-start-grid > label {
  display: grid;
  gap: 7px;
}

.roofing-modern-shell .roofing-start-grid > label > span {
  padding-left: 3px;
  color: #62758a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
  line-height: 1;
  text-transform: uppercase;
}

.roofing-modern-shell .roofing-start-grid .roofing-contact-combobox,
.roofing-modern-shell .roofing-start-grid .roofing-input-shell {
  height: 54px;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-grid .roofing-contact-combobox input,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-grid .roofing-input-shell input,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-grid .roofing-input-shell select {
  height: 54px !important;
  min-height: 54px !important;
  border: 1px solid #dbe5ec;
  border-radius: 16px;
  background: #f8fafc;
  color: #102a43;
  font-size: 14px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(15, 23, 42, .03);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-grid .roofing-contact-combobox input:hover,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-grid .roofing-input-shell input:hover,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-grid .roofing-input-shell select:hover {
  border-color: #b8cbd7;
  background: #ffffff;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-grid .roofing-contact-combobox input:focus,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-grid .roofing-input-shell input:focus,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-grid .roofing-input-shell select:focus {
  border-color: #0ca6a6;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(12, 166, 166, .11), 0 8px 20px rgba(8, 108, 112, .08);
  outline: none;
}

.roofing-modern-shell .roofing-start-grid .roofing-input-icon {
  left: 16px;
  width: 18px;
  height: 18px;
  color: #60758b;
}

.roofing-modern-shell .roofing-start-grid .roofing-input-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.roofing-modern-shell .roofing-start-grid .roofing-metric-row {
  grid-column: 1 / -1;
}

.roofing-modern-shell .roofing-start-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e7edf2;
}

.roofing-modern-shell .roofing-start-actions .roofing-inline-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link {
  position: relative;
  min-height: 48px;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 40px 8px 9px;
  overflow: hidden;
  border: 1px solid #e0e8ee;
  border-radius: 14px;
  background: #ffffff;
  color: #18324b;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
  box-shadow: 0 2px 5px rgba(15, 23, 42, .035);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link::before {
  content: "G";
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #edf6ff;
  color: #2872c8;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: -.02em;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link::after {
  content: "↗";
  position: absolute;
  right: 16px;
  color: #8a9bad;
  font-size: 15px;
  font-weight: 700;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link[data-roofing-earth]::before,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .roofing-map-placeholder .resource-link:first-child::before {
  content: "GE";
  background: #eaf8f0;
  color: #238252;
  font-size: 10px;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link:last-child::before {
  content: "A";
  background: #f0edff;
  color: #6d52c7;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link:not(.is-disabled):hover,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link:not(.is-disabled):focus-visible {
  transform: translateY(-1px);
  border-color: #a7d8d8;
  background: #ffffff;
  color: #087d82;
  box-shadow: 0 8px 20px rgba(8, 85, 91, .09);
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link.is-disabled {
  border-color: #e7edf1;
  background: #f8fafb;
  color: #8a98a8;
  box-shadow: none;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link.is-disabled::before {
  filter: grayscale(1);
  opacity: .55;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link.is-disabled::after {
  display: none;
}

@media (max-width: 900px) and (min-width: 681px) {
  .roofing-modern-shell .roofing-start-grid {
    grid-template-columns: minmax(240px, 1.2fr) minmax(150px, .7fr) !important;
  }

  .roofing-modern-shell .roofing-template-field {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 680px) {
  .roofing-modern-shell .roofing-start-grid,
  .roofing-modern-shell .roofing-start-actions .roofing-inline-actions {
    grid-template-columns: 1fr !important;
  }
}
/* Roofing workflow v20: conditional price-per-square header summary */
.roofing-project-setup-heading .roofing-header-price-per-square {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-left: 4px;
  padding: 7px 11px;
  border: 1px solid #cbe8e8;
  border-radius: 11px;
  background: #effafa;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
  white-space: nowrap;
}

.roofing-project-setup-heading .roofing-header-price-per-square[hidden] {
  display: none;
}

.roofing-project-setup-heading .roofing-header-price-per-square > span {
  color: #557082;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .055em;
  line-height: 1;
  text-transform: uppercase;
}

.roofing-project-setup-heading .roofing-header-price-per-square > strong {
  color: #087d82;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
}

@media (max-width: 680px) {
  .roofing-project-setup-heading .roofing-header-price-per-square {
    order: 3;
    margin-left: 56px;
  }

  .roofing-project-setup-heading .roofing-selected-contact-summary {
    order: 4;
  }
}

/* Roofing workflow v21: branded resource actions */
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link {
  padding: 8px 14px 8px 9px;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link::before,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link::after {
  display: none;
}

.roofing-modern-shell .roofing-start-actions .roofing-resource-logo {
  box-sizing: border-box;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 5px;
  border-radius: 9px;
  background: #f3f7fa;
  object-fit: contain;
}

.roofing-modern-shell .roofing-start-actions .roofing-resource-logo-aurora {
  padding: 4px;
  background: #f4f1ff;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link.is-disabled .roofing-resource-logo {
  filter: grayscale(1);
  opacity: .48;
}

/* Roofing workflow: calculated roofing squares pill */
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-size-card {
  position: relative;
}

.roofing-modern-shell .roofing-size-card .roofing-size-pair {
  grid-template-columns: minmax(0, 1fr);
}

.roofing-modern-shell .roofing-squares-pill {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #cbe8e8;
  border-radius: 11px;
  background: #effafa;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
  white-space: nowrap;
}

.roofing-modern-shell .roofing-squares-pill[hidden] {
  display: none;
}

.roofing-modern-shell .roofing-squares-pill > span {
  color: #557082;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .055em;
  line-height: 1;
  text-transform: uppercase;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-squares-pill > input {
  width: 36px;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #087d82;
  font: 950 14px/1 inherit;
  text-align: right;
  box-shadow: none;
  pointer-events: none;
}
/* Roofing workflow v22: minimal unboxed resource links */
.roofing-modern-shell .roofing-start-actions .roofing-inline-actions {
  display: flex;
  align-items: center;
  gap: 14px 30px;
  flex-wrap: wrap;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link.secondary {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link:not(.is-disabled):hover,
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link:not(.is-disabled):focus-visible {
  transform: none;
  border: 0;
  background: transparent;
  color: #087d82;
  box-shadow: none;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-start-actions .resource-link.is-disabled {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.roofing-modern-shell .roofing-start-actions .roofing-resource-logo {
  flex-basis: 23px;
  width: 23px;
  height: 23px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.roofing-modern-shell .roofing-start-actions .roofing-resource-logo-aurora {
  flex-basis: 72px;
  width: 72px;
  height: 24px;
  padding: 0;
  background: transparent;
  object-fit: contain;
}

@media (max-width: 680px) {
  .roofing-modern-shell .roofing-start-actions .roofing-inline-actions {
    gap: 12px 22px;
  }
}

/* Roofing workflow v23: show only the Aurora symbol */
.roofing-modern-shell .roofing-start-actions .roofing-resource-logo-aurora {
  display: block;
  flex-basis: 26px;
  width: 26px;
  height: 26px;
  overflow: hidden;
}

.roofing-modern-shell .roofing-start-actions .roofing-resource-logo-aurora img {
  display: block;
  width: auto;
  max-width: none;
  height: 26px;
  object-fit: initial;
}

/* Roofing workflow: explicit draft save action */
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-save-draft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 34px;
  padding: 7px 15px;
  border: 1px solid #087d82;
  border-radius: 10px;
  background: #087d82;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(8, 125, 130, .16);
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-save-draft-button:hover:not(:disabled),
body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-save-draft-button:focus-visible:not(:disabled) {
  border-color: #056b70;
  background: #056b70;
  transform: translateY(-1px);
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-save-draft-button[data-state="saved"] {
  border-color: #b9e5d2;
  background: #edf9f3;
  color: #18794e;
  box-shadow: none;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-save-draft-button[data-state="error"] {
  border-color: #efb6b2;
  background: #fff2f1;
  color: #b42318;
  box-shadow: none;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-save-draft-button:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
}
/* Roofing workflow: restore the work area to the headline alignment */
@media (min-width: 901px) {
  .roofing-modern-shell .roofing-dashboard-header,
  .roofing-modern-shell .roofing-dashboard-layout {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}
/* Roofing workflow: two-row roof configuration and expanded add-ons */
.roofing-configuration-rows {
  display: grid;
  gap: 22px;
}

.roofing-configuration-grid-primary {
  grid-template-columns: .82fr .9fr 1.28fr !important;
}

.roofing-configuration-grid-secondary {
  grid-template-columns: 1.45fr .75fr !important;
}

.roofing-configuration-grid-secondary .roofing-size-card {
  width: 100%;
}

.roofing-addons-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.roofing-addon-select-card {
  position: relative;
  box-sizing: border-box;
  cursor: pointer !important;
}

.roofing-addon-select-card > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-addons-grid > .roofing-addon-select-card:has(input:checked) {
  border-color: rgba(9, 185, 187, .7);
  background: #eafafa;
  box-shadow: 0 8px 20px rgba(5, 120, 126, .1);
}

body[data-page-key="roofing_workflow"] .roofing-modern-shell .roofing-addons-grid > .roofing-addon-select-card:has(input:focus-visible) {
  outline: 3px solid rgba(24, 198, 200, .22);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .roofing-configuration-grid-primary,
  .roofing-configuration-grid-secondary {
    grid-template-columns: 1fr 1fr !important;
  }

  .roofing-configuration-grid-primary > :last-child {
    grid-column: 1 / -1;
  }

  .roofing-addons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  .roofing-configuration-grid-primary,
  .roofing-configuration-grid-secondary,
  .roofing-addons-grid {
    grid-template-columns: 1fr !important;
  }

  .roofing-configuration-grid-primary > :last-child {
    grid-column: auto;
  }
}
/* Roofing workflow: quantity inputs live inside their add-on cards */
.roofing-addons-grid .roofing-addon-quantity-card {
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  contain: inline-size;
  cursor: default !important;
}

.roofing-addon-card-toggle {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.roofing-addon-quantity-card.is-open .roofing-addon-card-toggle {
  padding-right: 98px;
}

.roofing-addon-inline-field {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 90px;
  min-width: 0;
  max-width: calc(100% - 20px);
  height: 40px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid #93d4d5;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 120, 126, .1);
  transform: translateY(-50%);
}

.roofing-addon-inline-field[hidden] {
  display: none;
}

body[data-page-key="roofing_workflow"] .roofing-addon-inline-field input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  min-height: 0;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #087d82;
  font: 950 16px/1 inherit;
  text-align: right;
  box-shadow: none;
  outline: none;
}

.roofing-addon-inline-field span {
  color: #688094;
  font-size: 10px;
  font-weight: 850;
}
/* Roofing workflow: calculated squares belongs in the configuration heading */
.roofing-configuration-panel > .roofing-unified-heading .roofing-squares-pill {
  position: static;
  right: auto;
  top: auto;
  margin-left: auto;
  transform: none;
}

body[data-page-key="roofing_workflow"] .roofing-configuration-panel > .roofing-unified-heading .roofing-squares-pill > input {
  width: 42px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
}

/* Roofing proposal page composer */
body[data-page-key="roofing_workflow"] .roofing-proposal-pages-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #c8d9e2;
  border-radius: 10px;
  background: #fff;
  color: #18324b;
  font: 850 13px/1 inherit;
  cursor: pointer;
}
body[data-page-key="roofing_workflow"] .roofing-proposal-pages-button:hover,
body[data-page-key="roofing_workflow"] .roofing-proposal-pages-button:focus-visible {
  border-color: #14a1a6;
  color: #087d82;
  box-shadow: 0 0 0 3px rgba(20,161,166,.1);
}
.roofing-proposal-pages-button small {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: #e7f8f7;
  color: #087d82;
  font-size: 11px;
}
.roofing-proposal-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #fff;
  color: #142f45;
  box-shadow: 0 28px 80px rgba(11,35,64,.28);
}
.roofing-proposal-dialog::backdrop { background: rgba(10,28,42,.55); backdrop-filter: blur(4px); }
.roofing-proposal-dialog-shell { display: grid; max-height: inherit; grid-template-rows: auto minmax(0,1fr) auto; }
.roofing-proposal-dialog-head,
.roofing-proposal-dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px; }
.roofing-proposal-dialog-head { border-bottom: 1px solid #e3ebef; }
.roofing-proposal-dialog-head h2 { margin: 3px 0 5px; font-size: 24px; letter-spacing: -.03em; }
.roofing-proposal-dialog-head p,
.roofing-proposal-dialog-actions > span { margin: 0; color: #688094; font-size: 13px; }
.roofing-proposal-dialog-kicker { color: #07858b; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.roofing-proposal-dialog-body { min-height: 0; padding: 22px 24px; overflow: auto; background: #f7fafb; }
.roofing-proposal-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.roofing-proposal-section-heading h3 { margin: 0; font-size: 14px; }
.roofing-proposal-section-heading span { color: #6b8090; font-size: 12px; font-weight: 750; }
.roofing-proposal-section-heading button { padding: 0; border: 0; background: transparent; color: #087d82; font: 850 12px inherit; cursor: pointer; }
.roofing-proposal-library,
.roofing-proposal-selected { display: grid; gap: 9px; }
.roofing-proposal-card,
.roofing-proposal-selected-row { display: grid; gap: 9px; border: 1px solid #dce7ec; border-radius: 14px; background: #fff; }
.roofing-proposal-card { position: relative; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; padding: 14px; text-align: left; cursor: grab; user-select: none; }
.roofing-proposal-card:active { cursor: grabbing; }
.roofing-proposal-card.is-selected { border-color: #4dc3c3; background: #effafa; }
.roofing-proposal-card strong,
.roofing-proposal-selected-row strong { display: block; color: #16344a; font-size: 13px; }
.roofing-proposal-card p { margin: 4px 0 0; color: #6a7f8f; font-size: 12px; line-height: 1.4; }
.roofing-proposal-card small { color: #07858b; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.roofing-proposal-card-mark { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid #c7d8df; border-radius: 8px; color: transparent; font-weight: 950; }
.roofing-proposal-card.is-selected .roofing-proposal-card-mark { border-color: #098f94; background: #098f94; color: #fff; }
.roofing-proposal-selected-row { grid-template-columns: minmax(0,1fr) auto; align-items: center; padding: 11px 12px; }
.roofing-proposal-selected-row small { color: #768999; font-size: 11px; }
.roofing-proposal-order-actions { display: flex; gap: 4px; }
.roofing-proposal-order-actions button { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #d2e0e6; border-radius: 8px; background: #fff; color: #345166; cursor: pointer; }
.roofing-proposal-order-actions button:hover:not(:disabled) { border-color: #14a1a6; color: #087d82; }
.roofing-proposal-order-actions button:disabled { opacity: .35; cursor: default; }
.roofing-proposal-empty { padding: 28px 18px; border: 1px dashed #cbdbe2; border-radius: 14px; color: #718493; font-size: 12px; line-height: 1.5; text-align: center; }
.roofing-proposal-dialog-actions { border-top: 1px solid #e3ebef; }
.roofing-proposal-dialog-actions > div { display: flex; gap: 9px; }
@media (max-width: 720px) {
  .roofing-proposal-dialog-body { grid-template-columns: 1fr; }
  .roofing-proposal-dialog-head,
  .roofing-proposal-dialog-actions { align-items: flex-start; }
  .roofing-proposal-dialog-actions { flex-direction: column; }
}
.roofing-proposal-section-heading > div { display: flex; align-items: center; gap: 12px; }
.roofing-proposal-card-copy { min-width: 0; }
.roofing-proposal-drag-handle { display: grid; width: 20px; height: 30px; place-items: center; color: #8aa0ad; }
.roofing-proposal-drag-handle svg { width: 12px; height: 20px; fill: currentColor; }
.roofing-proposal-card:hover .roofing-proposal-drag-handle,
.roofing-proposal-card:focus-visible .roofing-proposal-drag-handle { color: #07858b; }
.roofing-proposal-sequence-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 4px 2px; color: #17344b; }
.roofing-proposal-sequence-label span { font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.roofing-proposal-sequence-label small { color: #728795; font-size: 10px; font-weight: 750; }
.roofing-proposal-sequence-label.is-closing { margin-top: 3px; }
.roofing-proposal-fixed-page { grid-template-columns: 32px minmax(0, 1fr) auto; border-color: #cfdde3; background: #f3f7f8; cursor: default; box-shadow: none; }
.roofing-proposal-fixed-number { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #dce9ed; color: #23495d; font-size: 12px; font-weight: 950; }
.roofing-proposal-fixed-page .roofing-proposal-card-copy small { color: #5f7787; }
.roofing-proposal-fixed-mark { padding: 5px 8px; border-radius: 999px; background: #e1ecef; color: #4f6b7b; font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.roofing-proposal-card.is-dragging { opacity: .42; }
.roofing-proposal-card.is-drop-before::before,
.roofing-proposal-card.is-drop-after::after { content: ""; position: absolute; right: 8px; left: 8px; height: 3px; border-radius: 999px; background: #0aa4a8; box-shadow: 0 0 0 3px rgba(10,164,168,.12); }
.roofing-proposal-card.is-drop-before::before { top: -6px; }
.roofing-proposal-card.is-drop-after::after { bottom: -6px; }
/* Thumbnail proposal page sorter */
.roofing-proposal-library { gap: 12px; }
.roofing-proposal-page-tile {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 28px 108px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #d6e3e8;
  border-radius: 15px;
  background: #fff;
  color: #17344b;
  font: inherit;
  text-align: left;
  cursor: grab;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.roofing-proposal-page-tile:hover,
.roofing-proposal-page-tile:focus-visible { border-color: #7dc9cb; box-shadow: 0 8px 22px rgba(13, 83, 96, .08); }
.roofing-proposal-page-tile:active { cursor: grabbing; }
.roofing-proposal-page-tile.is-selected { border-color: #0d9da2; background: #f1fbfb; box-shadow: 0 0 0 2px rgba(13,157,162,.1); }
.roofing-proposal-page-checkbox { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid #b9ccd5; border-radius: 6px; background: #fff; color: transparent; font-size: 12px; font-weight: 950; }
.roofing-proposal-page-tile.is-selected .roofing-proposal-page-checkbox { border-color: #078f94; background: #078f94; color: #fff; }
.roofing-proposal-page-copy { display: grid; gap: 4px; min-width: 0; }
.roofing-proposal-page-copy small { color: #07858b; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.roofing-proposal-page-copy strong { overflow: hidden; color: #143248; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.roofing-proposal-page-copy p { margin: 0; color: #687f8f; font-size: 11px; line-height: 1.45; }
.roofing-proposal-page-tile > .roofing-proposal-drag-handle { width: 20px; color: #8aa0ad; }
.roofing-proposal-thumbnail {
  position: relative;
  display: block;
  width: 104px;
  aspect-ratio: 8.5 / 11;
  overflow: hidden;
  border: 1px solid #c9d3d9;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 5px 13px rgba(16, 39, 57, .12);
}
.roofing-proposal-page-tile.is-selected .roofing-proposal-thumbnail { border-color: #087dff; box-shadow: 0 0 0 3px #087dff, 0 6px 16px rgba(8,74,160,.16); }
.roofing-proposal-thumbnail-rule { position: absolute; top: 9px; right: 8px; left: 8px; height: 2px; border-radius: 2px; background: #0d2635; }
.roofing-proposal-thumbnail-hero { position: absolute; top: 17px; right: 8px; left: 8px; height: 42px; border-radius: 3px; background: linear-gradient(145deg, #d9e5e9, #f5f8f9); }
.roofing-proposal-thumbnail-logo { position: absolute; top: 27px; left: 50%; color: #0b283b; font-size: 15px; font-style: italic; font-weight: 950; transform: translateX(-50%); }
.roofing-proposal-thumbnail > strong { position: absolute; top: 65px; right: 8px; left: 8px; overflow: hidden; color: #0c7f84; font-size: 6px; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.roofing-proposal-thumbnail-lines { position: absolute; top: 77px; right: 10px; left: 10px; display: grid; gap: 4px; }
.roofing-proposal-thumbnail-lines i { display: block; height: 2px; border-radius: 2px; background: #d6e1e5; }
.roofing-proposal-thumbnail-lines i:nth-child(2) { width: 88%; }
.roofing-proposal-thumbnail-lines i:nth-child(3) { width: 94%; }
.roofing-proposal-thumbnail-lines i:nth-child(4) { width: 72%; }
.roofing-proposal-thumbnail em { position: absolute; right: 0; bottom: 4px; left: 0; width: 28px; margin: auto; border-radius: 999px; background: #edf0f3; color: #526272; font-size: 9px; font-style: normal; font-weight: 800; line-height: 16px; text-align: center; }
.roofing-proposal-thumbnail[data-thumbnail-type="cover"] .roofing-proposal-thumbnail-hero { top: 8px; right: 0; left: 0; height: 72px; border-radius: 0; background: linear-gradient(135deg, #8a9aa1 0 30%, #e7ecee 30% 56%, #bac8cc 56%); }
.roofing-proposal-thumbnail[data-thumbnail-type="cover"] .roofing-proposal-thumbnail-logo { top: 45px; color: rgba(255,255,255,.78); font-size: 22px; }
.roofing-proposal-thumbnail[data-thumbnail-type="cover"] > strong { top: 84px; }
.roofing-proposal-thumbnail[data-thumbnail-type="cover"] .roofing-proposal-thumbnail-lines { top: 96px; }
.roofing-proposal-thumbnail[data-thumbnail-type="photos"] .roofing-proposal-thumbnail-hero { background: linear-gradient(90deg, #e7edef 0 31%, transparent 31% 34%, #d9e4e7 34% 65%, transparent 65% 68%, #edf2f3 68%); }
.roofing-proposal-thumbnail[data-thumbnail-type="system"] .roofing-proposal-thumbnail-hero { height: 30px; background: #e4f5f4; }
.roofing-proposal-thumbnail[data-thumbnail-type="system"] > strong { top: 53px; }
.roofing-proposal-thumbnail[data-thumbnail-type="system"] .roofing-proposal-thumbnail-lines { top: 66px; }
.roofing-proposal-thumbnail[data-thumbnail-type="investment"] .roofing-proposal-thumbnail-hero { top: 43px; height: 30px; border: 1px solid #b7dfe0; background: #effafa; }
.roofing-proposal-thumbnail[data-thumbnail-type="investment"] .roofing-proposal-thumbnail-logo { top: 17px; }
.roofing-proposal-thumbnail[data-thumbnail-type="investment"] > strong { top: 50px; color: #143248; }
.roofing-proposal-thumbnail[data-thumbnail-type="investment"] .roofing-proposal-thumbnail-lines { top: 82px; }
.roofing-proposal-thumbnail[data-thumbnail-type="additional"] .roofing-proposal-thumbnail-rule { top: 0; right: 0; left: 0; height: 18px; border-radius: 0; background: #112f46; }
.roofing-proposal-thumbnail[data-thumbnail-type="additional"] .roofing-proposal-thumbnail-hero { top: 27px; height: 23px; background: #dff4f3; }
.roofing-proposal-thumbnail[data-thumbnail-type="additional"] .roofing-proposal-thumbnail-logo { top: 30px; color: #07858b; font-size: 10px; }
.roofing-proposal-thumbnail[data-thumbnail-type="additional"] > strong { top: 57px; }
.roofing-proposal-thumbnail[data-thumbnail-type="additional"] .roofing-proposal-thumbnail-lines { top: 70px; }
.roofing-proposal-page-tile.is-dragging { opacity: .42; }
.roofing-proposal-page-tile.is-drop-before::before,
.roofing-proposal-page-tile.is-drop-after::after { content: ""; position: absolute; right: 8px; left: 8px; z-index: 2; height: 3px; border-radius: 999px; background: #0aa4a8; box-shadow: 0 0 0 3px rgba(10,164,168,.12); }
.roofing-proposal-page-tile.is-drop-before::before { top: -7px; }
.roofing-proposal-page-tile.is-drop-after::after { bottom: -7px; }
@media (max-width: 560px) {
  .roofing-proposal-page-tile { grid-template-columns: 24px 82px minmax(0, 1fr) 18px; gap: 10px; padding: 10px; }
  .roofing-proposal-thumbnail { width: 80px; }
  .roofing-proposal-page-copy p { display: none; }
  .roofing-proposal-page-copy strong { font-size: 12px; }
}
/* Proposal composer footer actions */
.roofing-proposal-dialog .roofing-proposal-dialog-actions > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.roofing-proposal-dialog .roofing-proposal-dialog-actions button {
  min-width: 112px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  font: 850 13px/1 inherit;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.roofing-proposal-dialog .roofing-proposal-dialog-actions .roofing-rate-reset {
  border: 1px solid #cfdee4;
  background: #f5f8f9;
  color: #395266;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.roofing-proposal-dialog .roofing-proposal-dialog-actions .roofing-rate-reset:hover,
.roofing-proposal-dialog .roofing-proposal-dialog-actions .roofing-rate-reset:focus-visible {
  border-color: #9fb8c2;
  background: #edf3f5;
  color: #17344b;
  transform: translateY(-1px);
}
.roofing-proposal-dialog .roofing-proposal-dialog-actions .roofing-rate-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 146px;
  border: 1px solid #087d82;
  background: linear-gradient(135deg, #0ca3a7, #08777d);
  color: #fff;
  box-shadow: 0 8px 18px rgba(8,125,130,.22);
}
.roofing-proposal-dialog .roofing-proposal-dialog-actions .roofing-rate-save::before {
  content: "✓";
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-size: 11px;
}
.roofing-proposal-dialog .roofing-proposal-dialog-actions .roofing-rate-save:hover,
.roofing-proposal-dialog .roofing-proposal-dialog-actions .roofing-rate-save:focus-visible {
  border-color: #056c71;
  background: linear-gradient(135deg, #0a9499, #056c71);
  box-shadow: 0 11px 24px rgba(8,125,130,.28);
  transform: translateY(-1px);
}
.roofing-proposal-dialog .roofing-proposal-dialog-actions button:focus-visible {
  outline: 3px solid rgba(20,161,166,.18);
  outline-offset: 2px;
}
@media (max-width: 520px) {
  .roofing-proposal-dialog .roofing-proposal-dialog-actions > div,
  .roofing-proposal-dialog .roofing-proposal-dialog-actions button {
    width: 100%;
  }
}
/* Roofing workflow: compact add-on pricing fields and desktop dialog */
.roofing-rate-dialog.is-addon-rate:not(.is-config-rate) {
  width: min(980px, calc(100vw - 28px));
}

.roofing-rate-dialog.is-addon-rate:not(.is-config-rate) .roofing-addon-pricing-row {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.roofing-rate-dialog.is-addon-rate:not(.is-config-rate) .roofing-addon-pricing-input {
  width: max-content;
  max-width: 100%;
  grid-template-columns: auto 4.75ch auto;
  justify-self: end;
}

.roofing-rate-dialog.is-addon-rate:not(.is-config-rate) .roofing-addon-pricing-input input {
  width: 4.75ch;
  min-width: 4.75ch;
}

@media (max-width: 720px) {
  .roofing-rate-dialog.is-addon-rate:not(.is-config-rate) {
    width: calc(100vw - 18px);
  }
}
/* Roofing workflow: align compact pricing pills and tighten both editors */
.roofing-rate-dialog.is-addon-rate:not(.is-config-rate) {
  width: min(920px, calc(100vw - 28px));
}

.roofing-rate-dialog.is-addon-rate:not(.is-config-rate) .roofing-addon-pricing-input {
  width: 132px;
  grid-template-columns: 12px 4.75ch auto;
  gap: 4px;
  padding-inline: 8px;
}

.roofing-rate-dialog.is-addon-rate:not(.is-config-rate) .roofing-addon-pricing-input b.is-empty {
  visibility: hidden;
}

.roofing-rate-dialog.is-addon-rate.is-config-rate {
  width: min(820px, calc(100vw - 28px));
}

.roofing-rate-dialog.is-config-rate .roofing-addon-pricing-row {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.roofing-rate-dialog.is-config-rate .roofing-addon-pricing-input {
  width: 112px;
  grid-template-columns: 4.75ch auto;
  gap: 4px;
  padding-inline: 8px;
  justify-self: end;
}

.roofing-rate-dialog.is-config-rate .roofing-addon-pricing-input input {
  width: 4.75ch;
  min-width: 4.75ch;
}

/* Full-screen proposal workspace */
body[data-page-key="roofing_workflow"] .roofing-proposal-workspace-card .roofing-preview-actions {
  grid-template-columns: minmax(0, 1fr) 112px;
}

body[data-page-key="roofing_workflow"] .roofing-proposal-workspace-card small b {
  color: #087d82;
  font-weight: 900;
}

body[data-page-key="roofing_workflow"] .roofing-workspace-open {
  gap: 5px;
}

body[data-page-key="roofing_workflow"] .roofing-workspace-open span {
  font-weight: 900;
}

body[data-page-key="roofing_workflow"] .roofing-proposal-workspace-card .roofing-save-draft-button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
}

.roofing-workspace-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #edf4f7;
  color: #0b2340;
  overflow: hidden;
}

html.roofing-workspace-open,
body.roofing-workspace-open {
  overflow: hidden !important;
  scrollbar-width: none;
}

html.roofing-workspace-open::-webkit-scrollbar,
body.roofing-workspace-open::-webkit-scrollbar {
  display: none;
}
.roofing-workspace-dialog::backdrop {
  background: rgba(5, 21, 32, .54);
  backdrop-filter: blur(4px);
}

.roofing-workspace-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.roofing-workspace-toolbar {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: 54px;
  min-height: 54px;
  padding: 6px 12px;
  border-bottom: 1px solid #d7dde6;
  background: rgba(248, 249, 251, .94);
  box-shadow: 0 1px 5px rgba(15, 23, 42, .045);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.roofing-workspace-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.roofing-workspace-command-bar {
  display: flex;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  justify-self: start;
  gap: 1px;
  padding-left: 9px;
  border-left: 1px solid #d5d9e0;
}

.roofing-workspace-icon-command,
.roofing-workspace-close {
  display: grid;
  width: 36px;
  height: 36px;
  min-height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #1d1d1f;
  cursor: pointer;
}

.roofing-workspace-page-command { width: 38px; height: 38px; }
.roofing-workspace-icon-command svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.roofing-workspace-icon-command:hover:not(:disabled),
.roofing-workspace-icon-command:focus-visible,
.roofing-workspace-close:hover,
.roofing-workspace-close:focus-visible { background: #e2f4f3; color: #076f75; outline: 0; }
.roofing-workspace-icon-command:disabled { color: #b7b7bc; cursor: default; }
.roofing-workspace-page-command[aria-pressed="true"] { background: #e2f4f3; color: #076f75; }
.roofing-workspace-close { justify-self: end; font-size: 25px; font-weight: 400; }

.roofing-workspace-menu { position: relative; }
.roofing-workspace-menu > summary {
  display: flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border-radius: 7px;
  color: #1d1d1f;
  cursor: pointer;
  list-style: none;
  font: 650 14px/1 Arial, sans-serif;
  user-select: none;
}
.roofing-workspace-menu > summary::-webkit-details-marker { display: none; }
.roofing-workspace-menu[open] > summary,
.roofing-workspace-menu.is-mode-active > summary,
.roofing-workspace-menu > summary:hover { background: #e2f4f3; color: #076f75; }
.roofing-workspace-menu.is-mode-active > summary { box-shadow: inset 0 -2px #07888e; }
.roofing-workspace-menu > summary:focus-visible { outline: 0; background: #e2f4f3; color: #076f75; }

.roofing-workspace-menu-popover {
  position: absolute;
  z-index: 60;
  top: calc(100% + 7px);
  left: 0;
  display: grid;
  width: 310px;
  max-width: calc(100vw - 16px);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 14px;
  background: rgba(248, 248, 250, .96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .2), 0 2px 8px rgba(0, 0, 0, .08);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
.roofing-workspace-menu:not([open]) .roofing-workspace-menu-popover { display: none; }
.roofing-workspace-menu-popover button[hidden] { display: none; }
.roofing-workspace-menu-popover button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  width: 100%;
  min-height: 56px;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #1d1d1f;
  text-align: left;
  cursor: pointer;
}
.roofing-workspace-menu-popover button:hover:not(:disabled),
.roofing-workspace-menu-popover button:focus-visible:not(:disabled),
.roofing-workspace-menu-popover button[aria-pressed="true"] { background: #dff3f2; color: #075f64; outline: 0; }
.roofing-workspace-menu-popover button:disabled { color: #9a9aa0; cursor: default; opacity: .58; }
.roofing-workspace-menu-popover button > span:not(.roofing-workspace-menu-icon) { min-width: 0; }
.roofing-workspace-menu-popover strong,
.roofing-workspace-menu-popover small { display: block; }
.roofing-workspace-menu-popover strong { font-size: 15px; font-weight: 680; letter-spacing: -.01em; }
.roofing-workspace-menu-popover small { margin-top: 3px; color: #74747a; font-size: 11px; font-weight: 500; line-height: 1.35; white-space: normal; }
.roofing-workspace-menu-popover hr { width: calc(100% - 12px); margin: 5px 6px; border: 0; border-top: 1px solid rgba(0, 0, 0, .09); }
.roofing-workspace-menu-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; background: #eceef0; color: #35383c; font-size: 12px; font-weight: 850; }
.roofing-workspace-menu-popover button:hover .roofing-workspace-menu-icon { background: #cceae8; color: #075f64; }
.roofing-workspace-menu-popover [data-roofing-workspace-save][data-state="saved"] .roofing-workspace-menu-icon { background: #d9f2e5; color: #18794e; }
.roofing-workspace-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f5fbff;
}

@media (max-width: 680px) {
  body[data-page-key="roofing_workflow"] .roofing-proposal-workspace-card .roofing-preview-actions {
    grid-template-columns: 1fr;
  }

  .roofing-workspace-toolbar {
    min-height: 70px;
    padding: 10px 12px;
  }

  .roofing-workspace-eyebrow {
    display: none;
  }

  .roofing-workspace-toolbar > div:first-child {
    display: none;
  }

  .roofing-workspace-toolbar-actions {
    width: 100%;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .roofing-workspace-file-popover {
    position: fixed;
    top: 74px;
    left: 12px;
  }

  .roofing-workspace-toolbar-actions button {
    flex: 0 0 auto;
    min-height: 40px;
    padding-inline: 11px;
    font-size: 12px;
  }

  .roofing-workspace-toolbar-actions .roofing-workspace-close {
    width: 40px;
  }
}
@media (max-width: 680px) {
  .roofing-workspace-toolbar { height: 54px; min-height: 54px; padding: 6px 8px; gap: 4px; }
  .roofing-workspace-command-bar { width: 100%; overflow-x: auto; padding-left: 5px; scrollbar-width: none; }
  .roofing-workspace-command-bar::-webkit-scrollbar { display: none; }
  .roofing-workspace-menu > summary { padding-inline: 9px; }
  .roofing-workspace-menu-popover { position: fixed; top: 55px; right: 8px; left: 8px; width: auto; max-width: none; }
  .roofing-workspace-close { width: 34px; }
}
/* Master proposal template library entry point */
body[data-page-key="roofing_workflow"] .roofing-proposal-open-actions {
  display: block;
}
body[data-page-key="roofing_workflow"] .roofing-proposal-open-actions .roofing-primary-button { width: 100%; }
body[data-page-key="roofing_workflow"] .roofing-start-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
body[data-page-key="roofing_workflow"] .roofing-start-actions .roofing-inline-actions {
  flex: 1 1 auto;
  min-width: 0;
}
body[data-page-key="roofing_workflow"] .roofing-template-editor-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-left: auto;
  padding: 9px 15px 9px 12px;
  border: 1px solid #087d82;
  border-radius: 10px;
  background: linear-gradient(145deg, #079ca3, #006f79);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 8px 18px rgba(0,91,101,.16);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
body[data-page-key="roofing_workflow"] .roofing-template-editor-button[hidden] {
  display: none;
}
body[data-page-key="roofing_workflow"] .roofing-template-editor-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  color: currentColor;
}
body[data-page-key="roofing_workflow"] .roofing-template-editor-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body[data-page-key="roofing_workflow"] .roofing-template-editor-button:hover,
body[data-page-key="roofing_workflow"] .roofing-template-editor-button:focus-visible {
  border-color: #05666e;
  background: linear-gradient(145deg, #078f96, #005d66);
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 10px 22px rgba(0,91,101,.24);
}
body[data-page-key="roofing_workflow"] .roofing-start-actions .roofing-contact-status {
  flex: 1 0 100%;
}
@media (max-width: 680px) {
  body[data-page-key="roofing_workflow"] .roofing-start-actions {
    align-items: flex-start;
    gap: 14px;
  }
  body[data-page-key="roofing_workflow"] .roofing-template-editor-button {
    min-height: 42px;
  }
}
