#receivableStatementPage .ar-steps { display: flex; gap: 32px; list-style: none; padding: 0; margin: 0 0 28px; color: var(--ui-muted); font-size: 13px; }
#receivableStatementPage .ar-steps li { display: flex; align-items: center; gap: 9px; }
#receivableStatementPage .ar-steps span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: var(--ui-primary-ink); background: var(--ui-primary-soft); font-weight: 600; }
#receivableStatementPage .ar-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; padding: 22px; border: 1px dashed var(--ui-primary-line); border-radius: 8px; background: var(--ui-soft); }
#receivableStatementPage .ar-upload > div { flex: 1 1 260px; }
#receivableStatementPage .ar-upload > .ar-issuer { flex-basis: 100%; }
#receivableStatementPage .ar-issuer select { display: block; width: min(100%, 560px); margin-top: 8px; }
#receivableStatementPage .ar-upload label { color: var(--ui-text); font-size: 14px; }
#receivableStatementPage .field-hint { font-size: 12px; margin: 6px 0 0; }
#receivableStatementPage .ar-upload input { flex: 0 1 300px; }
#receivableStatementPage .message { margin-top: 18px; white-space: pre-line; }
#receivableStatementPage .ar-section-heading { margin: 28px 0 16px; }
#receivableStatementPage h3 { font-size: 16px; margin: 0; }
#receivableStatementPage .ar-sheet { border-top: 1px solid var(--ui-line); padding: 18px 0; }
#receivableStatementPage .ar-sheet-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
#receivableStatementPage .ar-sheet-head > label:first-child { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--ui-text); font-size: 14px; min-width: 150px; }
#receivableStatementPage .ar-sheet-head input[type=number] { width: 70px; margin-left: 6px; }
#receivableStatementPage .ar-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
#receivableStatementPage .ar-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
#receivableStatementPage .ar-field select { width: 100%; }
#receivableStatementPage .ar-sample { font-size: 12px; color: var(--ui-muted); overflow-wrap: anywhere; min-height: 20px; }
#receivableStatementPage .ar-generate { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--ui-line); padding-top: 20px; }
#receivableStatementPage .ar-result-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; flex-wrap: wrap; }
#receivableStatementPage .ar-result-head p { margin: 6px 0 0; }
#receivableStatementPage .ar-company { font-weight: 600; color: var(--ui-text); }
#receivableStatementPage .ar-totals { display: flex; flex-wrap: wrap; gap: 5px 18px; font-variant-numeric: tabular-nums; }
#receivableStatementPage .ar-total { white-space: nowrap; }
#receivableStatementPage .ar-total small { color: var(--ui-muted); margin-right: 7px; }
#receivableStatementPage .ar-results-note { color: var(--ui-muted); font-size: 12px; margin: 14px 0 0; }
#receivableStatementPage .ar-downloads { min-width: 0; width: 100%; table-layout: fixed; }
#receivableStatementPage .ar-downloads th:nth-child(1) { width: 36%; }
#receivableStatementPage .ar-downloads th:nth-child(2) { width: 10%; }
#receivableStatementPage .ar-downloads th:nth-child(3) { width: 30%; }
#receivableStatementPage .ar-downloads th:nth-child(4) { width: 24%; }
#receivableStatementPage .ar-downloads td { white-space: normal; overflow-wrap: anywhere; }
@media(max-width: 700px) {
  #receivableStatementPage .ar-steps { gap: 12px; font-size: 12px; }
  #receivableStatementPage .ar-steps span { width: 22px; height: 22px; }
  #receivableStatementPage .ar-fields { grid-template-columns: 1fr; gap: 14px; }
  #receivableStatementPage .ar-upload { padding: 16px; }
  #receivableStatementPage .ar-upload input, #receivableStatementPage .ar-upload button { flex: 1 1 100%; width: 100%; }
  #receivableStatementPage .ar-generate { align-items: stretch; flex-direction: column; }
  #receivableStatementPage .ar-result-head > button { width: 100%; }
  #receivableStatementPage .ar-downloads, #receivableStatementPage .ar-downloads tbody, #receivableStatementPage .ar-downloads tr, #receivableStatementPage .ar-downloads td { display: block; width: 100%; }
  #receivableStatementPage .ar-downloads thead { display: none; }
  #receivableStatementPage .ar-downloads tr { padding: 14px; border-bottom: 1px solid var(--ui-line); }
  #receivableStatementPage .ar-downloads td { padding: 4px 0; border: 0; }
  #receivableStatementPage .ar-downloads td:nth-child(2)::before { content: '费用行数：'; color: var(--ui-muted); }
  #receivableStatementPage .ar-downloads td:nth-child(4) button { width: 100%; margin-top: 10px; }
}

#receivablePreviewDialog .ar-preview-scroll { overflow-x: auto; max-width: 100%; }
#receivablePreviewDialog .ar-preview-table { width: 1760px; min-width: 1760px; table-layout: fixed; font-size: 12px; }
#receivablePreviewDialog .ar-preview-table th, #receivablePreviewDialog .ar-preview-table td { white-space: normal; overflow-wrap: anywhere; padding: 12px; vertical-align: middle; }
#receivablePreviewDialog .ar-preview-table th { background: #edf3fc; color: #244777; }
#receivablePreviewDialog .ar-preview-table tbody tr:nth-child(even) { background: #f8fafc; }
#receivablePreviewDialog .ar-preview-table th:nth-child(1) { width: 150px; }
#receivablePreviewDialog .ar-preview-table th:nth-child(2) { width: 230px; }
#receivablePreviewDialog .ar-preview-table th:nth-child(3) { width: 120px; }
#receivablePreviewDialog .ar-preview-table th:nth-child(4) { width: 210px; }
#receivablePreviewDialog .ar-preview-table th:nth-child(5) { width: 180px; }
#receivablePreviewDialog .ar-preview-table th:nth-child(7) { width: 190px; }
#receivablePreviewDialog .ar-preview-table th:nth-child(9) { width: 80px; }
#receivablePreviewDialog .ar-preview-table td:nth-child(n+10) { text-align: right; font-variant-numeric: tabular-nums; }
#receivableStatementPage .ar-file-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#receivablePreviewDialog { margin: auto; width: min(1500px, calc(100vw - 40px)); max-width: none; max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--ui-line); border-radius: 12px; background: var(--ui-panel, #fff); color: var(--ui-text); box-shadow: 0 20px 70px #0f172a33; }
#receivablePreviewDialog::backdrop { background: #0f172a80; }
#receivablePreviewDialog .ar-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--ui-line); }
#receivablePreviewDialog .ar-dialog-header p { margin: 0 0 6px; color: var(--ui-muted); font-size: 12px; }
#receivablePreviewDialog h3 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
#receivablePreviewDialog .ar-dialog-content { padding: 20px 24px; }
#receivablePreviewDialog .field-hint, #receivablePreviewDialog .ar-dialog-status { color: var(--ui-muted); margin: 0 0 16px; }
#receivablePreviewDialog .ar-dialog-totals { display: flex; gap: 12px 24px; flex-wrap: wrap; margin-top: 20px; font-variant-numeric: tabular-nums; }
@media(max-width: 700px) {
  #receivableStatementPage .ar-file-actions { flex-wrap: nowrap; }
  #receivablePreviewDialog { width: calc(100vw - 20px); max-height: calc(100vh - 24px); }
  #receivablePreviewDialog .ar-dialog-header, #receivablePreviewDialog .ar-dialog-content { padding: 16px; }
  #receivablePreviewDialog h3 { font-size: 16px; }
}
