/* Investor accounts, returns and statements (Admins and Super Admins) */

/* A labelled control in a list toolbar, such as the month the figures run up to. */
.toolbar-field { display: inline-flex; align-items: center; gap: var(--space-2); }
.toolbar-field > label { color: var(--muted); white-space: nowrap; }
.toolbar-field > input { width: auto; }

/* A short explanation that shares the toolbar row with its action. */
.toolbar-note { flex: 1 1 320px; max-width: 72ch; color: var(--muted); font-size: 13px; }

/* Schedules and statements are read down their columns, so they keep their shape and scroll sideways on narrow screens. */
.investor-figures { min-width: 860px; }
.investor-figures td { vertical-align: top; }

/* A cancelled amount stays readable but clearly no longer counts. */
.is-struck { text-decoration: line-through; }

/* What changed, under an entry in an investor's activity. */
.investor-activity-details { display: grid; gap: 2px; margin: 6px 0 0; font-size: 13px; }
.investor-activity-details > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--space-2); }
.investor-activity-details dt { color: var(--muted); }
.investor-activity-details dd { margin: 0; overflow-wrap: anywhere; }

/* Import: the file's lines as they were read, with what needs fixing under each one. */
.import-upload { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); align-items: start; }
.import-guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
.import-guides > .panel { margin-bottom: 0; }
.import-columns { display: grid; gap: var(--space-2); margin: 0; font-size: 14px; }
.import-columns > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--space-3); }
.import-columns dt { font-weight: 500; }
.import-columns dd { margin: 0; color: var(--muted); }
.import-line-error { display: block; margin-top: 2px; color: var(--danger); font-size: 13px; }

@media (max-width: 900px) {
    .import-upload,
    .import-guides { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .toolbar-field { flex: 1 1 100%; }
    .toolbar-field > input { flex: 1 1 auto; }
    .investor-activity-details > div,
    .import-columns > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* Row buttons that stay side by side, so rows keep one height. */
.row-actions-inline { flex-wrap: nowrap; }
@media (max-width: 640px) {
    .row-actions-inline { flex-wrap: wrap; justify-content: flex-start; }
}

/* The buttons stay in view while the figures scroll sideways. */
.investor-figures th.cell-actions,
.investor-figures td.cell-actions { position: sticky; right: 0; box-shadow: -1px 0 0 var(--line); }
.investor-figures td.cell-actions { background: var(--surface); }
.investor-figures tr:hover > td.cell-actions { background: var(--surface-soft); }

/* Recording a quarter's payment: the return being paid, then the form. */
.payout-summary { display: grid; gap: 4px; margin: 0; padding: var(--space-3); border-radius: var(--radius); background: var(--surface-soft); font-variant-numeric: tabular-nums; }
.payout-summary > div { display: flex; justify-content: space-between; gap: var(--space-3); }
.payout-summary dt { color: var(--muted); }
.payout-summary dd { margin: 0; }
.payout-summary .is-total { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line); font-weight: 600; }
.payout-summary .is-total dt { color: var(--ink); }
.dialog-actions .dialog-action-start { margin-right: auto; }
