.billing-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px}.billing-workspace{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:22px}.billing-check{display:flex;gap:12px;align-items:start;padding:10px 0}.billing-check input{width:20px;min-height:20px;flex:0 0 20px}.billing-check span{overflow-wrap:anywhere}.billing-line{padding:15px 0;border-bottom:1px solid #dde5dd}.billing-line .field{min-width:0}.billing-workspace fieldset,#billing-new fieldset{border:0;padding:0;margin:15px 0}#billing-new summary{font-size:1.2rem;font-weight:700;cursor:pointer}.invoice-customer-copy{background:#fff;color:#25372b;border:1px solid #d4dfd1;padding:36px;margin:24px auto;max-width:850px;overflow-wrap:anywhere}.invoice-letterhead{display:flex;align-items:center;justify-content:space-between;gap:25px}.invoice-letterhead img{max-width:36%;height:auto}.invoice-copy-title{display:flex;justify-content:space-between;align-items:center;margin:26px 0 10px}.invoice-print-table{border-collapse:collapse;width:100%;margin:20px 0;font-size:.92rem}.invoice-print-table th,.invoice-print-table td{text-align:left;padding:11px 8px;border-bottom:1px solid #dce3da;vertical-align:top}.invoice-print-table th{background:#edf2e8;font-size:.8rem}.invoice-print-table small{display:block;color:#52624f}.invoice-print-table th:first-child{width:45%}.invoice-copy-totals{max-width:400px;margin:20px 0 20px auto}.invoice-copy-totals p{display:flex;justify-content:space-between;gap:22px;margin:9px 0}.invoice-final-balance{padding-top:12px;border-top:2px solid #334d33}.invoice-copy-footer{font-size:.8rem;color:#52624f;margin-top:35px}.invoice-customer-copy h2{font-size:1.4rem}.invoice-customer-copy h3{font-size:1rem}.invoice-customer-copy p{line-height:1.5}
.billing-workspace{align-items:start}.billing-issued-details>summary{cursor:pointer;font-weight:600;line-height:1.5}.invoice-money,.invoice-copy-totals strong{white-space:nowrap}
@media screen and (max-width:650px){
  .billing-workspace{display:block}
  .billing-workspace>section+section{margin-top:18px}
  .billing-workspace input{max-width:100%}
  .invoice-customer-copy{padding:22px 16px}
  .invoice-letterhead{flex-direction:column;align-items:start;gap:18px;font-size:.9rem}
  .invoice-letterhead img{width:180px;max-width:180px}
  .invoice-copy-title{flex-wrap:wrap;gap:12px;align-items:baseline}
  .invoice-customer-copy .billing-columns{grid-template-columns:1fr;gap:0}
  .invoice-print-table,.invoice-print-table tbody{display:block}
  .invoice-print-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .invoice-print-table tbody tr{display:block;padding:16px 0;border-bottom:1px solid #dce3da}
  .invoice-print-table td{display:block;padding:6px 0;border:0;font-size:.9rem}
  .invoice-print-table td:first-child{padding-bottom:12px;font-size:1rem}
  .invoice-print-table td:not(:first-child){display:flex;justify-content:space-between;gap:18px}
  .invoice-print-table td[data-label]::before{content:attr(data-label);font-weight:600}
  .invoice-print-table td>span{text-align:right}
  .invoice-copy-totals{font-size:.95rem}
}
@media print{@page{size:letter;margin:.5in}body:not(.invoice-print-active):has(#invoice-customer-copy){background:white!important}body:not(.invoice-print-active):has(#invoice-customer-copy)>:not(main){display:none!important}body:not(.invoice-print-active):has(#invoice-customer-copy) main>*:not(.hub-workspace){display:none!important}body:not(.invoice-print-active):has(#invoice-customer-copy) .hub-workspace>*:not(#invoice-customer-copy){display:none!important}body:not(.invoice-print-active):has(#invoice-customer-copy) main,body:not(.invoice-print-active):has(#invoice-customer-copy) .hub-workspace{display:block!important;width:auto!important;max-width:none!important;margin:0!important;padding:0!important}.invoice-customer-copy{display:block;border:0;padding:0;margin:0;max-width:none;font-size:10pt}.invoice-customer-copy p{line-height:1.4}.invoice-letterhead img{width:155px}.invoice-copy-title{margin-top:18px}.invoice-print-table{font-size:9pt}.invoice-print-table th{background:#edf2e8!important;print-color-adjust:exact}.invoice-print-table thead{display:table-header-group}.invoice-print-table tr,.invoice-letterhead,.invoice-copy-totals{break-inside:avoid}.invoice-copy-footer{font-size:8pt}.invoice-customer-copy .billing-columns{display:grid;grid-template-columns:1fr 1fr;gap:20px}a{color:inherit;text-decoration:none}}
@media print{body:not(.invoice-print-active):has(#website-dialog #invoice-customer-copy)>:not(#website-dialog){display:none!important}body:not(.invoice-print-active):has(#website-dialog #invoice-customer-copy)>#website-dialog{display:block!important;position:static!important;inset:auto!important;width:auto!important;max-width:none!important;max-height:none!important;overflow:visible!important;border:0!important;margin:0!important;padding:0!important}#website-dialog:has(#invoice-customer-copy)::backdrop{display:none!important}#website-dialog:has(#invoice-customer-copy)>:not(#website-dialog-content),#website-dialog-content:has(#invoice-customer-copy)>:not(#invoice-customer-copy){display:none!important}}
/* Daily owner workflow: compact fields and secondary details on demand. */
.billing-sections{display:flex;gap:6px;margin:12px auto 0;padding:5px;background:#eaf0e4;border-radius:12px;width:fit-content}.billing-sections a{display:inline-flex;align-items:center;min-height:44px;padding:8px 24px;border-radius:8px;color:#334d33;text-decoration:none;font-weight:600}.billing-sections a[aria-current]{background:#fff;box-shadow:0 1px 4px #253f311a}.hub-workspace textarea{min-height:70px;resize:vertical}.hub-workspace textarea:focus{min-height:96px}.billing-line>summary{display:flex;justify-content:space-between;align-items:center;gap:18px;cursor:pointer;padding:10px 0;min-height:44px}.billing-line>summary>span{display:grid;gap:4px}.billing-line>summary small{font-size:.82rem;color:#607058;font-weight:400}.billing-line>summary>strong{white-space:nowrap}.billing-line[open]>summary{margin-bottom:12px}.billing-preference>summary{cursor:pointer;min-height:28px;font-weight:600}.billing-preference form{margin-top:18px;max-width:450px}.payment-preference-badge{display:inline-block;border:1px solid #d5dfcf;border-radius:20px;padding:4px 10px;background:#eef3e8;color:#334d33;font-size:.8rem;line-height:1.4}.hub-workspace details>summary{cursor:pointer}.hub-workspace details[open]>summary{margin-bottom:14px}.billing-total{font-size:1.5rem;font-weight:700;color:#334d33}.billing-line details>summary{font-size:.9rem}
.owner-walkthrough{position:fixed;bottom:20px;right:20px;width:min(420px,calc(100% - 32px));max-height:calc(100dvh - 40px);overflow:auto;z-index:90;border:1px solid #bfd0b6;border-radius:16px;background:#fffdf7;box-shadow:0 12px 50px #253f3133;padding:20px;color:#253f31}.owner-tour-toolbar{display:flex;align-items:center;gap:10px}.owner-tour-toolbar .eyebrow{font-size:.68rem;flex:1;margin:0}.owner-tour-toolbar button{border:0;background:transparent;color:#334d33;min-height:44px;padding:6px;font-size:.8rem;cursor:pointer}.owner-walkthrough h2{font-size:1.2rem;margin:14px 0 10px}.owner-walkthrough p{font-size:.92rem;line-height:1.55}.owner-tour-actions{display:flex;justify-content:space-between;gap:12px;margin-top:18px}.owner-tour-actions button{min-height:44px}.owner-tour-practice{background:#edf2e7;border-radius:10px;padding:14px;margin:14px 0}.owner-tour-practice button{background:white;border:1px solid #acbf9e;border-radius:8px;min-height:44px;padding:8px 14px;color:#253f31;cursor:pointer}.owner-tour-highlight{outline:3px solid #b68131!important;outline-offset:5px}.owner-tour-minimized{width:min(420px,calc(100% - 32px));padding:6px 16px}.owner-tour-active{padding-bottom:300px}
@media screen{.billing-preview-collapsed{display:none}}
@media screen and (max-width:650px){.billing-sections{margin-top:8px}.billing-sections a{padding:8px 20px}.owner-walkthrough{right:12px;bottom:12px;width:calc(100% - 24px);max-height:48dvh;padding:14px}.owner-tour-minimized{padding:4px 12px}.owner-tour-active{padding-bottom:48dvh}.billing-preference{padding:18px}.billing-columns{gap:10px}}
@media print{.owner-walkthrough{display:none!important}.owner-tour-highlight{outline:0!important}.owner-tour-active{padding-bottom:0}}
.invoice-support{margin-top:28px;padding-top:20px;border-top:1px solid #cdd9c8;display:grid;gap:20px}.invoice-payment-future{display:flex;align-items:center;gap:18px;break-inside:avoid}.invoice-payment-future img{width:112px;height:112px;flex:0 0 112px;image-rendering:pixelated}.invoice-support .invoice-kicker{font-size:.63rem;font-weight:800;letter-spacing:.14em;color:#596f4c;margin:0 0 6px}.invoice-support h3{font-family:D2ELora,Georgia,serif;text-transform:none;letter-spacing:-.015em;font-size:1.05rem;line-height:1.35;margin:0 0 6px;font-weight:500}.invoice-support p{margin:6px 0;line-height:1.5;font-size:.82rem}.invoice-support small{font-size:.7rem;line-height:1.45;display:block;color:#53654d}.invoice-referral{border-left:3px solid #b08c4e;padding:2px 0 2px 18px;break-inside:avoid}.invoice-payment-future small{word-break:break-word}.invoice-support+.invoice-copy-footer{margin-top:20px}
@media screen and (max-width:450px){.invoice-payment-future{align-items:start;gap:12px}.invoice-payment-future img{width:96px;height:96px;flex-basis:96px}.invoice-support h3{font-size:1rem}}
@media print{.invoice-support{margin-top:15px;padding-top:12px;gap:14px}.invoice-payment-future img{width:1.1in;height:1.1in;flex-basis:1.1in}.invoice-support .invoice-kicker{font-size:6.5pt}.invoice-support h3{font-size:10pt}.invoice-support p{font-size:8pt}.invoice-support small{font-size:7pt}.invoice-customer-copy{font-size:9pt}.invoice-copy-footer{margin-top:14px}}
/* Real block rows avoid Safari table fragmentation while preserving the shared customer projection. */
.invoice-print-lines{display:none}
@media print{.invoice-print-table{display:none}.invoice-print-lines{display:block;width:100%;font-size:9pt}.invoice-print-line{display:block;width:100%;box-sizing:border-box;border-bottom:1px solid #dce3da;page-break-inside:avoid;break-inside:avoid}.invoice-print-line>div{display:inline-block;box-sizing:border-box;vertical-align:top;width:18.333333%;padding:10px 6px;font-size:9pt;line-height:1.4}.invoice-print-line>div:first-child{width:45%}.invoice-print-label{display:block;margin-bottom:4px;font-size:6.5pt;line-height:1.2;color:#52624f}.invoice-print-line small{display:block;color:#52624f}.invoice-copy-totals{display:inline-block;box-sizing:border-box;width:400px;max-width:100%;vertical-align:top;margin:20px 0 20px max(0px,calc(100% - 400px));page-break-inside:avoid;break-inside:avoid}}

.invoice-copy-footer.invoice-billing-contact {
  background: #edf3e9;
  border: 1px solid #cbdac4;
  border-radius: 8px;
  color: #294426;
  padding: .75em 1em;
}
.invoice-billing-contact a {
  color: inherit;
  text-decoration: underline;
  overflow-wrap: anywhere;
}
.invoice-remit-totals{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,1fr);gap:28px;align-items:start;margin:22px 0}
.invoice-remit-totals .invoice-copy-totals{max-width:none;margin:0}
.invoice-remittance h3{margin:8px 0}.invoice-remittance p{font-size:.9rem;margin-top:8px}
.invoice-final-balance strong{color:#2d6537;font-size:1.2em}
@media screen and (max-width:650px){.invoice-remit-totals{grid-template-columns:1fr;gap:16px}}
@media print{.invoice-remit-totals{display:block;width:100%;break-inside:avoid;page-break-inside:avoid;margin:18px 0}.invoice-remittance{display:inline-block;vertical-align:top;width:43%;box-sizing:border-box}.invoice-remit-totals .invoice-copy-totals{display:inline-block;vertical-align:top;width:54%;max-width:none;margin:0 0 0 3%;box-sizing:border-box}.invoice-remittance p{font-size:9pt}.invoice-final-balance strong{print-color-adjust:exact;-webkit-print-color-adjust:exact}}

@media screen {
  .billing-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  .billing-actions :is(button, a), .billing-status-filters button {
    min-height: 44px;
  }
  .billing-actions > .primary, .billing-actions > .secondary {
    width: auto;
  }
  .billing-guide, .billing-detail, .billing-home-summary, .billing-search {
    margin-top: 18px;
  }
  .billing-guide {
    max-width: 44rem;
    scroll-margin-top: 16px;
  }
  .billing-guide[hidden], .billing-guide [hidden],
  .billing-preview-actions[hidden], .billing-issue-actions[hidden] {
    display: none;
  }
  .billing-guide h3 {
    margin: 16px 0;
    font-size: 1.05rem;
  }
  .billing-guide .field :is(input, select), .billing-detail .field :is(input, select), .billing-search .field :is(input, select) {
    min-width: 0;
    min-height: 44px;
    font-size: 1rem;
  }
  .billing-step-customer, .billing-receipt {
    background: #edf3e9;
    color: #294426;
    padding: .75em 1em;
    border-radius: 8px;
    overflow-wrap: anywhere;
  }
  .billing-guide form .billing-actions, .billing-detail form .billing-actions {
    margin-top: 16px;
  }
  .billing-field-error {
    display: block;
    color: #982e26;
    font-size: .9rem;
    line-height: 1.4;
  }
  .billing-field-error:empty, .billing-result-message:empty {
    display: none;
  }
  .billing-guide [aria-invalid="true"], .billing-detail [aria-invalid="true"] {
    border-color: #982e26;
  }
  .billing-home-summary .hub-metrics {
    margin-bottom: 14px;
  }
  .billing-home-summary .hub-metrics > div {
    gap: 6px;
    padding: 14px;
    background: #f2f5ef;
  }
  .billing-home-summary .hub-metrics strong {
    font-size: clamp(1.3rem, 3vw, 2rem);
    overflow-wrap: anywhere;
  }
  .billing-home-summary .billing-actions p {
    margin: 0;
  }
  .billing-search, .billing-preview-actions {
    scroll-margin-top: 16px;
  }
  .billing-invoice-list {
    display: grid;
    gap: 8px;
  }
  .billing-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(6rem, auto) auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #d8e1d4;
    border-radius: 10px;
  }
  .billing-list-item h3, .billing-list-item p {
    margin: 0;
    overflow-wrap: anywhere;
  }
  .billing-list-item p, .billing-list-amount span, .billing-result-count {
    font-size: .9rem;
    color: #52624f;
    line-height: 1.5;
  }
  .billing-list-amount {
    display: grid;
    gap: 3px;
    color: #294426;
    overflow-wrap: anywhere;
  }
  .billing-list-item a {
    min-height: 44px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
  }
  .billing-detail-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
  }
  .billing-detail-heading h2, .billing-detail-heading p {
    margin: 0;
  }
  .billing-detail-balance {
    display: grid;
    gap: 4px;
    color: #294426;
  }
  .billing-detail-balance strong {
    font: 700 clamp(1.6rem, 4vw, 2.5rem)/1.1 D2ELora, Georgia, serif;
    overflow-wrap: anywhere;
  }
  .billing-date-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 8px 16px;
    margin: 14px 0;
  }
  .billing-date-summary dt, .billing-status-label {
    color: #52624f;
    font-size: .88rem;
  }
  .billing-date-summary dd {
    margin: 3px 0 0;
    font-weight: 600;
  }
  .billing-detail-options {
    margin: 10px 0;
    border-top: 1px solid #d8e1d4;
  }
  .billing-detail-options > summary, .billing-more-filters > summary, .billing-advanced-invoice > summary, .billing-guide details > summary {
    min-height: 44px;
    padding: 12px 0;
    font-weight: 600;
  }
  .billing-preview-actions, .billing-issue-actions {
    margin: 16px 0;
  }
}
@media screen and (max-width: 650px) {
  .billing-home-actions, .billing-guide .billing-actions, .billing-detail .billing-actions {
    width: 100%;
  }
  .billing-home-actions > .primary {
    flex: 1 0 100%;
  }
  .billing-home-actions > .secondary {
    flex: 1 1 8rem;
  }
  .billing-home-summary .hub-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .billing-list-item {
    grid-template-columns: minmax(0, 1fr) minmax(5rem, auto);
  }
  .billing-list-item a {
    grid-column: 1 / -1;
  }
  .billing-guide .billing-columns, .billing-detail .billing-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media screen {
  .billing-customer-matches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0;
  }
  .billing-customer-match {
    display: grid;
    gap: 4px;
    min-height: 64px;
    padding: 12px 14px;
    text-align: left;
    border: 1px solid #d8e1d4;
    border-radius: 10px;
    color: #294426;
    background: #fffdf7;
    cursor: pointer;
    overflow-wrap: anywhere;
  }
  .billing-customer-match span { font-size: .88rem; color: #52624f; }
  .billing-customer-match:hover, .billing-customer-match:focus-visible {
    background: #edf3e8;
    border-color: #4c6941;
  }
  #simple-work-step { margin-top: 20px; padding-top: 16px; border-top: 1px solid #d8e1d4; }
  .billing-customer-library > summary { min-height: 44px; padding: 12px 0; font-weight: 600; }
}
@media screen and (max-width: 650px) {
  .billing-customer-matches { grid-template-columns: minmax(0, 1fr); }
}

.route-week-table{width:100%;border-collapse:collapse;text-align:left}.route-week-table th,.route-week-table td{padding:10px 8px;border-bottom:1px solid #dfe6d9}.route-week-table thead{color:#4c614e}

.route-unplaced{color:#76520e;background:#fff4d4;padding:6px 10px;border-radius:6px;display:inline-block;font-size:.85rem}

/* Printed invoices should not retain the screen workspace minimum height. */
@media print{html:has(#invoice-customer-copy),body:not(.invoice-print-active):has(#invoice-customer-copy),body:not(.invoice-print-active):has(#invoice-customer-copy) main,body:not(.invoice-print-active):has(#invoice-customer-copy) .hub-workspace{height:auto!important;min-height:0!important;overflow:visible!important}}

/* The unsaved invoice uses the exact shared customer renderer beside its editor. */
@media screen {
 .billing-guide.billing-live-template{max-width:none}
 .billing-composer{display:grid;grid-template-columns:minmax(280px, .8fr) minmax(0, 1.35fr);gap:28px;align-items:start}
 .billing-composer-fields,.billing-live-preview{min-width:0}
 .billing-live-preview{background:#eef2e9;border:1px solid #d4dfd1;border-radius:12px;padding:16px}
 .billing-preview-heading h3{margin:0 0 8px}
 .billing-live-preview .invoice-customer-copy{margin:14px 0 0;padding:24px;font-size:.85rem;max-width:none}
 .billing-live-preview .invoice-copy-title{gap:12px}
 .billing-live-preview .invoice-letterhead{gap:14px}
 .billing-live-preview .invoice-remit-totals{gap:18px}
 .billing-live-preview .invoice-copy-totals p{gap:12px}
 .billing-live-preview .invoice-print-table{font-size:.8rem}
 .billing-live-preview .invoice-print-table th,.billing-live-preview .invoice-print-table td{padding:9px 6px}
 .billing-live-preview .invoice-payment-future img{width:84px;height:84px;flex-basis:84px}
}
@media screen and (max-width:1100px){.billing-composer{grid-template-columns:minmax(0,1fr)}.billing-live-preview .invoice-customer-copy{max-width:850px;margin:14px auto 0}}
@media screen and (max-width:650px){.billing-live-preview{padding:10px}.billing-live-preview .invoice-customer-copy{padding:18px 12px}.billing-live-preview .invoice-remit-totals{gap:12px}}
@media screen and (min-width:1101px){.billing-live-preview{position:sticky;top:16px;max-height:calc(100dvh - 32px);overflow:auto}}

/* One task per screen, with the next action visible. */
.billing-progress{display:flex;flex-wrap:wrap;gap:10px;list-style:none;padding:0;margin:0 0 22px;font-size:.85rem;color:#63715e}
.billing-progress li{padding:9px 13px;border-radius:8px;background:#f1f4ed}
.billing-progress [aria-current="step"]{background:#335831;color:#fff;font-weight:700}
.billing-due-shortcuts{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:4px 0 18px;font-size:.85rem}
.billing-due-shortcuts .secondary{min-height:36px;padding:7px 10px;font-size:.85rem}
.billing-next-step{padding:14px 16px;background:#eef4e9;border-left:4px solid #42673c;border-radius:5px;line-height:1.5}
.billing-final-review{max-width:850px;margin-inline:auto}
.billing-final-review .billing-line{padding:12px 0 18px}
.billing-final-review #billing-issue-actions{position:sticky;bottom:0;background:#fff;padding:16px 0;border-top:1px solid #d5dfd0;z-index:1}
.billing-office-tools{margin-top:28px}
.billing-office-tools>summary{font-size:.95rem;color:#52624f}
@media screen and (max-width:650px){.billing-progress{gap:6px}.billing-progress li{padding:8px;font-size:.75rem}.billing-due-shortcuts{gap:6px}.billing-final-review #billing-issue-actions{position:static}.billing-final-review #billing-issue-actions>button{width:100%}}
@media print{.billing-progress,.billing-next-step{display:none!important}}
@media screen{
 .billing-home-summary{padding:12px 20px}
 .billing-home-summary .hub-metrics{display:flex;gap:26px;margin:0}
 .billing-home-summary .hub-metrics>div{display:flex;flex-direction:row;align-items:baseline;gap:8px;padding:0;background:transparent;border:0}
 .billing-home-summary .hub-metrics strong{font-size:1.1rem}
 .billing-home-summary p{margin:8px 0 0;font-size:.85rem}
}
@media screen and (min-width:1101px){#simple-jump-preview{display:none}}

.billing-service-row{border:1px solid #d5dfd0;border-radius:10px;padding:16px;margin:16px 0;min-width:0}
.billing-service-row legend{padding:0 8px;font-size:.9rem;font-weight:700;color:#375533}
.billing-service-row .billing-columns{margin-bottom:0}
#simple-add-line{margin:4px 0 10px}
@media screen and (max-width:650px){.billing-service-row{padding:12px}.billing-service-row .billing-columns{grid-template-columns:1fr}}

.billing-service-dates{min-width:0}
.billing-date-entry{display:flex;align-items:center;gap:8px;min-width:0}
.billing-date-entry>.field{flex:1;min-width:0;margin-bottom:8px}
.billing-date-entry>.text-button{flex:0 0 auto;font-size:.8rem}
.billing-service-dates>[data-add-service-date]{font-size:.85rem;padding:5px 0;min-height:36px}
.invoice-fuel-surcharge{color:#34552e;padding-top:8px;border-top:1px solid #d4dfcf}
@media screen and (max-width:650px){.billing-date-entry{align-items:end}.billing-date-entry>.text-button{padding:8px 0;margin-bottom:8px}}

/* One measured Letter sheet for both staff and customer Print / Save PDF.
   The same rules measure offscreen and print, independently of phone layouts.
   Nothing is clipped: long copies are tightened, then uniformly scaled to fit. */
#invoice-print-sheet{position:fixed;left:-20000px;top:0;visibility:hidden;pointer-events:none;display:block;width:7.5in;height:9.8in;margin:0;padding:0;border:0;box-sizing:border-box}
#invoice-print-sheet .invoice-customer-copy{position:absolute;left:0;top:0;display:flex!important;flex-direction:column;justify-content:space-between;gap:12px;box-sizing:border-box;max-width:none!important;margin:0!important;padding:0!important;border:0!important;background:white;color:#25372b;font:10pt/1.35 D2EPrintSans,Arial,sans-serif;font-variant-ligatures:none;transform-origin:top left;overflow:visible;overflow-wrap:anywhere}
#invoice-print-sheet .invoice-customer-copy>*{flex-shrink:0;min-width:0}
#invoice-print-sheet :is(p,h2,h3){margin:0;line-height:1.35}
#invoice-print-sheet .invoice-letterhead{gap:24px;align-items:center}
#invoice-print-sheet .invoice-letterhead img{width:160px;max-width:30%;height:auto}
#invoice-print-sheet .invoice-copy-title{margin:0;gap:12px}
#invoice-print-sheet .invoice-copy-title h2{font:500 18pt/1.2 D2EPrintSerif,Georgia,serif;letter-spacing:.055em}
#invoice-print-sheet .invoice-copy-title>strong{font-size:12pt}
#invoice-print-sheet .invoice-customer-copy h3{font:700 8pt/1.35 D2EPrintSans,Arial,sans-serif;letter-spacing:.035em;text-transform:uppercase;margin:0 0 5px}
#invoice-print-sheet .billing-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}
#invoice-print-sheet .billing-columns p+h3{margin-top:10px}
#invoice-print-sheet .billing-columns p+p{margin-top:6px}
#invoice-print-sheet .invoice-print-table{display:none!important}
#invoice-print-sheet .invoice-print-lines{display:block;width:100%;font-size:9pt}
#invoice-print-sheet .invoice-print-line{display:grid;grid-template-columns:minmax(0,43fr) minmax(0,23fr) minmax(0,17fr) minmax(0,17fr);width:100%;padding:0;border-bottom:1px solid #dce3da;box-sizing:border-box}
#invoice-print-sheet .invoice-print-line>div{display:block;width:auto;min-width:0;padding:9px 6px;font-size:9pt;line-height:1.35;box-sizing:border-box}
#invoice-print-sheet .invoice-print-line>div:last-child{text-align:right}
#invoice-print-sheet .invoice-print-label{display:block;font-size:6.5pt;line-height:1.2;margin:0 0 4px;color:#52624f}
#invoice-print-sheet .invoice-print-line:not(:first-child) .invoice-print-label{display:none}
#invoice-print-sheet .invoice-print-line small{display:block;color:#52624f}
#invoice-print-sheet .invoice-repeat-property{display:none!important}
#invoice-print-sheet .invoice-remit-totals{display:grid;grid-template-columns:minmax(0,43fr) minmax(0,54fr);gap:3%;width:100%;margin:0;align-items:start}
#invoice-print-sheet .invoice-remittance{display:block;width:auto}
#invoice-print-sheet .invoice-remittance p{font-size:9pt}
#invoice-print-sheet .invoice-copy-totals{display:block;width:auto;max-width:none;margin:0;font-size:10pt}
#invoice-print-sheet .invoice-copy-totals p{display:flex;justify-content:space-between;gap:16px;margin:0 0 6px}
#invoice-print-sheet .invoice-final-balance{padding-top:8px;border-top:2px solid #334d33}
#invoice-print-sheet .invoice-fuel-surcharge{padding-top:6px}
#invoice-print-sheet .invoice-support{display:grid;grid-template-columns:1fr;gap:12px;margin:0;padding-top:12px;border-top:1px solid #cdd9c8}
#invoice-print-sheet .invoice-payment-future{gap:14px}
#invoice-print-sheet .invoice-payment-future img{width:80px;height:80px;flex-basis:80px}
#invoice-print-sheet .invoice-support .invoice-kicker{font-size:6.5pt;line-height:1.2;letter-spacing:.12em;margin:0 0 4px}
#invoice-print-sheet .invoice-support h3{font:500 10pt/1.25 D2EPrintSerif,Georgia,serif;text-transform:none;letter-spacing:0;margin:0 0 4px}
#invoice-print-sheet .invoice-support p{font-size:8pt;line-height:1.3;margin:0 0 4px}
#invoice-print-sheet .invoice-support small{font-size:7pt;line-height:1.3}
#invoice-print-sheet .invoice-referral{padding:0 0 0 12px}
#invoice-print-sheet .invoice-copy-footer{font:7.5pt/1.35 D2EPrintSans,Arial,sans-serif;letter-spacing:0;margin:0;padding:8px 10px}
#invoice-print-sheet a{color:inherit;text-decoration:none}
#invoice-print-sheet[data-density="compact"] .invoice-customer-copy{gap:6px;font-size:9pt;line-height:1.25}
#invoice-print-sheet[data-density="compact"] .invoice-print-line>div{padding:4px 5px;font-size:8.5pt;line-height:1.25}
#invoice-print-sheet[data-density="compact"] .invoice-print-label{font-size:6pt;margin-bottom:2px}
#invoice-print-sheet[data-density="compact"] .invoice-letterhead img{width:130px}
#invoice-print-sheet[data-density="compact"] .invoice-copy-title h2{font-size:15pt}
#invoice-print-sheet[data-density="compact"] .invoice-copy-totals{font-size:9pt}
#invoice-print-sheet[data-density="compact"] .invoice-copy-totals p{margin-bottom:4px}
#invoice-print-sheet[data-density="compact"] .invoice-support{grid-template-columns:1fr 1fr;gap:14px;padding-top:8px}
#invoice-print-sheet[data-density="compact"] .invoice-support>section:only-child{grid-column:1/-1}
#invoice-print-sheet[data-density="compact"] .invoice-payment-future{gap:9px}
#invoice-print-sheet[data-density="compact"] .invoice-payment-future img{width:64px;height:64px;flex-basis:64px}
#invoice-print-sheet[data-density="compact"] .invoice-support :is(p,small){font-size:7pt;line-height:1.25}
#invoice-print-sheet[data-density="compact"] .invoice-copy-footer{padding:5px 8px}
@media print{
 @page{size:letter portrait;margin:.5in}
 html:has(#invoice-print-sheet),body.invoice-print-active{display:block!important;width:auto!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important;background:white!important}
 body.invoice-print-active>:not(#invoice-print-sheet){display:none!important}
 body.invoice-print-active>#invoice-print-sheet{display:block!important;position:relative!important;left:0!important;top:0!important;visibility:visible!important;break-inside:avoid;page-break-inside:avoid;break-after:avoid;print-color-adjust:exact;-webkit-print-color-adjust:exact}
 #invoice-print-sheet .invoice-customer-copy{visibility:visible!important}
}

/* Address-first invoicing for a phone in the field. */
.field-billing{max-width:48rem;margin-inline:auto}
.field-tools,.field-review,.field-total,.field-place,.field-item{display:flex;align-items:center;gap:.8rem}
.field-tools,.field-total,.field-place{justify-content:space-between}
.field-tools button,.field-item,.field-place,.field-billing input{min-height:46px}
.field-place,.field-item{width:100%;text-align:left;padding:.85rem 1rem;margin:.45rem 0;border:1px solid #b8c6b5;border-radius:.65rem;background:#fff;color:#203626}
.field-place span:first-child,.field-item span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}
.field-place small,.field-item small,.field-total small{display:block;color:#475a49;font-weight:400}
.field-item b{margin-left:auto;font-size:.9rem}
.field-item[aria-pressed=true]{background:#eaf1df;border-color:#345e38}
.field-tick{display:grid;place-items:center;width:1.8rem;height:1.8rem;border:1px solid #83957c;border-radius:50%;flex:none}
.field-item:disabled{opacity:.7}.field-billing :focus{outline:3px solid #956221;outline-offset:2px}
.field-review{flex-wrap:wrap;border-top:1px solid #c9d2c4;margin-top:1rem;padding-top:1rem}
.field-review label{flex:1 1 11rem;min-width:0}.field-review input,.field-billing .field input{display:block;width:100%;max-width:100%;box-sizing:border-box}
.field-qty{display:flex;gap:.7rem;align-items:center;margin:.4rem 0 .85rem 1rem}.field-qty input{width:5rem}
.field-total{padding:1rem;background:#eaf1df;border-radius:.6rem;flex-wrap:wrap}.field-total strong{font-size:1.55rem}.field-total button{min-height:48px}.field-billing h1{overflow-wrap:anywhere}
#field-tip:not(:empty){padding:.75rem 1rem;border-left:4px solid #567a3b;background:#f1f5eb}

.billing-service-search { min-width: 0; }
.billing-service-results { display: grid; gap: 4px; margin: -4px 0 14px; }
.billing-service-results[hidden] { display: none; }
.billing-service-results button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #d5dfd0;
  border-radius: 8px;
  background: #f4f7f1;
  color: #263d25;
  text-align: left;
  overflow-wrap: anywhere;
}
.billing-service-results button:hover, .billing-service-results button:focus-visible {
  border-color: #42673c;
  background: #e9f1e5;
}
.billing-service-results small { display: block; margin-top: 2px; color: #52624f; }
@media screen and (max-width: 650px) {
  #simple-invoice-card { padding: 14px; }
  #simple-invoice-card .billing-columns { grid-template-columns: minmax(0, 1fr); }
  #simple-invoice-card :is(input:not([type="checkbox"]), select, textarea, button, summary) { min-height: 44px; }
  #simple-invoice-card :is(input, select, textarea, .billing-service-results button) {
    box-sizing: border-box;
    max-width: 100%;
    font-size: 1rem;
  }
  #simple-invoice-card .billing-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  #simple-save-draft, #simple-add-line, #simple-jump-preview { width: 100%; }
  #simple-invoice-card .billing-live-preview { overflow-wrap: anywhere; }
}

/* Invoice management and staff-only customer notes. */
.billing-account-link a,.billing-list-item h3 a{color:var(--green,#253f31);text-decoration:underline;text-underline-offset:.18em}
.billing-invoice-actions summary{cursor:pointer;font-weight:600;padding:.65rem 0}
.billing-invoice-actions .billing-actions{padding:.5rem 0}
.private-invoice-controls button{font:inherit;font-size:1rem;min-height:44px;padding:.8rem 1.2rem;border:1px solid #36552e;border-radius:.5rem;cursor:pointer}
.private-invoice-controls button.primary{color:#fff;background:#36552e}
.private-invoice-controls button.secondary{color:#203e2b;background:#fff}
@media screen and (max-width:600px){.private-invoice-controls.billing-actions>button{width:100%;flex-basis:100%}}
.customer-internal-note{border-bottom:1px solid #d9e2db;padding:.75rem 0}
.customer-internal-note p{margin:.2rem 0 .5rem}
#customer-staff-note{margin-top:1rem}
/* Monthly review stays in office tools; route completion stays easy to tap. */
.monthly-plan-row,.service-email-row{padding:1rem 0;border-bottom:1px solid #d5dfd2;overflow-wrap:anywhere}
.monthly-plan-row .check-field{align-items:flex-start;gap:.75rem}
.monthly-plan-row .check-field input{margin-top:.35rem;min-width:1.2rem;min-height:1.2rem}
.monthly-plan-row .text-button,.service-email-row .text-button{display:inline-block;margin-right:1rem}
.monthly-plan-group{margin-top:.75rem;border-top:1px solid #d5dfd2}
.monthly-plan-group>summary,.monthly-billing-details>summary{padding:.65rem 0;cursor:pointer;line-height:1.4}
.monthly-plan-group>summary{font-weight:700}
.monthly-billing-details{margin:.25rem 0 .5rem}
.monthly-billing-details p{margin:.4rem 0}
#monthly-plan-rows .billing-date-summary{display:flex;flex-wrap:wrap;gap:.5rem 1.5rem}
#monthly-plan-rows .billing-date-summary dd{margin:0}
.service-invoice-approval{padding:1rem;border:1px solid #cad7c6;border-radius:.75rem;background:#f4f8f1}
.route-complete-button{min-height:44px;padding:.7rem 1rem;font-size:1rem;white-space:normal}
.route-row-actions .route-complete-button{background:#2b4d35;color:white}
.route-row-actions .route-complete-button:hover{background:#203d29}
.route-stop-options>summary{min-height:44px;padding:.65rem .3rem;cursor:pointer}
.route-stop-options>div{display:flex;flex-wrap:wrap;gap:.4rem}
#route-complete-service [hidden]{display:none}
#route-completion-preview{margin:.75rem 0}
#route-completion-preview summary{padding:.6rem 0;cursor:pointer}
#route-email-body{white-space:pre-line;overflow-wrap:anywhere}
.private-invoice-page{margin:0;background:#eef3eb;color:#203e2b;font-size:1rem;line-height:1.55}
.private-invoice-main{max-width:980px;margin:auto;padding:1.5rem}
.private-invoice-header{display:flex;align-items:center;justify-content:space-between;gap:1.5rem}
.private-invoice-header img{max-width:180px;height:auto}
.private-invoice-main .invoice-customer-copy{max-width:none}
.private-invoice-controls{margin:1.25rem 0}
@media(max-width:600px){.private-invoice-main{padding:1rem}.private-invoice-header{display:block}.private-invoice-controls button{width:100%}.route-row-actions .route-complete-button{flex-basis:100%}}
@media print{.private-invoice-header,.private-invoice-controls,#private-invoice-status{display:none!important}.service-invoice-approval{display:none!important}}

/* Reserve the close button’s space on small invoice dialogs. */
@media screen{#hub-dialog-title{padding-right:2.25rem;overflow-wrap:anywhere}}

.invoice-share-tools .share-history{display:grid;gap:10px;margin:14px 0}
.invoice-share-tools .share-history article,.invoice-share-tools .share-summary{display:grid;gap:6px;border:1px solid #c8d4c5;border-radius:9px;padding:12px;overflow-wrap:anywhere}
.invoice-share-tools .share-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:stretch}
.invoice-share-tools button,.invoice-share-tools summary{min-height:44px}
.invoice-share-tools input{width:100%;min-width:0;box-sizing:border-box;font-size:16px}
.invoice-share-tools details{margin:12px 0}.invoice-share-tools details>summary{align-content:center}
@media(max-width:600px){.invoice-share-tools .share-controls{display:grid;grid-template-columns:1fr}}
