:root {
  --green: #00794b;
  --green-dark: #00663f;
  --green-pale: #e3f2ec;
  --dark: #292a2d;
  --muted: #696c70;
  --bg: #f3f3f4;
  --line: #d8d8da;
  --focus: #005fcc;
  --red: #d71920;
}

* { box-sizing: border-box; }

html { background: #ddd; }

body {
  margin: 0;
  min-height: 100vh;
  background: #ddd;
  color: var(--dark);
  display: grid;
  place-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

button, input, select { font: inherit; }
button {
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.phone {
  width: 430px;
  max-width: 100vw;
  height: 100vh;
  min-height: 620px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.topbar {
  height: 72px;
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  align-items: center;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 3;
}

.icon, .help, .brand {
  border: 0;
  background: transparent;
  color: var(--dark);
}

.icon, .help {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
}

.icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.help {
  justify-self: end;
  border: 0;
  border-radius: 0;
}
.help svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

.brand {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0;
}

.logo-crop {
  display: block;
  width: 150px;
  height: 43px;
  overflow: hidden;
}

.brand img {
  display: block;
  width: 150px;
  height: 150px;
  transform: translateY(-54px);
}

.demo-label {
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.view {
  height: calc(100% - 152px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.view::-webkit-scrollbar { display: none; }

.section { padding: 22px 18px; }
.section + .section { padding-top: 4px; }
.section.white { background: #fff; }
.section-heading, .title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.section-heading { margin-bottom: 18px; }
.section-heading h1, .section-heading h2, .page-title { margin: 0; }
.section-heading h2 { font-size: 22px; }
.page-title { font-size: 28px; }
.link-button {
  border: 0;
  background: transparent;
  color: var(--green-dark);
  font-weight: 800;
  padding: 8px 2px;
}
.link-button::after { content: "  ›"; font-size: 25px; vertical-align: -2px; }

.account-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.account-tile {
  width: 184px;
  min-height: 150px;
  text-align: left;
  border: 0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 2px 8px #0003;
  padding: 0 18px;
  position: relative;
  color: var(--dark);
}
.account-tile::before {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 0;
  width: 4px;
  border-radius: 4px;
  background: #00a16b;
}
.account-tile-copy { position: absolute; top: 33px; left: 16px; right: 12px; display: block; }
.account-tile strong { display: block; font-size: 18px; margin-bottom: 5px; }
.account-tile .number { font-size: 14px; }
.account-tile .branch { position: absolute; left: 16px; bottom: 15px; color: #777; font-size: 13px; }
.edit-button {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  border: 0;
  background: transparent;
  color: var(--green-dark);
  font-size: 20px;
  font-weight: 800;
  padding: 0;
}
.round-arrow {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--green-dark);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.assistant-row { display: flex; align-items: center; gap: 13px; margin-bottom: 23px; }
.avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d8ece8;
  border: 3px solid #c5e1dc;
  color: var(--green-dark);
  font-size: 24px;
  font-weight: 900;
}
.assistant-row strong { display: block; font-size: 21px; }
.assistant-row span { color: var(--muted); font-size: 17px; }
.insight-card { padding: 20px; }
.insight-card time { font-size: 17px; }
.insight-card h3 { font-size: 22px; margin: 13px 0 5px; }
.insight-card p { margin: 0; line-height: 1.45; font-size: 17px; }

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 5px #0002;
}

.account-header { padding: 20px 18px 4px; }
.account-header h1 { font-size: 27px; margin: 0 0 5px; }
.account-header h2 { font-size: 20px; margin: 0 0 4px; }
.account-header p { font-weight: 700; color: var(--muted); font-size: 16px; margin: 0; }
.balance-card { margin: 14px 17px; padding: 22px 18px; }
.label { text-align: center; color: var(--muted); font-weight: 750; font-size: 15px; margin: 0; }
.balance-card h3 { text-align: center; font-size: 31px; margin: 4px 0 9px; }
.balance-card p:not(.label) { font-size: 15px; line-height: 1.35; }
.primary, .secondary, .danger-button {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 17px;
  font-weight: 800;
  margin-top: 13px;
}
.primary { background: var(--green); color: #fff; border: 2px solid var(--green); }
.secondary { background: #fff; color: var(--green-dark); border: 2px solid var(--green-dark); }
.danger-button { background: #fff; color: #a60000; border: 2px solid #a60000; }
.primary:hover { background: #006f43; border-color: #006f43; }
.secondary:hover { background: #edf7f3; }
.transfer-button { display: flex; justify-content: center; align-items: center; gap: 22px; }
.transfer-button span { font-size: 25px; line-height: .6; }

.tabs { margin: 16px 17px; display: grid; grid-template-columns: repeat(3, 1fr); background: #ddd; border-radius: 8px; overflow: hidden; }
.tabs button {
  min-height: 48px;
  border: 0;
  background: #ddd;
  color: var(--dark) !important;
  -webkit-text-fill-color: var(--dark);
  opacity: 1;
  padding: 10px 3px;
  font-size: 14px;
}
.tabs .active { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--dark) !important; -webkit-text-fill-color: var(--dark); font-weight: 750; }
.tools { display: flex; gap: 12px; margin: 0 17px; }
.search, .filter {
  min-height: 46px;
  border: 2px solid #00724a;
  background: #fff;
  color: #00724a;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 750;
  padding: 9px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.search { background: var(--green); color: #fff; width: 50px; padding: 0; }
.search svg, .filter svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search-panel { margin: 12px 17px 0; display: flex; gap: 8px; }
.search-panel input { min-width: 0; flex: 1; min-height: 44px; border: 2px solid var(--green); border-radius: 8px; padding: 8px 11px; }
.search-panel button { border: 0; border-radius: 8px; background: var(--green); color: #fff; padding: 0 14px; font-weight: 750; }
.transactions { margin: 14px 17px; padding: 18px; }
.transactions h2 { font-size: 22px; margin: 0 0 10px; }
.tx { display: grid; grid-template-columns: 38px 1fr auto 14px; gap: 9px; align-items: center; border-bottom: 1px solid #bbb; padding: 15px 0; }
.tx:last-child { border-bottom: 0; }
.badge { width: 34px; height: 34px; border-radius: 50%; background: #d4eee5; color: var(--green-dark); display: grid; place-items: center; font-weight: 900; }
.name { font-size: 16px; line-height: 1.18; }
.date { color: var(--muted); font-size: 14px; margin-top: 4px; }
.amount { font-size: 16px; white-space: nowrap; }
.credit { color: var(--green); }
.empty { color: var(--muted); text-align: center; padding: 26px 10px; }

.list-page { padding: 22px 17px; }
.list-page .page-title { margin-bottom: 18px; }
.menu-list { display: grid; gap: 11px; }
.menu-item {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  border: 0;
  border-radius: 13px;
  background: #fff;
  padding: 14px;
  color: var(--dark);
  box-shadow: 0 1px 4px #0002;
}
.menu-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--green-pale); color: var(--green-dark); }
.menu-copy strong { display: block; font-size: 17px; }
.menu-copy span { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
.chevron { color: var(--green-dark); font-size: 28px; }
.message-unread { border-left: 5px solid var(--green); }
.product-card { padding: 20px; margin-bottom: 13px; }
.product-card h2 { font-size: 20px; margin: 0 0 7px; }
.product-card p { color: var(--muted); margin: 0 0 13px; line-height: 1.4; }

.account-screen .brand { visibility: hidden; }
.account-screen .topbar { background: var(--bg); }
.top-level-screen .topbar { display: none; }
.top-level-screen .view { height: calc(100% - 80px); }
.top-level-screen .list-page { padding-top: 86px; }

.account-panel { margin: 17px; padding: 22px 18px; }
.account-panel h2 { margin: 0 0 18px; font-size: 23px; }
.detail-list { display: grid; }
.detail-row {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid #a7a7a7;
  background: transparent;
  color: var(--dark);
  text-align: left;
  font-size: 17px;
}
.detail-row strong { font-size: 17px; font-weight: 500; white-space: nowrap; }
.detail-row.single { justify-content: flex-start; }
.detail-row.account-number span:first-child { max-width: 135px; }
.detail-row.account-number strong { font-size: 14px; }
.detail-row .chevron { color: var(--dark); }
.info-dot { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: 6px; border-radius: 50%; background: #777; color: #fff; font-weight: 800; font-size: 17px; }
.plan-card h2 { margin-bottom: 5px; }
.plan-row { align-items: flex-start; }
.plan-row strong { display: block; font-size: 18px; }
.plan-row small { display: block; margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.statement-panel h2 { font-size: 23px; }
.statement-row { min-height: 62px; }
.statement-row span:first-child { white-space: nowrap; }

.top-level-page { min-height: 100%; padding: 88px 18px 32px; }
.top-level-page .page-title { margin: 0 0 30px; font-size: 29px; }
.service-list { display: grid; gap: 17px; }
.service-card {
  width: 100%;
  min-height: 112px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 22px;
  align-items: start;
  gap: 13px;
  border: 0;
  padding: 22px 18px;
  color: var(--dark);
  text-align: left;
}
.ui-icon { width: 24px; height: 24px; display: block; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-chevron { width: 21px; height: 21px; color: var(--dark); align-self: center; }
.service-icon { color: #00965e; line-height: 1; display: grid; place-items: center; }
.service-icon .ui-icon { width: 27px; height: 27px; }
.service-copy strong { display: block; font-size: 19px; line-height: 1.25; }
.service-copy span { display: block; color: #777; margin-top: 12px; font-size: 17px; line-height: 1.35; }
.service-card .chevron { color: var(--dark); line-height: .8; }

.transactions-page {
  padding-left: 18px;
  padding-right: 18px;
  background: linear-gradient(to bottom, #dcefe7 0, #dcefe7 510px, var(--bg) 510px, var(--bg) 100%);
}
.transaction-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.transaction-actions button {
  min-width: 0;
  min-height: 142px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  padding: 18px;
  color: #080808;
  text-align: left;
}
.transaction-actions button:nth-child(n+4) { margin-top: 1px; }
.transaction-actions .action-icon { display: block; color: #00965e; line-height: 1; margin-bottom: 15px; }
.transaction-actions .action-icon .ui-icon { width: 32px; height: 32px; }
.transaction-actions strong { display: block; font-size: 18px; line-height: 1.25; }
.transaction-actions em { font-weight: inherit; }
.transaction-links { display: grid; gap: 18px; margin-top: 36px; }
.transaction-links .service-card { min-height: 118px; }

.more-page { padding: 0 0 32px; }
.more-hero { background: #dcefe7; padding: 88px 18px 18px; border-radius: 0 0 20px 20px; }
.more-hero .page-title { margin-bottom: 48px; }
.profile-badge { width: 66px; height: 66px; margin: -22px 0 -30px 18px; border: 3px solid #cce8dc; border-radius: 50%; background: #fff; color: var(--green-dark); display: grid; place-items: center; position: relative; z-index: 1; }
.profile-badge > .ui-icon { width: 34px; height: 34px; }
.profile-badge small { position: absolute; right: 8px; bottom: 7px; display: block; border-radius: 50%; background: #fff; }
.profile-badge small .ui-icon { width: 15px; height: 15px; }
.menu-icon .ui-icon { width: 23px; height: 23px; }
.more-card { padding: 45px 18px 0; box-shadow: none; }
.more-row {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px 1fr 20px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #aaa;
  background: transparent;
  color: var(--dark);
  padding: 10px 0;
  text-align: left;
  font-size: 18px;
}
.more-row:last-child { border-bottom: 0; }
.more-row .chevron { color: var(--dark); }
.group-title { margin: 28px 18px 12px; color: #777; font-size: 20px; font-weight: 400; }
.group-title + .more-card { margin: 0 18px; padding: 8px 18px; }

.bottomnav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--green-dark);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  z-index: 4;
}
.bottomnav button { min-height: 60px; border: 0; background: transparent; color: #bdd8ce; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 2px; position: relative; }
.bottomnav svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bottomnav span { font-size: 11px; }
.bottomnav .active { color: #fff; font-weight: 800; background: transparent; }
.bottomnav .active::after { content: ""; position: absolute; bottom: 4px; width: 28px; height: 3px; border-radius: 3px; background: #fff; }
.bottomnav .has-alert::before { content: ""; position: absolute; top: 11px; right: 24px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); border: 2px solid #fff; z-index: 1; }
.bottomnav button:focus-visible { outline-color: #fff; outline-offset: -4px; }

.modal {
  width: min(370px, calc(100vw - 30px));
  border: 0;
  border-radius: 17px;
  padding: 0;
  color: var(--dark);
  box-shadow: 0 18px 50px #0006;
}
.modal::backdrop { background: #0008; }
.modal-inner { padding: 24px; }
.modal h2 { margin: 0 0 10px; font-size: 23px; }
.modal p { line-height: 1.45; color: var(--muted); }
.modal label { display: block; font-weight: 700; margin: 14px 0 5px; }
.modal input, .modal select { width: 100%; min-height: 45px; border: 1px solid #999; border-radius: 7px; padding: 9px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; min-height: 44px; border-radius: 8px; font-weight: 800; }
.modal-actions .primary, .modal-actions .secondary { margin: 0; font-size: 15px; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); width: min(380px, calc(100vw - 30px)); background: #222; color: #fff; padding: 13px 17px; border-radius: 9px; text-align: center; z-index: 10; box-shadow: 0 4px 20px #0005; }

@media (max-width: 430px) {
  .phone { width: 100vw; }
  .logo-crop { width: 137px; }
  .brand img { width: 137px; height: 137px; transform: translateY(-49px); }
  .demo-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
