/* Finance pages in the desktop A-style preview. Legacy desktop and mobile stay unchanged. */
.receivable-export-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.receivable-export-actions button { width: auto; margin: 0; white-space: nowrap; }
#receivableExportStatus { margin: 8px 0 12px; }
.receivable-voucher-upload { padding: 12px; border: 1px dashed #cbd8e8; border-radius: 6px; background: #f8fafc; }
.receivable-voucher-upload-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.receivable-voucher-upload-head strong { font-size: 13px; }
.receivable-voucher-upload-head strong span { font-weight: 400; color: #718096; }
.receivable-voucher-upload-head button { width: auto; margin: 0; min-height: 32px; }
.receivable-voucher-upload p, .receivable-voucher-message { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: #65748a; }
.receivable-voucher-message:empty, .receivable-voucher-drafts:empty { display: none; }
.receivable-voucher-drafts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.receivable-voucher-drafts figure { display: grid; gap: 4px; margin: 0; min-width: 0; }
.receivable-voucher-drafts .receivable-voucher-thumb { padding: 0; height: 72px; overflow: hidden; border: 1px solid #dce3e8; background: white; }
.receivable-voucher-drafts img { width: 100%; height: 100%; object-fit: contain; }
.receivable-voucher-drafts figcaption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.receivable-voucher-drafts button { margin: 0; width: 100%; }
.receivable-voucher-links { display: flex; flex-direction: column; gap: 5px; margin-top: 5px; align-items: flex-start; }
.receivable-voucher-links button { max-width: 200px; width: auto; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.receivable-voucher-links button span { display: block; font-size: 11px; font-weight: 400; color: #65748a; }
.receivable-voucher-preview { width: min(920px,calc(100vw - 48px)); max-height: calc(100dvh - 48px); box-sizing: border-box; padding: 18px; border: 1px solid #dce3e8; border-radius: 8px; }
.receivable-voucher-preview::backdrop { background: rgba(15,23,42,.55); }
.receivable-voucher-preview header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.receivable-voucher-preview header strong { overflow-wrap: anywhere; }
.receivable-voucher-preview header button { width: auto; margin: 0; flex-shrink: 0; }
.receivable-voucher-preview img { display: block; max-width: 100%; max-height: calc(100dvh - 140px); object-fit: contain; margin: auto; }
#receivableReceiptModal .receivable-receipt-heading { position: sticky; top: -22px; z-index: 2; background: #fff; padding: 12px 0; margin-top: -12px; }
#receivableReceiptModal .receivable-receipt-footer { position: sticky; bottom: -22px; background: #fff; z-index: 1; padding-bottom: 10px; }
@media (min-width: 769px) {
  .receivable-list-panel > .section-head { position: sticky; top: 64px; z-index: 4; background: #fff; padding-top: 12px; padding-bottom: 12px; }
}
@media (min-width: 769px) {
  body.pc-ui-preview .finance-a-page {
    min-width: 0;
  }

  body.pc-ui-preview .finance-a-page > .panel,
  body.pc-ui-preview .finance-a-page > .finance-a-list-panel,
  body.pc-ui-preview .finance-a-page > .finance-a-create-panel {
    min-width: 0;
    border-color: #dce3e8;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(31, 41, 51, 0.03);
  }

  body.pc-ui-preview .finance-a-hero,
  body.pc-ui-preview .finance-a-funds > .page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    margin-bottom: 14px;
    padding: 18px 20px;
    border: 1px solid #d9e3e6;
    border-left: 4px solid #16766f;
    border-radius: 8px;
    background: linear-gradient(115deg, #f1f8f7 0%, #fff 72%);
  }

  body.pc-ui-preview .finance-a-hero h3 {
    margin: 4px 0 4px;
    color: #1f3038;
    font-size: 22px;
    line-height: 1.3;
  }

  body.pc-ui-preview .finance-a-hero p {
    margin: 0;
    color: #61717a;
    font-size: 13px;
  }

  body.pc-ui-preview .finance-a-eyebrow {
    color: #15776d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
  }

  body.pc-ui-preview .finance-a-hero-stats,
  body.pc-ui-preview .finance-a-hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  body.pc-ui-preview .finance-a-hero-stats span {
    padding: 7px 10px;
    border: 1px solid #d8e5e2;
    border-radius: 5px;
    background: #fff;
    color: #32504e;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
  }

  body.pc-ui-preview .finance-a-create-toggle,
  body.pc-ui-preview .finance-a-jump-list {
    width: auto;
    min-height: 36px;
    margin: 0;
    padding: 7px 15px;
    border-radius: 5px;
    white-space: nowrap;
  }

  body.pc-ui-preview .finance-a-create-panel.finance-a-collapsed {
    display: none;
  }

  body.pc-ui-preview .finance-a-page .finance-a-list-panel,
  body.pc-ui-preview .finance-a-page .finance-a-create-panel {
    scroll-margin-top: 80px;
  }

  body.pc-ui-preview .finance-a-page .table-scroll {
    max-width: 100%;
    border-radius: 6px;
  }

  body.pc-ui-preview .finance-a-funds .finance-a-list-panel > .section-head,
  body.pc-ui-preview .finance-a-receivables .receivable-list-panel > .section-head {
    margin-bottom: 12px;
  }

  body.pc-ui-preview .finance-a-funds .fund-overview-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.pc-ui-preview .finance-a-funds .finance-a-list-panel table {
    min-width: 1680px;
  }

  body.pc-ui-preview .finance-a-funds .finance-a-list-panel th,
  body.pc-ui-preview .finance-a-reimbursements .finance-a-list-panel th {
    padding-block: 10px;
    background: #f4f6f7;
    color: #56646e;
    white-space: nowrap;
  }

  body.pc-ui-preview .finance-a-funds .finance-a-list-panel tbody tr:hover td,
  body.pc-ui-preview .finance-a-reimbursements .finance-a-list-panel tbody tr:hover td {
    background: #fbfdfd;
  }

  body.pc-ui-preview .finance-a-funds .finance-a-list-panel td:nth-child(2),
  body.pc-ui-preview .finance-a-reimbursements .finance-a-list-panel td:nth-child(9) {
    color: #0d6660;
    font-weight: 700;
  }

  body.pc-ui-preview .finance-a-page .finance-a-form-organized {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
  }

  body.pc-ui-preview .finance-a-form-section {
    min-width: 0;
    padding: 14px;
    border: 1px solid #dce4e7;
    border-radius: 6px;
    background: #fbfcfc;
  }

  body.pc-ui-preview .finance-a-form-heading {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e4e9eb;
    padding-bottom: 10px;
  }

  body.pc-ui-preview .finance-a-form-heading h4,
  body.pc-ui-preview .finance-a-section-head h4 {
    margin: 0;
    color: #25333a;
    font-size: 16px;
  }

  body.pc-ui-preview .finance-a-form-heading span,
  body.pc-ui-preview .finance-a-section-head p {
    margin: 0;
    color: #73818a;
    font-size: 12px;
  }

  body.pc-ui-preview .finance-a-form-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
  }

  body.pc-ui-preview .finance-a-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }

  body.pc-ui-preview .finance-a-field-wide {
    grid-column: 1 / -1;
  }

  body.pc-ui-preview .finance-a-field-label,
  body.pc-ui-preview .finance-a-report-label,
  body.pc-ui-preview .finance-a-report-field > span {
    color: #485861;
    font-size: 12px;
    font-weight: 700;
  }

  body.pc-ui-preview .finance-a-field > :not(.finance-a-field-label),
  body.pc-ui-preview .finance-a-field input,
  body.pc-ui-preview .finance-a-field select,
  body.pc-ui-preview .finance-a-field textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.pc-ui-preview .finance-a-field textarea {
    min-height: 74px;
    resize: vertical;
  }

  body.pc-ui-preview .finance-a-field .search-select,
  body.pc-ui-preview .finance-a-field .task-inline-date {
    width: 100%;
  }

  body.pc-ui-preview .finance-a-form-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 12px 2px 0;
    border-top: 1px solid #dce3e7;
  }

  body.pc-ui-preview .finance-a-form-footer > button {
    width: auto;
    min-width: 160px;
    margin: 0;
  }

  body.pc-ui-preview .finance-a-reimbursements > .finance-a-list-panel,
  body.pc-ui-preview .finance-a-reimbursements > .finance-a-create-panel {
    padding: 16px;
    margin-top: 14px;
    border: 1px solid #dce3e8;
    background: #fff;
  }

  body.pc-ui-preview .finance-a-reimbursements .finance-a-list-panel > h4 {
    margin: 0 0 12px;
    color: #263941;
    font-size: 17px;
  }

  body.pc-ui-preview .finance-a-reimbursements .finance-a-list-panel table {
    min-width: 1960px;
  }

  body.pc-ui-preview .finance-a-reimbursements .finance-a-section-head {
    margin-bottom: 12px;
  }

  body.pc-ui-preview .finance-a-receivables .receivable-main-table {
    min-width: 680px;
    width: 100%;
    table-layout: fixed;
  }
  body.pc-ui-preview .finance-a-receivables .receivable-form { grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; }
  body.pc-ui-preview .finance-a-receivables .receivable-form > .receivable-form-field { grid-column: auto; }
  body.pc-ui-preview .finance-a-receivables .receivable-form > .form-span-2 { grid-column: 1 / -1; }

  body.pc-ui-preview .finance-a-receivables .receivable-main-table > thead > tr > :is(:nth-child(1),:nth-child(4),:nth-child(5),:nth-child(7),:nth-child(8),:nth-child(10)),
  body.pc-ui-preview .finance-a-receivables .receivable-main-table .receivable-main-row > :is(:nth-child(1),:nth-child(4),:nth-child(5),:nth-child(7),:nth-child(8),:nth-child(10)) { display: none; }
  body.pc-ui-preview .finance-a-receivables .receivable-main-table > thead > tr > :last-child,
  body.pc-ui-preview .finance-a-receivables .receivable-main-table .receivable-main-row > .receivable-table-actions { position: sticky; right: 0; min-width: 156px; background: #fff; box-shadow: -3px 0 6px #2639410c; z-index: 1; }
  body.pc-ui-preview .finance-a-receivables .receivable-main-table .receivable-main-row > td { white-space: normal; overflow-wrap: anywhere; }
  body.pc-ui-preview .finance-a-receivables .receivable-main-table .receivable-main-row > td:nth-child(2) { width: 28%; }
  body.pc-ui-preview .finance-a-receivables .receivable-main-table th:nth-child(2) { width: 28%; }
  body.pc-ui-preview .finance-a-receivables .receivable-main-table th:nth-child(3) { width: 12%; }
  body.pc-ui-preview .finance-a-receivables .receivable-main-table th:nth-child(6) { width: 20%; }
  body.pc-ui-preview .finance-a-receivables .receivable-main-table th:nth-child(9) { width: 18%; }
  body.pc-ui-preview .finance-a-receivables .receivable-main-table th:nth-child(11) { width: 22%; }
  body.pc-ui-preview .finance-a-receivables .receivable-table-actions .table-action-group { flex-wrap: wrap; }
  body.pc-ui-preview #receivableEditModal .preview-modal-card { width: min(1180px, 94vw); max-width: 1180px; }
  body.pc-ui-preview #receivableEditForm > label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #475569; min-width: 0; }
  body.pc-ui-preview #receivableEditForm > label:has(textarea) { grid-column: 1 / -1; }
  body.pc-ui-preview #receivableEditForm { grid-template-columns: repeat(4,minmax(0,1fr)); align-items: end; gap: 12px; }
  body.pc-ui-preview #receivableEditForm > label { margin: 0; line-height: 1.5; }
  body.pc-ui-preview #receivableEditForm > * { min-width: 0; }
  body.pc-ui-preview #receivableEditForm > .form-span-2 { grid-column: 1 / -1; }
  body.pc-ui-preview #receivableEditForm > div:has(> input[type="date"]) { display: flex; flex-direction: column; gap: 5px; }
  body.pc-ui-preview #receivableEditForm > div:has(> input[type="date"]) > .muted { font-size: 13px; line-height: 1.5; }
  body.pc-ui-preview #receivableEditInvoiceSummary .quote-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
  body.pc-ui-preview #receivableEditInvoiceSummary .stat { min-width: 0; padding: 8px 10px; border-radius: 6px; }
  body.pc-ui-preview #receivableEditInvoiceSummary .stat .num { margin-top: 3px; font-size: 18px; overflow-wrap: anywhere; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-payments td:nth-child(2) { min-width: 105px; white-space: nowrap; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-payments td:is(:nth-child(4),:nth-child(5),:nth-child(6)) { min-width: 100px; }
  body.pc-ui-preview #receivableEditPaymentTable { min-width: 960px; }
  body.pc-ui-preview #receivableEditPaymentTable :is(input,select) { min-width: 100px; }

  body.pc-ui-preview .finance-a-receivables .receivable-main-table td:nth-child(6) .cell-main {
    color: #0e6e66;
    font-weight: 800;
  }

  body.pc-ui-preview .finance-a-receivables { gap: 12px; }
  body.pc-ui-preview .finance-a-receivables > .panel { padding: 16px; }
  body.pc-ui-preview .finance-a-receivables .receivable-overview-panel .section-head { margin-bottom: 12px; padding-bottom: 10px; }
  body.pc-ui-preview .finance-a-receivables .receivable-overview-panel h3 { margin: 0; font-size: 21px; }
  body.pc-ui-preview .finance-a-receivables .receivable-overview-panel .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
  body.pc-ui-preview .finance-a-receivables .receivable-overview-panel .stat { min-width: 0; padding: 10px 12px; border-radius: 6px; }
  body.pc-ui-preview .finance-a-receivables .receivable-overview-panel .stat-label { font-size: 12px; line-height: 1.5; }
  body.pc-ui-preview .finance-a-receivables .receivable-overview-panel .num { margin-top: 4px; font-size: 22px; }
  body.pc-ui-preview .finance-a-receivables .receivable-panel-note { margin-top: 9px; font-size: 12px; }
  body.pc-ui-preview .finance-a-receivables .receivable-filter-strip { padding: 0; gap: 8px; grid-template-columns: minmax(200px, 1.6fr) repeat(2, minmax(120px, .8fr)); }
  body.pc-ui-preview .finance-a-receivables .receivable-filter-strip > :first-child { grid-column: auto; }
  body.pc-ui-preview .finance-a-receivables .receivable-filter-strip button { justify-self: stretch; width: auto; }
  body.pc-ui-preview .finance-a-receivables .receivable-filter-summary { margin: 9px 0; gap: 6px; }
  body.pc-ui-preview .finance-a-receivables .receivable-filter-summary .page-chip { padding: 4px 8px; }
  body.pc-ui-preview .finance-a-receivables .receivable-main-table { min-width: 620px; }
  body.pc-ui-preview .finance-a-receivables .receivable-table-actions .tiny { padding: 6px 9px; min-height: 32px; }
  body.pc-ui-preview .finance-a-receivables #receivableChargeBasisNote { white-space: normal; }

  body.pc-ui-preview .finance-a-reports > .finance-a-report-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0 10px;
    padding: 16px;
    border: 1px solid #dce3e8;
    border-radius: 6px;
    background: #fafcfc;
  }

  body.pc-ui-preview .finance-a-report-field,
  body.pc-ui-preview .finance-a-reports .search-select {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }

  body.pc-ui-preview .finance-a-report-field input,
  body.pc-ui-preview .finance-a-report-field select,
  body.pc-ui-preview .finance-a-reports .search-select input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.pc-ui-preview .finance-a-reports .finance-a-report-filters > button {
    width: 100%;
    margin: 0;
    align-self: end;
  }

  body.pc-ui-preview .finance-a-reports .report-presets {
    margin: 0 0 14px;
  }

  body.pc-ui-preview .finance-a-result-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 10px;
  }

  body.pc-ui-preview .finance-a-result-heading h4 {
    margin: 0;
    color: #25373e;
    font-size: 17px;
  }

  body.pc-ui-preview .finance-a-result-heading span {
    color: #74828a;
    font-size: 12px;
  }

  body.pc-ui-preview .finance-a-reports .finance-a-report-result {
    min-width: 0;
    border-color: #dce3e8;
    border-radius: 6px;
  }

}

/* This single-payment form uses the existing receivable ledger. */
#receivableReceiptModal { z-index: 130; }
#receivableReceiptModal .receivable-receipt-card { width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 22px; border-radius: 12px; box-sizing: border-box; }
.receivable-receipt-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.receivable-receipt-heading > div { min-width: 0; }
.receivable-receipt-heading h3 { margin: 0 0 6px; font-size: 20px; }
.receivable-receipt-heading p { margin: 0; color: #64748b; font-size: 13px; overflow-wrap: anywhere; }
.receivable-receipt-heading button { width: auto; flex: 0 0 auto; margin: 0; padding: 7px 14px; }
.receivable-receipt-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 14px; gap: 12px; background: #f3f7fc; border: 1px solid #e0e8f2; border-radius: 8px; }
.receivable-receipt-amounts span { display: block; color: #64748b; font-size: 12px; margin-bottom: 5px; }
.receivable-receipt-amounts strong { color: #1e3a5f; font-size: 21px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.receivable-receipt-amounts > :last-child strong { color: #b45309; }
.receivable-receipt-note { font-size: 12px; line-height: 1.6; margin: 8px 0 16px; }
.receivable-receipt-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.receivable-receipt-form > label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: #334155; font-size: 13px; }
.receivable-receipt-form :is(input, select, textarea) { width: 100%; min-width: 0; min-height: 38px; margin: 0; box-sizing: border-box; font-size: 14px; }
.receivable-receipt-form textarea { min-height: 68px; resize: vertical; }
.receivable-receipt-form > .receivable-receipt-wide, .receivable-receipt-footer, .receivable-receipt-error { grid-column: 1 / -1; }
.receivable-receipt-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #e2e8f0; padding-top: 14px; }
.receivable-receipt-footer span { color: #64748b; font-size: 12px; }
.receivable-receipt-footer button { width: auto; flex: 0 0 auto; min-height: 40px; margin: 0; padding: 9px 18px; }
.receivable-receipt-error { margin: 0; padding: 10px 12px; color: #b42318; background: #fff4f2; border-radius: 6px; font-size: 13px; }
@media (min-width: 1280px) {
  body.pc-ui-preview .finance-a-receivables .receivable-overview-panel .cards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  body.pc-ui-preview .finance-a-receivables .receivable-filter-strip { grid-template-columns: minmax(200px, 1.5fr) repeat(4, minmax(122px, .8fr)) auto; }
}
@media (max-width: 600px) {
  #receivableReceiptModal .receivable-receipt-card { padding: 16px; }
  .receivable-receipt-form { grid-template-columns: 1fr; gap: 12px; }
  .receivable-receipt-amounts { gap: 8px; padding: 10px; }
  .receivable-receipt-amounts strong { font-size: 17px; }
  .receivable-receipt-footer { flex-wrap: wrap; }
  .receivable-receipt-footer button { width: 100%; }
}

@media (min-width: 769px) and (max-width: 1199px) {
  body.pc-ui-preview .finance-a-form-fields,
  body.pc-ui-preview .finance-a-reports > .finance-a-report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.pc-ui-preview .finance-a-funds .fund-overview-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  body.pc-ui-preview .finance-a-form-fields,
  body.pc-ui-preview .finance-a-reports > .finance-a-report-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  body.pc-ui-preview .finance-a-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* Reports: desktop hierarchy, wrapped metrics and readable drill-downs. */
@media (min-width: 769px) {
  .finance-a-reports .company-report-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); overflow:visible; gap:12px; }
  .finance-a-reports .company-report-cards .stat { min-width:0; width:auto; text-align:left; display:flex; flex-direction:column; align-items:flex-start; white-space:normal; gap:8px; padding:16px; border:1px solid #dce5ef; background:#f8fbff; color:#17375a; border-radius:10px; }
  .finance-a-reports .company-report-cards button.stat:hover { border-color:#2e63ad; background:#edf4ff; }
  .finance-a-reports .company-report-cards .num { font-size:25px; line-height:1.3; overflow-wrap:anywhere; }
  .finance-a-reports .stat-formula { font-size:12px; line-height:1.6; color:#667e98; font-weight:400; }
  .finance-a-reports .report-details { border:1px solid #dce5ef; border-radius:10px; margin:12px 0; padding:12px 16px; background:white; }
  .finance-a-reports .report-details > summary { cursor:pointer; font-weight:600; color:#22466e; padding:3px 0; }
  .finance-a-reports .report-details[open] > summary { margin-bottom:14px; }
  .finance-a-reports .report-warning { background:#fff8ec; border-color:#efdcba; }
  .finance-a-reports .report-warning li { margin:8px 0; }
  .finance-a-reports .report-error { background:#fff0ef; color:#a52a21; padding:18px; border-radius:8px; }
  .finance-a-reports .report-loading { padding:32px; text-align:center; }
  .finance-a-reports #reportProjectSort { max-width:300px; margin:8px 0; }
}
/* Desktop reports keep their controls in view; only the results scroll. */
@media screen and (min-width:769px) {
  body.pc-ui-preview:not(.mobile-ui-active):has(.main-view:not(.hidden) > #content > .report-workspace) { overflow:hidden; }
  body.pc-ui-preview:not(.mobile-ui-active) .main-view:has(> #content > .report-workspace) { height:100vh; height:100dvh; min-height:0; grid-template-rows:64px minmax(0,1fr); }
  body.pc-ui-preview:not(.mobile-ui-active) .main-view > #content:has(> .report-workspace) { display:flex; flex-direction:column; min-height:0; min-width:0; overflow:hidden; }
  body.pc-ui-preview:not(.mobile-ui-active) #content > .report-workspace { display:flex; flex-direction:column; flex:1; width:100%; min-height:0; min-width:0; box-sizing:border-box; overflow:hidden; }
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace > :is(.rw-header,.rw-dates,#rwPending,.rw-result-head) { flex:none; }
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace > #rwPending:empty { display:none; }
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace > #reportResult { flex:1; min-height:0; min-width:0; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; padding:2px 4px 4px; }
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace > #reportResult:focus-visible { outline:2px solid #3674c3; outline-offset:-2px; }
}
/* Report lists use one scrolling table, with filters, headings and totals in view. */
@media screen and (min-width:769px) {
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace > #reportResult:has(> .rw-local-filters) { display:flex; flex-direction:column; overflow:hidden; scrollbar-gutter:auto; }
  body.pc-ui-preview:not(.mobile-ui-active) #reportResult > :is(.rw-local-filters,.rw-project-list-head,.rw-secondary) { flex:none; }
  body.pc-ui-preview:not(.mobile-ui-active) #reportResult > #rwProjectTable { display:flex; flex-direction:column; flex:1; min-height:0; min-width:0; }
  body.pc-ui-preview:not(.mobile-ui-active) #reportResult:has(> .rw-local-filters) > .table-scroll,
  body.pc-ui-preview:not(.mobile-ui-active) #rwProjectTable > .table-scroll { flex:1; min-height:0; max-height:none; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; scroll-behavior:auto; padding:0; }
  body.pc-ui-preview:not(.mobile-ui-active) #reportResult:has(> .rw-local-filters) table { border-collapse:separate; border-spacing:0; }
  body.pc-ui-preview:not(.mobile-ui-active) #reportResult:has(> .rw-local-filters) thead { position:sticky; top:0; z-index:4; }
  body.pc-ui-preview:not(.mobile-ui-active) #reportResult:has(> .rw-local-filters) thead th { position:static; }
  body.pc-ui-preview:not(.mobile-ui-active) #reportResult:has(> .rw-local-filters) tfoot { position:sticky; bottom:0; z-index:3; }
  body.pc-ui-preview:not(.mobile-ui-active) #reportResult:has(> .rw-local-filters) tfoot td { position:static; background:#f0f5fc; }
  body.pc-ui-preview:not(.mobile-ui-active) #rwProjectTable .rw-project-table thead th[rowspan],
  body.pc-ui-preview:not(.mobile-ui-active) #rwProjectTable .rw-project-table tfoot td:first-child { position:sticky; left:0; top:auto; bottom:auto; }
}
@media screen and (min-width:769px) and (max-height:760px) {
  body.pc-ui-preview:not(.mobile-ui-active) #content > .report-workspace:has(> #reportResult > .rw-local-filters) { padding:12px 16px; }
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace:has(> #reportResult > .rw-local-filters) .rw-header { flex-wrap:nowrap; gap:8px; margin-bottom:6px; }
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace:has(> #reportResult > .rw-local-filters) .rw-header h2 { font-size:16px; margin-bottom:6px; }
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace:has(> #reportResult > .rw-local-filters) .rw-header .rw-tabs { order:0; width:auto; }
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace:has(> #reportResult > .rw-local-filters) .rw-tabs button { min-width:0; min-height:34px; padding:6px 9px; font-size:13px; }
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace:has(> #reportResult > .rw-local-filters) #rwExplain { margin-bottom:6px; padding:4px; }
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace:has(> #reportResult > .rw-local-filters) .rw-dates { padding:8px; gap:6px; }
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace:has(> #reportResult > .rw-local-filters) .rw-dates label { display:flex; align-items:center; gap:6px; white-space:nowrap; min-width:0; }
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace:has(> #reportResult > .rw-local-filters) .rw-dates input { flex:1; min-width:0; }
  body.pc-ui-preview:not(.mobile-ui-active) .report-workspace:has(> #reportResult > .rw-local-filters) .rw-result-head { margin:6px 0; }
  body.pc-ui-preview:not(.mobile-ui-active) #reportResult > .rw-local-filters { margin:6px 0; gap:6px; }
  body.pc-ui-preview:not(.mobile-ui-active) #reportResult > .rw-project-list-head { gap:4px 8px; margin:4px 0 6px; }
  body.pc-ui-preview:not(.mobile-ui-active) #reportResult > .rw-project-list-head button { min-height:30px; padding:4px 8px; }
  body.pc-ui-preview:not(.mobile-ui-active) #reportResult:has(> .rw-local-filters) table :is(th,td) { padding-top:6px; padding-bottom:6px; }
  body.pc-ui-preview:not(.mobile-ui-active) #rwProjectTable .rw-column-groups th { height:auto; }
  body.pc-ui-preview:not(.mobile-ui-active) #rwProjectTable .rw-column-groups span { display:inline; margin:0 0 0 8px; }
}
/* Desktop report workspace: scoped visual system; legacy and mobile stay unchanged. */
@media (min-width:769px) {
  body.pc-ui-preview .report-workspace {
    --rw-ink:#21354c; --rw-muted:#64758b; --rw-line:#dfe6ee; --rw-blue:#265fac;
    max-width:1500px; margin:0 auto; padding:18px 24px; border-radius:12px;
    border:1px solid var(--rw-line); background:#fff; color:var(--rw-ink);
    font-family:"Microsoft YaHei","Segoe UI",sans-serif; font-size:14px;
    box-shadow:0 3px 16px #223c5a04;
  }
  .report-workspace *, .report-workspace input, .report-workspace select, .report-workspace button { font-family:inherit; }
  body.pc-ui-preview .report-workspace button {
    width:auto; margin:0; min-height:36px; padding:8px 14px; border:1px solid var(--rw-line);
    border-radius:6px; color:#405870; background:#fff; font-size:13px; font-weight:500;
    line-height:1.4; box-shadow:none; transition:none;
  }
  body.pc-ui-preview .report-workspace button:hover { color:var(--rw-blue); border-color:#a9bed9; background:#f3f7fc; }
  body.pc-ui-preview .report-workspace button:disabled { opacity:.45; cursor:not-allowed; }
  .report-workspace :is(button,input,select,[role="button"]):focus-visible { outline:2px solid #3674c3; outline-offset:3px; }
  .report-workspace .rw-header { display:flex; align-items:center; gap:24px; margin-bottom:14px; border-bottom:1px solid var(--rw-line); }
  .report-workspace .rw-header h2 { flex-shrink:0; margin:0 0 9px; color:#1c3048; font-size:22px; line-height:1.35; font-weight:700; letter-spacing:.02em; }
  body.pc-ui-preview .report-workspace #rwExplain { flex-shrink:0; margin-left:auto; margin-bottom:9px; border-color:transparent; color:#52677f; background:transparent; }
  body.pc-ui-preview .report-workspace #rwExplain:hover { background:#f3f6fa; color:var(--rw-blue); }
  .report-workspace .rw-tabs { display:flex; gap:4px; margin:0; }
  body.pc-ui-preview .report-workspace .rw-tabs button {
    flex:0 0 auto; min-width:100px; min-height:48px; padding:10px 16px 14px;
    border:0; border-bottom:3px solid transparent; border-radius:0; margin-bottom:-1px;
    background:transparent; color:#63758c; font-size:14px;
  }
  body.pc-ui-preview .report-workspace .rw-tabs button[aria-current="page"] { color:var(--rw-blue); border-bottom-color:var(--rw-blue); font-weight:700; }
  .report-workspace .rw-dates { display:grid; grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) auto auto auto; align-items:end; gap:12px; padding:12px 14px; background:#f5f7fa; border:1px solid #edf0f4; border-radius:8px; }
  .report-workspace .rw-dates label { display:grid; gap:6px; margin:0; font-size:13px; font-weight:500; color:#52677f; }
  body.pc-ui-preview .report-workspace :is(input:not([type="checkbox"]),select) { height:38px; min-height:38px; padding:7px 10px; border:1px solid #d4dee9; border-radius:6px; background:#fff; color:#354b63; font-size:14px; }
  .report-workspace .rw-dates input { width:100%; min-width:0; font-variant-numeric:tabular-nums; }
  body.pc-ui-preview .report-workspace #rwQuery { min-height:38px; padding-inline:22px; color:#fff; border-color:var(--rw-blue); background:var(--rw-blue); font-weight:600; }
  body.pc-ui-preview .report-workspace #rwQuery:hover { background:#1f5093; }
  .report-workspace .rw-presets { display:flex; gap:2px; flex-wrap:wrap; padding:3px; border:1px solid #dee5ee; border-radius:6px; background:#edf1f6; }
  body.pc-ui-preview .report-workspace .rw-presets button { min-height:30px; padding:5px 10px; border-color:transparent; background:transparent; font-size:13px; }
  body.pc-ui-preview .report-workspace .rw-presets button[aria-pressed="true"] { background:#fff; color:var(--rw-blue); border-color:#dbe4ef; box-shadow:0 1px 3px #223c5a09; font-weight:700; }
  .report-workspace #rwPending { font-size:13px; margin:10px 0 0; color:#926024; }
  .report-workspace #rwPending:empty { display:none; }
  .report-workspace .rw-result-head { display:flex; align-items:center; gap:16px; margin:12px 0 14px; color:#52677f; font-size:13px; line-height:1.5; }
  .report-workspace #rwApplied::before { content:'统计范围'; margin-right:10px; color:#65778d; }
  body.pc-ui-preview .report-workspace #rwExport { min-height:38px; padding:8px 12px; white-space:nowrap; }
  .report-workspace .rw-metric-group { margin:0 0 14px; }
  body.pc-ui-preview .report-workspace .rw-metric-group h3 { font-size:14px; font-weight:600; color:#52677f; margin:0 0 8px; }
  .report-workspace .rw-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border:1px solid var(--rw-line); border-radius:9px; overflow:hidden; }
  body.pc-ui-preview .report-workspace .rw-metric {
    position:relative; display:flex; flex-direction:column; align-items:flex-start; justify-content:center;
    width:100%; min-width:0; min-height:98px; gap:10px; padding:18px 22px; text-align:left;
    border:0; border-right:1px solid var(--rw-line); border-radius:0; background:#fff;
  }
  body.pc-ui-preview .report-workspace .rw-metric:last-child { border-right:0; background:#f0f5fc; }
  body.pc-ui-preview .report-workspace .rw-cash-group .rw-metric:last-child { background:#f4f8fa; }
  body.pc-ui-preview .report-workspace .rw-metric:hover { background:#eaf2fc; }
  .report-workspace .rw-metric-label { color:#405870; font-size:14px; line-height:1.4; font-weight:400; padding-right:14px; }
  .report-workspace .rw-metric strong { font-family:"Segoe UI","Microsoft YaHei",sans-serif; color:#243b54; font-size:29px; font-weight:650; line-height:1.15; letter-spacing:-.5px; font-variant-numeric:tabular-nums; white-space:normal; overflow-wrap:anywhere; }
  .report-workspace .rw-metric[data-rw-metric="result"] strong { color:#245fac; }
  .report-workspace .rw-metric[data-rw-metric="cashNet"] strong { color:#246869; }
  .report-workspace .rw-metric strong .rw-currency { margin-right:5px; font-size:17px; font-weight:500; color:#8190a2; }
  .report-workspace .rw-metric-arrow { position:absolute; right:18px; top:19px; color:#8b9cb0; font-size:16px; }
  .report-workspace .rw-metric:focus-visible { outline-offset:-4px; }
  .report-workspace .rw-trend { margin-top:18px; padding:16px 0 0; border-top:1px solid var(--rw-line); }
  .report-workspace .rw-section-head { display:flex; justify-content:space-between; align-items:center; gap:16px; }
  body.pc-ui-preview .report-workspace .rw-section-head h3 { font-size:14px; margin:0; color:#304760; font-weight:600; }
  .report-workspace .rw-legend { display:flex; align-items:center; gap:18px; font-size:13px; color:#52677f; }
  .report-workspace .rw-legend > span { white-space:nowrap; }
  .report-workspace .rw-legend > span::before { content:''; display:inline-block; width:7px; height:7px; border-radius:2px; margin-right:7px; background:#237d80; }
  .report-workspace .rw-legend > span:nth-child(2)::before { background:#658ab8; }
  body.pc-ui-preview .report-workspace .rw-legend button { min-height:30px; border:0; color:#526c8b; padding:4px 0 4px 8px; }
  .report-workspace .rw-chart-scroll { max-width:100%; overflow:auto; margin:14px 0 8px; }
  .report-workspace .rw-chart { width:100%; min-width:700px; max-height:250px; display:block; }
  .report-workspace .rw-chart-empty { padding:65px 16px; text-align:center; color:#75879c; background:#f8fafc; margin:16px 0; border-radius:8px; font-size:13px; }
  .report-workspace .rw-secondary { display:flex; flex-wrap:wrap; gap:10px; border-top:1px solid var(--rw-line); padding-top:14px; margin-top:8px; }
  body.pc-ui-preview .report-workspace .rw-warning { background:#fff9ef; color:#926024; border-color:#eeddbc; }
  .report-workspace .rw-secondary .rw-warning { margin-left:auto; }
  .report-workspace .rw-local-filters { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:0 0 10px; }
  .report-workspace .rw-local-filters input[type="search"] { width:280px; max-width:100%; }
  .report-workspace .rw-local-filters select { width:auto; min-width:140px; }
  .report-workspace .rw-local-filters label { display:flex; align-items:center; gap:8px; margin:0; font-size:13px; color:#52677f; font-weight:400; }
  .report-workspace .rw-local-filters input[type="checkbox"] { width:15px; height:15px; min-height:15px; margin:0; accent-color:var(--rw-blue); }
  .report-workspace .table-scroll { width:100%; margin:0; border:1px solid var(--rw-line); border-radius:8px; overflow:auto; }
  .report-workspace table { width:100%; margin:0; border-collapse:collapse; font-size:14px; line-height:1.6; }
  .report-workspace table :is(th,td) { padding:11px 14px; border:0; border-bottom:1px solid #e9edf3; vertical-align:middle; text-align:left; }
  .report-workspace table th { color:#52677f; font-size:13px; font-weight:600; background:#f4f7fb; white-space:nowrap; }
  .report-workspace table td { color:#3d526a; }
  .report-workspace table tbody tr:last-child td { border-bottom:0; }
  .report-workspace table tbody tr:nth-child(even) { background:#fcfdff; }
  .report-workspace table tbody tr:hover { background:#f5f8fc; }
  .report-workspace table tfoot { background:#f0f5fc; }
  .report-workspace table tfoot td { color:#263f5d; font-weight:700; border-top:1px solid #d8e3f0; border-bottom:0; }
  .report-workspace table .rw-number { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
  .report-workspace .rw-unregistered { color:#8b6b25; font-weight:600; }
  .report-workspace table .rw-empty, .report-workspace table td[colspan] { padding:56px 20px; text-align:center; color:#7a8a9f; }
  body.pc-ui-preview .report-workspace .rw-project-link { background:transparent; border:0; border-radius:0; color:#285f9f; text-align:left; padding:0; min-height:26px; font-size:14px; font-weight:500; }
  body.pc-ui-preview .report-workspace .rw-project-link:hover { text-decoration:underline; }
  .report-workspace .rw-negative, .report-workspace .rw-negative strong { color:#ac6438 !important; }
  body.pc-ui-preview .report-workspace .rw-back { padding:0; min-height:28px; border:0; color:#5a7697; margin:0 0 14px; background:transparent; }
  .report-workspace .rw-analysis-foot { margin-top:18px; text-align:right; }
  .report-workspace #reportResult > .cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:14px 0; }
  .report-workspace #reportResult > .cards .stat { min-width:0; padding:20px; border:1px solid var(--rw-line); border-radius:8px; background:#fff; box-shadow:none; }
  .report-workspace #reportResult > .cards .stat:last-child { background:#f0f5fc; }
  .report-workspace #reportResult > .cards .stat .num { font-family:"Segoe UI",sans-serif; font-size:27px; color:#254e80; font-variant-numeric:tabular-nums; }
  .report-workspace #reportResult > .cards [role="button"] { cursor:pointer; }
  .report-workspace #reportResult > .cards [role="button"]:hover { border-color:#8caed5; background:#f5f9fe; }
  .report-workspace #reportResult > .cards small { display:block; margin-top:8px; color:#52677f; font-size:13px; }
  body.pc-ui-preview .report-workspace #reportResult > h3 { margin:4px 0 16px; font-size:18px; color:#304760; }
  .report-workspace .report-section-title { margin:18px 0 10px; font-size:14px; color:#304760; }
  .report-workspace .project-report-detail-filter-strip { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 10px; padding:0; background:transparent; border:0; }
  .report-workspace .project-report-detail-filter-strip :is(input,select) { flex:1 1 135px; width:auto; min-width:0; }
  body.pc-ui-preview .report-workspace #resetProjectReportDetailFilter { flex:0 0 auto; min-height:38px; }
  .report-workspace #reportResult > .table-scroll table :is(th,td):nth-child(6) { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
  .report-workspace .report-error { padding:20px; color:#a03a31; background:#fff4f2; border-radius:8px; }
  .report-workspace .report-loading { padding:60px; color:#7b899c; text-align:center; }
  .report-workspace .rw-dialog { width:min(1050px,90vw); max-height:85vh; border:1px solid #d9e3ed; border-radius:12px; padding:0; box-shadow:0 24px 80px #12294340; color:var(--rw-ink); }
  .report-workspace .rw-dialog::backdrop { background:#172b4666; }
  .report-workspace .rw-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 24px; border-bottom:1px solid #e3eaf2; position:sticky; top:0; background:white; z-index:1; }
  body.pc-ui-preview .report-workspace .rw-dialog > header h3 { margin:0; font-size:17px; }
  .report-workspace .rw-dialog-body { padding:24px; }
  .report-workspace .rw-dialog dt { font-size:14px; font-weight:600; margin:18px 0 6px; }
  .report-workspace .rw-dialog dt:first-child { margin-top:0; }
  .report-workspace .rw-dialog dd { margin:0; line-height:1.9; font-size:14px; color:#52677f; }
  .report-workspace .rw-dialog select { width:auto; max-width:100%; }
}
@media (min-width:769px) and (max-width:1150px) {
  body.pc-ui-preview .report-workspace { padding:16px 20px; }
  .report-workspace .rw-header { gap:16px; }
  .report-workspace .rw-dates { grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:10px; }
  .report-workspace .rw-presets { grid-column:1 / 3; justify-self:start; }
  .report-workspace #rwExport { grid-column:3; justify-self:end; }
  .report-workspace .rw-metric strong { font-size:24px; }
  body.pc-ui-preview .report-workspace .rw-metric { padding:18px 16px; }
  .report-workspace .rw-metric-arrow { right:12px; }
  .report-workspace .rw-legend { gap:12px; }
  .report-workspace table :is(th,td) { padding:12px; }
  .report-workspace #reportResult > .cards .stat { padding:16px; }
  .report-workspace #reportResult > .cards .stat .num { font-size:23px; }
}
@media (min-width:769px) and (max-width:900px) {
  body.pc-ui-preview #receivableEditForm { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.pc-ui-preview #receivableEditInvoiceSummary .quote-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-workspace .rw-dates .rw-presets { flex-basis:auto; }
  .report-workspace .rw-header { gap:0 10px; flex-wrap:wrap; }
  .report-workspace .rw-header .rw-tabs { order:3; width:100%; }
  .report-workspace .rw-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.pc-ui-preview .report-workspace .rw-metric:nth-child(2) { border-right:0; }
  body.pc-ui-preview .report-workspace .rw-metric:last-child { grid-column:1 / -1; border-top:1px solid var(--rw-line); }
  .report-workspace .rw-metric strong { font-size:23px; }
  .report-workspace .rw-metric-label { font-size:13px; }
  .report-workspace .rw-section-head { align-items:flex-start; flex-direction:column; gap:12px; }
}
@media (prefers-reduced-motion:reduce) {
  body.pc-ui-preview .report-workspace button { transition:none; }
}
@media (min-width:769px) {
  .report-workspace .rw-metric > small { color:#61758c; font-size:12px; font-weight:400; line-height:1.5; }
  .report-workspace .rw-collection-summary { margin:16px 0 24px; padding:18px; background:#f6f9fd; border:1px solid #dce5f1; border-radius:8px; }
  .report-workspace .rw-collection-summary h4 { margin:0 0 8px; }
  .report-workspace .rw-collection-summary p { margin:0 0 12px; line-height:1.6; }
}
@media (min-width:769px) {
  body.pc-ui-preview .fund-payment-form { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end; }
  body.pc-ui-preview .fund-payment-form label { display:grid; gap:7px; min-width:0; font-size:13px; color:#334e6a; }
  body.pc-ui-preview .fund-payment-form label > :is(input,select) { width:100%; min-width:0; box-sizing:border-box; }
  body.pc-ui-preview .fund-payment-note { grid-column:1/-1; margin:0 0 5px; line-height:1.6; color:#62748a; }
  body.pc-ui-preview .fund-payment-form > button { width:max-content; }
}
@media (min-width:769px) and (max-width:1100px) {
  body.pc-ui-preview .fund-payment-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (min-width:769px) {
  body.pc-ui-preview .finance-a-funds .finance-a-list-panel > .table-scroll > table { min-width:0; width:100%; table-layout:fixed; }
  body.pc-ui-preview .finance-a-funds .finance-a-list-panel > .table-scroll > table > thead > tr > th:nth-child(n+8),
  body.pc-ui-preview .finance-a-funds .finance-a-list-panel > .table-scroll > table > tbody > tr[data-request-status] > td:nth-child(n+8) { display:none; }
  body.pc-ui-preview .finance-a-funds .finance-a-list-panel > .table-scroll > table > thead > tr > th:first-child { width:45px; }
  body.pc-ui-preview .finance-a-funds .finance-a-list-panel > .table-scroll > table > tbody > tr[data-request-status] > td { overflow-wrap:anywhere; }
  body.pc-ui-preview .finance-a-funds .fund-request-detail-row .client-detail-panel { min-width:0; max-width:100%; box-sizing:border-box; }
  body.pc-ui-preview .finance-a-funds .fund-request-detail-row { scroll-margin-top:85px; }
}
.payable-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.payable-actions button{width:auto}.payable-plan-line{display:grid;grid-template-columns:1fr 1.2fr 1fr auto;gap:10px;align-items:end;border-bottom:1px solid #dde5ee;padding:12px 0}.payable-dialog{width:min(900px,90vw)}.payable-dialog [data-plans]{min-width:0}.payable-dialog input,.payable-dialog select{min-width:0}.finance-a-funds .finance-a-field.hidden{display:none!important}
@media(min-width:769px){body.pc-ui-preview .finance-a-funds .finance-a-list-panel{grid-template-columns:minmax(0,1fr)}body.pc-ui-preview .finance-a-funds .finance-a-list-panel>*{min-width:0;max-width:100%;box-sizing:border-box}body.pc-ui-preview .finance-a-funds .fund-request-filter-strip{display:flex}}
@media(min-width:769px){body.pc-ui-preview .finance-a-funds{min-width:0;max-width:100%;box-sizing:border-box}body.pc-ui-preview .fund-payment-form .fund-payment-note strong{display:block;padding:10px;background:#edf4fc;color:#274966;overflow-wrap:anywhere}body.pc-ui-preview .finance-a-funds .fund-request-filter-strip{flex-wrap:wrap}body.pc-ui-preview .finance-a-funds .fund-request-filter-strip>*{min-width:0;flex:1 1 145px}body.pc-ui-preview .fund-payment-form details{min-width:0}}
@media(max-width:900px){.payable-plan-line{grid-template-columns:1fr 1fr}}

/* Receivables: compact desktop ledger. Data calculations and mobile ledger stay unchanged. */
.receivable-filter-strip > label { display:grid; gap:5px; min-width:0; margin:0; }
.receivable-filter-strip > label > span { color:#65768b; font-size:12px; font-weight:400; line-height:1.4; }
.receivable-filter-strip > label > :is(input,select) { min-width:0; width:100%; box-sizing:border-box; }
@media (min-width:769px) {
  body.pc-ui-preview .finance-a-receivables.receivable-workspace {
    --rl-ink:#243b53; --rl-muted:#6b7c91; --rl-line:#e5eaf0;
    font-family:"Microsoft YaHei","Segoe UI",sans-serif; color:var(--rl-ink); gap:8px;
  }
  .receivable-workspace :is(button,input,select,textarea) { font-family:inherit; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace > .panel { padding:12px 20px; margin-bottom:0; gap:0; border-radius:10px; box-shadow:none; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .section-head { margin:0 0 8px; padding:0 0 6px; border-color:var(--rl-line); gap:12px; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .section-head h3 { margin:0; font-size:18px; font-weight:650; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-overview-panel h3 { font-size:21px; }
  .receivable-workspace .receivable-overview-actions { display:flex; align-items:center; gap:16px; }
  .receivable-workspace .section-head-note { font-size:12px; line-height:1.5; color:var(--rl-muted); }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace button { border-radius:6px; box-shadow:none; font-weight:500; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace #receivableCreateToggle,
  body.pc-ui-preview .finance-a-receivables.receivable-workspace #receivableExport { width:auto; margin:0; min-height:34px; padding:7px 14px; font-size:13px; white-space:nowrap; }
  .receivable-workspace .receivable-overview-metrics { display:grid; grid-template-columns:minmax(195px,1.05fr) minmax(195px,1fr) minmax(320px,1.9fr); gap:22px; align-items:center; padding:0; }
  .receivable-workspace :is(.receivable-primary-metric,.receivable-reference-metric) { display:grid; gap:3px; min-width:0; }
  .receivable-workspace :is(.receivable-primary-metric,.receivable-reference-metric) > span { font-size:13px; color:#52667d; }
  .receivable-workspace :is(.receivable-primary-metric,.receivable-reference-metric) > strong { font-size:28px; line-height:1.3; font-weight:650; color:#126f72; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
  .receivable-workspace .receivable-reference-metric > strong { font-size:23px; color:#334e68; }
  .receivable-workspace :is(.receivable-primary-metric,.receivable-reference-metric) small { font-size:12px; color:var(--rl-muted); font-weight:400; line-height:1.5; }
  .receivable-workspace .receivable-reference-metric > span small { padding:2px 5px; margin-left:4px; border-radius:4px; background:#f1f4f7; }
  .receivable-workspace .receivable-secondary-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 18px; padding-left:22px; border-left:1px solid var(--rl-line); }
  .receivable-workspace .receivable-secondary-metrics > div { display:grid; gap:2px; min-width:0; }
  .receivable-workspace .receivable-secondary-metrics span { font-size:12px; line-height:1.4; color:var(--rl-muted); }
  .receivable-workspace .receivable-secondary-metrics strong { font-size:15px; color:#455d77; font-weight:550; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-filter-strip { display:grid; grid-template-columns:minmax(180px,1.6fr) repeat(2,minmax(105px,.8fr)) repeat(2,minmax(125px,.9fr)) auto; gap:10px; align-items:end; border:0; padding:0; margin:0; background:transparent; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-filter-strip :is(input,select) { height:36px; min-height:36px; margin:0; padding:6px 9px; border-color:#d9e1e9; border-radius:6px; font-size:13px; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace #receivableTableClearFilters { height:36px; min-height:36px; margin:0; padding:6px 10px; width:auto; border:1px solid #d9e1e9; background:white; color:#52667d; font-size:13px; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-filter-summary { display:flex; flex-wrap:wrap; margin:8px 0; gap:4px 18px; padding:0; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-filter-summary .page-chip { padding:0; border:0; border-radius:0; background:transparent; color:#52667d; font-size:12px; font-weight:500; line-height:1.6; font-variant-numeric:tabular-nums; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-list-panel { grid-template-columns:minmax(0,1fr); min-width:0; max-width:100%; box-sizing:border-box; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-list-panel > *,
  body.pc-ui-preview .finance-a-receivables.receivable-workspace [data-receivable-group] { min-width:0; max-width:100%; box-sizing:border-box; }
  body.pc-ui-preview .receivable-workspace .receivable-page-hidden { display:none !important; }
  .receivable-workspace [data-receivable-group] { scroll-margin-top:84px; }
  .receivable-workspace .receivable-pagination { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; padding:12px 0 0; color:#78899b; font-size:12px; }
  .receivable-workspace .receivable-pagination > div { display:flex; align-items:center; gap:10px; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-pagination button { width:auto; min-height:30px; margin:0; padding:5px 10px; border:1px solid #d9e3ed; background:#fff; color:#486b91; font-size:12px; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-pagination button:disabled { opacity:.45; cursor:default; }
  .receivable-workspace .receivable-page-number { min-width:36px; text-align:center; font-variant-numeric:tabular-nums; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-scroll { border:0; border-radius:0; overflow:visible; margin:0; padding:0; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table { min-width:0; width:100%; margin:0; table-layout:fixed; border-collapse:separate; border-spacing:0; font-size:13px; line-height:1.6; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table > :is(thead,tbody) > tr > :is(th,td) { border:0; border-bottom:1px solid var(--rl-line); padding:11px 10px; vertical-align:middle; overflow-wrap:anywhere; white-space:normal; background:transparent; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table > thead > tr > th { position:sticky; top:64px; z-index:3; padding-block:9px; background:#f5f7fa; color:#61758b; font-size:12px; font-weight:500; box-shadow:0 1px 0 var(--rl-line); }
  .receivable-workspace .receivable-ledger-table .receivable-item-heading { width:27%; }
  .receivable-workspace .receivable-ledger-table .receivable-status-heading { width:11%; }
  .receivable-workspace .receivable-ledger-table th.receivable-number { width:11%; }
  .receivable-workspace .receivable-ledger-table .receivable-date-heading { width:15%; }
  .receivable-workspace .receivable-ledger-table .receivable-actions-heading { width:14%; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table .receivable-number { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; overflow-wrap:normal; }
  .receivable-workspace .receivable-ledger-table .receivable-outstanding { color:#0b7476; font-weight:650; }
  .receivable-workspace .receivable-ledger-table .receivable-received { color:#65788c; }
  .receivable-workspace .receivable-ledger-table .receivable-balance { color:#52667d; font-weight:600; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table .cell-main { font-size:13px; font-weight:500; color:#334e68; }
  .receivable-workspace .receivable-ledger-table .cell-sub { display:block; font-size:12px; line-height:1.6; color:var(--rl-muted); margin:3px 0 0; }
  .receivable-workspace .receivable-item-cell > strong { display:block; font-size:14px; font-weight:500; line-height:1.6; color:#243b53; }
  .receivable-workspace .receivable-status-tag { display:inline-block; font-size:12px; line-height:1.5; padding:2px 6px; border-radius:4px; background:#f0f4f8; color:#526b85; }
  .receivable-workspace .receivable-status-tag.is-paid { color:#31776c; background:#edf6f3; }
  .receivable-workspace .receivable-status-tag.is-unplanned { background:#f4f5f7; color:#738093; }
  .receivable-workspace .receivable-due-tag { display:block; width:max-content; max-width:100%; margin-top:5px; padding:1px 5px; border-radius:4px; font-size:12px; line-height:1.5; }
  .receivable-workspace .receivable-due-tag.is-overdue { color:#b1473d; background:#fff2ef; }
  .receivable-workspace .receivable-due-tag.is-upcoming { color:#9b6a21; background:#fff7e7; }
  .receivable-workspace .receivable-table-actions .table-action-group { display:flex; flex-wrap:wrap; gap:4px 7px; align-items:center; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table .receivable-table-actions .tiny { min-height:30px; margin:0; padding:5px 8px; width:auto; font-size:12px; white-space:nowrap; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table .receivable-text-action,
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table :is(.edit-receivable,.del-receivable) { min-height:28px; padding:4px 0; border:0; border-radius:0; background:transparent; color:#526f92; box-shadow:none; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table .del-receivable { color:#92645c; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table .receivable-text-action:hover { color:#155bbe; text-decoration:underline; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table .receivable-plan-open { border:1px solid #d8e3ef; color:#396489; background:#fff; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table .receivable-detail-row > td { padding:14px; background:#f8fafc; }
  .receivable-workspace .receivable-ledger-table .receivable-detail-panel { border:0; box-shadow:none; padding:0; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table .receivable-group-empty td { text-align:center; padding:22px 10px; color:var(--rl-muted); font-size:13px; }
  .receivable-workspace .receivable-main-row { scroll-margin-top:110px; }
}
@media (min-width:769px) and (max-width:1199px) {
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-filter-strip { grid-template-columns:minmax(180px,1.5fr) repeat(2,minmax(125px,1fr)); }
  .receivable-workspace .receivable-overview-metrics { grid-template-columns:1fr 1fr; gap:14px 20px; }
  .receivable-workspace .receivable-secondary-metrics { grid-column:1/-1; grid-template-columns:repeat(4,minmax(0,1fr)); border-left:0; border-top:1px solid var(--rl-line); padding:12px 0 0; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-scroll { overflow:auto; max-height:68vh; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table { min-width:1000px; }
  body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table > thead > tr > th { top:0; }
}
@media (max-width:768px) {
  .receivable-filter-strip > label { flex:1 1 135px; }
}

/* Desktop receivable record: standalone page, with list forms retained offscreen. */
@media (min-width:769px) {
  body.pc-ui-preview .receivable-workspace.is-receivable-detail > :is(.receivable-overview-panel,.receivable-list-panel,.receivable-create-panel) { display:none !important; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view { min-width:0; max-width:100%; color:#243b53; }
  body.pc-ui-preview .receivable-workspace .receivable-back-to-list { display:inline-block; margin:0 0 16px; padding:0; width:auto; min-height:26px; border:0; border-radius:0; background:transparent; color:#587696; font-size:13px; }
  body.pc-ui-preview .receivable-workspace .receivable-back-to-list:hover { color:#155bbe; text-decoration:underline; }
  .receivable-detail-view .receivable-detail-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin:0 0 18px; }
  .receivable-detail-view .receivable-detail-heading > div:first-child { min-width:0; flex:1; }
  .receivable-detail-view .receivable-detail-eyebrow { margin:0 0 6px; color:#78899b; font-size:12px; }
  .receivable-detail-view .receivable-detail-heading h2 { font-size:23px; line-height:1.5; font-weight:650; color:#20364f; margin:0; overflow-wrap:anywhere; outline:none; }
  .receivable-detail-view .receivable-detail-context { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; color:#6c8094; font-size:13px; line-height:1.7; margin:8px 0 0; }
  .receivable-detail-view .receivable-detail-context .receivable-due-tag { margin:0; }
  .receivable-detail-view .receivable-detail-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
  .receivable-detail-view .receivable-detail-heading > .receivable-detail-actions { flex:0 0 auto; justify-content:flex-end; max-width:260px; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-actions button { width:auto; margin:0; padding:7px 12px; min-height:34px; font-size:13px; white-space:nowrap; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-actions .secondary,
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-section-head > button { border:1px solid #d9e3ed; color:#486b91; background:#fff; box-shadow:none; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-heading .receive-receivable { min-height:38px; padding:9px 18px; font-weight:600; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .panel { padding:20px 22px; min-width:0; max-width:100%; box-sizing:border-box; border:1px solid #dfe6ee; border-radius:10px; box-shadow:none; margin:0; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-amount-panel { margin:0 0 18px; }
  .receivable-detail-view .receivable-detail-amounts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
  .receivable-detail-view .receivable-detail-amounts > div { display:grid; gap:7px; min-width:0; }
  .receivable-detail-view .receivable-detail-amounts > div + div { padding-left:24px; border-left:1px solid #e8edf2; }
  .receivable-detail-view .receivable-detail-amounts span { color:#6f8196; font-size:13px; }
  .receivable-detail-view .receivable-detail-amounts strong { color:#334e68; font-size:28px; line-height:1.3; font-weight:650; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
  .receivable-detail-view .receivable-detail-amounts > div:last-child strong { color:#0b7476; }
  .receivable-detail-view .receivable-detail-amounts.is-unplanned { grid-template-columns:1fr; }
  .receivable-detail-view .receivable-detail-amounts.is-unplanned strong { color:#435e79; }
  .receivable-detail-view .receivable-detail-amounts small { color:#6f8196; font-size:12px; line-height:1.6; }
  .receivable-detail-view .receivable-detail-settlement-note { padding-top:12px; margin:14px 0 0; border-top:1px solid #edf0f5; color:#62778c; font-size:12px; line-height:1.7; }
  .receivable-detail-view .receivable-detail-columns { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:20px; align-items:start; }
  .receivable-detail-view :is(.receivable-detail-main,.receivable-detail-side) { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; min-width:0; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-section h3 { margin:0 0 14px; color:#2e4761; font-size:15px; line-height:1.5; font-weight:600; }
  .receivable-detail-view .receivable-detail-section-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-section-head h3 { margin:0; }
  .receivable-detail-view .receivable-detail-section-head h3 span { font-size:12px; margin-left:7px; color:#8593a3; font-weight:400; }
  .receivable-detail-view .receivable-detail-section-head > span { font-size:12px; color:#788b9e; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-section-head > button { width:auto; min-height:30px; margin:0; font-size:12px; }
  .receivable-detail-view .receivable-detail-facts { display:grid; grid-template-columns:minmax(0,1fr); gap:13px; margin:0; }
  .receivable-detail-view .receivable-detail-facts > div { display:grid; grid-template-columns:90px minmax(0,1fr); align-items:baseline; gap:12px; }
  .receivable-detail-view .receivable-detail-facts dt { margin:0; color:#8290a0; font-size:12px; line-height:1.6; }
  .receivable-detail-view .receivable-detail-facts dd { margin:0; color:#405b77; font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
  .receivable-detail-view .receivable-detail-side .receivable-detail-facts > div { grid-template-columns:82px minmax(0,1fr); gap:10px; }
  .receivable-detail-view .receivable-detail-side .receivable-detail-actions { margin-top:16px; }
  .receivable-detail-view .receivable-detail-notes { margin-top:16px; border-top:1px solid #edf0f5; padding-top:14px; }
  .receivable-detail-view .receivable-detail-notes h4 { margin:0 0 7px; color:#6d8196; font-size:12px; font-weight:500; }
  .receivable-detail-view .receivable-detail-notes p { margin:0; color:#405b77; font-size:13px; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; }
  .receivable-detail-view .receivable-detail-copy { font-size:14px; color:#526e87; line-height:1.8; margin:0; }
  .receivable-detail-view .receivable-detail-empty { margin:0; padding:14px 0; font-size:13px; color:#77899c; line-height:1.7; }
  .receivable-detail-view .receivable-detail-footnote { margin:12px 0 0; font-size:12px; line-height:1.7; color:#8290a0; }
  .receivable-detail-view .receivable-reference-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 24px; }
  .receivable-detail-view .receivable-reference-grid > div { display:grid; gap:5px; min-width:0; }
  .receivable-detail-view .receivable-reference-grid span { font-size:12px; color:#7d8fa1; }
  .receivable-detail-view .receivable-reference-grid strong { font-size:17px; color:#536c85; font-weight:550; line-height:1.5; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
  .receivable-detail-view .receivable-detail-record-meta { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; color:#8b97a6; font-size:12px; padding:0 3px; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-record-meta button { width:auto; border:0; background:transparent; padding:0; color:#97776d; font-size:12px; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-payments .table-scroll { width:100%; max-width:100%; min-width:0; overflow:auto; margin:0; border:0; border-radius:0; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-payments table { width:100%; min-width:760px; border-collapse:collapse; table-layout:auto; font-size:13px; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-payments :is(th,td) { padding:10px 12px; border:0; border-bottom:1px solid #e7edf3; text-align:left; vertical-align:top; line-height:1.7; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-payments th { font-size:12px; color:#7a8b9e; background:#f5f7fa; font-weight:500; white-space:nowrap; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-payments td { color:#405b77; white-space:normal; overflow-wrap:anywhere; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .receivable-detail-payments :is(th,td):nth-child(3) { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
  .receivable-detail-view .receivable-detail-payments td:last-child { min-width:130px; white-space:pre-wrap; }
}
@media (min-width:769px) and (max-width:1199px) {
  .receivable-detail-view .receivable-detail-columns { grid-template-columns:minmax(0,1fr) 270px; gap:14px; }
  body.pc-ui-preview .receivable-workspace .receivable-detail-view .panel { padding:16px; }
  .receivable-detail-view .receivable-detail-amounts strong { font-size:24px; }
  .receivable-detail-view .receivable-detail-heading { align-items:flex-start; }
}
@media (min-width:769px) and (max-width:1000px) {
  .receivable-detail-view .receivable-detail-columns { grid-template-columns:minmax(0,1fr); }
  .receivable-detail-view .receivable-detail-side { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .receivable-detail-view .receivable-detail-side > :last-child { grid-column:1/-1; }
  .receivable-detail-view .receivable-detail-heading { flex-direction:column; gap:12px; }
  .receivable-detail-view .receivable-detail-heading > .receivable-detail-actions { max-width:none; }
}
/* Supplementing a receivable is a secondary workflow; receipts stay on the ledger. */
@media(min-width:769px){
body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-single-toolbar{grid-template-columns:auto minmax(130px,1.8fr) minmax(90px,.7fr) minmax(116px,.8fr) minmax(350px,1.25fr) auto auto;align-items:center;gap:6px;margin:0 0 8px}
body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-single-toolbar #receivableTableClearFilters{width:52px;padding:6px}
body.pc-ui-preview .receivable-single-toolbar .receivable-toolbar-title{margin:0;white-space:nowrap;font-size:14px}
body.pc-ui-preview .receivable-single-toolbar>label>span{display:none}
body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-date-range{display:flex;align-items:center;gap:3px;height:36px;box-sizing:border-box;padding:0 5px;border:1px solid #d9e1e9;border-radius:6px;min-width:0;background:#fff}
body.pc-ui-preview .receivable-date-range>span{white-space:nowrap;font-size:12px;color:#65768b}
body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-date-range>input{flex:1 1 0;width:0;min-width:0;height:32px;min-height:32px;border:0;padding:2px;font-size:12px;box-shadow:none;background:transparent}
body.pc-ui-preview .receivable-date-range:focus-within{outline:2px solid #94baff;outline-offset:1px}
}
@media(min-width:769px) and (max-width:1150px){body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-single-toolbar{grid-template-columns:auto 1fr 1fr auto}body.pc-ui-preview .receivable-single-toolbar .receivable-date-range{grid-column:span 2}}
@media(min-width:769px){
body.pc-ui-preview .receivable-workspace .receivable-ledger-scroll{max-height:none;overflow-y:visible;box-sizing:border-box}
body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table > :is(thead,tbody) > tr > :is(th,td){padding:3px 9px;line-height:1.35}
body.pc-ui-preview .receivable-workspace .receivable-ledger-table :is(.cell-main,.cell-sub){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.3;margin-top:2px}
body.pc-ui-preview .receivable-workspace .receivable-pagination{padding-top:7px}
body.pc-ui-preview .finance-a-receivables.receivable-workspace>.panel{padding:9px 16px}
body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-overview-metrics{gap:12px}
body.pc-ui-preview .finance-a-receivables.receivable-workspace :is(.receivable-primary-metric,.receivable-reference-metric){grid-template-columns:auto 1fr;align-items:center;gap:2px 12px}
body.pc-ui-preview .finance-a-receivables.receivable-workspace :is(.receivable-primary-metric,.receivable-reference-metric)>strong{font-size:21px}
body.pc-ui-preview .finance-a-receivables.receivable-workspace :is(.receivable-primary-metric,.receivable-reference-metric)>small{grid-column:1/-1}
body.pc-ui-preview .receivable-workspace .receivable-secondary-metrics>div{grid-template-columns:1fr auto;align-items:center;gap:6px}
body.pc-ui-preview .receivable-workspace .receivable-ledger-table .receivable-item-heading{width:24%}
body.pc-ui-preview .receivable-workspace .receivable-ledger-table .receivable-status-heading{width:10%}
body.pc-ui-preview .receivable-workspace .receivable-ledger-table th.receivable-number{width:10%}
body.pc-ui-preview .receivable-workspace .receivable-ledger-table .receivable-date-heading{width:14%}
body.pc-ui-preview .receivable-workspace .receivable-ledger-table .receivable-actions-heading{width:22%}
body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table .table-action-group{display:flex;flex-wrap:wrap;gap:3px;align-items:center}
body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table .table-action-group button{display:inline-flex;width:auto;min-height:24px;margin:0;padding:3px 6px;white-space:nowrap;line-height:1.2}
body.pc-ui-preview .finance-a-receivables.receivable-workspace .receivable-ledger-table .receivable-table-actions button.tiny{min-height:24px;padding:3px 6px;line-height:1.2}
}
.receivable-supplement-guide { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; background:#f6f9fc; border:1px solid #e2e9f1; border-radius:6px; color:#526681; font-size:13px; }
.receivable-supplement-guide > div { display:flex; gap:8px; flex-shrink:0; }
.receivable-supplement-guide button.secondary { width:auto; white-space:nowrap; margin:0; padding:7px 10px; color:#32577e; background:#fff; border:1px solid #d5deea; font-weight:500; }
.receivable-supplement-options { padding:0; border:0; background:transparent; }
.receivable-supplement-options > summary { cursor:pointer; color:#58708e; font-size:13px; }
.receivable-supplement-optional-fields { display:grid; grid-template-columns:minmax(180px,1fr) 2fr; gap:14px; margin-top:10px; }
.receivable-supplement-optional-fields label { display:grid; gap:5px; font-size:13px; }
.receivable-supplement-form .modal-actions { align-items:center; margin-top:0; }
@media (min-width:901px) {
  body.pc-ui-preview .receivable-workspace .receivable-create-toggle { color:#526681; border:1px solid #d5deea; background:#fff; box-shadow:none; }
  body.pc-ui-preview .receivable-workspace .receivable-supplement-form { gap:12px 16px; }
  body.pc-ui-preview .receivable-workspace .receivable-supplement-form > .receivable-form-field { margin:0; }
  body.pc-ui-preview .receivable-workspace .receivable-supplement-form textarea { min-height:60px; }
}
@media (max-width:1100px) {
  .receivable-supplement-guide { flex-wrap:wrap; }
}
@media (max-width:600px) {
  .receivable-supplement-optional-fields { grid-template-columns:1fr; }
  .receivable-supplement-form .modal-actions { flex-wrap:wrap; }
}

/* Keep the relocated advance entry in the existing compact receivable heading. */
body.pc-ui-preview .receivable-workspace #receivableAdvanceEntries{width:auto;min-height:30px;margin:0;padding:5px 10px;white-space:nowrap;flex:none;font-size:13px}
body.pc-ui-preview .receivable-workspace .receivable-overview-actions:has(#receivableAdvanceEntries){flex-wrap:nowrap;min-width:0}
