/* Option 2: compact sage fee rows above a live, paper-style quote preview. */
.quote-preview-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.quote-preview-actions button[hidden] { display:none; }
.preview.quote-preview { container-type:inline-size; }
.quote-preview>header { flex-wrap:wrap; align-items:center; padding:10px 0 14px; }
.quote-preview>header h2 { font-size:18px; }
.quote-preview-actions button { min-height:34px; padding:6px 10px; font-size:12px; white-space:nowrap; }
.quote-editor { padding:0; border:0; background:none; box-shadow:none; }
.quote-fees { padding:14px; border:1px solid #d8dfd1; border-radius:14px; background:#ffffffb3; }
.quote-fees-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.quote-fees-heading h3 { margin:0; font-size:16px; line-height:1.3; }
.quote-fees-heading .secondary { padding:5px 10px; min-height:32px; font-size:12px; white-space:nowrap; }
.quote-fee-table,.quote-document-table { width:100%; border-collapse:separate; border-spacing:0 4px; font-size:13px; table-layout:fixed; }
.quote-fee-table th,.quote-fee-table td { padding:6px 8px; background:#edf3e6; line-height:1.4; }
.quote-fee-table th { background:#dde9d0; font-weight:700; text-align:left; }
.quote-fee-table th:last-child,.quote-fee-table td:last-child,.quote-document-table th:last-child,.quote-document-table td:last-child { width:100px; text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.quote-fee-table tr>:first-child { border-radius:8px 0 0 8px; }
.quote-fee-table tr>:last-child { border-radius:0 8px 8px 0; }
.quote-fee-table tfoot th,.quote-fee-table tfoot td { font-weight:700; background:#dde9d0; }
.quote-fee-label { display:flex; align-items:center; gap:8px; font-weight:600; }
.quote-fee-label>span { overflow-wrap:anywhere; min-width:0; }
.remove-quote-fee { display:grid; place-items:center; border:0; border-radius:50%; background:#ffdbc7; color:#793c20; width:26px; height:26px; flex:none; padding:0; font:600 20px/1 'Segoe UI',sans-serif; }
.remove-quote-fee:hover { background:#f9c4a6; color:#54210b; }
.quote-update-hint { font-size:11px; color:#51664e; margin:8px 0 0; line-height:1.5; }
.quote-draft-status { display:flex; flex-direction:column; gap:4px; margin-top:8px; font-size:11px; line-height:1.5; color:#536650; }
#quoteDraftState { font-weight:700; }
#quoteSaveStatus:empty { display:none; }
#quoteFeeError { grid-column:1/-1; font-size:12px; margin:0; line-height:1.4; }
.quote-document { margin-top:16px; padding:22px 18px; border:1px solid #dcded8; background:#fff; box-shadow:0 3px 9px #263a2414; }
.quote-letterhead { display:flex; align-items:center; gap:10px; padding-bottom:12px; margin-bottom:16px; border-bottom:1px solid #7a9e65; color:#154b3e; font:22px/1.2 Georgia,serif; }
.quote-letterhead svg { width:26px; height:26px; flex:none; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.quote-document h2 { font:700 23px/1.2 Georgia,serif; margin:0 0 8px; }
.quote-prepared,.quote-service { font-size:12px; margin:4px 0; }
.quote-service { font-weight:700; margin-bottom:14px; }
.quote-document-table th { background:#e3edd8; text-align:left; padding:7px 8px; }
.quote-document-table td { padding:7px 8px; border-bottom:1px solid #e2e7dc; overflow-wrap:anywhere; }
.quote-document-table tfoot th,.quote-document-table tfoot td { background:#e3edd8; border:0; font-weight:700; }
.quote-document>p { font-size:12px; line-height:1.6; }
.quote-document .quote-document-note { color:#60705c; border-top:1px solid #c7d5bd; padding-top:12px; margin-top:20px; font-size:11px; }
.quote-empty { color:#5e7056; }
@container (min-width:500px) {
  .quote-preview-actions button { font-size:13px; padding:7px 14px; }
  .quote-fees { padding:16px; }
  .quote-document { padding:26px 30px; }
  .quote-letterhead { font-size:27px; }
  .quote-fee-table th:last-child,.quote-fee-table td:last-child,.quote-document-table th:last-child,.quote-document-table td:last-child { width:125px; }
}
@container (max-width:300px) {
  .quote-fees { padding:10px; }
  .quote-fees-heading { flex-wrap:wrap; }
  .quote-fee-table th:last-child,.quote-fee-table td:last-child,.quote-document-table th:last-child,.quote-document-table td:last-child { width:82px; }
  .quote-fee-table,.quote-document-table { font-size:12px; }
  .quote-fee-label { gap:5px; }
  .quote-document { padding:18px 10px; }
}
/* Batch fee picker: the quote changes only when Add Fees is clicked. */
.quote-send-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.quote-send-actions .primary { min-height:36px; padding:7px 14px; font-size:13px; }
.quote-document { margin-top:12px; }
.quote-fee-dialog { width:min(640px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); padding:0; border:1px solid #c5d4bd; border-radius:18px; background:#faf9f3; color:var(--ink); box-shadow:0 16px 64px #123d3330; }
.quote-fee-dialog::backdrop { background:#153d3547; }
.quote-fee-dialog form { display:flex; flex-direction:column; max-height:calc(100dvh - 42px); }
.fee-dialog-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:20px 22px 14px; border-bottom:1px solid #dce4d4; flex:none; }
.fee-dialog-heading h2 { margin:0 0 5px; font-size:22px; }
.fee-dialog-heading p { margin:0; font-size:13px; color:#536650; line-height:1.5; }
.fee-dialog-body { padding:18px 22px; overflow:auto; min-height:0; }
.standard-fees { border:0; padding:0; margin:0; min-width:0; }
.standard-fees legend,.custom-fees h3 { padding:0; font-size:16px; font-weight:700; }
.fee-catalog-note { font-size:12px; color:#64745c; margin:5px 0 12px; }
.standard-fee { display:flex; align-items:center; gap:12px; padding:10px 12px; margin:6px 0; border:1px solid #dce5d4; border-radius:10px; background:#edf4e6; font-size:13px; cursor:pointer; }
.standard-fee input { width:17px; height:17px; accent-color:#176950; flex:none; }
.standard-fee>span { flex:1; min-width:0; font-weight:600; }
.standard-fee small { display:block; font-size:11px; color:#64765d; margin-top:2px; }
.standard-fee strong { font-size:13px; font-variant-numeric:tabular-nums; }
.standard-fee:has(input:checked) { border-color:#6c9c69; background:#dfedce; }
.standard-fee.already-added { background:#f2f4ee; color:#687961; cursor:default; }
.custom-fees { margin-top:20px; }
.custom-fees-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.custom-fees h3 { margin:0; }
.custom-fees-heading .secondary { font-size:12px; padding:6px 10px; }
.custom-fee-row { display:grid; grid-template-columns:minmax(0,1fr) 130px 28px; align-items:end; gap:10px; padding:12px; margin:8px 0; background:white; border:1px solid #dde5d6; border-radius:12px; }
.custom-fee-row label { display:grid; gap:5px; min-width:0; font-size:12px; font-weight:600; }
.custom-fee-row input { width:100%; font-size:13px; }
.custom-fee-row input[aria-invalid=true] { border-color:#a54b2f; }
.custom-fee-row .remove-quote-fee { margin-bottom:5px; }
.fee-dialog-footer { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; padding:14px 22px; border-top:1px solid #d7e1cf; background:#edf3e6; flex:none; }
.fee-dialog-footer p { margin:0; font-size:13px; font-weight:600; }
.fee-dialog-footer>div { display:flex; gap:8px; margin-left:auto; }
.fee-dialog-footer button:disabled { opacity:.5; cursor:default; }
.quote-fee-dialog .error:empty { display:none; }
.quote-fee-dialog .error { font-size:13px; line-height:1.5; margin:12px 0 0; }
@media(max-width:480px) {
  .fee-dialog-heading { padding:16px; }
  .fee-dialog-body { padding:14px 16px; }
  .fee-dialog-footer { padding:12px 16px; }
  .custom-fee-row { grid-template-columns:minmax(0,1fr) 28px; }
  .custom-fee-row label { grid-column:1; }
  .custom-fee-row .remove-quote-fee { grid-column:2; grid-row:1/3; align-self:center; }
  .custom-fees-heading { flex-wrap:wrap; }
}
