/* YousoroFinance redesign-web — one field system + manage / support / balance / expense-plan dialogs.
 * Rule: every field shell looks the same. On white surfaces fields are soft grey;
 * inside grey (grouped) containers they turn white with a hairline shadow. Composite fields
 * (amount + calculator + currency) own the shell; their inner <input> is always transparent. */

:root body.yf-redesign.yf-dashboard-auth {
    --rd-field-bg: var(--rd-fill-soft);
    --rd-field-bg-hover: var(--rd-fill);
    --rd-field-shadow: none;
    --rd-field-h: 44px;
}
:root body.yf-redesign.yf-dashboard-auth :is(
    .yf-entry-editor, .yf-expense-plan-compose, .yf-finance-plan-list, .yf-top-up-panel, .yf-referral-apply,
    .yf-asset-create, .yf-asset-edit, .yf-support__compose, .yf-support__inbox
) {
    --rd-field-bg: var(--rd-surface);
    --rd-field-bg-hover: var(--rd-surface);
    --rd-field-shadow: var(--rd-shadow-control);
}

/* Field shell */
:root body.yf-redesign.yf-dashboard-auth :is(
    .form-control, .form-select, .custom-select .selected, .yf-amount-input, .yf-money-input, .yf-compact-date,
    .yf-asset-create input:not([type=checkbox]), .yf-asset-edit input:not([type=checkbox]), .yf-manage-form-grid input, .yf-manage-form-grid select,
    .yf-support select, .yf-support__compose label > :is(input, textarea), .yf-referral-apply input, .yf-weekly-report-form :is(select, input:not([type=checkbox])), .yf-account-panel :is(select, input:is([type=text], [type=email], [type=url], [type=password], [type=time], :not([type])))
):not(:is(.yf-amount-input, .yf-money-input) > *) {
    min-height: var(--rd-field-h);
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    background-color: var(--rd-field-bg) !important;
    box-shadow: var(--rd-field-shadow) !important;
    color: var(--rd-ink) !important;
    outline: 0 !important;
    transition: background-color var(--rd-dur-fast) var(--rd-ease), border-color var(--rd-dur-fast) var(--rd-ease), box-shadow var(--rd-dur-fast) var(--rd-ease);
}
:root body.yf-redesign.yf-dashboard-auth :is(
    .form-control, .form-select, .custom-select .selected, .yf-amount-input, .yf-money-input, .yf-compact-date,
    .yf-asset-create input:not([type=checkbox]), .yf-asset-edit input:not([type=checkbox]), .yf-manage-form-grid input, .yf-manage-form-grid select,
    .yf-support select, .yf-support__compose label > :is(input, textarea), .yf-referral-apply input, .yf-weekly-report-form :is(select, input:not([type=checkbox])), .yf-account-panel :is(select, input:is([type=text], [type=email], [type=url], [type=password], [type=time], :not([type])))
):not(:is(.yf-amount-input, .yf-money-input) > *):hover:not(:focus):not(:focus-within):not(:disabled) {
    background-color: var(--rd-field-bg-hover) !important;
}
:root body.yf-redesign.yf-dashboard-auth :is(
    .form-control, .form-select, .yf-amount-input, .yf-money-input, .yf-compact-date,
    .yf-asset-create input:not([type=checkbox]), .yf-asset-edit input:not([type=checkbox]), .yf-manage-form-grid input, .yf-manage-form-grid select,
    .yf-support select, .yf-support__compose label > :is(input, textarea), .yf-referral-apply input, .yf-weekly-report-form :is(select, input:not([type=checkbox])), .yf-account-panel :is(select, input:is([type=text], [type=email], [type=url], [type=password], [type=time], :not([type])))
):not(:is(.yf-amount-input, .yf-money-input) > *):is(:focus, :focus-within) {
    border-color: var(--rd-accent) !important;
    background-color: var(--rd-surface) !important;
    box-shadow: var(--rd-focus-ring) !important;
}

/* Inner input of composite amount fields: no second frame, ever */
:root body.yf-redesign.yf-dashboard-auth :is(.yf-amount-input, .yf-money-input) > :is(input, .form-control),
:root body.yf-redesign.yf-dashboard-auth :is(.yf-amount-input, .yf-money-input) > :is(input, .form-control):is(:hover, :focus) {
    min-height: calc(var(--rd-field-h) - 2px);
    padding: 0 8px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
    font-size: 15.5px;
    font-weight: 650;
}
:root body.yf-redesign.yf-dashboard-auth :is(.yf-amount-input, .yf-money-input) {
    display: flex !important;
    align-items: center !important;
    gap: 6px;
    padding: 0 5px !important;
    overflow: visible;
}
:root body.yf-redesign.yf-dashboard-auth .yf-money-input > span:not([class]) { padding-right: 10px; color: var(--rd-subtle); font-weight: 650; }

/* Native selects get the same chevron as .form-select */
:root body.yf-redesign.yf-dashboard-auth :is(.yf-support select, .yf-manage-form-grid select, .yf-weekly-report-form select, .yf-account-panel select) {
    padding: 0 36px 0 13px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238e8e93' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 13px center !important;
    background-size: 12px 10px !important;
    font-size: 14px;
    font-weight: 550;
    cursor: pointer;
}

/* ── Wider dialogs when the screen allows ──────────────────────────────── */
@media (min-width: 992px) {
    :root body.yf-redesign.yf-dashboard-auth .yf-finance-form-dialog:not(.modal-lg):not(.modal-xl) { max-width: 720px !important; }
    :root body.yf-redesign.yf-dashboard-auth .yf-day-editor-dialog { max-width: 860px !important; }
}
@media (min-width: 768px) {
    :root body.yf-redesign.yf-dashboard-auth .yf-entry-editor__fields { grid-template-columns: minmax(240px, 1.5fr) minmax(0, 1.2fr) 96px !important; }
}
:root body.yf-redesign.yf-dashboard-auth .yf-compact-date { padding: 0 10px !important; font-size: 14px; }

/* Planned-income rows: fixed status column so the comment width never jumps */
@media (min-width: 768px) {
    :root body.yf-redesign.yf-dashboard-auth .income-plan-modal-row { grid-template-columns: minmax(190px, 1.1fr) minmax(0, 1.4fr) 140px 36px !important; }
}

/* ── Expense plan (Создать план расходов) ──────────────────────────────── */
:root body.yf-redesign.yf-dashboard-auth .yf-expense-plan-compose {
    margin-top: 6px;
    padding: 16px !important;
    border: 0 !important;
    border-radius: var(--rd-radius-lg) !important;
    background: var(--rd-surface-grouped) !important;
    box-shadow: inset 0 0 0 1px var(--rd-line-soft) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-expense-plan-rows { display: grid; gap: 10px; margin-top: 12px; }
:root body.yf-redesign.yf-dashboard-auth .yf-expense-plan-row {
    display: grid !important;
    grid-template-columns: minmax(240px, 1.3fr) minmax(0, 1fr) 36px;
    align-items: end;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-expense-plan-row + .yf-expense-plan-row { padding-top: 10px !important; border-top: 1px solid var(--rd-line-soft) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-expense-plan-row > label { display: grid; gap: 6px; min-width: 0; margin: 0; }
:root body.yf-redesign.yf-dashboard-auth .yf-expense-plan-row > label > span:first-child { color: var(--rd-ink-2); font-size: 12.5px; font-weight: 650; }
:root body.yf-redesign.yf-dashboard-auth .yf-expense-plan-row > .yf-entry-action { margin-bottom: 4px; }
@media (max-width: 575.98px) {
    :root body.yf-redesign.yf-dashboard-auth .yf-expense-plan-row { grid-template-columns: minmax(0, 1fr) 36px; }
    :root body.yf-redesign.yf-dashboard-auth .yf-expense-plan-row > label:nth-child(2) { grid-column: 1; }
}

/* ── Balance top-up ────────────────────────────────────────────────────── */
:root body.yf-redesign.yf-dashboard-auth #balance-modal .modal-dialog { max-width: min(640px, calc(100vw - 32px)); }
:root body.yf-redesign.yf-dashboard-auth .yf-balance-form {
    display: grid;
    gap: 16px;
    margin-top: 16px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-balance-form > .yf-form-field { margin: 0 !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-top-up-panel {
    display: grid;
    gap: 14px;
    margin: 0 !important;
    padding: 18px !important;
    border: 0 !important;
    border-radius: var(--rd-radius-lg) !important;
    background: var(--rd-surface-grouped) !important;
    box-shadow: inset 0 0 0 1px var(--rd-line-soft) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-top-up-panel .yf-form-field,
:root body.yf-redesign.yf-dashboard-auth .yf-top-up-panel .yf-promo-entry { margin: 0 !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-quick-amounts { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px !important; margin: 0 !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-quick-amount { min-height: 36px; margin: 0 !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-promo-entry__row { display: flex; gap: 8px; }
:root body.yf-redesign.yf-dashboard-auth .yf-promo-entry__row .form-control { flex: 1 1 auto; }
:root body.yf-redesign.yf-dashboard-auth .yf-promo-entry__row .btn { min-height: var(--rd-field-h); padding: 0 16px; }
:root body.yf-redesign.yf-dashboard-auth .yf-top-up-panel .yf-primary-button--wide { width: 100%; min-height: 46px; }
:root body.yf-redesign.yf-dashboard-auth .yf-form-hint { display: block; text-align: center; }
:root body.yf-redesign.yf-dashboard-auth .yf-transaction-history {
    margin-top: 14px;
    overflow: hidden;
    border: 0 !important;
    border-radius: var(--rd-radius-md) !important;
    background: var(--rd-surface-grouped) !important;
    box-shadow: inset 0 0 0 1px var(--rd-line-soft) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-transaction-history > summary { min-height: 50px; padding: 0 16px !important; display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
:root body.yf-redesign.yf-dashboard-auth .yf-transaction-history > summary::-webkit-details-marker { display: none; }
:root body.yf-redesign.yf-dashboard-auth .yf-transaction-history > :not(summary) { margin: 0 12px 12px; }
@media (max-width: 575.98px) {
    :root body.yf-redesign.yf-dashboard-auth .yf-quick-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Manage dialogs: «Деньги и криптовалюта», «Финансовые планы» ───────── */
:root body.yf-redesign.yf-dashboard-auth #assetItemsModal .modal-dialog { max-width: min(820px, calc(100vw - 32px)); }
:root body.yf-redesign.yf-dashboard-auth .yf-manage-modal .modal-body { padding: 8px 26px 26px !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-manage-modal__eyebrow { color: var(--rd-muted) !important; font-size: 12px !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; }

:root body.yf-redesign.yf-dashboard-auth .yf-manage-tabs {
    display: inline-flex !important;
    gap: 2px !important;
    margin-bottom: 18px;
    padding: 3px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--rd-fill) !important;
    box-shadow: none !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-manage-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: var(--rd-ink-2) !important;
    font-size: 14px;
    font-weight: 600;
    box-shadow: none !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-manage-tabs button.is-active { color: var(--rd-ink) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-manage-tabs:not(.rd-seg-track) button.is-active { background: var(--rd-surface) !important; box-shadow: var(--rd-shadow-control) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-manage-tabs button i { color: var(--rd-accent); }

:root body.yf-redesign.yf-dashboard-auth .yf-asset-create {
    align-items: end;
    gap: 12px !important;
    padding: 16px !important;
    border: 0 !important;
    border-radius: var(--rd-radius-lg) !important;
    background: var(--rd-surface-grouped) !important;
    box-shadow: inset 0 0 0 1px var(--rd-line-soft) !important;
}
:root body.yf-redesign.yf-dashboard-auth :is(.yf-asset-create, .yf-asset-edit) label { display: grid; gap: 6px; margin: 0; color: var(--rd-ink-2); font-size: 12.5px; font-weight: 650; }
:root body.yf-redesign.yf-dashboard-auth :is(.yf-asset-create, .yf-asset-edit) input:not([type=checkbox]):not(.yf-money-input > input) { padding: 0 13px; font-size: 14.5px; font-weight: 550; }

:root body.yf-redesign.yf-dashboard-auth :is(.yf-manage-primary, .yf-manage-danger) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--rd-field-h);
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 12px !important;
    font-weight: 650 !important;
    box-shadow: none !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-manage-primary { background: var(--rd-accent) !important; color: #fff !important; box-shadow: 0 1px 2px rgba(var(--rd-accent-rgb), .28), inset 0 1px 0 rgba(255, 255, 255, .14) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-manage-primary:hover { background: var(--rd-accent-hover) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-manage-danger { min-width: var(--rd-field-h); padding: 0 !important; background: var(--rd-negative-soft) !important; color: var(--rd-negative) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-manage-danger:hover { background: rgba(229, 72, 77, .16) !important; }

:root body.yf-redesign.yf-dashboard-auth .yf-asset-list { display: grid; gap: 10px; margin-top: 16px; }
:root body.yf-redesign.yf-dashboard-auth .yf-asset-row {
    overflow: hidden;
    margin: 0 !important;
    border: 0 !important;
    border-radius: var(--rd-radius-md) !important;
    background: var(--rd-surface) !important;
    box-shadow: var(--rd-shadow-card) !important;
    transition: box-shadow var(--rd-dur) var(--rd-ease);
}
:root body.yf-redesign.yf-dashboard-auth .yf-asset-row:hover { box-shadow: var(--rd-shadow-card-hover) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-asset-row > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 10px 16px !important;
    list-style: none;
    cursor: pointer;
}
:root body.yf-redesign.yf-dashboard-auth .yf-asset-row > summary::-webkit-details-marker { display: none; }
:root body.yf-redesign.yf-dashboard-auth .yf-asset-row > summary > div { flex: 1 1 auto; min-width: 0; }
:root body.yf-redesign.yf-dashboard-auth .yf-asset-row > summary strong { display: block; color: var(--rd-ink); font-size: 15px; font-weight: 700; }
:root body.yf-redesign.yf-dashboard-auth .yf-asset-row > summary span:not(.yf-asset-row__icon) { color: var(--rd-muted); font-size: 13px; font-weight: 550; }
:root body.yf-redesign.yf-dashboard-auth .yf-asset-row > summary > .ti-chevron-down { color: var(--rd-subtle); transition: transform var(--rd-dur) var(--rd-ease); }
:root body.yf-redesign.yf-dashboard-auth .yf-asset-row[open] > summary > .ti-chevron-down { transform: rotate(180deg); }
:root body.yf-redesign.yf-dashboard-auth .yf-asset-row__icon {
    display: inline-grid !important;
    flex: 0 0 38px;
    width: 38px !important;
    height: 38px !important;
    place-items: center;
    overflow: hidden;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--rd-accent-soft) !important;
    color: var(--rd-accent) !important;
    font-size: 18px;
}
:root body.yf-redesign.yf-dashboard-auth .yf-asset-row__icon img { width: 100%; height: 100%; object-fit: cover; }
:root body.yf-redesign.yf-dashboard-auth .yf-asset-edit {
    align-items: end;
    gap: 12px !important;
    margin: 0 12px 12px !important;
    padding: 14px !important;
    border: 0 !important;
    border-radius: var(--rd-radius-md) !important;
    background: var(--rd-surface-grouped) !important;
    box-shadow: inset 0 0 0 1px var(--rd-line-soft) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-asset-edit > div:last-child { display: flex; gap: 8px; align-items: end; }
:root body.yf-redesign.yf-dashboard-auth :is(.yf-manage-status, .yf-crypto-cost-note) { color: var(--rd-muted) !important; font-size: 12.5px !important; line-height: 1.55; }

/* ── Tech support ──────────────────────────────────────────────────────── */
:root body.yf-redesign.yf-dashboard-auth #yfSupportModal .modal-dialog { max-width: min(1080px, calc(100vw - 32px)); }
:root body.yf-redesign.yf-dashboard-auth .yf-support-modal { overflow: hidden; }
:root body.yf-redesign.yf-dashboard-auth .yf-support-modal .modal-header { border-bottom: 1px solid var(--rd-line-soft) !important; padding-bottom: 16px !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-support-modal h2.modal-title { font-size: 22px !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-support { border: 0 !important; background: var(--rd-surface) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__inbox {
    gap: 12px;
    padding: 18px !important;
    border: 0 !important;
    border-right: 1px solid var(--rd-line-soft) !important;
    background: var(--rd-surface-grouped) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-support__inbox-head { display: grid; gap: 12px; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__inbox-head strong { color: var(--rd-ink); font-size: 16px; font-weight: 700; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__inbox-head label { display: grid; gap: 6px; margin: 0; color: var(--rd-muted); font-size: 12.5px; font-weight: 600; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__inbox-head .yf-support__primary { width: 100%; min-height: 42px; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__list { display: grid; gap: 8px; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__list > * {
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--rd-surface) !important;
    box-shadow: var(--rd-shadow-control) !important;
    color: var(--rd-ink);
    transition: box-shadow var(--rd-dur-fast) var(--rd-ease), transform var(--rd-dur-fast) var(--rd-ease);
}
:root body.yf-redesign.yf-dashboard-auth .yf-support__list > button:hover,
:root body.yf-redesign.yf-dashboard-auth .yf-support__list > a:hover { box-shadow: var(--rd-shadow-card-hover) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__list > :is(.is-active, [aria-current="true"]) { box-shadow: 0 0 0 1.5px var(--rd-accent) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__list > :only-child:not(button):not(a) {
    padding: 18px 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--rd-muted) !important;
    font-size: 13px;
    text-align: center;
}
:root body.yf-redesign.yf-dashboard-auth .yf-support__pager { align-items: center; gap: 8px; color: var(--rd-subtle); font-size: 12.5px; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__pager button {
    width: 30px;
    height: 30px;
    border: 0 !important;
    border-radius: 50% !important;
    background: var(--rd-surface) !important;
    color: var(--rd-ink-2) !important;
    box-shadow: var(--rd-shadow-control) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-support__pager button:disabled { opacity: .45; }

:root body.yf-redesign.yf-dashboard-auth .yf-support__detail { background: var(--rd-surface) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__detail-head {
    padding: 18px 22px !important;
    border-bottom: 1px solid var(--rd-line-soft) !important;
    background: transparent !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-support__detail-head h3 { color: var(--rd-ink); font-size: 18px; font-weight: 700; letter-spacing: var(--rd-tracking-snug); }
:root body.yf-redesign.yf-dashboard-auth .yf-support__detail-head span:not(.yf-support__eyebrow) { color: var(--rd-muted); font-size: 12.5px; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__conversation { padding: 18px 22px !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__welcome {
    display: grid;
    justify-items: center;
    gap: 8px;
    max-width: 380px;
    margin: 40px auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center;
}
:root body.yf-redesign.yf-dashboard-auth .yf-support__welcome > i {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border-radius: 18px;
    background: var(--rd-accent-soft);
    color: var(--rd-accent);
    font-size: 26px;
}
:root body.yf-redesign.yf-dashboard-auth .yf-support__welcome h4 { margin: 6px 0 0; color: var(--rd-ink); font-size: 18px; font-weight: 700; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__welcome p { margin: 0; color: var(--rd-muted); font-size: 14px; line-height: 1.55; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__compose {
    display: grid;
    gap: 10px;
    margin: 0 22px 22px !important;
    padding: 14px !important;
    border: 0 !important;
    border-radius: var(--rd-radius-lg) !important;
    background: var(--rd-surface-grouped) !important;
    box-shadow: inset 0 0 0 1px var(--rd-line-soft) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-support__compose label { margin: 0; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__compose label > input { width: 100%; padding: 0 14px; font-size: 14.5px; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__compose-actions { display: flex; align-items: center; gap: 10px; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__compose-actions > button:not(.yf-support__primary) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    font-size: 13.5px;
    font-weight: 650;
    white-space: nowrap;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--rd-surface) !important;
    color: var(--rd-ink-2) !important;
    box-shadow: var(--rd-shadow-control) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-support__compose-actions > span { flex: 1 1 auto; color: var(--rd-subtle); font-size: 12.5px; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__compose small { color: var(--rd-subtle) !important; font-size: 12px; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__older {
    border: 0 !important;
    border-radius: var(--rd-radius-pill) !important;
    background: var(--rd-fill-soft) !important;
    color: var(--rd-ink-2) !important;
    font-weight: 600;
}

/* Legacy CSS pins these dialogs to width:min(540px…); let max-width drive the size instead */
@media (min-width: 576px) {
    :root body.yf-redesign.yf-dashboard-auth :is(.yf-finance-form-dialog, .yf-day-editor-dialog, .yf-income-calendar-day-dialog, .yf-tag-edit-dialog, .yf-analytics-detail-dialog) {
        width: calc(100% - 32px) !important;
    }
}
:root body.yf-redesign.yf-dashboard-auth .yf-top-up-panel .yf-secondary-button { background: var(--rd-surface) !important; box-shadow: var(--rd-shadow-control) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-top-up-panel .yf-secondary-button:hover { background: var(--rd-fill-soft) !important; }

:root body.yf-redesign.yf-dashboard-auth .yf-support__compose label > textarea { width: 100%; min-height: 96px; padding: 11px 14px; font-size: 14.5px; line-height: 1.5; resize: vertical; }
:root body.yf-redesign.yf-dashboard-auth .yf-support__compose label > span { display: block; margin-bottom: 6px; color: var(--rd-ink-2); font-size: 12.5px; font-weight: 650; }
:root body.yf-redesign.yf-dashboard-auth #yfSupportModal :is(.yf-support__eyebrow, .modal-header span) {
    color: var(--rd-muted) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

/* Destructive action sits apart on the left, tinted rather than loud */
:root body.yf-redesign.yf-dashboard-auth .modal-footer .btn-danger {
    margin-right: auto !important;
    background: var(--rd-negative-soft) !important;
    color: var(--rd-negative) !important;
    box-shadow: none !important;
}
:root body.yf-redesign.yf-dashboard-auth .modal-footer .btn-danger:hover { background: rgba(229, 72, 77, .16) !important; }
:root body.yf-redesign.yf-dashboard-auth #assetPlansModal .modal-dialog { max-width: min(600px, calc(100vw - 32px)); }

/* Edit-plan rows (day editor) look exactly like the income/expense entry rows */
:root body.yf-redesign.yf-dashboard-auth .yf-day-editor .yf-expense-plan-row {
    --rd-field-bg: var(--rd-surface);
    --rd-field-bg-hover: var(--rd-surface);
    --rd-field-shadow: var(--rd-shadow-control);
    padding: 14px !important;
    border: 0 !important;
    border-radius: var(--rd-radius-md) !important;
    background: var(--rd-surface-grouped) !important;
    box-shadow: inset 0 0 0 1px var(--rd-line-soft) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-day-editor .yf-expense-plan-row + .yf-expense-plan-row { padding-top: 14px !important; border-top: 0 !important; }

/* Terms of subscriptions: readable document rhythm */
:root body.yf-redesign.yf-dashboard-auth #termsModal .modal-dialog { max-width: min(760px, calc(100vw - 32px)); }
:root body.yf-redesign.yf-dashboard-auth #termsModal .modal-title { width: 100%; text-align: left !important; }
:root body.yf-redesign.yf-dashboard-auth #termsModal .modal-body { color: var(--rd-ink-2); font-size: 14px; line-height: 1.65; text-align: left !important; }
:root body.yf-redesign.yf-dashboard-auth #termsModal .modal-body :is(h4, h5, h6) {
    margin: 22px 0 6px;
    color: var(--rd-ink);
    font-size: 15.5px;
    font-weight: 700;
    text-align: left !important;
}
:root body.yf-redesign.yf-dashboard-auth #termsModal .modal-body > :first-child { margin-top: 0; }

:root body.yf-redesign.yf-dashboard-auth .yf-weekly-report-form :is(select, input:not([type=checkbox])), .yf-account-panel :is(select, input:is([type=text], [type=email], [type=url], [type=password], [type=time], :not([type]))) { width: 100%; padding-left: 13px; font-size: 14px; font-weight: 550; }
:root body.yf-redesign.yf-dashboard-auth .yf-weekly-report-form label { color: var(--rd-ink-2); font-size: 12.5px; font-weight: 650; }

:root body.yf-redesign.yf-dashboard-auth .yf-account-panel :is(input:is([type=text], [type=email], [type=url], [type=password], :not([type]))) { width: 100%; padding: 0 13px; font-size: 14px; font-weight: 550; }

/* Standalone currency picker (Settings → Валюты) behaves like a select field */
:root body.yf-redesign.yf-dashboard-auth .yf-currency-picker:not(:is(.yf-amount-input, .yf-money-input) .yf-currency-picker) { display: block; width: 100%; }
:root body.yf-redesign.yf-dashboard-auth .yf-currency-picker:not(:is(.yf-amount-input, .yf-money-input) .yf-currency-picker) > .yf-currency-picker__trigger {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-height: var(--rd-field-h);
    margin: 0 !important;
    padding: 0 13px !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    background: var(--rd-field-bg) !important;
    box-shadow: var(--rd-field-shadow) !important;
    font-size: 14px;
}
:root body.yf-redesign.yf-dashboard-auth .yf-currency-picker:not(:is(.yf-amount-input, .yf-money-input) .yf-currency-picker) > .yf-currency-picker__trigger > i { margin-left: auto; color: var(--rd-subtle); }
:root body.yf-redesign.yf-dashboard-auth .yf-currency-picker:not(:is(.yf-amount-input, .yf-money-input) .yf-currency-picker) > .yf-currency-picker__trigger[aria-expanded="true"] { border-color: var(--rd-accent) !important; box-shadow: var(--rd-focus-ring) !important; }

/* Day picker keeps a compact row height in wider dialogs */
:root body.yf-redesign.yf-dashboard-auth .yf-day-calendar__day {
    aspect-ratio: auto !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-day-calendar__grid { row-gap: 4px !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-day-calendar__spacer { aspect-ratio: auto !important; height: 40px !important; min-height: 0 !important; }
:root body.yf-redesign.yf-dashboard-auth #termsModal .modal-content { max-height: calc(100vh - 3.5rem); }
:root body.yf-redesign.yf-dashboard-auth #termsModal .modal-body { overflow-y: auto; scrollbar-gutter: stable; }

/* ── Calendar day / month-plan dialogs ─────────────────────────────────── */
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__summary {
    gap: 0 !important;
    overflow: hidden;
    border: 0 !important;
    border-radius: var(--rd-radius-md) !important;
    background: var(--rd-surface-grouped) !important;
    box-shadow: inset 0 0 0 1px var(--rd-line-soft) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__summary > div {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 2px 10px !important;
    align-items: center;
    border-color: var(--rd-line-soft) !important;
    background: transparent !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__summary i {
    display: grid !important;
    width: 34px;
    height: 34px;
    place-items: center;
    align-self: center;
    font-size: 17px !important;
    line-height: 1 !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--rd-accent-soft) !important;
    color: var(--rd-accent) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__summary span { color: var(--rd-muted) !important; font-size: 12.5px; font-weight: 600; }
@media (max-width: 767.98px) {
    :root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__summary > div { grid-template-columns: 34px minmax(0, 1fr) auto !important; padding: 10px 13px; }
    :root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__summary i { grid-row: auto; }
}
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__summary strong { color: var(--rd-ink) !important; font-size: 17px; font-weight: 750; }
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__rows {
    overflow: hidden;
    border: 0 !important;
    border-radius: var(--rd-radius-md) !important;
    background: var(--rd-surface) !important;
    box-shadow: inset 0 0 0 1px var(--rd-line) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__row { padding: 8px 12px !important; border-color: var(--rd-line-soft) !important; background: transparent !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__row:hover { background: var(--rd-row-hover) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__edit {
    min-height: 44px;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--rd-fill-soft) !important;
    color: var(--rd-ink) !important;
    box-shadow: none !important;
    transition: background var(--rd-dur-fast) var(--rd-ease);
}
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__edit:hover { background: var(--rd-fill) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__edit.is-empty { color: var(--rd-accent) !important; font-weight: 650; }
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__edit > strong { color: var(--rd-ink) !important; font-weight: 750; }
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__edit > span { color: var(--rd-subtle) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__edit > i { color: var(--rd-accent) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__tag,
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__row .table-tag-color { border-radius: var(--rd-radius-pill) !important; font-weight: 650; }
:root body.yf-redesign.yf-dashboard-auth .yf-income-calendar-day__note { border: 0 !important; border-radius: 12px !important; background: var(--rd-info-soft) !important; color: var(--rd-ink-2) !important; }
