:root {
  --ink: #0f1e1b;
  --muted: #5a6d68;
  --line: #e7ece8;
  --paper: #f3f6f2;
  --white: #ffffff;
  --green: #0f8f57;
  --green-dark: #0a7042;
  --green-soft: #ebf7f0;
  --green-ink: #0b5837;
  --green-border: #d9efe2;
  --gold: #f2c86d;
  --shadow: 0 16px 32px rgba(16, 35, 28, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
}
button, input { font: inherit; }
button { cursor: pointer; }
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #ecf6ee 0%, #f3f6f2 40%, #e8efe9 100%);
  padding: 24px;
}
.login-card {
  width: min(100%, 420px);
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 24px 22px;
  box-shadow: 0 18px 36px rgba(17, 35, 27, 0.08);
}
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.login-card h2 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 20px;
}
.login-card label {
  display: block;
  margin-bottom: 16px;
}
.login-card label span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.login-card input {
  width: 100%;
  padding: 12px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fbfcfb;
  color: var(--ink);
  font-size: 14px;
}
.login-card input:focus {
  outline: 2px solid rgba(15, 143, 87, 0.18);
  border-color: var(--green);
}
.login-button {
  width: 100%;
  margin-top: 8px;
}
.login-note {
  margin: 16px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}
.otp-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 30, 27, 0.38);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.otp-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}
.otp-modal {
  width: min(100%, 380px);
  background: var(--white);
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: 0 20px 46px rgba(16, 35, 28, 0.12);
}
.otp-modal h2 {
  margin-bottom: 8px;
}
.otp-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.otp-modal input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 18px;
  letter-spacing: .25em;
  text-align: center;
  margin-bottom: 14px;
}
.otp-button { width: 100%; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 242px;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--line);
  padding: 28px 18px 20px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.brand, .mobile-brand {
  color: var(--ink);
  text-decoration: none;
  font: 700 20px "Space Grotesk", sans-serif;
  letter-spacing: -.05em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand-word {
  font-weight: 800;
  letter-spacing: -.08em;
  color: #0f7d4b;
  font-size: 19px;
  text-transform: lowercase;
}
.brand-mark {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: var(--green);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 19px Georgia, serif;
  line-height: 1;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.08);
}
.sidebar-profile {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 28px 6px 22px;
  border-bottom: 1px solid var(--line);
}
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.avatar-large { width: 38px; height: 38px; }
.sidebar-profile strong, .sidebar-profile span { display: block; }
.sidebar-profile strong { font-size: 12px; }
.sidebar-profile span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.nav-list { padding-top: 20px; }
.nav-item {
  border: 0;
  background: transparent;
  text-decoration: none;
  color: var(--muted);
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 5px;
  transition: background .2s, color .2s;
}
.nav-item:hover, .nav-item.active {
  color: var(--green-ink);
  background: var(--green-soft);
}
.nav-icon { font-size: 16px; width: 16px; text-align: center; }
.sidebar-bottom { margin-top: auto; }
.main-content { flex: 1; min-width: 0; }
.topbar {
  height: 78px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 6.5%;
  background: rgba(255,255,255,0.62);
}
.mobile-brand { display: none; }
.mobile-nav { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.icon-button, .topbar-profile, .more-button, .balance-toggle, .modal-close { border: 0; background: transparent; color: var(--muted); }
.icon-button { position: relative; font-size: 19px; }
.notification-dot { position: absolute; top: 2px; right: 0; width: 6px; height: 6px; background: var(--green); border-radius: 50%; }
.topbar-profile { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--ink); font-weight: 600; }
.chevron { color: var(--muted); font-size: 15px; }
.page-content { max-width: 1240px; margin: 0 auto; padding: 42px 6.5% 54px; }
.beneficiary-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(90deg, #edf9f1 0%, #ffffff 100%);
  border: 1px solid var(--green-border);
  border-radius: 16px;
  padding: 14px 18px 12px;
  margin-bottom: 20px;
}
.beneficiary-banner .eyebrow {
  margin-bottom: 5px;
}
.beneficiary-banner strong {
  font-size: 18px;
  color: var(--green-dark);
}
.beneficiary-banner span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.welcome-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}
.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: 10px;
  font-weight: 700;
  margin: 0 0 10px;
}
h1, h2 { font-family: "Space Grotesk", sans-serif; letter-spacing: -.05em; margin: 0; }
h1 { font-size: clamp(30px, 3vw, 40px); line-height: 1.08; }
h2 { font-size: 18px; }
.accent-dot { color: var(--green); }
.lede {
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 14px;
}
.primary-button {
  border: none;
  background: var(--green);
  color: white;
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 10px 18px rgba(15, 143, 87, 0.16);
  transition: transform .2s, background .2s;
}
.primary-button:hover { transform: translateY(-1px); background: var(--green-dark); }
.button-plus { font-size: 18px; vertical-align: -1px; margin-right: 6px; font-weight: 400; }
.overview-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.8fr) minmax(190px, 1fr) minmax(190px, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.balance-card {
  background: linear-gradient(160deg, var(--green) 0%, #1a9c64 100%);
  color: white;
  border-radius: 20px;
  padding: 22px 22px 18px;
  min-height: 220px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.balance-card::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -62px;
  bottom: -70px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.17);
  background: rgba(255,255,255,0.02);
}
.card-topline, .balance-footer { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; }
.card-topline { font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.more-button { color: rgba(255,255,255,.8); letter-spacing: 2px; }
.account-number {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,.74);
  font-size: 11px;
  letter-spacing: .12em;
  margin: 12px 0 22px;
}
.balance-label {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,.78);
  font-size: 11px;
}
.balance-toggle { color: rgba(255,255,255,.8); padding: 0 0 0 5px; font-size: 11px; }
.balance-value {
  position: relative;
  z-index: 1;
  font: 600 29px "Space Grotesk", sans-serif;
  letter-spacing: -.06em;
  margin-top: 5px;
}
.balance-cents { font-size: 16px; opacity: .75; }
.balance-footer {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  color: rgba(255,255,255,.7);
  font-size: 10px;
}
.status-pill { color: white; display: flex; align-items: center; gap: 5px; }
.status-pill span { width: 6px; height: 6px; background: #9ef0be; border-radius: 50%; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-height: 220px;
  box-shadow: 0 1px 0 rgba(12,25,20,0.02);
}
.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.income-icon { color: var(--green-dark); background: var(--green-soft); }
.spend-icon { color: #806525; background: #fff6df; }
.stat-label, .stat-card strong, .stat-change { display: block; }
.stat-label { color: var(--muted); font-size: 11px; margin: 6px 0 14px; }
.stat-card strong { font: 600 18px "Space Grotesk", sans-serif; white-space: nowrap; }
.stat-change { font-size: 10px; color: var(--muted); margin-top: 11px; white-space: nowrap; }
.stat-change.positive { color: var(--green-dark); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .8fr); gap: 24px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 18px; }
.activity-panel { padding: 24px 22px 10px; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-heading .eyebrow { margin-bottom: 6px; }
.text-button { color: var(--green-dark); background: transparent; border: 0; font-size: 11px; font-weight: 700; padding: 6px 0; white-space: nowrap; }
.text-button span { font-size: 16px; margin-left: 4px; }
.transaction { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid #eff3ef; }
.transaction-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.woolworths { color: #0f6aa5; background: #eaf2fb; font-family: Georgia, serif; }
.salary, .transfer { color: var(--green-dark); background: var(--green-soft); font-size: 18px; }
.airtime { color: #8b6824; background: #fff4d9; }
.netflix { color: #d24852; background: #fde7ea; }
.transaction-copy strong, .transaction-copy span { display: block; }
.transaction-copy strong { font-size: 12px; }
.transaction-copy span { color: var(--muted); font-size: 10px; margin-top: 4px; }
.amount { font-size: 12px; white-space: nowrap; }
.negative { color: var(--ink); }
.positive { color: var(--green-dark); }
.right-column { display: flex; flex-direction: column; gap: 18px; }
.quick-panel { padding: 20px 18px 18px; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-actions button {
  min-height: 80px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 12px;
  color: var(--ink);
  text-align: left;
  padding: 11px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 10px;
  transition: border .2s, transform .2s;
}
.quick-actions button:hover { border-color: var(--green); transform: translateY(-1px); }
.quick-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 15px;
}
.purple { color: #4d4bb4; background: #edeafc; }
.mint { color: var(--green-dark); background: var(--green-soft); }
.yellow { color: #8a6821; background: #fff4d9; }
.blue { color: #39779c; background: #ebf6fb; }
.goal-card {
  background: #0f1f1a;
  color: white;
  border-radius: 18px;
  padding: 20px 18px 18px;
  min-height: 170px;
  box-shadow: var(--shadow);
}
.goal-heading { display: flex; justify-content: space-between; align-items: start; }
.goal-card .eyebrow { color: rgba(255,255,255,.6); }
.goal-icon { color: var(--gold); font-size: 20px; }
.goal-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  margin: 22px 0 9px;
  overflow: hidden;
}
.goal-progress span { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.goal-meta { display: flex; justify-content: space-between; font-size: 11px; }
.goal-meta strong { color: var(--gold); }
.goal-note { color: rgba(255,255,255,.7); font-size: 10px; margin: 10px 0 0; }
.statement-panel { padding: 22px 20px 10px; margin-top: 26px; }
.statement-table-wrap { overflow-x: auto; }
.statement-panel table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.statement-panel th,
.statement-panel td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.statement-panel th {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
}
.statement-panel td.positive { color: var(--green-dark); font-weight: 700; }
.statement-panel td.negative { color: var(--ink); font-weight: 700; }
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--ink);
  color: white;
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 12px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 19, 17, 0.35);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(100%, 410px);
  background: var(--white);
  padding: 28px 26px 24px;
  border-radius: 18px;
  position: relative;
  box-shadow: 0 24px 70px rgba(10, 20, 16, 0.15);
}
.modal h2 { font-size: 24px; }
.modal-copy { color: var(--muted); line-height: 1.5; font-size: 12px; margin: 8px 0 22px; }
.modal-close { position: absolute; right: 20px; top: 18px; font-size: 26px; }
.modal label { display: block; color: var(--muted); font-size: 11px; font-weight: 700; margin-top: 14px; }
.modal input {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  margin-top: 7px;
  color: var(--ink);
  outline-color: var(--green);
}
.modal-submit { margin-top: 22px; width: 100%; }
.confirm-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 19, 17, 0.32);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 11;
}
.confirm-backdrop.open { display: flex; }
.confirm-modal {
  width: min(100%, 420px);
  background: var(--white);
  padding: 28px 22px 22px;
  border-radius: 18px;
  position: relative;
  box-shadow: 0 24px 70px rgba(10, 20, 16, 0.15);
}
.confirm-summary {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}
.confirm-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  font-size: 12px;
}
.confirm-summary span { color: var(--muted); }
.confirm-summary strong { color: var(--ink); }
.confirm-submit { width: 100%; }
.success-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 19, 17, 0.32);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 12;
}
.success-backdrop.open { display: flex; }
.success-modal {
  width: min(100%, 420px);
  background: var(--white);
  border-radius: 18px;
  padding: 30px 22px 22px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(10, 20, 16, 0.15);
}
.success-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 26px;
  font-weight: 700;
}
.success-modal h2 { font-size: 24px; }
.success-copy { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 10px auto 20px; max-width: 290px; }
.success-reference { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; display: flex; justify-content: space-between; font-size: 11px; }
.success-reference span { color: var(--muted); }
.success-close { width: 100%; margin-top: 20px; }

@media (max-width: 1020px) {
  .sidebar { width: 210px; }
  .page-content { padding-left: 4%; padding-right: 4%; }
  .topbar { padding: 0 4%; }
  .overview-grid { grid-template-columns: 1.4fr 1fr; }
  .balance-card { grid-row: span 2; }
  .content-grid { grid-template-columns: 1fr; }
  .right-column { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .sidebar { display: none; }
  .topbar { height: 70px; padding: 0 20px; justify-content: space-between; }
  .mobile-brand { display: flex; font-size: 18px; }
  .mobile-brand .brand-mark { width: 25px; height: 25px; font-size: 17px; }
  .profile-name, .chevron { display: none; }
  .topbar-actions { gap: 14px; }
  .mobile-nav {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--line);
  }
  .mobile-nav-item {
    color: var(--muted);
    text-decoration: none;
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 9px 4px 8px;
    font-size: 10px;
    font-weight: 700;
  }
  .mobile-nav-item span { font-size: 16px; line-height: 1; }
  .mobile-nav-item.active { color: var(--green-dark); }
  .page-content { padding: 34px 20px 42px; }
  .welcome-row { display: block; margin-bottom: 28px; }
  .welcome-row .primary-button { margin-top: 22px; width: 100%; }
  h1 { font-size: 31px; }
  .overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .balance-card { grid-column: 1 / -1; grid-row: auto; min-height: 210px; }
  .stat-card { min-height: 145px; padding: 16px 13px; display: block; }
  .stat-icon { margin-bottom: 12px; }
  .stat-card strong { font-size: 15px; }
  .stat-change { font-size: 9px; white-space: normal; }
  .activity-panel { padding: 22px 17px 8px; }
  .right-column { display: flex; }
  .quick-panel { padding: 22px 17px 17px; }
  .goal-card { min-height: 160px; }
  .transaction { grid-template-columns: 32px 1fr auto; gap: 9px; }
  .amount { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
