/* YousoroFinance redesign-web — dialogs with forms: info, crypto, tag builder, day editor, planned income */

/* ── Numeric fields: no spinners, centred calculator badge ─────────────── */
:root body.yf-redesign.yf-dashboard-auth input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
:root body.yf-redesign.yf-dashboard-auth input[type="number"]::-webkit-outer-spin-button,
:root body.yf-redesign.yf-dashboard-auth input[type="number"]::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

:root body.yf-redesign.yf-dashboard-auth .yf-amount-input {
    display: flex !important;
    align-items: center !important;
    gap: 6px;
    padding: 0 5px !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-amount-input > .form-control { flex: 1 1 auto; min-width: 0; padding-inline: 8px !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-amount-input .yf-calculator-trigger {
    display: inline-grid !important;
    flex: 0 0 34px;
    align-self: center !important;
    place-items: center;
    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    transform: none !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-amount-input .yf-currency-picker { flex: 0 0 auto; align-self: center; }
:root body.yf-redesign.yf-dashboard-auth .yf-amount-input .yf-currency-picker__trigger { margin: 0 !important; }

/* ── Info dialogs (i) ──────────────────────────────────────────────────── */
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-dialog { max-width: min(720px, calc(100vw - 32px)) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-heading { gap: 14px; align-items: center; }
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-heading__icon {
    width: 42px !important;
    height: 42px !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: linear-gradient(160deg, rgba(47, 111, 228, .16), rgba(47, 111, 228, .06)) !important;
    color: var(--rd-info) !important;
    box-shadow: inset 0 0 0 .5px rgba(47, 111, 228, .14) !important;
    font-size: 20px;
}
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-heading span:not(.yf-dashboard-info-heading__icon) {
    display: block;
    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 #dashboardInfoModalBody {
    display: grid;
    gap: 0;
    margin: 4px 0 0;
    overflow: hidden;
    border-radius: var(--rd-radius-lg);
    background: var(--rd-surface-grouped);
    box-shadow: inset 0 0 0 1px var(--rd-line-soft);
    padding: 0 !important;
}
:root body.yf-redesign.yf-dashboard-auth .modal-body#dashboardInfoModalBody { margin: 4px 24px 8px !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 14px;
    padding: 16px 18px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section + .yf-dashboard-info-section { border-top: 1px solid var(--rd-line-soft) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section__heading { display: contents; }
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section__icon {
    grid-row: 1 / span 2;
    display: grid;
    width: 36px !important;
    height: 36px !important;
    place-items: center;
    border: 0 !important;
    border-radius: 11px !important;
    background: var(--rd-accent-soft) !important;
    color: var(--rd-accent) !important;
    font-size: 17px;
}
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section--formula .yf-dashboard-info-section__icon { background: var(--rd-info-soft) !important; color: var(--rd-info) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section--reading .yf-dashboard-info-section__icon { background: var(--rd-gold-soft) !important; color: var(--rd-gold) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section h6 { margin: 7px 0 4px; color: var(--rd-ink); font-size: 15px; font-weight: 700; }
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section__body { grid-column: 2; color: var(--rd-ink-2); font-size: 14px; line-height: 1.55; }
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section__body p { margin: 0; }
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section__body ul { margin: 2px 0 0; padding-left: 18px; }
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section__body li { margin: 4px 0; }
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section__body li::marker { color: var(--rd-accent); }

/* ── Crypto position dialog ────────────────────────────────────────────── */
:root body.yf-redesign.yf-dashboard-auth #cryptoModal .modal-dialog { max-width: min(760px, calc(100vw - 32px)); }
:root body.yf-redesign.yf-dashboard-auth #cryptoModal .modal-body > .row { --bs-gutter-x: 14px; align-items: stretch; }
:root body.yf-redesign.yf-dashboard-auth #cryptoModal .col-lg-3 { flex: 0 0 34%; max-width: 34%; }
:root body.yf-redesign.yf-dashboard-auth #cryptoModal .col-lg-9 { flex: 0 0 66%; max-width: 66%; }
:root body.yf-redesign.yf-dashboard-auth #cryptoModal .card {
    height: 100%;
    border: 0 !important;
    border-radius: var(--rd-radius-lg) !important;
    box-shadow: none !important;
}
:root body.yf-redesign.yf-dashboard-auth #cryptoModal .col-lg-3 .card {
    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 #cryptoModal .col-lg-3 .card-body { display: flex; flex-direction: column; gap: 6px; padding: 18px !important; color: var(--rd-muted); font-size: 13px; }
:root body.yf-redesign.yf-dashboard-auth #modal-crypto-logo { width: 34px !important; height: 34px !important; margin-bottom: 8px !important; border-radius: 9px !important; object-fit: contain; box-shadow: none; }
:root body.yf-redesign.yf-dashboard-auth #cryptoModal .card-subtitle { color: var(--rd-muted) !important; font-size: 13px; font-weight: 650; }
:root body.yf-redesign.yf-dashboard-auth #modal-crypto-name { color: var(--rd-ink); font-size: 16px; font-weight: 750; }
:root body.yf-redesign.yf-dashboard-auth #modal-crypto-price { color: var(--rd-ink); font-size: 20px !important; font-weight: 750; letter-spacing: -.02em; }
:root body.yf-redesign.yf-dashboard-auth #cryptoModal #badge-change-color { align-self: flex-start; margin-top: 4px !important; }

:root body.yf-redesign.yf-dashboard-auth #cryptoModal .col-lg-9 .card { background: transparent !important; }
:root body.yf-redesign.yf-dashboard-auth #cryptoModal .col-lg-9 .card-body { padding: 0 !important; }
:root body.yf-redesign.yf-dashboard-auth #cryptoModal .col-lg-9 .card-body > .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}
:root body.yf-redesign.yf-dashboard-auth #cryptoModal .col-lg-9 .card-body > .row > .col-6 {
    width: auto;
    max-width: none;
    padding: 14px 16px;
    border-radius: var(--rd-radius-md);
    background: var(--rd-surface-grouped);
    box-shadow: inset 0 0 0 1px var(--rd-line-soft);
    color: var(--rd-muted);
    font-size: 13px;
}
:root body.yf-redesign.yf-dashboard-auth #cryptoModal .col-6 > br { display: none; }
:root body.yf-redesign.yf-dashboard-auth #cryptoModal .text-crypto-name { display: block; margin-bottom: 4px; border: 0 !important; color: var(--rd-muted) !important; font-size: 12.5px; font-weight: 600; }
:root body.yf-redesign.yf-dashboard-auth #cryptoModal .col-6 > .fs-6 { color: var(--rd-ink); font-size: 17px !important; font-weight: 750; letter-spacing: var(--rd-tracking-snug); }
@media (max-width: 767.98px) {
    :root body.yf-redesign.yf-dashboard-auth #cryptoModal :is(.col-lg-3, .col-lg-9) { flex: 0 0 100%; max-width: 100%; }
}

/* ── Tag builder (create expense / income tag) ─────────────────────────── */
:root body.yf-redesign.yf-dashboard-auth .yf-tag-builder { gap: 22px 28px !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-tag-builder .form-label { color: var(--rd-ink-2); font-size: 13px; font-weight: 650; }

:root body.yf-redesign.yf-dashboard-auth .yf-tag-color-picker__presets { gap: 10px !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-tag-color-picker__swatch {
    width: 30px !important;
    height: 30px !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08) !important;
    transition: transform var(--rd-dur-fast) var(--rd-ease), box-shadow var(--rd-dur-fast) var(--rd-ease);
}
:root body.yf-redesign.yf-dashboard-auth .yf-tag-color-picker__swatch:hover { transform: scale(1.08); }
:root body.yf-redesign.yf-dashboard-auth .yf-tag-color-picker__swatch[aria-pressed="true"] {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(28, 28, 30, .78) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-tag-color-picker__swatch i { color: #fff; font-size: 14px; }

:root body.yf-redesign.yf-dashboard-auth .yf-tag-color-picker__controls { gap: 10px !important; }
:root body.yf-redesign.yf-dashboard-auth :is(.yf-tag-color-picker__selection, .yf-tag-color-picker__custom) {
    min-height: 56px;
    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-tag-color-picker__custom:hover { background: var(--rd-surface) !important; box-shadow: var(--rd-shadow-card) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-tag-color-picker__preview { width: 30px !important; height: 30px !important; border: 0 !important; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
:root body.yf-redesign.yf-dashboard-auth .yf-tag-color-picker__selection strong { color: var(--rd-ink); font-size: 14px; font-weight: 700; }
:root body.yf-redesign.yf-dashboard-auth .yf-tag-color-picker__selection span,
:root body.yf-redesign.yf-dashboard-auth .yf-tag-color-picker__hint { color: var(--rd-muted) !important; font-size: 12.5px; }

:root body.yf-redesign.yf-dashboard-auth .yf-recurring-setting {
    align-items: center;
    gap: 14px;
    padding: 14px 16px !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-recurring-setting__copy span { color: var(--rd-ink); font-size: 14px; font-weight: 650; }
:root body.yf-redesign.yf-dashboard-auth .yf-recurring-setting__copy small { color: var(--rd-muted); font-size: 12.5px; }

/* Presets column */
:root body.yf-redesign.yf-dashboard-auth .yf-tag-presets { border-color: var(--rd-line) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-tag-presets__heading strong { color: var(--rd-ink); font-size: 15px; font-weight: 700; }
:root body.yf-redesign.yf-dashboard-auth .yf-tag-presets__heading span { color: var(--rd-muted); font-size: 12.5px; }
:root body.yf-redesign.yf-dashboard-auth .yf-tag-presets__grid { gap: 8px !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-tag-preset {
    min-height: 44px;
    gap: 10px;
    padding: 6px 10px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--rd-surface-grouped) !important;
    color: var(--rd-ink) !important;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px var(--rd-line-soft) !important;
    transition: background var(--rd-dur-fast) var(--rd-ease), 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-tag-preset:hover { background: var(--rd-surface) !important; box-shadow: var(--rd-shadow-card) !important; transform: translateY(-1px); }
:root body.yf-redesign.yf-dashboard-auth .yf-tag-preset.is-selected {
    background: var(--rd-accent-soft) !important;
    box-shadow: inset 0 0 0 1.5px var(--rd-accent) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-tag-preset > span:first-child,
:root body.yf-redesign.yf-dashboard-auth .yf-tag-preset > i:first-child { border-radius: 9px !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-tag-presets__toggle {
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--rd-surface-grouped) !important;
    color: var(--rd-ink) !important;
    box-shadow: inset 0 0 0 1px var(--rd-line-soft) !important;
}

/* Month picker inside tag builder / edit */
:root body.yf-redesign.yf-dashboard-auth .yf-month-picker {
    padding: 12px !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-month-picker__header 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-month-picker__header strong { color: var(--rd-ink); font-size: 14px; font-weight: 700; }
:root body.yf-redesign.yf-dashboard-auth .yf-month-picker__grid { gap: 6px !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-month-picker__month { background: var(--rd-surface) !important; box-shadow: var(--rd-shadow-control) !important; }

/* ── Day editor (edit income / expense of a day) ───────────────────────── */
:root body.yf-redesign.yf-dashboard-auth .yf-day-editor__meta { gap: 10px !important; margin-bottom: 18px; }
:root body.yf-redesign.yf-dashboard-auth .yf-day-editor__meta > span {
    padding: 12px 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__meta small { display: block; margin-bottom: 6px; 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-day-editor__meta strong { color: var(--rd-ink); font-size: 15px; font-weight: 700; }
:root body.yf-redesign.yf-dashboard-auth .yf-day-editor__meta .table-tag-color {
    align-self: flex-start;
    display: inline-flex;
    width: auto !important;
    max-width: 100%;
    padding: 4px 12px !important;
    border-radius: var(--rd-radius-pill) !important;
    font-size: 13px;
}
:root body.yf-redesign.yf-dashboard-auth .yf-day-editor__heading strong { display: block; color: var(--rd-ink); font-size: 15px; font-weight: 700; }
:root body.yf-redesign.yf-dashboard-auth .yf-day-editor__heading span { color: var(--rd-muted); font-size: 12.5px; }

:root body.yf-redesign.yf-dashboard-auth .yf-entry-editor {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin-top: 12px;
    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-entry-editor__fields {
    display: grid !important;
    grid-template-columns: minmax(230px, 1.5fr) minmax(0, 1fr) 112px;
    gap: 12px !important;
    min-width: 0;
    overflow: visible !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-entry-editor__fields > label { display: grid; gap: 6px; min-width: 0; margin: 0; }
:root body.yf-redesign.yf-dashboard-auth .yf-entry-editor__fields > label > span:first-child { color: var(--rd-ink-2); font-size: 12.5px; font-weight: 650; }
:root body.yf-redesign.yf-dashboard-auth .yf-compact-date {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 46px;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--rd-surface) !important;
    color: var(--rd-ink) !important;
    box-shadow: var(--rd-shadow-control) !important;
    font-weight: 650;
}
:root body.yf-redesign.yf-dashboard-auth .yf-compact-date i { color: var(--rd-subtle); }
:root body.yf-redesign.yf-dashboard-auth .yf-entry-editor__actions {
    position: static !important;
    display: flex;
    align-self: end;
    padding-bottom: 5px;
    transform: none !important;
}
:root body.yf-redesign.yf-dashboard-auth :is(.yf-entry-action, .yf-operation-icon-button, .delete-income-plan) {
    display: inline-grid !important;
    width: 36px !important;
    height: 36px !important;
    place-items: center;
    border: 0 !important;
    border-radius: 11px !important;
    background: var(--rd-surface) !important;
    color: var(--rd-muted) !important;
    box-shadow: var(--rd-shadow-control) !important;
    transition: background var(--rd-dur-fast) var(--rd-ease), color var(--rd-dur-fast) var(--rd-ease);
}
:root body.yf-redesign.yf-dashboard-auth :is(.yf-entry-action--danger, .delete-income-plan, [data-plan-delete]):hover { background: var(--rd-negative-soft) !important; color: var(--rd-negative) !important; }

:root body.yf-redesign.yf-dashboard-auth :is(.yf-day-editor__add, .yf-expense-plan-add) {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    margin-top: 12px;
    border: 1.5px dashed rgba(var(--rd-accent-rgb), .3) !important;
    border-radius: var(--rd-radius-md) !important;
    background: transparent !important;
    color: var(--rd-accent) !important;
    font-weight: 650;
    transition: background var(--rd-dur-fast) var(--rd-ease), border-color var(--rd-dur-fast) var(--rd-ease);
}
:root body.yf-redesign.yf-dashboard-auth :is(.yf-day-editor__add, .yf-expense-plan-add):hover { border-color: var(--rd-accent) !important; background: var(--rd-accent-soft) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-day-editor__status { color: var(--rd-muted); font-size: 12.5px; }

@media (max-width: 767.98px) {
    :root body.yf-redesign.yf-dashboard-auth .yf-entry-editor__fields { grid-template-columns: 1fr 1fr; }
    :root body.yf-redesign.yf-dashboard-auth .yf-entry-editor__amount { grid-column: 1 / -1; }
}

/* ── Planned income dialog ─────────────────────────────────────────────── */
:root body.yf-redesign.yf-dashboard-auth .yf-finance-form__intro {
    padding: 12px 14px !important;
    border: 0 !important;
    border-radius: var(--rd-radius-md) !important;
    background: var(--rd-info-soft) !important;
    color: var(--rd-ink-2) !important;
    font-size: 13.5px;
    box-shadow: none !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-finance-form__intro::before { display: none !important; }

:root body.yf-redesign.yf-dashboard-auth .yf-finance-plan-list {
    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-finance-plan-list > .mb-2 strong { color: var(--rd-ink); font-size: 14.5px; font-weight: 700; }
:root body.yf-redesign.yf-dashboard-auth .income-plan-modal-row {
    display: grid !important;
    grid-template-columns: minmax(190px, 1.1fr) minmax(0, 1.4fr) auto 36px;
    align-items: center;
    gap: 10px !important;
    margin: 0 !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid var(--rd-line-soft) !important;
}
:root body.yf-redesign.yf-dashboard-auth .income-plan-modal-row:last-child { border-bottom: 0 !important; padding-bottom: 0 !important; }
:root body.yf-redesign.yf-dashboard-auth .income-plan-modal-row > [class*="col-"] { width: auto !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-income-plan-check { display: inline-flex !important; align-items: center; gap: 8px; margin: 0; color: var(--rd-ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
:root body.yf-redesign.yf-dashboard-auth .yf-income-plan-check > span {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 0 !important;
    border-radius: 7px !important;
    background: var(--rd-surface) !important;
    color: transparent;
    box-shadow: inset 0 0 0 1.5px var(--rd-line-strong) !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-income-plan-check input:checked + span { background: var(--rd-positive) !important; color: #fff; box-shadow: none !important; }
@media (max-width: 767.98px) {
    :root body.yf-redesign.yf-dashboard-auth .income-plan-modal-row { grid-template-columns: minmax(0, 1fr) 36px; }
    :root body.yf-redesign.yf-dashboard-auth .income-plan-modal-row > [class*="col-"]:nth-child(2) { grid-column: 1 / -1; }
}

/* Finance action buttons (plan dialogs) */
:root body.yf-redesign.yf-dashboard-auth .yf-finance-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 12px !important;
    font-weight: 650;
    box-shadow: none !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-finance-action--secondary { background: var(--rd-fill) !important; color: var(--rd-ink) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-finance-action--secondary:hover { background: var(--rd-fill-hover) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-finance-action--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-finance-action--primary:hover { background: var(--rd-accent-hover) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-finance-action--update { background: var(--rd-info) !important; color: #fff !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-finance-action--update.disabled,
:root body.yf-redesign.yf-dashboard-auth .yf-finance-action--update:disabled { background: var(--rd-fill-soft) !important; color: var(--rd-placeholder) !important; opacity: 1 !important; }

@media (min-width: 768px) {
    :root body.yf-redesign.yf-dashboard-auth .yf-day-editor-dialog { max-width: min(720px, calc(100vw - 32px)) !important; }
}

:root body.yf-redesign.yf-dashboard-auth .yf-day-editor__meta .table-tag-color { display: inline-flex !important; width: fit-content !important; }

:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section__body ul { display: grid; gap: 4px; }
:root body.yf-redesign.yf-dashboard-auth .yf-dashboard-info-section__body li { margin: 0 !important; padding: 0 !important; }

/* «Расширенный учёт» (css/financeDashboard/operation-statistics.css): component variables → «Эфир» tokens */
:root body.yf-redesign.yf-dashboard-auth :is(.yf-operation-statistics, .yf-stat-options, .yf-date-popover, .yf-sv) {
    --st-ink: var(--rd-ink);
    --st-muted: var(--rd-muted);
    --st-line: var(--rd-line-soft);
    --st-bg: var(--rd-surface-grouped);
    --st-field: var(--rd-field-bg, var(--rd-surface));
    --st-fill: var(--rd-fill-soft);
    --st-thumb: var(--rd-surface);
    --st-thumb-shadow: var(--rd-shadow-control);
    --st-accent: var(--rd-accent);
    --st-accent-soft: var(--rd-accent-soft);
    --st-danger: var(--rd-negative);
    --st-radius: var(--rd-radius-md);
    --st-ease: var(--rd-ease);
}
:root body.yf-redesign.yf-dashboard-auth.dark-theme :is(.yf-operation-statistics, .yf-stat-options, .yf-date-popover, .yf-sv) { --st-thumb: var(--rd-surface-raised); --st-accent: var(--rd-accent-ink); --st-on-accent: #06251b; }
:root body.yf-redesign.yf-dashboard-auth .yf-operation-statistics { border: 0; box-shadow: inset 0 0 0 1px var(--rd-line-soft); }
:root body.yf-redesign.yf-dashboard-auth .yf-operation-statistics.yf-operation-statistics--inline { box-shadow: none; background: transparent; }
:root body.yf-redesign.yf-dashboard-auth .yf-stat-picker { border: 0; background: var(--rd-field-bg, var(--rd-fill)); box-shadow: var(--rd-field-shadow, none); }
:root body.yf-redesign.yf-dashboard-auth .yf-stat-picker:hover:not(:disabled) { background: var(--rd-field-bg-hover, var(--rd-fill-hover)); }
:root body.yf-redesign.yf-dashboard-auth .yf-stat-picker[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--rd-accent-ring); }
:root body.yf-redesign.yf-dashboard-auth .yf-statistics-links-card { border: 0; background: var(--rd-surface); box-shadow: var(--rd-shadow-hairline); }
:root body.yf-redesign.yf-dashboard-auth.dark-theme .yf-statistics-links-card { background: var(--rd-surface-raised); }
/* Purchase confirmation and success reuse one dialog on both subscription surfaces. */
/* Shared subscription cards retain their layout; Ether replaces the landing palette
   in both hosts, including when Settings moves the same DOM subtree. */
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf26-pricing.yf-package-grid { background: transparent; border: 0; padding: 0; color: var(--rd-ink); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf26-plan { background: var(--rd-surface-raised); color: var(--rd-ink); border-color: var(--rd-line); border-radius: var(--rd-radius-lg); box-shadow: var(--rd-shadow-card); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf26-plan:hover { border-color: var(--rd-accent-ring); box-shadow: var(--rd-shadow-card); transform: none; }
:root body.yf-redesign.yf-dashboard-auth.dark-theme :is(#subscribe-modal, #account-settings-subscription) .yf26-plan:hover { background: var(--rd-surface-raised); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf26-plan--featured { background: linear-gradient(160deg, var(--rd-accent-soft), transparent 55%), var(--rd-surface-raised); border-color: var(--rd-accent-ring); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf26-plan.is-current { box-shadow: inset 0 0 0 1px var(--rd-accent-ring), var(--rd-shadow-card); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf26-plan :is(h3, .yf26-plan__head strong) { color: var(--rd-ink) !important; }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf26-plan :is(.yf26-plan__head p, .yf26-plan__head small, .yf-plan-feature, .yf26-plan__current-note, .yf-plan-terms__label) { color: var(--rd-muted); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf26-plan__head > span { color: var(--rd-accent-ink); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf26-plan__badge { background: var(--rd-accent-soft); color: var(--rd-accent-ink); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf-plan-terms__options { background: var(--rd-fill); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf-package-period { border-color: transparent; color: var(--rd-muted); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .rd-seg-track .yf-package-period.is-active { background: transparent; box-shadow: none; border-color: transparent; color: var(--rd-ink); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf-package-period small { color: var(--rd-accent-ink); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf26-plan__actions .yf26-button--primary { background: var(--rd-accent); color: var(--rd-on-accent); border-color: transparent; }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf26-plan__actions .yf26-button--primary:hover { background: var(--rd-accent-hover); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf26-plan__actions .yf26-button--line { background: var(--rd-fill); color: var(--rd-ink); border-color: var(--rd-line); }
:root body.yf-redesign.yf-dashboard-auth :is(#subscribe-modal, #account-settings-subscription) .yf26-plan__actions .yf26-button--line:hover { background: var(--rd-fill-hover); }
:root body.yf-redesign.yf-dashboard-auth .yf-package-confirm__surface { background: var(--rd-surface); color: var(--rd-ink); border-color: var(--rd-line); border-radius: var(--rd-radius-lg); box-shadow: var(--rd-shadow-modal); }
:root body.yf-redesign.yf-dashboard-auth .yf-package-confirm :is(p,ul) { color: var(--rd-muted); }
:root body.yf-redesign.yf-dashboard-auth .yf-package-confirm ul { background: var(--rd-surface-grouped); }
:root body.yf-redesign.yf-dashboard-auth .yf-package-confirm__success-icon { color: var(--rd-accent); background: var(--rd-accent-soft); }
:root body.yf-redesign.yf-dashboard-auth .yf-package-confirm__eyebrow { color: var(--rd-accent); }
:root body.yf-redesign.yf-dashboard-auth .yf-package-confirm__close { color: var(--rd-muted); border-color: var(--rd-line); }

/* Currency badge = calculator badge: same 34px height, radius and inset from the field edge (money and amount inputs) */
:root body.yf-redesign.yf-dashboard-auth :is(.yf-amount-input, .yf-money-input) .yf-currency-picker { flex: 0 0 auto; align-self: center; margin: 0 !important; padding: 0 !important; }
:root body.yf-redesign.yf-dashboard-auth :is(.yf-amount-input, .yf-money-input) .yf-currency-picker__trigger {
    box-sizing: border-box;
    height: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 9px !important;
    border-radius: 9px !important;
    line-height: 1 !important;
}
:root body.yf-redesign.yf-dashboard-auth .yf-money-input .yf-calculator-trigger {
    display: inline-grid !important;
    flex: 0 0 34px;
    place-items: center;
    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Savings uses the shared financial dialog and semantic dashboard surfaces. */
:root body.yf-redesign.yf-dashboard-auth .yf-savings-warning { color: var(--rd-negative); }
:root body.yf-redesign.yf-dashboard-auth .yf-sv {
    --sv-surface: var(--rd-surface-grouped);
    --sv-track: var(--rd-fill);
    --sv-warn: var(--rd-warning);
    --sv-warn-soft: var(--rd-warning-soft);
}
:root body.yf-redesign.yf-dashboard-auth .yf-sv-hero { border-radius: var(--rd-radius-lg); }
/* The shared field shell reads these variables, so the amount field turns white (as in the income editor) without a fight over specificity. */
:root body.yf-redesign.yf-dashboard-auth :is(.yf-sv, .yf-operation-accounts) .yf-amount-input { --rd-field-bg: var(--rd-surface); --rd-field-bg-hover: var(--rd-surface); --rd-field-shadow: inset 0 0 0 1px var(--rd-line); }

:root body.yf-redesign.yf-dashboard-auth .yf-operation-accounts { --sv-surface: var(--rd-surface-grouped); --sv-track: var(--rd-fill); --sv-warn: var(--rd-warning); --sv-warn-soft: var(--rd-warning-soft); }
