.r37-quote-list,.r37-invoice-list,.r37-billing-review{display:grid;gap:8px;margin-top:10px}.r37-quote-card,.r37-invoice-card,.r37-billing-client{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}.r37-quote-card>summary,.r37-invoice-card>summary{list-style:none;cursor:pointer;padding:11px 13px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center}.r37-invoice-card>summary{grid-template-columns:minmax(0,1fr) auto auto}.r37-quote-card>summary::-webkit-details-marker,.r37-invoice-card>summary::-webkit-details-marker{display:none}.r37-quote-card summary>div,.r37-invoice-card summary>div{display:grid;gap:2px}.r37-quote-card summary>div:last-child,.r37-invoice-card summary>div:nth-child(n+2){text-align:right}.r37-quote-card summary span,.r37-invoice-card summary span,.r37-quote-card summary small,.r37-invoice-card summary small{font-size:.76rem;color:var(--muted)}.r37-quote-detail,.r37-invoice-detail{border-top:1px solid var(--line);padding:12px 13px;background:#fafcfb}.r37-quote-lines,.r37-invoice-lines{display:grid}.r37-quote-lines>div,.r37-invoice-lines>div{display:grid;grid-template-columns:minmax(0,1fr) 150px 110px;gap:10px;padding:7px 0;border-top:1px solid #e7ede9;font-size:.77rem}.r37-quote-lines>div:first-child,.r37-invoice-lines>div:first-child{border-top:0}.r37-quote-lines>div>:nth-child(n+2),.r37-invoice-lines>div>:nth-child(n+2){text-align:right}.r37-quote-gate{display:flex;gap:8px;flex-wrap:wrap;padding:9px 0}.r37-quote-gate span{background:#fff5dd;border:1px solid #ecd394;border-radius:8px;padding:6px 8px;font-size:.75rem}.r37-billing-client>header{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:11px 12px;border-bottom:1px solid var(--line)}.r37-billing-client>header div{display:grid}.r37-billing-client>header span{font-size:.75rem;color:var(--muted)}.r37-reconcile{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:9px 12px;background:#f7faf8}.r37-reconcile span{font-size:.72rem;color:var(--muted)}.r37-reconcile strong{display:block;color:var(--ink);margin-top:2px}.r37-fact-list{padding:0 12px}.r37-fact{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:9px 0;border-top:1px solid #e8eeea}.r37-fact:first-child{border-top:0}.r37-fact>div{display:grid}.r37-fact span,.r37-fact small{font-size:.72rem;color:var(--muted)}.r37-fact>label{font-size:.68rem;color:var(--muted);display:grid;gap:2px}.r37-fact input{width:105px;border:1px solid var(--line);border-radius:7px;padding:6px}.r37-billing-client>footer{padding:8px 12px;background:#fafcfb;font-size:.7rem;color:var(--muted);border-top:1px solid var(--line)}.r37-excluded-list>div{display:grid;grid-template-columns:180px 1fr auto;gap:10px;padding:7px 0;border-top:1px solid #e7ede9;font-size:.75rem}.r37-excluded-list small{color:var(--muted)}.r37-invoice-card.danger{border-color:#efc3bf}.r37-invoice-totals{display:flex;justify-content:flex-end;gap:16px;flex-wrap:wrap;padding:10px 0;font-size:.77rem}.r37-payment-list{display:grid;margin-top:8px}.r37-payment-list>div{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:9px 0;border-top:1px solid #e7ede9}.r37-payment-list span{display:grid}.r37-payment-list small{font-size:.72rem;color:var(--muted)}.r37-payment-list .reversed{opacity:.55;text-decoration:line-through}.r37-statement-controls{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.r37-statement-controls label{display:grid;gap:3px;font-size:.7rem;color:var(--muted)}.r37-statement-controls select,.r37-statement-controls input{min-height:36px;border:1px solid var(--line);border-radius:8px;background:#fff;padding:6px 8px}.r37-statement{border:1px solid var(--line);border-radius:10px;overflow:hidden}.r37-statement header,.r37-statement footer{display:flex;justify-content:space-between;padding:10px;background:#f7faf8}.r37-statement>div{display:grid;grid-template-columns:100px minmax(0,1fr) 100px 100px 110px;gap:8px;padding:7px 10px;border-top:1px solid #e8eeea;font-size:.73rem}.r37-statement>div>:nth-child(n+3){text-align:right}

/* R45 — Billing is a client story, not a database dump. */
.billing-r45 .r45-review-guide-hidden{display:none}.r45-review-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-end;margin:18px 0 14px}.r45-review-head h2{margin:2px 0 5px;font-size:1.35rem}.r45-review-head p{margin:0;max-width:720px;color:var(--muted);font-size:.88rem;line-height:1.45}.r45-review-count{min-width:120px;padding:10px 14px;border-radius:14px;background:#edf6f0;display:grid;text-align:center}.r45-review-count strong{font-size:1.4rem;line-height:1;color:#0f6246}.r45-review-count span{font-size:.72rem;color:var(--muted);margin-top:4px}.r45-billing-story-list{display:grid;gap:16px}.r45-story-card{background:#fff;border:1px solid #dce7e0;border-radius:16px;box-shadow:0 5px 18px rgba(22,57,43,.06);overflow:hidden}.r45-story-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;padding:17px 18px 15px}.r45-client-kicker{font-size:.69rem;font-weight:800;text-transform:uppercase;letter-spacing:.07em;color:#547164}.r45-story-header h3{font-size:1.06rem;margin:2px 0 3px}.r45-story-header p{margin:0;color:var(--muted);font-size:.76rem}.r45-story-total{display:grid;justify-items:end;gap:3px}.r45-story-total>span{font-size:.7rem;color:var(--muted)}.r45-story-total>strong{font-size:1.18rem;color:#103f2d}.r45-story-total .button{margin-top:4px}.r45-contract-story{margin:0 18px 12px;padding:13px 14px;border:1px solid #dce8df;border-radius:13px;background:linear-gradient(180deg,#f7fbf8,#f3f8f5)}.r45-contract-title{display:flex;justify-content:space-between;gap:18px;align-items:center}.r45-contract-title>div{display:grid;gap:2px}.r45-contract-title span{font-size:.7rem;text-transform:uppercase;letter-spacing:.06em;font-weight:800;color:#607a6e}.r45-contract-title strong{font-size:.9rem}.r45-contract-title>b{font-size:.78rem;color:#0f6246;background:#e5f3ea;border-radius:999px;padding:5px 8px}.r45-contract-progress{height:6px;border-radius:999px;background:#dfe9e3;margin:10px 0 9px;overflow:hidden}.r45-contract-progress>span{display:block;height:100%;border-radius:inherit;background:#2f7c5d}.r45-contract-stats{display:flex;flex-wrap:wrap;gap:7px}.r45-contract-stats>span{display:inline-flex;gap:4px;align-items:center;padding:4px 7px;border-radius:8px;background:#fff;border:1px solid #e0e8e3;font-size:.69rem;color:#5d7167}.r45-contract-stats b{color:#243f33}.r45-contract-stats .done{background:#edf8f1}.r45-contract-stats .charge{background:#fff7e8;border-color:#efdeb8}.r45-contract-story>p{margin:9px 0 0;color:#60756a;font-size:.72rem}.r45-contract-story>p strong{color:#a76613}.r45-story-section{border-top:1px solid #e7eee9;padding:0 18px}.r45-extras-section{background:#fcfdfc}.r45-section-label{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:11px 0 7px}.r45-section-label strong{font-size:.78rem}.r45-section-label span{font-size:.69rem;color:var(--muted)}.r45-story-item{display:grid;grid-template-columns:24px 34px minmax(0,1fr) minmax(140px,auto);gap:10px;align-items:center;padding:10px 0;border-top:1px solid #edf1ee}.r45-include{display:grid;place-items:center}.r45-include input{width:17px;height:17px;accent-color:#146445}.r45-item-icon{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;font-weight:900;font-size:.78rem;background:#eaf5ee;color:#0f6246}.r45-story-item.cancelled .r45-item-icon{background:#fff2dd;color:#9a5a08}.r45-story-item.extra-routine .r45-item-icon,.r45-story-item.additional .r45-item-icon{background:#eaf2ff;color:#315f9d}.r45-story-item.quoted .r45-item-icon{background:#fff3c8;color:#765d00}.r45-item-copy{display:grid;gap:2px;min-width:0}.r45-item-copy>span{font-size:.68rem;font-weight:750;color:#65786e}.r45-item-copy>strong{font-size:.82rem;white-space:normal}.r45-item-copy>small{font-size:.69rem;color:var(--muted);line-height:1.35}.r45-item-money{display:grid;justify-items:end}.r45-item-money>strong{font-size:.83rem}.r45-item-money>small{font-size:.66rem;color:#8a6c13;margin-top:2px}.r45-item-money label{display:grid;justify-items:end;gap:3px;font-size:.64rem;color:var(--muted)}.r45-item-money label span{display:flex;align-items:center;gap:5px;font-size:.72rem;color:var(--ink)}.r45-item-money input{width:92px;padding:6px 7px;border:1px solid #cfdcd4;border-radius:8px;background:#fff;font:inherit}.r45-item-money input:focus{outline:2px solid rgba(24,112,78,.16);border-color:#4f8c71}.r45-story-footer{display:flex;justify-content:space-between;gap:18px;padding:10px 18px;background:#f8faf9;border-top:1px solid #e7eee9;font-size:.69rem;color:var(--muted)}.r45-story-footer strong{color:#506b5e}.r45-excluded{margin-top:18px;border:1px solid #e0e8e3;border-radius:14px;background:#fafcfb;overflow:hidden}.r45-excluded>summary{list-style:none;cursor:pointer;padding:12px 15px;display:flex;justify-content:space-between;align-items:center;font-size:.78rem}.r45-excluded>summary::-webkit-details-marker{display:none}.r45-excluded>summary strong{min-width:28px;text-align:center;border-radius:999px;background:#e8efeb;padding:4px 7px}.r45-excluded-list{padding:0 15px 10px}.r45-excluded-list>div{display:grid;grid-template-columns:76px minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:8px 0;border-top:1px solid #e8eeea;font-size:.72rem}.r45-excluded-list>div>div{display:grid}.r45-excluded-list small{color:var(--muted)}.r45-excluded-list b{font-size:.66rem;color:#6c7c74;font-weight:700}.billing-r45 .r37-invoice-card{border-radius:14px;box-shadow:0 3px 12px rgba(22,57,43,.04)}.billing-r45 .r37-invoice-detail{background:#fbfcfb}.billing-r45 .page-subtabs{margin-top:12px}
/* R45 invoice register: connect the document back to the work story at a glance. */
.billing-r45 .r37-invoice-card.r45-invoice-draft{border-left:4px solid #6a9f83}.billing-r45 .r37-invoice-card>summary{padding:14px 15px}.r45-invoice-storyline{display:grid!important;gap:5px!important;margin-top:5px;max-width:720px}.r45-invoice-storyline>small{font-size:.7rem!important;line-height:1.35;color:#60756a!important;white-space:normal}.r45-invoice-story-chips{display:flex!important;flex-wrap:wrap;gap:5px}.r45-invoice-story-chips b{display:inline-flex;padding:3px 6px;border-radius:999px;background:#edf5f0;color:#315b48;font-size:.62rem;line-height:1.2}.r45-line-kind{display:inline-flex;margin-right:7px;padding:2px 6px;border-radius:999px;background:#edf5f0;color:#315b48;font-size:.6rem;vertical-align:1px}.r45-line-kind.additional{background:#eaf2ff;color:#315f9d}.r45-line-kind.quoted{background:#fff3c8;color:#765d00}.r45-line-kind.cancellation{background:#fff2dd;color:#9a5a08}.r45-line-kind.manual{background:#f0f1f0;color:#5f6863}
@media(max-width:800px){.r37-quote-card>summary,.r37-invoice-card>summary{grid-template-columns:1fr}.r37-quote-card summary>div:last-child,.r37-invoice-card summary>div:nth-child(n+2){text-align:left}.r37-reconcile{grid-template-columns:1fr 1fr}.r37-fact{grid-template-columns:1fr}.r37-quote-lines>div,.r37-invoice-lines>div{grid-template-columns:1fr auto}.r37-quote-lines>div>:last-child,.r37-invoice-lines>div>:last-child{grid-column:1/-1;text-align:right}.r37-statement>div{grid-template-columns:75px 1fr auto}.r37-statement>div>:nth-child(3),.r37-statement>div>:nth-child(4){display:none}.r45-review-head,.r45-contract-title,.r45-story-footer{align-items:flex-start;flex-direction:column}.r45-story-header{grid-template-columns:1fr}.r45-story-total{justify-items:start}.r45-story-item{grid-template-columns:24px 34px minmax(0,1fr)}.r45-item-money{grid-column:3;justify-items:start}.r45-item-money label{justify-items:start}.r45-section-label{display:grid}.r45-excluded-list>div{grid-template-columns:70px 1fr}.r45-excluded-list>div>:nth-child(n+3){grid-column:2}}
