:root {
    color-scheme: light;
    --bg: #f7f7f5;
    --surface: #ffffff;
    --surface-soft: #fff8f4;
    --surface-hover: #f4f4f1;
    --text: #1b1b1b;
    --muted: #858585;
    --border: #e4e4df;
    --orange: #ff7043;
    --orange-light: #ff8658;
    --green: #23b77b;
    --selected: #1d1d1d;
    --danger: #b42318;
    --danger-border: #e45b4b;
    --success-bg: #eaf8f1;
    --success-text: #176c4c;
    --danger-bg: #fff0ee;
    --decor: #fff0e9;
    --shadow: rgb(30 30 30 / 7%);
    --scroll-edge-shadow: rgb(30 30 30 / 18%);
    --radius: 24px;
}

/* Budgets and recurring payments */
.plan-intro,
.plan-footnote {
    margin: -14px 0 28px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.plan-footnote { margin: 20px 2px 0; font-size: 12px; }

.plan-month {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 10px;
    margin: 28px 0 22px;
}

.plan-month > a, .plan-month > button { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text); text-decoration: none; }
.plan-month > a:hover, .plan-month > a:focus-visible { border-color: var(--orange); color: var(--orange); }
.plan-month > button:disabled { color: var(--muted); opacity: .5; }

.plan-list, .plan-schedules { display: grid; gap: 14px; }
.plan-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 30px var(--shadow); }
.budget-card__transactions, .budget-card__edit, .payment-card { interpolate-size: allow-keywords; }
.budget-card__transactions::details-content, .budget-card__edit::details-content, .payment-card::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size 340ms cubic-bezier(0.16, 1, 0.3, 1), opacity 250ms ease, content-visibility 340ms allow-discrete; }
.budget-card__transactions[open]::details-content, .budget-card__edit[open]::details-content, .payment-card[open]::details-content { block-size: auto; opacity: 1; }
@starting-style { .budget-card__transactions[open]::details-content, .budget-card__edit[open]::details-content, .payment-card[open]::details-content { block-size: 0; opacity: 0; } }
.plan-card__summary { display: flex; min-height: 92px; align-items: center; gap: 16px; padding: 20px; cursor: pointer; list-style: none; }
.plan-card__summary::-webkit-details-marker { display: none; }
.plan-card__summary:focus-visible { outline: 2px solid var(--orange); outline-offset: -3px; }
.plan-card__icon { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border-radius: 17px; background: var(--decor); color: var(--orange); font-size: 22px; }
.plan-card__main { display: grid; min-width: 0; gap: 4px; flex: 1; }
.plan-card__main strong { overflow: hidden; color: var(--text); font-size: 17px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.plan-card__main small { color: var(--muted); font-size: 12px; }
.plan-card__chevron { color: var(--muted); transition: transform 180ms ease; }
.plan-card[open] .plan-card__chevron { transform: rotate(180deg); }
.plan-card__body { padding: 0 20px 22px; }
.budget-card { border: 0; background: var(--surface); }
.budget-card__summary { --statistics-meter-accent: #f5acd8; position: relative; display: block; min-height: 190px; overflow: hidden; padding: 0; border-radius: var(--radius) var(--radius) 0 0; background: #282526; color: #fff; }
.budget-card__fill { position: absolute; inset: 0 auto 0 0; width: var(--budget-fill); background: color-mix(in srgb, var(--statistics-meter-accent) 25%, #282526); transition: width 220ms ease; }
.budget-card__content { position: relative; display: grid; min-height: 190px; align-content: space-between; gap: 7px; padding: 20px 22px; }
.budget-card__top { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 12px; }
.budget-card__name { min-width: 0; color: color-mix(in srgb, var(--statistics-meter-accent) 72%, #fff); font-size: 18px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.budget-card__chevron { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 50%; background: rgb(255 255 255 / 12%); color: #fff; font-size: 13px; transition: transform 180ms ease; }
.budget-card__transactions[open] .budget-card__chevron { transform: rotate(180deg); }
.budget-card__scope { color: rgb(255 255 255 / 65%); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.budget-card__bottom { display: flex; min-width: 0; align-items: end; justify-content: space-between; gap: 16px; }
.budget-card__spent { display: grid; min-width: 0; gap: 2px; }
.budget-card__spent small, .budget-card__status small { color: rgb(255 255 255 / 70%); font-size: 12px; line-height: 1.35; }
.budget-card__spent strong { color: #fff; font-family: Unbounded, Manrope, Arial, sans-serif; font-size: clamp(18px, 4.5vw, 25px); font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -0.055em; line-height: 1.15; overflow-wrap: anywhere; }
.budget-card__spent em { color: color-mix(in srgb, var(--statistics-meter-accent) 72%, #fff); font-size: 0.55em; font-style: normal; letter-spacing: 0; }
.budget-card__status { display: grid; min-width: 0; justify-items: end; gap: 5px; text-align: right; }
.budget-card__status strong { color: color-mix(in srgb, var(--statistics-meter-accent) 72%, #fff); font-family: Unbounded, Manrope, Arial, sans-serif; font-size: clamp(24px, 6vw, 34px); font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -0.075em; line-height: 1; }
.budget-card__status small { max-width: 170px; }
.budget-card__activity { padding: 17px 20px 8px; }
.budget-card__activity-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.budget-card__activity-heading h3 { margin: 0; color: var(--text); font-size: 14px; font-weight: 800; }
.budget-card__activity-heading span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.budget-transaction-list { max-height: 370px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.budget-transaction { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.budget-transaction:last-child { border-bottom: 0; }
.budget-transaction time { padding-top: 2px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.budget-transaction__details { display: grid; min-width: 0; gap: 3px; }
.budget-transaction__details strong { color: var(--text); font-size: 13px; font-weight: 750; overflow-wrap: anywhere; }
.budget-transaction__details small { color: var(--muted); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.budget-transaction__details .budget-transaction__crossed { color: var(--danger); font-weight: 800; }
.budget-transaction__amount { color: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 800; text-align: right; white-space: nowrap; }
.budget-card__no-expenses { margin: 12px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.budget-card__edit { border-top: 1px solid var(--border); }
.budget-card__edit-toggle { display: flex; min-height: 51px; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 20px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 800; list-style: none; }
.budget-card__edit-toggle::-webkit-details-marker { display: none; }
.budget-card__edit-toggle:hover, .budget-card__edit[open] .budget-card__edit-toggle { color: var(--orange); }
.budget-card__edit-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: -3px; }
.budget-card__edit-body { padding-top: 16px; border-top: 1px solid var(--border); }
.budget-card__edit-body h3 { margin: 0 0 18px; font-size: 18px; font-weight: 800; }
.budget-card__edit-body .budget-form__submit { min-height: 61px; margin-top: 2px; border-radius: 19px; font-size: 16px; }
.plan-card__editor { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border); }
.plan-card__editor h3 { margin: 0 0 18px; font-size: 18px; font-weight: 800; }
.plan-card__editor .create-field, .plan-create .create-field { margin-bottom: 15px; }
.plan-form-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; }
.budget-form { display: grid; gap: 18px; }
.budget-form__section { min-width: 0; padding: 21px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface-hover); }
.budget-form__heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.budget-form__step { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 12px; background: var(--decor); color: var(--orange); font-size: 12px; font-weight: 800; }
.budget-form__heading h4 { margin: 0 0 3px; color: var(--text); font-size: 17px; font-weight: 800; letter-spacing: -0.025em; }
.budget-form__heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.budget-form__field { display: grid; min-width: 0; gap: 8px; margin-bottom: 15px; }
.budget-form__field:last-child { margin-bottom: 0; }
.budget-form__field > label { color: var(--text); font-size: 12px; font-weight: 750; }
.budget-form__field .form-control, .budget-form__field .form-select { width: 100%; min-height: 56px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); font-size: 15px; box-shadow: none; }
.budget-form__field .form-control { padding-inline: 17px; }
.budget-form__field .form-control:focus, .budget-form__field .form-select:focus { border-color: var(--orange); background: var(--surface); color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 16%, transparent); }
.budget-form__amount-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(100px, 0.7fr); align-items: start; gap: 12px; }
.budget-form__amount-row > .budget-form__field { align-content: start; grid-template-rows: auto 56px; margin-bottom: 0; }
.budget-form__amount-row .form-control, .budget-form__amount-row .form-select { height: 56px; min-height: 56px; box-sizing: border-box; }
.budget-form__scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.payment-recurrence__title { display: block; margin: 0 0 8px 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.budget-scope-option, .budget-category-option { position: relative; cursor: pointer; }
.budget-scope-option { display: flex; min-width: 0; min-height: 83px; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 19px; background: var(--surface); transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.payment-recurrence .budget-scope-option { display: flex; margin: 0; color: var(--text); }
.payment-recurrence .budget-scope-option:last-child { grid-column: 1 / -1; }
.budget-scope-option input, .budget-category-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.budget-scope-option:has(input:checked), .budget-category-option:has(input:checked) { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 10%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--orange) 28%, transparent); }
.budget-scope-option:has(input:focus-visible), .budget-category-option:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--orange) 38%, transparent); outline-offset: 2px; }
.budget-scope-option__icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 12px; background: var(--surface-hover); color: var(--orange); font-size: 17px; }
.budget-scope-option__text { display: grid; min-width: 0; gap: 2px; flex: 1; }
.budget-scope-option__text strong { color: var(--text); font-size: 12px; font-weight: 800; line-height: 1.2; }
.budget-scope-option__text small { color: var(--muted); font-size: 10px; line-height: 1.3; }
.budget-scope-option__mark { display: grid; width: 19px; height: 19px; flex: 0 0 19px; place-items: center; border: 1.5px solid var(--border); border-radius: 50%; color: transparent; font-size: 13px; }
.budget-scope-option:has(input:checked) .budget-scope-option__mark { border-color: var(--orange); background: var(--orange); color: #fff; }
.budget-form__category-set { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.budget-form__category-set legend { width: 100%; margin-bottom: 13px; padding: 0; color: var(--text); font-size: 13px; font-weight: 700; }
.budget-form__category-set legend span { display: inline-block; margin-left: 6px; padding: 4px 8px; border-radius: 20px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 700; }
.budget-form__category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.budget-category-option { display: flex; min-width: 0; min-height: 57px; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.budget-category-option:hover, .budget-scope-option:hover { border-color: color-mix(in srgb, var(--orange) 55%, var(--border)); }
.budget-category-option__mark { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border: 1.5px solid var(--muted); border-radius: 7px; color: transparent; font-size: 16px; line-height: 1; }
.budget-category-option:has(input[type="radio"]) .budget-category-option__mark { border-radius: 50%; }
.budget-category-option:has(input:checked) .budget-category-option__mark { border-color: var(--orange); background: var(--orange); color: #fff; }
.budget-category-option:has(input[type="radio"]:checked) .budget-category-option__mark { border: 6px solid var(--orange); background: var(--surface); }
.budget-category-option__name { min-width: 0; overflow-wrap: anywhere; color: var(--text); font-size: 13px; font-weight: 650; line-height: 1.3; }
.budget-category-option__name small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.budget-form__category-set.is-invalid .budget-form__category-grid { padding: 3px; border: 1px solid var(--danger); border-radius: 18px; }
.budget-form__selection-error { margin: 10px 0 0; color: var(--danger); font-size: 12px; }
.budget-form__submit { min-height: 61px; margin-top: 2px; border-radius: 19px; font-size: 16px; }
.plan-archive-form { margin-top: 10px; text-align: center; }
.plan-archive-form button { padding: 9px 12px; border: 0; background: transparent; color: var(--danger); font-size: 13px; font-weight: 700; }
.plan-archive-form button:hover { text-decoration: underline; }
.plan-create { margin-top: 26px; }
.plan-create h2 { margin-bottom: 20px; }
.plan-empty { display: grid; justify-items: center; gap: 6px; padding: 35px 25px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface); text-align: center; }
.plan-empty i { margin-bottom: 5px; color: var(--orange); font-size: 27px; }
.plan-empty strong { font-size: 16px; }
.plan-empty p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.plan-calendar { display: grid; width: min(100%, 490px); grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-inline: auto; padding: 19px; border-radius: 32px; background: #0d1117; box-shadow: 0 16px 38px rgb(0 0 0 / 14%); }
.plan-calendar__weekday { display: grid; place-items: center; padding-bottom: 5px; color: #828b96; font-size: 11px; font-weight: 800; text-align: center; }
.plan-calendar__day { position: relative; display: grid; width: 100%; min-width: 0; aspect-ratio: 1; place-items: center; border-radius: 50%; background: #363d46; color: #9ca4ae; font-size: clamp(12px, 3vw, 17px); font-variant-numeric: tabular-nums; font-weight: 750; line-height: 1; }
.plan-calendar__day--blank { visibility: hidden; }
.plan-calendar__day--due { background: var(--orange); color: #fff; box-shadow: 0 5px 15px rgb(255 112 67 / 30%); font-weight: 850; }
.plan-calendar__day--today:not(.plan-calendar__day--due) { outline: 2px solid #8f99a5; outline-offset: -2px; color: #f2f4f6; }
.plan-calendar__day--today.plan-calendar__day--due { outline: 2px solid #ffb69c; outline-offset: 2px; }
.plan-calendar__day small { position: absolute; right: 3px; bottom: 3px; display: grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; background: #fff; color: #c54624; font-size: 10px; font-weight: 850; line-height: 1; }
@media (max-width: 420px) { .plan-calendar { gap: 4px; padding: 12px; border-radius: 25px; } .plan-calendar__weekday { font-size: 10px; } .plan-calendar__day small { right: 3px; bottom: 3px; width: 6px; height: 6px; overflow: hidden; font-size: 0; } }
.plan-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 15px; }
.plan-section-heading h2 { margin: 0; font-size: 22px; font-weight: 800; }
.plan-section-heading span { color: var(--muted); font-size: 12px; }
.plan-due-item { margin-bottom: 10px; }
.plan-due-item form { margin: 0; }
.plan-due-item__button { position: relative; display: grid; width: 100%; min-height: 98px; grid-template-columns: 66px minmax(0, 1fr) 50px; align-items: center; gap: 14px; overflow: hidden; padding: 14px 18px; border: 0; border-radius: 25px; background: var(--orange); color: #12161b; text-align: left; cursor: pointer; isolation: isolate; box-shadow: 0 8px 22px rgb(255 112 67 / 14%); }
.plan-due-item__button::before { position: absolute; top: -38px; right: -20px; width: 130px; height: 130px; border: 28px solid rgb(17 21 27 / 9%); border-radius: 50%; content: ""; pointer-events: none; z-index: -1; }
.plan-due-item__date { display: grid; width: 66px; height: 66px; align-content: center; justify-items: center; border: 7px solid #fff; border-radius: 50%; background: #f3f4f1; color: #f45629; font-variant-numeric: tabular-nums; line-height: 1; }
.plan-due-item__date strong { font-family: Unbounded, Manrope, Arial, sans-serif; font-size: 20px; letter-spacing: -0.07em; }
.plan-due-item__date small { margin-top: 3px; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.plan-due-item__info { display: grid; min-width: 0; gap: 3px; }
.plan-due-item__info strong { overflow: hidden; font-size: 15px; font-weight: 850; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.plan-due-item__info span { font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 750; }
.plan-due-item__info small { font-size: 11px; font-weight: 700; opacity: .7; }
.plan-due-item--overdue .plan-due-item__info small { opacity: 1; }
.plan-due-item__check { display: grid; width: 50px; height: 50px; place-items: center; border: 5px solid #fff; border-radius: 50%; background: #11151b; color: #fff; }
.plan-due-item__check svg { width: 26px; height: 26px; overflow: visible; }
.plan-due-item__check path { stroke-dasharray: 28; stroke-dashoffset: 28; }
.plan-due-item--paid .plan-due-item__button { background: #1b222b; color: #f5f6f7; box-shadow: 0 8px 22px rgb(0 0 0 / 13%); }
.plan-due-item--paid .plan-due-item__button::before { border-color: rgb(255 255 255 / 6%); }
.plan-due-item--paid .plan-due-item__date { border-color: #ff8a61; background: var(--orange); color: #fff; }
.plan-due-item--paid .plan-due-item__check { background: var(--orange); }
.plan-due-item--paid .plan-due-item__check path { stroke-dashoffset: 0; }
html.theme-ready .plan-due-item__button { transition: transform 220ms cubic-bezier(.16, 1, .3, 1), background-color 320ms ease, box-shadow 220ms ease, color 220ms ease; }
html.theme-ready .plan-due-item__check, html.theme-ready .plan-due-item__date { transition: transform 380ms cubic-bezier(.16, 1, .3, 1), background-color 320ms ease, border-color 320ms ease, color 220ms ease; }
html.theme-ready .plan-due-item__check path { transition: stroke-dashoffset 340ms cubic-bezier(.16, 1, .3, 1); }
.plan-due-item__button:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgb(255 112 67 / 23%); }
.plan-due-item--paid .plan-due-item__button:hover { box-shadow: 0 14px 30px rgb(0 0 0 / 23%); }
.plan-due-item__button:active { transform: scale(.985); }
.plan-due-item__button:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.plan-due-item.is-toggling .plan-due-item__check { animation: plan-check-pop 400ms cubic-bezier(.16, 1, .3, 1) both; }
.plan-due-item.is-toggling .plan-due-item__date { animation: plan-date-pop 400ms cubic-bezier(.16, 1, .3, 1) both; }
.plan-due__feedback { position: fixed; right: 16px; bottom: 20px; left: 16px; z-index: 30; width: min(calc(100% - 32px), 420px); margin: 0 auto; padding: 13px 17px; border: 1px solid #39424e; border-left: 4px solid var(--orange); border-radius: 15px; background: #1b222b; color: #fff; box-shadow: 0 16px 38px rgb(0 0 0 / 25%); font-size: 13px; font-weight: 700; text-align: center; }
@keyframes plan-check-pop { 0% { transform: scale(.78) rotate(-18deg); } 60% { transform: scale(1.16) rotate(7deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes plan-date-pop { 0% { transform: scale(1); } 45% { transform: scale(.9); } 100% { transform: scale(1); } }
@media (max-width: 420px) { .plan-due-item__button { min-height: 86px; grid-template-columns: 56px minmax(0, 1fr) 42px; gap: 10px; padding: 12px; border-radius: 21px; } .plan-due-item__date { width: 56px; height: 56px; border-width: 5px; } .plan-due-item__date strong { font-size: 16px; } .plan-due-item__date small { font-size: 9px; } .plan-due-item__info strong { font-size: 13px; } .plan-due-item__info span { font-size: 12px; } .plan-due-item__check { width: 42px; height: 42px; border-width: 4px; } .plan-due-item__check svg { width: 22px; height: 22px; } }
@media (prefers-reduced-motion: reduce) { html.theme-ready .plan-due-item__button, html.theme-ready .plan-due-item__check, html.theme-ready .plan-due-item__date, html.theme-ready .plan-due-item__check path { animation: none; transition: none; } }
.plan-schedules { margin-top: 8px; }
.plan-schedules .plan-section-heading { margin-bottom: 0; }
.payment-card { min-width: 0; }
.payment-card .payment-card__summary { display: block; width: 100%; max-width: none; }
.payment-card .payment-card__visual { display: flex; width: 100%; min-height: 78px; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 21px; }
.payment-card__info { display: grid; min-width: 0; gap: 3px; flex: 1; }
.payment-card__info strong { color: #11151b; font-size: 16px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.payment-card__info small { color: rgb(17 21 27 / 72%); font-size: 11px; font-weight: 750; line-height: 1.25; }
.payment-card__amount { flex: 0 0 auto; color: #11151b; font-family: Unbounded, Manrope, Arial, sans-serif; font-size: 18px; font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -0.045em; white-space: nowrap; }
.payment-card__amount small { font-size: 0.65em; letter-spacing: 0; }
.payment-card[open] .payment-card__visual { filter: saturate(1.1); transform: translateY(-2px); }
.payment-card .payment-card__panel { margin: 11px 0 6px; padding: 20px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 8px 30px var(--shadow); }
@media (max-width: 420px) { .payment-card .payment-card__visual { min-height: 72px; gap: 10px; padding: 12px 16px; } .payment-card__info strong { font-size: 14px; } .payment-card__amount { font-size: 15px; } .payment-card .payment-card__panel { padding: 16px; } }
@media (max-width: 420px) { .budget-form__category-grid { grid-template-columns: 1fr; } .budget-form__section { padding: 17px; } .budget-scope-option { min-height: 76px; padding: 9px; } .budget-scope-option__icon { display: none; } .plan-form-row { grid-template-columns: minmax(0, 1fr) 108px; } .plan-card__summary { padding: 16px; } .budget-card__summary { padding: 0; } .budget-card__content { padding: 18px; } .budget-card__bottom { gap: 8px; } .budget-card__status small { max-width: 110px; } .budget-transaction { grid-template-columns: 42px minmax(0, 1fr); gap: 3px 9px; } .budget-transaction__amount { grid-column: 2; text-align: left; } .plan-card__body { padding-right: 16px; padding-left: 16px; } }

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0d1117;
    --surface: #161b22;
    --surface-soft: #1a1d22;
    --surface-hover: #20262e;
    --text: #f3f4f5;
    --muted: #9aa2ad;
    --border: #303741;
    --selected: #252b33;
    --danger: #ff8a7a;
    --danger-border: #c85f50;
    --success-bg: #15382d;
    --success-text: #75dbb3;
    --danger-bg: #40201e;
    --decor: #38241c;
    --shadow: rgb(0 0 0 / 28%);
    --scroll-edge-shadow: rgb(0 0 0 / 48%);
}

html,
body {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    overflow-x: hidden;
}

html.theme-ready *,
html.theme-ready *::before,
html.theme-ready *::after {
    transition:
        background-color 240ms ease,
        border-color 240ms ease,
        color 200ms ease,
        box-shadow 240ms ease,
        fill 200ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    position: relative;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Manrope, Arial, sans-serif;
}

.app-shell,
.auth-page,
.app-page {
    min-height: 100vh;
}

.app-shell {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    overflow-x: hidden;
}

html.voice-scroll-locked,
body.voice-scroll-locked {
    overflow: hidden;
}

body.voice-scroll-locked {
    position: fixed;
    right: 0;
    left: 0;
    width: 100%;
}

.app-page {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.auth-page,
.app-page {
    padding: 28px 20px 40px;
}

.auth-page {
    background: radial-gradient(circle at 0 100%, var(--decor) 0 10%, transparent 10.1%);
}

.auth-page__content,
.app-page__content {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
}

.auth-header,
.app-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-header {
    z-index: 5;
    margin-bottom: 55px;
}

.app-header__actions {
    display: flex;
    gap: 10px;
}

.app-logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.05em;
    text-decoration: none;
}

.app-logo:hover {
    color: var(--text);
}

.app-logo__mark {
    display: block;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgb(255 112 67 / 18%));
}

.round-action {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    font-size: 19px;
}

.round-action:hover,
.round-action:focus-visible {
    border-color: var(--orange);
    background: var(--surface-hover);
    color: var(--orange);
}

.auth-form {
    margin-top: 145px;
}

.app-title {
    margin: 0 0 38px;
    color: var(--text);
    font-size: clamp(35px, 10vw, 43px);
    font-weight: 800;
    letter-spacing: -0.065em;
    line-height: 1.1;
}

.section-heading {
    margin-bottom: 32px;
}

.section-heading__links {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.section-heading__links:has(.app-title) {
    margin-bottom: 0;
}

.section-heading__links a {
    color: var(--muted);
    font-size: clamp(30px, 8.5vw, 39px);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1.08;
    text-decoration: none;
}

.section-heading__links a:hover,
.section-heading__links a:focus-visible {
    color: var(--orange);
}

.section-heading .app-title {
    margin: 0;
}

.settings-page .app-title {
    margin-bottom: 30px;
}

.settings-card {
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.settings-card h2 {
    margin: 0 0 20px;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
}

.settings-card__hint {
    margin: -10px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.settings-theme-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.settings-theme-choice {
    min-height: 58px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
}

.settings-theme-choice[aria-pressed="true"],
.settings-theme-choice:hover,
.settings-theme-choice:focus-visible {
    border-color: var(--orange);
    color: var(--orange);
}

.settings-theme-choice i {
    margin-right: 6px;
}

.settings-card .form-field:last-of-type {
    margin-bottom: 24px;
}

.statistics-month-switcher {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 8px;
    margin: -10px 0 28px;
}

.statistics-month-switcher > a,
.statistics-month-switcher > button {
    position: relative;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
}

.statistics-month-switcher > a:hover,
.statistics-month-switcher > a:focus-visible {
    border-color: var(--orange);
    color: var(--orange);
}

.statistics-month-switcher > button:disabled {
    color: var(--muted);
    opacity: 0.5;
}

.statistics-month-switcher[aria-busy="true"] .month-picker__trigger {
    opacity: 0.55;
}

.statistics-month-switcher > a.is-loading i {
    opacity: 0;
}

.statistics-month-switcher > a.is-loading::after {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: statistics-loading-spin 650ms linear infinite;
    content: "";
}

.month-picker { min-width: 0; }
.statistics-month-switcher:has(.month-picker[open]), .plan-month:has(.month-picker[open]) { z-index: 20; }
.month-picker__trigger { display: flex; min-width: 0; min-height: 44px; align-items: center; justify-content: center; gap: 9px; padding: 8px 12px; border-radius: 16px; color: var(--text); cursor: pointer; font-size: 17px; font-weight: 800; line-height: 1.2; list-style: none; text-align: center; }
.month-picker__trigger::-webkit-details-marker { display: none; }
.month-picker__trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.month-picker__trigger i { flex: 0 0 auto; color: var(--orange); font-size: 13px; transition: transform 220ms cubic-bezier(.16, 1, .3, 1); }
.statistics-month-switcher .month-picker__trigger { font-size: clamp(17px, 5vw, 21px); }
.month-picker__trigger:hover, .month-picker[open] .month-picker__trigger { background: var(--surface-hover); }
.month-picker__trigger:focus-visible { outline: 3px solid color-mix(in srgb, var(--orange) 55%, transparent); outline-offset: 2px; }
.month-picker[open] .month-picker__trigger i { transform: rotate(180deg); }
.month-picker__panel { position: absolute; top: calc(100% + 10px); left: 50%; z-index: 20; width: min(calc(100vw - 40px), 310px); max-height: min(66vh, 600px); overflow-y: auto; overscroll-behavior: contain; padding: 12px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: 0 22px 55px rgb(0 0 0 / 20%); scrollbar-color: var(--border) transparent; scrollbar-width: thin; transform-origin: center top; }
.month-picker[open] .month-picker__panel { animation: month-picker-in 250ms cubic-bezier(.16, 1, .3, 1) both; }
.month-picker.is-closing .month-picker__panel { pointer-events: none; animation: month-picker-out 170ms ease both; }
.month-picker__heading { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 4px 10px 24px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; }
.month-picker__heading strong { color: var(--text); font-family: Unbounded, Manrope, Arial, sans-serif; font-size: 17px; font-weight: 800; }
.month-picker__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.month-picker__option { display: flex; min-width: 0; min-height: 46px; align-items: center; padding: 10px 15px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: var(--text); font-size: 14px; font-weight: 750; line-height: 1.2; text-align: left; text-decoration: none; transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms cubic-bezier(.16, 1, .3, 1); }
.month-picker__option:hover, .month-picker__option:focus-visible { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 12%, var(--surface)); color: var(--orange); transform: translateX(3px); }
.month-picker__option:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.month-picker__option.is-current { border-color: var(--orange); background: var(--orange); color: #fff; box-shadow: 0 6px 16px rgb(255 112 67 / 24%); }
.month-picker__option.is-current:hover, .month-picker__option.is-current:focus-visible { color: #fff; filter: brightness(1.07); }
@keyframes month-picker-in { from { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(.96); } to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }
@keyframes month-picker-out { from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } to { opacity: 0; transform: translateX(-50%) translateY(-7px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .month-picker[open] .month-picker__panel, .month-picker.is-closing .month-picker__panel { animation: none; } .month-picker__trigger i, .month-picker__option { transition: none; } }

.statistics-month {
    margin-bottom: 48px;
}

.statistics-month > h2,
.statistics-year__heading h2 {
    margin: 0;
    color: var(--text);
    font-size: 23px;
    font-weight: 800;
}

.statistics-description {
    margin: 8px 0 24px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.statistics-currency,
.statistics-year__currency {
    margin-bottom: 32px;
}

.statistics-currency > h2,
.statistics-year__currency > h3 {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.statistics-totals,
.statistics-year__totals,
.statistics-year__averages {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.statistics-total,
.statistics-year__total {
    --statistics-accent: #ff627f;
    display: flex;
    min-width: 0;
    min-height: 132px;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    border: 1px solid rgb(255 255 255 / 7%);
    border-radius: 32px;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--statistics-accent) 13%, transparent), transparent 60%),
        #151e28;
    color: #fff;
    box-shadow: 0 12px 26px rgb(24 20 25 / 10%);
}

.statistics-total--income,
.statistics-year__total--income,
.payment-total--planned {
    --statistics-accent: #4ce0b4;
}

.statistics-year__total--net {
    --statistics-accent: #77b9f4;
}

.statistics-total > span,
.statistics-year__total > span {
    color: rgb(255 255 255 / 78%);
    font-size: 14px;
    font-weight: 700;
}

.statistics-total strong,
.statistics-year__total strong {
    display: block;
    min-width: 0;
    color: var(--statistics-accent);
    font-family: Unbounded, Manrope, Arial, sans-serif;
    font-size: clamp(27px, 8vw, 40px);
    font-variant-numeric: lining-nums;
    font-weight: 900;
    letter-spacing: -0.075em;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.statistics-total strong small {
    color: #fff;
    font-size: 0.42em;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.statistics-year__total small {
    color: rgb(255 255 255 / 70%);
    font-size: 12px;
    font-weight: 700;
}

.payment-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px clamp(8px, 2.5vw, 12px);
    margin-bottom: 24px;
}

.payment-totals > .statistics-total {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    padding: clamp(12px, 3.5vw, 22px);
    border-radius: clamp(20px, 5vw, 32px);
}

.payment-totals .statistics-total > span {
    font-size: clamp(12px, 3.25vw, 14px);
    line-height: 1.3;
}

.payment-total__amounts {
    display: grid;
    align-content: start;
    gap: 6px;
}

.payment-total__amounts strong {
    font-size: clamp(16px, 5vw, 32px);
}

.payment-total__count {
    color: rgb(255 255 255 / 70%);
    font-size: clamp(10px, 2.8vw, 12px);
}

.statistics-breakdown {
    margin-bottom: 12px;
}

.statistics-breakdown h3 {
    margin: 0 4px 14px;
    color: var(--orange);
    font-size: 16px;
    font-weight: 800;
}

.statistics-breakdown--income h3 {
    color: var(--green);
}

.statistics-breakdown ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.statistics-meter {
    --statistics-meter-accent: #f5acd8;
    position: relative;
    min-width: 0;
    min-height: 112px;
    overflow: hidden;
    border-radius: 26px;
    background: #282526;
    color: #fff;
}

.statistics-meter--tone-0 { --statistics-meter-accent: #4ce0b4; }
.statistics-meter--tone-1 { --statistics-meter-accent: #ffddc0; }
.statistics-meter--tone-2 { --statistics-meter-accent: #f5acd8; }
.statistics-meter--tone-3 { --statistics-meter-accent: #d2ef83; }
.statistics-meter--tone-4 { --statistics-meter-accent: #ff627f; }
.statistics-meter--tone-5 { --statistics-meter-accent: #c3b8f4; }
.statistics-meter--tone-6 { --statistics-meter-accent: #77b9f4; }
.statistics-meter--tone-7 { --statistics-meter-accent: #fff085; }

.statistics-meter__fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(
        calc(var(--statistics-fill-fixed) + var(--statistics-share)),
        var(--statistics-fill-limit)
    );
    height: 100%;
    border-radius: 26px;
    background: color-mix(in srgb, var(--statistics-meter-accent) 25%, #282526);
    pointer-events: none;
}

.statistics-meter__content {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 112px;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    padding: 19px 20px 15px;
}

.statistics-meter__name {
    color: color-mix(in srgb, var(--statistics-meter-accent) 72%, #fff);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.statistics-meter__footer {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 4px 12px;
}

.statistics-meter__amount {
    min-width: 0;
    color: rgb(255 255 255 / 88%);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.statistics-meter__share {
    margin-left: auto;
    color: color-mix(in srgb, var(--statistics-meter-accent) 72%, #fff);
    font-family: Unbounded, Manrope, Arial, sans-serif;
    font-size: clamp(24px, 7vw, 32px);
    font-variant-numeric: lining-nums;
    font-weight: 800;
    letter-spacing: -0.075em;
    line-height: 1;
}

.statistics-year__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
    margin-bottom: 20px;
}

.statistics-year__heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.statistics-year__averages > div {
    display: grid;
    min-width: 0;
    gap: 5px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
}

.statistics-year__averages span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.statistics-year__averages strong {
    color: var(--text);
    font-family: Unbounded, Manrope, Arial, sans-serif;
    font-size: clamp(19px, 6vw, 26px);
    font-variant-numeric: lining-nums;
    font-weight: 800;
    letter-spacing: -0.06em;
    overflow-wrap: anywhere;
}

.statistics-year__averages small {
    color: var(--muted);
    font-size: 12px;
}

.statistics-year__months {
    margin-top: 28px;
}

.statistics-year__months h4 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 17px;
    font-weight: 800;
}

.statistics-year__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0 0 12px 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.statistics-year__legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.statistics-year__legend span::before {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #f5acd8;
    content: "";
}

.statistics-year__legend .statistics-year__legend-income::before {
    background: #4ce0b4;
}

.statistics-year__month-list {
    margin: 0;
    padding: 8px 16px;
    border-radius: 28px;
    background: #282526;
    list-style: none;
}

.statistics-year__month-list li + li {
    border-top: 1px solid rgb(255 255 255 / 12%);
}

.statistics-year__month-chart summary {
    display: grid;
    min-height: 60px;
    grid-template-columns: 43px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 12px;
    padding: 9px 2px;
    color: #fff;
    cursor: pointer;
    list-style: none;
}

.statistics-year__month-chart summary::-webkit-details-marker {
    display: none;
}

.statistics-year__month-chart summary:focus-visible {
    outline: 2px solid #f5acd8;
    outline-offset: 2px;
}

.statistics-year__month-label {
    color: #f8c3e3;
    font-family: Unbounded, Manrope, Arial, sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.statistics-year__bars {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.statistics-year__bar {
    display: block;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgb(255 255 255 / 16%);
}

.statistics-year__bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #f5acd8;
}

.statistics-year__bar--income > span {
    background: #4ce0b4;
}

.statistics-year__bar > .statistics-year__bar-has-value {
    min-width: 3px;
}

.statistics-year__month-chart summary > i {
    color: rgb(255 255 255 / 65%);
    font-size: 12px;
    transition: transform 200ms ease;
}

.statistics-year__month-chart[open] summary > i {
    transform: rotate(180deg);
}

.statistics-year__month-chart {
    interpolate-size: allow-keywords;
}

.statistics-year__month-chart::details-content {
    block-size: 0;
    overflow: clip;
    opacity: 0;
    transition:
        block-size 340ms cubic-bezier(0.16, 1, 0.3, 1),
        opacity 250ms ease,
        content-visibility 340ms allow-discrete;
}

.statistics-year__month-chart[open]::details-content {
    block-size: auto;
    opacity: 1;
}

@starting-style {
    .statistics-year__month-chart[open]::details-content {
        block-size: 0;
        opacity: 0;
    }
}

.statistics-year__month-chart dl {
    display: grid;
    gap: 9px;
    margin: 0 0 11px;
    padding: 15px;
    border-radius: 18px;
    background: rgb(255 255 255 / 9%);
}

.statistics-year__month-chart dl > div {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 10px;
    color: #fff;
    font-size: 12px;
}

.statistics-year__month-chart dl > div:nth-child(3) {
    margin-top: 5px;
    padding-top: 10px;
    border-top: 1px solid rgb(255 255 255 / 15%);
}

.statistics-year__month-chart dt {
    color: rgb(255 255 255 / 72%);
}

.statistics-year__month-chart dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.statistics-year__months > p {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.statistics-empty,
.statistics-no-data {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.statistics-no-data {
    padding: 38px 24px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--surface);
    text-align: center;
}

.statistics-no-data i {
    display: block;
    margin-bottom: 12px;
    color: var(--orange);
    font-size: 30px;
}

.statistics-no-data p {
    margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .plan-page .section-heading__links > *,
    .plan-page .plan-intro,
    .plan-page .plan-month,
    .plan-page .plan-calendar,
    .plan-page .plan-due,
    .plan-page .plan-list > *,
    .plan-page .plan-schedules > *,
    .plan-page .plan-create,
    .plan-page .plan-footnote,
    .settings-page .app-title,
    .settings-page .settings-card {
        animation: statistics-arrive 430ms cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .plan-page .section-heading__links > :nth-child(2) { animation-delay: 25ms; }
    .plan-page .section-heading__links > :nth-child(3) { animation-delay: 50ms; }
    .plan-page .section-heading__links > :nth-child(4) { animation-delay: 75ms; }
    .plan-page .section-heading__links > :nth-child(5) { animation-delay: 100ms; }
    .plan-page .section-heading__links > :nth-child(6) { animation-delay: 125ms; }
    .plan-page .section-heading__links > :nth-child(7) { animation-delay: 150ms; }

    .plan-page .plan-intro,
    .settings-page .settings-card:first-of-type { animation-delay: 50ms; }
    .plan-page .plan-month { animation-delay: 90ms; }
    .plan-page .plan-calendar,
    .plan-page .plan-due,
    .plan-page .plan-list > :first-child,
    .plan-page .plan-schedules > :first-child,
    .settings-page .settings-card:nth-of-type(2) { animation-delay: 130ms; }
    .plan-page .plan-list > :nth-child(2),
    .plan-page .plan-schedules > .payment-card:nth-of-type(1) { animation-delay: 170ms; }
    .plan-page .plan-list > :nth-child(3),
    .plan-page .plan-schedules > .payment-card:nth-of-type(2) { animation-delay: 210ms; }
    .plan-page .plan-list > :nth-child(n+4),
    .plan-page .plan-schedules > .payment-card:nth-of-type(n+3) { animation-delay: 250ms; }
    .plan-page .plan-create { animation-delay: 190ms; }
    .plan-page .plan-footnote { animation-delay: 230ms; }
    .budget-card__fill { transform-origin: left center; animation: statistics-bar-grow 700ms cubic-bezier(0.16, 1, 0.3, 1) 140ms both; }
    .plan-page [data-budget-single]:not([hidden]),
    .plan-page [data-budget-group]:not([hidden]),
    .plan-page [data-payment-interval]:not([hidden]) { animation: statistics-arrive 280ms cubic-bezier(0.16, 1, 0.3, 1) both; }

    .plan-page .section-heading__links a { transition: color 200ms ease, transform 200ms cubic-bezier(0.16, 1, 0.3, 1); }
    .plan-page .section-heading__links a:hover,
    .plan-page .section-heading__links a:focus-visible { transform: translateX(5px); }

    .statistics-page [data-statistics-reveal] {
        animation: statistics-arrive 430ms cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .statistics-page .statistics-description,
    .statistics-page .statistics-totals > :nth-child(1),
    .statistics-page .statistics-year__totals > :nth-child(1) {
        animation-delay: 50ms;
    }

    .statistics-page .statistics-totals > :nth-child(2),
    .statistics-page .statistics-year__totals > :nth-child(2),
    .statistics-page .statistics-year__averages > :nth-child(2) {
        animation-delay: 100ms;
    }

    .statistics-page .statistics-year__totals > :nth-child(3),
    .statistics-page .statistics-breakdown--income {
        animation-delay: 150ms;
    }

    .statistics-meter__fill,
    .statistics-year__bar > span {
        transform-origin: left center;
        animation: statistics-bar-grow 700ms cubic-bezier(0.16, 1, 0.3, 1) 120ms both;
    }
}

@media (prefers-reduced-motion: reduce) {
    .budget-card__transactions::details-content,
    .budget-card__edit::details-content,
    .payment-card::details-content,
    .statistics-month-switcher a.is-loading::after,
    .statistics-year__month-chart summary > i,
    .statistics-year__month-chart::details-content {
        animation: none;
        transition: none;
    }
}

@keyframes statistics-arrive {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes statistics-bar-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes statistics-loading-spin {
    to { transform: rotate(360deg); }
}

.history-kind-filter {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-bottom: 14px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.history-kind-filter a {
    display: grid;
    min-height: 44px;
    place-items: center;
    border-radius: 14px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.history-kind-filter a:hover,
.history-kind-filter a:focus-visible {
    color: var(--orange);
}

.history-kind-filter a.is-active {
    background: var(--selected);
    color: #ffffff;
}

html[data-theme="dark"] .history-kind-filter a.is-active {
    color: var(--orange);
}

.history-period {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    align-items: stretch;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.history-period__arrow {
    display: grid;
    place-items: center;
    color: var(--muted);
    text-decoration: none;
}

.history-period__arrow:hover,
.history-period__arrow:focus-visible {
    color: var(--orange);
}

.history-period__label {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.history-period__label i {
    color: var(--orange);
}

.history-filter-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 28px;
}

.history-quick-periods a,
.history-date-filter summary {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
}

.history-quick-periods a:hover,
.history-quick-periods a:focus-visible,
.history-date-filter summary:hover,
.history-date-filter summary:focus-visible {
    border-color: var(--orange);
    color: var(--orange);
}

.history-quick-periods a.is-active,
.history-date-filter summary.is-active {
    border-color: var(--selected);
    background: var(--selected);
    color: #ffffff;
}

html[data-theme="dark"] .history-quick-periods a.is-active,
html[data-theme="dark"] .history-date-filter summary.is-active {
    color: var(--orange);
}

.history-quick-periods {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.history-date-filter {
    grid-column: 1 / -1;
    position: relative;
}

.history-date-filter summary {
    gap: 6px;
    list-style: none;
}

.history-date-filter summary::-webkit-details-marker {
    display: none;
}

.history-date-filter form {
    position: absolute;
    z-index: 4;
    top: calc(100% + 8px);
    right: 0;
    width: min(330px, calc(100vw - 40px));
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 16px 40px var(--shadow);
    text-align: left;
}

.history-date-filter .setup-button {
    width: 100%;
}

@media (max-width: 420px) {
    .history-quick-periods {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.form-field {
    margin-bottom: 18px;
}

.form-field > label:not(.segment-control__item) {
    display: block;
    margin: 0 0 8px 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.app-input-group,
.create-input-group {
    flex-wrap: nowrap;
}

.app-input-group .input-group-text,
.app-input-group .form-control,
.app-input-group .form-select,
.password-toggle {
    min-height: 64px;
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
}

.app-input-group .input-group-text {
    padding-left: 21px;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 20px;
}

.app-input-group .form-control,
.app-input-group .form-select {
    min-width: 0;
    border-left: 0;
    padding: 16px;
    box-shadow: none;
}

.app-input-group > input[type="date"].form-control {
    width: 0;
    min-width: 0;
    flex: 1 1 0;
    -webkit-appearance: none;
    appearance: none;
}

.app-input-group > input[type="date"]::-webkit-date-and-time-value {
    min-height: 1.5em;
    text-align: left;
}

.date-quick-actions {
    display: flex;
    gap: 7px;
    margin: 8px 10px 0;
}

.date-quick-actions button {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.date-quick-actions button:hover,
.date-quick-actions button:focus-visible {
    border-color: var(--orange);
    color: var(--orange);
}

.amount-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 2px solid currentcolor;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.transaction-amount-input,
.transaction-amount-input .input-group-text,
.transaction-amount-input .form-control,
.transaction-amount-input .form-control:focus {
    border: 0 !important;
    background-color: transparent !important;
}

.transaction-amount-input .form-control {
    font-size: 71px;
}

.app-input-group .form-control:focus,
.app-input-group .form-select:focus {
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
    box-shadow: none;
}

.app-input-group:focus-within .input-group-text,
.app-input-group:focus-within .form-control,
.app-input-group:focus-within .form-select,
.app-input-group:focus-within .password-toggle {
    border-color: var(--orange);
}

.app-input-group .form-control:last-child,
.app-input-group .form-select:last-child {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.form-control::placeholder,
textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

.password-toggle {
    border-left: 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--muted);
}

.app-currency {
    padding-right: 18px;
    border-left: 0 !important;
    border-radius: 0 var(--radius) var(--radius) 0 !important;
    color: var(--muted) !important;
    font-weight: 700;
}

.app-input-group--textarea textarea {
    min-height: 118px;
    padding-top: 20px;
    line-height: 1.5;
    resize: vertical;
}

.app-input-group--textarea .input-group-text {
    align-items: flex-start;
    padding-top: 16px;
}

.app-input-group--textarea .input-group-text i {
    line-height: 1;
}

.segment-control {
    display: grid;
    min-width: 0;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 36px;
    corner-shape: superellipse(2);
    background: var(--surface);
}

.segment-control--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.operation-switcher .segment-control__item {
    border: 0;
    background: transparent;
}

.operation-switcher .segment-control__item--expense.is-active {
    background: var(--selected);
    color: #ffffff;
}

.operation-switcher .segment-control__item--expense.is-active i {
    color: var(--orange);
}

.operation-switcher .segment-control__item--income.is-active {
    background: var(--success-bg);
    color: var(--success-text);
}

.operation-switcher .segment-control__item--transfer.is-active {
    background: color-mix(in srgb, #6477d9 18%, var(--surface));
    color: #5264c7;
}

.segment-control__item--transfer i {
    color: #6477d9;
}

.segment-control__input {
    position: absolute;
    opacity: 0;
}

.segment-control__item {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 31px;
    corner-shape: superellipse(2);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
}

.segment-control__input:checked + .segment-control__item--expense {
    background: var(--selected);
    color: #ffffff;
}

.segment-control__input:checked + .segment-control__item--expense i {
    color: var(--orange);
}

.segment-control__input:checked + .segment-control__item--income {
    background: var(--success-bg);
    color: var(--success-text);
}

.segment-control__item--income i {
    color: var(--green);
}

.choice-field {
    min-width: 0;
    padding: 0;
    border: 0;
}

.choice-field > legend {
    float: none;
    width: auto;
    margin: 0 0 8px 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.transaction-category-select {
    display: none;
}

.choice-cloud {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.choice-cloud--scroll {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: none;
    padding: 0 0 7px;
    overflow-x: auto;
    overflow-y: hidden;
    contain: layout inline-size;
    overscroll-behavior: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.choice-cloud--scroll::-webkit-scrollbar,
.transaction-page .account-card-list::-webkit-scrollbar {
    display: none;
}

.choice-cloud--scroll[hidden] {
    display: none;
}

.horizontal-scroll-frame {
    position: relative;
    min-width: 0;
}

.horizontal-scroll-frame::before,
.horizontal-scroll-frame::after {
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 7px;
    width: 24px;
    content: "";
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.horizontal-scroll-frame::before {
    left: 0;
    background: linear-gradient(90deg, var(--scroll-edge-shadow), transparent);
}

.horizontal-scroll-frame::after {
    right: 0;
    background: linear-gradient(270deg, var(--scroll-edge-shadow), transparent);
}

.horizontal-scroll-frame.can-scroll-left::before,
.horizontal-scroll-frame.can-scroll-right::after {
    opacity: 1;
}

html.theme-ready .horizontal-scroll-frame::before,
html.theme-ready .horizontal-scroll-frame::after {
    transition: opacity 180ms ease;
}

.choice-cloud__option {
    min-width: 0;
}

.transaction-page .choice-cloud__option {
    flex: 0 0 calc(30.303% - 7.273px);
    min-width: 0;
    scroll-snap-align: start;
}

.transaction-page .choice-cloud__option--wide {
    flex-basis: 48%;
}

.transaction-page .choice-cloud__option--extra-wide {
    flex-basis: 64%;
}

.choice-cloud__option input,
.account-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.choice-cloud__option label {
    display: flex;
    height: 68px;
    min-height: 68px;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 34px;
    corner-shape: superellipse(2);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    hyphens: none;
    line-height: 1.2;
    overflow: hidden;
    overflow-wrap: normal;
    white-space: normal;
    word-break: normal;
    transition:
        border-color 240ms ease,
        background-color 240ms ease,
        color 240ms ease,
        box-shadow 240ms ease;
}

.choice-cloud__option label:hover {
    border-color: color-mix(in srgb, var(--orange) 55%, var(--border));
}

.choice-cloud__option input:focus-visible + label,
.account-choice input:focus-visible + label {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 30%, transparent);
}

.choice-cloud__option input:checked + label {
    border-color: var(--selected);
    background: var(--selected);
    color: #ffffff;
}

html[data-theme="dark"] .choice-cloud__option input:checked + label {
    color: var(--orange);
}

.has-error .choice-cloud__option label,
.has-error .account-choice label {
    border-color: var(--danger-border);
}

.account-card-list {
    display: grid;
    gap: 9px;
    max-height: 161px;
    padding-right: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: color-mix(in srgb, var(--muted) 50%, transparent) transparent;
    scrollbar-width: thin;
}

.account-choice label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 38px;
    corner-shape: superellipse(2);
    background: var(--surface);
    cursor: pointer;
    transition:
        border-color 240ms ease,
        background-color 240ms ease,
        color 240ms ease,
        box-shadow 240ms ease;
}

.account-choice label:hover {
    border-color: color-mix(in srgb, var(--orange) 55%, var(--border));
}

.account-choice__mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    corner-shape: superellipse(2);
    background: linear-gradient(135deg, #2d3340, #15181e);
    color: #ffffff;
    font-size: 20px;
}

.account-choice__body,
.account-choice__balance {
    min-width: 0;
}

.account-choice__body strong,
.account-choice__body small,
.account-choice__balance small {
    display: block;
}

.account-choice__body strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-choice__body small,
.account-choice__balance small {
    color: var(--muted);
    font-size: 11px;
}

.account-choice__balance {
    font-size: 13px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.account-choice__check {
    color: var(--border);
    font-size: 17px;
}

.account-choice input:checked + label {
    border-color: var(--orange);
    box-shadow: inset 0 0 0 1px var(--orange);
}

.account-choice input:checked + label .account-choice__check {
    color: var(--orange);
}

.transaction-page .account-card-list {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 8px;
    max-height: none;
    padding: 0 0 7px;
    overflow-x: auto;
    overflow-y: hidden;
    contain: layout inline-size;
    overscroll-behavior: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.transaction-page .account-choice {
    flex: 0 0 calc(43.478% - 7px);
    min-width: 0;
    scroll-snap-align: start;
}

.transaction-page .account-choice label.account-choice-card {
    --account-choice-start: #1b2028;
    --account-choice-end: #11161d;
    --account-choice-ink: #eef1f5;
    --account-choice-selected-start: #f59a72;
    --account-choice-selected-end: #ee7f5c;
    --account-choice-selected-ink: #6e301e;
    display: grid;
    overflow: hidden;
    width: 100%;
    height: 142px;
    min-height: 142px;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    padding: 20px;
    border-color: color-mix(in srgb, var(--account-choice-ink) 14%, transparent);
    border-radius: 72px;
    corner-shape: superellipse(2.5);
    background:
        repeating-linear-gradient(
            45deg,
            transparent 0 9px,
            rgb(255 255 255 / 9%) 9px 10px
        ),
        linear-gradient(135deg, var(--account-choice-start), var(--account-choice-end));
    color: var(--account-choice-ink);
    box-shadow: 0 12px 26px rgb(20 24 32 / 9%);
    transition:
        border-color 300ms ease,
        color 300ms ease,
        box-shadow 300ms ease,
        filter 300ms ease;
}

html.theme-ready .transaction-page .account-choice-card * {
    transition: none;
}

.transaction-page .account-choice-card--yellow {
    --account-choice-selected-start: #f7df72;
    --account-choice-selected-end: #f1cc4f;
    --account-choice-selected-ink: #584109;
}

.transaction-page .account-choice-card--cream {
    --account-choice-selected-start: #f7f0cf;
    --account-choice-selected-end: #eee3b4;
    --account-choice-selected-ink: #4d4527;
}

.transaction-page .account-choice-card--lime {
    --account-choice-selected-start: #c8e98d;
    --account-choice-selected-end: #aed96a;
    --account-choice-selected-ink: #345224;
}

.transaction-page .account-choice-card--blue {
    --account-choice-selected-start: #b8d7f2;
    --account-choice-selected-end: #98c1e7;
    --account-choice-selected-ink: #294965;
}

.transaction-page .account-choice__body strong,
.transaction-page .account-choice__balance {
    display: block;
}

.transaction-page .account-choice__balance {
    margin-bottom: 8px;
    overflow: hidden;
    color: inherit;
    font-size: clamp(24px, 7vw, 34px);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1;
    text-align: left;
    white-space: nowrap;
}

.transaction-page .account-choice__body strong {
    color: inherit;
    font-size: 15px;
    font-weight: 500;
}

.transaction-page .account-choice input:checked + label.account-choice-card {
    --account-choice-start: var(--account-choice-selected-start);
    --account-choice-end: var(--account-choice-selected-end);
    --account-choice-ink: var(--account-choice-selected-ink);
    border-color: var(--orange);
    box-shadow:
        inset 0 0 0 2px var(--orange),
        0 14px 30px rgb(20 24 32 / 14%);
}

.transaction-page .account-choice input:not(:checked) + label.account-choice-card:hover {
    border-color: color-mix(in srgb, var(--orange) 55%, transparent);
    color: var(--orange);
    box-shadow:
        0 10px 22px rgb(20 24 32 / 13%),
        0 18px 34px rgb(20 24 32 / 17%);
    filter: brightness(1.08);
}

.transaction-page .account-choice input:checked + label.account-choice-card:hover {
    box-shadow:
        inset 0 0 0 2px var(--orange),
        0 18px 36px rgb(20 24 32 / 20%);
    filter: brightness(1.03);
}

.transaction-page .account-choice input:disabled + label.account-choice-card {
    cursor: not-allowed;
    filter: grayscale(0.5);
    opacity: 0.42;
}

.transaction-page .account-choice input:disabled + label.account-choice-card:hover {
    border-color: color-mix(in srgb, var(--account-choice-ink) 14%, transparent);
    color: var(--account-choice-ink);
    box-shadow: 0 12px 26px rgb(20 24 32 / 9%);
    filter: grayscale(0.5);
}

.transaction-page {
    overflow-x: hidden;
}

.transaction-page .app-page__content {
    width: 100%;
    min-width: 0;
    max-width: 540px;
}

.transaction-page .transaction-form,
.transaction-page .choice-field {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.transaction-page .transaction-form {
    overflow: visible;
}

.form-submit {
    -webkit-appearance: none;
    appearance: none;
    overflow: hidden;
    min-height: 64px;
    border: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--orange-light), var(--orange));
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
}

.form-submit:hover {
    background: linear-gradient(135deg, var(--orange-light), var(--orange));
    color: #ffffff;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--orange) 24%, transparent);
}

.form-submit:disabled {
    background: var(--border);
    color: var(--muted);
    opacity: 1;
}

.group-add-button {
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    overflow: hidden;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    border: 1px solid var(--orange);
    border-radius: var(--radius);
    background: transparent;
    color: var(--orange);
    font-size: 15px;
    font-weight: 800;
}

.group-add-button:hover,
.group-add-button:focus-visible {
    border-color: var(--orange);
    background: color-mix(in srgb, var(--orange) 9%, transparent);
    color: var(--orange);
}

.group-add-button:disabled {
    border-color: var(--border);
    color: var(--muted);
}

.transaction-group {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.transaction-group__heading,
.transaction-group__account-heading,
.transaction-group__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.transaction-group__heading {
    margin-bottom: 13px;
}

.transaction-group__heading small,
.transaction-group__heading strong,
.transaction-group__account-heading small,
.transaction-group__account-heading strong,
.transaction-group__item small,
.transaction-group__item strong,
.transaction-group__balance small,
.transaction-group__balance strong {
    display: block;
}

.transaction-group__heading small,
.transaction-group__account-heading small,
.transaction-group__item small,
.transaction-group__balance small {
    color: var(--muted);
    font-size: 11px;
}

.transaction-group__heading > button {
    border: 0;
    background: transparent;
    color: var(--danger);
    font-size: 12px;
    font-weight: 700;
}

.transaction-group__accounts {
    display: grid;
    gap: 10px;
}

.transaction-group__account {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
}

.transaction-group__account-heading {
    padding: 13px;
    border-bottom: 1px solid var(--border);
}

.transaction-group__balance {
    text-align: right;
    white-space: nowrap;
}

.transaction-group__item {
    padding: 11px 13px;
}

.transaction-group__item + .transaction-group__item {
    border-top: 1px solid var(--border);
}

.transaction-group__item > div {
    min-width: 0;
    flex: 1;
}

.transaction-group__item > div strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-group__item-amount {
    font-size: 12px;
    white-space: nowrap;
}

.transaction-group__item-amount--expense { color: var(--orange); }
.transaction-group__item-amount--income { color: var(--green); }

.transaction-group__remove {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--surface-hover);
    color: var(--muted);
}

.group-save-button {
    -webkit-appearance: none;
    appearance: none;
    overflow: hidden;
    min-height: 58px;
    margin-top: 13px;
    border: 0;
    border-radius: 18px;
    background: var(--selected);
    color: #ffffff;
    font-weight: 800;
}

.group-save-button:hover,
.group-save-button:focus-visible {
    background: var(--selected);
    color: #ffffff;
}

.app-alert {
    border: 0;
    border-radius: 16px;
    font-weight: 600;
}

.alert-success.app-alert {
    background: var(--success-bg);
    color: var(--success-text);
}

.alert-danger.app-alert {
    background: var(--danger-bg);
    color: var(--danger);
}

.field-message {
    display: none;
    margin: 7px 10px 0;
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
}

.has-error .field-message {
    display: block;
}

.has-error .app-input-group .input-group-text,
.has-error .app-input-group .form-control,
.has-error .app-input-group .form-select,
.setup-form__field.has-error .form-control,
.setup-form__field.has-error .form-select,
.create-field.has-error .form-control,
.create-field.has-error .form-select {
    border-color: var(--danger-border);
}

.was-validated .form-field:not(.has-error)
    .app-input-group:has(.form-control:valid, .form-select:valid)
    > :is(.input-group-text, .form-control, .form-select, .password-toggle) {
    border-color: var(--green);
}

.setup-panel {
    margin: 0 0 24px;
    padding: 22px;
    border: 1px solid color-mix(in srgb, var(--orange) 35%, var(--border));
    border-radius: 24px;
    background: var(--surface-soft);
}

.setup-panel__heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.setup-panel__heading > i {
    color: var(--orange);
    font-size: 22px;
}

.setup-panel h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
}

.setup-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.setup-form {
    display: grid;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.setup-form + .setup-form {
    margin-top: 18px;
}

.setup-form__field label,
.create-field label {
    display: block;
    margin: 0 0 6px 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.setup-form__field .form-control,
.setup-form__field .form-select,
.create-field .form-control,
.create-field .form-select,
.create-input-group .input-group-text {
    min-height: 52px;
    border-color: var(--border);
    border-radius: 15px;
    background: var(--surface);
    color: var(--text);
    box-shadow: none;
}

.setup-form__field .category-description-input,
.create-field .category-description-input {
    min-height: 84px;
    resize: vertical;
}

.category-description-hint {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 7px 4px 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.category-description-hint [data-description-count] {
    flex: none;
    font-variant-numeric: tabular-nums;
}

.category-description-generate {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.category-description-generate:hover,
.category-description-generate:focus-visible {
    border-color: var(--orange);
    color: var(--orange);
}

.category-description-generate:disabled {
    cursor: wait;
    opacity: 0.6;
}

.category-description-feedback {
    margin: 8px 4px 0;
    color: var(--muted);
    font-size: 12px;
}

.category-description-feedback.is-error {
    color: var(--danger);
}

.create-input-group .form-control {
    border-radius: 15px 0 0 15px;
}

.create-input-group .input-group-text {
    border-radius: 0 15px 15px 0;
    color: var(--muted);
}

.setup-button {
    min-height: 50px;
    border: 1px solid var(--orange);
    border-radius: 15px;
    color: var(--orange);
    font-weight: 800;
}

.setup-button:hover {
    border-color: var(--orange);
    background: var(--orange);
    color: #ffffff;
}

.entity-shortcuts {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.entity-shortcuts a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 17px;
    border: 1px solid var(--border);
    border-radius: 40px;
    corner-shape: superellipse(2);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
}

.entity-shortcuts a:hover {
    border-color: var(--orange);
}

.entity-shortcuts__icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: var(--surface-soft);
    color: var(--orange);
    font-size: 18px;
}

.entity-shortcuts strong,
.entity-shortcuts small {
    display: block;
}

.entity-shortcuts small {
    margin-top: 2px;
    color: var(--muted);
}

.entity-list {
    display: grid;
    gap: 10px;
    margin-bottom: 28px;
}

.entity-list-hint {
    margin: -16px 4px 28px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.account-list {
    gap: 3px;
}

.category-group__title {
    margin: 0 4px 12px;
    color: var(--orange);
    font-size: 16px;
    font-weight: 800;
}

.category-group__title--income {
    color: var(--green);
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 28px;
}

.category-list > .empty-state {
    width: 100%;
}

.category-editor {
    position: relative;
    min-width: 0;
    max-width: 100%;
}

.category-editor:hover,
.category-editor:focus-within {
    z-index: 1;
}

.category-summary {
    --category-tag-bg: #ffddc0;
    --category-tag-tilt: -1deg;
    display: inline-flex;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 999px;
    corner-shape: round;
    background: transparent;
    color: #11151b;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
}

.category-summary__visual {
    display: inline-flex;
    max-width: 100%;
    min-height: 48px;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--category-tag-bg);
    pointer-events: none;
    transition:
        transform 260ms cubic-bezier(0.16, 1, 0.3, 1),
        filter 260ms ease;
}

html.theme-ready .category-summary__visual {
    transition:
        transform 260ms cubic-bezier(0.16, 1, 0.3, 1),
        filter 260ms ease;
}

.category-summary:hover .category-summary__visual {
    filter: saturate(1.12);
    transform: translateY(-4px) rotate(var(--category-tag-tilt)) scale(1.025);
}

.category-summary:active .category-summary__visual {
    transform: translateY(-1px) scale(0.985);
}

.category-summary:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}

.category-summary__name {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.category-summary--tone-0 { --category-tag-bg: #4ce0b4; }
.category-summary--tone-1 { --category-tag-bg: #ffddc0; }
.category-summary--tone-2 { --category-tag-bg: #f5acd8; }
.category-summary--tone-3 { --category-tag-bg: #d2ef83; }
.category-summary--tone-4 { --category-tag-bg: #ff627f; }
.category-summary--tone-5 { --category-tag-bg: #c3b8f4; }
.category-summary--tone-6 { --category-tag-bg: #77b9f4; }
.category-summary--tone-7 { --category-tag-bg: #fff085; }
.category-summary--tone-1,
.category-summary--tone-5 { --category-tag-tilt: 1deg; }

html.category-dialog-open,
body.category-dialog-open {
    overflow: hidden;
}

.category-editor-dialog {
    width: min(540px, calc(100vw - 28px));
    max-width: none;
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    margin: auto;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 28px 80px rgb(0 0 0 / 30%);
}

.category-editor-dialog[open] {
    animation: category-dialog-in 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.category-editor-dialog::backdrop {
    background: rgb(4 9 15 / 72%);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.category-editor-dialog[open]::backdrop {
    animation: category-backdrop-in 280ms ease both;
}

.category-editor-dialog.is-closing {
    animation: category-dialog-out 180ms ease-in both;
}

.category-editor-dialog.is-closing::backdrop {
    animation: category-backdrop-out 180ms ease-in both;
}

.category-editor-dialog__header {
    position: sticky;
    z-index: 1;
    top: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.category-editor-dialog__header p {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.category-editor-dialog__header h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.category-editor-dialog__close {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--surface-hover);
    color: var(--text);
    cursor: pointer;
    transition: background-color 200ms ease, transform 200ms ease;
}

.category-editor-dialog__close:hover {
    background: var(--border);
    transform: rotate(90deg);
}

.category-editor-dialog__close:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.category-editor-dialog .entity-editor__panel {
    width: 100%;
    margin: 0;
    padding: 22px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

@keyframes category-dialog-in {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes category-dialog-out {
    to { opacity: 0; transform: translateY(10px) scale(0.98); }
}

@keyframes category-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes category-backdrop-out {
    to { opacity: 0; }
}

.entity-card.category-archive-card {
    --category-archive-bg: #f3a092;
    --category-archive-ink: #6d2e27;
    grid-template-columns: minmax(0, 1fr) auto;
    border-color: color-mix(in srgb, var(--category-archive-ink) 14%, transparent);
    background: color-mix(in srgb, var(--category-archive-bg) 58%, var(--surface));
    color: var(--category-archive-ink);
}

.entity-card.category-archive-card--income {
    --category-archive-bg: #c7e99a;
    --category-archive-ink: #315325;
}

.entity-editor {
    transition:
        opacity 480ms ease,
        filter 480ms ease,
        transform 540ms cubic-bezier(0.16, 1, 0.3, 1);
}

.entity-list:has(> .entity-editor[open]) > .entity-editor:not([open]) {
    opacity: 0.48;
    filter: saturate(0.55);
    transform: scale(0.985);
}

.account-summary {
    --account-card-start: #f59a72;
    --account-card-end: #ee7f5c;
    --account-card-ink: #6e301e;
    position: relative;
    display: grid;
    overflow: hidden;
    min-height: 190px;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    padding: 27px 30px;
    border: 1px solid color-mix(in srgb, var(--account-card-ink) 14%, transparent);
    border-radius: 100px;
    corner-shape: superellipse(2.5);
    background:
        repeating-linear-gradient(
            45deg,
            transparent 0 9px,
            rgb(255 255 255 / 9%) 9px 10px
        ),
        linear-gradient(135deg, var(--account-card-start), var(--account-card-end));
    color: var(--account-card-ink);
    box-shadow: 0 14px 32px rgb(20 24 32 / 10%);
    isolation: isolate;
    transition:
        transform 350ms cubic-bezier(0.16, 1, 0.3, 1),
        border-color 350ms ease-in-out,
        box-shadow 350ms ease-in-out,
        color 350ms ease-in-out,
        filter 350ms ease-in-out;
}

html.theme-ready .account-summary {
    transition:
        transform 350ms cubic-bezier(0.16, 1, 0.3, 1),
        border-color 350ms ease-in-out,
        box-shadow 350ms ease-in-out,
        color 350ms ease-in-out,
        filter 350ms ease-in-out;
}

.account-summary:hover {
    border-color: color-mix(in srgb, var(--orange) 48%, transparent);
    color: var(--orange);
    box-shadow:
        0 8px 18px rgb(20 24 32 / 8%),
        0 24px 46px rgb(20 24 32 / 20%);
}

.account-summary::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    background: #11161d;
    content: "";
    opacity: 0;
    pointer-events: none;
    transition: opacity 350ms ease-in-out;
}

html.theme-ready .account-summary::before {
    transition: opacity 350ms ease-in-out;
}

html.theme-ready .account-summary * {
    transition: none;
}

.account-summary:hover::before {
    opacity: 0.9;
}

.account-summary::after {
    position: absolute;
    z-index: -1;
    top: -55%;
    right: -8%;
    width: 58%;
    height: 180%;
    border-radius: 50%;
    background: rgb(255 255 255 / 12%);
    content: "";
    filter: blur(28px);
    transform: rotate(18deg);
}

.account-summary--yellow {
    --account-card-start: #f7df72;
    --account-card-end: #f1cc4f;
    --account-card-ink: #584109;
}

.account-summary--cream {
    --account-card-start: #f7f0cf;
    --account-card-end: #eee3b4;
    --account-card-ink: #4d4527;
}

.account-summary--lime {
    --account-card-start: #c8e98d;
    --account-card-end: #aed96a;
    --account-card-ink: #345224;
}

.account-summary--blue {
    --account-card-start: #b8d7f2;
    --account-card-end: #98c1e7;
    --account-card-ink: #294965;
}

.account-summary__body,
.account-summary__name,
.account-summary__balance {
    display: block;
}

.account-summary__body {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.account-summary__balance {
    margin-bottom: 8px;
    font-size: clamp(56px, 15vw, 76px);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.account-summary__name {
    overflow: hidden;
    font-size: 19px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-editor[open] .account-summary {
    border-color: var(--orange);
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--orange) 22%, transparent),
        0 22px 42px rgb(20 24 32 / 18%);
    transform: translateY(-3px) scale(1.012);
}

.account-summary:active {
    transform: scale(0.985);
}

.account-editor .entity-editor__panel {
    margin: 8px 0 14px;
}

.entity-editor {
    interpolate-size: allow-keywords;
}

.entity-editor::details-content {
    overflow: clip;
    block-size: 0;
    opacity: 0;
    transition:
        block-size 560ms cubic-bezier(0.16, 1, 0.3, 1),
        opacity 400ms ease,
        content-visibility 560ms allow-discrete;
}

.entity-editor[open]::details-content {
    block-size: auto;
    opacity: 1;
}

@starting-style {
    .entity-editor[open]::details-content {
        block-size: 0;
        opacity: 0;
    }
}

[data-create-entity] {
    transition:
        opacity 480ms ease,
        filter 480ms ease,
        transform 540ms cubic-bezier(0.16, 1, 0.3, 1);
}

.entity-page:has([data-entity-editor][open]) [data-create-entity] {
    opacity: 0.38;
    filter: saturate(0.5);
    pointer-events: none;
    transform: scale(0.985);
}

.accounts-page .create-card {
    padding: 25px;
    border-radius: 28px;
}

.accounts-page .create-card h2 {
    margin-bottom: 22px;
    font-size: 22px;
}

.entity-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 13px;
    min-height: 76px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 21px;
    background: var(--surface);
}

.entity-editor summary {
    cursor: pointer;
    list-style: none;
}

.entity-editor summary::-webkit-details-marker {
    display: none;
}

.entity-editor summary:focus {
    outline: none;
}

.entity-editor summary:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 35%, transparent);
}

.entity-editor[open] .entity-card {
    border-color: color-mix(in srgb, var(--orange) 45%, var(--border));
}

.entity-editor[open] .entity-card__chevron {
    color: var(--orange);
}

.entity-card__icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    font-size: 21px;
}

.entity-card__icon--yellow { background: #fff2b8; color: #5f4a00; }
.entity-card__icon--green { background: #d9f7e6; color: #168456; }
.entity-card__icon--blue { background: #dce9ff; color: #326bd6; }
.entity-card__icon--violet { background: #eadcff; color: #7542c7; }
.entity-card__icon--orange { background: #ffeadf; color: var(--orange); }

html[data-theme="dark"] .entity-card__icon {
    filter: saturate(0.9) brightness(0.82);
}

.entity-card__body {
    min-width: 0;
}

.entity-card__body h2 {
    overflow: hidden;
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-card__body > strong,
.entity-card__body > small {
    display: block;
}

.entity-card__body > strong {
    overflow: hidden;
    font-size: 15px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-card__body > small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.entity-card__body p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.entity-card__value {
    text-align: right;
}

.entity-card__value strong,
.entity-card__value span {
    display: block;
}

.entity-card__value strong {
    font-size: 14px;
    white-space: nowrap;
}

.entity-card__value span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.entity-card__chevron {
    color: var(--muted);
}

.entity-card__kind--expense { color: var(--orange); }
.entity-card__kind--income { color: var(--green); }

.archive-section {
    margin-bottom: 28px;
}

.archive-section > h2 {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 800;
}

.entity-card--archived {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.restore-button {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--green) 45%, var(--border));
    border-radius: 14px;
    color: var(--green);
    font-size: 13px;
    font-weight: 800;
}

.restore-button:hover {
    border-color: var(--green);
    background: color-mix(in srgb, var(--green) 10%, transparent);
    color: var(--green);
}

.transaction-history {
    display: grid;
    gap: 26px;
}

.transaction-day__caption {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.transaction-day__date {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 5px;
}

.transaction-day__date > strong {
    color: var(--orange);
    font-size: 72px;
    font-weight: 700;
    letter-spacing: -0.08em;
    line-height: 0.95;
}

.transaction-day__date > span,
.transaction-day__date b {
    display: block;
}

.transaction-day__date > span {
    color: var(--muted);
    font-size: 13px;
}

.transaction-day__date b {
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.transaction-day__items {
    display: grid;
    gap: 7px;
}

.transaction-editor summary {
    cursor: pointer;
    list-style: none;
}

.transaction-editor summary::-webkit-details-marker {
    display: none;
}

.transaction-editor summary:focus {
    outline: none;
}

.transaction-editor summary:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 35%, transparent);
}

.transaction-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 11px;
    min-height: 96px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.transaction-editor[open] .transaction-card {
    border-color: color-mix(in srgb, var(--orange) 45%, var(--border));
}

a.transaction-card--movement {
    color: var(--text);
    text-decoration: none;
}

.transaction-card__icon--movement {
    background: color-mix(in srgb, #6477d9 14%, var(--surface));
    color: #6477d9;
}

.transaction-card__amount--movement {
    color: #6477d9;
}

.transaction-card__icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 13px;
    font-size: 19px;
}

.transaction-card__icon--expense {
    background: color-mix(in srgb, var(--orange) 14%, var(--surface));
    color: var(--orange);
}

.transaction-card__icon--income {
    background: color-mix(in srgb, var(--green) 14%, var(--surface));
    color: var(--green);
}

.transaction-card__body {
    min-width: 0;
}

.transaction-card__body strong,
.transaction-card__meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-card__body strong {
    font-size: 16px;
    font-weight: 800;
}

.transaction-card__body small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.transaction-card__comment {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 7px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.35;
}

.transaction-card__amount {
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.transaction-card__amount--income {
    color: var(--green);
}

.transaction-card__edit {
    color: var(--muted);
    font-size: 13px;
}

.transaction-editor[open] .transaction-card__edit {
    color: var(--orange);
}

.transaction-editor__panel {
    margin-top: 7px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-soft);
}

.transaction-editor__panel .danger-button {
    margin-top: 10px;
}

.history-empty a {
    display: inline-block;
    margin-top: 12px;
    color: var(--orange);
    font-weight: 700;
}

.entity-editor__panel {
    margin-top: 8px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-soft);
}

.entity-editor__panel .form-submit {
    min-height: 52px;
    border-radius: 16px;
    font-size: 15px;
}

.entity-editor__hint {
    margin: -2px 2px 14px;
    color: var(--muted);
    font-size: 12px;
}

.account-adjustment-form {
    margin-top: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.account-adjustment-form h3 {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 800;
}

.account-adjustment-switcher {
    position: relative;
    isolation: isolate;
}

.account-adjustment-switcher::before {
    position: absolute;
    z-index: -1;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 12px) / 2);
    border-radius: 31px;
    background: color-mix(in srgb, var(--orange) 15%, var(--surface));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--orange) 35%, transparent);
    content: "";
    transform: translateX(0);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.account-adjustment-switcher.is-limit::before {
    transform: translateX(calc(100% + 4px));
}

.account-adjustment-switcher .segment-control__item {
    position: relative;
    z-index: 1;
    transition: color 180ms ease;
}

.account-adjustment-switcher .segment-control__input:checked + .segment-control__item {
    color: var(--orange);
}

.account-adjustment-switcher .segment-control__input:focus-visible + .segment-control__item {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 30%, transparent);
}

.account-adjustment-button {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--orange);
    border-radius: 17px;
    background: color-mix(in srgb, var(--orange) 8%, transparent);
    color: var(--orange);
    font-weight: 800;
}

.account-adjustment-button:hover,
.account-adjustment-button:focus-visible {
    border-color: var(--orange);
    background: color-mix(in srgb, var(--orange) 15%, transparent);
    color: var(--orange);
}

.danger-button {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    border: 1px solid var(--danger-border);
    border-radius: 16px;
    color: var(--danger);
    font-weight: 800;
}

.danger-button:hover {
    border-color: var(--danger-border);
    background: var(--danger-bg);
    color: var(--danger);
}

.empty-state {
    padding: 28px;
    border: 1px dashed var(--border);
    border-radius: 22px;
    color: var(--muted);
    text-align: center;
}

.empty-state i {
    font-size: 28px;
}

.empty-state p {
    margin: 8px 0 0;
}

.create-card {
    scroll-margin-top: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
}

.create-card h2 {
    margin: 0 0 18px;
    font-size: 19px;
    font-weight: 800;
}

.create-field {
    margin-bottom: 14px;
}

.create-card .form-submit {
    min-height: 54px;
    margin-top: 6px;
    border-radius: 17px;
    font-size: 16px;
}

.plan-create .budget-form__submit,
.plan-card__editor .budget-form__submit {
    min-height: 61px;
    margin-top: 2px;
    border-radius: 19px;
    font-size: 16px;
}

@media (max-width: 575.98px) {
    :root {
        --radius: 18px;
    }

    .transaction-page .app-page__content,
    .transaction-page .transaction-form,
    .transaction-page .choice-field {
        min-width: 0;
        max-width: 100%;
    }

    .transaction-page .choice-cloud--scroll,
    .transaction-page .account-card-list {
        width: 100%;
        max-width: 100%;
        contain: layout inline-size;
        -webkit-overflow-scrolling: touch;
    }

    .transaction-page .choice-cloud--scroll {
        scroll-snap-type: x mandatory;
    }

    .transaction-page .choice-cloud__option {
        width: max-content;
        min-width: calc(30.303% - 7.273px);
        max-width: 64%;
        flex-basis: auto;
        scroll-snap-stop: always;
    }

    .transaction-page .choice-cloud__option--wide {
        min-width: 48%;
    }

    .transaction-page .choice-cloud__option--extra-wide {
        min-width: 64%;
    }

    .transaction-page .account-card-list {
        scroll-snap-type: x mandatory;
    }

    .transaction-page .account-choice {
        flex-basis: 86%;
        scroll-snap-stop: always;
    }

    .app-input-group > input[type="date"].form-control {
        padding-top: 18px;
        padding-bottom: 14px;
    }

    .segment-control {
        border-radius: 24px;
    }

    .segment-control__item {
        border-radius: 20px;
    }

    .choice-cloud__option label {
        border-radius: 22px;
    }

    .transaction-page .account-choice label.account-choice-card {
        border-radius: 40px;
    }

    .account-summary {
        border-radius: clamp(50px, 16vw, 92px);
    }

    .entity-shortcuts a {
        border-radius: 28px;
    }
}

@media (min-width: 576px) {
    :root,
    html[data-theme="dark"] {
        --scroll-edge-shadow: rgb(22 27 34 / 87%);
    }

    .auth-page,
    .app-page {
        padding: 44px;
    }

    .transaction-form {
        corner-shape: superellipse(2);
        padding: 34px;
        border: 1px solid var(--border);
        border-radius: 75px;
        background: var(--surface);
        box-shadow: 0 14px 32px var(--shadow);
    }

    .transaction-page [data-category-field] .horizontal-scroll-frame {
        display: none;
    }

    .transaction-page .transaction-category-select:not([hidden]) {
        display: block;
        min-height: 54px;
        padding: 12px 44px 12px 16px;
        border-color: var(--border);
        border-radius: 18px;
        background-color: var(--surface);
        color: var(--text);
        font-weight: 700;
    }

    .transaction-page .choice-field.has-error .transaction-category-select:not([hidden]) {
        border-color: var(--danger-border);
    }

    .setup-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
        align-items: end;
    }

    .setup-button {
        padding: 0 20px;
    }

    .create-card {
        padding: 26px;
    }
}

@supports not (corner-shape: superellipse(2)) {
    .segment-control,
    .account-choice label,
    .entity-shortcuts a {
        border-radius: var(--bs-border-radius-xl, 1rem);
    }

    .segment-control__item,
    .choice-cloud__option label {
        border-radius: var(--bs-border-radius-lg, 0.5rem);
    }

    .account-choice__mark {
        border-radius: var(--bs-border-radius-lg, 0.5rem);
    }

    .transaction-page .account-choice label.account-choice-card,
    .account-summary {
        border-radius: var(--bs-border-radius-xxl, 2rem);
    }

    @media (min-width: 576px) {
        .transaction-form {
            border-radius: var(--bs-border-radius-xxl, 2rem);
        }
    }

    .app-input-group > input[type="date"].form-control {
        padding-top: 18px;
        padding-bottom: 14px;
    }
}

html.browser-safari .segment-control,
html.browser-safari .segment-control__item,
html.browser-safari .choice-cloud__option label,
html.browser-safari .account-choice label,
html.browser-safari .account-choice__mark,
html.browser-safari .transaction-page .account-choice label.account-choice-card,
html.browser-safari .entity-shortcuts a,
html.browser-safari .account-summary {
    corner-shape: round;
}

html.browser-safari .segment-control,
html.browser-safari .account-choice label,
html.browser-safari .entity-shortcuts a {
    border-radius: var(--bs-border-radius-xl, 1rem);
}

html.browser-safari .segment-control__item,
html.browser-safari .choice-cloud__option label,
html.browser-safari .account-choice__mark {
    border-radius: var(--bs-border-radius-lg, 0.5rem);
}

html.browser-safari .transaction-page .account-choice label.account-choice-card,
html.browser-safari .account-summary {
    border-radius: var(--bs-border-radius-xxl, 2rem);
}

@media (min-width: 576px) {
    html.browser-safari .transaction-form {
        border-radius: var(--bs-border-radius-xxl, 2rem);
        corner-shape: round;
    }
}

@media (max-width: 575.98px) {
    .category-page .category-group__title {
        font-size: 14px;
    }

    .category-page .category-list {
        gap: 9px;
        margin-bottom: 26px;
    }

    .category-page .category-summary {
        font-size: 14px;
    }

    .category-page .category-summary__visual {
        min-height: 44px;
        padding: 10px 15px;
    }

    .category-editor-dialog {
        border-radius: 22px;
    }

    .category-editor-dialog__header {
        padding: 18px 18px 14px;
    }

    .category-editor-dialog .entity-editor__panel {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .category-summary__visual,
    .category-editor-dialog[open],
    .category-editor-dialog[open]::backdrop {
        animation: none !important;
        transition: none !important;
    }

    html.theme-ready *,
    html.theme-ready *::before,
    html.theme-ready *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.finance-totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.finance-totals--single {
    grid-template-columns: 1fr;
}

.finance-totals > div {
    display: grid;
    gap: 5px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--bs-border-radius-xl, 1rem);
    background: var(--surface);
}

.finance-totals small {
    color: var(--muted);
}

.finance-totals strong {
    font-size: clamp(22px, 5vw, 30px);
}

.liability-totals {
    --liability-total-ink: #a83679;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 24px;
    overflow: hidden;
}

html[data-theme="dark"] .liability-totals {
    --liability-total-ink: #f5acd8;
}

.liability-totals__value {
    display: block;
    min-width: 0;
    width: 100%;
}

.liability-totals__amount {
    display: block;
    width: 100%;
    font-family: Unbounded, Manrope, Arial, sans-serif;
    color: var(--liability-total-ink);
    font-size: clamp(42px, 13vw, 68px);
    font-weight: 900;
    font-variant-numeric: lining-nums;
    letter-spacing: -0.08em;
    line-height: 1;
    white-space: nowrap;
}

.liability-totals__currency {
    color: var(--text);
    font-size: 0.38em;
    letter-spacing: -0.03em;
}

.liability-list {
    display: grid;
    gap: 16px;
}

.liability-summary {
    --liability-accent: #f5acd8;
    display: grid;
    min-height: 326px;
    grid-template-rows: 1fr auto auto;
    gap: 0;
    padding: 29px 32px 27px;
    border: 1px solid rgb(255 255 255 / 7%);
    border-radius: 38px;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--liability-accent) 13%, transparent), transparent 55%),
        #151e28;
    color: #ffffff;
    box-shadow: 0 16px 34px rgb(24 20 25 / 13%);
    transition:
        border-color 260ms ease,
        box-shadow 260ms ease,
        transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.liability-summary--tone-0, .liability-archive-card--tone-0 { --liability-accent: #4ce0b4; }
.liability-summary--tone-1, .liability-archive-card--tone-1 { --liability-accent: #ffddc0; }
.liability-summary--tone-2, .liability-archive-card--tone-2 { --liability-accent: #f5acd8; }
.liability-summary--tone-3, .liability-archive-card--tone-3 { --liability-accent: #d2ef83; }
.liability-summary--tone-4, .liability-archive-card--tone-4 { --liability-accent: #ff627f; }
.liability-summary--tone-5, .liability-archive-card--tone-5 { --liability-accent: #c3b8f4; }
.liability-summary--tone-6, .liability-archive-card--tone-6 { --liability-accent: #77b9f4; }
.liability-summary--tone-7, .liability-archive-card--tone-7 { --liability-accent: #fff085; }

.liability-summary__hero {
    display: block;
    min-width: 0;
}

.liability-summary__initial {
    display: block;
    margin-bottom: 17px;
    color: rgb(255 255 255 / 54%);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
}

.liability-summary__amount,
.liability-summary__currency {
    display: block;
    font-family: Unbounded, Manrope, Arial, sans-serif;
    font-weight: 900;
    letter-spacing: -0.085em;
    line-height: 1;
    overflow-wrap: anywhere;
}

.liability-summary__amount {
    color: var(--liability-accent);
    font-size: clamp(46px, 10.8vw, 78px);
    font-variant-numeric: lining-nums;
}

.liability-summary__currency {
    margin-top: 1px;
    color: #ffffff;
    font-size: clamp(38px, 8vw, 59px);
}

.liability-summary__description {
    display: block;
    margin-top: 28px;
    color: rgb(255 255 255 / 84%);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.liability-summary__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.liability-summary__meta {
    display: flex;
    min-width: 0;
    flex: 1 1 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}

.liability-summary__kind {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 8px 15px;
    border-radius: 999px;
    background: var(--liability-accent);
    color: #252226;
    font-size: 13px;
    font-weight: 800;
}

.liability-summary__edit {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    color: rgb(255 255 255 / 72%);
    font-size: 16px;
    line-height: 1;
}

.liability-summary:hover,
.liability-editor[open] .liability-summary {
    border-color: color-mix(in srgb, var(--liability-accent) 55%, transparent);
    box-shadow: 0 22px 42px rgb(24 20 25 / 22%);
}

.liability-editor[open] .liability-summary {
    transform: translateY(-2px);
}

.liability-editor[open] .liability-summary__edit {
    color: var(--liability-accent);
}

.liability-editor .liability-summary:focus-visible {
    box-shadow: 0 0 0 3px var(--liability-accent), 0 16px 34px rgb(24 20 25 / 13%);
}

.liability-editor .entity-editor__panel {
    margin: 8px 0 14px;
}

.liability-close-form {
    margin-top: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.liability-archive-section {
    margin-top: 30px;
    margin-bottom: 0;
}

.liability-archive-toggle {
    --archive-accent: #7a61ba;
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 20px;
    border: 2px solid var(--archive-accent);
    border-radius: 999px;
    background: transparent;
    color: var(--archive-accent);
    cursor: pointer;
    list-style: none;
    transition:
        border-color 360ms ease,
        background-color 360ms ease,
        color 360ms ease;
}

html[data-theme="dark"] .liability-archive-toggle {
    --archive-accent: #c3b8f4;
}

html.theme-ready .liability-archive-toggle {
    transition:
        border-color 360ms ease,
        background-color 360ms ease,
        color 360ms ease;
}

.liability-archive-toggle::-webkit-details-marker {
    display: none;
}

.liability-archive-toggle::marker {
    content: "";
}

.liability-archive-toggle > span {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.liability-archive-toggle > span > i {
    font-size: 18px;
}

.liability-archive-toggle strong {
    font-family: Unbounded, Manrope, Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.25;
}

.liability-archive-toggle small {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--archive-accent) 15%, transparent);
    font-family: Unbounded, Manrope, Arial, sans-serif;
    font-size: 11px;
    font-weight: 800;
}

.liability-archive-toggle:hover,
.liability-archive-section[open] .liability-archive-toggle {
    background: #c3b8f4;
    color: #282526;
}

.liability-archive-toggle:hover small,
.liability-archive-section[open] .liability-archive-toggle small {
    background: rgb(40 37 38 / 13%);
}

.liability-archive-toggle:focus-visible {
    outline: 3px solid var(--archive-accent);
    outline-offset: 3px;
}

.liability-archive-toggle__chevron {
    margin-left: auto;
    transition: transform 240ms ease;
}

html.theme-ready .liability-archive-toggle__chevron {
    transition: transform 240ms ease;
}

.liability-archive-section[open] .liability-archive-toggle__chevron {
    transform: rotate(180deg);
}

.liability-archive-list {
    display: grid;
    gap: 14px;
    padding-top: 14px;
}

.liability-archive-card {
    --liability-archive-ink: color-mix(in srgb, var(--liability-accent) 40%, #151e28);
    display: flex;
    min-height: 168px;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
    border: 2px solid var(--liability-archive-ink);
    border-radius: 26px;
    background: transparent;
    color: var(--liability-archive-ink);
}

html[data-theme="dark"] .liability-archive-card {
    --liability-archive-ink: var(--liability-accent);
}

.liability-archive-card__header {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.liability-archive-card__tag {
    display: inline-flex;
    min-width: 0;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 5px 7px;
    border: 1px solid color-mix(in srgb, var(--liability-archive-ink) 65%, transparent);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

.liability-archive-card__date strong {
    font-family: Unbounded, Manrope, Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.liability-archive-card__date,
.liability-archive-card__currency {
    flex: 0 0 auto;
}

.liability-archive-card__kind {
    display: block;
    overflow: hidden;
    line-height: 16px;
    text-overflow: ellipsis;
}

.liability-archive-card__currency {
    margin-left: auto;
}

.liability-archive-card__content {
    display: grid;
    min-width: 0;
    gap: 12px;
}

.liability-archive-card__name {
    font-family: Unbounded, Manrope, Arial, sans-serif;
    font-size: clamp(18px, 3vw, 23px);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.liability-archive-card__amount {
    font-family: Unbounded, Manrope, Arial, sans-serif;
    font-size: clamp(20px, 4vw, 26px);
    font-weight: 800;
    letter-spacing: -0.07em;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

@media (min-width: 521px) {
    .liability-archive-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .liability-archive-card {
        padding: 16px;
    }

    .liability-archive-card__name {
        font-size: 17px;
    }

    .liability-archive-card__amount {
        font-size: 18px;
    }

    .liability-archive-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .liability-archive-card:last-child:nth-child(odd) .liability-archive-card__name {
        font-size: clamp(18px, 3vw, 23px);
    }

    .liability-archive-card:last-child:nth-child(odd) .liability-archive-card__amount {
        font-size: clamp(20px, 4vw, 26px);
    }
}

.liability-page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.liability-page-action {
    display: inline-flex;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: 999px;
    font-family: Unbounded, Manrope, Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition:
        background-color 360ms ease,
        border-color 360ms ease,
        color 360ms ease;
}

html.theme-ready .liability-page-action {
    transition:
        background-color 360ms ease,
        border-color 360ms ease,
        color 360ms ease;
}

.liability-page-action--primary {
    min-width: 0;
    flex: 1 1 auto;
    padding: 12px 20px;
    border-color: #77b9f4;
    background: #77b9f4;
    color: #173049;
}

.liability-page-action--add {
    --liability-add-ring: #7a61ba;
    --liability-add-hover: #248d73;
    width: 58px;
    min-width: 58px;
    flex: 0 0 58px;
    padding: 0;
    border-color: var(--liability-add-ring);
    background: transparent;
    color: var(--liability-add-ring);
}

html[data-theme="dark"] .liability-page-action--add {
    --liability-add-ring: #c3b8f4;
    --liability-add-hover: #4ce0b4;
}

.liability-page-action--add i {
    display: block;
    font-size: 25px;
    line-height: 1;
    transition: transform 320ms ease;
}

html.theme-ready .liability-page-action--add i {
    transition: transform 320ms ease;
}

.liability-page-action--add[aria-expanded="true"] i {
    transform: rotate(45deg);
}

.liability-page-action--primary.is-active,
.liability-page-action--primary:hover:not(:disabled) {
    border-color: #f5acd8;
    background: #f5acd8;
    color: #282526;
}

.liability-page-action--add.is-active,
.liability-page-action--add:hover:not(:disabled) {
    border-color: var(--liability-add-hover);
    color: var(--liability-add-hover);
}

.liability-page-action:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.liability-page-action:disabled {
    border-color: var(--border);
    background: var(--surface-soft);
    color: var(--muted);
    cursor: not-allowed;
}

.liability-action-panel {
    display: grid;
    overflow: visible;
    grid-template-rows: 0fr;
    opacity: 0;
    scroll-margin-top: 20px;
    transform: translateY(-12px);
    transition:
        grid-template-rows 420ms cubic-bezier(0.16, 1, 0.3, 1),
        opacity 260ms ease,
        transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.liability-action-panel.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
    transform: translateY(0);
}

.liability-action-panel__inner {
    min-height: 0;
    overflow: hidden;
}

.liability-action-panel__inner > .create-card,
.liability-action-panel__inner > .transaction-form {
    margin-top: 14px;
}

.liability-action-panel .create-card {
    padding: 25px;
    border-radius: 28px;
}

.liability-balance-form {
    width: 100%;
}

.liability-kind-switcher {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    user-select: none;
}

.liability-kind-switcher .segment-control__input {
    pointer-events: none;
}

.liability-kind-switcher .segment-control__item {
    --switch-color: #177f65;
    min-width: 0;
    min-height: 54px;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--switch-color);
    font-family: Unbounded, Manrope, Arial, sans-serif;
    font-size: clamp(16px, 4vw, 21px);
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 1.2;
}

.liability-kind-switcher .segment-control__item--expense {
    --switch-color: #bc3e5b;
}

html[data-theme="dark"] .liability-kind-switcher .segment-control__item--income {
    --switch-color: #4ce0b4;
}

html[data-theme="dark"] .liability-kind-switcher .segment-control__item--expense {
    --switch-color: #ff627f;
}

.liability-kind-switcher .segment-control__item span {
    min-width: 0;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    white-space: nowrap;
    transition:
        max-width 340ms ease,
        opacity 220ms ease;
}

.liability-kind-switcher .segment-control__input:checked + .segment-control__item {
    background: transparent;
    color: var(--switch-color);
}

.liability-kind-switcher .segment-control__input:checked + .segment-control__item span {
    max-width: 220px;
    opacity: 1;
}

.liability-kind-switcher__swap {
    display: block;
    margin-left: auto;
    color: #7a61ba;
    font-size: 28px;
    line-height: 1;
    pointer-events: none;
    transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

html[data-theme="dark"] .liability-kind-switcher__swap {
    color: #c3b8f4;
}

html.theme-ready .liability-kind-switcher__swap {
    transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.liability-kind-switcher .segment-control__item:hover {
    background: transparent;
}

.liability-kind-switcher:has(.segment-control__input:focus-visible) {
    outline: 3px solid #7a61ba;
    outline-offset: 3px;
    border-radius: 8px;
}

html[data-theme="dark"] .liability-kind-switcher:has(.segment-control__input:focus-visible) {
    outline-color: #c3b8f4;
}

.liability-balance-form .account-choice[hidden] {
    display: none;
}

.liability-history-section {
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}

.liability-history-section > h2 {
    margin: 0 0 22px;
    font-size: clamp(24px, 6vw, 34px);
    font-weight: 800;
}

.liability-history-card {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.account-adjustment-history-card {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.account-adjustment-history-card--reversed {
    opacity: 0.64;
}

.liability-history-card form,
.account-adjustment-history-card form {
    margin: 0;
}

.icon-danger-button {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    color: var(--danger);
}

.icon-danger-button:hover,
.icon-danger-button:focus-visible {
    background: color-mix(in srgb, var(--danger) 18%, transparent);
    color: var(--danger);
}

@media (max-width: 520px) {
    .finance-totals {
        grid-template-columns: 1fr;
    }

    .liability-page-action,
    .liability-page-action--add {
        min-height: 54px;
    }

    .liability-page-action--add {
        width: 54px;
        min-width: 54px;
        flex-basis: 54px;
    }

    .liability-summary {
        min-height: 286px;
        padding: 24px;
        border-radius: 32px;
    }

    .liability-summary__amount {
        font-size: clamp(40px, 10.5vw, 56px);
    }

    .liability-summary__currency {
        font-size: clamp(34px, 8vw, 46px);
    }

    .liability-summary__description {
        font-size: 16px;
    }

    .liability-history-card {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .account-adjustment-history-card {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .liability-history-card .transaction-card__amount,
    .account-adjustment-history-card .transaction-card__amount {
        grid-column: 2;
    }

    .liability-history-card form,
    .account-adjustment-history-card form {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}

/* Voice transaction prototype */
.dashboard-page {
    padding-bottom: 118px;
}

.voice-transaction-fab {
    position: fixed;
    z-index: 12;
    left: 50%;
    bottom: max(22px, env(safe-area-inset-bottom));
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    padding: 7px;
    border: 1px solid color-mix(in srgb, var(--orange) 45%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow:
        0 18px 50px color-mix(in srgb, var(--orange) 18%, transparent),
        0 4px 16px var(--shadow);
    color: var(--text);
    text-decoration: none;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
}

.voice-transaction-fab:hover,
.voice-transaction-fab:focus-visible {
    border-color: var(--orange);
    color: var(--orange);
    transform: translate(-50%, -3px);
}

.voice-transaction-fab__icon {
    position: relative;
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--orange-light), var(--orange));
    box-shadow: 0 8px 18px color-mix(in srgb, var(--orange) 30%, transparent);
    color: #ffffff;
    font-size: 20px;
}

.voice-transaction-fab__icon::after {
    position: absolute;
    inset: -4px;
    border: 1px solid color-mix(in srgb, var(--orange) 28%, transparent);
    border-radius: inherit;
    animation: voice-fab-breathe 2.4s ease-in-out infinite;
    content: "";
}

.voice-entry-feedback {
    position: fixed;
    z-index: 12;
    left: 50%;
    bottom: calc(max(22px, env(safe-area-inset-bottom)) + 74px);
    display: flex;
    width: min(370px, calc(100vw - 40px));
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: 0 12px 32px var(--shadow);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}

.voice-entry-feedback strong {
    font: inherit;
}

.voice-entry-feedback p {
    margin: 0;
}

.voice-entry-feedback__dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--orange);
}

.voice-entry-feedback[data-state="recording"] .voice-entry-feedback__dot {
    background: #f04438;
    box-shadow: 0 0 0 5px rgb(240 68 56 / 13%);
    animation: voice-status-pulse 1s ease-in-out infinite;
}

.voice-entry-feedback[data-state="error"] {
    border-color: var(--danger-border);
    background: var(--danger-bg);
    color: var(--danger);
}

.voice-entry-feedback[data-state="error"] .voice-entry-feedback__dot {
    background: var(--danger);
}

.voice-entry-feedback time {
    flex: 0 0 auto;
    color: #f04438;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    font-weight: 800;
}

.voice-entry-feedback:is(
    [data-state="recording"],
    [data-state="stopping"],
    [data-state="saving"],
    [data-state="opening"]
) {
    top: 46%;
    bottom: auto;
    display: grid;
    width: min(540px, calc(100vw - 40px));
    min-height: 270px;
    justify-items: center;
    align-content: center;
    gap: 16px;
    padding: 20px;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: translate(-50%, -50%);
    animation: voice-entry-status-arrive 400ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.voice-entry-feedback:is(
    [data-state="recording"],
    [data-state="stopping"],
    [data-state="saving"],
    [data-state="opening"]
) strong {
    font-size: clamp(30px, 8vw, 48px);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.12;
}

.voice-entry-feedback:is(
    [data-state="recording"],
    [data-state="stopping"],
    [data-state="saving"],
    [data-state="opening"]
) .voice-entry-feedback__dot {
    width: 14px;
    height: 14px;
    box-shadow: 0 0 0 8px rgb(240 68 56 / 12%);
}

.voice-entry-feedback:is(
    [data-state="recording"],
    [data-state="stopping"]
) time {
    font-size: clamp(64px, 18vw, 96px);
    letter-spacing: -0.06em;
    line-height: 1;
}

.voice-entry-feedback:is(
    [data-state="recording"],
    [data-state="stopping"],
    [data-state="saving"],
    [data-state="opening"]
) p {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.voice-transaction-fab.is-requesting .voice-transaction-fab__icon::after,
.voice-transaction-fab.is-saving .voice-transaction-fab__icon::after {
    animation-duration: 900ms;
}

.voice-transaction-fab.is-saving .voice-transaction-fab__icon i {
    animation: voice-button-spin 850ms linear infinite;
}

.voice-transaction-fab.is-recording {
    border-color: rgb(240 68 56 / 50%);
    box-shadow: 0 18px 50px rgb(240 68 56 / 24%), 0 4px 16px var(--shadow);
}

.voice-transaction-fab.is-recording .voice-transaction-fab__icon {
    background: linear-gradient(145deg, #ff7166, #e7342a);
}

.voice-transaction-fab.is-recording .voice-transaction-fab__icon::after {
    border-color: rgb(240 68 56 / 65%);
    animation: voice-entry-record-pulse 1.25s ease-out infinite;
}

.voice-transaction-fab.is-opening {
    border-color: #f04438;
    animation: voice-entry-button 340ms ease-in-out both;
    pointer-events: none;
}

.voice-transaction-fab.is-opening .voice-transaction-fab__icon {
    background: linear-gradient(145deg, #ff7166, #e7342a);
    animation: voice-entry-mic 340ms ease-in-out both;
}

.voice-transaction-fab.is-opening .voice-transaction-fab__icon::after {
    border-color: rgb(240 68 56 / 65%);
    animation: voice-entry-ring 340ms ease-out both;
}

.voice-transaction-fab.is-opening::after {
    position: absolute;
    inset: -10px;
    border: 1px solid rgb(240 68 56 / 55%);
    border-radius: 50%;
    animation: voice-entry-ring 340ms ease-out 40ms both;
    content: "";
    pointer-events: none;
}

.dashboard-page .app-page__content {
    transition: opacity 340ms ease, transform 340ms ease, filter 340ms ease;
}

.dashboard-page.is-voice-active .app-page__content {
    opacity: 0.18;
    transform: scale(0.98);
    filter: blur(3px);
    pointer-events: none;
}

.dashboard-page::after {
    position: fixed;
    z-index: 11;
    inset: 0;
    background:
        radial-gradient(circle at 50% 75%, rgb(240 68 56 / 25%), transparent 56%),
        rgb(118 28 27 / 9%);
    opacity: 0;
    transition: opacity 340ms ease;
    content: "";
    pointer-events: none;
}

.dashboard-page.is-voice-active::after {
    opacity: 1;
}

.voice-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 26%, color-mix(in srgb, var(--orange) 10%, transparent) 0, transparent 29%),
        var(--bg);
}

.voice-page .app-page__content {
    animation: voice-entry-page-arrive 420ms ease-out both;
}

.voice-page__heading {
    margin: -14px 0 20px;
    text-align: center;
}

.voice-page__back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.voice-page__back:hover,
.voice-page__back:focus-visible {
    color: var(--orange);
}

.voice-page__eyebrow {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 7px;
    margin: 0 auto;
    padding: 7px 12px;
    border: 1px solid color-mix(in srgb, var(--orange) 24%, var(--border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--orange) 7%, var(--surface));
    color: var(--orange);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.voice-recorder {
    position: relative;
    overflow: hidden;
    padding: 20px 22px 24px;
    border: 1px solid color-mix(in srgb, var(--orange) 18%, var(--border));
    border-radius: 34px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--surface) 97%, var(--orange)), var(--surface)),
        var(--surface);
    box-shadow: 0 24px 70px var(--shadow);
}

.voice-recorder::after {
    position: absolute;
    right: -70px;
    bottom: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--orange) 9%, transparent);
    filter: blur(8px);
    content: "";
    pointer-events: none;
}

.voice-recorder__topline {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.voice-recorder__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.voice-recorder__status > span:first-child {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 12%, transparent);
}

.voice-recorder[data-state="requesting"] .voice-recorder__status > span:first-child {
    background: var(--orange);
    animation: voice-status-pulse 1s ease-in-out infinite;
}

.voice-recorder[data-state="processing"] .voice-recorder__status > span:first-child {
    background: var(--orange);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--orange) 13%, transparent);
    animation: voice-status-pulse 1s ease-in-out infinite;
}

.voice-recorder[data-state="recording"] .voice-recorder__status > span:first-child {
    background: #f04438;
    box-shadow: 0 0 0 5px rgb(240 68 56 / 13%);
    animation: voice-status-pulse 1s ease-in-out infinite;
}

.voice-recorder[data-state="error"] .voice-recorder__status > span:first-child {
    background: var(--danger);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--danger) 13%, transparent);
}

.voice-recorder__limit {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.voice-recorder__stage {
    position: relative;
    display: grid;
    min-height: 285px;
    place-items: center;
    isolation: isolate;
}

.voice-orbit {
    position: absolute;
    z-index: 0;
    border: 1px solid color-mix(in srgb, var(--orange) 18%, transparent);
    border-radius: 50%;
    pointer-events: none;
}

.voice-orbit--outer {
    width: 230px;
    height: 230px;
    animation: voice-orbit-float 5.2s ease-in-out infinite;
}

.voice-orbit--inner {
    width: 178px;
    height: 178px;
    border-color: color-mix(in srgb, var(--orange) 28%, transparent);
    animation: voice-orbit-float 3.8s ease-in-out -1.4s infinite reverse;
}

.voice-wave {
    position: absolute;
    z-index: 1;
    width: calc(100% - 12px);
    height: 150px;
    opacity: 0.5;
    pointer-events: none;
}

.voice-recorder[data-state="recording"] .voice-wave {
    opacity: 1;
}

.voice-record-button {
    position: relative;
    z-index: 3;
    display: grid;
    width: 112px;
    height: 112px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.voice-record-button__glow {
    position: absolute;
    inset: -14px;
    border-radius: inherit;
    background: color-mix(in srgb, var(--orange) 14%, transparent);
    filter: blur(1px);
    animation: voice-record-breathe 2.8s ease-in-out infinite;
}

.voice-record-button__face {
    position: relative;
    display: grid;
    place-items: center;
    border: 7px solid color-mix(in srgb, var(--surface) 78%, transparent);
    border-radius: inherit;
    background: linear-gradient(145deg, var(--orange-light), var(--orange));
    box-shadow:
        0 18px 32px color-mix(in srgb, var(--orange) 32%, transparent),
        inset 0 1px 0 rgb(255 255 255 / 30%);
    color: #ffffff;
    font-size: 40px;
}

html.theme-ready .voice-record-button,
html.theme-ready .voice-record-button__face,
html.theme-ready .voice-wave,
html.theme-ready .voice-transaction-fab {
    transition:
        opacity 220ms ease,
        transform 260ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 240ms ease,
        background-color 240ms ease,
        border-color 240ms ease,
        color 200ms ease;
}

.voice-record-button:hover .voice-record-button__face,
.voice-record-button:focus-visible .voice-record-button__face {
    transform: scale(1.045);
    box-shadow:
        0 21px 38px color-mix(in srgb, var(--orange) 39%, transparent),
        inset 0 1px 0 rgb(255 255 255 / 30%);
}

.voice-record-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--orange) 30%, transparent);
    outline-offset: 7px;
}

.voice-record-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.voice-recorder[data-state="recording"] .voice-record-button__face {
    background: linear-gradient(145deg, #ff7166, #e7342a);
    box-shadow: 0 18px 38px rgb(231 52 42 / 30%);
}

.voice-recorder[data-state="recording"] .voice-record-button__glow {
    background: rgb(240 68 56 / 14%);
    animation-duration: 1.2s;
}

.voice-recorder[data-state="recording"] .voice-orbit--outer {
    animation-duration: 2.4s;
}

.voice-recorder[data-state="recording"] .voice-orbit--inner {
    animation-duration: 1.8s;
}

.voice-recorder__copy {
    position: relative;
    z-index: 4;
    display: grid;
    justify-items: center;
    margin-top: -5px;
    text-align: center;
}

.voice-recorder__stage[hidden],
.voice-recorder__copy[hidden],
.voice-pipeline[hidden] {
    display: none;
}

.voice-pipeline {
    position: relative;
    z-index: 4;
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: 40px 4px 20px;
    text-align: center;
    animation: voice-draft-arrive 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.voice-pipeline__icon {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    margin-bottom: 12px;
    border: 1px solid color-mix(in srgb, var(--orange) 26%, var(--border));
    border-radius: 26px;
    background: color-mix(in srgb, var(--orange) 10%, var(--surface));
    color: var(--orange);
    font-size: 34px;
    box-shadow: 0 14px 36px color-mix(in srgb, var(--orange) 12%, transparent);
}

.voice-pipeline[data-state="active"] .voice-pipeline__icon i {
    animation: voice-status-pulse 1.4s ease-in-out infinite;
}

.voice-pipeline[data-state="ready"] .voice-pipeline__icon {
    border-color: color-mix(in srgb, var(--green) 34%, var(--border));
    background: var(--success-bg);
    color: var(--green);
}

.voice-pipeline[data-state="empty"] .voice-pipeline__icon {
    border-color: color-mix(in srgb, var(--orange) 34%, var(--border));
    background: color-mix(in srgb, var(--orange) 10%, var(--surface));
    color: var(--orange);
}

.voice-pipeline[data-state="error"] .voice-pipeline__icon {
    border-color: var(--danger-border);
    background: var(--danger-bg);
    color: var(--danger);
}

.voice-pipeline > strong {
    font-size: clamp(20px, 5vw, 25px);
    font-weight: 800;
    line-height: 1.2;
}

.voice-pipeline > p {
    max-width: 370px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.voice-pipeline__steps {
    display: grid;
    width: min(100%, 480px);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin: 27px 0 0;
    padding: 0;
    list-style: none;
}

.voice-pipeline__steps li {
    display: grid;
    justify-items: center;
    gap: 7px;
    padding-top: 10px;
    border-top: 3px solid var(--border);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.voice-pipeline__steps li i {
    font-size: 17px;
}

.voice-pipeline__steps li[data-state="done"],
.voice-pipeline__steps li[data-state="ready"] {
    border-color: var(--green);
    color: var(--success-text);
}

.voice-pipeline__steps li[data-state="active"] {
    border-color: var(--orange);
    color: var(--orange);
}

.voice-pipeline__steps li[data-state="empty"] {
    border-color: var(--orange);
    color: var(--orange);
}

.voice-pipeline__steps li[data-state="error"] {
    border-color: var(--danger);
    color: var(--danger);
}

.voice-recorder__copy strong {
    font-size: 20px;
    font-weight: 800;
}

.voice-recorder__copy > span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.voice-recorder__timer {
    margin-top: 13px;
    color: var(--orange);
    font-variant-numeric: tabular-nums;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.voice-recorder[data-state="recording"] .voice-recorder__timer {
    color: #e7342a;
}

.voice-recorder__actions {
    position: relative;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.voice-secondary-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 7px;
    margin-top: 15px;
    padding: 8px 15px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.voice-secondary-button:hover,
.voice-secondary-button:focus-visible {
    border-color: var(--danger-border);
    color: var(--danger);
}

.voice-secondary-button--retry {
    border-color: var(--orange);
    color: var(--orange);
}

.voice-secondary-button--retry:hover,
.voice-secondary-button--retry:focus-visible {
    border-color: var(--orange);
    background: color-mix(in srgb, var(--orange) 10%, var(--surface));
    color: var(--orange);
}

.voice-recorder__message {
    position: relative;
    z-index: 4;
    margin-top: 17px;
    padding: 12px 14px;
    border: 1px solid var(--danger-border);
    border-radius: 15px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
    text-align: center;
}

.voice-recorder__message[data-kind="success"] {
    border-color: color-mix(in srgb, var(--green) 36%, var(--border));
    background: var(--success-bg);
    color: var(--success-text);
}

.voice-localhost-link {
    position: relative;
    z-index: 4;
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 16px;
    border: 1px solid var(--orange);
    border-radius: 16px;
    background: color-mix(in srgb, var(--orange) 10%, var(--surface));
    color: var(--orange);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.voice-localhost-link:hover,
.voice-localhost-link:focus-visible {
    background: color-mix(in srgb, var(--orange) 17%, var(--surface));
    color: var(--orange);
}

.voice-transcript {
    position: relative;
    overflow: hidden;
    margin-top: 16px;
    padding: 22px;
    border: 1px solid color-mix(in srgb, var(--orange) 28%, var(--border));
    border-radius: 28px;
    background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--orange) 12%, transparent), transparent 42%),
        var(--surface);
    box-shadow: 0 18px 46px color-mix(in srgb, var(--shadow) 72%, transparent);
    animation: voice-draft-arrive 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.voice-transcript__heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 18px;
}

.voice-transcript__icon {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border-radius: 17px;
    background: linear-gradient(145deg, var(--orange-light), var(--orange));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--orange) 24%, transparent);
    color: #ffffff;
    font-size: 21px;
}

.voice-transcript__heading small,
.voice-transcript__heading h2 {
    display: block;
    margin: 0;
}

.voice-transcript__heading small {
    color: var(--orange);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.voice-transcript__heading h2 {
    margin-top: 3px;
    font-size: 19px;
    font-weight: 800;
}

.voice-transcript__text {
    margin: 0;
    padding: 16px 17px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg) 54%, var(--surface));
    color: var(--text);
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.voice-transcript__note {
    margin-top: 13px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.voice-review {
    margin-top: 16px;
    padding: 22px;
    border: 1px solid color-mix(in srgb, var(--green) 24%, var(--border));
    border-radius: 28px;
    background:
        radial-gradient(circle at 0 0, color-mix(in srgb, var(--green) 10%, transparent), transparent 34%),
        var(--surface);
    box-shadow: 0 18px 46px color-mix(in srgb, var(--shadow) 72%, transparent);
    animation: voice-draft-arrive 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.voice-review__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.voice-review__heading small,
.voice-review__heading h2 {
    display: block;
    margin: 0;
}

.voice-review__heading small {
    color: var(--success-text);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.voice-review__heading h2 {
    margin-top: 3px;
    font-size: 21px;
    font-weight: 800;
}

.voice-review__count {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 15px;
    background: var(--success-bg);
    color: var(--success-text);
    font-size: 18px;
    font-weight: 800;
}

.voice-review__account {
    margin-top: 20px;
}

.voice-review__account label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.voice-review__account select,
.voice-review-item input,
.voice-review-item select,
.voice-review-item textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: 0;
    background: color-mix(in srgb, var(--bg) 54%, var(--surface));
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.voice-review__account select:focus,
.voice-review-item input:focus,
.voice-review-item select:focus,
.voice-review-item textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 12%, transparent);
}

.voice-select-picker__trigger {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg) 54%, var(--surface));
    color: var(--text);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.voice-select-picker__trigger span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.voice-select-picker__name,
.voice-select-picker__option-name {
    flex: 1 1 auto;
    min-width: 0;
}

.voice-select-picker__balance,
.voice-select-picker__option-balance {
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.voice-select-picker__trigger i {
    flex: 0 0 auto;
    font-size: 15px;
    line-height: 1;
    transition: transform 180ms ease;
}

.voice-select-picker__trigger[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.voice-select-picker__trigger:focus-visible,
.voice-select-picker__trigger[aria-expanded="true"] {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 12%, transparent);
}

.voice-select-picker__options {
    display: grid;
    gap: 4px;
    max-height: 230px;
    overflow-y: auto;
    margin-top: 7px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.voice-select-picker__option {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    gap: 12px;
    padding: 8px 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    text-align: left;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.voice-select-picker__option:hover,
.voice-select-picker__option:focus-visible,
.voice-select-picker__option.is-selected {
    outline: none;
    background: var(--surface-hover);
}

.voice-select-picker__option.is-selected {
    color: var(--success-text);
    font-weight: 800;
}

.voice-select-picker__trigger:disabled,
.voice-select-picker__option:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.voice-review__summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 13px;
}

.voice-review__summary > span {
    min-width: 0;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg) 48%, var(--surface));
}

.voice-review__summary small,
.voice-review__summary strong {
    display: block;
}

.voice-review__summary small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.voice-review__summary strong {
    overflow: hidden;
    margin-top: 4px;
    font-size: 15px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-review__items {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.voice-review-item {
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: color-mix(in srgb, var(--surface) 92%, var(--bg));
}

.voice-review-item__topline {
    display: flex;
    min-height: 32px;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
}

.voice-review-item__number {
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
}

.voice-review-item__confidence {
    margin-right: auto;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--success-bg);
    color: var(--success-text);
    font-size: 8px;
    font-weight: 800;
}

.voice-review-item__confidence[data-level="medium"] {
    background: color-mix(in srgb, var(--orange) 12%, var(--surface));
    color: var(--orange);
}

.voice-review-item__confidence[data-level="low"] {
    background: var(--danger-bg);
    color: var(--danger);
}

.voice-review-item__topline button {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--danger-border);
    border-radius: 11px;
    background: transparent;
    color: var(--danger);
}

.voice-review-item__topline button:hover,
.voice-review-item__topline button:focus-visible {
    background: var(--danger-bg);
}

.voice-review-item__fields {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(100px, 0.6fr);
    gap: 11px;
}

.voice-review-item__fields label > span,
.voice-review-item__category > span {
    display: block;
    margin: 0 0 6px 2px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.voice-review-item input[type="date"] {
    min-width: 0;
}

.voice-review-item__comment {
    grid-column: 1 / -1;
}

.voice-review-item__comment textarea {
    resize: vertical;
}

.voice-review-item__source {
    margin: 12px 2px 0;
    color: var(--muted);
    font-size: 9px;
    font-style: italic;
    line-height: 1.45;
}

.voice-review-item__issues {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.voice-review-item__issues span {
    padding: 5px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--orange) 10%, var(--surface));
    color: var(--orange);
    font-size: 8px;
    font-weight: 800;
}

.voice-review__unresolved {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    margin-top: 14px;
    padding: 13px 14px;
    border: 1px solid color-mix(in srgb, var(--orange) 26%, var(--border));
    border-radius: 16px;
    background: color-mix(in srgb, var(--orange) 8%, var(--surface));
    color: var(--orange);
}

.voice-review__unresolved strong,
.voice-review__unresolved p {
    display: block;
    margin: 0;
}

.voice-review__unresolved strong {
    font-size: 10px;
}

.voice-review__unresolved p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.voice-review__submit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
    padding: 17px;
    border: 1px solid color-mix(in srgb, var(--green) 22%, var(--border));
    border-radius: 20px;
    background: color-mix(in srgb, var(--green) 7%, var(--surface));
}

.voice-review__submit strong,
.voice-review__submit span {
    display: block;
}

.voice-review__submit strong {
    font-size: 12px;
    font-weight: 800;
}

.voice-review__submit > div > span {
    max-width: 380px;
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.voice-review__submit button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 17px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--green) 78%, #ffffff),
        var(--green)
    );
    box-shadow: 0 12px 28px color-mix(in srgb, var(--green) 22%, transparent);
    color: #ffffff;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.voice-review__submit button:hover,
.voice-review__submit button:focus-visible {
    filter: brightness(0.94);
}

.voice-review__submit button:disabled {
    cursor: not-allowed;
    filter: none;
    opacity: 0.55;
}

.voice-review__submit button.is-loading i {
    animation: voice-button-spin 850ms linear infinite;
}

.voice-review__confirm-message {
    margin: 11px 2px 0;
    padding: 11px 13px;
    border: 1px solid var(--danger-border);
    border-radius: 14px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.45;
}

.voice-review__confirm-message[data-kind="success"] {
    border-color: color-mix(in srgb, var(--green) 28%, var(--border));
    background: var(--success-bg);
    color: var(--success-text);
}

.voice-review__account select[aria-invalid="true"],
.voice-select-picker__trigger[aria-invalid="true"],
.voice-review-item input[aria-invalid="true"],
.voice-review-item select[aria-invalid="true"],
.voice-review-item textarea[aria-invalid="true"] {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 12%, transparent);
}

.voice-review__empty {
    margin: 0;
    padding: 22px 16px;
    border: 1px dashed var(--border);
    border-radius: 18px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.voice-review__notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 16px 2px 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
}

.voice-review__notice i {
    margin-top: 1px;
    color: var(--green);
}

@keyframes voice-fab-breathe {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.96);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

@keyframes voice-entry-button {
    0% { transform: translateX(-50%) scale(1); }
    55% { transform: translateX(-50%) scale(1.16); }
    100% { transform: translateX(-50%) scale(1.1); }
}

@keyframes voice-entry-mic {
    0% { transform: scale(1); }
    55% { transform: scale(1.13); }
    100% { transform: scale(1); }
}

@keyframes voice-entry-ring {
    0% { opacity: 0.8; transform: scale(0.9); }
    100% { opacity: 0; transform: scale(2.2); }
}

@keyframes voice-entry-record-pulse {
    from { opacity: 0.9; transform: scale(0.9); }
    to { opacity: 0; transform: scale(1.6); }
}

@keyframes voice-entry-status-arrive {
    from { opacity: 0; transform: translate(-50%, -45%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes voice-entry-page-arrive {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .voice-transaction-fab.is-recording .voice-transaction-fab__icon::after,
    .voice-entry-feedback[data-state="recording"] .voice-entry-feedback__dot,
    .voice-entry-feedback:is([data-state="recording"], [data-state="stopping"], [data-state="saving"], [data-state="opening"]),
    .voice-transaction-fab.is-saving .voice-transaction-fab__icon i,
    .voice-transaction-fab.is-opening,
    .voice-transaction-fab.is-opening .voice-transaction-fab__icon,
    .voice-transaction-fab.is-opening .voice-transaction-fab__icon::after,
    .voice-transaction-fab.is-opening::after,
    .voice-page .app-page__content {
        animation: none;
    }

    .dashboard-page .app-page__content,
    .dashboard-page::after {
        transition: none;
    }
}

@keyframes voice-status-pulse {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.82);
    }
    50% {
        opacity: 1;
        transform: scale(1.12);
    }
}

@keyframes voice-record-breathe {
    0%,
    100% {
        opacity: 0.58;
        transform: scale(0.94);
    }
    50% {
        opacity: 1;
        transform: scale(1.09);
    }
}

@keyframes voice-orbit-float {
    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.96) rotate(0deg);
    }
    50% {
        opacity: 0.95;
        transform: scale(1.06) rotate(8deg);
    }
}

@keyframes voice-draft-arrive {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes voice-button-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .voice-recorder {
        padding: 18px 15px 22px;
        border-radius: 29px;
    }

    .voice-recorder__stage {
        min-height: 260px;
    }

    .voice-wave {
        width: 100%;
    }

    .voice-orbit--outer {
        width: 210px;
        height: 210px;
    }

    .voice-orbit--inner {
        width: 165px;
        height: 165px;
    }

    .voice-transcript {
        padding: 19px;
    }

    .voice-review {
        padding: 19px;
    }

    .voice-review-item__fields {
        grid-template-columns: 1fr;
    }

    .voice-review__submit {
        grid-template-columns: 1fr;
    }

    .voice-review__submit button {
        width: 100%;
    }
}
