:root {
  --green: #0d4a32;
  --green-deep: #083524;
  --gold: #c3922e;
  --ink: #1c1c1e;
  --muted: #6e6e73;
  --line: #e8e8ed;
  --bg: #f2f2f7;
  --card: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #111;
  -webkit-text-size-adjust: 100%;
}

body:not(.is-editing) .edit-only { display: none !important; }
body.is-editing .bal-show { display: none; }

.page-login { background: #fff; }
.site-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: #fff;
  border-bottom: 1px solid #ececec;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.site-bar nav { display: flex; gap: 16px; }
.site-bar nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}
.login-stage {
  min-height: calc(100vh - 120px);
  background: var(--green);
  display: grid;
  place-items: center;
  padding: 36px 20px 80px;
  position: relative;
  overflow: hidden;
}
.stage-mark {
  position: absolute;
  left: 6%;
  bottom: -20px;
  width: 180px;
  height: 140px;
  background: rgba(255,255,255,0.08);
  clip-path: polygon(8% 100%, 8% 42%, 50% 8%, 92% 42%, 92% 100%, 68% 100%, 68% 62%, 32% 62%, 32% 100%);
}
.login-card {
  width: min(380px, 100%);
  background: #fff;
  padding: 28px 24px 22px;
  border-radius: 2px;
  position: relative;
  z-index: 1;
}
.login-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 0 0 22px;
}
.bldg {
  width: 22px;
  height: 18px;
  background: var(--green);
  clip-path: polygon(10% 100%, 10% 40%, 50% 8%, 90% 40%, 90% 100%, 70% 100%, 70% 62%, 30% 62%, 30% 100%);
}
.card-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}
.login-card label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
.field { position: relative; }
.login-card input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #ccc;
  padding: 8px 36px 8px 0;
  font: inherit;
  background: transparent;
}
.login-card input:focus { outline: none; border-bottom-color: var(--green); }
.field-ico {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: #8a8a8e;
  padding: 0;
  cursor: pointer;
}
.field-ico svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.field-ico.text { font-size: 12px; color: var(--muted); }
.fine.right { text-align: right; font-size: 12px; margin: 8px 0 16px; }
.fine a, .enroll a, .site-foot a { color: var(--muted); text-decoration: none; }
.login-card button[type="submit"] {
  width: 100%;
  background: var(--gold);
  color: #fff;
  border: 0;
  border-radius: 20px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
}
.enroll { text-align: center; font-size: 12px; color: var(--muted); margin: 16px 0 0; }
.login-err {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: #b42318;
}
.site-foot {
  background: #fff;
  padding: 16px 22px 22px;
  color: var(--muted);
  font-size: 12px;
}
.site-foot p { margin: 0 0 8px; }
.site-foot a { margin-right: 14px; }

.app { background: var(--bg); min-height: 100vh; }
.phone {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.app-top {
  background: var(--green);
  color: #fff;
  padding: 14px max(20px, calc((100% - 1080px) / 2)) 22px;
}
.app-top.short { padding-bottom: 16px; }
.status {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  margin-bottom: 18px;
}
.app-name {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.app-name a { color: #fff; text-decoration: none; }
.icon-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: #fff;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-sheet {
  display: grid;
  gap: 2px;
  margin: -8px 0 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
}
.menu-sheet[hidden] { display: none; }
.menu-sheet a {
  color: #fff;
  text-decoration: none;
  padding: 10px 12px;
  font-size: 14px;
}
.hello {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.hello h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.lede {
  margin: 4px 0 0;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
}
.who { display: flex; align-items: center; gap: 6px; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #c8a27a;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.edit-ghost {
  border: 0;
  background: none;
  color: rgba(255,255,255,0.22);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.edit-ghost:hover { color: #fff; }
.name-opt { display: block; margin: 12px 0 0; font-size: 12px; }
.name-opt input {
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 0;
  border-radius: 6px;
}
.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
}

.cards {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 22px 0 0;
  scrollbar-width: none;
}
.cards::-webkit-scrollbar { display: none; }
.cards.show-all {
  display: grid;
  overflow: visible;
  gap: 16px;
}
.acct-card {
  min-width: 100%;
  scroll-snap-align: start;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 14px;
}
.cards.show-all .acct-card { min-width: 0; }
.acct-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.acct-name { margin: 0; font-size: 16px; font-weight: 500; }
.acct-mask { margin: 6px 0 0; font-size: 12px; color: rgba(255,255,255,0.7); }
.bal { margin: 0; font-size: 16px; font-weight: 500; text-align: right; }
.avail { margin: 6px 0 0; font-size: 12px; text-align: right; color: rgba(255,255,255,0.7); }
.bal-input {
  width: 150px;
  font-size: 16px;
  font-weight: 600;
  text-align: right;
  border: 0;
  border-radius: 6px;
  padding: 4px 6px;
}

.card-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 28px;
  margin-top: 14px;
}
.dots { display: flex; gap: 6px; }
.dot {
  width: 6px;
  height: 6px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
}
.dot.on { background: #fff; }
.view-all {
  position: absolute;
  right: 0;
  border: 0;
  background: none;
  color: rgba(255,255,255,0.8);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.kpis { margin-top: 12px; display: grid; gap: 8px; }
.kpi {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}
.kpi strong { font-size: 16px; color: #fff; font-weight: 600; }

.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 22px;
  padding-bottom: 6px;
}
.quick a {
  color: #fff;
  text-decoration: none;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
}
.quick i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 auto 8px;
  font-style: normal;
}
.quick svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tx {
  background: #fff;
  flex: 1;
  padding: 16px max(20px, calc((100% - 1080px) / 2)) 8px;
}
.tx-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.tx h2, .credit-block h2, .detail-bar h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.tx-dots { color: #b0b0b5; letter-spacing: 1px; }
.tx-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.tx-row strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.tx-row span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.tx-row em {
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}
.see-more {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  color: #8d8d92;
  font: inherit;
  font-size: 13px;
  padding: 16px 0 18px;
  cursor: pointer;
}
.see-more[hidden] { display: none; }

.credit-block {
  background: #fff;
  padding: 8px max(20px, calc((100% - 1080px) / 2)) 28px;
  border-top: 8px solid var(--bg);
}
.credit-block .acct-card {
  color: var(--ink);
  background: #f4f4f6;
  min-width: 0;
}
.credit-block .acct-mask,
.credit-block .avail { color: var(--muted); }

.form-pad {
  padding: 18px max(20px, calc((100% - 1080px) / 2)) 32px;
  max-width: none;
}
.form-pad > * { max-width: 520px; }
.form-pad label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.form-pad input, .form-pad select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
}
.form-pad button {
  width: 100%;
  margin-top: 18px;
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 20px;
  padding: 12px;
  font-weight: 700;
}
.ok { color: #1b6b3a; }
.form-err {
  margin: 12px 0 0;
  font-size: 13px;
  color: #b42318;
  font-weight: 600;
}

.detail { flex: 1; background: var(--bg); }
.detail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px max(20px, calc((100% - 1080px) / 2));
  background: #fff;
}
.back-link {
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 0;
  cursor: pointer;
}
.detail-hero {
  background: #fff;
  padding: 8px max(20px, calc((100% - 1080px) / 2)) 22px;
}
.detail-hero h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.detail-hero .amt {
  margin: 10px 0 0;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.detail-list {
  background: #fff;
  margin-top: 10px;
  padding: 6px max(20px, calc((100% - 1080px) / 2)) 18px;
}
.detail-row, .action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.detail-row span, .action-row span { color: var(--muted); }
.detail-row strong { font-weight: 500; }
.action-row {
  width: 100%;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  background: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
}
.action-row b { font-weight: 500; }
.detail-list h3 {
  margin: 18px 0 8px;
  font-size: 14px;
}
.acct-foot {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--muted);
}

@media (min-width: 760px) {
  .cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    overflow: visible;
    scroll-snap-type: none;
  }
  .acct-card { min-width: 0; }
  .dots { display: none; }
  .hello h1 { font-size: 34px; }
  .quick { max-width: 480px; }
}
