/* ==========================================================================
   IDE-005 — the invoice editor's Payment block (Pages/Accounting/InvoicePaymentBlock.razor) under the lines and their
   totals, and the bar's cash payment / cash order link (InvoiceCashOrderCommand.razor). The fields are .form-pairs
   (css/onix-form.css); every colour is a token of css/onix-theme.css, so both themes follow.
   ========================================================================== */

.invoice-payment {
    margin: 10px 0 8px;
    padding-top: 6px;
    border-top: 1px solid var(--hairline);
    min-width: 0;
}
.invoice-payment__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
}
.invoice-payment > .form-lock { margin: 0; padding: 0; border: 0; min-width: 0; }
.invoice-payment .form-pairs { margin-bottom: 0; }
.invoice-payment__state .onix-chip { justify-self: start; }
.invoice-payment__readonly > .form-column__text {
    display: block;
    min-height: 1.6em;
    line-height: 1.6em;
    color: var(--ink);
}

/* The bar: "Cash payment (РКО)" and, once booked, the link to its order. */
.editor-cash-order { display: inline-flex; align-items: center; gap: 4px; }
.editor-cash-order__link {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-decoration: none;
}
.editor-cash-order__link:hover { text-decoration: underline; }

/* ==========================================================================
   ATP-018 — the stand-alone payment's Reconcile step (Pages/Accounting/PaymentReconcileStep.razor, a .drawer) and what
   a posted payment settled (PaymentsView.razor's card, .payment-settlements). Theme tokens only.
   ========================================================================== */

.payment-reconcile__items {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.payment-reconcile__items th,
.payment-reconcile__items td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--hairline);
    text-align: left;
    vertical-align: baseline;
}
.payment-reconcile__items th { color: var(--muted); font-weight: 600; }
.payment-reconcile__items .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.payment-reconcile__items tr.is-ticked td { background: var(--brand-soft); }
.payment-reconcile__tick { width: 28px; }
.payment-reconcile__totals {
    margin: 10px 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.payment-difference__hint { margin: 2px 0 6px; }

.payment-settlements {
    margin: 8px 0 12px;
    display: grid;
    gap: 4px;
    max-width: 640px;
    font-size: 0.9rem;
}
.payment-settlements__row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.payment-settlements__what { flex: 1 1 auto; }
.payment-settlements__row .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.payment-settlements__undo { color: var(--danger); }
