body.buildcost-bd-template-estimate-result {
  margin: 0;
  background: #f5f8f8;
  color: var(--bc-ink);
}
body.buildcost-bd-template-estimate-result.admin-bar .bc-dashboard-sidebar,
body.buildcost-bd-template-estimate-result.admin-bar .bc-dashboard-topbar { top: 32px; }

.bc-dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
}
.bc-dashboard-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #066f72 0%, #075f64 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.bc-dashboard-sidebar__brand { padding: 22px 18px 14px; }
.bc-dashboard-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.bc-dashboard-brand__mark { width: 46px; height: 54px; display: grid; place-items: center; }
.bc-dashboard-brand__mark .bc-icon { width: 44px; height: 50px; stroke-width: 1.5; }
.bc-dashboard-brand strong { display: block; font-size: 21px; line-height: 1.05; }
.bc-dashboard-brand small { display: block; margin-top: 3px; font-size: 14px; opacity: .96; }
.bc-dashboard-nav { padding: 14px 10px; display: grid; gap: 5px; }
.bc-dashboard-nav a,
.bc-dashboard-nav button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: rgba(255,255,255,.92);
  text-align: left;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.bc-dashboard-nav a:hover,
.bc-dashboard-nav button:hover { background: rgba(255,255,255,.09); }
.bc-dashboard-nav .is-active { background: rgba(20, 191, 187, .34); color: #fff; }
.bc-dashboard-nav .bc-icon { width: 21px; height: 21px; flex: 0 0 auto; }
.bc-dashboard-sidebar__bottom { margin-top: auto; padding: 14px 10px 0; }
.bc-sidebar-user {
  width: calc(100% + 20px);
  margin-left: -10px;
  min-height: 68px;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.17);
  background: rgba(0,0,0,.09);
  color: #fff;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  gap: 9px;
  align-items: center;
  cursor: pointer;
  text-align: left;
}
.bc-sidebar-user__avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #eef5f5; color: #17474a;
  display: grid; place-items: center; font-weight: 800; font-size: 11px;
}
.bc-sidebar-user__copy { min-width: 0; }
.bc-sidebar-user__copy strong, .bc-sidebar-user__copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-sidebar-user__copy strong { font-size: 12px; }
.bc-sidebar-user__copy small { font-size: 10px; opacity: .8; margin-top: 2px; }

.bc-dashboard-main { min-width: 0; }
.bc-dashboard-topbar {
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid var(--bc-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  backdrop-filter: blur(8px);
}
.bc-dashboard-topbar__crumbs { display: flex; align-items: center; gap: 10px; color: #727f83; font-size: 14px; }
.bc-dashboard-topbar__crumbs button { border: 0; background: transparent; color: #36464b; cursor: pointer; padding: 0; font: inherit; font-weight: 700; }
.bc-dashboard-topbar__actions { display: flex; align-items: center; gap: 10px; }
.bc-dashboard-topbar__actions > button {
  width: 38px; height: 38px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; border-radius: 8px;
}
.bc-dashboard-topbar__actions > button:hover { background: var(--bc-teal-50); }
.bc-dashboard-topbar__actions .bc-icon { width: 20px; height: 20px; }
.bc-dashboard-topbar__profile { width: auto !important; display: inline-flex !important; gap: 6px; padding: 0 4px 0 0 !important; }
.bc-dashboard-topbar__profile > span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #086f70; color: #fff; font-weight: 800; font-size: 11px; }
.bc-dashboard-topbar__profile .bc-icon { width: 15px; height: 15px; }

.bc-estimate-page { padding: 28px 30px 42px; }
.bc-estimate-container { width: min(1160px, 100%); margin: 0 auto; }
.bc-estimate-heading { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.bc-estimate-heading h1 { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.22; letter-spacing: -.02em; }
.bc-estimate-status {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  background: #eaf8ee; border: 1px solid #a9d8b5; color: #19843d; font-size: 13px; font-weight: 800;
}
.bc-estimate-status .bc-icon { width: 17px; height: 17px; }

.bc-estimate-summary-card {
  background: #fff;
  border: 1px solid #d8e1e3;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(20, 51, 54, .08);
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(260px,.72fr) minmax(0,1.35fr);
  gap: 24px 32px;
}
.bc-estimate-summary-card__main { padding-right: 28px; border-right: 1px solid #e0e6e8; }
.bc-estimate-summary-card__main p { margin: 0 0 6px; color: #4f5f64; font-size: 14px; font-weight: 700; }
.bc-estimate-summary-card__total { color: #087476; font-size: clamp(44px, 5vw, 64px); line-height: 1; font-weight: 800; letter-spacing: -.035em; white-space: nowrap; }
.bc-estimate-summary-card__range-label { margin-top: 16px; color: #68767b; font-size: 13px; }
.bc-estimate-summary-card__range { margin-top: 2px; color: #087476; font-size: 20px; font-weight: 800; }
.bc-estimate-summary-card__details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: center;
}
.bc-estimate-detail {
  display: flex; gap: 10px; align-items: center; min-height: 74px; padding: 10px 14px; border-bottom: 1px solid #edf1f2;
}
.bc-estimate-detail:nth-child(3n+1), .bc-estimate-detail:nth-child(3n+2) { border-right: 1px solid #edf1f2; }
.bc-estimate-detail:nth-last-child(-n+2) { border-bottom: 0; }
.bc-estimate-detail > span { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #d8e1e3; display: grid; place-items: center; color: #3d4b50; flex: 0 0 auto; }
.bc-estimate-detail > span .bc-icon { width: 21px; height: 21px; }
.bc-estimate-detail small, .bc-estimate-detail strong { display: block; }
.bc-estimate-detail small { color: #6a787d; font-size: 12px; }
.bc-estimate-detail strong { margin-top: 2px; font-size: 15px; }
.bc-estimate-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1.45fr repeat(4,1fr); gap: 14px; }
.bc-estimate-actions .bc-btn { min-height: 50px; border-radius: 7px; font-size: 14px; }
.bc-estimate-actions .bc-icon { width: 18px; height: 18px; }

.bc-estimate-section { margin-top: 28px; }
.bc-estimate-section > h2 { margin: 0 0 12px; font-size: 22px; line-height: 1.25; }
.bc-cost-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.bc-cost-card {
  min-height: 112px; padding: 18px; border-radius: 13px; border: 1px solid #d8e1e3; background: #fff; display: flex; align-items: center; gap: 13px; box-shadow: 0 6px 16px rgba(23,49,53,.04);
}
.bc-cost-card__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.bc-cost-card__icon .bc-icon { width: 25px; height: 25px; }
.bc-cost-card h3 { margin: 0; font-size: 14px; }
.bc-cost-card strong { display: block; margin-top: 3px; font-size: 22px; }
.bc-cost-card span[data-category-percent] { display: block; margin-top: 2px; font-size: 14px; font-weight: 800; }
.bc-cost-card.is-green { border-color: #bcdcc7; background: #f8fcf9; }
.bc-cost-card.is-green .bc-cost-card__icon, .bc-cost-card.is-green [data-category-percent] { color: #229246; }
.bc-cost-card.is-blue { border-color: #bfd5ed; background: #f8fbff; }
.bc-cost-card.is-blue .bc-cost-card__icon, .bc-cost-card.is-blue [data-category-percent] { color: #237bbd; }
.bc-cost-card.is-purple { border-color: #d7c8eb; background: #fcfaff; }
.bc-cost-card.is-purple .bc-cost-card__icon, .bc-cost-card.is-purple [data-category-percent] { color: #8056b3; }
.bc-cost-card.is-orange { border-color: #efd3b1; background: #fffaf5; }
.bc-cost-card.is-orange .bc-cost-card__icon, .bc-cost-card.is-orange [data-category-percent] { color: #e07b0e; }
.bc-cost-distribution { height: 15px; margin-top: 18px; border-radius: 999px; overflow: hidden; display: flex; background: #e8eeef; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.bc-cost-distribution span { height: 100%; border-right: 2px solid #fff; }
.bc-cost-distribution span:last-child { border-right: 0; }
.bc-cost-distribution .is-green { background: #2c9e54; }
.bc-cost-distribution .is-blue { background: #187fbd; }
.bc-cost-distribution .is-purple { background: #8b5bb8; }
.bc-cost-distribution .is-orange { background: #e78b20; }

.bc-material-table-wrap, .bc-trade-accordion { background: #fff; border: 1px solid #d8e1e3; border-radius: 13px; box-shadow: 0 6px 20px rgba(22,50,54,.04); overflow: hidden; }
.bc-material-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bc-material-table th, .bc-material-table td { padding: 10px 16px; border-bottom: 1px solid #edf1f2; text-align: left; vertical-align: middle; }
.bc-material-table th { background: #fbfcfc; color: #46565b; font-weight: 800; }
.bc-material-table td:last-child, .bc-material-table th:last-child { text-align: right; }
.bc-material-table tfoot td { border-bottom: 0; background: #fbfcfc; font-weight: 800; color: #087476; }
.bc-material-table tfoot td:first-child { text-align: right; }

.bc-trade-item { border-bottom: 1px solid #e3e9ea; }
.bc-trade-trigger {
  width: 100%; min-height: 48px; border: 0; background: #fff; padding: 10px 15px; display: grid; grid-template-columns: 1fr auto 22px; gap: 12px; align-items: center; cursor: pointer; text-align: left; color: #243338;
}
.bc-trade-trigger:hover { background: #f8fbfb; }
.bc-trade-trigger:focus-visible { outline: 3px solid rgba(10,129,126,.2); outline-offset: -3px; }
.bc-trade-trigger__name { display: flex; align-items: center; gap: 10px; }
.bc-trade-trigger__name .bc-icon { width: 20px; height: 20px; color: #138f75; }
.bc-trade-trigger__amount { font-weight: 800; }
.bc-trade-trigger__chevron { font-size: 22px; transition: transform .18s ease; }
.bc-trade-item.is-open .bc-trade-trigger__chevron { transform: rotate(180deg); }
.bc-trade-panel { padding: 7px 48px 12px; background: #f7fbfa; }
.bc-trade-panel ul { list-style: disc; margin: 0; padding-left: 18px; }
.bc-trade-panel li { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 4px 0; }
.bc-trade-panel p { margin: 4px 0; color: #6d7a7f; font-size: 13px; }
.bc-trade-total { min-height: 48px; padding: 10px 18px; display: flex; justify-content: flex-end; align-items: center; gap: 28px; background: #fbfcfc; color: #087476; font-weight: 800; }

.bc-estimate-upsell, .bc-estimate-budget-cta, .bc-estimate-disclaimer { margin-top: 18px; border-radius: 12px; display: grid; align-items: center; }
.bc-estimate-upsell {
  grid-template-columns: 62px 1fr auto; gap: 16px; padding: 16px 20px; border: 1px solid #efc98d; background: #fffaf2;
}
.bc-estimate-upsell__icon { width: 54px; height: 54px; border-radius: 50%; background: #fff2d8; color: #df8b14; display: grid; place-items: center; }
.bc-estimate-upsell__icon .bc-icon { width: 28px; height: 28px; }
.bc-estimate-upsell strong { line-height: 1.55; }
.bc-estimate-upsell .bc-btn { min-width: 270px; }
.bc-estimate-budget-cta {
  grid-template-columns: 70px 1fr auto; gap: 18px; padding: 18px 22px; border: 1px solid #b9ddc8; background: #f4fbf7;
}
.bc-estimate-budget-cta__icon { width: 60px; height: 60px; border-radius: 10px; display: grid; place-items: center; color: #1b9360; background: #fff; border: 1px solid #c5e2d1; }
.bc-estimate-budget-cta__icon .bc-icon { width: 34px; height: 34px; }
.bc-estimate-budget-cta h2 { margin: 0 0 4px; color: #087476; font-size: 20px; }
.bc-estimate-budget-cta p { margin: 0; color: #5d6c71; font-size: 13px; }
.bc-estimate-budget-cta .bc-btn { min-width: 250px; }
.bc-estimate-disclaimer {
  grid-template-columns: 44px 1fr; gap: 14px; padding: 16px 20px; border: 1px solid #b9d4f4; background: #f3f8ff; color: #315f96;
}
.bc-estimate-disclaimer > span { width: 38px; height: 38px; border-radius: 50%; background: #d8ebff; display: grid; place-items: center; }
.bc-estimate-disclaimer p { margin: 0; line-height: 1.55; }

@media (max-width: 1180px) {
  .bc-dashboard-shell { grid-template-columns: 82px minmax(0,1fr); }
  .bc-dashboard-brand span:last-child, .bc-dashboard-nav span, .bc-sidebar-user__copy, .bc-sidebar-user > span:last-child { display: none; }
  .bc-dashboard-sidebar__brand { padding-inline: 14px; }
  .bc-dashboard-brand__mark { width: 50px; }
  .bc-dashboard-nav a, .bc-dashboard-nav button { justify-content: center; padding: 10px; }
  .bc-sidebar-user { grid-template-columns: 1fr; justify-items: center; width: calc(100% + 20px); }
  .bc-estimate-summary-card__details { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bc-estimate-detail:nth-child(n) { border-right: 0; }
  .bc-estimate-detail:nth-child(odd) { border-right: 1px solid #edf1f2; }
  .bc-estimate-actions { grid-template-columns: repeat(3,1fr); }
  .bc-cost-cards { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 782px) {
  body.buildcost-bd-template-estimate-result.admin-bar .bc-dashboard-sidebar,
  body.buildcost-bd-template-estimate-result.admin-bar .bc-dashboard-topbar { top: 46px; }
  .bc-dashboard-shell { display: block; }
  .bc-dashboard-sidebar { position: relative; height: auto; min-height: 64px; overflow: visible; }
  .bc-dashboard-sidebar__brand { padding: 10px 16px; }
  .bc-dashboard-brand__mark { width: 38px; height: 42px; }
  .bc-dashboard-brand__mark .bc-icon { width: 36px; height: 40px; }
  .bc-dashboard-brand span:last-child { display: block; }
  .bc-dashboard-brand strong { font-size: 17px; }
  .bc-dashboard-brand small { font-size: 11px; }
  .bc-dashboard-nav, .bc-dashboard-sidebar__bottom { display: none; }
  .bc-dashboard-topbar { position: sticky; top: 0; height: 58px; padding: 0 16px; }
  .bc-estimate-page { padding: 20px 16px 32px; }
  .bc-estimate-summary-card { grid-template-columns: 1fr; }
  .bc-estimate-summary-card__main { padding-right: 0; padding-bottom: 18px; border-right: 0; border-bottom: 1px solid #e0e6e8; }
  .bc-estimate-summary-card__total { font-size: 46px; white-space: normal; }
  .bc-estimate-actions { grid-template-columns: repeat(2,1fr); }
  .bc-estimate-actions .bc-btn:first-child { grid-column: 1 / -1; }
  .bc-estimate-upsell, .bc-estimate-budget-cta { grid-template-columns: 56px 1fr; }
  .bc-estimate-upsell .bc-btn, .bc-estimate-budget-cta .bc-btn { grid-column: 1 / -1; width: 100%; min-width: 0; }
}
@media (max-width: 560px) {
  .bc-dashboard-topbar__crumbs { font-size: 12px; }
  .bc-estimate-heading { align-items: flex-start; }
  .bc-estimate-heading h1 { font-size: 27px; }
  .bc-estimate-summary-card { padding: 18px; }
  .bc-estimate-summary-card__total { font-size: 40px; }
  .bc-estimate-summary-card__range { font-size: 17px; }
  .bc-estimate-summary-card__details { grid-template-columns: 1fr; }
  .bc-estimate-detail:nth-child(n) { border-right: 0; border-bottom: 1px solid #edf1f2; }
  .bc-estimate-detail:last-child { border-bottom: 0; }
  .bc-estimate-actions { grid-template-columns: 1fr; }
  .bc-estimate-actions .bc-btn:first-child { grid-column: auto; }
  .bc-cost-cards { grid-template-columns: 1fr; }
  .bc-cost-distribution { height: 12px; }
  .bc-material-table thead { display: none; }
  .bc-material-table, .bc-material-table tbody, .bc-material-table tr, .bc-material-table td { display: block; width: 100%; }
  .bc-material-table tr { padding: 10px 14px; border-bottom: 1px solid #e3e9ea; }
  .bc-material-table td { padding: 5px 0; border: 0; display: grid; grid-template-columns: minmax(120px,.8fr) 1fr; gap: 12px; text-align: right !important; }
  .bc-material-table td::before { content: attr(data-label); text-align: left; color: #647378; font-weight: 700; }
  .bc-material-table tfoot { display: block; }
  .bc-material-table tfoot tr { display: grid; grid-template-columns: 1fr auto; }
  .bc-material-table tfoot td { display: block; text-align: right !important; padding: 5px 0; }
  .bc-material-table tfoot td:first-child { grid-column: 1; }
  .bc-material-table tfoot td:last-child { grid-column: 2; }
  .bc-material-table tfoot td::before { content: none; }
  .bc-trade-trigger { grid-template-columns: 1fr auto 18px; padding-inline: 12px; }
  .bc-trade-panel { padding: 8px 18px 12px 38px; }
  .bc-trade-panel li { grid-template-columns: 1fr; gap: 2px; }
  .bc-trade-total { justify-content: space-between; gap: 12px; }
  .bc-estimate-upsell, .bc-estimate-budget-cta { grid-template-columns: 1fr; text-align: left; }
  .bc-estimate-upsell__icon, .bc-estimate-budget-cta__icon { width: 48px; height: 48px; }
  .bc-estimate-disclaimer { grid-template-columns: 38px 1fr; padding: 14px; }
}

@media print {
  @page { margin: 12mm; }
  body.buildcost-bd-template-estimate-result { background: #fff !important; color: #000 !important; }
  .bc-dashboard-shell { display: block; }
  .bc-dashboard-sidebar,
  .bc-dashboard-topbar,
  .bc-estimate-actions,
  .bc-estimate-upsell,
  .bc-estimate-budget-cta,
  .bc-toast { display: none !important; }
  .bc-estimate-page { padding: 0 !important; }
  .bc-estimate-container { width: 100% !important; max-width: none !important; }
  .bc-estimate-summary-card,
  .bc-cost-card,
  .bc-material-table-wrap,
  .bc-trade-accordion,
  .bc-market-warning,
  .bc-estimate-disclaimer { box-shadow: none !important; break-inside: avoid; }
  .bc-estimate-summary-card__total,
  .bc-estimate-summary-card__range,
  .bc-cost-card strong,
  .bc-trade-total,
  .bc-material-table tfoot td { color: #000 !important; }
  .bc-cost-distribution { border: 1px solid #999; }
  .bc-trade-panel[hidden] { display: none !important; }
}

/* v1.2.1 — secure smart Pro previews */
.bc-estimate-section__head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:15px}.bc-estimate-section__head h2{margin:0}.bc-pro-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:#edf7f6;color:#086e6c;font-size:12px;font-weight:800;white-space:nowrap}.bc-pro-badge .bc-icon{width:15px;height:15px}.bc-premium-preview{position:relative;overflow:hidden}.bc-material-table.is-locked td:not(:first-child),.bc-trade-accordion.is-locked .bc-trade-trigger__amount,.bc-trade-accordion.is-locked .bc-trade-panel strong{user-select:none}.bc-pro-mask{display:inline-block;min-width:62px;padding:3px 7px;border-radius:6px;background:#e6eaeb;color:#a7b0b3;filter:blur(1.8px);letter-spacing:1px;white-space:nowrap;user-select:none}.bc-material-name{font-weight:750;color:#26383d}.bc-row-lock{display:inline-flex;margin-left:8px;font-size:12px;vertical-align:middle}.bc-pro-preview-cta{margin-top:18px;padding:16px 18px;border:1px solid #cfe2df;border-radius:13px;background:linear-gradient(135deg,#f7fbfb,#eef8f6);display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center}.bc-pro-preview-cta strong{display:block;color:#17383a;margin-bottom:3px}.bc-pro-preview-cta p{margin:0;color:#627277;font-size:13px;line-height:1.55}.bc-pro-preview-cta .bc-estimate-upsell__icon{width:42px;height:42px;border-radius:12px;background:#dff2ef;color:#087977;display:grid;place-items:center}.bc-pro-preview-cta .bc-btn{white-space:nowrap}.bc-trade-accordion.is-locked .bc-trade-item{background:#fcfefe}.bc-trade-accordion.is-locked .bc-trade-panel{background:#f8fbfb}
@media(max-width:760px){.bc-estimate-section__head{align-items:flex-start}.bc-pro-preview-cta{grid-template-columns:auto 1fr}.bc-pro-preview-cta .bc-btn{grid-column:1/-1;width:100%;justify-content:center}.bc-material-table.is-locked tr{display:block;padding:14px;border:1px solid #e2e9ea;border-radius:11px;margin-bottom:10px}.bc-material-table.is-locked thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%)}.bc-material-table.is-locked tbody,.bc-material-table.is-locked td{display:block}.bc-material-table.is-locked td{padding:6px 0;border:0;display:grid;grid-template-columns:minmax(120px,.9fr) minmax(0,1.1fr);gap:10px}.bc-material-table.is-locked td::before{content:attr(data-label);font-size:12px;font-weight:700;color:#708085}.bc-material-table.is-locked td:first-child{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid #edf1f2;margin-bottom:5px}.bc-material-table.is-locked td:first-child::before{display:none}}

/* v1.2.1 — authenticated dashboard mobile navigation */
.bc-dashboard-menu-toggle,.bc-dashboard-sidebar__close,.bc-dashboard-menu-overlay{display:none}
@media(max-width:782px){
  body.bc-dashboard-menu-open{overflow:hidden!important;touch-action:none}
  .bc-dashboard-menu-toggle{display:inline-grid;place-items:center;width:40px;height:40px;border:1px solid #d9e3e4;border-radius:10px;background:#fff;color:#244045;cursor:pointer;flex:0 0 auto}
  .bc-dashboard-menu-toggle .bc-icon{width:20px;height:20px}
  .bc-dashboard-topbar{gap:10px}.bc-dashboard-topbar__crumbs{flex:1;min-width:0;overflow:hidden}.bc-dashboard-topbar__crumbs>*{white-space:nowrap}.bc-dashboard-topbar__crumbs strong{overflow:hidden;text-overflow:ellipsis}
  .bc-dashboard-sidebar{display:flex!important;position:fixed!important;z-index:1100;left:0;top:0;bottom:0;width:min(84vw,310px);height:100vh;min-height:0;overflow-y:auto;transform:translateX(-105%);visibility:hidden;transition:transform .23s ease,visibility .23s ease;box-shadow:20px 0 50px rgba(10,35,38,.22)}
  .bc-dashboard-sidebar.is-mobile-open{transform:translateX(0);visibility:visible}
  .bc-dashboard-sidebar__close{display:grid;place-items:center;position:absolute;right:10px;top:10px;z-index:3;width:40px;height:40px;border:1px solid rgba(255,255,255,.35);border-radius:10px;background:rgba(255,255,255,.1);color:#fff;font-size:27px;line-height:1;cursor:pointer}
  .bc-dashboard-sidebar__brand{padding-right:58px!important}.bc-dashboard-nav,.bc-dashboard-sidebar__bottom{display:grid!important}.bc-dashboard-sidebar__bottom{display:block!important}.bc-dashboard-brand span:last-child,.bc-dashboard-nav span,.bc-sidebar-user__copy,.bc-sidebar-user>span:last-child{display:block!important}.bc-dashboard-nav a,.bc-dashboard-nav button{justify-content:flex-start!important;padding:10px 12px!important}.bc-sidebar-user{grid-template-columns:34px minmax(0,1fr) auto!important;justify-items:stretch!important}
  .bc-dashboard-menu-overlay{display:block;position:fixed;z-index:1090;inset:0;border:0;background:rgba(9,28,30,.16);opacity:0;visibility:hidden;pointer-events:none;transition:.2s ease}.bc-dashboard-menu-overlay.is-open{opacity:1;visibility:visible;pointer-events:auto}
  body.admin-bar .bc-dashboard-sidebar,body.admin-bar .bc-dashboard-menu-overlay{top:46px;height:calc(100vh - 46px)}
}
@media(max-width:782px){.bc-dashboard-sidebar .bc-dashboard-new-estimate{display:block!important;padding:8px 10px 12px}.bc-dashboard-sidebar .bc-dashboard-new-estimate span{display:inline!important}}


/* v1.5.1 — Estimate Result mobile compact 2-column redesign.
   Desktop/tablet presentation remains governed by the existing rules above. */
.bc-material-mobile-label,
.bc-material-unit-inline {
  display: none;
}

.bc-estimate-save-state {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #a9d8b5;
  border-radius: 999px;
  background: #eaf8ee;
  color: #19843d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.bc-estimate-save-state .bc-icon {
  width: 16px;
  height: 16px;
}

@media screen and (max-width: 767px) {
  .bc-estimate-page {
    padding: 18px 14px 30px;
  }

  .bc-estimate-container,
  .bc-estimate-summary-card,
  .bc-estimate-summary-card__main,
  .bc-estimate-summary-card__details,
  .bc-estimate-actions,
  .bc-cost-cards,
  .bc-material-table-wrap,
  .bc-material-table,
  .bc-material-table tbody,
  .bc-material-table tr,
  .bc-material-table td {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .bc-estimate-heading {
    margin-bottom: 16px;
    gap: 10px;
  }
  .bc-estimate-heading h1 {
    width: 100%;
    font-size: clamp(25px, 7vw, 31px);
    line-height: 1.25;
  }
  .bc-estimate-status {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Keep the primary total full width and visually dominant. */
  .bc-estimate-summary-card {
    padding: 15px;
    gap: 14px;
    border-radius: 13px;
  }
  .bc-estimate-summary-card__main {
    padding: 2px 2px 15px;
    border-bottom: 1px solid #e4eaeb;
  }
  .bc-estimate-summary-card__main p {
    font-size: 13px;
  }
  .bc-estimate-summary-card__total {
    font-size: clamp(38px, 11.2vw, 52px);
    line-height: 1.08;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .bc-estimate-summary-card__range-label {
    margin-top: 12px;
  }
  .bc-estimate-summary-card__range {
    font-size: clamp(16px, 4.8vw, 20px);
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  /* Result metadata: compact 2-column cards instead of five tall rows. */
  .bc-estimate-summary-card__details {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px;
  }
  .bc-estimate-detail,
  .bc-estimate-detail:nth-child(n),
  .bc-estimate-detail:nth-child(odd) {
    min-height: 92px;
    padding: 10px;
    border: 1px solid #e1e8e9 !important;
    border-radius: 11px;
    background: #fbfdfd;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }
  .bc-estimate-detail:last-child {
    grid-column: 1 / -1;
    min-height: 70px;
    grid-template-columns: 30px minmax(0, 1fr);
  }
  .bc-estimate-detail > span {
    width: 30px;
    height: 30px;
  }
  .bc-estimate-detail > span .bc-icon {
    width: 16px;
    height: 16px;
  }
  .bc-estimate-detail small {
    font-size: 11px;
    line-height: 1.35;
  }
  .bc-estimate-detail strong {
    margin-top: 3px;
    font-size: clamp(13px, 3.8vw, 16px);
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  /* Save is a small action/status; the four result actions form a strict 2x2 grid. */
  .bc-estimate-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
    align-items: stretch;
  }
  .bc-estimate-actions .bc-estimate-save-action,
  .bc-estimate-actions .bc-estimate-save-state,
  .bc-estimate-actions > :first-child {
    grid-column: 1 / -1 !important;
    justify-self: start;
  }
  .bc-estimate-actions .bc-estimate-save-action {
    width: auto;
    min-height: 40px;
    padding-inline: 14px;
  }
  .bc-estimate-actions .bc-btn:not(.bc-estimate-save-action) {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 9px 8px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
  }
  .bc-estimate-actions .bc-btn .bc-icon {
    flex: 0 0 auto;
  }

  .bc-estimate-section {
    margin-top: 22px;
  }
  .bc-estimate-section > h2,
  .bc-estimate-section__head h2 {
    font-size: clamp(20px, 5.8vw, 25px);
  }

  /* Cost summary: two cards per row. */
  .bc-cost-cards {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .bc-cost-card {
    min-height: 118px;
    padding: 12px 10px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    overflow: hidden;
  }
  .bc-cost-card__icon {
    width: 34px;
    height: 34px;
  }
  .bc-cost-card__icon .bc-icon {
    width: 20px;
    height: 20px;
  }
  .bc-cost-card h3 {
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .bc-cost-card strong {
    margin-top: 4px;
    font-size: clamp(17px, 4.8vw, 22px);
    line-height: 1.18;
    overflow-wrap: anywhere;
  }
  .bc-cost-card span[data-category-percent] {
    margin-top: 4px;
    font-size: 13px;
  }
  .bc-cost-distribution {
    height: 10px;
    margin-top: 12px;
  }

  /* Material table becomes a visible two-column card grid, without duplicate mobile markup. */
  .bc-material-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .bc-material-table,
  .bc-material-table tbody {
    display: block;
    width: 100%;
  }
  .bc-material-table thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
  }
  .bc-material-table tbody {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }
  .bc-material-table tbody tr,
  .bc-material-table.is-locked tbody tr {
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 11px !important;
    border: 1px solid #dce5e6 !important;
    border-radius: 12px !important;
    background: #fff;
    box-shadow: 0 3px 10px rgba(23,49,53,.035);
    display: flex !important;
    flex-direction: column;
    gap: 7px;
    overflow: hidden;
  }
  .bc-material-table tbody td,
  .bc-material-table.is-locked tbody td,
  .bc-material-table tbody td:first-child,
  .bc-material-table.is-locked tbody td:first-child {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    display: block !important;
    text-align: left !important;
  }
  .bc-material-table tbody td::before,
  .bc-material-table.is-locked tbody td::before,
  .bc-material-table tbody td:first-child::before,
  .bc-material-table.is-locked tbody td:first-child::before {
    content: none !important;
    display: none !important;
  }
  .bc-material-table tbody td:first-child {
    min-height: 30px;
    padding-bottom: 7px !important;
    border-bottom: 1px solid #edf1f2 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 6px;
  }
  .bc-material-name,
  .bc-material-table tbody td:first-child > span:first-child {
    font-size: 15px;
    line-height: 1.35;
    font-weight: 800;
    color: #20383c;
    overflow-wrap: anywhere;
  }
  .bc-material-unit-cell {
    display: none !important;
  }
  .bc-material-mobile-label {
    display: block;
    margin-bottom: 1px;
    color: #738186;
    font-size: 10px;
    line-height: 1.25;
    font-weight: 700;
  }
  .bc-material-unit-inline {
    display: inline;
  }
  .bc-material-value {
    display: block;
    min-width: 0;
    color: #35474b;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .bc-material-cost-cell {
    margin-top: auto !important;
    padding-top: 3px !important;
  }
  .bc-material-cost-cell .bc-material-value {
    color: #087476;
    font-size: clamp(15px, 4.3vw, 19px);
    font-weight: 800;
    line-height: 1.2;
  }
  .bc-material-table .bc-pro-mask {
    min-width: 0;
    max-width: 100%;
    padding: 2px 5px;
    font-size: 10px;
    overflow: hidden;
  }
  .bc-material-table tfoot {
    display: block !important;
    width: 100%;
    margin-top: 10px;
  }
  .bc-material-table tfoot tr {
    width: 100% !important;
    padding: 11px 12px !important;
    border: 1px solid #d6e4e3 !important;
    border-radius: 11px !important;
    background: #f4fbfa !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px;
  }
  .bc-material-table tfoot td,
  .bc-material-table tfoot td:first-child,
  .bc-material-table tfoot td:last-child {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    text-align: left !important;
  }
  .bc-material-table tfoot td:last-child {
    text-align: right !important;
    overflow-wrap: anywhere;
  }
  .bc-material-table tfoot td::before {
    display: none !important;
  }

  .bc-pro-preview-cta {
    margin-top: 12px;
  }

  /* Full-width narrative/security components must never be squeezed into mini grids. */
  .bc-market-warning,
  .bc-estimate-disclaimer,
  .bc-device-warning,
  .bc-estimate-upsell,
  .bc-estimate-budget-cta,
  .bc-trade-accordion {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media screen and (max-width: 360px) {
  .bc-estimate-page {
    padding-inline: 12px;
  }
  .bc-estimate-summary-card {
    padding: 12px;
  }
  .bc-estimate-summary-card__details,
  .bc-cost-cards,
  .bc-material-table tbody,
  .bc-estimate-actions {
    gap: 8px !important;
  }
  .bc-estimate-detail {
    min-height: 86px;
    padding: 8px;
    grid-template-columns: 26px minmax(0,1fr);
  }
  .bc-estimate-detail > span {
    width: 26px;
    height: 26px;
  }
  .bc-estimate-detail small {
    font-size: 10px;
  }
  .bc-estimate-detail strong {
    font-size: 12px;
  }
  .bc-estimate-actions .bc-btn:not(.bc-estimate-save-action) {
    min-height: 50px;
    padding-inline: 6px;
    font-size: 12px;
  }
  .bc-cost-card {
    min-height: 112px;
    padding: 10px 8px;
    grid-template-columns: 29px minmax(0,1fr);
    gap: 6px;
  }
  .bc-cost-card__icon {
    width: 29px;
    height: 29px;
  }
  .bc-cost-card h3 {
    font-size: 11px;
  }
  .bc-cost-card strong {
    font-size: clamp(15px, 5vw, 18px);
  }
  .bc-material-table tbody tr,
  .bc-material-table.is-locked tbody tr {
    padding: 9px !important;
    gap: 6px;
  }
  .bc-material-name,
  .bc-material-table tbody td:first-child > span:first-child {
    font-size: 13px;
  }
  .bc-material-value {
    font-size: 11px;
  }
  .bc-material-cost-cell .bc-material-value {
    font-size: 15px;
  }
}


/* BuildCost BD v1.7.0 — approved dashboard branding */
.bc-dashboard-brand.buildcost-brand {
  display: inline-flex;
  width: 100%;
  align-items: center;
}
.bc-dashboard-brand .buildcost-brand__text-fallback {
  color: #fff;
}
.bc-dashboard-brand .buildcost-brand__picture {
  display: block;
  width: 100%;
}
.bc-dashboard-brand .buildcost-brand__logo {
  width: auto;
  max-width: 172px;
  height: auto;
  max-height: 44px;
  object-fit: contain;
  object-position: left center;
}
@media (max-width: 1180px) {
  .bc-dashboard-brand .buildcost-brand__logo {
    width: auto;
    max-width: 48px;
    max-height: 46px;
  }
}
@media (max-width: 782px) {
  .bc-dashboard-brand .buildcost-brand__logo {
    width: auto;
    max-width: 42px;
    max-height: 40px;
  }
}

/* Approved print-only BuildCost BD mark for browser print output. */
.bc-estimate-print-brand { display: none; }
@media print {
  .bc-estimate-print-brand {
    display: block !important;
    margin: 0 0 7mm;
  }
  .bc-estimate-print-brand .buildcost-brand__logo {
    width: auto;
    max-width: 56mm;
    height: auto;
    max-height: 18mm;
  }
}


/* v1.7.1 — always-visible mobile dashboard brand. */
.bc-dashboard-topbar__brand { display: none; }
@media (max-width: 782px) {
  .bc-dashboard-topbar__brand {
    display: inline-flex;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
  }
  .bc-dashboard-topbar__brand .buildcost-brand__logo {
    width: 28px;
    max-width: 28px;
    max-height: 28px;
  }
  .bc-dashboard-topbar__brand .buildcost-brand__text-fallback.is-visible {
    width: max-content;
    font-size: 12px;
    white-space: nowrap;
  }
}
