:root {
  --ink: #203b34;
  --muted: #76837b;
  --green: #173e36;
  --accent: #c9df98;
  --paper: #f7f8f3;
  --line: #e4e9df;
  --white: #fff;
  --red: #a4433b;
  --radius: 18px;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: Manrope, system-ui, sans-serif;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #85b4a2;
  outline-offset: 3px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.eyebrow,
.small-label,
.nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.eyebrow {
  color: var(--muted);
  margin-bottom: 12px;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 8px 0;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: Manrope, sans-serif;
  font-size: 15px;
  font-weight: 700;
}
.brand-icon {
  background: var(--accent);
  color: var(--green);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 23px;
  font-weight: 800;
}
.primary,
.secondary {
  border: 0;
  border-radius: 9px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.primary {
  background: var(--green);
  color: white;
}
.primary:hover {
  background: #295b4e;
}
.secondary {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}
.secondary:hover {
  background: #f0f4ea;
}
.full {
  width: 100%;
}
.text-button,
.link-button {
  border: 0;
  background: none;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 0;
}
.text-button:hover,
.link-button:hover {
  text-decoration: underline;
}
.icon-button {
  border: 0;
  background: transparent;
  font-size: 22px;
  padding: 6px;
  color: inherit;
  border-radius: 6px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 18px;
}
input,
select {
  background: white;
  border: 1px solid #dbe2d6;
  border-radius: 8px;
  padding: 11px 12px;
  min-width: 0;
  color: var(--ink);
  width: 100%;
}
input::placeholder {
  color: #9aa69c;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
.check-label {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-error {
  color: var(--red);
  font-size: 13px;
  margin: 12px 0;
  line-height: 1.5;
  min-height: 16px;
}
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-story {
  background: var(--green);
  color: white;
  padding: 42px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.auth-story:after {
  content: "";
  position: absolute;
  right: -200px;
  bottom: -190px;
  width: 470px;
  height: 470px;
  border: 80px solid #295347;
  border-radius: 50%;
  opacity: 0.5;
  pointer-events: none;
}
.auth-story h1 {
  font-size: clamp(48px, 6vw, 86px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -4px;
  margin: 22px 0 28px;
}
.auth-story em {
  color: var(--accent);
  font-style: normal;
}
.auth-story .eyebrow,
.story-foot {
  color: #a4bcb1;
}
.story-copy {
  color: #c2d1c8;
  font-size: 16px;
  line-height: 1.8;
}
.story-foot {
  font-size: 12px;
}
.auth-panel {
  padding: 44px 24px;
  display: grid;
  place-items: center;
}
.auth-form {
  max-width: 390px;
  width: 100%;
}
.auth-form h2 {
  font-size: 32px;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
.auth-form > .muted {
  margin-bottom: 34px;
}
.auth-form .link-button {
  margin-top: 20px;
}
.app-layout {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--green);
  color: #eaf1e9;
  padding: 30px 22px;
  position: fixed;
  top: 0;
  bottom: 0;
  width: 236px;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  margin: 0 0 52px;
}
.nav-label {
  font-size: 10px;
  color: #819e90;
  margin: 0 14px 14px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
nav button {
  border: 0;
  background: none;
  color: #a9bfb2;
  text-align: left;
  font-size: 13px;
  padding: 13px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
nav button span {
  font-size: 20px;
  width: 22px;
  color: #b1c8b9;
}
nav button:hover {
  background: #254c41;
  color: white;
}
nav button.active {
  background: var(--accent);
  color: var(--green);
  font-weight: 700;
}
nav button.active span {
  color: var(--green);
}
.sidebar-note {
  margin-top: auto;
  border: 1px solid #385b4e;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 30px;
}
.sidebar-note .small-label {
  font-size: 9px;
  color: var(--accent);
}
.sidebar-note p {
  font-size: 12px;
  line-height: 1.8;
  color: #a4bcb1;
  margin-top: 9px;
}
.account {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #385b4e;
  padding-top: 22px;
}
.avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #426154;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.account > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.account strong {
  display: block;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account span {
  display: block;
  color: #90b09c;
  font-size: 10px;
  margin-top: 4px;
}
.workspace {
  grid-column: 2;
  padding: 44px clamp(24px, 4vw, 64px);
  max-width: 1500px;
  width: 100%;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}
.page-header h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.page-header .eyebrow {
  font-size: 10px;
}
.summary-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 22px;
}
.balance-card,
.quiet-card {
  padding: 30px;
  border-radius: var(--radius);
  min-height: 190px;
  position: relative;
  overflow: hidden;
}
.balance-card {
  background: var(--green);
  color: white;
}
.balance-card .small-label {
  color: #bbd1c1;
  position: relative;
  z-index: 1;
}
.balance-card h2 {
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -1.5px;
  margin: 24px 0 13px;
  position: relative;
  z-index: 1;
}
.balance-card p {
  font-size: 11px;
  color: #a5c1b0;
  max-width: 80%;
  position: relative;
  z-index: 1;
}
.balance-decoration {
  position: absolute;
  right: -12px;
  bottom: -20px;
  font-size: 180px;
  line-height: 1;
  color: #325c4e;
  transform: rotate(-15deg);
}
.quiet-card {
  background: #e9eedf;
}
.quiet-card .small-label {
  color: #68815f;
}
.quiet-card h2 {
  font-size: 38px;
  margin: 14px 0 8px;
}
.quiet-card .text-button {
  margin-top: 8px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 34px 0 16px;
  gap: 12px;
}
.section-heading h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
}
.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 18px;
}
.wallet-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.wallet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wallet-symbol {
  background: #f0f3e9;
  border: 1px solid var(--line);
  width: 37px;
  height: 37px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.wallet-card h3 {
  font-size: 14px;
  margin: 18px 0 8px;
}
.wallet-card .wallet-balance {
  font-size: 24px;
  letter-spacing: -0.6px;
  font-weight: 600;
}
.wallet-card .hint {
  margin: 12px 0 0;
}
.wallet-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 9px;
}
.wallet-actions button {
  font-size: 11px;
}
.pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f0f3e9;
  color: #6c7d62;
  font-size: 10px;
}
.pill.transfer {
  color: #537796;
  background: #eaf1f7;
}
.pill.adjustment {
  color: #8e7042;
  background: #f6efdf;
}
.surface {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.activity-row {
  display: grid;
  grid-template-columns: 42px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #edf0e8;
}
.activity-row:last-child {
  border: 0;
}
.activity-icon {
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: #f3f1e8;
  display: grid;
  place-items: center;
  font-size: 17px;
  color: #877357;
}
.activity-icon.income {
  background: #eaf2e4;
  color: #567c49;
}
.activity-icon.transfer {
  background: #edf1f7;
  color: #6381a4;
}
.activity-details {
  min-width: 0;
}
.activity-details strong {
  font-size: 13px;
  font-weight: 600;
  display: block;
  overflow-wrap: anywhere;
}
.activity-details p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.6;
}
.activity-amount {
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
.activity-amount.income {
  color: #467652;
}
.row-buttons {
  display: flex;
  gap: 10px;
}
.row-buttons button {
  font-size: 11px;
}
.empty {
  padding: 45px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.empty strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  margin-bottom: 8px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px;
  align-items: end;
}
.filters label {
  margin: 0;
  flex: 1;
  min-width: 130px;
}
.filters .search-field {
  flex: 1.5;
  min-width: 160px;
}
.filters button {
  margin-bottom: 1px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 12px;
}
.pagination .muted {
  font-size: 12px;
}
.month-label {
  margin: 0;
  max-width: 190px;
}
.spending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.spending-card {
  padding: 26px;
}
.spending-card h3 {
  font-size: 17px;
}
.spent-number {
  font-size: 30px;
  margin: 16px 0 8px;
  letter-spacing: -1px;
  font-weight: 600;
}
.budget-info {
  background: #f3f5ed;
  border-radius: 10px;
  padding: 14px;
  margin: 22px 0;
}
.budget-info p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.budget-info strong {
  color: var(--ink);
}
.budget-bar {
  height: 5px;
  background: #dae4d1;
  border-radius: 9px;
  overflow: hidden;
  margin: 9px 0;
}
.budget-bar > span {
  height: 100%;
  display: block;
  background: #91ad67;
}
.budget-bar.over > span {
  background: #b36553;
}
.breakdown-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 20px;
  font-size: 12px;
}
.breakdown-bar {
  grid-column: 1/-1;
  height: 4px;
  background: #f0f3e9;
  border-radius: 6px;
  overflow: hidden;
}
.breakdown-bar > span {
  height: 100%;
  background: #b5c8a2;
  display: block;
}
.category-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.category-row:last-child {
  border: 0;
}
.category-row strong {
  font-size: 13px;
}
.category-row .pill {
  margin-left: 10px;
}
.workspace-footer {
  font-size: 10px;
  color: #9aa599;
  letter-spacing: 0.4px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  width: calc(100% - 32px);
  max-width: 480px;
  color: var(--ink);
  box-shadow: 0 25px 100px #173e3633;
}
dialog::backdrop {
  background: #173e3680;
  backdrop-filter: blur(3px);
}
.dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 26px;
}
.dialog-header h2 {
  font-size: 24px;
  letter-spacing: -0.6px;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: end;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
#notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: var(--green);
  color: white;
  border-radius: 10px;
  padding: 14px 22px;
  font-size: 13px;
  box-shadow: 0 6px 30px #173e3633;
  max-width: 90vw;
}
#notice.error {
  background: #8d433a;
}
.danger {
  color: var(--red) !important;
}
.readonly {
  background: #f1f3ed;
}
.helper-box {
  padding: 14px;
  background: #f1f4eb;
  border-radius: 9px;
  margin-bottom: 20px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
@media (min-width: 1500px) {
  .workspace {
    margin: auto;
  }
}
@media (max-width: 1000px) {
  .workspace {
    padding: 32px 24px;
  }
  .sidebar {
    width: 205px;
    padding: 26px 16px;
  }
  .app-layout {
    grid-template-columns: 205px 1fr;
  }
  .sidebar .brand {
    font-size: 13px;
  }
  .page-header h1 {
    font-size: 26px;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .balance-card h2 {
    font-size: 29px;
  }
  .row-buttons {
    flex-direction: column;
    gap: 0;
  }
  .auth-story {
    padding: 36px;
  }
}
@media (max-width: 720px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-story {
    min-height: auto;
    padding: 24px;
  }
  .auth-story > div,
  .story-foot {
    display: none;
  }
  .auth-panel {
    padding: 50px 24px;
  }
  .app-layout {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 18px 20px;
  }
  .sidebar .brand {
    margin: 0 0 18px;
    font-size: 15px;
  }
  .nav-label,
  .sidebar-note {
    display: none;
  }
  .account {
    margin-top: 16px;
    padding-top: 14px;
  }
  .account > div:nth-child(2) {
    max-width: 200px;
  }
  nav {
    flex-direction: row;
    overflow: auto;
    gap: 5px;
  }
  nav button {
    white-space: nowrap;
    font-size: 11px;
    padding: 9px;
  }
  nav button span {
    display: none;
  }
  .workspace {
    padding: 26px 20px;
  }
  .page-header {
    align-items: start;
    flex-direction: column;
    margin-bottom: 24px;
  }
  .page-header h1 {
    font-size: 27px;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .balance-card,
  .quiet-card {
    padding: 24px;
    min-height: auto;
  }
  .balance-card h2 {
    font-size: 34px;
  }
  .quiet-card {
    display: none;
  }
  .toolbar {
    align-items: start;
    flex-direction: column;
  }
  .wallet-grid,
  .spending-grid {
    grid-template-columns: 1fr;
  }
  .activity-row {
    grid-template-columns: 32px 1fr auto;
    padding: 17px 15px;
    gap: 10px;
  }
  .activity-icon {
    width: 30px;
    height: 30px;
  }
  .row-buttons {
    grid-column: 2/-1;
    flex-direction: row;
  }
  .activity-amount {
    font-size: 12px;
  }
  .form-grid {
    gap: 12px;
  }
  .filters label {
    min-width: 120px;
  }
  .pagination .secondary {
    padding: 10px;
    font-size: 11px;
  }
  .workspace-footer {
    margin-top: 30px;
  }
  .sidebar:after {
    content: none;
  }
}
