/* ============================================================
   CTC Cash — Cash App clone design system
   Faithful to Cash App iOS (2025): light surfaces, Cash green,
   pill buttons, big rounded cards, green fullscreen keypad.
   ============================================================ */

@font-face {
  font-family: 'CashSans';
  src: url('../assets/fonts/manrope-var-latin.woff2') format('woff2-variations');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --green: #00D632;
  --green-press: #00b82b;
  --green-dark: #00991f;
  --green-tint: #e4fbe9;
  --bg: #ffffff;
  --surface: #f4f4f5;
  --surface-2: #ececee;
  --ink: #101010;
  --ink-2: rgba(16, 16, 16, 0.55);
  --ink-3: rgba(16, 16, 16, 0.34);
  --line: rgba(16, 16, 16, 0.08);
  --red: #ff3126;
  --bitcoin: #00D2DE;
  --card-lime: #D6FF3F;
  --radius-card: 24px;
  --radius-btn: 999px;
  --pad: 20px;
  --tabbar-h: 64px;
  --dur: 0.28s;
  --ease: cubic-bezier(0.32, 0.72, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  font-family: 'CashSans', -apple-system, 'Helvetica Neue', sans-serif;
  background: #0c0d0e;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button {
  font-family: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}
input { font-family: inherit; border: 0; outline: none; background: none; color: inherit; }
::placeholder { color: var(--ink-3); }

/* ---------- Phone frame (desktop) ---------- */

#stage {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#phone {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 520px) and (min-height: 700px) {
  #stage {
    background:
      radial-gradient(1200px 700px at 75% -10%, rgba(0, 214, 50, 0.16), transparent 60%),
      radial-gradient(900px 600px at 15% 110%, rgba(0, 214, 50, 0.10), transparent 55%),
      #0c0d0e;
  }
  #phone {
    width: 393px;
    height: 852px;
    max-height: calc(100vh - 48px);
    border-radius: 56px;
    border: 10px solid #1d1e20;
    box-shadow:
      0 0 0 2px #3a3b3d,
      0 40px 90px rgba(0, 0, 0, 0.65),
      inset 0 0 4px rgba(255, 255, 255, 0.08);
  }
  #phone::before { /* dynamic island */
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 118px;
    height: 34px;
    background: #000;
    border-radius: 20px;
    z-index: 300;
    pointer-events: none;
  }
}

/* ---------- Status bar ---------- */

#statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 54px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 34px 8px;
  font-size: 15px;
  font-weight: 700;
  z-index: 200;
  pointer-events: none;
  color: var(--ink);
  transition: color 0.25s;
}
#statusbar.on-green, #statusbar.on-dark { color: #fff; }
#statusbar .sb-icons { display: flex; align-items: center; gap: 6px; }
#statusbar svg { display: block; }

/* ---------- App shell ---------- */

#screens {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 64px var(--pad) calc(var(--tabbar-h) + 28px);
  scrollbar-width: none;
}
.screen-scroll::-webkit-scrollbar { display: none; }
.screen.no-tabbar .screen-scroll { padding-bottom: 40px; }

/* stacked (pushed) screens slide in from the right */
.screen.push-enter { animation: pushIn var(--dur) var(--ease) both; }
.screen.push-exit { animation: pushOut var(--dur) var(--ease) both; }
@keyframes pushIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes pushOut { from { transform: translateX(0); } to { transform: translateX(100%); } }

.screen.fade-enter { animation: fadeIn 0.22s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* tab switch: subtle fade/scale */
.screen.tab-enter { animation: tabIn 0.2s ease both; }
@keyframes tabIn { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: scale(1); } }

/* ---------- Tab bar ---------- */

#tabbar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--tabbar-h) + 14px);
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  z-index: 150;
  transition: transform var(--dur) var(--ease), opacity 0.2s;
}
#tabbar.hidden { transform: translateY(110%); opacity: 0; pointer-events: none; }

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--ink-3);
  transition: color 0.15s, transform 0.1s;
}
.tab-btn:active { transform: scale(0.9); }
.tab-btn.active { color: var(--ink); }
.tab-btn svg { width: 26px; height: 26px; }
.tab-btn .tab-dollar {
  width: 44px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.5px;
}

/* ---------- Headers ---------- */

.view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.view-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; }

.nav-head {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 60px var(--pad) 6px;
  min-height: 104px;
}
.nav-head .nav-title { font-size: 17px; font-weight: 800; }

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  color: var(--ink);
  transition: transform 0.1s, background 0.15s;
}
.icon-btn:active { transform: scale(0.88); background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.plain { background: transparent; }
.on-green .icon-btn, .icon-btn.on-green { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* ---------- Avatars ---------- */

.avatar {
  --sz: 48px;
  width: var(--sz); height: var(--sz);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: calc(var(--sz) * 0.38);
  color: #fff;
  flex-shrink: 0;
  user-select: none;
  background: var(--green);
}
.avatar.merchant { border-radius: 34%; }
.avatar.icon-only svg { width: 46%; height: 46%; }

/* ---------- Cards & sections ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 14px;
}
.card.tappable { transition: transform 0.12s, background 0.15s; cursor: pointer; }
.card.tappable:active { transform: scale(0.98); background: var(--surface-2); }

.card-label { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.card-value { font-size: 32px; font-weight: 800; letter-spacing: -0.8px; }
.card-sub { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }

.section-title {
  font-size: 18px; font-weight: 800; letter-spacing: -0.3px;
  margin: 26px 0 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-title .see-all { font-size: 14px; font-weight: 700; color: var(--ink-2); }

/* ---------- Buttons ---------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
  transition: transform 0.12s, background 0.15s, opacity 0.15s;
  user-select: none;
}
.btn:active { transform: scale(0.96); }
/* Cash App disabled buttons are solid light-gray with gray text — never a translucent tint. */
.btn:disabled { pointer-events: none; background: #E5E5EA !important; color: #B0B0B5 !important; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:active { background: var(--green-press); }
.btn-cyan { background: var(--bitcoin); color: #fff; }
.btn-cyan:active { filter: brightness(0.92); }
.btn-gray { background: var(--surface); color: var(--ink); }
.btn-gray:active { background: var(--surface-2); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-white { background: #fff; color: var(--ink); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ---------- List rows ---------- */

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  width: 100%;
  text-align: left;
  transition: opacity 0.1s;
}
.row:active { opacity: 0.55; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { text-align: right; flex-shrink: 0; }
.row-amount { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }
.row-amount.pos { color: var(--green-dark); }
.row-when { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-top: 2px; }
.row-chevron { color: var(--ink-3); flex-shrink: 0; }
.row-chevron svg { width: 16px; height: 16px; display: block; }

.group-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
  text-transform: none;
  margin: 20px 0 4px;
}

/* ---------- Search field ---------- */

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 12px;
}
.search-field svg { width: 18px; height: 18px; color: var(--ink-3); flex-shrink: 0; }
.search-field input { flex: 1; font-size: 16px; font-weight: 600; min-width: 0; }

/* ---------- Money tab ---------- */

.balance-hero { padding: 8px 4px 4px; }
.balance-label { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.balance-amount {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin: 4px 0 4px;
  font-variant-numeric: tabular-nums;
}
.balance-account { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.balance-actions { display: flex; gap: 10px; margin: 18px 0 6px; }
.balance-actions .btn { flex: 1; }

.money-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.money-tile {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 18px;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  transition: transform 0.12s, background 0.15s;
}
.money-tile:active { transform: scale(0.97); background: var(--surface-2); }
.money-tile .tile-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.money-tile .tile-icon svg { width: 19px; height: 19px; }
.money-tile .tile-name { font-size: 15px; font-weight: 800; margin-top: 12px; }
.money-tile .tile-sub { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.money-tile .tile-value { font-size: 17px; font-weight: 800; margin-top: 10px; }

.progress {
  width: 100%; height: 7px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 10px;
}
.progress b { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width 0.6s var(--ease); }

.promo-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(112deg, #003d10, #00701d 55%, #00991f);
  color: #fff;
  border-radius: var(--radius-card);
  padding: 18px;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}
.promo-banner::after {
  content: '';
  position: absolute;
  right: -30px; top: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(0, 214, 50, 0.35);
  filter: blur(2px);
}
.promo-banner .promo-title { font-size: 15px; font-weight: 800; }
.promo-banner .promo-sub { font-size: 12.5px; font-weight: 600; opacity: 0.8; margin-top: 2px; }

/* ---------- Payments (green keypad) ---------- */

.screen.pay { background: var(--green); color: #fff; }
.pay-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 60px 24px calc(var(--tabbar-h) + 24px);
}
.pay-top { display: flex; justify-content: space-between; align-items: center; }
.pay-amount-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
.pay-amount {
  font-size: 76px;
  font-weight: 800;
  letter-spacing: -3px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  white-space: nowrap;
  transition: font-size 0.15s;
}
.pay-amount.long { font-size: 56px; letter-spacing: -2px; }
.pay-amount .cents { opacity: 0.85; }
.pay-amount.shake { animation: shake 0.4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-9px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-5px); }
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin: 8px 0 18px;
}
.key {
  height: 62px;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, transform 0.08s;
}
.key:active { background: rgba(255, 255, 255, 0.22); transform: scale(0.94); }
.key svg { width: 26px; height: 26px; }

.pay-cta { display: flex; gap: 10px; }
.pay-cta .btn {
  flex: 1;
  height: 56px;
  background: rgba(0, 0, 0, 0.16);
  color: #fff;
  font-size: 17px;
}
.pay-cta .btn:active { background: rgba(0, 0, 0, 0.28); }

.pill-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.16);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.pill-toggle svg { width: 14px; height: 14px; }

/* ---------- Select recipient / new payment ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.chip {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  background: var(--surface);
  border-radius: 99px;
  font-size: 14px; font-weight: 700;
}
.chip .avatar { --sz: 26px; }

.to-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--line);
  font-size: 16px; font-weight: 700;
}
.to-bar .to-label { color: var(--ink-2); }
.to-bar input { flex: 1; font-size: 16px; font-weight: 700; }

/* ---------- Payment confirm sheet ---------- */

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 220;
  opacity: 0;
  transition: opacity 0.25s;
}
.sheet-backdrop.show { opacity: 1; }

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  padding: 14px 22px calc(env(safe-area-inset-bottom, 0px) + 26px);
  z-index: 230;
  transform: translateY(105%);
  transition: transform 0.32s var(--ease);
  max-height: 86%;
  display: flex;
  flex-direction: column;
}
.sheet.show { transform: translateY(0); }
.sheet .grabber {
  width: 40px; height: 5px;
  border-radius: 99px;
  background: var(--surface-2);
  margin: 0 auto 16px;
}
.sheet-scroll { overflow-y: auto; scrollbar-width: none; }
.sheet-scroll::-webkit-scrollbar { display: none; }

/* ---------- Success overlay ---------- */

.success-overlay {
  position: absolute;
  inset: 0;
  background: var(--green);
  color: #fff;
  z-index: 260;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 40px;
  animation: fadeIn 0.2s ease both;
}
.success-check {
  width: 92px; height: 92px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.85);
  display: flex; align-items: center; justify-content: center;
  animation: popIn 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both 0.05s;
}
.success-check svg { width: 44px; height: 44px; }
.success-check svg path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw 0.4s ease forwards 0.3s;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes popIn { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-amount { font-size: 44px; font-weight: 800; letter-spacing: -1.5px; }
.success-sub { font-size: 16px; font-weight: 700; opacity: 0.9; }

/* ---------- Card tab ---------- */

.cash-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1.586;
  max-width: 320px;
  margin: 26px auto 8px;
  border-radius: 22px;
  background: linear-gradient(145deg, #e6ff70, var(--card-lime) 55%, #c8ea2c);
  color: #0a0a0a;
  padding: 22px;
  box-shadow: 0 24px 50px rgba(150, 200, 20, 0.28);
  transform: rotate(0deg);
  transition: transform 0.5s var(--ease), filter 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cash-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 22px;
  background: linear-gradient(115deg, rgba(255,255,255,0.5), transparent 40%);
  pointer-events: none;
}
.cash-card.locked { filter: grayscale(0.7) brightness(0.92); }
.cash-card .card-logo { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.cash-card .card-name { font-size: 13px; font-weight: 700; opacity: 0.72; }
.cash-card .card-num {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2.5px;
  font-variant-numeric: tabular-nums;
}
.cash-card .card-meta { display: flex; gap: 18px; font-size: 12px; font-weight: 700; opacity: 0.68; }
.cash-card .card-visa { font-size: 17px; font-weight: 800; font-style: italic; letter-spacing: -0.5px; }
.cash-card .lock-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 10, 10, 0.82);
  color: #fff;
  border-radius: 99px;
  padding: 8px 16px;
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 800;
}
.lock-badge svg { width: 14px; height: 14px; }

.card-actions { display: flex; justify-content: center; gap: 26px; margin: 22px 0 8px; }
.card-action { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.card-action .icon-btn { width: 52px; height: 52px; }

.offer-row .avatar { border-radius: 34%; }
.offer-badge {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--green-tint);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}
.offer-added { color: var(--green-dark); font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.offer-added svg { width: 14px; height: 14px; }

/* ---------- Activity ---------- */

.pending-strip { margin-bottom: 4px; }

/* receipt sheet */
.receipt-head { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0 18px; text-align: center; }
.receipt-amount { font-size: 42px; font-weight: 800; letter-spacing: -1.5px; }
.receipt-status { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.receipt-status .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; }
.receipt-rows { border-top: 1px solid var(--line); padding-top: 8px; }
.receipt-row { display: flex; justify-content: space-between; padding: 11px 0; font-size: 14.5px; font-weight: 600; }
.receipt-row .k { color: var(--ink-2); }
.receipt-row .v { font-weight: 700; text-align: right; }

/* ---------- Bitcoin & stocks ---------- */

.asset-head { padding: 4px; }
.asset-price { font-size: 44px; font-weight: 800; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.asset-name { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 800;
  background: var(--green-tint);
  color: var(--green-dark);
}
.delta-pill.down { background: #ffe9e7; color: #d21c12; }
.delta-pill svg { width: 12px; height: 12px; }

.chart-wrap { margin: 10px -6px 6px; position: relative; }
.chart-wrap svg { display: block; width: 100%; height: auto; }

.range-picker { display: flex; justify-content: space-between; margin: 4px 2px 16px; }
.range-btn {
  padding: 7px 13px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.range-btn.active { background: var(--ink); color: #fff; }
.pay .range-btn.active, .dark .range-btn.active { background: rgba(255,255,255,0.2); color: #fff; }

.sparkline { width: 64px; height: 26px; flex-shrink: 0; }

.ticker-badge {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.3px;
}

/* ---------- Amount entry (buy/sell, add cash) ---------- */

.amount-entry {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 24px 30px;
}
.amount-entry .pay-amount-zone { color: var(--ink); }
.amount-entry .key { color: var(--ink); }
.amount-entry .key:active { background: var(--surface); }
.amount-entry .quick-amounts { display: flex; justify-content: center; gap: 8px; }
.quick-pill {
  padding: 9px 16px;
  border-radius: 99px;
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 800;
  transition: background 0.15s, transform 0.1s;
}
.quick-pill:active { transform: scale(0.94); background: var(--surface-2); }

/* ---------- Profile ---------- */

.profile-head { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 0 20px; text-align: center; }
.profile-head .avatar { --sz: 84px; }
.profile-name { font-size: 22px; font-weight: 800; }
.profile-tag { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.qr-chip {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 4px;
  padding: 8px 14px;
  border-radius: 99px;
  background: var(--surface);
  font-size: 13px; font-weight: 800;
}
.qr-chip svg { width: 15px; height: 15px; }

.settings-group {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 4px 18px;
  margin-bottom: 14px;
}
.settings-group .row { border-bottom: 1px solid var(--line); }
.settings-group .row:last-child { border-bottom: 0; }
.settings-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  flex-shrink: 0;
}
.settings-icon svg { width: 17px; height: 17px; }

.switch {
  position: relative;
  width: 50px; height: 30px;
  border-radius: 99px;
  background: var(--surface-2);
  transition: background 0.2s;
  flex-shrink: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: transform 0.2s var(--ease);
}
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(20px); }

/* ---------- Onboarding ---------- */

.screen.onboard { background: var(--green); color: #fff; }
.onboard-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 80px 28px 40px;
  position: relative;
}
.onboard-back {
  position: absolute;
  top: 56px;
  left: 20px;
  z-index: 5;
}
.onboard-logo {
  width: 88px; height: 88px;
  border-radius: 26px;
  background: #fff;
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  font-weight: 800;
  margin-bottom: 28px;
  box-shadow: 0 18px 40px rgba(0, 60, 15, 0.3);
  animation: popIn 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.onboard h1 { font-size: 38px; font-weight: 800; letter-spacing: -1.2px; line-height: 1.08; }
.onboard .lead { font-size: 16px; font-weight: 600; opacity: 0.9; margin-top: 12px; line-height: 1.45; }

.onboard-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  height: 58px;
  padding: 0 18px;
  margin-top: 26px;
}
.onboard-field input { flex: 1; font-size: 18px; font-weight: 700; color: #fff; }
.onboard-field input::placeholder { color: rgba(255, 255, 255, 0.6); }
.onboard-field .prefix { font-size: 18px; font-weight: 800; opacity: 0.85; }

.code-boxes { display: flex; gap: 10px; margin-top: 26px; }
.code-box {
  flex: 1;
  height: 64px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  font-weight: 800;
  transition: border-color 0.15s, background 0.15s;
}
.code-box.filled { background: rgba(255, 255, 255, 0.28); border-color: #fff; }

.onboard .btn-white { height: 56px; font-size: 17px; }
.onboard-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.onboard-note { font-size: 12.5px; font-weight: 600; opacity: 0.75; text-align: center; line-height: 1.5; }

.stagger > * { animation: rise 0.5s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: 0.06s; }
.stagger > *:nth-child(3) { animation-delay: 0.12s; }
.stagger > *:nth-child(4) { animation-delay: 0.18s; }
.stagger > *:nth-child(5) { animation-delay: 0.24s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Toast ---------- */

#toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 30px);
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
  z-index: 400;
  white-space: nowrap;
  max-width: 86%;
  overflow: hidden;
  text-overflow: ellipsis;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Misc ---------- */

.divider { height: 1px; background: var(--line); margin: 8px 0; }
.center { text-align: center; }
.muted { color: var(--ink-2); }
.spacer { flex: 1; }
.empty-note { text-align: center; color: var(--ink-3); font-weight: 700; font-size: 14px; padding: 30px 0; }
