/* Polish pass 04.10.2026: small surfaces that lagged behind the rest of the dashboard (both designs, both themes). */

/* «Ликвидный актив»: the switch sits right after its label, not at the far edge of the dialog */
.yf-asset-liquidity__body .yf-account-switch { justify-content: flex-start; gap: 14px; }
.yf-asset-liquidity__body .yf-account-switch > .yf-asset-liquidity__label { flex: 0 1 auto; }

/* Balance → transaction history */
.yf-modal-table { --tx-ink: #1f3a33; --tx-muted: #66797a; --tx-line: rgba(25, 92, 73, .12); --tx-chip: rgba(25, 92, 73, .07); }
body.dark-theme .yf-modal-table { --tx-ink: #e3ece9; --tx-muted: #9aaba6; --tx-line: rgba(211, 225, 230, .1); --tx-chip: rgba(255, 255, 255, .07); }
:root body.yf-redesign.yf-dashboard-auth .yf-modal-table { --tx-ink: var(--rd-ink); --tx-muted: var(--rd-muted); --tx-line: var(--rd-line-soft); --tx-chip: var(--rd-fill-soft); }
.yf-transaction-history .yf-modal-table { border-collapse: separate; border-spacing: 0; background: transparent !important; color: var(--tx-ink); }
.yf-transaction-history .yf-modal-table :is(th, td) { padding: 12px 14px; border: 0 !important; border-bottom: 1px solid var(--tx-line) !important; background: transparent !important; color: var(--tx-ink) !important; font-size: 13px; vertical-align: middle; }
.yf-transaction-history .yf-modal-table th { color: var(--tx-muted) !important; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.yf-transaction-history .yf-modal-table tbody tr:last-child td { border-bottom: 0 !important; }
.yf-transaction-history .yf-modal-table td:nth-child(2) { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.yf-transaction-history .yf-modal-table td:nth-child(3) { color: var(--tx-muted) !important; white-space: nowrap; }
.yf-transaction-history .yf-transaction-id { display: inline-block; padding: 3px 9px; border-radius: 8px; background: var(--tx-chip); color: var(--tx-ink); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.yf-transaction-history .yf-payment-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.2; }
.yf-transaction-history .yf-payment-status::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }
body.dark-theme .yf-transaction-history .yf-payment-status.is-success { color: #6fd3ad; background: rgba(111, 211, 173, .14); }
body.dark-theme .yf-transaction-history .yf-payment-status.is-pending { color: #f0c577; background: rgba(240, 197, 119, .14); }
body.dark-theme .yf-transaction-history .yf-payment-status.is-failed { color: #f2999c; background: rgba(242, 153, 156, .14); }
@media (max-width: 575.98px) {
    .yf-transaction-history .yf-modal-table thead { display: none; }
    .yf-transaction-history .yf-modal-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 4px; border-bottom: 1px solid var(--tx-line); }
    .yf-transaction-history .yf-modal-table tbody tr:last-child { border-bottom: 0; }
    .yf-transaction-history .yf-modal-table tbody td { padding: 2px 10px; border: 0 !important; }
    .yf-transaction-history .yf-modal-table td:nth-child(2) { grid-column: 2; grid-row: 1; text-align: right; }
    .yf-transaction-history .yf-modal-table td:nth-child(3) { grid-column: 1; grid-row: 2; }
    .yf-transaction-history .yf-modal-table td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; }
}

/* Support dialog */
.yf-support__pager { gap: 12px; }
.yf-support .yf-support__pager button { display: inline-grid; flex: 0 0 34px; width: 34px; height: 34px; min-height: 34px; padding: 0; place-items: center; aspect-ratio: 1; border-radius: 50%; }
.yf-support__pager span { flex: 1; color: var(--support-muted); font-weight: 600; text-align: center; }
.yf-support__inbox-head { gap: 16px; }
.yf-support .yf-support__ticket { border-radius: 14px; }
.yf-support-modal .modal-header { padding: 18px 24px; }
:root body.yf-redesign.yf-dashboard-auth :is(.yf-support, .yf-support-modal) {
    --support-bg: var(--rd-surface); --support-soft: var(--rd-surface-grouped); --support-line: var(--rd-line-soft);
    --support-ink: var(--rd-ink); --support-muted: var(--rd-muted); --support-green: var(--rd-accent);
}
:root body.yf-redesign.yf-dashboard-auth .yf-support .yf-support__primary { background: var(--rd-accent); border-color: var(--rd-accent); color: var(--rd-on-accent); }
:root body.yf-redesign.yf-dashboard-auth.dark-theme .yf-support .yf-support__primary { color: #06251b; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__inbox { background: var(--rd-surface-grouped); border-right-color: var(--rd-line-soft); }

/* ── Savings / transfer / distribution dialogs: steady frame ── */
@media (min-width: 576px) {
    .modal-dialog.yf-sv-dialog .modal-content { height: min(740px, calc(100vh - 48px)); min-height: 0; }
    .modal-dialog.yf-sv-dialog .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
    .yf-sv-panel { min-height: 330px; }
    .yf-sv-panel .yf-amount-input, .yf-sv-transfer .yf-amount-input { max-width: 340px; }
}

/* ── Animated reveal of conditional fields (transfer targets, foreign-currency amounts…) ── */
.yf-sv-reveal { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .36s cubic-bezier(.2, .8, .2, 1), opacity .28s ease; }
.yf-sv-reveal.is-open { grid-template-rows: 1fr; opacity: 1; }
.yf-sv-reveal__in { min-height: 0; overflow: hidden; }
.yf-sv-reveal.is-open > .yf-sv-reveal__in { overflow: visible; }
.yf-sv-reveal.is-wide { grid-column: 1 / -1; }
.yf-operation-accounts .yf-manage-form-grid { gap: 0 16px; }
.yf-operation-accounts .yf-manage-form-grid > * { margin-bottom: 14px; }
.yf-operation-accounts .yf-manage-form-grid > .yf-sv-reveal:not(.is-open) { margin-bottom: 0; }
.yf-operation-accounts .yf-manage-form-grid > .yf-sv-reveal { transition: grid-template-rows .36s cubic-bezier(.2, .8, .2, 1), opacity .28s ease, margin-bottom .36s ease; }

/* A real switch for «Изменить остаток счёта» */
.yf-sv-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 13px; font-weight: 650; }
.yf-sv-switch input { position: absolute; opacity: 0; pointer-events: none; }
.yf-sv-switch__track { position: relative; flex: 0 0 40px; width: 40px; height: 24px; border-radius: 999px; background: var(--st-fill); box-shadow: inset 0 0 0 1px var(--st-line); transition: background-color .25s var(--st-ease); }
.yf-sv-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .28s var(--st-ease); }
.yf-sv-switch input:checked + .yf-sv-switch__track { background: var(--st-accent); }
.yf-sv-switch input:checked + .yf-sv-switch__track::after { transform: translateX(16px); }
.yf-sv-switch input:focus-visible + .yf-sv-switch__track { outline: 2px solid var(--st-accent); outline-offset: 2px; }
.yf-sv-switch__text { display: inline-flex; align-items: center; gap: 6px; }

/* «Распределить доход» in the editor: its own full row, on the right */
.yf-statistics-body > .yf-sv-actions { grid-column: 1 / -1; justify-content: flex-end; width: 100%; }

/* Segmented switches: the highlight slides (thumb is created by tagFit.js) */
.yf-stat-seg { position: relative; }
.yf-stat-seg > .yf-stat-seg__item { position: relative; z-index: 1; }
.yf-seg-thumb { position: absolute; top: 0; left: 0; z-index: 0; border-radius: 8px; background: var(--st-thumb); box-shadow: var(--st-thumb-shadow); pointer-events: none; transition: transform .32s cubic-bezier(.2, .8, .2, 1), width .32s cubic-bezier(.2, .8, .2, 1); }
.yf-stat-seg:has(> .yf-seg-thumb) > .yf-stat-seg__item.is-active { background: transparent !important; box-shadow: none !important; }

/* Free plan: currency choice is locked — say it with a calm banner, not a grey line */
.yf-currency-lock { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 14px; margin-top: 14px; padding: 14px 16px; border: 1px solid rgba(181, 138, 47, .35); border-radius: 14px; background: rgba(181, 138, 47, .1); }
.yf-currency-lock__icon { display: grid; width: 38px; height: 38px; aspect-ratio: 1; place-items: center; border-radius: 12px; background: rgba(181, 138, 47, .18); color: #a47a1e; font-size: 19px; }
.yf-currency-lock strong { display: block; font-size: 13.5px; }
.yf-currency-lock small { display: block; margin-top: 2px; color: var(--yf-app-muted, #6c6c72); font-size: 12px; line-height: 1.45; }
.yf-currency-lock .yf-account-button { grid-column: 1 / -1; justify-self: start; }
body.dark-theme .yf-currency-lock { border-color: rgba(230, 190, 101, .3); background: rgba(230, 190, 101, .1); }
body.dark-theme .yf-currency-lock__icon { background: rgba(230, 190, 101, .16); color: #e6be65; }

/* Wide dialogs on desktop in both designs («Малахит» pins dialogs at ~540 px with width, so set width and max-width) */
@media (min-width: 768px) {
    .modal-dialog.yf-sv-dialog { width: min(860px, calc(100vw - 48px)); max-width: none; }
}
body.dark-theme .yf-account-switch--toggle input[type="checkbox"]:not(:checked) { background: rgba(255, 255, 255, .2) !important; }
.modal-dialog.yf-sv-dialog .modal-body { padding-bottom: 22px; }

/* Dialog skeletons: same silhouette as the real content */
.yf-sv-skel { display: grid; gap: 14px; }
.yf-sv-skel .yf-sk { display: block; border-radius: 16px; }
.yf-sv-skel__hero { height: 172px; border-radius: 20px !important; }
.yf-sv-skel__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.yf-sv-skel__tiles .yf-sk { height: 72px; }
.yf-sv-skel__panel { height: 220px; }
.yf-sv-skel__row { height: 84px; }
.yf-sv-skel__line { height: 22px; width: 70%; border-radius: 8px !important; }
.yf-sv-skel__flow { height: 104px; }
.yf-sv .yf-sk, .yf-sv-skeleton .yf-sk, .yf-sv-loading .yf-sk { display: block; background: linear-gradient(100deg, var(--st-fill, rgba(25, 92, 73, .07)) 30%, color-mix(in srgb, var(--st-fill, rgba(25, 92, 73, .07)) 40%, transparent) 50%, var(--st-fill, rgba(25, 92, 73, .07)) 70%); background-size: 300% 100%; animation: yf-sv-shimmer 1.6s ease-in-out infinite; }
@keyframes yf-sv-shimmer { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@media (prefers-reduced-motion: reduce) { .yf-sv .yf-sk, .yf-sv-skeleton .yf-sk, .yf-sv-loading .yf-sk { animation: none; } }

/* Support: the status select and the buttons stay inside the 300 px inbox */
.yf-support__inbox-head { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.yf-support__inbox-head > * { min-width: 0; }
.yf-support__inbox-head .yf-support__primary { width: 100%; justify-content: center; }
.yf-support__inbox-head .custom-select, .yf-support__inbox-head .yf-select-menu { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.yf-support__inbox-head .custom-select .selected, .yf-support__inbox-head .yf-select-menu__trigger { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yf-support__inbox { min-width: 0; overflow: hidden; }

/* Balance dialog: no grey slab behind the e-mail block and the top-up card */
.yf-balance-form { background: transparent !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; gap: 14px; }
.yf-balance-form > .yf-form-field { padding: 0 !important; background: transparent !important; }
:root body.yf-redesign.yf-dashboard-auth.dark-theme .yf-balance-form { background: transparent !important; }
:root body.yf-redesign.yf-dashboard-auth.dark-theme .yf-modal-surface .yf-balance-form,
:root body.yf-redesign.yf-dashboard-auth .yf-modal-surface .yf-balance-form,
body.yf-dashboard-auth.dark-theme .yf-modal-surface .yf-balance-form { background: transparent !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; }

/* Expense summary on a narrower desktop (the card shares the row with the tags card): the ring drops under the metrics
   instead of squeezing the figures; the tags card lists one tag per line when it is that narrow. Tablet/phone have their own rules. */
.expense-month-card, .expense-tags-card { container-type: inline-size; }
@container (max-width: 780px) {
    @media (min-width: 768px) {
        .expense-month-card .card-body { grid-template-columns: minmax(0, 1fr) !important; }
        .expense-month-card .expense-budget-inline { display: none !important; } /* no room beside the figures: the ring is hidden (it stays on phones) */
        .expense-month-card .expense-month-card__metrics { grid-column: 1; }
    }
}
@container (max-width: 560px) {
    @media (min-width: 768px) {
        .expense-month-card .expense-month-card__metrics { grid-template-columns: minmax(0, 1fr) !important; }
    }
}
.income-tags-card { container-type: inline-size; }
@container (max-width: 360px) {
    @media (min-width: 768px) {
        .expense-tags-page, .income-tags-page { grid-template-columns: minmax(0, 1fr) !important; }
    }
}

/* The «Без деталей» hint belongs to the full label: hidden while the tag column is folded to an icon */
body.yf-tagcol-collapsed .yf-tagcol-cell .yf-inline-info { display: none !important; }

/* ── 768–991px: no bottom bar yet, so the section switcher and the period picker share one row (both designs) ── */
@media (min-width: 768px) and (max-width: 991.98px) {
    :root body.yf-dashboard-auth:is(.yf-redesign, :not(.yf-redesign)) .yf-dashboard-commandbar { flex-wrap: wrap; align-items: center; }
    :root body.yf-dashboard-auth:is(.yf-redesign, :not(.yf-redesign)) .yf-dashboard-shell .yf-dashboard-commandbar .yf-section-nav { display: flex !important; width: auto !important; flex: 0 0 auto; }
    :root body.yf-dashboard-auth:is(.yf-redesign, :not(.yf-redesign)) .yf-dashboard-shell .yf-dashboard-commandbar .yf-section-nav .nav-element { padding: 8px 14px !important; font-size: 13.5px; }
    :root body.yf-dashboard-auth:is(.yf-redesign, :not(.yf-redesign)) .yf-dashboard-commandbar .yf-dashboard-period { width: auto !important; flex: 1 1 250px; min-width: 250px; max-width: 360px; margin-left: auto; }
}

/* ── Tags: as many per line as the card allows ── */
@container (min-width: 460px) {
    .expense-tags-page, .income-tags-page { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)) !important; }
}

/* ── Expense summary between "wide" and "stacked": the ring loses its glass plate and narrows, the figures get the room ── */
@container (min-width: 781px) and (max-width: 940px) {
    @media (min-width: 992px) {
        .expense-month-card .card-body { grid-template-columns: minmax(0, 1fr) 176px !important; column-gap: 14px !important; }
        .expense-month-card .expense-month-card__metrics { column-gap: 18px !important; }
        .expense-month-card .expense-budget-inline { padding: 0 !important; background: none !important; box-shadow: none !important; border: 0 !important; }
    }
}

/* Coloured primary cards never get the refresh sweep (it showed as a frozen light band while data loaded) */
:root body[data-card-accents="on"] .card[data-primary-card].yf-is-refreshing::before,
:root body.yf-redesign.yf-dashboard-auth[data-card-accents="on"] .card[data-primary-card].yf-is-refreshing::before { display: none !important; animation: none !important; background: none !important; }

/* «Свободно: …» next to an account amount in the account list */
.yf-asset-row summary .yf-asset-row__free { display: inline-flex; align-items: center; gap: 2px; margin-left: 10px; padding-left: 10px; border-left: 1px solid color-mix(in srgb, currentColor 22%, transparent); white-space: nowrap; }
.yf-asset-row summary .yf-asset-row__free .yf-inline-info { margin-left: 2px; }
@media (max-width: 575.98px) { .yf-asset-row summary .yf-asset-row__free { display: flex; margin: 2px 0 0; padding-left: 0; border-left: 0; } }

/* Savings goal form on desktop: a compact name, then target and deadline side by side */
.yf-sv-field.is-name { max-width: 460px; }
@media (min-width: 768px) { .yf-sv-dialog .yf-sv-fields { gap: 14px 18px; } .yf-sv-dialog .yf-sv-chips { gap: 6px; } }

/* Savings dialog after a deposit/withdrawal: the frame stays, only the figures show a skeleton */
@keyframes yf-sv-shim { to { background-position: -200% 0; } }
.yf-sv-hero.is-refreshing :is(.yf-sv-hero__sum strong, .yf-sv-hero__sum span, .yf-sv-hero__foot > span, .yf-sv-hero__others span),
.yf-sv-where.is-refreshing :is(.yf-sv-where__row strong, .yf-sv-where__row small) {
    color: transparent !important; border-radius: 8px; background: linear-gradient(90deg, rgba(128, 150, 142, .22) 25%, rgba(128, 150, 142, .4) 50%, rgba(128, 150, 142, .22) 75%) 0 0 / 200% 100%; animation: yf-sv-shim 1.1s linear infinite; pointer-events: none; }
.yf-sv-hero.is-refreshing .yf-sv-bar > span { opacity: .45; }
.yf-sv-hero.is-refreshing :is(.yf-sv-hero__sum strong, .yf-sv-hero__sum span, .yf-sv-hero__foot > span) { background-color: transparent; }
@media (prefers-reduced-motion: reduce) { .yf-sv-hero.is-refreshing *, .yf-sv-where.is-refreshing * { animation: none !important; } }

/* «Всего денег» tooltip on the coloured card: the hero text colour must not leak into it (white on white in «Малахит») */
body.yf-dashboard-auth[data-card-accents="on"] #card1 .yf-total-money__amount .yf-total-money__tooltip,
body.yf-dashboard-auth[data-card-accents="on"] #card1 .yf-total-money__amount .yf-total-money__tooltip * { color: #263a34 !important; }
body.yf-dashboard-auth[data-card-accents="on"] #card1 .yf-total-money__amount .yf-total-money__tooltip b { color: #0c7a5b !important; }
body.yf-dashboard-auth[data-card-accents="on"] #card1 .yf-total-money__amount .yf-total-money__tooltip small { color: #748981 !important; }
body.yf-dashboard-auth.dark-theme[data-card-accents="on"] #card1 .yf-total-money__amount .yf-total-money__tooltip,
body.yf-dashboard-auth.dark-theme[data-card-accents="on"] #card1 .yf-total-money__amount .yf-total-money__tooltip * { color: #e3ece9 !important; }
body.yf-dashboard-auth.dark-theme[data-card-accents="on"] #card1 .yf-total-money__amount .yf-total-money__tooltip b { color: #6fd3ad !important; }
body.yf-dashboard-auth.dark-theme[data-card-accents="on"] #card1 .yf-total-money__amount .yf-total-money__tooltip small { color: #9aaba6 !important; }

/* «Где лежат деньги»: rows open the account */
.yf-sv-where__row.is-link { cursor: pointer; transition: background-color .2s ease, transform .2s ease; }
.yf-sv-where__row.is-link:hover, .yf-sv-where__row.is-link:focus-visible { background: color-mix(in srgb, var(--st-accent, #0f9f74) 10%, var(--st-fill, transparent)); outline: 0; }
.yf-sv-where__go { margin-left: 6px; opacity: .45; font-size: 15px; transition: transform .2s ease, opacity .2s ease; }
.yf-sv-where__row.is-link:hover .yf-sv-where__go { opacity: .9; transform: translateX(2px); }
.yf-sv-where__row.is-link { grid-template-columns: 34px minmax(0, 1fr) auto 18px; }
.yf-sv-where__row.is-link .yf-sv-where__go { grid-column: 4; grid-row: 1; margin: 0; justify-self: end; }

/* Fixed currency: exactly the picker's look, dimmed, not clickable */
.yf-currency-picker.is-currency-locked .yf-currency-picker__trigger[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.yf-sv-warn-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--sv-warn, #a8610f); font-weight: 700; }
.yf-sv-warn-inline .yf-inline-info { margin-left: 2px; }

/* Income distribution: progressive reveal, source -> destination flow */
.yf-sv-fold { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows .34s cubic-bezier(.2, .8, .2, 1), opacity .26s ease, visibility 0s; }
.yf-sv-fold[hidden] { display: grid !important; grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows .3s cubic-bezier(.4, 0, .2, 1), opacity .18s ease, visibility 0s .3s; }
.yf-sv-fold__in { min-height: 0; overflow: hidden; padding: 2px 2px 0; }
.yf-sv-fold:not([hidden]) .yf-sv-fold__in { padding-top: 14px; overflow: visible; transition: padding .3s ease; }
.yf-sv-distribute { gap: 12px; }
.yf-sv-distribute > .yf-sv-alloc { animation: yf-sv-enter .42s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 70ms); gap: 0; transition: border-color .25s ease, background-color .25s ease, box-shadow .25s ease; }
.yf-sv-distribute > .yf-sv-alloc:focus-within { border-color: color-mix(in srgb, var(--st-accent) 45%, var(--st-line)); box-shadow: 0 8px 24px rgba(20, 30, 20, .06); }
.yf-sv-alloc__titlebox { display: grid; gap: 2px; min-width: 0; }
.yf-sv-alloc__sub { color: var(--st-muted); font-size: 12px; font-weight: 550; line-height: 1.3; }
.yf-sv-alloc__amount { margin: 12px 0 0; }
.yf-sv-alloc__free { transition: color .25s ease, transform .25s ease; }
.yf-sv-alloc.is-free { background: transparent; border-style: dashed; }
.yf-sv-flow { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); align-items: end; gap: 10px; }
.yf-sv-flow__arrow { display: grid; height: 44px; place-items: center; color: var(--st-accent); font-size: 20px; }
@media (max-width: 575.98px) {
    .yf-sv-flow { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .yf-sv-flow__arrow { height: 22px; transform: rotate(90deg); }
}
@media (prefers-reduced-motion: reduce) {
    .yf-sv-fold, .yf-sv-fold[hidden], .yf-sv-fold__in, .yf-sv-distribute > .yf-sv-alloc { transition: none; animation: none; }
}

.yf-sv-flow .yf-sv-field, .yf-sv-flow .yf-select-menu, .yf-sv-flow .yf-select-menu__trigger { width: 100%; min-width: 0; }
.yf-sv-flow .yf-sv-field { display: grid; gap: 8px; }
.yf-sv-flow .yf-sv-field > :not(.yf-sv-field__label):not(select) { display: block; width: 100%; max-width: 100%; }
.yf-sv-flow .yf-sv-field > :not(.yf-sv-field__label) button, .yf-sv-flow .yf-sv-field > :not(.yf-sv-field__label) .selected { width: 100%; }
.yf-sv-fold[hidden] .yf-sv-fold__in { padding: 0; }

/* Editor body: spacing lives on the rows, so a closed collapse leaves no gap behind. */
.yf-statistics-body { row-gap: 0; }
.yf-statistics-body > * { margin-bottom: 14px; }
.yf-statistics-body > .yf-stat-collapse:not(.is-open) { margin-top: 0; margin-bottom: 0; }
.yf-statistics-body > .yf-stat-collapse.is-open { transition: margin-bottom .4s var(--st-ease); }
.yf-statistics-body > .yf-sv-actions { justify-content: flex-start; margin-bottom: 0; }
.yf-operation-accounts .yf-manage-form-grid > .yf-sv-reveal.is-open { margin-bottom: 14px; }

/* Savings action submit: wide and centred under the form */
.yf-sv-panel__footer { justify-content: center; }
.yf-sv-panel__footer .btn { min-width: min(320px, 100%); }
@media (max-width: 575.98px) { .yf-sv-panel__footer .btn { width: 100%; min-width: 0; } }

/* «Тренды месяц к месяцу»: three fluid columns, never a horizontal scroll */
body .finance-analytics-trend-table { overflow: hidden; overflow-x: hidden; }
body .finance-analytics-trend-row { grid-template-columns: minmax(0, 1fr) auto clamp(64px, 28%, 104px); gap: 8px; }
body .finance-analytics-trend-row__label { overflow-wrap: anywhere; hyphens: auto; }
body .finance-analytics-trend-row .finance-trend-sparkline { width: 100%; max-width: 104px; min-width: 0; justify-self: end; }
