:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    sans-serif;
  color: var(--ink);
  background: var(--control-bg);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid #7caefb;
  outline-offset: 2px;
}

.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  padding: 28px;
}

.stage-note {
  width: 210px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #39434e;
}

.stage-note strong {
  font-size: 42px;
  letter-spacing: -2.4px;
  font-weight: 650;
}

.stage-note > span:last-child {
  font-size: 16px;
  line-height: 1.45;
  color: #7d8792;
}

.stage-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: #172c49;
  color: var(--on-dark);
  font-size: 37px;
  line-height: 1;
}

.stage-caption {
  width: 210px;
  color: #8e98a3;
  font-size: 13px;
  line-height: 1.5;
}

.phone {
  position: relative;
  width: 393px;
  height: min(852px, calc(100vh - 40px));
  min-height: 650px;
  flex: none;
  overflow: hidden;
  background: var(--bg);
  border: 8px solid #20262e;
  border-radius: 53px;
  box-shadow:
    0 30px 90px #202d4052,
    0 3px 10px #202d4026;
}

.phone::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 30px;
  background: #20262e;
  border-radius: 18px;
  z-index: 20;
}

.app-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.status-bar {
  height: 55px;
  padding: 13px 29px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex: none;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.2px;
  z-index: 2;
}

.status-icons {
  display: flex;
  gap: 5px;
  align-items: center;
}

.status-icons svg {
  width: 17px;
  height: 17px;
}

.screen {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 0 20px 28px;
}

.screen::-webkit-scrollbar {
  display: none;
}

.nav {
  height: 53px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.2px;
}

.nav-action,
.back,
.icon-btn {
  border: 0;
  background: none;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 3px;
}

.nav-action svg,
.back svg,
.icon-btn svg {
  width: 22px;
  height: 22px;
}

.nav-side {
  min-width: 44px;
  display: flex;
  align-items: center;
}

.nav-side.end {
  justify-content: flex-end;
}

.large-title {
  font-size: 34px;
  font-weight: 730;
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin: 12px 0 21px;
}

.subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 11px;
}

.subheading h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
  margin: 0;
  font-weight: 680;
}

.balance {
  padding: 25px 24px 23px;
  background: var(--balance-bg);
  color: var(--balance-ink);
  border-radius: 23px;
  position: relative;
  overflow: hidden;
}

.balance:after {
  content: "";
  position: absolute;
  width: 195px;
  height: 195px;
  border: 1px solid #ffffff1c;
  border-radius: 50%;
  right: -47px;
  top: -71px;
  box-shadow:
    0 0 0 37px #ffffff08,
    0 0 0 75px #ffffff05;
  pointer-events: none;
}

.balance-label {
  font-size: 14px;
  color: #c2d5e8;
  font-weight: 500;
}

.balance-value {
  font-size: 37px;
  letter-spacing: -1.8px;
  line-height: 1.18;
  font-weight: 700;
  margin: 9px 0 23px;
  font-variant-numeric: tabular-nums;
}

.balance-row {
  display: flex;
  gap: 26px;
}

.balance-mini {
  display: flex;
  align-items: center;
  gap: 9px;
}

.balance-mini .mini-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #ffffff20;
}

.balance-mini svg {
  width: 17px;
  height: 17px;
}

.balance-mini small {
  display: block;
  font-size: 12px;
  color: #bed1e3;
  margin-bottom: 2px;
}

.balance-mini strong {
  font-size: 15px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin: 21px -5px 2px;
}

.quick-action {
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #29313b;
  font-size: 12px;
  font-weight: 540;
  min-height: 77px;
}

.quick-action span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-card);
}

.quick-action.primary span {
  background: var(--accent-soft);
  color: var(--accent);
}

.quick-action svg {
  width: 23px;
  height: 23px;
}

.chevron {
  width: 16px;
  height: 16px;
  color: #b0b7bf;
  flex: none;
}

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

.section-foot {
  font-size: 12px;
  color: var(--muted);
  padding: 9px 14px 0;
  line-height: 1.4;
}

.tabbar {
  flex: none;
  height: 82px;
  padding: 9px 8px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  background: #f8f9fbea;
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px);
  z-index: 5;
}

.tab {
  border: 0;
  background: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 2px 0;
  font-size: 10px;
  font-weight: 560;
  min-height: 53px;
}

.tab.active {
  color: var(--accent);
}

.tab svg {
  width: 24px;
  height: 24px;
}

.pillbar {
  display: flex;
  background: var(--control-bg);
  border-radius: var(--radius-control);
  padding: 3px;
  gap: 2px;
}

.pillbar button {
  flex: 1;
  min-height: 31px;
  border: 0;
  background: none;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 570;
  white-space: nowrap;
}

.pillbar button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px #1c30421b;
}

.account-group-title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 620;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin: 24px 4px 8px;
}

.account-group-title:first-of-type {
  margin-top: 13px;
}

.account-row .row-icon {
  width: 39px;
  height: 39px;
}

.account-row:after {
  left: 67px !important;
}

.inline-summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 3px 13px;
  font-size: 13px;
  color: var(--muted);
}

.inline-summary strong {
  font-weight: 620;
  color: #4a5562;
}

.hero-small {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  margin: 15px 0 21px;
}

.hero-small .eyebrow {
  font-size: 13px;
  color: var(--muted);
}

.hero-small .value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-top: 7px;
  font-variant-numeric: tabular-nums;
}

.progress {
  height: 6px;
  background: #e8edf2;
  border-radius: 9px;
  margin-top: 15px;
  overflow: hidden;
}

.progress > i {
  display: block;
  height: 100%;
  background: #5d88b7;
  border-radius: 9px;
}

.searchbox {
  height: 39px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--control-bg);
  border-radius: var(--radius-control);
  padding: 0 12px;
  color: var(--muted);
  margin: 0 0 13px;
}

.searchbox svg {
  width: 18px;
  height: 18px;
}

.searchbox input {
  border: 0;
  background: none;
  outline: none;
  min-width: 0;
  flex: 1;
  color: var(--ink);
  font-size: 15px;
}

.searchbox input::placeholder {
  color: var(--muted);
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow: auto;
  scrollbar-width: none;
  margin: 0 -20px 10px;
  padding: 0 20px;
}

.filter-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: #596672;
  min-height: 33px;
  padding: 0 13px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
}

.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.date-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 620;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 24px 4px 8px;
}

.date-label:first-child {
  margin-top: 13px;
}

.chart-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 19px 17px 17px;
  margin-top: 17px;
}

.chart-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.chart-top strong {
  font-size: 26px;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
}

.chart-top span {
  font-size: 12px;
  color: var(--muted);
}

.bars {
  display: flex;
  align-items: end;
  gap: 11px;
  height: 135px;
  margin: 20px 2px 8px;
}

.bar-item {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: 7px;
}

.bar-track {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: end;
}

.bar-fill {
  width: 100%;
  background: #bfd3e7;
  border-radius: 5px 5px 2px 2px;
  min-height: 5px;
}

.bar-item.current .bar-fill {
  background: #366d9c;
}

.bar-item span {
  font-size: 11px;
  color: var(--muted);
}

.category-bar {
  height: 6px;
  border-radius: 8px;
  background: #ebeff3;
  margin-top: 10px;
  overflow: hidden;
}

.category-bar i {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: #7298bc;
}

.category-row .row-main {
  padding-right: 2px;
}

.category-row .row-detail {
  margin-top: 5px;
}

.category-row .row-trailing {
  align-self: center;
}

.settings-group {
  margin-top: 14px;
}

.settings-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 25px 4px 8px;
}

.settings-row {
  min-height: 55px;
}

.settings-row .row-icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
}

.toggle {
  width: 51px;
  height: 31px;
  border-radius: 18px;
  background: #d1d8df;
  border: 0;
  padding: 2px;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

.toggle.on {
  background: #3478b5;
}

.toggle i {
  display: block;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--on-dark);
  box-shadow: 0 1px 3px #0003;
  transition: transform 0.2s;
}

.toggle.on i {
  transform: translateX(20px);
}

.detail-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 22px;
  margin-top: 15px;
}

.detail-card .row-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  margin-bottom: 16px;
}

.detail-card h2 {
  font-size: 26px;
  margin: 0 0 5px;
  letter-spacing: -0.7px;
}

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

.detail-balance {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1.1px;
  margin-top: 24px;
  font-variant-numeric: tabular-nums;
}

.detail-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.info-list {
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-top: 16px;
}

.info-line {
  min-height: 49px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.info-line:not(:last-child) {
  border-bottom: 1px solid var(--line);
}

.info-line span {
  color: var(--muted);
}

.info-line strong {
  font-weight: 570;
  text-align: right;
}

.empty {
  padding: 27px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.screen-bottom {
  height: 20px;
}

.overlay {
  position: absolute;
  inset: 0;
  background: #19283a58;
  z-index: 10;
  display: flex;
  align-items: flex-end;
}

.field-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--muted);
  margin: 22px 4px 8px;
}

.picker-list .row {
  min-height: 57px;
}

.picker-list .row.selected .row-title {
  color: var(--accent);
}











.receipt-head {
  background: var(--surface);
  border-radius: 18px;
  padding: 18px 18px 17px;
  margin: 10px 0 15px;
}

.receipt-store {
  font-size: 21px;
  font-weight: 680;
}

.receipt-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}

.receipt-total {
  font-size: 28px;
  font-weight: 700;
  margin-top: 17px;
  letter-spacing: -0.7px;
}

.receipt-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 3px 10px;
  gap: 12px;
}

.receipt-tools strong {
  font-size: 15px;
}

.receipt-tools button {
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 570;
}

.receipt-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 67px;
  padding: 10px 14px;
  border: 0;
  background: var(--surface);
  text-align: left;
  position: relative;
}

.receipt-item:not(:last-child):after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50px;
  right: 0;
  height: 1px;
  background: var(--line);
}

.receipt-check {
  width: 23px;
  height: 23px;
  border: 1.5px solid #c7d0d8;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--on-accent);
}

.receipt-item.selected .receipt-check {
  background: var(--accent);
  border-color: var(--accent);
}

.receipt-check svg {
  width: 15px;
  height: 15px;
}

.receipt-item .row-main {
  flex: 1;
}

.receipt-item .row-title {
  font-size: 14px;
}

.receipt-item .row-detail {
  font-size: 12px;
}

.receipt-item .row-amount {
  font-size: 14px;
}

.receipt-bottom {
  position: sticky;
  bottom: -28px;
  background: linear-gradient(#f7f8fa00, var(--bg) 15%);
  padding: 18px 0 28px;
  margin-top: 8px;
}

.receipt-bottom .primary-button {
  margin-top: 9px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: #436c90;
  font-size: 11px;
  font-weight: 570;
}

.toast {
  position: absolute;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%);
  background: #25313d;
  color: var(--on-dark);
  padding: 10px 15px;
  border-radius: var(--radius-control);
  font-size: 13px;
  white-space: nowrap;
  z-index: 30;
  box-shadow: 0 6px 20px #182a3d35;
}

@media (max-width: 750px) {
  .stage {
    display: block;
    padding: 0;
    min-height: 100dvh;
  }

  .stage-note,
  .stage-caption {
    display: none;
  }

  .phone {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .phone::before {
    display: none;
  }

  .status-bar {
    height: 52px;
    padding-top: 12px;
  }
}
@media (max-height: 740px) and (min-width: 751px) {
  .stage {
    padding: 8px;
  }

  .phone {
    height: calc(100vh - 16px);
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    background: #151a20;
    color: var(--ink);
  }

  .stage-note {
    color: #e7edf3;
  }

  .phone {
    background: var(--bg);
  }

  .app-shell,
  .screen {
    background: var(--bg);
  }

  .chart-card,
  .hero-small,
  .detail-card,
  .info-list,
  .receipt-head,
  .receipt-item {
    background: var(--surface);
    color: var(--ink);
  }

  .tabbar {
    background: #19222bee;
    border-color: #35404b;
  }

  .pillbar,
  .searchbox {
    background: var(--control-bg);
  }

  .pillbar button.active {
    background: var(--selected-bg);
    color: var(--ink);
  }

  .balance {
    background: var(--balance-bg);
  }

  .receipt-item:not(:last-child):after,
  .info-line:not(:last-child) {
    border-color: var(--line);
    background-color: var(--line);
  }

  .filter-chip {
    background: var(--surface);
    border-color: var(--line);
    color: #dbe4ec;
  }

  .searchbox input {
    color: var(--ink);
  }

  .toggle {
    background: #45515d;
  }

  .receipt-bottom {
    background: linear-gradient(#11171e00, var(--bg) 15%);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
@media (prefers-color-scheme: dark) {
  .quick-action {
    color: #dce5ed;
  }

  .quick-action span,
  .quick-action.primary span {
    background: var(--accent-soft);
    color: #9dc9ec;
  }

  .nav-action,
  .back,
  .icon-btn {
    color: var(--accent);
  }

  .receipt-item .row-amount {
    color: var(--ink);
  }
}
@media (prefers-color-scheme: dark) {
  .info-line:not(:last-child) {
    background: var(--surface);
  }

  .receipt-bottom .secondary-button {
    background: var(--surface);
    color: var(--accent);
  }
}
