.ledger-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: flex-end;
    margin: 0 0 1rem;
}

.ledger-filters label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-weight: 650;
}

.ledger-filters input,
.ledger-filters select {
    min-width: 10rem;
}

.ledger-filter-search {
    flex: 1 1 14rem;
}

.ledger-filter-search input {
    width: 100%;
}

.ledger-channel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.ledger-channel-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: baseline;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.ledger-channel-list li:last-child {
    border-bottom: 0;
}

.ledger-table tr.ledger-row--debt td:first-child {
    box-shadow: inset 3px 0 0 var(--danger, #b42318);
}

.ledger-row-card.is-debt {
    border-left: 3px solid var(--danger, #b42318);
}

.section-head--actions {
    align-items: center;
}

.section-head-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.55rem 0.75rem;
    min-width: 0;
}

.section-head-title h2 {
    margin: 0;
}

.section-head-period {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.section-head-period .floating-label {
    min-width: 10.5rem;
}

.table-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    justify-content: flex-end;
}

.table-row-actions .btn {
    white-space: nowrap;
}

.charge-pay-form {
    flex-wrap: nowrap;
    justify-content: flex-end;
    min-width: 0;
    gap: 0.4rem;
    align-items: center;
}

.charge-pay-form .charge-pay-amount {
    width: 5.5rem;
    min-width: 5.5rem;
    max-width: 5.5rem;
    padding: 0.45rem 0.55rem;
}

.charge-pay-form .charge-pay-method {
    width: auto;
    min-width: 8rem;
    max-width: 11rem;
    padding: 0.45rem 0.55rem;
}

.data-table td:has(.charge-pay-form) {
    vertical-align: middle;
}

@media (max-width: 720px) {
    .charge-pay-form {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

.cash-chart .bar-chart {
    margin-top: 0.15rem;
}

.help-panel-steps {
    margin-top: 0.35rem;
}

.csv-sample {
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
    border-radius: 0.6rem;
    overflow: auto;
    font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: pre;
    color: var(--muted);
}

.info-callout {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.7rem;
    background: var(--brand-soft);
    color: var(--ink);
    line-height: 1.45;
}

.finance-year-wrap {
    overflow-x: auto;
}

.finance-year-grid {
    min-width: 52rem;
}

.finance-year-sticky {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--card);
    min-width: 8rem;
    text-align: left;
}

.year-cell {
    font-size: 0.82rem;
    white-space: nowrap;
}

.year-cell--unpaid,
.year-cell--partial {
    color: var(--danger);
}

.year-cell--paid {
    color: var(--ok);
}

.year-cell-badge {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 500;
}

.receipt-slip {
    break-after: page;
    page-break-after: always;
    margin: 0 0 2rem;
    padding: 1rem 0;
    border-bottom: 1px dashed var(--line);
}

.receipt-slip:last-child {
    border-bottom: 0;
}

/* Месечен отчет за входа (/app/finance/report) — print-first sheet. */
.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0 0 1rem;
}

.report-toolbar__form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.report-toolbar__group {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    align-items: center;
}

.report-toolbar__control {
    min-height: 2.25rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--ink);
    font: inherit;
}

.report-toolbar__print {
    margin-left: auto;
}

@media (max-width: 560px) {
    .report-toolbar__group {
        flex-wrap: wrap;
    }

    .report-toolbar__print {
        margin-left: 0;
    }
}

.report-toolbar__check {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.9rem;
}

.report-sheet {
    max-width: 52rem;
    padding: 1rem 0;
}

.report-sheet__head {
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--ink);
}

.report-block {
    margin: 1.25rem 0 0;
}

.report-block h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.report-table td,
.report-table th {
    padding: 0.4rem 0.6rem;
}

.report-table--narrow {
    max-width: 24rem;
}

.report-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.report-total td {
    font-weight: 600;
    border-top: 1px solid var(--ink);
}

.report-note {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
}

.report-sign {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--line);
}

.report-sign__row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    font-size: 0.92rem;
}

@media print {
    @page { size: A4; margin: 12mm; }
    .no-print,
    .app-sidebar,
    .app-top,
    .hero-panel.no-print {
        display: none !important;
    }

    .receipt-slip {
        border: 0;
    }

    .report-sheet {
        max-width: none;
        padding: 0;
    }

    .report-block {
        break-inside: avoid;
    }
}

@keyframes fee-scheme-new-row {
    0% { background: rgba(88, 166, 255, 0.28); }
    100% { background: rgba(0, 0, 0, 0.12); }
}

.form-repeat-card.is-new {
    animation: fee-scheme-new-row 1.5s ease-out;
}

[data-controller~="fee-scheme-editor"] .btn.is-added {
    border-color: rgba(88, 166, 255, 0.55);
    font-weight: 650;
}
