:root {
  color-scheme: dark;
  --bg: #050607;
  --surface: #121417;
  --surface-2: #1a1d22;
  --text: #f8f8fa;
  --muted: #989ba8;
  --muted-2: #696d78;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.08);
  --coral: #ffb6aa;
  --coral-strong: #ff8f8f;
  --peach: #ffd0c7;
  --green: #7ff0ad;
  --blue: #8bc4ff;
  --purple: #d6a4ff;
  --red: #ff9a94;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; letter-spacing: 0; }
html { background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }

.app {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px calc(116px + env(safe-area-inset-bottom));
}

.screen { display: grid; gap: 26px; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}

.month-trigger,
.more-button,
.text-button,
.sheet-close,
.icon-button { border: 0; cursor: pointer; }

.month-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: 0;
}

.month-trigger svg { width: 19px; height: 19px; color: #dfe0e5; }

.more-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(34, 36, 42, 0.74);
  color: #f3f3f5;
  box-shadow: 0 9px 28px rgba(0, 0, 0, 0.28);
}

.more-button svg { width: 21px; height: 21px; }

.balance-card,
.view-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

.balance-card {
  padding: 16px 22px 14px;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 1% 52%, rgba(255, 126, 108, 0.75), transparent 32%),
    radial-gradient(ellipse at 100% 6%, rgba(101, 176, 255, 0.86), transparent 38%),
    radial-gradient(ellipse at 100% 100%, rgba(255, 135, 121, 0.72), transparent 40%),
    linear-gradient(135deg, #181922 10%, #0d1015 58%, #202537 100%);
}

.balance-card::before,
.view-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.1), transparent 28%, transparent 75%, rgba(255, 255, 255, 0.08));
  pointer-events: none;
}

.balance-label,
.view-hero span,
.balance-split span,
.summary-row > span:not(.summary-icon),
.saving-uah,
.goal-stat-line span,
.goal-amounts > div > span,
.section-subtitle { color: #b7b8c5; }

.balance-label {
  position: relative;
  z-index: 1;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
  margin: 0;
}

.balance-value,
.view-hero strong {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: #fff;
  font-size: 52px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.98;
  white-space: nowrap;
}

.balance-uah,
.view-hero small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 9px;
  color: #c0c4d1;
  font-size: 1.56rem;
  font-weight: 500;
  letter-spacing: 0;
}

.balance-value { margin-top: 4px; }
.balance-uah { margin-top: 3px; font-size: 18px; line-height: 1.2; }

.balance-divider {
  position: relative;
  z-index: 1;
  height: 1px;
  margin: 10px 0 8px;
  background: rgba(255, 255, 255, 0.14);
}

.balance-split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.balance-split > div { display: grid; gap: 1px; min-width: 0; }
.balance-split > div + div { padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.balance-split > div > span { font-size: 12px; line-height: 1.2; }
.balance-split strong { font-size: 18px; line-height: 1.2; letter-spacing: 0; }
.balance-split .money-dual { color: inherit; gap: 2px; }
.balance-split .money-dual small { font-size: 11px; line-height: 1.2; font-weight: 450; }

.positive { color: var(--green); }
.negative { color: var(--red); }
.blue { color: var(--blue); }
.purple { color: var(--purple); }

.content-section,
.savings-preview { min-width: 0; }

.section-title {
  margin: 0;
  color: var(--text);
  font-size: 1.37rem;
  font-weight: 750;
  letter-spacing: 0;
}

.summary-list { display: grid; margin-top: 10px; }

.summary-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 57px;
  border-bottom: 1px solid var(--line-soft);
}

.summary-row > span:not(.summary-icon) { color: #f2f2f4; font-size: 1.06rem; }
.summary-row strong { min-width: 0; font-size: 1.02rem; text-align: right; }
.summary-row .money-dual { color: inherit; }
.summary-row .money-dual small { font-size: 11px; font-weight: 450; }
button.summary-row { width: 100%; grid-template-columns: 42px minmax(0, 1fr) minmax(0, 44%); padding: 8px 0; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; text-align: left; cursor: pointer; }

.summary-icon,
.transaction-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-2);
  color: #e9ebf0;
}

.summary-icon svg,
.transaction-icon svg { width: 22px; height: 22px; }
.income-icon { color: var(--green); background: rgba(31, 130, 77, 0.28); }
.expense-icon { color: var(--coral); background: rgba(143, 55, 62, 0.3); }
.saving-icon { color: #d9dce4; background: linear-gradient(145deg, #31343b, #15171c); }

.section-link-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-chevron { width: 21px; height: 21px; color: #e2e3e8; }

.saving-total { margin-top: 8px; font-size: 2.06rem; font-weight: 800; letter-spacing: 0; }
.saving-uah { margin-top: 1px; font-size: 1rem; }

.goal-progress,
.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(113, 120, 137, 0.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.goal-progress { margin-top: 12px; }
.goal-progress i,
.progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #398ed6, #a8d9ff); box-shadow: 0 0 18px rgba(107, 185, 255, 0.45); }

.recent-section { padding-bottom: 2px; }
.text-button { padding: 0; background: transparent; color: var(--blue); font-size: 1rem; cursor: pointer; }

.transaction-list { display: grid; gap: 0; margin-top: 10px; }

.transaction-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: start;
  gap: 13px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.transaction-icon { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, #30333a, #17191e); }
.expense-row .transaction-icon { color: #f4f4f6; }
.income-row .transaction-icon { color: var(--green); background: rgba(34, 104, 70, 0.34); }
.saving-row .transaction-icon { color: var(--blue); }
.transaction-info { min-width: 0; padding-top: 2px; }
.transaction-info h3 { margin: 0; overflow: hidden; color: #f3f3f6; font-size: 1.08rem; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.transaction-info > span { display: block; margin-top: 3px; overflow: hidden; color: #a2a5b1; font-size: 0.92rem; text-overflow: ellipsis; white-space: nowrap; }
.transaction-info p { margin: 6px 0 0; color: var(--muted-2); font-size: 0.83rem; overflow-wrap: anywhere; }
.transaction-amount { min-width: 0; display: grid; justify-items: end; font-size: 1.04rem; font-weight: 700; text-align: right; white-space: nowrap; }
.transaction-amount .money-dual { gap: 2px; }
.transaction-amount .money-dual small { font-size: 0.78rem; font-weight: 500; }
.editable-row { width: 100%; grid-template-columns: 46px minmax(0, 1fr) minmax(0, 42%); align-items: center; min-height: 80px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.editable-row .transaction-info { padding: 0; }
.transaction-info .transaction-title { margin: 0; color: var(--text); font-size: 16px; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.transaction-info .transaction-meta { font-size: 12px; }
.editable-row .transaction-amount { display: block; width: 100%; font-size: 17px; font-weight: 650; }
.editable-row .transaction-amount .money-dual small { font-size: 12px; font-weight: 400; }
.editable-row:hover { background: rgba(255, 255, 255, 0.025); }
.income-row .transaction-icon { background: linear-gradient(135deg, #28483e, #182823); border-color: #44645a; color: #c5fae3; }

.money-dual { display: grid; min-width: 0; gap: 4px; }
.money-dual b { font: inherit; color: inherit; }
.money-dual small { color: var(--muted); font-size: 0.58em; font-weight: 600; }

.add-record-pill,
.outline-button,
.button,
.new-goal,
.goal-deposit { border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 700; }

.add-record-pill { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: -10px; background: linear-gradient(180deg, #34363d, #24262c); color: #f5f5f7; font-size: 1rem; box-shadow: 0 13px 26px rgba(0, 0, 0, 0.22); }
.add-record-pill svg { width: 21px; height: 21px; }

.view-hero { min-height: 174px; display: grid; align-content: center; padding: 25px 24px 28px; border-radius: 0 0 55px 55px; background: radial-gradient(ellipse at 94% 60%, rgba(255, 139, 108, 0.76), transparent 35%), radial-gradient(ellipse at 40% 126%, rgba(255, 135, 126, 0.56), transparent 40%), linear-gradient(145deg, #17171d, #171116 64%, #382021); }
.income-hero { background: radial-gradient(ellipse at 94% 2%, rgba(100, 190, 255, 0.72), transparent 35%), radial-gradient(ellipse at 0% 100%, rgba(80, 244, 170, 0.48), transparent 40%), linear-gradient(145deg, #17191d, #10201d 72%, #1f2630); }
.saving-hero { background: radial-gradient(ellipse at 100% 0%, rgba(176, 145, 255, 0.75), transparent 38%), radial-gradient(ellipse at 0% 100%, rgba(75, 168, 255, 0.4), transparent 42%), linear-gradient(145deg, #19171e, #111116 72%, #1f1b2d); }
.view-hero span { position: relative; z-index: 1; font-size: 1.05rem; color: #f0d4d4; }
.view-hero strong { position: relative; z-index: 1; margin-top: 10px; font-size: 52px; color: var(--coral); }
.income-hero strong { color: var(--green); }
.saving-hero strong { color: var(--blue); }
.view-hero small { position: relative; z-index: 1; margin-top: 4px; font-size: 1.38rem; }

.list-screen-section { min-width: 0; }
.section-subtitle { display: block; margin-top: 5px; font-size: 0.85rem; }
.outline-button { min-height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 0 15px; background: var(--surface-2); color: #f5f5f7; white-space: nowrap; }
.outline-button svg { width: 17px; height: 17px; }

.filter-scroll { display: flex; gap: 9px; padding: 16px 0 9px; overflow-x: auto; scrollbar-width: none; }
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-chip { min-height: 44px; flex: 0 0 auto; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(25, 27, 32, 0.9); color: #b8bbc6; cursor: pointer; font-size: 14px; }
.filter-chip.active { border-color: transparent; background: linear-gradient(145deg, #ffd2c7, #ff9c9d); color: #1d1516; font-weight: 750; }

.floating-add { position: fixed; right: max(22px, calc(50% - 195px)); bottom: 100px; z-index: 8; width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid rgba(255, 177, 167, 0.5); border-radius: 24px; background: linear-gradient(145deg, rgba(255, 153, 149, 0.24), rgba(112, 42, 53, 0.32)); color: var(--coral); cursor: pointer; box-shadow: 0 20px 42px rgba(0, 0, 0, 0.35); }
.floating-add svg { width: 32px; height: 32px; }

.icon-button { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); color: var(--coral); }
.icon-button img { width: 22px; height: 22px; }
.empty { padding: 24px 0; color: var(--muted); text-align: center; }

.bottom-nav { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 10; width: min(calc(100% - 32px), 400px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 6px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 36px; background: rgba(28, 30, 35, 0.82); box-shadow: 0 15px 42px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.06); backdrop-filter: blur(24px); transform: translateX(-50%); }
.nav-indicator { display: none; }
.bottom-nav button { min-width: 0; min-height: 65px; display: grid; place-items: center; gap: 4px; padding: 7px 2px; border: 1px solid transparent; border-radius: 25px; background: transparent; color: #a6a9b4; cursor: pointer; font-size: 0.69rem; font-weight: 600; }
.bottom-nav button > svg { width: 21px; height: 21px; stroke-width: 1.8; }
.bottom-nav button > span { display: block; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottom-nav button.active { border-color: rgba(255, 174, 163, 0.52); background: radial-gradient(circle at 50% 20%, rgba(255, 188, 174, 0.4), rgba(255, 133, 139, 0.1) 72%); color: var(--peach); box-shadow: 0 0 24px rgba(255, 137, 138, 0.14); }

dialog { width: 100%; max-width: 430px; height: 100%; max-height: 100%; margin: 0 auto; padding: 0; border: 0; background: transparent; }
dialog[open] { display: flex; align-items: flex-end; }
dialog::backdrop { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(7px); }
.sheet { position: relative; width: 100%; max-height: min(92vh, 900px); max-height: min(calc(var(--visible-height, 100dvh) - 16px), 900px); display: flex; flex-direction: column; gap: 15px; overflow: auto; overscroll-behavior: contain; padding: 14px 22px calc(24px + env(safe-area-inset-bottom)); border: 1px solid rgba(255, 255, 255, 0.16); border-bottom: 0; border-radius: 30px 30px 0 0; background: radial-gradient(circle at 90% 0%, rgba(85, 89, 104, 0.18), transparent 34%), linear-gradient(180deg, #202328, #121417 38%, #0c0e10); box-shadow: 0 -22px 60px rgba(0, 0, 0, 0.45); }
.sheet > * { flex-shrink: 0; min-width: 0; }
.sheet-handle { width: 64px; height: 6px; margin: 0 auto 12px; border-radius: 999px; background: #6f727c; }
.sheet-close { position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(63, 65, 72, 0.75); color: #f4f4f7; }
.sheet-close svg { width: 21px; height: 21px; }
.sheet h2 { margin: 3px 52px 0 0; font-size: 1.65rem; letter-spacing: 0; overflow-wrap: anywhere; }
.form-goal-name { margin: -8px 0 2px; color: var(--muted); font-size: 1.05rem; }
.field { display: grid; min-width: 0; gap: 7px; }
.field label { color: #aeb1bc; font-size: 0.84rem; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 54px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; outline: none; background: #090b0d; color: var(--text); padding: 0 15px; font-size: 16px; }
.field textarea { min-height: 88px; padding-top: 13px; resize: vertical; }
.field input[name="amount"] { min-height: 76px; padding-right: 15px; font-size: 3.1rem; font-weight: 700; letter-spacing: 0; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(255, 177, 167, 0.72); box-shadow: 0 0 0 3px rgba(255, 158, 153, 0.12); }
.option-picker { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 8px; }
.option-picker select { min-width: 0; text-overflow: ellipsis; }
.option-picker .icon-button { width: 54px; height: 54px; border-radius: 14px; }
.new-option { display: grid; gap: 10px; margin-top: 4px; padding-top: 13px; border-top: 1px solid var(--line-soft); }
.new-option[hidden] { display: none; }
.option-actions, .form-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.button { min-height: 49px; padding: 0 17px; background: linear-gradient(180deg, #292c31, #1b1d21); color: var(--text); }
.button.primary { border-color: transparent; background: linear-gradient(145deg, #ffd0c7, #ff9f9e); color: #211516; }
.button.danger { border-color: rgba(255, 133, 133, 0.46); background: rgba(124, 44, 51, 0.28); color: #ffc6c0; }
.button:disabled { opacity: 0.44; cursor: default; }

.toast { position: fixed; left: 50%; bottom: 103px; z-index: 20; max-width: calc(100% - 28px); padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; background: #24272d; color: var(--text); font-weight: 700; opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(18px); transition: 0.2s ease; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%); }

@media (min-width: 700px) {
  .app { padding-left: 24px; padding-right: 24px; }
  .bottom-nav { bottom: 20px; }
  .floating-add { right: max(34px, calc(50% - 195px)); }
}

@media (max-width: 380px) {
  .app { padding-left: 14px; padding-right: 14px; }
  .balance-card { padding-left: 20px; padding-right: 20px; }
  .balance-value { font-size: 2.82rem; }
  .balance-split > div + div { padding-left: 16px; }
  .balance-split strong { font-size: 1.08rem; }
  .bottom-nav { width: calc(100% - 20px); }
  .bottom-nav button { font-size: 0.62rem; }
  .transaction-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 9px; }
  .editable-row { grid-template-columns: 40px minmax(0, 1fr) minmax(0, 43%); }
  .transaction-icon { width: 40px; height: 40px; }
  .transaction-amount { font-size: 0.92rem; }
  .transaction-amount .money-dual small { font-size: 0.68rem; }
}

/* Mobile account screens share the same glass surfaces and compact ledger rows. */
[data-fit] { display: block; min-width: 0; white-space: nowrap; }
.page-title { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 750; }
body[data-view="income"] { --green: #b7f7dc; }
body[data-view="income"] .month-trigger { min-height: 42px; padding: 0 15px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(#151718, #0d0f10); font-size: 16px; }
body[data-view="income"] .screen, body[data-view="expenses"] .screen { gap: 22px; }
body[data-view="savings"] .screen, body[data-view="goals"] .screen { gap: 20px; }
.money-overview { --overview-amount: #b9f8dd; --overview-glow: #68ad93; --overview-shadow: #375f52; --overview-tint: rgba(91, 160, 135, 0.12); position: relative; isolation: isolate; min-width: 0; margin: 0 -18px; padding: 12px 18px 46px; overflow: hidden; }
.money-overview::after { content: ""; position: absolute; z-index: -1; left: -12%; right: -12%; bottom: 24px; height: 100%; border-radius: 0 0 50% 35%; transform: rotate(-6deg); box-shadow: 0 8px 22px -8px var(--overview-glow), 0 17px 35px -10px var(--overview-shadow); background: linear-gradient(0deg, var(--overview-tint), transparent 30%); }
.money-overview h1 { margin: 0 0 6px; font-size: 18px; font-weight: 450; color: #b8b9c3; }
.money-overview > strong { font-size: 52px; font-weight: 750; line-height: 1.15; color: var(--overview-amount); }
.money-overview > span { margin-top: 5px; font-size: 28px; line-height: 1.3; color: #aaaab6; }
.expense-overview { --overview-amount: var(--coral); --overview-glow: #b5746c; --overview-shadow: #693c3b; --overview-tint: rgba(198, 110, 98, 0.12); }
.income-content .filter-scroll { padding-top: 14px; }
.income-content .filter-chip { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.income-content .filter-chip.active { background: linear-gradient(140deg, #d2ffe9, #aff3d4); color: #0c2119; }
.income-content .transaction-list { margin-top: 6px; padding-bottom: 74px; }
.income-add { bottom: calc(110px + env(safe-area-inset-bottom)); width: 62px; height: 62px; border-radius: 50%; border-color: #a1dac5; color: #e0fff2; background: linear-gradient(135deg, #487f70, #1b3430 60%, #426b62); box-shadow: inset 0 0 14px #77baa0, 0 8px 30px #0007; }

.savings-overview, .reserve-card { border: 1px solid #405b72; background: radial-gradient(ellipse 78% 22% at 50% 0%, #5c9de1 0%, #284564 35%, transparent 100%), linear-gradient(140deg, #14212c, #101417 55%, #162331); box-shadow: inset 0 1px 1px #96c5f855; }
.savings-overview { min-width: 0; padding: 23px 22px 18px; border-radius: 28px; }
.savings-overview > h2 { margin: 0 0 8px; font-size: 17px; font-weight: 500; }
.savings-balance { display: block; font-size: 46px; line-height: 1.13; font-weight: 750; }
.savings-balance .money-dual { gap: 5px; }
.savings-balance small { font-size: 25px; font-weight: 400; color: #b9b8c8; }
.savings-month { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 45%); gap: 12px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid #ffffff25; }
.savings-month > button { display: grid; gap: 4px; min-height: 44px; padding: 0; border: 0; background: none; color: #d5d6e1; text-align: left; font-size: 14px; cursor: pointer; }
.savings-month > button span { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #a4aaba; }
.savings-month svg { width: 13px; height: 13px; }
.savings-month > strong { min-width: 0; font-size: 18px; text-align: right; }
.savings-month small { font-size: 11px; font-weight: 400; }
.reserve-list { display: grid; gap: 14px; margin-top: 12px; }
.reserve-card { position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 17px; min-width: 0; overflow: hidden; padding: 20px 18px 22px; border-radius: 26px; background: radial-gradient(ellipse 95% 28% at 50% 0%, #417eb6, transparent 100%), radial-gradient(ellipse 45% 100% at 105% 100%, #6aa6e3, transparent 100%), linear-gradient(120deg, #162531, #10161c 65%); }
.reserve-card::after { content: ""; position: absolute; bottom: 10px; left: 0; right: 0; height: 2px; background: #74b9ff; box-shadow: 0 0 10px #61b0ff70; }
.reserve-icon { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid #6ca0ce88; border-radius: 16px; background: linear-gradient(140deg, #2d5679, #1c2c39); color: #a5d4ff; }
.reserve-icon svg { width: 29px; height: 29px; stroke-width: 1.7; }
.reserve-info { min-width: 0; }
.reserve-info > strong { display: block; font-size: 29px; line-height: 1.15; }
.reserve-info .money-dual { gap: 3px; }
.reserve-info .money-dual small { font-size: 12px; font-weight: 400; }
.reserve-account { display: block; margin-top: 4px; color: #b7b9c7; font-size: 13px; overflow-wrap: anywhere; }
.savings-add { margin-top: 0; }

.goal-list { display: grid; gap: 18px; min-width: 0; }
.goal-card { --goal-glow: #e9a082; --goal-rgb: 233, 160, 130; min-width: 0; padding: 15px 22px 18px; border: 1px solid rgba(var(--goal-rgb), .65); border-radius: 28px; background: radial-gradient(ellipse 90% 19% at 48% 0%, rgba(var(--goal-rgb), .82), rgba(var(--goal-rgb), .2) 65%, transparent), radial-gradient(ellipse 55% 35% at 100% 105%, rgba(var(--goal-rgb), .22), transparent), linear-gradient(135deg, rgba(var(--goal-rgb), .17), #121316 64%); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5); }
.goal-violet { --goal-glow: #afa1ff; --goal-rgb: 152, 143, 255; }
.goal-sky { --goal-glow: #99ceff; --goal-rgb: 111, 181, 245; }
.goal-card-top { display: flex; justify-content: space-between; align-items: center; }
.goal-symbol { width: 34px; height: 34px; color: var(--goal-glow); stroke-width: 1.7; }
.goal-menu { width: 44px; height: 44px; display: grid; place-items: center; margin-right: -10px; border: 0; border-radius: 50%; background: transparent; color: var(--goal-glow); cursor: pointer; }
.goal-menu:hover { background: #ffffff12; }
.goal-menu svg { width: 23px; height: 23px; }
.goal-card h2 { margin: 0 0 6px; font-size: 18px; font-weight: 650; overflow-wrap: anywhere; }
.goal-collected { display: block; font-size: 36px; line-height: 1.1; font-weight: 750; }
.goal-collected .money-dual { gap: 4px; }
.goal-collected .money-dual small { font-size: 13px; font-weight: 400; color: #b6b4c4; }
.goal-target { display: grid; min-width: 0; gap: 3px; margin-top: 6px; color: #bfbdcc; font-size: 18px; }
.goal-target small { font-size: 11px; color: #9997a9; }
.goal-progress-row { display: grid; grid-template-columns: minmax(0, 1fr) 43px; gap: 13px; align-items: center; margin-top: 14px; }
.goal-progress-row > strong { font-size: 16px; font-weight: 550; text-align: right; }
.goal-progress-row .progress { height: 9px; background: #ffffff13; }
.goal-progress-row .progress i { background: linear-gradient(0deg, var(--goal-glow), color-mix(in srgb, var(--goal-glow), white 26%)); box-shadow: none; }
.goal-remaining { display: grid; gap: 3px; margin-top: 12px; font-size: 14px; color: #c0bdce; }
.goal-remaining small { font-size: 11px; color: #9997a9; }
.new-goal { margin-top: 2px; }

.bottom-nav { grid-template-columns: 1fr .95fr .95fr 1.3fr .8fr; gap: 0; background: linear-gradient(130deg, rgba(35, 37, 40, .88), rgba(15, 17, 20, .94)); }
.bottom-nav button { font-size: 10px; font-weight: 450; gap: 4px; }
.bottom-nav button > svg { width: 24px; height: 24px; }
.bottom-nav button[data-view="income"].active { color: #cbffeb; background: linear-gradient(145deg, #2b403b, #16201e); border-color: #5e88722b; box-shadow: none; }
.bottom-nav button[data-view="savings"].active, .bottom-nav button[data-view="goals"].active { color: #a7d1ff; background: linear-gradient(145deg, #2a303b, #161b23); border-color: #798da122; box-shadow: none; }

.record-detail-amount { display: block; min-width: 0; font-size: 36px; }
.record-detail-amount small { font-size: 19px; }
.record-detail-meta, .record-note { margin: 0; color: #b4b7c5; font-size: 14px; overflow-wrap: anywhere; }
.sheet-action-list { display: grid; }
.sheet-action { display: grid; grid-template-columns: 22px minmax(0, 1fr) 18px; gap: 14px; align-items: center; min-height: 60px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line-soft); background: none; color: var(--text); text-align: left; cursor: pointer; }
.sheet-action > svg { width: 21px; height: 21px; }
.sheet-action > svg:last-child { width: 17px; color: var(--muted); }
.sheet-action.danger { color: var(--red); }
.sheet > .button { display: flex; align-items: center; justify-content: center; gap: 8px; }
.sheet > .button > svg { width: 21px; height: 21px; }
.sheet .transaction-list { margin-top: 0; }
.sheet[data-kind="income"] .button.primary { background: linear-gradient(135deg, #c4fbe3, #94dcbc); color: #10231d; }
.sheet[data-kind="saving"] .button.primary, .sheet[data-kind="contribution"] .button.primary, .sheet[data-kind="goal"] .button.primary { background: linear-gradient(135deg, #b6d9ff, #8cb7f6); color: #102038; }
:focus-visible { outline: 2px solid #bbdfff; outline-offset: 3px; }
dialog[open] { overscroll-behavior: contain; }
body:has(dialog[open]) { overflow: hidden; }
@media (max-width: 380px) {
  .money-overview { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .savings-overview { padding-left: 18px; padding-right: 18px; }
  .reserve-card { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; padding-left: 15px; padding-right: 15px; }
  .reserve-icon { width: 46px; height: 46px; }
  .goal-card { padding-left: 18px; padding-right: 18px; }
  .sheet { padding-left: 18px; padding-right: 18px; }
}

.income-section-heading { gap: 8px; }
.income-section-heading .section-title { min-width: 0; font-size: 21px; }
.uliana-tab { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px 0 14px; border: 1px solid #7bad962e; border-radius: 22px; background: #15221d; color: #b9f8dd; font-size: 14px; font-weight: 600; cursor: pointer; }
.uliana-tab svg { width: 16px; height: 16px; }
.uliana-header > div { display: flex; align-items: center; gap: 12px; }
.uliana-header .page-title { font-size: 28px; }
.uliana-overview { padding: 14px 0 22px; border-bottom: 1px solid var(--line); }
.uliana-overview h2 { margin: 0 0 8px; color: #b4b9c1; font-size: 16px; font-weight: 450; }
.uliana-overview > strong { display: block; font-size: 48px; line-height: 1.15; }
.uliana-overview small { font-size: 23px; font-weight: 450; }
.uliana-overview .money-dual { gap: 5px; }
.work-count { margin-left: 6px; color: var(--muted); font-size: 14px; font-weight: 500; }
.uliana-add { color: #b9f8dd; font-size: 14px; min-height: 44px; padding: 0 13px; }
.uliana-row .transaction-icon { background: linear-gradient(135deg, #283b35, #151e1b); color: #b9f8dd; border-color: #82b79e33; }
.uliana-row:not(button) { cursor: default; }
.uliana-row:not(button):hover { background: none; }
.uliana-empty { padding: 42px 0; }
.uliana-checkout { margin-top: 0; min-height: 48px; font-size: 15px; color: #c9ebdb; background: linear-gradient(140deg, #293b33, #17231d); border-color: #6c99842e; }
.uliana-checkout:disabled { color: #8c9992; background: #141917; opacity: .6; cursor: default; }
.uliana-unit-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; color: var(--muted); font-size: 14px; }
.uliana-unit-price { min-width: 0; text-align: right; color: var(--text); font-size: 17px; }
.uliana-unit-price small { font-size: 13px; font-weight: 450; }
.field.uliana-quantity-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 4px 0; }
.quantity-stepper { display: grid; grid-template-columns: 44px 64px 44px; align-items: center; gap: 4px; }
.quantity-stepper .icon-button { width: 44px; height: 48px; border-radius: 12px; color: #b9f8dd; }
.quantity-stepper .icon-button:disabled { opacity: .35; cursor: default; }
.quantity-stepper input { min-height: 48px; height: 48px; padding: 0 4px; text-align: center; font-size: 20px; font-weight: 650; border-radius: 12px; appearance: textfield; -moz-appearance: textfield; }
.quantity-stepper input::-webkit-inner-spin-button, .quantity-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.uliana-price-section { display: grid; min-width: 0; gap: 8px; padding: 8px 0 14px; }
.uliana-price-section > span { color: #aeb1bc; font-size: 14px; }
.uliana-price { display: block; min-width: 0; font-size: 38px; line-height: 1.15; }
.uliana-price small { font-size: 21px; font-weight: 450; }
.price-placeholder { color: var(--muted); }
.icon-button svg { width: 22px; height: 22px; }
.checkout-actions { display: grid; gap: 10px; }
.checkout-actions .button { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; }
.checkout-actions svg { width: 20px; height: 20px; }
.sheet[data-kind^="uliana-"] .button.primary { background: linear-gradient(135deg, #c4fbe3, #94dcbc); color: #10231d; }
.sheet[data-kind^="uliana-"] .form-actions { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.sheet[data-kind^="uliana-"] .form-actions .button { padding: 8px; font-size: 14px; }
.form-error { margin: 0; color: var(--red); font-size: 14px; overflow-wrap: anywhere; }
.server-gated .bottom-nav { display: none; }
.auth-screen { display: grid; gap: 22px; padding: 70px 4px 24px; }
.auth-screen h1 { margin: 0; font-size: 29px; }
.auth-screen p { color: var(--muted); line-height: 1.5; }
.auth-symbol { color: #b9f8dd; }
.auth-symbol svg { width: 36px; height: 36px; }
.auth-screen form { display: grid; gap: 18px; }
.auth-screen .button { min-height: 52px; background: #b9f8dd; color: #10231d; }
.sheet[aria-busy="true"] { opacity: .7; }
.more-button, .icon-button { flex-shrink: 0; }
.month-trigger { min-height: 44px; min-width: 0; }
.text-button { min-width: 44px; min-height: 44px; }
.plain-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: inherit; cursor: pointer; }
.plain-icon svg { width: 21px; height: 21px; }
.view-hero { min-width: 0; }
.view-hero h1 { margin: 0; font-size: 17px; font-weight: 500; color: #f0d4d4; }
.expense-content .transaction-list { padding-bottom: 76px; }
.expense-hero strong { display: block; min-width: 0; }
.floating-add { bottom: calc(110px + env(safe-area-inset-bottom)); }
.goal-card-tools { display: flex; align-items: center; gap: 4px; }
.goal-card-tools .goal-menu { margin: 0; }
.goal-card-tools .goal-menu:first-child { background: #ffffff0a; }
.load-more { min-height: 48px; width: 100%; display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 12px; border: 0; background: none; color: var(--blue); cursor: pointer; font-size: 15px; }
.load-more svg { width: 18px; height: 18px; }
.conversion-preview { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.conversion-preview > strong { display: block; min-width: 0; max-width: 100%; font-size: 21px; }
.conversion-preview small { font-size: 13px; font-weight: 450; }
.rate-info { color: var(--muted); font-size: 12px; }
.exchange-value { font-size: 28px; }
.rate-stale { margin: 0; font-size: 14px; color: var(--coral); }
.storage-error p { color: var(--muted); line-height: 1.6; }
dialog { position: fixed; top: var(--visible-top, 0px); bottom: auto; height: var(--visible-height, 100dvh); max-height: var(--visible-height, 100dvh); }
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media (max-width: 350px) {
  .income-section-heading .section-title { font-size: 19px; }
  .uliana-tab { padding-left: 11px; padding-right: 7px; }
}
.bank-sync-details { margin: 20px 0; }
.bank-sync-details > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.bank-sync-details dt { color: var(--muted, #b5b5bf); }
.bank-sync-details dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
