@font-face {
  font-family: BudgetSans;
  src: local("Avenir Next");
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f6f5f0;
  color: #20352e;
  font:
    15px BudgetSans,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: #285d49;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 34px;
  letter-spacing: -1.1px;
  margin-bottom: 10px;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 16px;
}
small,
.muted {
  color: #6b7970;
}
button.primary,
.primary {
  background: #1e4d3e;
  color: white;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
}
button.secondary {
  background: #e8ece3;
  color: #234c3f;
  border-radius: 9px;
  padding: 10px 15px;
}
.danger {
  background: #f9e7e3;
  color: #9a392c;
  border-radius: 9px;
  padding: 10px 15px;
}
.link {
  background: none;
  color: #356750;
  padding: 6px 0;
  text-align: left;
  font-weight: 600;
}
.shell {
  display: grid;
  grid-template-columns: 225px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #173f35;
  color: #e9f0df;
  padding: 34px 22px;
  display: flex;
  flex-direction: column;
  position: fixed;
  width: 225px;
  height: 100vh;
}
.brand {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  width: 32px;
}
.sidebar .subtitle {
  color: #afc1b5;
  font-size: 12px;
  margin: 7px 0 44px;
}
.nav {
  display: grid;
  gap: 9px;
}
.nav button {
  background: transparent;
  color: #c5d3c9;
  text-align: left;
  padding: 14px 17px;
  border-radius: 10px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.nav button.active {
  background: #d9e7b9;
  color: #1b4235;
  font-weight: 650;
}
.nav button:hover {
  box-shadow: inset 0 0 0 1px #597868;
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 16px;
  font-size: 12px;
  color: #b0c2b7;
}
.avatar {
  border-radius: 50%;
  background: #395c4d;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #e9f0df;
}
.userline {
  display: flex;
  gap: 10px;
  align-items: center;
}
.main {
  grid-column: 2;
  padding: 28px 42px 70px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
  gap: 16px;
}
.crumb {
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #758276;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.search {
  background: white;
  border: 1px solid #e0e4d9;
  border-radius: 9px;
  padding: 10px 14px;
  max-width: 210px;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 25px;
  gap: 20px;
}
.pagehead p {
  margin: 0;
  color: #758075;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  font-weight: 700;
  color: #768673;
  margin-bottom: 8px;
}
.tabs {
  display: flex;
  gap: 5px;
  background: #e8eadf;
  padding: 4px;
  border-radius: 10px;
  width: max-content;
  max-width: 100%;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.tabs button {
  background: none;
  padding: 9px 18px;
  border-radius: 7px;
  color: #6a776c;
}
.tabs button.active {
  background: white;
  color: #234735;
  box-shadow: 0 1px 4px #1d372011;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  background: white;
  border: 1px solid #e4e6dc;
  border-radius: 14px;
  padding: 22px;
}
.stat.accent {
  background: #e5eccf;
  border-color: #d5dfba;
}
.stat-label {
  font-size: 12px;
  color: #6b7b6b;
  margin-bottom: 14px;
}
.stat-value {
  font-size: 29px;
  letter-spacing: -0.9px;
  font-weight: 650;
  margin-bottom: 6px;
}
.stat small {
  font-size: 11px;
}
.grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
  align-items: start;
}
.card {
  background: #fff;
  border: 1px solid #e3e6db;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 22px;
  overflow: hidden;
}
.cardhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.cardhead h2 {
  margin: 0;
}
.empty {
  padding: 28px 10px;
  text-align: center;
  color: #7a8376;
  line-height: 1.7;
}
.empty .empty-icon {
  display: block;
  font-size: 28px;
  color: #819778;
  margin-bottom: 12px;
}
.empty h3 {
  color: #415440;
  margin-bottom: 6px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid #edf0e7;
}
.row:last-child {
  border-bottom: 0;
}
.row-title {
  font-weight: 600;
  margin-bottom: 4px;
}
.row small {
  font-size: 12px;
}
.right {
  text-align: right;
}
.amount {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.positive {
  color: #2d795a;
}
.negative {
  color: #a34e3e;
}
.badge {
  display: inline-block;
  border-radius: 20px;
  background: #edf1e6;
  color: #5a7557;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
}
.badge.warn {
  background: #fbedd5;
  color: #956b23;
}
.progress {
  height: 6px;
  background: #edf0e7;
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
}
.progress > span {
  display: block;
  height: 100%;
  background: #7f9b5c;
}
.split {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.list-card {
  padding: 16px;
  background: #f6f7f1;
  border-radius: 10px;
  margin: 10px 0;
}
.notice {
  border-radius: 10px;
  padding: 14px 18px;
  background: #edf1e3;
  color: #526443;
  font-size: 13px;
  line-height: 1.6;
  margin: 15px 0;
}
.notice.warn {
  background: #fff1d9;
  color: #825e25;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #84907e;
  padding: 13px 10px;
  border-bottom: 1px solid #e6eadf;
}
td {
  padding: 14px 10px;
  border-bottom: 1px solid #eef0e9;
}
td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table-wrap {
  overflow: auto;
}
.moneyline {
  font-size: 12px;
  color: #68785f;
  margin: 6px 0;
}
.chart {
  height: 155px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  margin: 25px 0 12px;
}
.bar {
  flex: 1;
  background: #aac18a;
  border-radius: 5px 5px 0 0;
  min-height: 3px;
  position: relative;
}
.bar:hover {
  background: #436c49;
}
.bar-labels {
  display: flex;
  justify-content: space-between;
  color: #7c8875;
  font-size: 11px;
}
.chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.mini-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.login {
  max-width: 440px;
  margin: 10vh auto;
  padding: 36px;
  background: #fff;
  border: 1px solid #e4e6dc;
  border-radius: 20px;
}
.login .brand {
  margin-bottom: 32px;
  color: #173f35;
}
.login h1 {
  font-size: 28px;
}
.login .primary {
  width: 100%;
  margin-top: 8px;
}
.login p {
  line-height: 1.6;
  color: #71816f;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #5b6b58;
  margin-bottom: 6px;
}
.field {
  margin-bottom: 16px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #dbe1d4;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: #24392f;
  min-height: 43px;
}
.field textarea {
  min-height: 80px;
  resize: vertical;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.span2 {
  grid-column: 1/-1;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0;
}
.check input {
  width: auto;
  min-height: 0;
}
.help {
  font-size: 12px;
  font-weight: 400;
  color: #7c8876;
  margin-top: 6px;
  line-height: 1.5;
}
dialog {
  border: 1px solid #e2e6d9;
  border-radius: 18px;
  padding: 0;
  width: min(600px, calc(100vw - 24px));
  max-height: 90vh;
  box-shadow: 0 24px 100px #112f3340;
  color: #20352e;
}
dialog::backdrop {
  background: #14392c77;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 24px 26px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 {
  margin: 0;
}
.close {
  background: #f0f2eb;
  border-radius: 50%;
  width: 30px;
  height: 30px;
}
.dialog-body {
  padding: 16px 26px 26px;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
details {
  border-top: 1px solid #e6eadf;
  padding-top: 14px;
  margin-top: 15px;
}
summary {
  cursor: pointer;
  color: #58734e;
  margin-bottom: 16px;
  font-size: 13px;
}
.error {
  color: #a33c32;
  background: #fff0ed;
  padding: 10px;
  border-radius: 7px;
  font-size: 13px;
  margin: 12px 0;
}
.loading {
  text-align: center;
  padding: 100px;
  color: #6c8063;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #183f35;
  color: white;
  border-radius: 10px;
  padding: 13px 20px;
  z-index: 20;
  display: none;
  box-shadow: 0 5px 20px #0002;
}
.mobile-brand {
  display: none;
}
.section-space {
  margin-top: 25px;
}
.statusdot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a6c684;
  margin-right: 6px;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar input,
.toolbar select {
  border: 1px solid #dfe4d5;
  border-radius: 8px;
  padding: 9px;
  background: white;
  color: #3b523c;
}
.footnote {
  color: #7e8978;
  font-size: 11px;
  line-height: 1.6;
  margin-top: 20px;
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.account-tile {
  border: 1px solid #e1e6d8;
  padding: 20px;
  border-radius: 12px;
  cursor: pointer;
  background: white;
  text-align: left;
}
.account-tile:hover {
  border-color: #9aae80;
}
.account-tile h3 {
  margin: 12px 0;
}
.account-tile .stat-value {
  font-size: 25px;
}
.support-menu {
  position: absolute;
  right: 35px;
  top: 72px;
  background: white;
  box-shadow: 0 10px 40px #0002;
  padding: 12px;
  border-radius: 12px;
  z-index: 3;
  display: grid;
  gap: 4px;
}
.support-menu button {
  padding: 10px 22px;
  text-align: left;
  background: white;
  border-radius: 7px;
}
.support-menu button:hover {
  background: #edf1e5;
}
@media (max-width: 1100px) {
  .main {
    padding: 25px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .account-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .shell {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    width: 190px;
    padding: 28px 16px;
  }
  .stat-value {
    font-size: 27px;
  }
}
@media (max-width: 700px) {
  h1 {
    font-size: 28px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    bottom: 0;
    top: auto;
    width: 100%;
    height: 72px;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
    z-index: 4;
    display: block;
  }
  .sidebar > .brand,
  .sidebar > .subtitle,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    display: flex;
    justify-content: space-around;
    gap: 4px;
  }
  .nav button {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 7px 20px;
    font-size: 11px;
    border-radius: 9px;
  }
  .nav button span {
    font-size: 17px;
  }
  .main {
    padding: 20px 17px 105px;
  }
  .topbar {
    margin-bottom: 25px;
  }
  .crumb {
    display: none;
  }
  .mobile-brand {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #173f35;
  }
  .topbar .search {
    display: none;
  }
  .topbar .primary {
    padding: 10px 13px;
    font-size: 12px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat-value {
    font-size: 24px;
  }
  .stat-label {
    font-size: 11px;
  }
  .card {
    padding: 19px;
  }
  .pagehead {
    align-items: flex-start;
  }
  .pagehead p {
    font-size: 13px;
    line-height: 1.5;
  }
  .pagehead .actions {
    justify-content: flex-end;
  }
  .tabs button {
    padding: 8px 13px;
    font-size: 12px;
  }
  .account-grid {
    grid-template-columns: 1fr;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .span2 {
    grid-column: auto;
  }
  .dialog-body {
    padding: 14px 20px 20px;
  }
  .dialog-head {
    padding: 22px 20px 10px;
  }
  .login {
    margin: 7vh 16px;
    padding: 28px;
  }
  .support-menu {
    right: 15px;
    top: 65px;
  }
  #toast {
    bottom: 90px;
    width: 90%;
    text-align: center;
  }
  .chart {
    gap: 3px;
  }
  .row {
    align-items: flex-start;
  }
  .table-wrap {
    margin: 0 -8px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar select {
    max-width: 100%;
  }
}

.grow {
  flex: 1;
}
progress.progress {
  display: block;
  width: 100%;
  appearance: none;
  border: 0;
}
progress::-webkit-progress-bar {
  background: #edf0e7;
  border-radius: 4px;
}
progress::-webkit-progress-value {
  background: #7f9b5c;
  border-radius: 4px;
}

/* Dense monthly budget table; edit a line through its name. */
.grid:has(.compact-budget-list) { grid-template-columns: minmax(0, 1fr); }
.compact-budget-list { width: 100%; }
.monthly-budget-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.monthly-budget-table th, .monthly-budget-table td { padding: 6px 10px; border-bottom: 1px solid #e3e8df; line-height: 1.25; }
.monthly-budget-table thead th { color: #68756c; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: #f3f6ef; }
.monthly-budget-table th:first-child { width: 42%; text-align: left; }
.monthly-budget-table td, .monthly-budget-table thead th:not(:first-child) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.monthly-budget-table tbody th { font-weight: 400; }
.monthly-budget-table .link { display: block; width: 100%; padding: 0; text-align: left; font-size: inherit; line-height: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monthly-budget-table tbody tr:hover { background: #f6f8f2; }
.monthly-budget-table td:nth-child(4) { font-weight: 600; }
.monthly-budget-table .over-budget { color: #a03232; }
@media (max-width: 700px) {
 .monthly-budget-table { font-size: 11px; }
 .monthly-budget-table th, .monthly-budget-table td { padding: 7px 4px; }
 .monthly-budget-table th:first-child { width: 32%; }
 .monthly-budget-table thead th { font-size: 9px; letter-spacing: 0; }
}

.monthly-budget-table th:last-child { width: 90px; }
.monthly-budget-table .budget-inline-amount { width: 100%; max-width: 100px; height: 26px; padding: 3px 5px; border: 1px solid #dce3d9; border-radius: 4px; background: #fff; text-align: right; font: inherit; font-variant-numeric: tabular-nums; appearance: textfield; }
.budget-inline-amount::-webkit-inner-spin-button, .budget-inline-amount::-webkit-outer-spin-button { appearance: none; margin: 0; }
.budget-row-icons { white-space: nowrap; }
.budget-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 4px; border: 1px solid #dce3d9; border-radius: 5px; background: #f5f8f0; color: #173f35; margin-left: 4px; }
.budget-icon:hover { background: #e4edde; }
.budget-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
@media (max-width: 700px) {
 .monthly-budget-table th:last-child { width: 66px; }
 .budget-icon { margin-left: 2px; width: 27px; }
}
