/* Tenant > Rent & Payments. Deliberately scoped; no global theme overrides. */
.td-rent-payments{grid-template-columns:minmax(0,1fr) minmax(335px,.52fr);align-items:start;gap:16px}
.td-rent-payments>aside{display:flex;flex-direction:column;gap:16px}
.td-rent-payments>aside>.td-card{margin:0;padding:17px}
.td-payment-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.td-payment-card-heading h2{margin:0!important}
.td-invoice-count{min-width:25px;padding:4px 7px;border-radius:6px;background:#edf4ff;color:#244d90;font-size:11px;font-weight:600;text-align:center}
.td-payment-help{font-size:11px;line-height:1.6;color:#66758e;margin:8px 0 12px}
.td-unpaid-scroll{max-height:420px;overflow:auto;overscroll-behavior:contain}
.td-unpaid-table{width:100%;min-width:0!important;table-layout:fixed}
.td-unpaid-table th:nth-child(1){width:25%}.td-unpaid-table th:nth-child(2){width:25%}.td-unpaid-table th:nth-child(3){width:29%}.td-unpaid-table th:nth-child(4){width:21%}
.td-unpaid-table thead th{position:sticky;top:0;z-index:1;background:#f2f6fc;padding:10px 5px;font-size:10px;white-space:normal;overflow-wrap:normal}
.td-unpaid-table td{padding:12px 5px;vertical-align:top;font-size:11px;line-height:1.5;word-break:normal}
.td-unpaid-table td:first-child{overflow-wrap:normal}
.td-unpaid-table .td-unpaid-amount{text-align:right;overflow-wrap:anywhere;font-weight:600;font-variant-numeric:tabular-nums}
.td-unpaid-table th:nth-child(2){text-align:right}
.td-unpaid-table .rp-badge{padding:3px 5px;font-size:10px;white-space:normal;overflow-wrap:normal}
.td-invoice-reference{display:block;margin-top:4px;font-size:9px;color:#486995;overflow-wrap:anywhere;line-height:1.45}
.td-payment-overdue{display:block;color:#b34336;font-size:9px;margin-top:3px}
.td-period-note{margin-bottom:0;font-size:10px}
.td-unpaid-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid #e4ebf4;margin-top:14px;padding-top:13px;font-size:11px;color:#53637c}
.td-unpaid-footer strong{text-align:right;color:#172c52;font-variant-numeric:tabular-nums}
.td-history-panel .rp-panel-title{gap:12px;align-items:center;flex-wrap:wrap}
.td-history-panel .rp-panel-title h2{margin:0}
.td-history-panel .pd-filter-toolbar{display:flex;align-items:center;gap:10px;margin:14px 0}
.td-history-panel .pd-filter-toolbar>[data-filter]{order:0;min-width:160px;flex:1 1 190px;min-height:38px;font-size:12px}
.td-history-panel .td-filter-toggle{order:1;min-height:38px}
.td-history-panel .pd-filter-toolbar>.rv-table-filters{order:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;width:100%;padding:14px;margin:0;background:#f7f9fc;border:1px solid #e2eaf3;border-radius:7px}
.td-history-panel .pd-filter-toolbar>.rv-table-filters[hidden]{display:none!important}
.td-history-panel .pd-filter-toolbar .rv-table-filters>label{display:grid;gap:6px;min-width:0;font-size:11px;font-weight:500;color:#52637c}
.td-history-panel .rv-table-filters input,.td-history-panel .rv-table-filters select{min-width:0;max-width:100%;height:37px;font-size:11px}
.td-history-panel .rv-table-filters>.btn{align-self:end;min-width:0;min-height:37px}
.td-history-panel .rp-table{min-width:720px}
.td-history-panel .rp-table th{font-size:11px}.td-history-panel .rp-table td{font-size:11px}
.td-payment-reference{display:block;font-size:10px;color:#72809a;margin-top:3px;white-space:normal;overflow-wrap:anywhere;max-width:185px}
.td-history-period-note{margin-top:-4px;margin-bottom:15px}
.td-history-filter-error{color:#aa3027;background:#fff3f1;border:1px solid #f2d3cd;border-radius:5px;padding:10px 12px;font-size:12px}
.td-history-filter-error[hidden]{display:none}
.td-history-panel .rp-pagination{flex-wrap:wrap;gap:10px}
.td-history-panel .rv-selection{flex-wrap:wrap}
.td-record-payment .rp-field{margin-bottom:14px;min-width:0}
.td-record-payment .rp-field input,.td-record-payment .rp-field select,.td-record-payment .rp-field textarea{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.td-record-payment .rp-field select{font-size:11px;text-overflow:ellipsis}
.td-record-payment .rp-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:13px}
.td-record-payment .rp-actions>.btn-primary{flex:1;min-height:40px}
.td-record-payment .rp-required[hidden]{display:none}
.td-record-summary{margin:14px 0 10px;padding:12px;background:#f7f9fc;border:1px solid #e2eaf3;border-radius:6px}
.td-record-summary>div{display:flex;justify-content:space-between;gap:12px;padding:5px 0;font-size:11px;line-height:1.5}
.td-record-summary dt{color:#687891}.td-record-summary dd{margin:0;text-align:right;font-weight:600;color:#1d355b;font-variant-numeric:tabular-nums}
.td-record-payment [data-profile-payment-feedback]:empty{display:none}
.td-record-payment button:disabled{cursor:wait;opacity:.7}
@media(max-width:1100px){.td-rent-payments{grid-template-columns:minmax(0,1fr) minmax(300px,.65fr)}.td-history-panel .pd-filter-toolbar>.rv-table-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.td-rent-payments .td-two{grid-template-columns:1fr}}
@media(max-width:950px){.td-rent-payments{grid-template-columns:minmax(0,1fr)}.td-rent-payments>aside{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}.td-rent-payments .td-two{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.td-rent-payments>aside,.td-rent-payments .td-two{display:grid;grid-template-columns:minmax(0,1fr)}.td-rent-payments>aside>.td-card{padding:14px}.td-history-panel .pd-filter-toolbar>.rv-table-filters{padding:11px;gap:10px}.td-history-panel .rp-pagination .ref-pages{width:100%;justify-content:space-between}.td-history-panel .pd-page-size{max-width:125px}.td-history-panel .rv-selection .btn{font-size:11px}.td-unpaid-table th:nth-child(1){width:26%}.td-unpaid-table th:nth-child(2){width:24%}.td-unpaid-table th:nth-child(3){width:29%}.td-unpaid-table th:nth-child(4){width:21%}}
@media print{.td-history-panel .rp-toolbar,.td-history-panel .rv-selection,.td-history-panel .rp-pagination,.td-history-panel [data-export],.td-record-payment{display:none!important}.td-rent-payments{display:block}.td-unpaid-scroll{max-height:none;overflow:visible}.td-history-panel .rp-table{min-width:0}}
