/* The estimate is a working document. These rules are scoped to its surface. */
.layout.estimate-ledger-layout { grid-template-columns: 216px minmax(0, 1fr); }
.estimate-ledger-layout .workspace-sidebar { width: 216px; min-width: 0; padding-inline: 16px; }
.estimate-ledger-layout .workspace-sidebar-brand { gap: 10px; }
.estimate-ledger-layout .workspace-sidebar-brand strong { font-size: 22px; }
.estimate-ledger-layout .workspace-brand-mark { width: 30px; height: 34px; }
.estimate-ledger-layout .workspace-nav button { padding: 11px 10px; gap: 10px; font-size: 13px; }
.estimate-ledger-layout .workspace-nav button svg { width: 18px; height: 18px; }
.estimate-ledger-layout .workspace-user-copy span { max-width: 146px; font-size: 11px; }
.estimate-ledger-layout .workspace-user-copy strong, .estimate-ledger-layout .workspace-name { font-size: 13px; }
.estimate-ledger-layout .workspace-main { min-width: 0; background: #f6f8f7; padding: 20px 24px 24px; color: #17251f; }
.estimate-ledger-layout .workspace-topbar { padding-bottom: 12px; margin-bottom: 12px; align-items: center; }
.estimate-ledger-layout .workspace-topbar h1 { font-size: 16px; margin: 0; color: #3e5249; font-weight: 500; }
.estimate-ledger-layout .workspace-breadcrumb { display: none; }
.estimate-ledger-layout .workspace-refresh { font-size: 12px; padding: 7px 10px; min-height: 32px; background: #fff; color: #3c5147; border: 1px solid #d7e0db; }
.workspace-main .estimate-ledger-page { border: 0; padding: 0; margin: 0; background: transparent; box-shadow: none; }
.workspace-main .estimate-ledger-page > .section-head { align-items: center; margin: 0; padding: 0; }
.workspace-main .estimate-ledger-page > .section-head h2 { margin: 4px 0 0; font-size: 25px; line-height: 1.25; letter-spacing: -.6px; color: #17251f; }
.workspace-main .estimate-ledger-page .eyebrow { display: none; }
.workspace-main .estimate-ledger-page .estimate-result-back { margin: 0 0 9px; }
.workspace-main .estimate-ledger-page .estimate-result-back button { min-height: 24px; background: none; border: 0; padding: 0; color: #677a70; font-size: 12px; }
.workspace-main .estimate-ledger-page .estimate-detail-status .badge { background: #e7f2e9; color: #346544; border: 0; font-size: 11px; padding: 4px 8px; }
.workspace-main .estimate-ledger-page .estimate-detail-actions { justify-content: flex-end; margin: -33px 0 16px; padding-right: 146px; gap: 7px; }
.workspace-main .estimate-ledger-page .estimate-detail-actions button { min-height: 30px; padding: 5px 11px; background: #fff; color: #344a40; border: 1px solid #d4ded7; border-radius: 5px; font-size: 12px; }
.estimate-ledger-layout .workspace-main > .notice { margin: 0 0 10px; padding: 10px 14px; font-size: 13px; }
.estimate-ledger-layout .workspace-main > .email-verification-notice { margin: 0 0 10px; }
.workspace-main .workspace-main .estimate-ledger-page .estimate-ledger { color: #20352a; background: #fff; border: 1px solid #dce4de; border-radius: 6px; font-size: 13px; overflow: hidden; }
.workspace-main .estimate-ledger-page .estimate-ledger *, .ledger-dialog * { box-sizing: border-box; }
.workspace-main .estimate-ledger-page .estimate-ledger button, .workspace-main .estimate-ledger-page .estimate-ledger input, .workspace-main .estimate-ledger-page .estimate-ledger select, .ledger-dialog button, .ledger-dialog input, .ledger-dialog select { font: inherit; }
.workspace-main .estimate-ledger-page .estimate-ledger button, .ledger-dialog button { min-height: 0; }
.workspace-main .estimate-ledger-page .estimate-ledger svg, .ledger-dialog svg { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 1.7; }
.workspace-main .estimate-ledger-page .estimate-ledger button:focus-visible, .workspace-main .estimate-ledger-page .estimate-ledger input:focus-visible, .ledger-dialog button:focus-visible, .ledger-dialog input:focus-visible, .ledger-dialog select:focus-visible { outline: 2px solid #37754c; outline-offset: 2px; }
.ledger-summary { display: flex; justify-content: space-between; gap: 36px; padding: 19px 22px 16px; border-bottom: 1px solid #e4eae6; }
.ledger-summary-caption { min-width: 240px; }
.ledger-document-label { display: block; color: #6c7e73; font-size: 11px; margin-bottom: 6px; }
.ledger-summary-caption > strong { display: block; color: #2a4335; font-size: 15px; font-weight: 600; }
.ledger-summary-caption p { color: #748279; font-size: 12px; line-height: 1.6; margin: 7px 0; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-text-action { padding: 0; border: 0; background: none; color: #3a734b; font-size: 12px; text-align: left; }
.ledger-summary-table { border-collapse: collapse; min-width: 475px; width: auto; font-variant-numeric: tabular-nums; font-size: 12px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table th, .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table td { border: 0; background: transparent; white-space: nowrap; padding: 4px 12px; color: #385144; }
.ledger-summary-table thead th { font-weight: 400; color: #748279 !important; font-size: 11px; text-align: right; }
.ledger-summary-table thead th:first-child { text-align: left; }
.ledger-summary-table tbody th, .ledger-summary-table tfoot th { text-align: left; font-weight: 400; }
.ledger-summary-table td { text-align: right; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tfoot th, .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tfoot td { border-top: 1px solid #d9e3dc; padding-top: 9px; font-weight: 700; font-size: 13px; color: #152d20; }
.ledger-type-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 2px; }
.ledger-type-material { background: #8562b4; }.ledger-type-work { background: #47a36c; }.ledger-type-delivery { background: #d4a340; }.ledger-type-equipment { background: #569ac2; }.ledger-type-other { background: #869b8d; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-price-notice { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border: 0; border-bottom: 1px solid #edd8a2; background: #fff7df; color: #795318; font-size: 12px; }
.ledger-price-notice > span { flex: 1; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-price-notice button { background: none; color: #795318; border: 1px solid #d7b96f; padding: 5px 9px; border-radius: 4px; white-space: nowrap; }
.ledger-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px 8px; }
.ledger-toolbar > div { display: flex; align-items: center; gap: 7px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-toolbar button, .workspace-main .estimate-ledger-page .estimate-ledger .ledger-status button { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #4d6256; border: 1px solid #d8e1db; padding: 6px 9px; border-radius: 4px; white-space: nowrap; font-size: 12px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-primary, .ledger-dialog .ledger-primary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #34774b !important; background: #34774b !important; color: white !important; border-radius: 4px; padding: 8px 13px; font-weight: 500; }
.workspace-main .estimate-ledger-page .estimate-ledger button:disabled, .ledger-dialog button:disabled { opacity: .6; cursor: wait; }
.ledger-search { display: flex; align-items: center; gap: 7px; min-width: 170px; border: 1px solid #dce3de; border-radius: 4px; padding: 5px 8px; color: #8b9a91; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-search input { background: none; border: 0; box-shadow: none; padding: 0; min-width: 0; width: 170px; font-size: 12px; color: #203b2b; }
.ledger-status { display: flex; align-items: center; min-height: 31px; gap: 13px; padding: 0 16px 8px; color: #7e8d83; font-size: 11px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-status button { border: 0; padding: 0; font-size: 11px; color: #39704c; }
.ledger-filters { display: flex; gap: 16px; margin-left: auto; }
.ledger-filters label { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-filters input { width: 13px; height: 13px; margin: 0; accent-color: #34774b; }
.ledger-scroll { max-height: clamp(280px, calc(100dvh - 470px), 720px); overflow: auto; border-top: 1px solid #dde5df; overscroll-behavior: contain; scrollbar-gutter: stable; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table { width: 100%; min-width: 1070px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.ledger-col-index { width: 64px; }.ledger-col-name { width: auto; }.ledger-col-unit { width: 44px; }.ledger-col-quantity { width: 90px; }.ledger-col-price { width: 93px; }.ledger-col-cost { width: 102px; }.ledger-col-margin { width: 63px; }.ledger-col-total { width: 120px; }.ledger-col-more { width: 34px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table th, .workspace-main .estimate-ledger-page .estimate-ledger .ledger-table td { border: 0; border-bottom: 1px solid #edf0ed; padding: 0 7px; vertical-align: middle; color: #344c3c; background: #fff; height: 35px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table thead th { position: sticky; top: 0; z-index: 3; height: 44px; text-align: right; padding-block: 7px; color: #6e8073; background: #f3f6f3; font-weight: 500; line-height: 1.3; border-bottom: 1px solid #dce5de; font-size: 11px; white-space: normal; }
.ledger-table thead th:first-child, .ledger-table thead th:nth-child(2) { text-align: left; }
.ledger-table .ledger-numeric, .ledger-table .ledger-client { text-align: right; white-space: nowrap; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table .ledger-index { white-space: nowrap; color: #9aa59f; font-size: 10px; }
.ledger-type { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 18px; border-radius: 3px; color: #fff; font-size: 10px; margin-right: 6px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table .ledger-unit { color: #839286; font-size: 11px; text-align: center; }
.ledger-position { position: relative; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-cell { min-height: 28px; display: block; width: 100%; text-align: right; padding: 4px 3px; border: 1px solid transparent; border-radius: 3px; background: none; font-size: 12px; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-cell.ledger-name { text-align: left; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-cell:hover { background: #f0f7f0; border-color: #d0dfd1; }
.ledger-cell-value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-cell-input { display: block; width: 100%; min-width: 0; height: 29px; padding: 3px; border: 1px solid #418056; border-radius: 3px; background: #f9fff9; color: #173921; box-shadow: 0 0 0 2px #e0efe3; text-align: right; outline: 0; font-size: 12px; }
.ledger-position .ledger-cell-input { text-align: left; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table .ledger-client { color: #1f412b; font-weight: 600; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table .ledger-section th, .workspace-main .estimate-ledger-page .estimate-ledger .ledger-table .ledger-section td { background: #edf4ed; height: 40px; border-block: 1px solid #d8e5d8; font-weight: 700; color: #263f2c; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table .ledger-group th, .workspace-main .estimate-ledger-page .estimate-ledger .ledger-table .ledger-group td { background: #f8faf7; height: 29px; color: #60755f; font-size: 11px; }
.ledger-section th > div, .ledger-group th > div { display: flex; align-items: center; gap: 7px; text-align: left; }
.ledger-group th > div { padding-left: calc(18px * var(--ledger-depth, 1)); }
.ledger-section small, .ledger-group small { color: #90a18f; font-size: 10px; font-weight: 400; margin-left: 3px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-fold, .workspace-main .estimate-ledger-page .estimate-ledger .ledger-add-section, .workspace-main .estimate-ledger-page .estimate-ledger .ledger-more { padding: 3px; border: 0; background: none; color: #839480; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-add-section { opacity: .6; margin-left: 2px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-section:hover .ledger-add-section { opacity: 1; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-more:hover { background: #e8f1e8; color: #2c6b40; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table tfoot th, .workspace-main .estimate-ledger-page .estimate-ledger .ledger-table tfoot td { position: sticky; bottom: 0; z-index: 2; border-top: 1px solid #c6d8c8; background: #edf5ec; height: 40px; font-weight: 700; text-align: right; }
.ledger-table tfoot th { text-align: left !important; padding-left: 14px !important; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table .ledger-excluded td { opacity: .55; background: #f7f8f7; }
.ledger-excluded .ledger-position { text-decoration: line-through; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table .estimate-price-missing td { background: #fffdf6; }
.workspace-main .estimate-ledger-page .estimate-ledger .missing-price-input { border-color: #d5a94d; background: #fff5d8; color: #8b631d; font-size: 11px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-error { padding: 10px 16px; color: #ad332b; background: #fff1ef; font-size: 12px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-error-text, .ledger-dialog .ledger-dialog-error { color: #b2372e; }
.ledger-user-mark { position: absolute; right: 0; top: 2px; color: #337849; font-size: 10px; }
.ledger-lock { width: 11px !important; height: 11px !important; position: absolute; right: 0; top: 10px; color: #8b9b90; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table .ledger-empty { text-align: center; padding: 38px 16px; color: #7d8f82; }
.ledger-footnote { display: flex; justify-content: space-between; gap: 20px; padding: 8px 16px; font-size: 10px; color: #98a69b; }
.ledger-dialog { position: fixed; inset: 0 0 0 auto; width: min(520px, 94vw); max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; padding: 26px; border: 0; border-left: 1px solid #d8e2db; background: #fff; color: #233a2b; overflow-y: auto; box-shadow: -10px 0 45px #102a1c26; font-size: 14px; }
.ledger-dialog::backdrop { background: #12231c50; }
.ledger-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.ledger-dialog h2 { margin: 0; font-size: 22px; line-height: 1.4; color: #193223; }
.ledger-dialog .ledger-dialog-close { border: 0; padding: 5px; background: #f1f5f0; border-radius: 4px; color: #657e6b; }
.ledger-dialog-form { display: grid; gap: 17px; }
.ledger-dialog-form label { display: flex; flex-direction: column; gap: 7px; color: #536c5a; font-size: 13px; }
.ledger-dialog-form input, .ledger-dialog-form select { width: 100%; height: 38px; padding: 7px 9px; border: 1px solid #cfdbd0; border-radius: 4px; background: white; color: #203b2b; font-size: 14px; }
.ledger-form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ledger-dialog p { color: #728479; font-size: 13px; line-height: 1.65; margin: 0; }
.ledger-dialog .ledger-dialog-error:empty { display: none; }
.ledger-line-details { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; margin-bottom: 30px; }
.ledger-line-details dt { color: #7d8e80; font-size: 12px; }
.ledger-line-details dd { margin: 0; color: #304a37; font-size: 13px; }
.ledger-detail-actions { display: grid; gap: 12px; }
.ledger-dialog .ledger-detail-actions button { padding: 10px; background: #f6f8f4; border: 1px solid #d5dfd4; border-radius: 4px; color: #48624c; }
.ledger-tool-details { margin-top: 24px; border-top: 1px solid #e1e8df; padding-top: 16px; }
.ledger-tool-details summary { cursor: pointer; color: #496d51; }
.ledger-dialog .panel, .ledger-dialog .supplier-price-preview-card { background: #fff; color: #263e2e; border-color: #d8e3da; padding: 14px 0; }
.ledger-dialog .field > span, .ledger-dialog .muted { color: #637b6b; }
.ledger-dialog table { min-width: 650px; }
.ledger-dialog .table-wrap { overflow: auto; }
@media (min-width: 1800px) { .ledger-col-name { width: auto; }.ledger-table .ledger-col-price { width: 110px; }.ledger-table .ledger-col-cost { width: 120px; }.ledger-table .ledger-col-total { width: 145px; } }
@media (max-width: 1200px) { .layout.estimate-ledger-layout { grid-template-columns: 185px minmax(0,1fr); }.estimate-ledger-layout .workspace-sidebar { width: 185px; padding-inline: 10px; }.estimate-ledger-layout .workspace-sidebar-brand strong { font-size: 20px; }.estimate-ledger-layout .workspace-main { padding: 16px; }.ledger-summary { gap: 16px; padding-inline: 16px; }.ledger-summary-table { min-width: 420px; }.ledger-summary-caption { min-width: 170px; }.ledger-summary-table th, .ledger-summary-table td { padding-inline: 8px !important; }.ledger-toolbar { flex-wrap: wrap; }.ledger-summary-caption p { max-width: 210px; } }
@media (max-width: 900px) { .layout.estimate-ledger-layout { display: block; }.estimate-ledger-layout .workspace-sidebar { position: static; width: auto; }.ledger-summary { flex-wrap: wrap; }.ledger-summary-table { width: 100%; min-width: 0; }.ledger-summary-caption p { max-width: none; }.ledger-summary-caption p br { display: none; }.ledger-scroll { max-height: 65vh; }.workspace-main .estimate-ledger-page .estimate-detail-actions { margin: 12px 0; padding: 0; justify-content: flex-start; }.ledger-footnote { flex-wrap: wrap; }.ledger-status { flex-wrap: wrap; }.ledger-filters { margin-left: 0; } }

.estimate-ledger-layout .workspace-topbar { min-height: 0; }
.estimate-ledger-layout .workspace-user-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-dialog .ledger-detail-actions { margin-top: 24px; }

.workspace-main .estimate-ledger-page .estimate-ledger .ledger-invalid { border-color: #c44438; box-shadow: 0 0 0 2px #fce3de; }
.estimate-ledger-layout .workspace-main .topbar.workspace-topbar { min-height: 32px; margin: 0 0 14px; padding: 0; align-items: center; }
.estimate-ledger-layout .workspace-main { color-scheme: light; }
.estimate-ledger-layout .workspace-main > .account-verification-notice { margin: 0 0 14px; padding: 8px 12px; border: 1px solid #ebdfbc; border-radius: 4px; background: #fffaf0; color: #8a773b; font-size: 11px; }
.estimate-ledger-layout .account-verification-notice p { margin: 2px 0 0; font-size: 11px; color: #998a64; }
.estimate-ledger-layout .account-verification-notice button { min-height: 28px; padding: 4px 8px; font-size: 11px; background: white; border-color: #e2d5ae; color: #85713f; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table thead th:first-child,
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-table thead th:nth-child(2) { text-align: left; }
.estimate-ledger .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.workspace-main .estimate-ledger-page .estimate-ledger button.ledger-cell.missing-price-input { white-space: normal; line-height: 1.1; padding: 2px 1px; font-size: 11px; }

/* Owner-approved corporate header. Table presentation is unchanged. */
.estimate-ledger-layout .workspace-main {
  background: linear-gradient(to bottom, #0c171d 0, #0c171d var(--estimate-header-end, 0px), #f6f8f7 var(--estimate-header-end, 0px), #f6f8f7 100%);
}
.estimate-ledger-layout .workspace-topbar h1 { color: #f1f4f3; }
.estimate-ledger-layout .workspace-refresh {
  background: #101e25; border-color: #273841; color: #f1f4f3;
}
.estimate-ledger-layout .workspace-main > .account-verification-notice {
  background: #13261e; border-color: #2c4737; color: #d7e6d9;
}
.estimate-ledger-layout .account-verification-notice p { color: #a9bdaf; }
.estimate-ledger-layout .account-verification-notice button {
  background: #1b3425; border-color: #3a5941; color: #c3f39e;
}
.workspace-main .estimate-ledger-page > .section-head h2 { color: #f1f4f3; }
.workspace-main .estimate-ledger-page .estimate-result-back button { color: #a9b9b0; }
.workspace-main .estimate-ledger-page .estimate-detail-status .badge {
  background: #193520; color: #c2f39d;
}
.workspace-main .estimate-ledger-page .estimate-detail-actions button {
  background: #101e25; border-color: #31463e; color: #e5eee7;
}
.workspace-main .estimate-ledger-page .ledger-summary { border-bottom-color: #273841; }
.workspace-main .estimate-ledger-page .ledger-document-label { color: #9aa8ae; }
.workspace-main .estimate-ledger-page .ledger-summary-caption > strong { color: #f1f4f3; }
.workspace-main .estimate-ledger-page .ledger-summary-caption p { color: #a7b7ad; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-text-action { color: #97e83e; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table th,
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table td { color: #d9e5dc; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table thead th { color: #a7b7ad !important; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tfoot th,
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tfoot td {
  color: #f1f4f3; border-top-color: #385044;
}
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tfoot td:nth-child(3) { color: #97e83e; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-toolbar button,
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-status button {
  background: #101e25; border-color: #31463e; color: #e1ebe4;
}
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-toolbar .ledger-primary {
  background: #97e83e !important; border-color: #97e83e !important; color: #10200c !important;
}
.workspace-main .estimate-ledger-page .ledger-search { background: #101e25; border-color: #31463e; color: #a7b7ad; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-search input { color: #f1f4f3; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-search input::placeholder { color: #a7b7ad; opacity: 1; }
.workspace-main .estimate-ledger-page .ledger-status { color: #a7b7ad; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-status button { background: none; color: #97e83e; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-filters input { accent-color: #97e83e; }

.workspace-main .estimate-ledger-page .ledger-status .ledger-error-text { color: #ffb0a6; }
.workspace-main .estimate-ledger-page .ledger-toolbar button:focus-visible,
.workspace-main .estimate-ledger-page .ledger-search input:focus-visible,
.estimate-ledger-layout .workspace-refresh:focus-visible,
.workspace-main .estimate-ledger-page .estimate-detail-actions button:focus-visible { outline-color: #97e83e; }

/* Row actions are a small menu; calculation details remain a separate drawer. */
.ledger-row-menu { position:fixed;inset:auto;margin:0;width:min(280px,calc(100vw - 16px));max-height:calc(100dvh - 16px);overflow:auto;box-sizing:border-box;padding:8px;border:1px solid #cbd8cd;border-radius:10px;background:#fff;color:#203827;box-shadow:0 12px 36px #0003;font:14px/1.4 system-ui,-apple-system,sans-serif; }
.ledger-row-menu::backdrop { background:transparent; }
.ledger-row-menu > p { margin:4px 8px 8px;font-size:12px;line-height:1.4;overflow-wrap:anywhere;color:#56685a; }
.ledger-row-menu > p:first-child { font-weight:600;max-height:54px;overflow:auto; }
.ledger-row-menu > button { display:flex;align-items:center;gap:8px;width:100%;min-height:36px;padding:8px;border:0;border-radius:6px;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer; }
.ledger-row-menu > button:hover,.ledger-row-menu > button:focus-visible { background:#edf4e9;outline:2px solid #7bbd41;outline-offset:-2px; }
.ledger-row-menu > button.ledger-menu-delete { color:#b53530; }
.ledger-row-menu svg { width:16px;height:16px;flex-shrink:0; }

/* Catalog repricing uses the existing estimate dialog palette. */
.repricing-dialog { width: min(640px, 96vw); }
.repricing-dialog .repricing-manual { display: flex; flex-direction: row; align-items: center; }
.repricing-dialog .repricing-manual input { width: 18px; height: 18px; flex: 0 0 18px; }
.repricing-totals { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.repricing-totals dd { margin: 0; text-align: right; font-weight: 600; }
.repricing-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.repricing-actions button { white-space: normal; padding: 9px 12px; }
.repricing-lines { list-style: none; padding: 0; }
.repricing-lines li { display: grid; gap: 5px; padding: 12px 0; border-bottom: 1px solid #d8e2db; overflow-wrap: anywhere; }
.repricing-lines small { color: #536c5a; }

/* Catalogue-first estimate additions. */
.ledger-catalog-results {display:grid;gap:6px;max-height:240px;overflow:auto;}
.ledger-catalog-results button {display:grid;gap:3px;text-align:left;padding:9px 12px;min-height:40px;width:100%;background:#f6f9f7;border:1px solid #d7e1da;border-radius:7px;color:#223629;}
.ledger-catalog-results button:hover,.ledger-catalog-results button:focus-visible {border-color:#58a72a;background:#edf7e9;}
.ledger-catalog-results button span,.ledger-catalog-hint,.ledger-catalog-status {font-size:12px;line-height:1.5;color:#5a6b61;}
.ledger-dialog-form .ledger-catalog-status {margin:0;}
.ledger-dialog-form [hidden] {display:none;}

/* Scoped calculated-section dialog. */
.ledger-dialog-form[data-grid-form="section-choice"] label { flex-direction: row; align-items: center; gap: 10px; padding: 8px 0; }
.ledger-dialog-form[data-grid-form="section-choice"] input { width: 18px; height: 18px; flex-shrink: 0; }
.ledger-dialog-form[data-grid-form="section-inputs"] fieldset { min-width: 0; display: grid; gap: 12px; padding: 16px; border: 1px solid #d8e2db; border-radius: 6px; }
.ledger-dialog-form[data-grid-form="section-inputs"] legend { font-weight: 600; padding: 0 6px; }
.ledger-dialog-form[data-grid-form="section-inputs"] input, .ledger-dialog-form[data-grid-form="section-inputs"] select { min-width: 0; max-width: 100%; }
.ledger-dialog .ledger-error-text { color: #b2372e; }

/* Compact estimate header: name and adjustments left, financial summary right. */
.estimate-ledger-layout:has(.estimate-detail-panel.estimate-ledger-page) .workspace-topbar { display: none; }
.workspace-main .estimate-ledger-page .estimate-save-actions { margin: 0 0 6px; gap: 6px; }
.workspace-main .estimate-ledger-page .estimate-save-actions button { min-height: 26px; padding: 4px 9px; font-size: 12px; }
.workspace-main .estimate-ledger-page .ledger-summary { align-items: flex-start; gap: 20px; padding: 8px 0 9px; }
.workspace-main .estimate-ledger-page .ledger-summary-caption { flex: 1; min-width: 0; padding-top: 2px; }
.workspace-main .estimate-ledger-page .ledger-summary-caption > strong { font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.workspace-main .estimate-ledger-page .ledger-document-label { font-size: 11px; line-height: 1.3; margin: 4px 0 7px; }
.ledger-financial-actions { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-text-action { line-height: 1.4; }
.workspace-main .estimate-ledger-page .ledger-summary-table { flex: 0 0 auto; min-width: 0; font-size: 11px; line-height: 1.2; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table th,
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table td { padding: 2px 8px !important; line-height: 1.2; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table thead th { font-size: 10px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tfoot th,
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tfoot td { padding-top: 4px !important; font-size: 12px; }
.workspace-main .estimate-ledger-page .ledger-toolbar { padding: 8px 0 6px; }
.workspace-main .estimate-ledger-page .ledger-status { padding: 0 0 6px; min-height: 22px; }
@media (max-width: 900px) {
  .workspace-main .estimate-ledger-page .ledger-summary { flex-wrap: nowrap; gap: 16px; }
  .workspace-main .estimate-ledger-page .ledger-summary-table { width: auto; }
}
@media (max-width: 680px) {
  .workspace-main .estimate-ledger-page .ledger-summary { flex-direction: column; gap: 10px; }
  .workspace-main .estimate-ledger-page .ledger-summary-table { width: 100%; }
  .workspace-main .estimate-ledger-page .ledger-summary-caption > strong { font-size: 18px; }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table th,
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table td { padding-inline: 3px !important; font-size: 10px; }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table thead th { font-size: 9px; white-space: normal; }
}
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody th,
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody td { font-size: 11px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody th,
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody td { padding-block: 1px !important; line-height: 1.1; }
.workspace-main .estimate-ledger-page .estimate-header-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 4px; }
.workspace-main .estimate-header-tools .estimate-result-back { margin: 0; flex-shrink: 0; }
.workspace-main .estimate-ledger-page .estimate-header-tools .estimate-detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin: 0; padding: 0; }
.workspace-main .estimate-ledger-page .estimate-header-tools .estimate-detail-actions button { min-height: 26px; padding: 4px 9px; font-size: 11px; white-space: nowrap; }
@media (max-width: 760px) {
  .workspace-main .estimate-ledger-page .estimate-header-tools { flex-wrap: wrap; }
  .workspace-main .estimate-ledger-page .estimate-header-tools .estimate-detail-actions { justify-content: flex-start; }
}

/* Separate document actions from the financial summary. */
.workspace-main .estimate-ledger-page .estimate-header-tools { justify-content: flex-start; gap: 24px; padding-bottom: 12px; margin-bottom: 0; }
.workspace-main .estimate-ledger-page .estimate-header-tools .estimate-detail-actions { justify-content: flex-start; gap: 16px; }
.workspace-main .estimate-ledger-page .estimate-action-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.workspace-main .estimate-ledger-page .estimate-action-group + .estimate-action-group { border-left: 1px solid #31463e; padding-left: 16px; }
.workspace-main .estimate-ledger-page .estimate-header-tools .estimate-detail-actions button { min-height: 30px; padding: 6px 10px; font-size: 12px; font-weight: 400; }
.workspace-main .estimate-ledger-page .ledger-summary { gap: 32px; padding-top: 0; padding-bottom: 12px; align-items: center; }
.workspace-main .estimate-ledger-page .ledger-summary-caption { padding-top: 0; }
.workspace-main .estimate-ledger-page .ledger-financial-actions { gap: 10px; margin-top: 10px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-financial-actions .ledger-text-action { border: 1px solid #31463e; border-radius: 4px; padding: 4px 9px; }
.workspace-main .estimate-ledger-page .ledger-summary-table { background: #111f25; border: 1px solid #273841; border-radius: 6px; border-collapse: separate; border-spacing: 0; padding: 8px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table th,
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table td { padding: 3px 10px !important; line-height: 1.3; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody th,
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody td { font-size: 12px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table thead th { font-size: 10px; padding-bottom: 6px !important; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tfoot th,
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tfoot td { padding-top: 6px !important; font-size: 12px; }
@media (max-width: 1100px) {
  .workspace-main .estimate-ledger-page .estimate-header-tools { gap: 10px 18px; flex-wrap: wrap; }
  .workspace-main .estimate-ledger-page .estimate-header-tools .estimate-detail-actions { gap: 10px; }
  .workspace-main .estimate-ledger-page .estimate-header-tools .estimate-detail-actions button { padding-inline: 8px; font-size: 11px; }
  .workspace-main .estimate-ledger-page .ledger-summary { gap: 20px; }
}
@media (max-width: 680px) {
  .workspace-main .estimate-ledger-page .ledger-summary { align-items: stretch; gap: 14px; }
  .workspace-main .estimate-ledger-page .estimate-action-group + .estimate-action-group { border-left: 0; padding-left: 0; }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table th,
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table td { padding: 3px 4px !important; }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody th,
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody td { font-size: 11px; }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tfoot th,
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tfoot td { font-size: 11px; }
}

/* The summary needs actual row spacing: older tbody rules beat cell shorthand. */
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody th,
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody td {
  padding-top: 5px !important;
  padding-bottom: 5px !important;
  line-height: 16px;
  font-weight: 400;
}
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody th { font-size: 12px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody td { font-size: 11px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table thead th { font-size: 11px; line-height: 1.4; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tfoot th { font-size: 12px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tfoot td { font-size: 11px; font-weight: 500; }

/* Let estimate rows use the screen space released by the compact header. */
@media (min-width: 901px) {
  .workspace-main .estimate-ledger-page .ledger-scroll {
    height: var(--estimate-table-height, calc(100dvh - 340px));
    max-height: none;
  }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-table { height: 100%; }
}

.workspace-main .estimate-ledger-page .ledger-footnote {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.workspace-main .estimate-ledger-page .ledger-footnote > span:first-child { white-space: nowrap; }

/* Keep every estimate column inside the desktop workspace on smaller windows. */
@media (min-width: 901px) and (max-width: 1400px) {
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-table { min-width: 0; width: 100%; }
  .workspace-main .estimate-ledger-page .ledger-table .ledger-col-index { width: 4.8%; }
  .workspace-main .estimate-ledger-page .ledger-table .ledger-col-name { width: auto; }
  .workspace-main .estimate-ledger-page .ledger-table .ledger-col-unit { width: 4%; }
  .workspace-main .estimate-ledger-page .ledger-table .ledger-col-quantity { width: 6%; }
  .workspace-main .estimate-ledger-page .ledger-table .ledger-col-price { width: 9.5%; }
  .workspace-main .estimate-ledger-page .ledger-table .ledger-col-cost { width: 10.5%; }
  .workspace-main .estimate-ledger-page .ledger-table .ledger-col-margin { width: 5%; }
  .workspace-main .estimate-ledger-page .ledger-table .ledger-col-total { width: 12%; }
  .workspace-main .estimate-ledger-page .ledger-table .ledger-col-more { width: 3.2%; }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-table th,
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-table td { padding-inline: 4px; font-size: 11px; }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-table .ledger-cell { padding-inline: 2px; font-size: 11px; }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-table thead th { font-size: 10px; }
}
@media (min-width: 901px) and (max-width: 1050px) {
  .workspace-main .estimate-ledger-page .ledger-table .ledger-col-quantity { width: 5%; }
  .workspace-main .estimate-ledger-page .ledger-table .ledger-col-price { width: 11%; }
  .workspace-main .estimate-ledger-page .ledger-table .ledger-col-cost { width: 12%; }
  .workspace-main .estimate-ledger-page .ledger-table .ledger-col-total { width: 13%; }
}

/* The document controls share one baseline and one button height. */
@media (min-width: 901px) {
  .workspace-main .estimate-ledger-page .estimate-header-tools { flex-wrap: nowrap; gap: 12px; }
  .workspace-main .estimate-ledger-page .estimate-header-tools .estimate-detail-actions,
  .workspace-main .estimate-ledger-page .estimate-header-tools .estimate-action-group { flex-wrap: nowrap; align-items: center; }
  .workspace-main .estimate-ledger-page .estimate-header-tools .estimate-detail-actions button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-height: 32px;
    line-height: 18px;
    padding-block: 6px;
    margin-block: 0;
  }
  .workspace-main .estimate-header-tools .estimate-result-back button { height: 32px; }
}
@media (min-width: 901px) and (max-width: 1050px) {
  .workspace-main .estimate-ledger-page .estimate-header-tools { flex-wrap: wrap; }
  .workspace-main .estimate-ledger-page .estimate-header-tools .estimate-detail-actions { max-width: 100%; overflow-x: auto; }
}

/* Keep document actions beside the summary on wide estimate pages. */
.workspace-main .estimate-ledger-page .ledger-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px 24px;
  padding-bottom: 10px;
}
.workspace-main .estimate-ledger-page .ledger-summary-caption { display: contents; }
.workspace-main .estimate-ledger-page .ledger-summary .estimate-header-tools {
  grid-column: 1 / -1;
  margin: 0;
  padding-bottom: 0;
  min-width: 0;
}
.workspace-main .estimate-ledger-page .ledger-document-heading { min-width: 0; align-self: start; }
.workspace-main .estimate-ledger-page .ledger-document-heading > strong {
  display: block;
  color: #f1f4f3;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.workspace-main .estimate-ledger-page .ledger-summary-table { margin: 0; align-self: start; }
@media (min-width: 1700px) {
  .workspace-main .estimate-ledger-page .ledger-summary-caption {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
@media (min-width: 901px) {
  .workspace-main .estimate-ledger-page .ledger-toolbar { justify-content: flex-start; gap: 12px; }
}
@media (max-width: 680px) {
  .workspace-main .estimate-ledger-page .ledger-summary { grid-template-columns: minmax(0, 1fr); }
  .workspace-main .estimate-ledger-page .ledger-document-heading,
  .workspace-main .estimate-ledger-page .ledger-summary-table { grid-column: 1; }
  .workspace-main .estimate-ledger-page .ledger-document-heading > strong { font-size: 18px; }
}

@media (max-width: 680px) {
  .workspace-main .estimate-ledger-page .ledger-summary-table { table-layout: fixed; width: 100%; max-width: 100%; }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table th,
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table td { padding-inline: 2px !important; }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody th { font-size: 11px; }
}

/* Reserve only the compact footnote below the estimate, with no page-bottom gap. */
@media (min-width: 901px) {
  .estimate-ledger-layout .workspace-main:has(.estimate-detail-panel.estimate-ledger-page) { padding-bottom: 0; }
  .workspace-main .estimate-ledger-page .ledger-footnote {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 0;
    padding: 4px 16px;
    margin: 0;
    min-height: 0;
    font-size: 10px;
    line-height: 14px;
  }
}

/* Fill the approved heading area with more legible estimate details. */
@media (min-width: 901px) {
  .workspace-main .estimate-ledger-page .ledger-document-heading { width: min(100%, 580px); }
  .workspace-main .estimate-ledger-page .ledger-document-heading > strong {
    font-size: clamp(24px, 2.1vw, 30px);
    line-height: 1.2;
  }
  .workspace-main .estimate-ledger-page .ledger-document-heading .ledger-document-label {
    font-size: 13px;
    line-height: 1.4;
    margin: 6px 0 0;
  }
  .workspace-main .estimate-ledger-page .ledger-document-heading .ledger-financial-actions { margin-top: 14px; gap: 12px; }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-document-heading .ledger-financial-actions .ledger-text-action {
    font-size: 16px;
    line-height: 22px;
    min-height: 38px;
    padding: 7px 12px;
  }
}

/* Client-document additions use the existing compact estimate toolbar. */
.estimate-document-dialog{width:min(560px,calc(100vw - 32px));max-height:calc(100vh - 40px);overflow:auto;padding:24px;border:1px solid #365344;border-radius:12px;background:#102026;color:#e3ece6}
.estimate-document-dialog::backdrop{background:rgba(0,0,0,.65)}
.estimate-document-dialog h2{font-size:20px;margin-top:0;color:#e3ece6}
.estimate-document-dialog p,.estimate-document-dialog .mini{font-size:13px;color:#b4c4ba}
.estimate-document-dialog label{display:flex;flex-direction:column;gap:8px;font-size:14px;margin:16px 0}
.estimate-document-dialog textarea{min-height:180px;resize:vertical;padding:10px;background:#0a161b;border:1px solid #365344;color:#e3ece6;border-radius:6px;font:inherit;line-height:1.5}
.estimate-document-dialog [data-document-error]{color:#ffbda2;min-height:18px}
.document-dialog-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.company-document-branding{margin-top:20px;border-top:1px solid #365344;padding-top:12px}
.company-document-branding button{margin:8px 8px 0 0}
.company-document-logo{display:block;max-width:220px;max-height:90px;object-fit:contain;background:#fff;border-radius:6px;padding:8px;margin:12px 0}
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-section-variant{display:inline-flex;align-items:center;gap:5px;min-height:26px;padding:3px 8px;border:1px solid #bdcebd;border-radius:5px;background:#f6faf4;color:#365e3b;font-size:12px;white-space:nowrap}

/* House photo belongs to this estimate, between its heading and totals. */
.workspace-main .estimate-ledger-page .ledger-summary:has(.ledger-house-photo) { grid-template-columns: minmax(240px,1fr) minmax(180px,278px) auto; gap: 12px 16px; }
.workspace-main .estimate-ledger-page .ledger-summary:has(.ledger-house-photo) .ledger-summary-caption { display: contents; }
.workspace-main .estimate-ledger-page .ledger-summary:has(.ledger-house-photo) .ledger-document-heading { grid-column: 1; grid-row: 2; }
.workspace-main .estimate-ledger-page .ledger-summary:has(.ledger-house-photo) .ledger-summary-table { grid-column: 3; grid-row: 2; }
.ledger-house-photo { grid-column: 2; grid-row: 2; margin: 0; width: 100%; aspect-ratio: 5 / 3; max-height: 190px; overflow: hidden; border-radius: 6px; background: #101e24; border: 1px solid #31463e; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; }
.ledger-house-photo[data-photo-id=""][data-photo-editable="false"] { visibility: hidden; }
.ledger-house-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ledger-photo-status { color: #a7b7ad; font-size: 12px; text-align: center; padding: 8px; }
@media (max-width: 1349px) {
  .workspace-main .estimate-ledger-page .ledger-summary:has(.ledger-house-photo) { grid-template-columns: minmax(0,1fr) auto; }
  .workspace-main .estimate-ledger-page .ledger-summary:has(.ledger-house-photo) .ledger-summary-table { grid-column: 2; }
  .ledger-house-photo { grid-column: 1; grid-row: 3; max-width: 278px; }
  .ledger-house-photo[data-photo-id=""][data-photo-editable="false"] { display: none; }
}
@media (max-width: 680px) {
  .workspace-main .estimate-ledger-page .ledger-summary:has(.ledger-house-photo) { grid-template-columns: minmax(0,1fr); }
  .workspace-main .estimate-ledger-page .ledger-summary:has(.ledger-house-photo) .ledger-summary-table { grid-column: 1; grid-row: 4; }
  .ledger-house-photo { max-width: 100%; max-height: 220px; }
}

.workspace-main .estimate-ledger-page .ledger-house-photo-add,
.workspace-main .estimate-ledger-page .ledger-house-photo-image { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 5px; background: transparent; color: #97e83e; cursor: pointer; }
.workspace-main .estimate-ledger-page .ledger-house-photo-add { border: 1px dashed #48634e; font-size: 15px; }
.ledger-house-photo-add svg { width: 24px; height: 24px; }
.ledger-house-photo-image:focus-visible, .ledger-house-photo-add:focus-visible { outline: 2px solid #97e83e; outline-offset: -4px; }
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-house-photo .ledger-house-photo-add,
.workspace-main .estimate-ledger-page .estimate-ledger .ledger-house-photo .ledger-house-photo-image { background: #101e24 !important; color: #97e83e !important; }

/* Balance the three header blocks with equal gaps around the house photo. */
@media (min-width: 1350px) {
  .workspace-main .estimate-ledger-page .ledger-summary:has(.ledger-house-photo) {
    grid-template-columns: fit-content(32%) minmax(180px,278px) auto;
    justify-content: space-between;
  }
  .workspace-main .estimate-ledger-page .ledger-summary:has(.ledger-house-photo) .ledger-summary-table {
    align-self: stretch;
    height: 180px;
  }
  .workspace-main .estimate-ledger-page .ledger-house-photo { height: 180px; aspect-ratio: auto; }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody th { font-size: 13px; }
  .workspace-main .estimate-ledger-page .estimate-ledger .ledger-summary-table tbody td { font-size: 12px; }
}
