:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --soft: #eef7f5;
  --ink: #17202a;
  --muted: #667085;
  --line: #e7eaee;
  --primary: #16a88f;
  --primary-dark: #087968;
  --action: #ff735c;
  --blue: #5367d8;
  --yellow: #f4b740;
  --red: #df4f45;
  --shadow: 0 16px 40px rgba(22, 32, 42, .12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body, #app {
  min-height: 100%;
}

body {
  margin: 0;
  background: #edf0f3;
  color: var(--ink);
}

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

button {
  border: 0;
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.phone {
  width: 430px;
  max-width: 100%;
  height: min(920px, calc(100vh - 36px));
  min-height: 720px;
  background: var(--bg);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(23, 32, 42, .08);
}

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

.main {
  flex: 1;
  overflow: auto;
  padding: 18px 16px calc(92px + env(safe-area-inset-bottom, 0px));
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  margin-bottom: 12px;
}

.title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

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

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.hero {
  background: linear-gradient(135deg, #17352f 0%, #16a88f 68%, #8ccfbf 100%);
  color: white;
  padding: 18px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.hero:after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -82px;
  top: -80px;
  border-radius: 42px;
  background: rgba(255, 255, 255, .15);
  transform: rotate(18deg);
  pointer-events: none;
}

.copy-last-month-btn {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 8px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
}
.copy-last-month-btn:active {
  background: rgba(255, 255, 255, .32);
}
.copy-last-month-btn:disabled {
  opacity: .7;
}
.copy-last-month-hint {
  margin-top: 8px;
  font-size: 12px;
  opacity: .82;
  line-height: 1.45;
}

.hero-label {
  font-size: 12px;
  opacity: .84;
}

.hero-amount {
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.money-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  font-size: 12px;
}

.money-row b {
  display: block;
  margin-top: 4px;
  color: white;
  font-size: 15px;
}

.quick-grid, .summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.summary-grid {
  grid-template-columns: repeat(3, 1fr);
}

.quick, .summary-card, .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quick {
  min-height: 66px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.quick i, .avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-style: normal;
  font-weight: 900;
}

.summary-card {
  padding: 12px;
  min-height: 72px;
}

.summary-card.active-card {
  border-color: rgba(22, 168, 143, .55);
  background: var(--surface-soft);
}

.filter-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 9px 10px;
  border: 1px solid rgba(22, 168, 143, .35);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.filter-pill button {
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.filter-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

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

.summary-card b {
  display: block;
  margin-top: 8px;
  font-size: 15px;
}

.section {
  margin-top: 14px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 2px 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.budget {
  padding: 14px;
}

.budget-tabs {
  grid-template-columns: repeat(2, 1fr);
}

.budget-plan-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.daily-income-toggle {
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(22, 168, 143, .22);
  border-radius: 8px;
  background: #f6fffb;
  color: var(--ink);
  font-weight: 900;
}

.daily-income-options {
  display: grid;
  gap: 7px;
  margin: -2px 0 2px 26px;
  padding: 10px 12px;
  border-left: 3px solid rgba(22, 168, 143, .35);
  border-radius: 0 8px 8px 0;
  background: #f8fcfa;
}

.daily-income-options .checkline {
  color: var(--ink);
  font-weight: 850;
}

.daily-income-preview {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7f9fb;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.daily-income-preview.active {
  background: #eef7f5;
  color: var(--primary-dark);
}

.daily-income-preview b {
  color: var(--ink);
  font-size: 13px;
}

.inner-head {
  margin-top: 14px;
}

.budget-hero {
  background: linear-gradient(135deg, #17202a, #16a88f 76%, #91e3cf);
}

.budget-list {
  display: grid;
  gap: 10px;
}

.budget-hidden-note {
  margin: 4px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f8fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.budget-row {
  display: grid;
  grid-template-columns: 38px 1fr 92px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.income-budget-row {
  background: #fbfcfd;
}

.budget-row.is-within-budget {
  border-color: rgba(22, 168, 143, .24);
  background: #f6fffb;
}

.budget-row.is-over-budget {
  border-color: rgba(255, 115, 92, .28);
  background: #fff7f4;
}

.budget-row b {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.budget-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.budget-row .bar {
  margin: 7px 0 0;
}

.budget-row input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  text-align: right;
  font-weight: 800;
}

.budget-actions {
  display: grid;
  justify-items: stretch;
  gap: 6px;
}

.budget-actions .mini-action {
  width: 100%;
}

.credit-card-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.daily-budget-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.daily-budget-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.daily-budget-card span,
.budget-daily-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.daily-budget-card b,
.budget-daily-row b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 16px;
}

.daily-budget-card small {
  color: var(--muted);
  font-size: 12px;
}

.reserve-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.reserve-split strong {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #fff5f1;
  color: var(--action);
  font-size: 16px;
  font-weight: 950;
}

.reserve-split strong.income {
  background: rgba(22, 168, 143, .1);
  color: var(--primary-dark);
}

.reserve-split em {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.income-bar span {
  background: var(--primary);
}

.budget-daily-row small {
  display: block;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.budget-daily-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.budget-daily-row:last-child {
  border-bottom: 0;
}

.budget-daily-row .bar {
  height: 6px;
  margin: 7px 0 6px;
}

.budget-daily-row .bar.subtle {
  opacity: .58;
}

.budget-calendar {
  padding: 14px;
}

.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.calendar-head b {
  font-size: 22px;
  color: var(--ink);
}

.calendar-head span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.calendar-legend i,
.calendar-markers .marker {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
}

.legend-net {
  background: var(--blue);
}

.legend-target {
  background: #8b96aa;
}

.legend-income,
.calendar-markers .marker.income {
  background: #047857;
}

.legend-income-target {
  background: #0ea5a4;
}

.legend-income-expected {
  background: #65a30d;
}

.legend-expense,
.calendar-markers .marker.expense {
  background: var(--action);
}

.legend-daily-spend {
  background: #f0a08c;
}

.legend-expense-reserve {
  background: var(--yellow);
}

.legend-reserve,
.calendar-markers .marker.reserve {
  background: var(--yellow);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  margin-bottom: 10px;
}

.calendar-weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calendar-grid {
  row-gap: 8px;
  column-gap: 5px;
}

.calendar-day {
  min-height: 68px;
  padding: 6px 2px;
  border-radius: 8px;
  text-align: center;
  background: #fbfcfd;
}

.calendar-day .day-number {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 900;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.calendar-day .day-actual,
.calendar-day .day-plan,
.calendar-day .day-income,
.calendar-day .day-net,
.calendar-day .day-calendar-lines {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  font-style: normal;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.calendar-day .day-calendar-lines {
  min-height: 38px;
}

.calendar-day .day-main,
.calendar-day .day-sub,
.calendar-day .day-reserve {
  display: block;
  min-height: 12px;
  line-height: 1.08;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-day .day-main {
  color: var(--ink);
  font-size: 11px;
  font-weight: 950;
}

.calendar-day .day-main.net {
  color: var(--blue);
}

.calendar-day .day-main.expense {
  color: var(--action);
}

.calendar-day .day-main.income {
  color: #047857;
}

.calendar-day .day-sub {
  margin-top: 3px;
  color: #8791a3;
  font-size: 10px;
  font-weight: 850;
}

.calendar-day .day-sub.target {
  color: #8b96aa;
}

.calendar-day .day-sub.daily-spend {
  color: #d97861;
}

.calendar-day .day-sub.income-target {
  color: #0f766e;
}

.calendar-day .day-reserve {
  margin-top: 3px;
  color: #8a6f0b;
  font-size: 9px;
  font-weight: 900;
}

.calendar-day .day-reserve.expense-reserve {
  color: #9a7400;
}

.calendar-day .day-reserve.income-expected {
  color: #65a30d;
}

.calendar-day .day-actual {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.calendar-day .day-plan {
  color: #98a2b3;
  font-size: 10px;
  font-weight: 800;
}

.calendar-day .day-income {
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 900;
}

.calendar-day .day-net {
  font-size: 10px;
  font-weight: 900;
  min-height: 12px;
}

.calendar-day .day-net.positive {
  color: var(--blue);
}

.calendar-day .day-net.negative {
  color: var(--blue);
}

.calendar-day .empty-net {
  pointer-events: none;
}

.calendar-markers {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  width: 100%;
  min-height: 12px;
  margin-top: 4px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.calendar-day strong {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 4px;
  border-radius: 999px;
  background: #fff1ed;
  color: var(--action);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 900;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-day strong.income-reserve {
  background: #eef7f5;
  color: var(--primary-dark);
}

.credit-tags {
  margin-top: 4px;
  display: flex;
  justify-content: center;
  gap: 3px;
  min-height: 15px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.credit-tags i {
  min-width: 18px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #eef2ff;
  color: var(--blue);
  font-size: 10px;
  line-height: 1;
  font-style: normal;
  font-weight: 950;
}

.credit-tags i.repay {
  background: #fff1ed;
  color: var(--action);
}

.credit-tags i.bill {
  background: #eef7f5;
  color: var(--primary-dark);
}

.reminder-sheet {
  max-width: 460px;
}

.recurring-reminder-sheet {
  min-height: auto;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  background: #f6f8fb;
}

.recurring-reminder-sheet .topbar {
  margin-bottom: 6px;
}

.recurring-reminder-hero {
  margin: 0 0 12px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(22, 168, 143, .18);
  background: linear-gradient(135deg, #eef9f6 0%, #fff 100%);
}

.recurring-reminder-hero b,
.recurring-reminder-hero span {
  display: block;
}

.recurring-reminder-hero b {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.recurring-reminder-hero span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.today-reminder-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.today-reminder-card {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
}

.today-reminder-card.within-budget {
  border: 1px solid rgba(22, 168, 143, .18);
  border-color: rgba(22, 168, 143, .18);
  background: #eef9f6;
}

.today-reminder-card.over-budget {
  border: 1px solid rgba(255, 115, 92, .18);
  background: #fff7f4;
}

.today-reminder-card span,
.today-reminder-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
}

.today-reminder-card b {
  display: block;
  margin: 4px 0 3px;
  font-size: 20px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.today-reminder-card.within-budget b {
  color: var(--primary-dark);
}

.today-reminder-card.over-budget b {
  color: var(--action);
}

.today-reminder-card.no-budget {
  border: 1px solid var(--line);
  background: var(--surface);
}

.today-reminder-card .budget-na,
.daily-budget-card .budget-na {
  color: var(--muted);
  font-weight: 800;
}

.reminder-summary {
  display: flex;
  gap: 8px;
  padding: 0 14px 12px;
}

.reminder-summary span {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.reminder-summary .bill {
  background: #eef7f5;
  color: var(--primary-dark);
}

.reminder-summary .repay {
  background: #fff1ed;
  color: var(--action);
}

.day-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 12px;
}

.day-detail-summary div {
  padding: 10px;
  border-radius: 10px;
  background: #f6f8fb;
}

.day-detail-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.day-detail-summary b {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.budget-calc-explain {
  margin: 0 14px 12px;
  padding: 12px;
  border: 1px solid rgba(22, 168, 143, .22);
  border-radius: 12px;
  background: #f3fbf8;
}

.calc-highlight {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(22, 168, 143, .18);
}

.calc-highlight span {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 950;
}

.calc-highlight b {
  color: var(--primary-dark);
  font-size: 22px;
  font-weight: 950;
}

.calc-highlight small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.calc-lines {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.calc-lines p,
.calc-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.calc-lines b {
  color: var(--ink);
}

.calc-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(22, 168, 143, .25);
}

.reminder-group {
  margin: 0 14px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.recurring-reminder-group {
  margin-inline: 0;
  border-color: rgba(111, 124, 146, .14);
  box-shadow: 0 8px 24px rgba(17, 24, 39, .05);
}

.reminder-group h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.reminder-group h4 small {
  color: #9aa4b5;
  font-size: 11px;
  font-weight: 900;
}

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

.reminder-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.reminder-account:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.reminder-account:last-child {
  padding-bottom: 0;
}

.reminder-account span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.reminder-account small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.recurring-reminder-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.recurring-reminder-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fff1ed;
  color: var(--action);
  font-size: 15px;
  font-style: normal;
  font-weight: 950;
}

.recurring-reminder-icon.income {
  background: #eef7f5;
  color: var(--primary-dark);
}

.recurring-reminder-icon.transfer {
  background: #eef2ff;
  color: var(--blue);
}

.recurring-reminder-icon.other {
  background: #f3f4f6;
  color: var(--muted);
}

.recurring-reminder-main {
  min-width: 0;
}

.recurring-reminder-main b,
.recurring-reminder-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-reminder-row strong {
  font-size: 15px;
  white-space: nowrap;
}

.budget-tip-group p {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 850;
}

.budget-tip-group p:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.budget-tip-group p:last-child {
  padding-bottom: 0;
}

.reminder-toggle-row {
  grid-template-columns: 38px minmax(0, 1fr) 48px;
  cursor: pointer;
}

.reminder-toggle-copy {
  min-width: 0;
}

.reminder-toggle-row .item-meta {
  max-width: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
}

.reminder-toggle-row input {
  width: 44px;
  height: 26px;
  justify-self: end;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #d8dee8;
  position: relative;
  transition: background .18s ease;
}

.reminder-toggle-row input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(17, 24, 39, .18);
  transition: transform .18s ease;
}

.reminder-toggle-row input:checked {
  background: var(--primary);
}

.reminder-toggle-row input:checked::after {
  transform: translateX(18px);
}

.recurring-reminder-actions {
  padding-top: 2px;
}

.recurring-reminder-confirm {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 16px;
}

.calendar-day.outside .day-number {
  color: #c7ccd6;
}

.calendar-day.today {
  background: rgba(22, 168, 143, .12);
}

.calendar-day.today .day-number {
  color: var(--primary-dark);
  font-weight: 950;
}

.calendar-day.over .day-actual {
  color: var(--red);
}

.reservation-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.reservation-row:last-child {
  border-bottom: 0;
}

.reservation-row b {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.reservation-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.reservation-row span {
  color: var(--action);
  font-weight: 900;
  white-space: nowrap;
}

.reservation-row.income-row span {
  color: var(--primary-dark);
}

.rate-list {
  display: grid;
  gap: 10px;
}

.rate-row {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.rate-row b {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.rate-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.rate-row input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  text-align: right;
  font-weight: 800;
}

.bar {
  display: block;
  width: 100%;
  height: 8px;
  margin: 10px 0 8px;
  border-radius: 8px;
  background: #edf0f3;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.list {
  overflow: hidden;
}

.report-tree {
  display: grid;
  gap: 10px;
}

.report-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.report-parent {
  border-bottom: 1px solid var(--line);
}

.report-child {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px 10px 62px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.report-child.depth-2 {
  padding-left: 82px;
  background: #f7f9fb;
}

.report-child.depth-3 {
  padding-left: 98px;
  background: #f3f6f8;
}

.report-child:last-child {
  border-bottom: 0;
}

.report-view-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 10px;
}

.trend-hero {
  margin-bottom: 12px;
  background: linear-gradient(135deg, #17352f 0%, #16a88f 72%, #8ccfbf 100%);
}

.cashflow-hero {
  background: linear-gradient(135deg, #202938 0%, #5367d8 74%, #a8b3ff 100%);
}

.assets-hero {
  background: linear-gradient(135deg, #233047 0%, #16a88f 68%, #f4b740 100%);
}

.trend-card {
  padding: 14px;
}

.trend-explain {
  margin: 0 0 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f6f8fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.trend-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.trend-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.trend-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.income-dot { background: var(--primary); }
.expense-dot { background: var(--action); }
.asset-dot { background: var(--blue); }
.debt-dot { background: var(--red); }
.net-dot { background: var(--yellow); }

.trend-range-fields {
  margin-bottom: 12px;
}

.trend-bars {
  display: grid;
  gap: 12px;
}

.trend-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 78px;
  gap: 8px;
  align-items: start;
}

.trend-row.no-total {
  grid-template-columns: 34px minmax(0, 1fr);
}

.trend-month {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.trend-track {
  display: grid;
  gap: 5px;
  align-content: start;
  min-height: 22px;
}

.trend-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.trend-line i {
  display: block;
  height: 8px;
  min-width: 2px;
  border-radius: 999px;
  background: var(--muted);
}

.trend-line em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.trend-line.income i { background: var(--primary); }
.trend-line.expense i { background: var(--action); }
.trend-line.asset i { background: var(--blue); }
.trend-line.debt i { background: var(--red); }
.trend-line.net-asset i { background: var(--yellow); }

.asset-line-chart {
  margin: 2px 0 16px;
  padding: 12px 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfefd 0%, #f7faf9 100%);
}

.asset-line-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.asset-line-chart .grid {
  stroke: #dfe7ed;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.asset-line-chart .axis {
  stroke: #cfd8df;
  stroke-width: 1;
}

.asset-line-chart .month-labels text {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.asset-chart-callout text {
  fill: var(--ink);
  font-size: 8.6px;
  font-weight: 900;
}

.asset-chart-callout.totalAssets text { fill: var(--blue); }
.asset-chart-callout.totalLiabilities text { fill: var(--red); }

.asset-chart-callout.netAssets text {
  fill: var(--primary-dark);
}

.asset-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.asset-line.asset {
  stroke: var(--blue);
  stroke-width: 2.2;
  opacity: .75;
}

.asset-line.debt {
  stroke: var(--red);
  stroke-width: 2.2;
  opacity: .65;
}

.asset-line.net {
  stroke: var(--primary);
  stroke-width: 3.8;
}

.finance-health-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  padding: 18px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #202938 0%, #16a88f 72%, #9ad8c9 100%);
}

.finance-health-hero.ok {
  background: linear-gradient(135deg, #233047 0%, #5367d8 72%, #a8b3ff 100%);
}

.finance-health-hero.watch {
  background: linear-gradient(135deg, #3a3441 0%, #f4b740 72%, #ffd98a 100%);
}

.finance-health-hero.risk {
  background: linear-gradient(135deg, #3d2c2a 0%, #ff735c 72%, #ffc1b3 100%);
}

.finance-health-hero span,
.finance-health-hero small {
  display: block;
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  font-weight: 850;
}

.finance-health-hero b {
  display: block;
  margin: 6px 0 4px;
  color: #fff;
  font-size: 44px;
  line-height: 1;
  font-weight: 950;
}

.finance-health-hero i {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 18px;
  font-style: normal;
  font-weight: 950;
}

.health-range-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.health-metric,
.health-card,
.health-stress-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.health-metric {
  min-width: 0;
  padding: 12px;
}

.health-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.health-metric b {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.health-metric.income b,
.health-metric.cash b {
  color: var(--primary-dark);
}

.health-metric.expense b,
.health-metric.debt b {
  color: var(--red);
}

.health-card {
  padding: 12px;
}

.health-asset-overview {
  width: 100%;
  text-align: left;
}

.health-trend-overview {
  width: 100%;
  text-align: left;
}

.asset-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.asset-overview-head b {
  color: var(--primary-dark);
  white-space: nowrap;
}

.health-rule-card {
  padding: 12px;
}

.health-rule-card p {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: #475467;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.55;
}

.health-rule-card p:last-child {
  border-bottom: 0;
}

.health-asset-detail-list,
.health-liquidity-grid,
.health-trend-detail-list {
  display: grid;
  gap: 10px;
}

.health-asset-group {
  overflow: hidden;
}

.health-asset-group-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
}

.health-asset-group-head b,
.health-asset-group-head small {
  display: block;
}

.health-asset-group-head b {
  color: var(--ink);
  font-size: 14px;
}

.health-asset-group-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.health-asset-group-head span {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.health-asset-account-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.health-asset-account-row:last-child {
  border-bottom: 0;
}

.health-asset-account-row b,
.health-asset-account-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.health-asset-account-row b {
  color: var(--ink);
  font-size: 13px;
}

.health-asset-account-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.health-asset-account-row strong {
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}

.liquidity-card {
  padding: 12px;
}

.liquidity-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.liquidity-card-head b {
  color: var(--ink);
  font-size: 14px;
}

.liquidity-card-head span {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 950;
}

.liquidity-card p {
  margin: 7px 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.45;
}

.liquidity-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.liquidity-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.liquidity-account span {
  color: #344054;
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.liquidity-account b {
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}

.health-trend-month-card {
  overflow: hidden;
}

.health-trend-month-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
}

.health-trend-month-head b,
.health-trend-month-head small {
  display: block;
}

.health-trend-month-head b {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.health-trend-month-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.health-trend-month-head strong {
  font-size: 16px;
  font-weight: 950;
  white-space: nowrap;
}

.health-trend-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.health-trend-split.muted {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fbfcfd;
}

.health-trend-split span {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.health-trend-split span b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.health-trend-split i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary);
}

.health-trend-split i.expense {
  background: var(--action);
}

.health-trend-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.health-trend-source-block {
  min-width: 0;
  padding: 11px 12px 12px;
}

.health-trend-source-block + .health-trend-source-block {
  border-left: 1px solid var(--line);
}

.health-trend-source-block h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.health-trend-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid rgba(226, 232, 240, .8);
}

.health-trend-source-row span,
.health-trend-source-row small {
  display: block;
  min-width: 0;
}

.health-trend-source-row span {
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.health-trend-source-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
}

.health-trend-source-row b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.health-trend-source-block.income .health-trend-source-row b {
  color: var(--primary-dark);
}

.health-trend-source-block.expense .health-trend-source-row b {
  color: var(--red);
}

.health-bars,
.health-trend-list,
.health-stress-list {
  display: grid;
  gap: 10px;
}

.health-bar-row,
.health-trend-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 86px;
  gap: 8px;
  align-items: center;
}

.health-bar-row span,
.health-trend-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.health-bar-row div,
.health-trend-row div {
  display: grid;
  gap: 4px;
  min-height: 16px;
  align-content: center;
}

.health-bar-row i,
.health-trend-row i {
  display: block;
  height: 8px;
  min-width: 2px;
  border-radius: 999px;
  background: var(--primary);
}

.health-bar-row i.debt,
.health-trend-row i.expense {
  background: var(--action);
}

.health-trend-row i.income {
  background: var(--primary);
}

.health-bar-row b,
.health-trend-row b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.health-stress-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  padding: 12px;
}

.health-stress-card b,
.health-stress-card small,
.health-stress-card span {
  display: block;
}

.health-stress-card b {
  color: var(--ink);
  font-size: 14px;
}

.health-stress-card small,
.health-stress-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.4;
}

.health-stress-card strong {
  font-size: 13px;
  white-space: nowrap;
}

.health-stress-card span {
  grid-column: 1 / -1;
}

.health-stress-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.health-stress-entry {
  display: grid;
  gap: 6px;
  padding: 12px;
  text-align: left;
}

.health-stress-entry b {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.health-stress-entry small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.45;
}

.health-stress-entry span {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 950;
}

.custom-stress-form {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.custom-stress-form .field {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
}

.custom-stress-form .stress-field-percent {
  grid-template-columns: 112px minmax(54px, 1fr) auto minmax(82px, auto);
}

.custom-stress-form .stress-field-compact-unit {
  grid-template-columns: 112px minmax(82px, 1fr) minmax(30px, auto);
}

.custom-stress-form .stress-field-money {
  grid-template-columns: 112px minmax(96px, 1fr) minmax(82px, auto);
}

.custom-stress-form .stress-field-once {
  background: #fff8f5;
  border-color: #ffd9cf;
}

.custom-stress-form .stress-field-once-income {
  background: #f0fbf7;
  border-color: #b7ead9;
}

.custom-stress-form .stress-field-duration,
.custom-stress-form .stress-field-solo {
  grid-template-columns: 112px minmax(0, 1fr);
}

.custom-stress-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.custom-stress-form label small {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
}

.custom-stress-form input,
.custom-stress-form select {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  outline: 0;
}

.custom-stress-form small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.custom-stress-chart-card {
  padding: 12px;
}

.stress-impact-mark circle {
  fill: #ff6b57;
  stroke: #fff;
  stroke-width: 2;
}

.stress-impact-mark text {
  fill: #ff6b57;
  font-size: 10px;
  font-weight: 950;
}

.stress-impact-mark.income circle {
  fill: #13a887;
}

.stress-impact-mark.income text {
  fill: #0f8f74;
}

.stress-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.stress-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.stress-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}

.stress-legend i.stress {
  background: var(--red);
}

.stress-legend i.cash {
  background: var(--primary);
}

.custom-stress-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.custom-stress-chart text {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.stress-axis {
  stroke: var(--line);
  stroke-width: 1;
}

.stress-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stress-line.base {
  stroke: var(--blue);
  opacity: .75;
}

.stress-line.stress {
  stroke: var(--red);
}

.stress-line.cash {
  stroke: var(--primary);
  stroke-width: 2.4;
}

.stress-line.safety {
  stroke-dasharray: 5 5;
  opacity: .7;
}

.cashflow-stress-table {
  display: grid;
  gap: 8px;
}

.cashflow-stress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 11px 12px;
}

.cashflow-stress-row b {
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.cashflow-stress-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.cashflow-stress-row strong {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.health-suggestion {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: #344054;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.health-suggestion:last-child {
  border-bottom: 0;
}

.valuation-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.trend-row b {
  display: grid;
  gap: 1px;
  color: var(--ink);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.trend-row b em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.trend-list-row {
  grid-template-columns: minmax(0, 1fr) 84px;
}

.trend-list-row .item-meta {
  max-width: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.45;
}

.trend-list-row .num {
  white-space: nowrap;
  text-align: right;
}

.trend-detail-sheet {
  min-height: auto;
}

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

.trend-detail-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.trend-detail-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.trend-detail-card b {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.trend-detail-card.income b {
  color: var(--primary-dark);
}

.trend-detail-card.danger b {
  color: var(--red);
}

.trend-detail-card.muted b {
  color: var(--muted);
}

.trend-source-grid {
  display: grid;
  gap: 10px;
}

.trend-source-block {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.trend-source-block h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.trend-source-block p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.trend-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.trend-source-row.row-button {
  margin: 0;
  font: inherit;
}

.trend-source-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.trend-source-row:last-child {
  padding-bottom: 0;
}

.trend-source-row b,
.trend-source-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.trend-source-row b {
  color: var(--ink);
  font-size: 13px;
}

.trend-source-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.trend-source-row strong {
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}

.item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.row-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.row-button:active {
  background: #f3f6f8;
}

.item:last-child {
  border-bottom: 0;
}

.item-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 18px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #edf0f3;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  vertical-align: 1px;
}

.account-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.account-action-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.danger-action {
  color: var(--red);
}

.backup-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.quick-template-row {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.quick-template-main {
  min-width: 0;
}

.quick-template-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
}

.mini-action.icon-mini {
  min-width: 26px;
  width: 26px;
  padding: 0;
  font-size: 14px;
}

.item-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-note {
  margin-top: 4px;
  max-width: 210px;
  color: #475467;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scroll-hint {
  padding: 12px 0 2px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.num {
  text-align: right;
  font-size: 14px;
  font-weight: 900;
}

.income { color: var(--primary-dark); }
.danger { color: var(--red); }
.muted { color: var(--muted); }

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 3px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #e9edf1;
}

.date-tabs {
  margin-bottom: 8px;
}

.date-filter {
  margin-bottom: 12px;
}

.range-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tab {
  height: 29px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}

.bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(76px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
}

.nav {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.nav i {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 14px;
}

.nav.active {
  color: var(--primary-dark);
}

.nav.active i {
  background: var(--soft);
}

.fab {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--action);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 28px;
  margin-top: -22px;
  box-shadow: 0 10px 22px rgba(255,115,92,.34);
}

.form {
  display: grid;
  gap: 10px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  outline: none;
}

.field textarea {
  padding: 10px 12px;
  resize: vertical;
}

.signed-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.field .signed-input input {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.sign-toggle {
  border: 0;
  border-left: 1px solid var(--line);
  background: #e9f8f4;
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
}

.form-hint {
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.primary-btn, .ghost-btn {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 900;
}

.ghost-mini {
  min-height: 28px;
  border-radius: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.primary-btn {
  background: var(--action);
  color: #fff;
}

.ghost-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.amount-field input {
  min-height: 46px;
  padding: 0 14px;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: right;
  border-color: rgba(22, 168, 143, .42);
  background: #fbfffe;
}

.transfer-amount-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.transfer-amount-field input {
  font-size: 22px;
  padding: 0 10px;
}

.transfer-arrow {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 28px;
  font-weight: 900;
}

.transfer-rate-hint {
  margin-top: -2px;
  color: var(--muted);
}

.calc-expression {
  min-height: 16px;
  margin-top: 2px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  word-break: break-all;
}

.login {
  min-height: 100%;
  display: grid;
  align-content: center;
  padding: 26px;
  gap: 18px;
}

.login-logo {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: var(--primary);
  color: white;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
}

.modal {
  position: fixed;
  inset: 0;
  height: 100vh;
  background: rgba(23,32,42,.36);
  display: grid;
  align-items: end;
  z-index: 10;
  overflow: hidden;
}

.toast {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #17202a;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.modal-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff4f2;
  border: 1px solid #ffd6cf;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
}

.checkline {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.weekday-chip {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  color: var(--muted);
}

.weekday-chip input {
  display: none;
}

.weekday-chip.active,
.weekday-chip:has(input:checked) {
  border-color: var(--primary);
  background: rgba(22, 168, 143, .12);
  color: var(--primary-strong);
}

.icon-btn.danger {
  color: var(--red);
}

.sheet {
  min-height: min(760px, 82vh);
  max-height: 92%;
  overflow: auto;
  background: var(--bg);
  border-radius: 18px 18px 0 0;
  padding: 14px 14px 20px;
}

.entry-sheet {
  height: min(900px, calc(100vh - 10px));
  min-height: min(840px, calc(100vh - 10px));
  max-height: calc(100vh - 10px);
  padding: 12px 14px calc(18px + env(safe-area-inset-bottom, 0px));
}

@supports (height: 100dvh) {
  .modal {
    height: 100dvh;
  }

  .entry-sheet {
    height: min(900px, calc(100dvh - 10px));
    min-height: min(840px, calc(100dvh - 10px));
    max-height: calc(100dvh - 10px);
  }
}

.entry-sheet .topbar {
  min-height: 36px;
  margin-bottom: 8px;
}

#entryForm {
  height: calc(100% - 44px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}

#entryForm .tabs {
  margin-bottom: 5px;
}

.entry-scroll-fields {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 2px 8px;
  scroll-padding-bottom: 12px;
}

.entry-calculator {
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 44px;
  gap: 1px;
  overflow: hidden;
  margin-top: 8px;
  margin-bottom: env(safe-area-inset-bottom, 0px);
  border: 1px solid rgba(22, 168, 143, .18);
  border-radius: 10px;
  background: rgba(22, 168, 143, .18);
}

.currency-hint {
  margin: -4px 0 2px;
  color: var(--primary-dark);
  font-weight: 850;
}

.voice-entry {
  display: grid;
  gap: 5px;
  margin-bottom: 8px;
}

.voice-actions,
.voice-panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.voice-btn {
  min-height: 30px;
  border-radius: 999px;
  padding: 0 14px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.voice-btn.listening {
  background: var(--action);
}

.voice-btn.secondary {
  background: #eef7f5;
  color: var(--primary-dark);
  border: 1px solid rgba(22, 168, 143, .18);
}

.voice-btn.template-btn {
  background: #fff4f2;
  color: #b84a39;
  border-color: #ffd6cf;
}

.voice-btn.secondary.active {
  background: var(--primary);
  color: #fff;
}

.voice-panel {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(22, 168, 143, .2);
  border-radius: 8px;
  background: #f4fbf9;
}

.batch-voice-sheet {
  max-width: 430px;
}

.quick-template-sheet {
  min-height: min(760px, 88vh);
  max-height: 94%;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.quick-template-group {
  margin-top: 10px;
}

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

.quick-template-card {
  min-height: 84px;
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 4px 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.quick-template-card i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-style: normal;
  font-weight: 900;
}

.quick-template-card b {
  align-self: center;
  min-width: 0;
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.quick-template-card small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.batch-voice-panel.standalone {
  margin: 0 14px 14px;
  padding: 12px;
  gap: 10px;
}

.batch-voice-panel.standalone textarea {
  min-height: 84px;
}

.voice-panel textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(22, 168, 143, .2);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
  outline: none;
  font-size: 13px;
}

.primary-mini {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.danger-mini {
  color: var(--red);
}

.voice-hint,
.voice-result small,
.voice-error {
  font-size: 12px;
  line-height: 1.45;
}

.voice-hint,
.voice-result small {
  color: var(--muted);
}

.voice-result {
  display: grid;
  gap: 2px;
}

.voice-result b {
  color: var(--primary-dark);
  font-size: 13px;
}

.voice-batch-list {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.voice-batch-list div {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 6px 8px;
  padding: 7px;
  border: 1px solid rgba(22, 168, 143, .16);
  border-radius: 8px;
  background: #fff;
}

.voice-batch-list.editable {
  gap: 8px;
}

.voice-batch-list .voice-draft {
  grid-template-columns: 22px 1fr 1fr;
  align-items: end;
  position: relative;
  padding-right: 58px;
}

.voice-draft label {
  display: grid;
  gap: 3px;
}

.voice-draft label.wide,
.voice-draft small.wide {
  grid-column: 2 / -1;
}

.voice-draft .danger-mini {
  position: absolute;
  right: 7px;
  bottom: 7px;
  min-width: 44px;
  height: 30px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.voice-draft input,
.voice-draft select {
  min-width: 0;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.compact-save {
  min-height: 38px;
}

.voice-batch-list span {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef7f5;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 950;
}

.voice-batch-list b,
.voice-batch-list small {
  min-width: 0;
}

.voice-batch-list small {
  grid-column: 2;
}

.voice-error {
  color: var(--red);
  font-weight: 800;
}

.voice-entry + .form-hint {
  margin-top: 2px;
}

.calc-key {
  min-width: 0;
  background: #f4fbf9;
  color: #17202a;
  font-size: 22px;
  font-weight: 900;
}

.calc-key.operator {
  background: #e5f5f1;
  color: var(--primary-dark);
  font-size: 26px;
}

.calc-key.muted {
  background: #edf2f1;
  color: var(--muted);
  font-size: 16px;
}

.calc-key:active {
  filter: brightness(1.12);
}

.calc-save {
  grid-row: span 2;
  background: var(--action);
  color: #fff;
  font-size: 21px;
}

@media (max-height: 760px) {
  .entry-sheet {
    height: min(820px, calc(100vh - 8px));
    min-height: min(760px, calc(100vh - 8px));
    max-height: calc(100vh - 8px);
    padding-top: 10px;
  }

  @supports (height: 100dvh) {
    .entry-sheet {
      height: min(820px, calc(100dvh - 8px));
      min-height: min(760px, calc(100dvh - 8px));
      max-height: calc(100dvh - 8px);
    }
  }

  .entry-calculator {
    grid-auto-rows: 40px;
  }

  .calc-key {
    font-size: 20px;
  }

  .calc-key.operator {
    font-size: 24px;
  }
}

@media (max-width: 520px) {
  .entry-sheet {
    height: calc(100svh - 8px);
    min-height: 0;
    max-height: calc(100svh - 8px);
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .entry-calculator {
    grid-auto-rows: 42px;
    margin-top: 6px;
  }

  .category-grid {
    gap: 3px;
    margin: 3px 0;
  }

  .cat {
    min-height: 43px;
    padding: 4px 4px 3px;
  }

  .cat i {
    width: 21px;
    height: 21px;
  }

  .voice-entry {
    margin-bottom: 6px;
  }

  .more-cats {
    margin-bottom: 6px;
  }
}

@media (max-height: 720px) {
  .entry-sheet .topbar {
    min-height: 34px;
    margin-bottom: 6px;
  }

  .amount-field input {
    min-height: 42px;
    font-size: 25px;
  }

  .cat {
    min-height: 43px;
    padding-top: 4px;
  }

  .entry-calculator {
    grid-auto-rows: 40px;
    margin-top: 6px;
  }
}

.entry-quick-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: stretch;
  margin: 3px 0 0;
}

.compact-field {
  flex: 1 1 138px;
  min-width: 0;
  position: relative;
}

.compact-field label {
  position: absolute;
  left: 12px;
  top: 6px;
  z-index: 1;
  color: #98a2b3;
  font-size: 10px;
  line-height: 1;
}

.compact-field input,
.compact-field select,
.compact-field textarea {
  min-height: 34px;
  padding: 15px 12px 3px;
  border-radius: 999px;
  border-color: transparent;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(231, 234, 238, .85);
  font-size: 13px;
  font-weight: 800;
}

.compact-field textarea {
  height: 34px;
  resize: none;
  line-height: 1.4;
}

.compact-field.simple-chip textarea {
  padding-top: 8px;
  padding-bottom: 6px;
}

.account-chip {
  flex-basis: 176px;
}

.time-chip {
  flex-basis: 154px;
}

.note-chip {
  flex-basis: 100%;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 4px 0;
}

.cat {
  position: relative;
  min-height: 46px;
  background: var(--cat-bg, var(--surface));
  border: 1px solid var(--cat-border, var(--line));
  border-radius: 8px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 2px;
  padding: 5px 4px 4px;
  font-size: 10px;
  line-height: 1.15;
  color: #344054;
}

.cat.level-1 {
  background: var(--cat-bg, #f5f7fa);
  border-color: var(--cat-border, rgba(107, 119, 141, .24));
}

.cat.level-1 i {
  background: var(--cat-color, #6b778d);
}

.cat.level-2 {
  background: var(--cat-bg, #f5f7ff);
  border-color: var(--cat-border, rgba(83, 103, 216, .24));
}

.cat.level-2 i {
  background: var(--cat-color, #5367d8);
}

.cat.level-3 {
  background: var(--cat-bg, #eefaf7);
  border-color: var(--cat-border, rgba(15, 169, 145, .26));
}

.cat.level-3 i {
  background: var(--cat-color, #0fa991);
  color: #fff;
}

.cat.active {
  background: var(--cat-bg, #ecf8f5);
  border-color: var(--cat-color, var(--primary));
  box-shadow: inset 0 0 0 1px var(--cat-border, rgba(22, 168, 143, .2)), 0 6px 14px rgba(15, 23, 42, .08);
  color: var(--cat-color, var(--primary-dark));
  font-weight: 900;
}

.cat.active i {
  box-shadow: 0 0 0 3px var(--cat-border, rgba(22, 168, 143, .18));
}

.cat.legacy {
  border-style: dashed;
  color: var(--muted);
}

.cat small {
  display: block;
  margin-top: -2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.cat i {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: #64748b;
  display: grid;
  place-items: center;
  color: white;
  font-style: normal;
  font-weight: 900;
}

.more-cats {
  width: 100%;
  height: 32px;
  margin: -2px 0 8px;
  border: 1px dashed rgba(22, 168, 143, .45);
  border-radius: 8px;
  background: var(--soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.entry-category-picker {
  position: absolute;
  inset: 0;
  z-index: 14;
  display: grid;
  align-items: end;
  background: rgba(12, 20, 32, .48);
}

.entry-category-panel {
  max-height: 78%;
  min-height: 58%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  box-shadow: 0 -18px 42px rgba(15, 23, 42, .18);
}

.category-picker-top {
  min-height: 54px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.category-picker-top .title {
  text-align: center;
  font-size: 18px;
  font-weight: 950;
}

.category-picker-search {
  padding: 10px 14px;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
}

.category-picker-search input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  outline: none;
}

.entry-category-list {
  overflow: auto;
  background: #fff;
}

.picker-category-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: center;
  border-bottom: 1px solid #edf0f4;
}

.picker-category-row.leaf {
  grid-template-columns: 1fr;
}

.picker-category-row.leaf .picker-category-main {
  grid-column: 1 / -1;
}

.picker-category-row.depth-1 {
  background: #fbfcff;
}

.picker-category-row.depth-2,
.picker-category-row.depth-3 {
  background: #fffdfd;
}

.picker-category-main {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 14px;
  color: var(--ink);
  text-align: left;
}

.picker-category-row.depth-1 .picker-category-main {
  padding-left: 34px;
}

.picker-category-row.depth-2 .picker-category-main,
.picker-category-row.depth-3 .picker-category-main {
  padding-left: 54px;
}

.picker-category-main i {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-style: normal;
  font-size: 14px;
  font-weight: 950;
}

.picker-category-main i.level-1 {
  background: var(--cat-color, #6b778d);
}

.picker-category-main i.level-2 {
  background: var(--cat-color, #5367d8);
}

.picker-category-main i.level-3 {
  background: var(--cat-color, #0fa991);
}

.picker-category-main span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 16px;
  font-weight: 850;
}

.picker-category-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.picker-category-row.active {
  background: var(--cat-bg, #edf8f5);
}

.picker-category-row.active .picker-category-main span {
  color: var(--cat-color, var(--primary-dark));
  font-weight: 950;
}

.picker-expand {
  width: 100%;
  height: 100%;
  color: #98a2b3;
  font-size: 22px;
  font-weight: 900;
}

.category-picker-actions {
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: #fff;
}

.category-picker-actions button {
  min-height: 36px;
  color: var(--action);
  font-size: 15px;
  font-weight: 900;
}

.account-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.account-head {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 900;
}

.account-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: right;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-head-actions button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-head-actions b {
  font-size: 12px;
  color: var(--ink);
}

.account-head-actions .collapse-btn {
  color: var(--ink);
  font-size: 13px;
}

.account-head-actions .collapse-btn.collapsed {
  color: var(--muted);
}

.account-group-body.collapsed {
  display: none;
}

.donut {
  width: 164px;
  height: 164px;
  border-radius: 50%;
  margin: 10px auto 16px;
  background: conic-gradient(var(--primary) 0 58%, var(--blue) 58% 78%, var(--yellow) 78% 91%, var(--action) 91% 100%);
  position: relative;
}

.donut:after {
  content: attr(data-total);
  position: absolute;
  inset: 42px;
  background: var(--surface);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
}

.empty {
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

@media (max-width: 520px) {
  html, body, #app {
    height: 100%;
    overflow: hidden;
  }

  .shell {
    height: 100vh;
    min-height: 0;
    padding: 0;
  }

  .phone {
    width: 100%;
    height: 100vh;
    min-height: 0;
    border-radius: 0;
    border: 0;
  }
}

@supports (height: 100dvh) {
  @media (max-width: 520px) {
    .shell,
    .phone {
      height: 100dvh;
    }
  }
}
