.billing-safety{margin:0 0 1.5rem;background:#fff4d8;border-color:#eddfb2;color:#7a5c1b}
.billing-safety p{margin:.35rem 0 0}
.billing-intro{display:flex;align-items:center;justify-content:space-between;gap:1.25rem;margin:0 0 1.25rem}
.billing-intro h2{margin:.25rem 0;font-size:1.4rem}
.billing-intro p:last-child{margin:.35rem 0;color:var(--muted,#718391)}
.billing-workflows{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.25rem;align-items:start}
.billing-panel,.billing-documents{overflow:hidden}
.billing-toolbar{padding:0 1.25rem 1rem}
.billing-filters{display:grid;grid-template-columns:minmax(130px,.8fr) minmax(170px,1.2fr);gap:.75rem;padding:0 1.25rem 1rem}
.billing-filters label{display:grid;gap:.35rem;font-weight:600;color:var(--ink,#233b45)}
.billing-filters input,.billing-filters select{min-width:0;width:100%}
.billing-help{margin:0 1.25rem 1rem;padding:.8rem 1rem;border-radius:.7rem;background:#f0f7f6;color:#526d74;font-size:.92rem}
.billing-table{width:100%;border-collapse:collapse}
.billing-table th,.billing-table td{padding:.8rem .9rem;border-bottom:1px solid #e7edef;text-align:left;vertical-align:middle}
.billing-table thead th{background:#f7f9fa;color:#758691;font-size:.84rem;font-weight:650;white-space:nowrap}
.billing-table td small,.billing-table th small{display:block;margin-top:.2rem;color:#7e8e98;font-size:.83rem;font-weight:400}
.billing-table td.number,.billing-table th.number{text-align:right;white-space:nowrap}
.billing-table input[type=checkbox]{width:1.15rem;height:1.15rem;accent-color:#0e4650}
.billing-table tfoot th{background:#f2f7f7;font-weight:700}
.billing-row-actions{display:grid;gap:.4rem;justify-items:start}
.billing-create-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 1.25rem}
.billing-create-row small{color:#718391}
.billing-documents{margin-top:1.25rem}
.billing-documents .panel-title{padding:1.1rem 1.25rem}
.billing-documents .table-scroll{max-height:42rem}
.billing-review{max-height:min(72vh,850px);overflow:auto}
.billing-review h3{margin:1.25rem 0 .4rem}
.billing-review dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem;margin:1rem 0}
.billing-review dl div{padding:.75rem;border-radius:.65rem;background:#f3f7f8}
.billing-review dt{font-size:.82rem;color:#718391}
.billing-review dd{margin:.2rem 0 0;font-weight:700}
.billing-line-list{margin:.5rem 0;padding-left:1.25rem}
.billing-line-list li{padding:.28rem 0}
.billing-reconcile{margin-top:1rem;padding:.8rem 1rem;border:1px solid #e1e8eb;border-radius:.7rem}
.billing-reconcile summary{cursor:pointer;font-weight:650}
.billing-review .payment-line{display:flex;align-items:center;gap:.75rem;padding:.55rem 0;border-bottom:1px solid #edf0f1}
.billing-review .payment-line>span{flex:1}
@media(max-width:1100px){.billing-workflows{grid-template-columns:1fr}}
@media(max-width:650px){.billing-intro{align-items:flex-start;flex-direction:column}.billing-create-row{align-items:flex-start;flex-direction:column}.billing-filters{grid-template-columns:1fr}.billing-review dl{grid-template-columns:1fr}.billing-table th,.billing-table td{padding:.65rem .55rem}}

.source-billing-panel{margin-top:24px}.source-billing-panel .search{max-width:520px;margin:16px 0}.source-billing-panel table{min-width:700px}

.source-invoice-detail .table-scroll{margin:16px 0}.source-invoice-detail .table-scroll table{width:100%;min-width:0;table-layout:fixed}.source-invoice-detail th,.source-invoice-detail td{padding:12px 8px;white-space:normal;overflow-wrap:anywhere}.source-invoice-detail th:first-child{width:44%}.source-invoice-detail th:last-child,.source-invoice-detail td:last-child{text-align:right}.source-invoice-detail>p{line-height:1.5;margin:6px 0}

.billing-irpf-option{align-self:start;border:1px solid #e1e8eb;border-radius:.7rem;padding:.8rem 1rem}.billing-irpf-option summary{cursor:pointer;color:var(--muted,#718391);font-weight:600}.billing-irpf-option[open] summary{margin-bottom:.75rem}.billing-irpf-option small{display:block;margin-top:.4rem;font-weight:400;line-height:1.5}

.source-issuer-panel{display:flex;align-items:center;gap:20px;margin-bottom:24px}.source-issuer-panel img,.invoice-issuer-logo{object-fit:contain;border-radius:6px}.source-issuer-panel h2{font-size:1.3rem;margin:0}.source-issuer-panel p{margin:.4rem 0}.billing-source-selector{display:grid;gap:6px;max-width:600px;margin-bottom:20px}.source-issuer-panel img{flex-shrink:0}
.source-history-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}.source-history-groups span{display:flex;flex-direction:column;gap:5px;padding:15px;border:1px solid #dce7e5;border-radius:10px;background:#f5faf9;color:#4f6870;font-size:13px}.source-history-groups strong{font-size:25px;color:#123f48}.source-history-filters{display:flex;align-items:end;flex-wrap:wrap;gap:16px;margin:12px 0}.source-history-filters .search{flex:1;max-width:none;margin:0}.source-history-filters>label:last-child{min-width:210px}.source-history-filters select{width:100%}
@media(max-width:650px){.source-history-groups{grid-template-columns:1fr}.source-history-filters{display:grid}.source-history-filters>label:last-child{min-width:0}}
.source-candidates{margin:22px 0;padding:16px;border:1px solid #dce7e5;border-radius:10px;background:#f5faf9}.source-candidates h3{margin:0 0 8px}.source-candidates p{font-size:13px;line-height:1.6}.source-candidates details{margin-top:14px}.source-candidates summary{cursor:pointer;font-weight:650}.source-candidates .table-scroll{max-height:350px;overflow:auto}.source-invoice-detail .source-candidates .table-scroll table{min-width:560px;table-layout:auto}
