/* KESSA wallet. Navy canvas, one coral hero object per screen, soft 28px panels. */

.app-body { min-height: 100svh; background: var(--ink-0); }
.app-body.locked { overflow: hidden; }
.no-enter .enter { animation: none !important; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.center { text-align: center; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100svh; }
.sb {
  position: sticky; top: 0; height: 100vh; height: 100dvh; align-self: start;
  display: flex; flex-direction: column; gap: 20px;
  padding: 24px 16px;
  background: var(--ink-1);
  box-shadow: 1px 0 0 var(--line);
}
.sb .wordmark { padding: 4px 10px; }
.sb-bal {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px; border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(255, 79, 64, 0.18), rgba(255, 79, 64, 0.04));
  box-shadow: inset 0 0 0 1px rgba(255, 79, 64, 0.2);
}
.sb-bal span { font-size: 12px; color: var(--text-2); }
.sb-bal b { font-size: 20px; font-weight: 600; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 14px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 500; color: var(--text-2);
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.sb-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.sb-item.on { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.sb-item.on::before {
  content: ''; position: absolute; left: 4px; top: 12px; bottom: 12px; width: 3px;
  border-radius: 3px; background: var(--coral);
}
.sb-item.on svg { color: var(--coral-hi); }
.sb-user {
  margin-top: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: var(--r-md);
  transition: background var(--t);
}
.sb-user:hover { background: rgba(255, 255, 255, 0.05); }
.sb-user > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sb-user b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user > span span { font-size: 12.5px; color: var(--text-2); }
.sb-user svg { color: var(--text-3); }

.main { min-width: 0; }
.mtop { display: none; }
.view { max-width: 1120px; margin: 0 auto; padding: 40px 40px 80px; }
.tabbar { display: none; }

/* ---------- page head ---------- */
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.ph h1 { margin: 0; font-size: clamp(36px, 4.4vw, 56px); }
.ph p { margin: 10px 0 0; color: var(--text-2); font-size: 16px; }
.ph-actions { display: flex; gap: 10px; }

.greet { margin: 0 0 18px; font: 600 22px/1.2 var(--display); letter-spacing: -0.02em; color: var(--text); }

/* ---------- panels ---------- */
.panel {
  border-radius: var(--r-lg);
  background: var(--ink-1);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 24px;
}
.panel-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.panel-t { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.panel-h .panel-t { margin: 0; }
.count { font-size: 13px; padding: 2px 10px; border-radius: var(--pill); background: rgba(255, 255, 255, 0.07); }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }

.icon-btn {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, 0.07); color: var(--text);
  transition: background var(--t), transform var(--t) var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.13); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.on-coral { background: rgba(43, 10, 6, 0.22); color: #fff; }
.icon-btn.on-coral:hover { background: rgba(255, 255, 255, 0.28); }

/* ---------- home ---------- */
.home {
  display: grid; gap: 16px;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  grid-template-areas: 'bal limit' 'bal week' 'bal promo' 'recent recent';
}
.bal { grid-area: bal; }
.limit { grid-area: limit; }
.week { grid-area: week; }
.recent { grid-area: recent; }
.promo { grid-area: promo; }

.bal {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-xl); padding: 32px;
  background:
    radial-gradient(90% 80% at 100% 0%, #ff8577 0%, transparent 60%),
    linear-gradient(150deg, #ff5444 0%, #e9392b 60%, #c42a1d 100%);
  color: #fff;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 80px -40px rgba(255, 79, 64, 0.6);
  min-height: 420px; justify-content: space-between;
}
.bal-glow {
  position: absolute; z-index: -1; right: -150px; top: -190px; width: 420px; height: 420px; border-radius: 50%;
  border: 60px solid rgba(255, 255, 255, 0.07);
}
.bal-glow::after { content: ''; position: absolute; inset: 60px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, 0.05); }
.bal-top { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 500; color: rgba(255, 255, 255, 0.88); }
.bal-num { margin: 18px 0 0; font-size: clamp(52px, 6.4vw, 88px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.bal-num .m-cur, .rc-amt .m-cur, .bank-amt .m-cur { font-size: 0.5em; vertical-align: 0.62em; margin-right: 4px; opacity: 0.8; }
.m-cents { font-size: 0.5em; opacity: 0.7; }
.bal-num.hidden { letter-spacing: 0.06em; }

.wallets { display: flex; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.bal-mid { display: flex; flex-direction: column; }
.wallet {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 8px; border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.14); color: #fff; text-align: left;
  transition: background var(--t), box-shadow var(--t);
}
.wallet:hover { background: rgba(255, 255, 255, 0.22); }
.wallet.on { background: #fff; color: var(--ink-1); }
.w-flag {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font: 700 12px var(--display); background: rgba(255, 255, 255, 0.2);
}
.wallet.on .w-flag { background: var(--coral); color: #fff; }
.w-body { display: flex; flex-direction: column; line-height: 1.2; }
.w-body span { font-size: 11.5px; opacity: 0.75; }
.w-body b { font-size: 14px; font-weight: 600; }

.bal-actions { padding-top: 32px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.act {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 600; color: #fff;
}
.act span {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.95); color: var(--coral-lo);
  box-shadow: 0 12px 24px -12px rgba(80, 8, 2, 0.6);
  transition: transform 0.35s var(--spring);
}
.act:hover span { transform: translateY(-3px) scale(1.04); }
.act:active span { transform: scale(0.94); }

.limit { display: flex; align-items: center; gap: 22px; }
.ring-wrap { position: relative; width: 120px; height: 120px; flex: none; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-svg circle { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 10; }
.ring-svg .ring-on.zero { opacity: 0; }
.ring-svg .ring-on { stroke: var(--coral); stroke-linecap: round; stroke-dasharray: 314.16; transition: stroke-dashoffset 1.2s var(--ease); animation: ringIn 1.2s var(--ease) both; }
@keyframes ringIn { from { stroke-dashoffset: 314.16; } }
.ring-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-mid b { font-size: 26px; }
.ring-mid span { font-size: 11.5px; color: var(--text-2); }
.limit-body .panel-t { margin-bottom: 6px; }
.limit-big { margin: 0; font: 600 28px/1.1 var(--display); letter-spacing: -0.03em; }
.limit-body .muted { margin: 4px 0 10px; font-size: 14px; }

.week-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 15px; }
.week-row b { margin-left: auto; font-weight: 600; }
.dotk { width: 10px; height: 10px; border-radius: 50%; }
.dotk.in, .week-bar .in { background: var(--pos); }
.dotk.out, .week-bar .out { background: var(--coral); }
.week-bar { display: flex; gap: 0; height: 10px; margin: 12px 0 14px; }
.week-bar .in { border-radius: var(--pill) 0 0 var(--pill); }
.week-bar .out { border-radius: 0 var(--pill) var(--pill) 0; }
.week-bar span { min-width: 4px; animation: grow 1s var(--ease) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }

.promo {
  display: flex; align-items: center; gap: 18px;
  background: var(--mint); color: var(--ink-1); box-shadow: none;
  transition: transform var(--t) var(--ease);
}
.promo:hover { transform: translateY(-3px); }
.promo .panel-t { color: var(--ink-1); margin: 0 0 4px; font-size: 16px; }
.promo .muted { margin: 0; color: rgba(9, 23, 35, 0.6); font-size: 14px; }
.promo-card {
  width: 96px; aspect-ratio: 1.586; flex: none; border-radius: 12px; padding: 9px;
  background: linear-gradient(135deg, #ff5a4a, #c92b1e); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  transform: rotate(-8deg);
  box-shadow: 0 14px 24px -10px rgba(201, 43, 30, 0.7);
}
.promo-card b { font-size: 10px; align-self: flex-end; }
.promo-go { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-1); color: #fff; flex: none; }

/* ---------- transactions ---------- */
.txlist { display: flex; flex-direction: column; }
.panel.txlist { padding: 6px; }
.recent .txlist { margin: 0 -12px; }
.tx {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 12px; border-radius: var(--r-md); text-align: left;
  transition: background var(--t);
}
.tx:hover { background: rgba(255, 255, 255, 0.04); }
.tx-ic {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, 0.07); color: var(--text);
}
.tx-ic.in { background: rgba(127, 224, 178, 0.12); color: var(--pos); }
.tx-ic.t-bill { background: rgba(255, 197, 107, 0.12); color: var(--warn); }
.tx-ic.out.t-send_out, .tx-ic.t-cash_out { background: var(--coral-soft); color: var(--coral-hi); }
.tx-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tx-body b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-body span { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-right { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.tx-right b { font-size: 15px; font-weight: 600; }
.tx-right b.in { color: var(--pos); }
.tx-right span { font-size: 12px; color: var(--text-3); }
.pend { font-style: normal; color: var(--warn); }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 36px 16px; }
.empty-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); color: var(--text-2); margin-bottom: 8px; }
.empty b { font-size: 16px; }
.empty span { font-size: 14px; color: var(--text-3); max-width: 30ch; }

/* ---------- flow layout (form + summary) ---------- */
.flow { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.form { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.side .panel-t { margin: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.group { display: flex; flex-direction: column; gap: 10px; }

.seg {
  position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr);
  padding: 4px; border-radius: var(--pill); background: rgba(255, 255, 255, 0.06);
}
.seg-pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / var(--n));
  transform: translateX(calc(var(--x) * 100%));
  border-radius: var(--pill); background: var(--text);
  transition: transform 0.4s var(--spring);
}
.seg button { position: relative; height: 42px; border-radius: var(--pill); font-size: 14px; font-weight: 600; color: var(--text-2); transition: color var(--t); }
.seg button.on { color: var(--ink-1); }

.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); }
.lbl em { font-style: normal; font-weight: 400; color: var(--text-3); }
.field { display: flex; flex-direction: column; gap: 8px; }
.input {
  height: 52px; width: 100%; padding: 0 16px; border: 0; outline: 0;
  border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 16px; color: var(--text);
  transition: box-shadow var(--t), background var(--t);
}
.input::placeholder { color: var(--text-3); }
.input:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.input:focus-visible { background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1.5px var(--coral), 0 0 0 4px var(--coral-soft); }

.amt { display: flex; flex-direction: column; gap: 6px; }
.amt-row { display: flex; align-items: baseline; gap: 6px; padding-bottom: 14px; border-bottom: 1.5px solid var(--line-2); transition: border-color var(--t); }
.amt-row:focus-within { border-color: var(--coral); }
.amt-cur { font-size: 40px; color: var(--text-3); }
.amt input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0; font-size: clamp(48px, 6vw, 72px); font-weight: 600; letter-spacing: -0.04em; color: var(--text); }
.amt input::placeholder { color: var(--text-3); }

.presets, .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 38px; padding: 0 16px; border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; font-weight: 600; color: var(--text-2);
  transition: background var(--t), color var(--t), box-shadow var(--t), transform var(--t) var(--ease);
}
.chip:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.chip:active { transform: scale(0.95); }
.chip.on { background: var(--text); color: var(--ink-1); box-shadow: none; }
.chip.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.presets .chip { font-family: var(--mono); font-weight: 500; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.pick-list { display: flex; flex-direction: column; gap: 8px; }
.pick, .card-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px; border-radius: var(--r-md); text-align: left;
  background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line);
  transition: background var(--t), box-shadow var(--t);
}
.pick:hover { background: rgba(255, 255, 255, 0.07); }
.pick.on { background: var(--coral-soft); box-shadow: inset 0 0 0 1.5px var(--coral); }
.pick-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); color: var(--text); }
.pick-ic.logo, .logo .pick-ic { background: #fff; }
.pick.on .pick-ic { background: var(--coral); color: #fff; }
.pick.on.logo .pick-ic { background: #fff; }
.pick-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pick-body b { font-size: 14.5px; font-weight: 600; }
.pick-body span { font-size: 12.5px; color: var(--text-3); }
.pick-tick { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-2); color: transparent; transition: all var(--t); }
.pick.on .pick-tick { background: var(--coral); color: #fff; box-shadow: none; }
.card-row.frozen { opacity: 0.55; }

.people { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.people::-webkit-scrollbar { display: none; }
.person { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 76px; flex: none; padding: 8px 0; border-radius: var(--r-md); transition: background var(--t); }
.person:hover { background: rgba(255, 255, 255, 0.04); }
.person b { font-size: 13px; font-weight: 500; color: var(--text-2); }
.person .av { transition: transform 0.35s var(--spring), box-shadow var(--t); }
.person.on .av { box-shadow: 0 0 0 3px var(--ink-1), 0 0 0 5px var(--coral); transform: scale(1.05); }
.person.on b { color: var(--text); }
.av-0 { background: #2d4a63; } .av-1 { background: #3b3460; } .av-2 { background: #24524a; } .av-3 { background: #5a3a2c; }

.lines { margin: 0; display: flex; flex-direction: column; }
.lines > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.lines > div:last-child { border-bottom: 0; }
.lines dt { color: var(--text-2); }
.lines dd { margin: 0; font-weight: 600; text-align: right; }
.lines .hl dd { font-size: 18px; color: var(--text); }

.note { margin: 0; display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.04); font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.note svg { color: var(--coral-hi); margin-top: 1px; }
.form-err { margin: 0; min-height: 0; font-size: 14px; color: var(--coral-hi); }
.form-err:empty { display: none; }

/* bills */
.billers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.biller {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 16px; border-radius: var(--r-md); text-align: left;
  background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line);
  transition: background var(--t), box-shadow var(--t), transform var(--t) var(--ease);
}
.biller:hover { background: rgba(255, 255, 255, 0.07); transform: translateY(-2px); }
.biller.on { box-shadow: inset 0 0 0 1.5px var(--coral); background: var(--coral-soft); }
.biller b { font-size: 14.5px; margin-top: 10px; }
.biller > span:last-child { font-size: 12.5px; color: var(--text-3); }
.biller-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); }
.c-power .biller-ic, .biller-ic.c-power { background: rgba(255, 197, 107, 0.14); color: var(--warn); }
.c-water .biller-ic, .biller-ic.c-water { background: rgba(122, 190, 255, 0.14); color: #8cc8ff; }
.c-airtime .biller-ic, .biller-ic.c-airtime { background: rgba(127, 224, 178, 0.14); color: var(--pos); }
.c-tv .biller-ic, .biller-ic.c-tv { background: rgba(190, 160, 255, 0.14); color: #c4adff; }
.c-fees .biller-ic, .biller-ic.c-fees { background: var(--coral-soft); color: var(--coral-hi); }
.side-id { display: flex; gap: 12px; align-items: center; }
.side-id div { display: flex; flex-direction: column; }
.side-id b { font-size: 17px; }
.side-id span { font-size: 13px; color: var(--text-3); }

/* agents */
.map { position: relative; height: 240px; border-radius: var(--r-md); overflow: hidden; background: #122638; }
.map .roads { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .roads path { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 12; stroke-linecap: round; }
.mpin { position: absolute; transform: translate(-50%, -50%); }
.mpin i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--text-2); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08); transition: all 0.4s var(--spring); }
.mpin.on i { width: 20px; height: 20px; background: var(--coral); box-shadow: 0 0 0 6px var(--coral-soft); animation: mping 2s var(--ease) infinite; }
@keyframes mping { 0% { box-shadow: 0 0 0 0 rgba(255, 79, 64, 0.55); } 80%, 100% { box-shadow: 0 0 0 20px rgba(255, 79, 64, 0); } }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.code { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 18px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.04); }
.code > b { font-size: 20px; font-weight: 600; color: var(--coral-hi); letter-spacing: 0.04em; }
.code div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.code div span { font-size: 13px; }
.code div span:last-child { font-size: 12px; color: var(--text-3); }

/* activity */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border-radius: var(--pill); background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-3); transition: box-shadow var(--t); }
.search:focus-within { box-shadow: inset 0 0 0 1.5px var(--coral), 0 0 0 4px var(--coral-soft); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--text); }
.search input::placeholder { color: var(--text-3); }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.total { padding: 18px 20px; border-radius: var(--r-md); background: var(--ink-1); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 4px; }
.total span { font-size: 13px; color: var(--text-2); }
.total b { font-size: 22px; font-weight: 600; }
.total.in b { color: var(--pos); }
.day { margin-bottom: 20px; }
.day-t { margin: 0 0 10px 6px; font-size: 13px; font-weight: 600; color: var(--text-3); }

/* cards */
.cards-flow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.vcard {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 1.586; padding: 26px 28px; border-radius: 28px;
  background:
    radial-gradient(120% 140% at 0% 0%, #ff7a6d 0%, transparent 55%),
    linear-gradient(135deg, #ff5a4a 0%, #f2412f 45%, #c92b1e 100%);
  color: #fff;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 70px -30px rgba(255, 79, 64, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: filter 0.5s var(--ease), transform 0.5s var(--ease);
}
.vcard:hover { transform: translateY(-4px) rotate(-0.6deg); }
.vc-shine { position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.22) 46%, transparent 60%); background-size: 250% 100%; animation: sheen 6s ease-in-out infinite; }
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0% 0; } }
.vc-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; }
.vc-chip { margin-top: 22px; width: 48px; height: 36px; border-radius: 8px; background: linear-gradient(135deg, #ffe2a8, #e0b45e); display: grid; grid-template-rows: repeat(3, 1fr); padding: 6px 0; gap: 3px; }
.vc-chip i { border-top: 1px solid rgba(0, 0, 0, 0.18); }
.vc-num { margin-top: auto; font-size: clamp(16px, 2vw, 22px); letter-spacing: 0.04em; }
.vc-bot { display: flex; align-items: flex-end; gap: 28px; margin-top: 14px; }
.vc-bot div { display: flex; flex-direction: column; }
.vc-bot span { font-size: 11px; opacity: 0.8; }
.vc-bot b { font-size: 14px; }
.vc-brand { margin-left: auto; opacity: 1 !important; padding: 4px 6px; border-radius: 8px; background: #fff; }
.vcard.frozen { filter: grayscale(0.85) brightness(0.7); }
.vc-frost { position: absolute; inset: 0; display: grid; place-items: center; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); background: rgba(9, 23, 35, 0.25); }
.vc-frost span { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--pill); background: rgba(255, 255, 255, 0.92); color: var(--ink-1); font-weight: 600; }
.vc-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vc-act { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 8px; border-radius: var(--r-md); background: var(--ink-1); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 600; transition: background var(--t), transform var(--t) var(--ease); }
.vc-act:hover { background: var(--ink-2); transform: translateY(-2px); }
.vc-act span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); }
.vc-act.on span { background: #9fd3ff; color: var(--ink-1); }

/* profile */
.idc {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 24px;
  padding: 32px; margin-bottom: 16px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--ink-3), var(--ink-1));
  box-shadow: inset 0 0 0 1px var(--line);
}
.idc-glow { position: absolute; z-index: -1; left: -80px; top: -120px; width: 380px; height: 380px; background: radial-gradient(closest-side, rgba(255, 79, 64, 0.35), transparent); }
.idc-av { box-shadow: 0 0 0 6px rgba(255, 79, 64, 0.18); }
.idc-body { flex: 1; min-width: 0; }
.idc h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); }
.idc p { margin: 8px 0 0; color: var(--text-2); font-size: 15px; }
.idc-tier { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: 24px; background: var(--coral); color: #fff; flex: none; box-shadow: 0 20px 40px -18px rgba(255, 79, 64, 0.8); }
.idc-tier b { font-size: 40px; line-height: 1; }
.idc-tier span { font-size: 12px; font-weight: 600; opacity: 0.85; }
.prof { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.prof .panel { display: flex; flex-direction: column; gap: 14px; }
.prof .panel .panel-t, .prof .panel-h { margin: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.steps li { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r-md); }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 29px; top: 48px; bottom: -16px; width: 2px; background: var(--line-2); }
.steps li.done:not(:last-child)::after { background: var(--coral); }
.steps li.now { background: rgba(255, 255, 255, 0.05); }
.steps div { display: flex; flex-direction: column; flex: 1; }
.steps b { font-size: 15px; }
.steps div span { font-size: 13px; color: var(--text-3); }
.steps em { font-style: normal; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: var(--pill); background: var(--coral); color: #fff; }
.step-dot { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 700 14px var(--display); background: var(--ink-3); box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--text); }
.done .step-dot { background: var(--coral); color: #fff; box-shadow: none; }
.now .step-dot { background: var(--text); color: var(--ink-1); box-shadow: none; }
.menu { padding: 8px !important; gap: 2px !important; }
.menu-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px; border-radius: var(--r-md); text-align: left; transition: background var(--t); }
.menu-row:hover { background: rgba(255, 255, 255, 0.05); }
.menu-row:focus:not(:focus-visible), .act:focus:not(:focus-visible) { outline: none; }
.menu-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.menu-row b { font-size: 15px; }
.menu-row > span span { font-size: 13px; color: var(--text-3); }
.menu-row > svg { color: var(--text-3); }
.menu-row.warn .pick-ic { background: var(--coral-soft); color: var(--coral-hi); }

/* ---------- live gate ---------- */
.gate { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100svh; padding: 16px; gap: 16px; }
.gate-art {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-xl); padding: 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(80% 70% at 70% 45%, rgba(255, 79, 64, 0.45), transparent 65%),
    linear-gradient(160deg, #0c2134, #08131f);
  box-shadow: inset 0 0 0 1px var(--line);
}
.gate-stage { position: relative; display: grid; place-items: center; height: 360px; }
.gate-card {
  width: 340px; aspect-ratio: 1.586; padding: 24px; border-radius: 24px;
  background: radial-gradient(120% 140% at 0% 0%, #ff7a6d 0%, transparent 55%), linear-gradient(135deg, #ff5a4a, #c92b1e);
  color: #fff; display: flex; flex-direction: column;
  transform: rotate(-8deg);
  box-shadow: 0 50px 80px -30px rgba(255, 79, 64, 0.6);
  animation: gfloat 7s ease-in-out infinite;
}
@keyframes gfloat { 50% { transform: rotate(-6deg) translateY(-12px); } }
.gate-card b { margin-top: auto; font-size: 20px; }
.gate-card span { font-size: 12px; opacity: 0.85; margin-top: 6px; }
.gate-chip { position: absolute; right: 8%; bottom: 10%; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--pill); background: rgba(245, 245, 243, 0.96); color: var(--ink-1); font-size: 13.5px; font-weight: 600; box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.7); animation: rise 0.8s var(--ease) 0.4s both; }
.gate-chip svg { color: #13734a; }
.gate-quote { margin: 0; font-size: clamp(36px, 4vw, 56px); max-width: 11ch; }
.gate-form { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px 24px; }
.gate-in { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.gate-in h1 { margin: 0; font-size: clamp(40px, 4.4vw, 56px); }
.gate-in > .muted { margin: -4px 0 8px; font-size: 16px; line-height: 1.5; }
.stack-f { display: flex; flex-direction: column; gap: 14px; }
.pin-in { letter-spacing: 0.5em; font-family: var(--mono); }
.gate-switch { margin: 4px 0 0; text-align: center; font-size: 14.5px; color: var(--text-2); }
.gate-foot { margin: 40px 0 0; font-size: 13px; color: var(--text-3); text-align: center; }
.only-m { display: none; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- sheet ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 20px;
  background: rgba(3, 8, 13, 0.62);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: fade 0.25s var(--ease) both;
}
.scrim.out { animation: fade 0.2s var(--ease) reverse both; }
.scrim.out .sheet { animation: sheetOut 0.2s var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
@keyframes sheetOut { to { opacity: 0; transform: translateY(16px) scale(0.98); } }
.sheet {
  width: min(460px, 100%); max-height: calc(100svh - 40px); overflow-y: auto;
  padding: 24px; border-radius: 32px;
  background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -20px rgba(0, 0, 0, 0.7);
  animation: sheetIn 0.4s var(--ease) both;
  display: flex; flex-direction: column; gap: 18px;
}
.grab { display: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.sheet-head h3 { margin: 0; font: 700 24px/1.15 var(--display); letter-spacing: -0.03em; }
.sheet-head p { margin: 6px 0 0; color: var(--text-2); font-size: 14.5px; }
.sheet-foot { display: flex; flex-direction: column; gap: 8px; }

.pin-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 4px; }
.pin-lock { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--coral-soft); color: var(--coral-hi); }
.pin-dots { display: flex; gap: 16px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-2); transition: all 0.25s var(--spring); }
.pin-dots i.on { background: var(--coral); box-shadow: none; transform: scale(1.15); }
.pin-dots.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-hint { margin: 0; font-size: 14px; color: var(--text-2); }
.pin-hint.bad { color: var(--coral-hi); }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 10px 22px; }
.key { width: 76px; height: 76px; border-radius: 50%; font: 600 28px var(--display); background: rgba(255, 255, 255, 0.05); transition: background var(--t), transform 0.15s var(--ease); }
.key:hover { background: rgba(255, 255, 255, 0.1); }
.key:active { transform: scale(0.9); background: var(--coral-soft); }
.key-del { display: grid; place-items: center; background: transparent; }

.rc { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 8px; }
.rc-burst { position: relative; width: 84px; height: 84px; display: grid; place-items: center; margin-bottom: 14px; }
.rc-burst::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: rgba(127, 224, 178, 0.18); animation: burst 1s var(--ease) both; }
@keyframes burst { from { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } to { transform: scale(1); } }
.rc-mark { position: relative; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--pos); color: var(--mint-ink); animation: pop 0.6s var(--spring) 0.15s both; }
.rc-mark.wait { background: var(--warn); }
@keyframes pop { from { transform: scale(0); } }
.rc-title { margin: 0; color: var(--text-2); font-size: 15px; }
.rc-amt { margin: 8px 0 6px; font-size: 52px; font-weight: 600; letter-spacing: -0.04em; }
.rc-sub { margin: 0; font-size: 13.5px; color: var(--text-3); }
.rc-lines { margin: 0; padding: 4px 16px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.04); }
.rc-lines > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; font-size: 14px; border-bottom: 1px dashed var(--line-2); }
.rc-lines > div:last-child { border: 0; }
.rc-lines dt { color: var(--text-3); }
.rc-lines dd { margin: 0; font-weight: 500; text-align: right; text-transform: none; }
.rc-lines .hl dd { color: var(--coral-hi); font-family: var(--mono); font-weight: 600; }
.code-big { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 20px; border-radius: var(--r-md); background: var(--coral); color: #fff; transition: transform var(--t) var(--ease); }
.code-big:active { transform: scale(0.98); }
.code-big span { font-size: 13px; opacity: 0.9; }
.code-big b { font-size: 44px; letter-spacing: 0.04em; }
.code-big em { display: flex; gap: 6px; align-items: center; font-style: normal; font-size: 12.5px; opacity: 0.85; }
.bank-amt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px; border-radius: var(--r-md); background: var(--text); color: var(--ink-1); }
.bank-amt span { font-size: 13px; color: rgba(9, 23, 35, 0.6); }
.bank-amt b { font-size: 44px; font-weight: 600; letter-spacing: -0.04em; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 200; left: 50%; top: 20px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 10px; border-radius: var(--pill);
  background: var(--text); color: var(--ink-1); font-size: 14px; font-weight: 600;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
  opacity: 0; transform: translateY(-12px) scale(0.96);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--spring);
}
.toast.in { opacity: 1; transform: none; }
.toast-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-1); color: #fff; }
.toast.ok .toast-ic { background: #13734a; }
.toast.err .toast-ic { background: var(--coral); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .home { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'bal bal' 'limit week' 'recent recent' 'promo promo'; }
  .flow, .cards-flow, .prof { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sb { display: none; }
  .mtop {
    position: sticky; top: 0; z-index: 40;
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 18px; padding-top: max(12px, env(safe-area-inset-top));
    background: rgba(6, 15, 24, 0.8); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  }
  .mtop .wordmark { font-size: 21px; }
  .mtop-r { display: flex; gap: 10px; align-items: center; }
  .view { padding: 16px 16px calc(110px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: block; position: fixed; z-index: 60; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
  }
  .tb-in {
    display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px;
    border-radius: 26px; background: rgba(13, 27, 40, 0.94);
    backdrop-filter: saturate(160%) blur(20px); -webkit-backdrop-filter: saturate(160%) blur(20px);
    box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 40px -12px rgba(0, 0, 0, 0.7);
  }
  .tb-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; border-radius: 20px; font-size: 11px; font-weight: 600; color: var(--text-3); transition: color var(--t), background var(--t); }
  .tb-item.on { color: var(--text); background: rgba(255, 255, 255, 0.08); }
  .tb-item.on svg { color: var(--coral-hi); }
  .ph { margin-bottom: 20px; }
  .ph h1 { font-size: 40px; }
  .ph-actions .btn { --h: 40px; padding: 0 14px; font-size: 13.5px; }
  .home { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'bal' 'limit' 'recent' 'week' 'promo'; gap: 12px; }
  .bal { padding: 24px; border-radius: 32px; min-height: 0; }
  .wallet { flex: 1 1 0; min-width: 0; }
  .bal-actions { padding-top: 28px; }
  .act span { width: 54px; height: 54px; }
  .act { font-size: 12.5px; }
  .panel { padding: 20px; border-radius: 24px; }
  .totals { gap: 8px; }
  .total { padding: 14px; }
  .total b { font-size: 16px; }
  .two { grid-template-columns: 1fr; }
  .idc { padding: 24px; gap: 16px; border-radius: 32px; }
  .idc-av { --s: 64px !important; }
  .idc-tier { width: 64px; height: 64px; border-radius: 18px; }
  .idc-tier b { font-size: 28px; }
  .gate { grid-template-columns: 1fr; padding: 0; }
  .gate-art { display: none; }
  .gate-form { min-height: 100svh; justify-content: space-between; padding: 28px 22px; }
  .gate-in { margin: auto 0; }
  .only-m { display: inline-flex; margin-bottom: 28px; }
  .gate-foot { margin-top: 24px; }
  .scrim { place-items: end center; padding: 0; }
  .sheet { width: 100%; max-height: 92svh; border-radius: 32px 32px 0 0; padding: 12px 20px calc(24px + env(safe-area-inset-bottom)); animation-name: sheetUp; }
  .scrim.out .sheet { animation-name: sheetDown; }
  @keyframes sheetUp { from { transform: translateY(100%); } }
  @keyframes sheetDown { to { transform: translateY(100%); } }
  .grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto -4px; }
  .keypad { grid-template-columns: repeat(3, 72px); gap: 8px 26px; }
  .key { width: 72px; height: 72px; }
}
@media (max-width: 860px) {
  .toasts { top: auto; bottom: calc(100px + env(safe-area-inset-bottom)); width: calc(100% - 32px); }
  .gated .toasts { bottom: 24px; }
}
@media (max-width: 380px) {
  .bal-num { font-size: 46px; }
  .keypad { gap: 6px 18px; }
}

/* sidebar column paints full height even when the page outgrows the viewport */
@media (min-width: 861px) {
  .shell { background: linear-gradient(to right, var(--ink-1) 263px, var(--line) 263px, var(--line) 264px, transparent 264px); }
}
.form .divider { margin: 2px 0; }

/* Pay method brand tiles: each brand keeps its own colours, never tinted coral. */
.pick.brand .pick-ic, .pick.brand.on .pick-ic { background: #fff; color: #000; }
.pick.b-apple_pay .pick-ic, .pick.b-apple_pay.on .pick-ic { background: #000; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.paymark svg { width: 100%; height: 100%; display: block; }
.pm-apple_pay svg { transform: translateY(-1px); }
.paylock { display: inline-flex; align-items: center; gap: 2px; }
.btn-wallet { gap: 6px; font-size: 17px; }
.paylock b { font: 600 17px/1 -apple-system, 'SF Pro Display', 'Inter', sans-serif; letter-spacing: -0.01em; }
.paylock .pm-google_pay { margin-right: 1px; }
/* Apple Pay and Google Pay buttons follow their brand rules: black, white text, own mark. */
.btn-wallet { background: #000; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.btn-wallet:hover { background: #111; }
.btn-wallet:active { transform: scale(0.98); }

.muted.small.center, .note span { text-wrap: balance; }
