/* Fennec banking app */
:root {
  --font: "Geist", Inter, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --bg: #f3f2ee;
  --panel: #ffffff;
  --ink: #0f1013;
  --ink-2: #5f626b;
  --line: #e6e4de;
  --accent: #2453ff;
  --pos: #11875a;
  --sheet: #ffffff;
}
body { background: #e7e5df; }
.muted { color: var(--ink-2); font-size: 13px; }
h2 { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.h2-pad { padding: 18px 20px 10px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  height: 54px; border-radius: var(--r-btn); font-weight: 650; font-size: 16px;
}
.btn.dark { background: var(--ink); color: #fff; }
.btn.light { background: #fff; color: var(--ink); }
.btn.ghost { background: rgba(255, 255, 255, 0.12); color: #fff; }
.chip {
  height: 38px; padding: 0 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.link { color: var(--accent); font-size: 14px; font-weight: 600; min-height: 44px; }

/* Header */
.top { display: flex; align-items: center; gap: 12px; padding: 8px 20px 4px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #ffd9b8, #f7a072); color: #5a2a0a; font-weight: 700; font-size: 15px;
}
.avatar.lg { width: 64px; height: 64px; font-size: 20px; }
.avatar.xl { width: 88px; height: 88px; font-size: 28px; }
.hello { display: grid; line-height: 1.25; flex: 1; }
.hello span { font-size: 13px; color: var(--ink-2); }
.hello b { font-size: 16px; font-weight: 650; }
.round { background: #fff; border: 1px solid var(--line); position: relative; }
.dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: #e0533d; box-shadow: 0 0 0 2px #fff; }

/* Balance */
.balance { display: grid; justify-items: start; gap: 4px; padding: 18px 20px 20px; }
.lbl { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }
.eye { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); }
.money { font-size: 44px; font-weight: 700; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.money.hide { letter-spacing: 0.08em; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--pos); background: #e3f4ec; padding: 5px 10px 5px 8px; border-radius: 999px; }

/* Cards */
.cards-rail {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 20px 8px;
  scrollbar-width: none; scroll-padding: 0 20px;
}
.cards-rail::-webkit-scrollbar { display: none; }
.card, .big-card {
  position: relative; flex: none; width: 300px; aspect-ratio: 1.586; border-radius: 22px; padding: 18px 20px;
  display: grid; grid-template-rows: auto 1fr auto auto; text-align: left; color: #fff; overflow: hidden;
  scroll-snap-align: start;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 18px 34px -18px rgba(15, 16, 40, 0.55);
}
.card::after, .big-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.22) 45%, transparent 60%);
  transform: translateX(-60%); transition: transform 1.2s var(--ease);
}
.card:hover::after { transform: translateX(60%); }
.c-cobalt { background: radial-gradient(120% 120% at 0% 0%, #4f78ff 0%, #2453ff 40%, #0f2fb8 100%); }
.c-metal { background: radial-gradient(120% 140% at 100% 0%, #4a4b52 0%, #1d1e22 55%, #0b0b0d 100%); }
.c-sand { background: radial-gradient(120% 140% at 0% 100%, #f6e3c3 0%, #e8c995 50%, #c99b5b 100%); color: #3b2a12; }
.c-top { display: flex; align-items: center; justify-content: space-between; }
.mark {
  width: 26px; height: 22px; background: currentColor;
  clip-path: polygon(0 0, 38% 55%, 50% 40%, 62% 55%, 100% 0, 82% 100%, 18% 100%);
}
.c-kind { font-size: 13px; font-weight: 600; opacity: 0.85; }
.c-chip { width: 38px; height: 28px; border-radius: 7px; margin-top: 14px; background: linear-gradient(135deg, #f3d48b, #c79a3e); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.c-num { font-family: var(--mono); font-size: 15px; letter-spacing: 0.08em; opacity: 0.9; }
.c-bal { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; margin-top: 2px; }
.c-net { position: absolute; right: 20px; bottom: 20px; font-size: 13px; font-weight: 700; font-style: italic; letter-spacing: 0.02em; opacity: 0.85; text-transform: uppercase; }
.dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0 4px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: #cfccc4; transition: width 0.3s var(--ease), background 0.3s; }
.dots i.on { width: 18px; background: var(--ink); }

/* Quick actions */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 14px 16px 6px; }
.quick button, .card-actions button { display: grid; justify-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.quick span, .card-actions span {
  width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line);
}
.quick button:first-child span { background: var(--ink); border-color: var(--ink); color: #fff; }
[data-os="android"] .quick span, [data-os="android"] .card-actions span { border-radius: 50%; }

/* Panels */
.panel { margin: 14px 16px 0; padding: 18px; background: var(--panel); border-radius: 24px; border: 1px solid var(--line); }
.panel.list { padding: 6px 18px; }
.row-head { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.spent { display: block; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; margin: 6px 0 12px; font-variant-numeric: tabular-nums; }
.spent small { font-size: 14px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.split { display: flex; gap: 4px; height: 10px; }
.split i { width: var(--w); background: var(--c); border-radius: 5px; transform-origin: left; }
.legend { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend li::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.legend b { margin-left: auto; color: var(--ink); font-weight: 650; }

/* Transactions */
.tx { list-style: none; margin-top: 6px; }
.tx li { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.tx li + li { border-top: 1px solid var(--line); }
.tx div { flex: 1; display: grid; line-height: 1.3; min-width: 0; }
.tx div b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx small { font-size: 13px; color: var(--ink-2); }
.tx > li > b { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx .pos { color: var(--pos); }
.tile { width: 44px; height: 44px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--t); color: var(--i); }
.day { padding: 18px 20px 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
[data-feed] .tx { margin: 0 16px; padding: 4px 16px; background: #fff; border-radius: 20px; border: 1px solid var(--line); }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-2); font-size: 14px; }

/* Cards screen */
.seg-cards { display: flex; gap: 4px; margin: 6px 20px 18px; padding: 4px; background: #e8e6e0; border-radius: 14px; }
.seg-cards button { flex: 1; height: 38px; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg-cards button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
[data-os="android"] .seg-cards, [data-os="android"] .seg-cards button { border-radius: 999px; }
.flip-wrap { perspective: 1200px; padding: 0 20px; }
.big-card { width: 100%; padding: 0; display: block; transform-style: preserve-3d; overflow: visible; box-shadow: none; }
.big-card::after { display: none; }
.face {
  position: absolute; inset: 0; border-radius: 22px; padding: 20px 22px; backface-visibility: hidden; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto auto; background: inherit;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 24px 40px -22px rgba(15, 16, 40, 0.6);
}
.face.back { transform: rotateY(180deg); grid-template-rows: 40px 1fr auto auto; gap: 8px; }
.stripe { margin: 0 -22px; background: rgba(0, 0, 0, 0.55); }
.full { font-family: var(--mono); font-size: 20px; letter-spacing: 0.06em; align-self: center; }
.meta { display: flex; gap: 24px; font-size: 13px; opacity: 0.85; }
.meta b { font-family: var(--mono); font-weight: 500; margin-left: 4px; }
.copy { justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); font-size: 13px; font-weight: 600; color: inherit; }
.c-name { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; opacity: 0.9; margin-top: 6px; }
.c-name em { font-style: italic; text-transform: uppercase; }
.front .c-num { font-size: 18px; }
.frost {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px;
  font-weight: 650; font-size: 15px; color: #fff;
  background: rgba(200, 215, 235, 0.45); backdrop-filter: blur(9px) saturate(1.3);
  opacity: 0; visibility: hidden;
}
.card-actions { display: grid; grid-template-columns: repeat(4, 1fr); padding: 22px 16px 4px; }
.card-actions em { font-style: normal; }
.card-actions button.on span { background: #dfe8ff; border-color: #bccdff; color: var(--accent); }
.meter { height: 10px; border-radius: 5px; background: #eceae4; overflow: hidden; }
.meter i { display: block; height: 100%; width: 100%; border-radius: 5px; background: var(--ink); transform: scaleX(var(--p)); transform-origin: left; transition: transform 0.6s var(--ease); }
.switch-row, .nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; width: 100%; font-size: 15px; font-weight: 550; text-align: left; }
.switch-row + .switch-row, .switch-row + .nav-row, .nav-row + .nav-row { border-top: 1px solid var(--line); }
.switch-row span, .nav-row span { display: flex; align-items: center; gap: 12px; }
.switch-row input {
  appearance: none; width: 51px; height: 31px; border-radius: 999px; background: #dcd9d2; position: relative; cursor: pointer; flex: none;
  transition: background 0.25s;
}
.switch-row input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: transform 0.3s var(--ease);
}
.switch-row input:checked { background: var(--pos); }
.switch-row input:checked::after { transform: translateX(20px); }
[data-os="android"] .switch-row input { width: 52px; height: 32px; background: #e7e3da; box-shadow: inset 0 0 0 2px #8a877f; }
[data-os="android"] .switch-row input::after { top: 8px; left: 8px; width: 16px; height: 16px; background: #8a877f; box-shadow: none; transition: transform 0.3s var(--ease), width 0.2s, height 0.2s, top 0.2s, left 0.2s; }
[data-os="android"] .switch-row input:checked { background: var(--accent); box-shadow: none; }
[data-os="android"] .switch-row input:checked::after { top: 4px; left: 4px; width: 24px; height: 24px; background: #fff; transform: translateX(20px); }

/* Activity */
.week { margin: 4px 16px 14px; padding: 18px; background: var(--ink); color: #fff; border-radius: 24px; }
.week-head { display: flex; justify-content: space-between; align-items: baseline; }
.week-head .muted { color: rgba(255, 255, 255, 0.6); }
.week-head strong { font-size: 22px; letter-spacing: -0.03em; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; height: 130px; margin-top: 16px; align-items: end; }
.bars span { display: grid; grid-template-rows: 1fr auto; gap: 6px; height: 100%; font-size: 12px; text-align: center; color: rgba(255, 255, 255, 0.55); }
.bars i { align-self: end; height: calc(var(--h) * 100%); border-radius: 8px; background: rgba(255, 255, 255, 0.16); transform-origin: bottom; }
.bars .hi i { background: #fff; }
.search { display: flex; align-items: center; gap: 10px; height: 48px; margin: 0 16px; padding: 0 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
[data-os="android"] .search { border-radius: 999px; background: #ebe8e1; border-color: transparent; }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 15px; color: var(--ink); min-width: 0; }
.chips { display: flex; gap: 8px; padding: 12px 16px 0; }

/* Profile */
.me { display: grid; justify-items: center; gap: 6px; padding: 10px 20px 8px; text-align: center; }
.me b { font-size: 20px; margin-top: 6px; }

/* Send flow */
.faces { display: flex; gap: 14px; overflow-x: auto; padding: 0 20px 4px; scrollbar-width: none; }
.faces button { display: grid; justify-items: center; gap: 6px; font-size: 13px; font-weight: 550; flex: none; width: 64px; }
.faces .avatar { width: 58px; height: 58px; font-size: 18px; }
.people { list-style: none; margin: 0 16px; padding: 4px 16px; background: #fff; border-radius: 20px; border: 1px solid var(--line); }
.people button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; text-align: left; }
.people li + li { border-top: 1px solid var(--line); }
.people div { display: grid; line-height: 1.3; }
.people b { font-size: 15px; font-weight: 600; }
.people small { font-size: 13px; color: var(--ink-2); }
.amount { display: grid; justify-items: center; gap: 10px; padding: 18px 20px 6px; }
.big-amt { display: flex; align-items: flex-start; font-weight: 700; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.big-amt span { font-size: 30px; margin-top: 10px; color: var(--ink-2); }
.big-amt strong { font-size: 68px; line-height: 1.05; }
.presets { display: flex; gap: 8px; }
.presets.wide { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px 24px; }
.pad button { height: 58px; border-radius: 18px; font-size: 26px; font-weight: 550; display: grid; place-items: center; }
.pad button:active { background: #e8e6e0; }
.slide {
  position: relative; margin: 8px 20px 0; height: 64px; border-radius: 999px; background: var(--ink); color: #fff;
  display: grid; place-items: center; overflow: hidden; transition: opacity 0.3s;
}
.slide[aria-disabled="true"] { opacity: 0.35; }
.slide-txt { font-size: 15px; font-weight: 600; opacity: 0.8; }
.knob {
  position: absolute; left: 6px; top: 6px; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--ink);
  display: grid; place-items: center; touch-action: none; cursor: grab;
}

/* Done */
.scr.done { background: var(--ink); color: #fff; display: flex; flex-direction: column; padding-bottom: calc(var(--bottom) + 16px); }
.done-in { flex: 1; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 0 28px; text-align: center; }
.tick { width: 120px; height: 120px; }
.tick circle { fill: none; stroke: #2fcf8a; stroke-width: 5; }
.tick path { fill: none; stroke: #2fcf8a; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.done h1 { font-size: 32px; letter-spacing: -0.03em; }
.done p { color: rgba(255, 255, 255, 0.65); font-size: 15px; }
.receipt { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; width: 100%; margin-top: 18px; padding: 18px; border-radius: 20px; background: rgba(255, 255, 255, 0.07); font-size: 14px; text-align: left; }
.receipt span { color: rgba(255, 255, 255, 0.55); }
.receipt b { text-align: right; font-weight: 600; font-family: var(--mono); font-size: 13px; }
.done-cta { display: grid; gap: 10px; padding: 0 20px; }

/* Tab bar: a floating dark pill on iOS, a Material bar on Android */
.tabs {
  position: absolute; z-index: 60; left: 16px; right: 16px; bottom: calc(var(--bottom) - 6px);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: 68px; padding: 0 8px;
  border-radius: 26px; background: rgba(15, 16, 19, 0.94); color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.5);
}
.tab { display: grid; justify-items: center; gap: 3px; height: 100%; align-content: center; font-size: 11px; font-weight: 600; }
.tab em { font-style: normal; }
.tab[aria-current="true"] { color: #fff; }
.tab .pill { display: grid; place-items: center; width: 40px; height: 28px; border-radius: 14px; transition: background 0.25s; }
.fab { width: 52px; height: 52px; justify-self: center; border-radius: 18px; background: #fff; color: var(--ink); display: grid; place-items: center; }
[data-os="android"] .tabs {
  left: 0; right: 0; bottom: 0; height: calc(80px + var(--bottom)); padding: 0 6px var(--bottom); border-radius: 0;
  background: #fbfaf7; color: var(--ink-2); box-shadow: 0 -1px 0 var(--line); backdrop-filter: none;
}
[data-os="android"] .tab[aria-current="true"] { color: var(--ink); }
[data-os="android"] .tab .pill { width: 60px; height: 32px; border-radius: 16px; }
[data-os="android"] .tab[aria-current="true"] .pill { background: #dde5ff; color: #0c2a99; }
[data-os="android"] .fab { background: var(--accent); color: #fff; border-radius: 18px; }
[data-os="android"] .scr.has-tabs { padding-bottom: calc(var(--bottom) + 104px); }

/* Sheets */
.limit-amt { text-align: center; font-size: 30px; font-weight: 700; color: var(--ink-2); margin-top: 6px; }
.limit-amt strong { font-size: 58px; color: var(--ink); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.range { width: 100%; margin-top: 18px; accent-color: var(--ink); height: 30px; }
.pin { display: flex; justify-content: center; gap: 14px; margin: 10px 0 22px; }
.pin span { width: 58px; height: 68px; border-radius: 16px; background: #f1efea; display: grid; place-items: center; font-size: 30px; font-weight: 700; font-family: var(--mono); }
.hold { user-select: none; -webkit-user-select: none; touch-action: none; }
.share-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 16px; background: #f1efea; margin-bottom: 16px; font-family: var(--mono); font-size: 13px; }
.fx { display: grid; gap: 8px; position: relative; }
.fx > div { display: grid; grid-template-columns: 1fr auto; padding: 16px; border-radius: 18px; background: #f1efea; }
.fx > div .muted { grid-column: 1 / -1; }
.fx b { font-size: 26px; letter-spacing: -0.03em; }
.fx em { font-style: normal; font-weight: 650; align-self: center; }
.fx-swap { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; border: 4px solid #fff; }
.sub.center { text-align: center; margin: 12px 0 18px; }
.sheet .nav-row { border-top: 1px solid var(--line); }
.tx.small li { padding: 12px 0; }
