/* ============================================================================
   Bank Matching — the "Bank D" compact full-width list (IDE-027).

   Components: Pages/Accounting/BankMatchingControlRow.razor (the control row),
   BankMatchingRows.razor (the DataGrid grouped by day with the row anatomy),
   BankMatchingRowSummary.razor (the top of an expanded row), the two dialogs
   (BankStatementUploadDialog, BankTransactionDialog). Loaded after
   onix-datagrid.css, so the row rules below win over the grid's defaults.

   Colour language (theme tokens only): links / primary = --brand & --solid,
   receipts = --good, payments = --ink, the bar of a row to match = --warn, the
   bar of the expanded row = --brand. Every token has a dark value.
   ============================================================================ */

/* ─── Control row ────────────────────────────────────────────────────────── */
.bankmatch-control { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.bankmatch-control-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.bankmatch-control-row--second { gap: 8px; }
.bankmatch-control .bankmatch-journal {
    min-width: 220px; max-width: 320px; height: 38px; padding: 0 36px 0 12px;
    border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel); color: var(--ink);
    font: inherit; font-weight: 600;
}
.bankmatch-balance { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.bankmatch-balance-label { color: var(--muted); font-size: 13px; }
.bankmatch-balance-figure {
    font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums; color: var(--ink);
}
.bankmatch-segmented button { padding: 7px 14px; }
.bankmatch-toggle {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
    border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft);
    font-size: 13px; cursor: pointer; user-select: none; white-space: nowrap;
}
.bankmatch-toggle input { margin: 0; accent-color: var(--brand); }
.bankmatch-toggle.is-on { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); }
.bankmatch-secondary-filter { white-space: nowrap; }
.bankmatch-control .bankmatch-search { flex: 1 1 220px; min-width: 180px; max-width: 420px; height: 38px; }
.bankmatch-pager {
    display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 6px;
    border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel);
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.bankmatch-pager-btn {
    appearance: none; border: 0; background: transparent; color: var(--ink-soft); font: inherit; font-size: 18px;
    line-height: 1; width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
}
.bankmatch-pager-btn:hover:not(:disabled) { background: var(--panel-hover); color: var(--ink); }
.bankmatch-pager-btn:disabled { opacity: 0.35; cursor: default; }
.bankmatch-pager-range { padding: 0 6px; font-size: 13px; color: var(--ink); }
.bankmatch-control .button.bankmatch-upload, .bankmatch-control .button.bankmatch-new { height: 38px; white-space: nowrap; }
.bankmatch-control .row-menu-button.bankmatch-more { height: 38px; width: 38px; }
.bankmatch-menu-count {
    margin-left: auto; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600;
    background: var(--panel-hover); color: var(--muted);
}
.row-menu-panel [role="menuitem"].is-active { color: var(--brand-strong); font-weight: 600; }

/* ─── The grid ───────────────────────────────────────────────────────────── */
.bankmatch-grid .dxg-table th { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.bankmatch-grid .dxg-table td.bankmatch-col-amount, .bankmatch-grid .dxg-table th.bankmatch-col-amount { text-align: right; }
.bankmatch-grid .dxg-table td.bankmatch-col-matched { white-space: normal; }

/* Day group header: "23 July · Thursday   5 transactions ……… net + 240,56 €" */
.bankmatch-grid .dxg-group-row > td { background: var(--bg-soft); padding: 6px 12px; }
.bankmatch-day { display: flex; align-items: baseline; gap: 12px; min-height: 22px; }
.bankmatch-day-title { font-weight: 650; color: var(--ink); }
.bankmatch-day-count { color: var(--muted); font-size: 13px; }
.bankmatch-day-net { margin-left: auto; display: inline-flex; gap: 8px; align-items: baseline; font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; }
.bankmatch-day-net-label { color: var(--muted); }

/* Rows: 48px, a hairline between, the left colour bar on the first cell. */
.bankmatch-grid .dxg-table tbody tr.bankmatch-row > td { height: 48px; border-bottom: 1px solid var(--hairline); }
.bankmatch-grid .dxg-table tbody tr.bankmatch-row > td:first-child { box-shadow: inset 4px 0 0 transparent; }
.bankmatch-grid .dxg-table tbody tr.bankmatch-row.is-unmatched > td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
.bankmatch-grid .dxg-table tbody tr.bankmatch-row.is-unmatched { --dxg-row: var(--warn-soft); }
.bankmatch-grid .dxg-table tbody tr.bankmatch-row.is-selected > td:first-child { box-shadow: inset 4px 0 0 var(--brand); }
.bankmatch-grid .dxg-table tbody tr.bankmatch-row.is-selected { --dxg-row: var(--brand-soft); }
.bankmatch-grid .dxg-table tbody tr.bankmatch-row.is-fee .bankmatch-partner,
.bankmatch-grid .dxg-table tbody tr.bankmatch-row.is-fee .bankmatch-basis,
.bankmatch-grid .dxg-table tbody tr.bankmatch-row.is-fee .bankmatch-money { color: var(--muted); }

.bankmatch-flags { display: inline-flex; width: 22px; justify-content: flex-start; gap: 2px; vertical-align: middle; color: var(--muted-2); }
.bankmatch-flag { display: inline-flex; }
.bankmatch-flag svg { width: 15px; height: 15px; }
.bankmatch-partner { font-weight: 600; color: var(--brand); text-decoration: none; }
.bankmatch-partner:hover { text-decoration: underline; }
.bankmatch-partner--bank { color: var(--ink); }
.bankmatch-sep { color: var(--muted-2); }
.bankmatch-basis { color: var(--muted); }

/* ✓ chips: a document in the brand blue, an account in grey. */
.bankmatch-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; margin-right: 6px;
    border-radius: 7px; font-size: 13px; font-family: var(--font-mono, ui-monospace, monospace); text-decoration: none;
    background: var(--panel-hover); color: var(--ink-soft);
}
.bankmatch-chip--document { background: var(--brand-soft); color: var(--brand-strong); }
a.bankmatch-chip--document:hover { text-decoration: underline; }
.bankmatch-chip-check { display: inline-flex; color: var(--good); }
.bankmatch-chip-check svg { width: 14px; height: 14px; stroke-width: 2.4; }
.bankmatch-open-note { color: var(--warn); font-size: 13px; }

.bankmatch-grid .bankmatch-row-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
.bankmatch-grid .button.bankmatch-reconcile { gap: 6px; }

.bankmatch-money { font-family: var(--font-mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
.bankmatch-money.is-in { color: var(--good); }
.bankmatch-money.is-out { color: var(--ink); }
.bankmatch-fx { margin-left: 8px; font-size: 12px; }
.bankmatch-chevron { display: inline-flex; margin-left: 10px; vertical-align: middle; color: var(--muted-2); transition: transform 0.16s ease; }
.bankmatch-chevron svg { width: 14px; height: 14px; transform: rotate(90deg); }
.bankmatch-chevron.is-open svg { transform: rotate(-90deg); }

/* ─── Expanded row ───────────────────────────────────────────────────────── */
.bankmatch-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: start; padding: 10px 12px 12px; border-left: 4px solid var(--brand); }
.bankmatch-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.bankmatch-facts dt { color: var(--muted); font-size: 13px; }
.bankmatch-facts dd { margin: 0; min-width: 0; font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; color: var(--ink); }
.bankmatch-banktext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bankmatch-remainder.is-zero { color: var(--good); }
.bankmatch-remainder.is-open { color: var(--warn); }
.bankmatch-note { font-family: var(--font-text); white-space: pre-wrap; }
.bankmatch-summary-actions { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.bankmatch-summary-actions .button.bankmatch-undo { color: var(--danger); border-color: var(--danger); }
.bankmatch-note-editor { grid-column: 1 / -1; display: grid; gap: 8px; }
.bankmatch-note-editor textarea { width: 100%; resize: vertical; font: inherit; }

/* ─── Dialogs over the list: drawers (Components/Shared/Drawer, css/onix-drawer.css), their body a column ── */
.bankmatch-modal { display: flex; flex-direction: column; gap: 12px; }
.bankmatch-upload-pick { align-self: flex-start; cursor: pointer; }
.bankmatch-upload-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bankmatch-upload-files li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ─── 1280 px and narrower: the control row folds in two, the amount keeps its column ── */
@media (max-width: 1280px) {
    .bankmatch-control .bankmatch-search { flex-basis: 160px; max-width: 260px; }
    .bankmatch-balance-figure { font-size: 17px; }
}
@media (max-width: 900px) {
    .bankmatch-summary { grid-template-columns: minmax(0, 1fr); }
    .bankmatch-summary-actions { justify-content: flex-start; }
    .bankmatch-day-net { margin-left: 0; }
}

/* ============================================================================
   IDE-028 — the view toggle List | Matching and the Match view ("Bank E3"):
   BankMatchList.razor (the compact list on the left), BankMatchPane.razor
   (the transaction on the right: facts, Sum / Difference, Skip / Validate, the
   tab strip, the candidates, the plan's lines, the ACCOUNTING ENTRY).
   Colours: the Sum of a receipt --good, the Difference --brand (--good at 0,00),
   the open mark --warn, the selected row --brand / --brand-soft.
   ============================================================================ */

.bankmatch-view button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; }
.bankmatch-view-icon { display: inline-flex; }
.bankmatch-view-icon svg { width: 15px; height: 15px; }

/* ─── The two panes: the list parks under the bars and scrolls in itself ── */
.bankmatch-match { margin-top: 2px; }
.bankmatch-match > .onix-split-first {
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); overflow: hidden;
}
.bankmatch-mlist { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.bankmatch-mgrid .dxg-table thead { display: none; }
/* The day grouping is the list's own: no drag-to-group panel over either list (the mock-ups have none). */
.bankmatch-grid .dxg-grouppanel, .bankmatch-mgrid .dxg-grouppanel { display: none; }
.bankmatch-mgrid .dxg-group-row > td { background: var(--bg-soft); padding: 6px 14px; }
.bankmatch-day--compact .bankmatch-day-title { font-size: 13px; }
.bankmatch-mgrid .dxg-table tbody tr.bankmatch-mrow > td { height: 56px; border-bottom: 1px solid var(--hairline); vertical-align: middle; cursor: pointer; }
.bankmatch-mgrid .dxg-table tbody tr.bankmatch-mrow > td:first-child { box-shadow: inset 4px 0 0 transparent; }
.bankmatch-mgrid .dxg-table tbody tr.bankmatch-mrow.dxg-focused:not(.is-selected) { --dxg-row: var(--dxg-surface); }
.bankmatch-mgrid .dxg-table tbody tr.bankmatch-mrow.dxg-focused:not(.is-selected) > td:first-child { box-shadow: inset 4px 0 0 transparent; }
.bankmatch-mgrid .dxg-table tbody tr.bankmatch-mrow.is-selected { --dxg-row: var(--brand-soft); }
.bankmatch-mgrid .dxg-table tbody tr.bankmatch-mrow.is-selected > td:first-child { box-shadow: inset 4px 0 0 var(--brand); }
.bankmatch-mgrid .dxg-table td.bankmatch-col-state { width: 40px; text-align: center; }
.bankmatch-mgrid .dxg-table td.bankmatch-col-who { white-space: normal; max-width: none; }
.bankmatch-mgrid .dxg-table td.bankmatch-col-amount { text-align: right; width: 1%; }
.bankmatch-state-mark { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.bankmatch-state-mark.is-open { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); }
.bankmatch-state-mark.is-matched { color: var(--good); }
.bankmatch-state-mark.is-matched svg { width: 17px; height: 17px; stroke-width: 2.4; }
.bankmatch-who { display: block; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bankmatch-what { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bankmatch-arrow { color: var(--muted-2); }
.bankmatch-mrow.is-fee .bankmatch-who, .bankmatch-mrow.is-fee .bankmatch-money { color: var(--muted); }
.bankmatch-pane-empty { padding: 24px; }

/* ─── The pane ─────────────────────────────────────────────────────────── */
.bankmatch-pane {
    display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 16px 20px 20px;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel);
}
.bankmatch-pane-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: start; }
.bankmatch-pane-facts { min-width: 0; }
.bankmatch-pane-when { font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; color: var(--muted); }
.bankmatch-pane-who {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 6px 0 4px;
    font-family: var(--font-display); font-size: 20px; font-weight: 650; color: var(--ink);
}
.bankmatch-pane-basis { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bankmatch-pane-figures { display: grid; grid-template-columns: auto auto; justify-items: end; align-items: baseline; gap: 2px 14px; }
.bankmatch-pane-figure { display: contents; }
.bankmatch-pane-figure-label { font-size: 13px; color: var(--muted); }
.bankmatch-pane-sum, .bankmatch-pane-diff {
    font-family: var(--font-mono, ui-monospace, monospace); font-size: 26px; font-weight: 700; line-height: 1.2;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.bankmatch-pane-sum.is-in { color: var(--good); }
.bankmatch-pane-sum.is-out { color: var(--ink); }
.bankmatch-pane-diff.is-open { color: var(--brand); }
.bankmatch-pane-diff.is-zero { color: var(--good); }
.bankmatch-pane-actions { grid-column: 1 / -1; display: inline-flex; gap: 8px; margin-top: 10px; }
.bankmatch-pane-actions .button { height: 40px; padding: 0 16px; }
.bankmatch-validate { display: inline-flex; align-items: center; gap: 6px; }
.bankmatch-validate-check { display: inline-flex; }
.bankmatch-validate-check svg { width: 16px; height: 16px; stroke-width: 2.4; }
.bankmatch-pane-matched { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.bankmatch-pane-matched-label { font-size: 13px; color: var(--muted); }
.bankmatch-pane-matched .button.bankmatch-undo { margin-left: auto; color: var(--danger); border-color: var(--danger); }

/* The tab strip: text tabs on a hairline, the active one underlined in the brand blue; More ▾ is a tab too. */
.bankmatch-tabs {
    display: flex; align-items: flex-end; gap: 2px 20px; border-bottom: 1px solid var(--line);
    overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
}
.bankmatch-tab,
.bankmatch-tabs .button.row-menu-button.bankmatch-tab {
    appearance: none; display: inline-flex; align-items: center; gap: 4px; height: auto; margin: 0; padding: 8px 1px 9px;
    border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; box-shadow: none;
    color: var(--ink-soft); font: inherit; font-size: 14px; white-space: nowrap; cursor: pointer;
}
.bankmatch-tab:hover, .bankmatch-tabs .button.row-menu-button.bankmatch-tab:hover:not(:disabled) { color: var(--ink); background: none; }
.bankmatch-tab.is-active, .bankmatch-tabs .button.row-menu-button.bankmatch-tab.is-active { color: var(--ink); font-weight: 650; border-bottom-color: var(--brand); }
.bankmatch-tab:focus-visible { outline: none; box-shadow: inset 0 -2px 0 var(--ring); }
.bankmatch-tab-count { margin-left: 6px; color: var(--brand); font-weight: 650; }
.bankmatch-tab-count:empty { display: none; }
.bankmatch-tab-body { min-width: 0; }
.bankmatch-tab-body .bankmatch-dialog { margin: 0; }

/* The candidates: ticked rows light blue (the mock-up), the exact amount chip, the partial payment's note. */
.bankmatch-candidates .dxg-table th { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.bankmatch-candidates .dxg-table tbody tr.is-ticked { --dxg-row: var(--brand-soft); }
.bankmatch-candidates .dxg-table tbody tr.dxg-row { cursor: pointer; }
.bankmatch-candidates .bankmatch-doc, .bankmatch-plan-line .bankmatch-doc { font-family: var(--font-mono, ui-monospace, monospace); }
.bankmatch-candidates .bankmatch-residual { font-family: var(--font-mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; }
.bankmatch-partial-note { margin-right: 8px; font-size: 12px; color: var(--brand-strong); }
.bankmatch-candidates-search { min-width: 220px; }

/* Съпостави — the Reconcile window (BankMatchReconcileDialog, a wide .drawer): the transaction, Odoo's facets (Partner ✕,
   Customers / Suppliers / All, the search), the open items with their ticks and what each settles, the live sum and the
   difference's handling (keep open / write off). */
.bankmatch-reconcile-window .drawer__body { display: flex; flex-direction: column; gap: 12px; }
.bankmatch-reconcile-facts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; color: var(--muted); }
.bankmatch-reconcile-label { color: var(--ink); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.bankmatch-reconcile-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bankmatch-reconcile-filters .bankmatch-candidates-search { flex: 1 1 220px; max-width: 360px; margin-left: auto; }
.bankmatch-reconcile-facet { display: inline-flex; align-items: center; gap: 6px; }
.bankmatch-reconcile-facet .linklike { padding: 0 2px; line-height: 1; }
.bankmatch-reconcile-window .dxg-table tbody tr { cursor: pointer; }
.bankmatch-reconcile-window a.bankmatch-doc { color: var(--brand-strong); text-decoration: none; }
.bankmatch-reconcile-window a.bankmatch-doc:hover { text-decoration: underline; }
.bankmatch-reconcile-window tr.is-ticked td { background: var(--brand-soft); }
.bankmatch-reconcile-sum {
    display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 22px;
    font-variant-numeric: tabular-nums; padding-top: 8px; border-top: 1px solid var(--hairline);
}
.bankmatch-reconcile-sum .is-zero { color: var(--good); }
.bankmatch-reconcile-sum .is-open { color: var(--warn); }
.bankmatch-reconcile-difference { display: grid; gap: 8px; margin: 0; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 8px; }
.bankmatch-reconcile-difference > label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }

/* "+ Write off the difference to an account" · "+ Partial payment" and the lines they add. */
.bankmatch-pane-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; }
.bankmatch-pane-links .linklike {
    padding: 0; border: 0; background: none; color: var(--brand); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer;
}
.bankmatch-pane-links .linklike:disabled { color: var(--muted-2); text-decoration: none; cursor: default; }
.bankmatch-plan-line {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 10px;
    border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--bg-soft);
}
.bankmatch-plan-line-label { font-weight: 600; color: var(--ink); }
.bankmatch-plan-amount { width: 12ch; }
.bankmatch-plan-account { flex: 1 1 220px; min-width: 180px; }
.bankmatch-plan-label { flex: 1 1 160px; min-width: 120px; }
.bankmatch-plan-remove { margin-left: auto; }
.bankmatch-pane-hint { margin: 6px 0 0; font-size: 13px; }

/* ACCOUNTING ENTRY: "[503] Eurobank   Дт 257,68" / "[411] · Яхмус ЕООД   Кт 257,68". */
.bankmatch-entry-title { margin: 4px 0 6px; font-size: 12px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.bankmatch-entry-lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.bankmatch-entry-lines td { padding: 9px 8px; border-top: 1px solid var(--hairline); color: var(--ink); vertical-align: baseline; }
.bankmatch-entry-lines tr:last-child td { border-bottom: 1px solid var(--hairline); }
.bankmatch-entry-text { min-width: 0; overflow-wrap: anywhere; }
.bankmatch-entry-dr, .bankmatch-entry-cr {
    width: 9.5em; text-align: right; white-space: nowrap;
    font-family: var(--font-mono, ui-monospace, monospace); font-variant-numeric: tabular-nums;
}
.bankmatch-entry-code {
    display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px;
    background: var(--panel-hover); color: var(--ink-soft); font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px;
}
.bankmatch-entry-line.is-suspense td { color: var(--warn); }
.bankmatch-entry-line.is-match td, .bankmatch-entry-line.is-writeoff td, .bankmatch-entry-line.is-transfer td { color: var(--ink); }

@media (max-width: 1280px) {
    .bankmatch-pane { padding: 14px 16px 16px; }
    .bankmatch-pane-sum, .bankmatch-pane-diff { font-size: 22px; }
    .bankmatch-tabs { gap: 2px 14px; }
}
@media (max-width: 1100px) {
    .bankmatch-match > .onix-split-first { height: 46dvh; }
}
@media (max-width: 700px) {
    .bankmatch-pane-head { grid-template-columns: minmax(0, 1fr); }
    .bankmatch-pane-figures { justify-items: start; }
}

/* ─── IDE-026: Upload purchase document… and where its digitization stands ─── */
.bankmatch-purchase-upload { cursor: pointer; white-space: nowrap; }
.bankmatch-purchase-upload[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
/* The row's ⋯ item is a label (its click opens the file picker): drawn as the menu's buttons are. */
.row-menu-panel label.bankmatch-purchase-item {
    display: flex; align-items: center; gap: 10px; flex: none; width: 100%; box-sizing: border-box;
    padding: 7px 10px; border-radius: 9px; color: inherit; font: inherit; cursor: pointer;
}
.row-menu-panel label.bankmatch-purchase-item:hover { background: var(--panel-hover); color: var(--brand-strong); }
.row-menu-panel label.bankmatch-purchase-item:focus-within { box-shadow: inset 0 0 0 2px var(--ring); }
.row-menu-panel label.bankmatch-purchase-item[aria-disabled="true"] { color: var(--muted-2); pointer-events: none; }
.bankmatch-intake { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
a.bankmatch-intake { text-decoration: none; }
a.bankmatch-intake:hover { text-decoration: underline; }
.bankmatch-intake-spin { width: 11px; height: 11px; border-width: 2px; vertical-align: 0; border-top-color: currentColor; }
.bankmatch-pane-purchase { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.bankmatch-attachment { display: inline-flex; align-items: center; gap: 6px; }
.bankmatch-from-line { white-space: nowrap; }
.page-trail-return { margin-left: 8px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .bankmatch-intake-spin { animation: none; } }

/* ─── Mayla on the transactions the rules left open ────────────────────────
   Her proposal as one chip in her violet — "Mayla" and what the transaction pays — with Apply and ✕ beside it; on a
   row she matched herself the chip is just her name (the reason is its tooltip). */
.bankmatch-mayla { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; vertical-align: middle; max-width: 100%; }
.bankmatch-mayla-chip {
    display: inline-flex; align-items: center; gap: 6px; min-width: 0; height: 24px; padding: 0 10px; border-radius: 7px; font-size: 13px;
    background: var(--hue-violet-soft); color: var(--hue-violet); cursor: help;
}
.bankmatch-mayla-name { font-weight: 600; flex: none; }
.bankmatch-mayla-what {
    min-width: 0; max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-family: var(--font-mono, ui-monospace, monospace);
}
.bankmatch-mayla-what::before { content: "·"; margin-right: 6px; opacity: .6; }
.bankmatch-mayla-dismiss { flex: none; }
.bankmatch-mayla-asking { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; white-space: nowrap; }
.bankmatch-mayla-why { color: var(--muted); font-size: 13px; }
.bankmatch-pane-mayla { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.bankmatch-grid .bankmatch-mayla + .bankmatch-row-actions { vertical-align: middle; }
.bankmatch-mayla.is-applied { margin-left: 6px; }

/* ─── ATP-020: the panels' fields as label-left rows ──────────────────────
   Set account / Set partner / Internal transfer (the List view's dialogs and the Match pane's tabs), the ЗОПБ reason
   and the Reconcile page's dialogs are .form-column.form-rows (onix-form.css): the caption at the left in a column of
   one width per panel, the framed field beside it. The rows keep a readable width inside a wide card (the List
   view's dialog is up to 1000 px wide); in the Match pane they fill the tab. The plan lines' and the entry lines'
   inputs (already label-left in a line) take the same frame instead of the browser's own. */
.form-rows.bankmatch-fields { --form-label-width: 8.5em; max-width: 42rem; }
.form-rows.bankmatch-fields--wide { --form-label-width: 15em; }
.bankmatch-tab-body .form-rows.bankmatch-fields { max-width: none; }
.form-rows.reconcile-fields { --form-label-width: 15em; max-width: 46rem; }
.form-rows.reconcile-fields--auto { --form-label-width: 8.5em; }
.bankmatch-plan-line input,
.bankmatch-entry-lines input:not([type=checkbox]):not([type=radio]) {
    min-height: 30px; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: var(--radius-xs);
    background: var(--panel); color: var(--ink); font: inherit; font-size: 0.9rem;
}
.bankmatch-plan-line input:hover,
.bankmatch-entry-lines input:not([type=checkbox]):not([type=radio]):hover { border-color: var(--muted-2); }
.bankmatch-plan-line input:focus,
.bankmatch-entry-lines input:not([type=checkbox]):not([type=radio]):focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
