/* Framework7 iOS owns navigation, controls, sheets and grouped lists. */
:root {
  --f7-page-bg-color: #f2f2f7;
  --f7-font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --f7-list-inset-side-margin: 0px;
  --f7-list-inset-border-radius: 16px;
  --ink: var(--f7-text-color);
  --muted: var(--f7-block-footer-text-color);
  --line: var(--f7-list-item-border-color);
  --warn: #ff3b30;
}
.dark { color-scheme: dark; --f7-page-bg-color: #000; --warn: #ff453a; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; appearance: none; box-sizing: border-box; }
button, input, select, .budget-tabs a { min-height: 44px; }
button { min-width: 44px; }
[hidden] { display: none !important; }
#launchSplash { position: fixed; inset: 0; z-index: 30000; background: #031431; }
#launchSplash img { display: block; width: 100%; height: 100%; object-fit: contain; }
:focus-visible { outline: 2px solid var(--f7-theme-color); outline-offset: 3px; }
#monthLabel { text-transform: capitalize; }
.budget-navbar .left, .budget-navbar .right { min-width: 44px; margin: 0; }
.budget-navbar .right { visibility: hidden; }
.budget-navbar .title { margin: 0; overflow: visible; }
.month-heading { min-width: 114px; text-align: center; }
.budget-navbar .month-chevron { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
.budget-navbar .month-chevron .icon { font-size: 16px; width: 16px; height: 16px; }
.budget-navbar .subtitle { margin-top: 5px; font-size: 12px; font-weight: 400; }
#view-profile .list-button { width: 100%; }
#loginForm { max-width: 480px; margin: auto; }
.navbar .link { color: var(--f7-navbar-link-color, var(--f7-theme-color)); }
.navbar .subtitle { text-transform: none; }
.budget-container { max-width: 720px; margin: auto; padding: 4px 20px 40px; }
/* Keep focus/scrollIntoView inside an animated tab from shifting the whole tab strip. */
.tabs-animated-wrap { overflow: clip; }
.budget-tabs .toolbar-inner { justify-content: space-between; gap: 12px; }
.ios .budget-tabs .toolbar-pane { flex: 0 1 288px; width: auto; min-width: 0; margin-right: auto; }
.budget-tabs .toolbar-pane .tab-link { min-width: 0; padding-left: 8px; padding-right: 8px; }
.budget-tabs .budget-add { position: relative; z-index: 1; flex: 0 0 64px; margin-left: auto; --f7-fab-size: 64px; }
.budget-tabs .budget-add > #fab { min-width: 64px; height: 64px; padding: 0; }
#fab svg { position: relative; z-index: 1; }
.budget-tabs.showing-profile .tab-link-highlight { opacity: 0; }
.budget-tabs .tab-link-highlight { transition-property: transform, opacity; }

.budget-tabs a { gap: 3px; }
.screen-title { font-size: 34px; line-height: 1.2; letter-spacing: -.03em; font-weight: 700; margin: 12px 0 24px; }
.banner { margin: 12px 0 20px; padding: 0 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.banner.warn { color: var(--warn); }
#updateBanner { margin: 12px 0; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted, .small, .hint, .label { color: var(--muted); }
.small { font-size: 13px; line-height: 1.5; }
.cur-toggle { flex: 0 0 96px; }
.cur-toggle button, #categoryView button { min-width: 0; min-height: var(--f7-button-height); }
.budget-tab > .list { margin: 20px 0 28px; }
.summary-totals .item-after { color: var(--f7-text-color); font-weight: 500; }
.summary-totals .item-after.neg { color: var(--warn); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 4px 0; }
.section-heading h2 { font-size: 20px; font-weight: 600; margin: 0; }
.section-heading .link { flex: 0 0 auto; width: auto; color: var(--f7-theme-color); font-size: 17px; }
.section-heading + .list { margin-top: 8px; }
.category-list .cat { display: block; padding-top: 16px; padding-bottom: 16px; }
.category-heading { gap: 8px; }
.category-heading h2 { min-width: 0; }
#categoryView { flex: 0 0 128px; }
#categoryContent > .list, #categoryContent > .card { margin: 8px 0 28px; }
.category-list .progressbar { margin-top: 10px; --f7-progressbar-height: 4px; --f7-progressbar-bg-color: var(--f7-segmented-strong-bg-color); }
#budgetChart .area-chart-tooltip-total:empty { display: none; }
.cat-row, .lines .line { display: flex; justify-content: space-between; gap: 12px; }
.cat-row { font-size: 15px; }
.cat-row .name { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.cat-row > .num { flex-shrink: 0; }
.neg { color: var(--warn); }
.lines .line { padding: 12px 0; border-bottom: .5px solid var(--line); }
.lines .line.total { font-weight: 600; border: 0; }
.summary-breakdown .item-title { white-space: normal; }
.summary-breakdown .item-after { color: var(--f7-text-color); }
.summary-breakdown .total .item-title, .summary-breakdown .total .item-after { font-weight: 600; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.row-btns > .button { flex: 1; }
.button-large { --f7-button-border-radius: 12px; }
#planList { margin: 0; }
.plan-item.item-inner { display: grid; grid-template-columns: minmax(0,1fr) 80px 16px; gap: 6px; align-items: center; padding-top: 4px; padding-bottom: 4px; }
.plan-item .name { min-width: 0; overflow-wrap: anywhere; font-size: 17px; }
.plan-item input { width: 100%; min-width: 0; box-sizing: border-box; padding: 4px 0; color: var(--f7-theme-color); border: 0; background: transparent; text-align: right; font-size: 17px; }
.plan-item.saving { opacity: .5; }
.plan-item .cur { color: var(--muted); font-size: 15px; }
.plan-group > .lines { padding: 0 16px; font-size: 15px; }
.plan-group > .row-btns { background: var(--f7-list-strong-bg-color); border-radius: 16px; }
.day { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 16px 10px; color: var(--muted); font-size: 13px; }
.day time { min-width: 0; overflow-wrap: anywhere; }
.day-total { flex-shrink: 0; white-space: nowrap; font-weight: 500; }
.month-total { display: flex; justify-content: space-between; gap: 16px; padding: 16px; font-size: 15px; }
.op { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; background: var(--f7-list-strong-bg-color); color: var(--f7-text-color); text-align: left; position: relative; }
.op::after { content: ''; position: absolute; height: .5px; bottom: 0; left: 66px; right: 0; background: var(--line); }
.day + .op { border-radius: 16px 16px 0 0; }
.op:has(+ .day), .op:last-child { border-radius: 0 0 16px 16px; }
.op:has(+ .day)::after, .op:last-child::after { display: none; }
.day + .op:has(+ .day), .day + .op:last-child { border-radius: 16px; }
.op .dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: white; background: var(--f7-theme-color); flex-shrink: 0; }
.op .mid { flex: 1; min-width: 0; }
.op .t { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op .s { font-size: 12px; color: var(--muted); margin-top: 4px; }
.op .amt { text-align: right; font-size: 15px; font-weight: 500; flex-shrink: 0; }
.op .amt small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; margin-top: 4px; }
.op.pending { opacity: .55; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.group-title { font-size: 13px; font-weight: 400; color: var(--muted); margin: 28px 16px 8px; }
#opsSearchbar .searchbar-inner { padding: 0; gap: 8px; }
#opsSearchbar .searchbar-input-wrap { min-width: 0; }
#opsSearchbar .ops-filter { position: relative; flex: 0 0 44px; height: 44px; justify-content: center; }
#opsSearchbar .ops-filter .badge { position: absolute; top: 0; right: 0; }
.ops-search-skeleton { display: flex; gap: 8px; }
.ops-category-sheet {
  --f7-sheet-bg-color: var(--f7-list-strong-bg-color);
  --f7-smart-select-sheet-bg: var(--f7-list-strong-bg-color);
  --f7-toolbar-bg-color: var(--f7-list-strong-bg-color);
}
.ops-category-sheet .toolbar { background: var(--f7-sheet-bg-color); }
.ops-category-sheet .toolbar .right { background: none; box-shadow: none; backdrop-filter: none; }
.ios .ops-category-sheet .toolbar::before { display: none; }
.ops-category-sheet .sheet-close .icon-close { display: none; }
.budget-sheet { height: auto; max-height: 94%; border-radius: 24px 24px 0 0; overflow: hidden; background: var(--f7-page-bg-color); }
.ios .budget-sheet .sheet-toolbar { position: relative; }
.budget-sheet .sheet-toolbar .toolbar-inner { padding: 0 16px; }
.budget-sheet .sheet-toolbar h2 { font-size: 17px; margin: 0; font-weight: 600; white-space: normal; line-height: 1.2; }
#sheetTitle { flex: 1; min-width: 0; }
#closeDialog, .ops-category-sheet .sheet-close { flex: 0 0 auto; width: auto; padding: 0 12px; color: var(--f7-theme-color); font-size: 17px; }
.budget-sheet .sheet-modal-inner { height: auto; max-height: calc(94dvh - 56px); }
.budget-sheet .sheet-body { padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); max-height: calc(94dvh - 56px); box-sizing: border-box; }
.sheet-body > .list, .sheet-body .form-field { margin: 0 0 20px; }
.form-field .item-content { padding-left: 16px; }
.form-field .item-inner { padding-top: 12px; padding-bottom: 12px; }
.form-field .item-label { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.form-field .item-input-wrap { width: 100%; }
.form-field p { margin: 6px 0; }
.amount-wrap { display: flex; align-items: center; gap: 16px; padding: 8px 4px; margin-bottom: 24px; }
.amount-wrap input { width: 100%; min-width: 0; font-size: 40px; font-weight: 600; color: var(--f7-text-color); border: 0; background: transparent; }
.amount-wrap .segmented { width: 104px; flex-shrink: 0; }
#opPayer { width: 100%; }
#opPayer .button, #catCur .button { min-height: var(--f7-button-height); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 768px) { .budget-sheet { max-width: 560px; left: calc(50% - 280px); } }
@media (prefers-reduced-motion: reduce) { .tabs-animated-wrap > .tabs { transition-duration: 0s !important; } *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
