.payment-history-dialog{width:min(980px,calc(100vw - 28px));max-height:92dvh;padding:0;border:0;border-radius:16px;color:var(--ink);overscroll-behavior:contain}.payment-history-dialog .dialog-header{position:sticky;top:0;background:white;z-index:1}.payment-history-dialog h2{margin:0;font-size:20px}.payment-history-body{padding:18px 24px}.payment-history-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 0;border-bottom:1px solid #e2e8f1}.payment-history-row p{margin:6px 0}.batch-export-rows{max-height:40dvh;overflow:auto;overscroll-behavior:contain}.batch-export-row{padding:12px 0;border-bottom:1px solid #e2e8f1;display:grid;grid-template-columns:1fr auto;gap:7px 16px;overflow-wrap:anywhere}.batch-export-row small{grid-column:1/-1}.batch-export-row>span{font-weight:700}.batch-export-row>button{justify-self:start}.payment-history-body .row-actions{margin:14px 0;flex-wrap:wrap}#paymentExportBar small{display:block;margin-top:4px}#paymentExportRows strong{font-size:14px}@media(max-width:600px){.payment-history-body{padding:12px 16px}.payment-history-row{align-items:flex-start;flex-direction:column;gap:10px}.batch-export-row{grid-template-columns:1fr}.batch-export-row small{grid-column:auto}#paymentExportBar{flex-wrap:wrap}#paymentMethodFilter{max-width:100%}}
.payment-history-body .row-actions{display:flex;gap:8px;white-space:normal}.payment-history-body h3,.payment-history-row strong{overflow-wrap:anywhere}.payment-history-body button{max-width:100%}
/* Financial review: completed ledger entries and upstream payment results are distinct. */
.review-history-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.review-history-tabs button[aria-pressed=true]{border-color:#4168dc;background:#edf3ff;color:#244fc8}.payment-history-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 24px;padding:18px;border:1px solid #e0e7f1;border-radius:10px;margin:12px 0}.batch-identity{min-width:0}.batch-identity p{margin:6px 0}.batch-figures{display:grid;gap:4px;text-align:right;align-content:start}.batch-figures strong{font-size:22px;font-variant-numeric:tabular-nums}.batch-completion{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;font-size:12px}.batch-completion progress{width:100%;height:6px;accent-color:#2b956b}.payment-history-card>button{align-self:end}.receipt-batch-status.completed{background:#e6f5ed;color:#216b4c}.review-source{margin:12px 0;font-size:12px;color:#61728d;overflow-wrap:anywhere}.review-source summary{cursor:pointer;padding:5px 0}.review-source p{line-height:1.7}.review-empty{padding:24px;text-align:center;background:#f7f9fc;border:1px dashed #d7e0ed;border-radius:8px;color:#6a7e99}.receipt-overview{padding:0 0 12px}.receipt-overview>strong{font-size:19px}.receipt-overview p{margin:7px 0 0}.review-status-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.review-status-card{display:grid;text-align:left;gap:7px;padding:13px;border:1px solid #dae3f1;border-radius:9px;background:#f7f9fc;color:#52647f;cursor:pointer}.review-status-card>span{font-size:11px}.review-status-card strong{font-size:24px;font-variant-numeric:tabular-nums}.review-status-card small{font-size:12px;font-variant-numeric:tabular-nums}.review-status-card.ready{color:#315aca;background:#f1f5ff}.review-status-card.applied{color:#23734d;background:#f0f9f3}.review-status-card.failed{color:#b33f42;background:#fff4f3}.review-status-card.unmatched{color:#956316;background:#fff9ed}.review-status-card[aria-pressed=true]{border-color:currentColor;box-shadow:inset 0 0 0 1px currentColor}.review-status-card:focus-visible{outline:2px solid #315bd6;outline-offset:3px}.receipt-result-group{margin:18px 0;border:1px solid #dde5ef;border-radius:10px;padding:16px}.receipt-result-group[hidden]{display:none}.review-group-heading{display:flex;gap:12px;justify-content:space-between;align-items:center}.review-group-heading h3{margin:0;font-size:15px}.review-group-count{font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums;color:#60738e}.receipt-result-group>.small{margin:6px 0 4px}.receipt-result-group .receipt-row:last-child,.receipt-result-group .batch-export-row:last-child{border-bottom:0;padding-bottom:0}.receipt-result-group.ready .review-group-heading h3{color:#315aca}.receipt-result-group.applied .review-group-heading h3{color:#23734d}.receipt-result-group.failed .review-group-heading h3{color:#b33f42}.receipt-result-group.unmatched .review-group-heading h3{color:#956316}.review-unmatched-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:14px 0;border-bottom:1px solid #e2e8f1;overflow-wrap:anywhere}#receiptUnmatched:empty{display:none}#receiptUnmatched{margin-top:18px;padding:16px;background:#faf8f2;border:1px solid #e9dfc9;border-radius:10px}#receiptUnmatched h3{font-size:15px;margin:0}#receiptImportDialog:has(#receiptResult:not(.hidden)){width:min(1120px,calc(100vw - 28px))}#receiptResult .receipt-connect-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px}#receiptResult .receipt-connect-bar .row-actions{margin:0}.receipt-confirm-scope{flex-basis:100%;font-size:11px;color:#687b96}.receipt-row.ready .receipt-badge{background:#edf3ff;color:#315aca}.receipt-row.failed .receipt-badge{background:#fff0ef;color:#b33f42}
@media(max-width:650px){.review-status-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.review-status-card{padding:10px}.review-status-card strong{font-size:21px}.review-status-card:last-child{grid-column:1/-1;grid-template-columns:1fr auto auto;align-items:center}.payment-history-card{padding:12px;gap:12px}.batch-figures strong{font-size:18px}.batch-completion{grid-column:1/-1}.payment-history-card>button{grid-column:1/-1;justify-self:end}.review-history-tabs button{font-size:11px;padding:8px}.receipt-result-group{padding:12px}.review-group-heading{align-items:flex-start;flex-direction:column;gap:5px}#receiptResult .receipt-connect-bar{align-items:flex-start;flex-direction:column}.review-unmatched-item{grid-template-columns:1fr}.receipt-row-head>strong:first-child{flex-basis:100%}}
.receipt-connect-bar{margin:16px 0;padding:14px;background:#f5f8ff;border:1px solid #dbe5fa;border-radius:10px}.receipt-connect-bar p{margin:6px 0}.receipt-connect-bar .row-actions{margin-bottom:0}.receipt-login-dialog img{max-width:100%;border:1px solid #dbe5fa;border-radius:8px}.receipt-login-dialog .payment-history-body{max-height:65dvh;overflow:auto}#receiptResult>.row-actions{align-items:center}#receiptResult .receipt-upload{margin:0;padding:10px;font-size:12px}#receiptResult .row-actions>button{align-self:center}

.receipt-scope{max-height:24dvh;overflow:auto}.receipt-batch-choice{display:flex;align-items:center;gap:10px;padding:10px;border-bottom:1px solid #e2e8f1;font-size:13px;overflow-wrap:anywhere}.receipt-upload{display:inline-flex;flex-direction:column;gap:8px;padding:14px;border:1px dashed #819df5;border-radius:10px;background:#f5f8ff;font-weight:600;margin:12px 0}.receipt-upload input{font-weight:400;max-width:100%}.receipt-row{padding:14px 0;border-bottom:1px solid #e2e8f1;overflow-wrap:anywhere}.receipt-row p{margin:6px 0}.receipt-row-head{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center}.receipt-row-head>strong:first-child{flex:1}.receipt-badge{padding:3px 8px;background:#eef2fa;border-radius:5px;font-size:12px}.receipt-row.ready .receipt-badge,.receipt-row.applied .receipt-badge{background:#e5f5eb;color:#17653d}.receipt-row.failed .receipt-badge,.receipt-row.blocked .receipt-badge,.receipt-row.ambiguous .receipt-badge{background:#fff0e3;color:#8d3c03}#receiptImportDialog{display:none}#receiptImportDialog[open]{display:flex;flex-direction:column;max-height:92dvh}#receiptImportDialog .payment-history-body{min-height:0;overflow:auto;overscroll-behavior:contain}#receiptImportDialog .dialog-header,#receiptImportDialog .dialog-footer{flex:none}#receiptImportDialog .dialog-footer{flex-wrap:wrap}#receiptImportDialog input[type=file]{width:100%}#receiptImportDialog .dialog-footer span{margin-right:auto}
#historyTestDialog{display:none}#historyTestDialog[open]{display:flex;flex-direction:column}#historyTestDialog .payment-history-body{min-height:0;overflow:auto;overscroll-behavior:contain}#historyTestContent>label{display:flex;flex-direction:column;gap:10px;margin:14px 0}#historyTestContent>select{margin:8px 0}#historyTestContent>p{margin:12px 0}#historyTestContent input[type=file]{max-width:100%}#historyTestDialog .dialog-header{flex:none}#historyTestContent .table-wrap{overflow:auto}#historyTestContent td{vertical-align:top}

/* Receipt setup: scope information uses structured fields, never a filename as a row. */
.receipt-steps{display:flex;list-style:none;margin:0 0 22px;padding:0;gap:24px;color:#718097;font-size:12px}.receipt-steps li{display:flex;align-items:center;gap:8px}.receipt-steps b{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#eef1f6;font-size:11px}.receipt-steps .active{color:#315bd6;font-weight:600}.receipt-steps .active b{background:#e8efff}.receipt-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.receipt-setup-section h3{margin:0;font-size:15px}.receipt-setup-section p{line-height:1.7;margin:6px 0 12px}.receipt-scope{max-height:30dvh;overflow:auto;overscroll-behavior:contain;display:grid;gap:8px;margin:12px 0}.receipt-batch-choice{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:14px;align-items:center;padding:13px 16px;border:1px solid #dfe6f1;border-radius:9px;background:#fff;cursor:pointer}.receipt-batch-choice input[type=checkbox]{width:18px;height:18px;min-width:18px;flex:none;margin:0;padding:0;accent-color:#3863df}.receipt-batch-choice:hover{border-color:#9cb3e9}.receipt-batch-choice:has(input:checked){border-color:#7f9bea;background:#f5f8ff}.receipt-batch-choice:focus-within{outline:2px solid #365de0;outline-offset:2px}.receipt-batch-info{display:grid;min-width:0;gap:5px}.receipt-batch-title{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}.receipt-batch-title strong{font-size:13px}.receipt-batch-status{font-size:11px;font-weight:400;border-radius:4px;padding:2px 7px;background:#eaf0f8;color:#506785}.receipt-batch-owner{font-size:12px;color:#536784}.receipt-batch-id{font-size:10px;color:#75849b;font-weight:400;overflow-wrap:anywhere}.receipt-batch-figures{display:grid;text-align:right;gap:5px;white-space:nowrap}.receipt-batch-figures strong{font-size:18px;font-variant-numeric:tabular-nums}.receipt-batch-figures small{font-size:12px;color:#60738e;font-weight:400}.receipt-scope-summary{padding:10px 14px;background:#edf3ff;border-radius:6px;color:#31578c;font-size:13px;font-weight:600}.receipt-setup-section .receipt-lock-help{font-size:11px;color:#73829b;margin:8px 0 0}.receipt-upload-section{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:6px 20px;border-top:1px solid #e3e9f2;padding-top:20px;margin-top:20px;align-items:center}.receipt-upload-section p{margin-bottom:4px}.receipt-batch-upload{position:relative;margin:0;display:flex;align-items:center;justify-content:center;min-height:125px;cursor:pointer;font-size:13px}.receipt-file-icon{border:1px solid #b4c7ef;background:#fff;color:#4069c4;border-radius:4px;padding:5px;font-size:10px;letter-spacing:1px}.receipt-batch-upload:hover{border-color:#315bd6;background:#edf3ff}.receipt-batch-upload:focus-within{outline:2px solid #315bd6;outline-offset:3px}.receipt-batch-upload:has(input:disabled){opacity:.55;cursor:default}.receipt-batch-upload .small{font-weight:400}.receipt-setup-section .receipt-next-help{grid-column:1/-1;font-size:11px;color:#6a7c96;margin:8px 0 0}#receiptImportDialog .receipt-batch-upload input[type=file]{width:1px}
@media(max-width:600px){.receipt-steps{gap:10px;font-size:10px;margin-bottom:16px}.receipt-steps li{gap:4px}.receipt-steps b{width:19px;height:19px;flex:none}.receipt-section-heading{align-items:flex-start;flex-direction:column;gap:5px}.receipt-batch-choice{padding:12px;gap:10px;grid-template-columns:18px minmax(0,1fr)}.receipt-batch-figures{grid-column:2;display:flex;align-items:center;gap:12px;text-align:left}.receipt-batch-title{gap:5px}.receipt-upload-section{grid-template-columns:1fr;gap:10px}.receipt-batch-upload{min-height:115px}.receipt-scope{max-height:35dvh}.receipt-scope-summary{font-size:12px}#receiptImportDialog .dialog-footer{gap:10px}#receiptImportDialog .dialog-footer #receiptProgress{flex-basis:100%;font-size:11px}}

#receiptImportDialog .dialog-header{padding:18px 24px}#receiptSetup .receipt-steps{margin-bottom:14px}#receiptSetup .receipt-scope{max-height:clamp(164px,22dvh,220px);min-height:85px;margin:10px 0}#receiptSetup .receipt-batch-choice{padding:10px 14px}#receiptSetup .receipt-batch-info{gap:3px}#receiptSetup .receipt-upload-section{margin-top:14px;padding-top:14px}#receiptSetup .receipt-batch-upload{min-height:105px}#receiptSetup .receipt-section-heading+p{margin-bottom:8px}@media(max-width:600px){#receiptImportDialog .dialog-header{padding:16px}#receiptSetup .receipt-scope{max-height:30dvh}}
.receipt-row.ready .receipt-badge{background:#edf3ff;color:#315aca}.receipt-row.failed .receipt-badge{background:#fff0ef;color:#b33f42}

.payment-minimum-range{border:1px solid #d8e2f4;border-radius:10px;padding:12px;margin:12px 0}.payment-minimum-range[hidden]{display:none}.payment-minimum-range legend{font-weight:600;padding:0 6px}.minimum-range-inputs{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.minimum-range-inputs label{flex:1;min-width:120px}.minimum-range-inputs input{display:block;width:100%;margin-top:6px}.minimum-range-inputs>strong,.minimum-range-inputs>span{padding-bottom:10px}
