:root {
  --bg-primary: #08090f;
  --bg-secondary: #0f1019;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-input: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.07);
  --border-focus: rgba(124,92,252,0.5);
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.55);
  --text-tertiary: rgba(255,255,255,0.3);
  --text-inverse: #000000;
  --glass-bg: rgba(15,16,25,0.65);
  --glass-border: rgba(255,255,255,0.08);
  --glass-shadow: 0 -4px 30px rgba(0,0,0,0.3);
  --accent: #7c5cfc;
  --accent-light: #9b7fff;
  --accent-glow: rgba(124,92,252,0.15);
  --accent-dark: #6d4de8;
  --green: #00d4aa;
  --red: #ff4d6a;
  --orange: #ff8c42;
  --amber: #f59e0b;
  --blue: #4f8cff;
  --chart-bg: rgba(124,92,252,0.08);
  --shimmer: rgba(255,255,255,0.03);
  --toggle-bg: rgba(255,255,255,0.1);
  --toggle-active: #7c5cfc;
  --blob1: rgba(124,92,252,0.15);
  --blob2: rgba(79,140,255,0.08);
  --nav-icon-idle: rgba(255,255,255,0.3);
  --nav-icon-active: #7c5cfc;
  --danger-bg: rgba(255,77,106,0.1);
  --success-bg: rgba(0,212,170,0.1);
  --card-gradient: linear-gradient(135deg, rgba(124,92,252,0.12) 0%, rgba(79,140,255,0.06) 100%);
  --card-border: rgba(124,92,252,0.15);
  --savings-gradient: linear-gradient(135deg, rgba(0,212,170,0.12) 0%, rgba(0,180,140,0.06) 100%);
  --savings-border: rgba(0,212,170,0.15);
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-primary: #f4f5f9;
  --bg-secondary: #ffffff;
  --bg-card: rgba(0,0,0,0.03);
  --bg-card-hover: rgba(0,0,0,0.05);
  --bg-input: rgba(0,0,0,0.04);
  --border: rgba(0,0,0,0.08);
  --border-focus: rgba(124,92,252,0.4);
  --text-primary: #111128;
  --text-secondary: rgba(17,17,40,0.55);
  --text-tertiary: rgba(17,17,40,0.3);
  --text-inverse: #ffffff;
  --glass-bg: rgba(255,255,255,0.7);
  --glass-border: rgba(0,0,0,0.06);
  --glass-shadow: 0 -4px 30px rgba(0,0,0,0.08);
  --accent: #6d4de8;
  --accent-light: #8b6df0;
  --accent-glow: rgba(109,77,232,0.1);
  --accent-dark: #5a3dd4;
  --chart-bg: rgba(109,77,232,0.06);
  --shimmer: rgba(0,0,0,0.02);
  --toggle-bg: rgba(0,0,0,0.1);
  --toggle-active: #6d4de8;
  --blob1: rgba(109,77,232,0.08);
  --blob2: rgba(79,140,255,0.06);
  --nav-icon-idle: rgba(17,17,40,0.28);
  --nav-icon-active: #6d4de8;
  --danger-bg: rgba(255,77,106,0.08);
  --success-bg: rgba(0,180,140,0.08);
  --card-gradient: linear-gradient(135deg, rgba(109,77,232,0.08) 0%, rgba(79,140,255,0.04) 100%);
  --card-border: rgba(109,77,232,0.12);
  --savings-gradient: linear-gradient(135deg, rgba(0,180,140,0.08) 0%, rgba(0,160,120,0.04) 100%);
  --savings-border: rgba(0,180,140,0.12);
}

/* ── ICON TILE SYSTEM ──
   Signature visual element: a [data-tile="…"] attribute on any
   container sets --c1/--c2/--sh, which every icon inside it reads to
   render a gradient "tile" (bevelled square, soft colored shadow).
   Global on purpose — this is the mobile app's icon language, not a
   desktop-only add-on. Nav icons, quick actions, bill/bank tiles all
   pull from this one palette so the whole app reads as one product. */
[data-tile="purple"] { --c1: #8b6df0; --c2: #5a3dd4; --sh: rgba(124,92,252,.45); }
[data-tile="green"]  { --c1: #2be6c2; --c2: #00967a; --sh: rgba(0,212,170,.4); }
[data-tile="blue"]   { --c1: #6ba3ff; --c2: #2f5fd6; --sh: rgba(79,140,255,.4); }
[data-tile="amber"]  { --c1: #ffc257; --c2: #c97f0a; --sh: rgba(245,166,35,.4); }
[data-tile="orange"] { --c1: #ffab6b; --c2: #d9631b; --sh: rgba(255,140,66,.4); }
[data-tile="red"]    { --c1: #ff7a92; --c2: #d42a49; --sh: rgba(255,77,106,.4); }
[data-tile="dark"]   { --c1: #454a63; --c2: #1c1e2b; --sh: rgba(0,0,0,.4); }
[data-tile="pink"]   { --c1: #ff8fc7; --c2: #d6408f; --sh: rgba(236,72,153,.4); }

.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: none;
  background: linear-gradient(150deg, var(--c1, var(--accent)), var(--c2, var(--accent-dark)) 120%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35),
              inset 0 -6px 10px -6px rgba(0,0,0,.35),
              0 8px 16px -6px var(--sh, var(--accent-glow));
  flex-shrink: 0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  transition: background 0.5s ease;
}

.app {
  width: 100%;
  max-width: 430px;
  /* Fallbacks in case JS hasn't run yet (first paint) or --app-vh is
     unsupported; overridden below by the JS-measured value, which is
     what actually fixes the gap seen only in installed standalone PWAs
     on iOS/Android, where 100dvh is frequently stale or unsupported. */
  height: 100vh;
  height: 100dvh;
  height: calc(var(--app-vh, 1vh) * 100);
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
  transition: background 0.5s ease;
  display: flex;
  flex-direction: column;
}

/* Scrollbar */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── AUTH ── */
.auth-wrap {
  background: var(--bg-primary);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  transition: background 0.5s;
}

.auth-bg-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124,92,252,0.25) 0%, transparent 60%);
  filter: blur(60px);
  pointer-events: none;
}

.auth-logo-wrap {
  /* In normal flow (not absolutely positioned) so a tall Sign Up form can
     never render on top of it — on short/mobile viewports the card is
     pushed down below the logo and the wrap scrolls, instead of the card
     covering the branding. */
  position: relative;
  flex-shrink: 0;
  padding-top: 52px;
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.auth-logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(124,92,252,0.4);
  padding: 6px;
}

.auth-logo-mark svg {
  width: 44px;
  height: 44px;
}

.auth-logo-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.auth-logo-sub {
  font-size: .75rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: -6px;
}

.auth-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 28px 24px 40px;
  box-shadow: 0 -20px 60px rgba(0,0,0,0.3);
  transition: background 0.5s;
  margin-top: auto;
  flex-shrink: 0;
}

.auth-tabs {
  display: flex;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 22px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-tertiary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .25s var(--spring);
  font-family: var(--font-body);
  border: none;
  background: transparent;
}

.auth-tab.active {
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.input-group { margin-bottom: 14px; }

.input-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.input-f {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--text-primary);
  background: var(--bg-input);
  outline: none;
  transition: all .2s;
}

.input-f:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.input-f::placeholder {
  color: var(--text-tertiary);
}

select.input-f {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.3)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

[data-theme="light"] select.input-f {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(17,17,40,0.3)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.pw-wrap { position: relative; }
.pw-wrap .input-f { padding-right: 44px; }

.pw-eye {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  cursor: pointer;
}

.btn-p {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s var(--spring);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 4px 20px rgba(124,92,252,0.35);
}

.btn-p:active { transform: scale(.97); }
.btn-p:disabled { opacity: .6; cursor: not-allowed; }

.btn-s {
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-s:active { transform: scale(.96); }

.btn-outline {
  width: 100%;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-err {
  background: var(--danger-bg);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 14px;
  display: none;
}

.auth-ok {
  background: var(--success-bg);
  color: var(--green);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 14px;
  display: none;
}

.otp-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  justify-content: center;
}

.otp-box {
  width: 44px;
  height: 54px;
  flex: 0 0 44px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-mono);
  transition: border-color .15s, box-shadow .15s;
}

.otp-box:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.otp-paste-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 0 auto 16px;
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}

.otp-paste-btn:hover { background: var(--accent-glow); border-color: var(--accent); }
.otp-paste-btn:active { transform: scale(.96); }

@media (max-width: 360px) {
  .otp-inputs { gap: 6px; }
  .otp-box { width: 38px; height: 48px; flex: 0 0 38px; font-size: 1.1rem; }
}

/* ── MAIN APP ── */
#main-app {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-primary);
  transition: background 0.5s;
}
/* Toggled by JS instead of an inline style, so desktop.css can give
   this a different display value (grid) without an inline style
   fight — inline styles always win over stylesheet rules. */
#main-app.app-visible { display: flex; }

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: transparent;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
}

.logo-mark svg { width: 22px; height: 22px; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s;
  position: relative;
}

.theme-toggle-btn:active { transform: scale(.92); }

.theme-toggle-btn .theme-icon {
  font-size: 1rem;
  transition: transform 0.3s var(--spring);
}

[data-theme="light"] .theme-toggle-btn .theme-icon {
  transform: rotate(180deg);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s;
  position: relative;
}

.icon-btn:active { transform: scale(.92); }

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

/* Screen Container */
.screen-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
  scroll-behavior: smooth;
}

/* PTR */
.ptr-indicator {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -48px);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: transform .2s ease, opacity .2s ease;
  opacity: 0;
  pointer-events: none;
}

.ptr-indicator.visible { opacity: 1; }
.ptr-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  transition: transform .1s linear;
}

.ptr-indicator.loading .ptr-spinner {
  animation: ptr-spin .7s linear infinite;
}

@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* Screens */
.screen {
  display: none;
  animation: screenIn .35s var(--spring);
  padding-bottom: 20px;
}

.screen.active { display: block; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── BOTTOM NAV - GLASS STYLE ── */
.bottom-nav {
  flex-shrink: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 100;
  position: relative;
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--nav-icon-idle);
  font-size: .63rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color .2s;
  padding: 4px 10px;
  min-width: 52px;
  background: none;
  border: none;
  font-family: var(--font-body);
}

.nav-link .nav-icon-wrapper {
  width: 44px;
  height: 32px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--nav-icon-idle);
}

.nav-link .nav-icon-wrapper i {
  font-size: 1.15rem;
  transition: transform .2s var(--spring);
}

.nav-link .nav-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--nav-icon-idle);
  transition: color 0.3s;
  letter-spacing: 0.02em;
}

.nav-link.active .nav-icon-wrapper {
  color: #fff;
  background: linear-gradient(150deg, var(--c1, var(--accent)), var(--c2, var(--accent-dark)) 120%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35),
              inset 0 -5px 8px -5px rgba(0,0,0,.35),
              0 6px 14px -5px var(--sh, var(--accent-glow));
  border-radius: 13px;
}

.nav-link.active .nav-label {
  color: var(--nav-icon-active);
  font-weight: 600;
}

.nav-link.active .nav-icon-wrapper::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.nav-center-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
}

.nav-link.qr-center {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 18px;
  color: white;
  width: 56px;
  height: 56px;
  box-shadow: 0 6px 24px rgba(124,92,252,0.45);
  margin-bottom: 6px;
  gap: 0;
  padding: 0;
}

.nav-link.qr-center .nav-icon-wrapper {
  color: white;
  width: 56px;
  height: 56px;
}

.nav-link.qr-center .nav-icon-wrapper i {
  font-size: 1.35rem;
  margin: 0;
}

.nav-link.qr-center.active .nav-icon-wrapper {
  color: white;
  background: transparent;
}

.nav-link.qr-center.active .nav-icon-wrapper::after {
  display: none;
}

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 0 16px 14px;
  border: 1px solid var(--border);
  transition: background 0.4s, border-color 0.4s;
}

.card:hover { background: var(--bg-card-hover); }

.card-gradient {
  background: var(--card-gradient);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  transition: background 0.4s, border-color 0.4s;
}

.savings-card {
  background: var(--savings-gradient);
  border: 1px solid var(--savings-border);
  border-radius: var(--radius-xl);
  transition: background 0.4s, border-color 0.4s;
}

.section-h {
  padding: 16px 16px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-t {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-l {
  font-size: .82rem;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
}

.back-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.back-row i { color: var(--text-secondary); font-size: .9rem; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
}

.badge-success { background: var(--success-bg); color: var(--green); }
.badge-warning { background: rgba(245,158,11,0.12); color: var(--amber); }
.badge-danger { background: var(--danger-bg); color: var(--red); }
.badge-info { background: rgba(79,140,255,0.12); color: var(--blue); }
.badge-purple { background: var(--accent-glow); color: var(--accent); }

/* ── HOME HERO ── */
.home-hero {
  padding: 24px 20px 20px;
  position: relative;
  overflow: hidden;
}

.home-hero .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.hero-greeting {
  font-size: .82rem;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 4px;
}

.hero-name {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.balance-label {
  font-size: .72rem;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}

.balance-amount {
  font-family: var(--font-body);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  cursor: pointer;
}

.balance-change {
  font-size: .78rem;
  color: var(--text-tertiary);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.quick-actions::-webkit-scrollbar { display: none; }

.qa {
  flex: 0 0 auto;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.qa-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  font-size: 1.05rem;
  color: #fff;
  border: none;
  background: linear-gradient(150deg, var(--c1, var(--accent)), var(--c2, var(--accent-dark)) 120%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35),
              inset 0 -6px 10px -6px rgba(0,0,0,.35),
              0 8px 16px -6px var(--sh, var(--accent-glow));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.qa-icon:active { transform: scale(.92); }

.qa-label {
  font-size: .68rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

/* ── TXN ITEMS ── */
.txn-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.txn-item:last-child { border-bottom: none; }

.txn-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35),
              inset 0 -5px 8px -5px rgba(0,0,0,.35),
              0 6px 14px -6px var(--sh, var(--accent-glow));
}

.txn-icon.in  { background: linear-gradient(150deg, #2be6c2, #00967a 120%); --sh: rgba(0,212,170,.4); }
.txn-icon.out { background: linear-gradient(150deg, #ff7a92, #d42a49 120%); --sh: rgba(255,77,106,.4); }
.txn-icon.other { background: linear-gradient(150deg, #8b6df0, #5a3dd4 120%); --sh: rgba(124,92,252,.45); }

.txn-info { flex: 1; }
.txn-title { font-weight: 600; font-size: .88rem; color: var(--text-primary); }
.txn-sub { font-size: .73rem; color: var(--text-tertiary); margin-top: 2px; }

.txn-amt {
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
}

.txn-amt.in { color: var(--green); }
.txn-amt.out { color: var(--red); }
.txn-amt.other { color: var(--text-primary); }

/* ── NUMPAD ── */
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 300px;
  margin: 0 auto;
  padding: 0 16px;
}

.num-key {
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font-mono);
}

.num-key:active {
  transform: scale(.9);
  background: var(--accent-glow);
}

.num-key.action {
  font-size: .75rem;
  color: var(--accent);
  background: var(--accent-glow);
}

.amount-display {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 20px 16px 10px;
}

.quick-amt-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 16px 18px;
}

.quick-amt-chip {
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: .76rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 100px;
  font-family: var(--font-body);
  transition: all .15s;
}

.quick-amt-chip:active {
  transform: scale(.94);
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}

/* ── PROGRESS ── */
.prog {
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.prog-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .8s var(--spring);
}

/* ── WALLET PILLS ── */
.wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 30px;
  padding: 10px 16px;
  cursor: pointer;
  transition: all .2s;
  margin: 4px;
}

.wallet-pill.active {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.wallet-flag { font-size: 1.1rem; }
.wallet-info { line-height: 1.2; }
.wallet-code { font-size: .72rem; font-weight: 700; color: var(--text-primary); }
.wallet-bal { font-family: var(--font-body); font-size: .78rem; color: var(--text-secondary); }

/* ── BUDGET ── */
.budget-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  margin: 8px 0;
}

.budget-seg {
  height: 100%;
  transition: width .6s var(--spring);
}

/* ── TOAST ── */
.toast-el {
  position: fixed;
  bottom: calc(90px + env(safe-area-inset-bottom) + var(--stack-offset, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: .82rem;
  z-index: 9999;
  pointer-events: none;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  animation: toastIn .4s var(--spring);
  width: max-content;
  max-width: min(360px, calc(100% - 40px));
  text-align: center;
  transition: bottom .25s var(--spring);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.toast-el.leaving {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  transition: opacity .2s, transform .2s;
}

.toast-el.success { background: var(--green); color: white; }
.toast-el.error { background: var(--red); color: white; }
.toast-el.info { background: var(--accent); color: white; }
.toast-el.warning { background: var(--orange); color: white; }
.toast-el.saved { background: var(--green); color: white; }
.toast-el.sent { background: var(--accent); color: white; }
.toast-el.processing { background: var(--bg-secondary); color: var(--text-primary); }
.toast-el .toast-icon { margin-right: 7px; }

/* ── UI/UX FEEDBACK KIT ── */
/* Button states: loading / success / error, paired with haptics via setBtnState() */
.btn-spinner{display:inline-block;width:14px;height:14px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:btn-spin .6s linear infinite;vertical-align:-2px;margin-right:7px}
@keyframes btn-spin{to{transform:rotate(360deg)}}
.btn-loading{opacity:.85;cursor:wait;pointer-events:none}
.btn-success{background:var(--green)!important;border-color:var(--green)!important;color:#fff!important}
.btn-error{background:var(--red)!important;border-color:var(--red)!important;color:#fff!important}
.btn-loading,.btn-success,.btn-error{transition:background .25s var(--spring),color .25s var(--spring)}

/* Skeleton loaders */
.skel-row{display:flex;align-items:center;gap:12px;padding:14px 20px;border-bottom:1px solid var(--border)}
.skel-avatar{width:40px;height:40px;border-radius:50%;flex-shrink:0}
.skel-avatar,.skel-line{background:linear-gradient(90deg,var(--bg-secondary) 25%,var(--border) 50%,var(--bg-secondary) 75%);background-size:200% 100%;animation:skel-shimmer 1.4s ease-in-out infinite}
.skel-col{flex:1;display:flex;flex-direction:column;gap:6px;min-width:0}
.skel-line{height:10px;border-radius:5px}
.skel-line.w-20{width:20%}.skel-line.w-35{width:35%}.skel-line.w-40{width:40%}.skel-line.w-50{width:50%}.skel-line.w-60{width:60%}.skel-line.w-70{width:70%}
.skel-card{padding:16px;border-radius:16px;background:var(--bg-secondary);display:flex;flex-direction:column;gap:8px;margin-bottom:10px}
@keyframes skel-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* Generic step/upload progress bar */
.mrp-progress{height:6px;border-radius:3px;background:var(--bg-secondary);overflow:hidden}
.mrp-progress-fill{height:100%;background:linear-gradient(90deg,var(--accent-dark),var(--accent));border-radius:3px;transition:width .4s var(--spring);width:0%}

/* Offline / connectivity banner */
.mrp-offline-banner{position:fixed;top:0;left:0;right:0;z-index:9998;background:var(--orange);color:#1a1200;font-size:.78rem;font-weight:700;text-align:center;padding:8px 12px;padding-top:calc(8px + env(safe-area-inset-top));transform:translateY(-100%);transition:transform .3s var(--spring);display:flex;align-items:center;justify-content:center;gap:8px}
.mrp-offline-banner.show{transform:translateY(0)}
.mrp-offline-banner.reconnected{background:var(--green);color:#fff}

/* Queued (pending sync) indicator badge, used for actions performed while offline */
.mrp-queued-badge{display:inline-flex;align-items:center;gap:4px;font-size:.68rem;font-weight:700;color:var(--orange);background:rgba(245,158,11,.12);padding:2px 8px;border-radius:8px}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── QR CODE (receive screen + QR modal) ──
   The actual bug: #receive-qr / #qr-large sat next to the @tag badge
   above them as two adjacent inline-level boxes with nothing forcing
   a line break between them. On phone-width screens they fit on the
   same line, so (a) the pair got centered as one unit — visibly
   shifting the QR right of the card's true center — and (b) the short
   badge baseline-aligned to the much taller QR box, dropping it down
   near the QR's bottom edge. Fixed at the source in index.html: both
   the badge and the QR box are now `display:flex`/`display:block`
   with `width:fit-content;margin:0 auto`, so each is guaranteed its
   own line and centers independently of its sibling's width. This
   canvas/img rule is kept as a secondary safeguard — qrcodejs's own
   canvas+img output is an inline-level replaced element too, so this
   stops the drop-shadow-from-descender-whitespace variant of the same
   class of bug once the boxes are correctly block-level. */
#receive-qr, #qr-large { line-height: 0; }
#receive-qr canvas, #receive-qr img,
#qr-large canvas, #qr-large img {
  display: block;
  margin: 0 auto;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

/* Every modal shared the same z-index (500), so which one rendered on top
   was decided by DOM order, not open-order — e.g. the PIN modal opening
   from within the Add Bank modal could render BEHIND it. The PIN modal is
   always a final confirmation step layered on top of whatever triggered
   it, so it gets its own higher z-index rather than sharing the pool. */
#pin-modal.modal-overlay { z-index: 600; }

/* Split Pay's create modal grows tall as participant rows are added, and
   the primary action button could end up below the visible/reachable
   area — pin it to the bottom of the sheet's own scroll area so it's
   always tappable no matter how long the participant list gets. Also
   given its own z-index as a defensive measure in case dynamically-added
   content ever triggers a stacking-context quirk this modal alone hits. */
#split-create-modal.modal-overlay { z-index: 550; }
#split-create-modal .modal-sheet { display: flex; flex-direction: column; }
#split-create-modal .split-sticky-footer {
  position: sticky;
  bottom: 0;
  background: var(--bg-secondary);
  padding-top: 10px;
  margin-top: 4px;
}

.modal-sheet {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 430px;
  padding: 8px 24px calc(32px + env(safe-area-inset-bottom));
  max-height: 90dvh;
  overflow-y: auto;
  animation: slideUp .4s var(--spring);
  transition: background 0.4s;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 18px;
}

/* ── PIN ── */
.pin-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 20px 0;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: all .15s;
}

.pin-dot.filled {
  background: var(--accent);
  border-color: var(--accent);
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 280px;
  margin: 0 auto;
}

.pin-key {
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font-mono);
}

.pin-key:active {
  transform: scale(.92);
  background: var(--accent-glow);
}

.pin-key.action {
  font-size: .8rem;
  color: var(--accent);
  background: var(--accent-glow);
}

/* ── SETTINGS ── */
.setting-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.setting-row:last-child { border-bottom: none; }

.setting-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
  color: #fff !important;
  background: linear-gradient(150deg, var(--c1, var(--accent)), var(--c2, var(--accent-dark)) 120%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35),
              inset 0 -5px 8px -5px rgba(0,0,0,.35),
              0 6px 14px -6px var(--sh, var(--accent-glow));
}

.setting-info { flex: 1; }
.setting-title {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-primary);
}

.setting-sub {
  font-size: .75rem;
  color: var(--text-tertiary);
  margin-top: 1px;
}

.toggle {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--toggle-bg);
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.toggle.on { background: var(--accent); border-color: var(--accent); }

.toggle::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: left .2s var(--spring);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.toggle.on::after { left: 22px; }

/* ── UPLOAD ── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-input);
  transition: all .2s;
}

.upload-area:hover { border-color: var(--accent); background: var(--accent-glow); }

/* ── REWARDS ── */
.reward-card {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: var(--radius-xl);
  padding: 28px;
  margin: 0 16px 14px;
  color: white;
  position: relative;
  overflow: hidden;
}

.reward-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,.15) 0%, transparent 60%);
}

.reward-pts {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -1px;
}

/* ── SAVINGS ── */
.savings-card-custom {
  background: linear-gradient(135deg, var(--green), #00b894);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: white;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.savings-card-custom::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 160px;
  height: 160px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}

/* ── SUPPORT ── */
.support-msg {
  background: var(--bg-input);
  border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 10px;
  max-width: 85%;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.support-msg.out {
  background: var(--accent);
  color: white;
  border-radius: var(--radius-lg) 0 var(--radius-lg) var(--radius-lg);
  margin-left: auto;
}

/* ── RECIP ── */
.recip-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  border: 1px solid var(--border);
}

.recip-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-weight: 800;
  font-family: var(--font-display);
  font-size: .9rem;
}

.recip-name {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text-primary);
}

.recip-tag {
  font-size: .78rem;
  color: var(--text-tertiary);
}

/* ── BANK-DETECTED CONFIRMATION CARD (send-to-bank flow) ── */
.bank-confirm-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.bank-confirm-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  font-weight: 800;
  font-family: var(--font-display);
  font-size: .8rem;
}

/* ── RECIPIENT AUTOCOMPLETE / RECENT SENDEES ── */
.recip-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background .15s;
}
.recip-option:hover, .recip-option:active { background: var(--bg-input); }
.recip-option + .recip-option { margin-top: 4px; }

.recent-recip-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch;
}
.recent-recip-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  width: 60px;
  cursor: pointer;
}
.recent-recip-chip .recip-avatar { width: 48px; height: 48px; font-size: .95rem; }
.recent-recip-chip .recip-tag {
  font-size: .68rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}
.recent-recip-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 4px 2px 8px;
}

/* ── KYC BANNER ── */
.kyc-banner {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.15);
  border-radius: 14px;
  padding: 14px 16px;
  display: none;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all .3s;
  margin: 12px 16px 0;
}

.kyc-banner:active { transform: scale(0.98); }

/* ── QA GRID ── */
.qa-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 12px 8px;
  border-radius: 16px;
  transition: background 0.25s;
}

.qa-grid-item:active { background: var(--bg-card-hover); }

.qa-grid-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  background: linear-gradient(150deg, var(--c1, var(--accent)), var(--c2, var(--accent-dark)) 120%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35),
              inset 0 -6px 10px -6px rgba(0,0,0,.35),
              0 8px 16px -6px var(--sh, var(--accent-glow));
}

.qa-grid-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  transition: color 0.4s;
}

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

/* ── HISTORY TABS ── */
.history-tab {
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  font-family: var(--font-body);
}

.history-tab.active {
  color: var(--accent);
  background: var(--accent-glow);
  font-weight: 600;
}

/* ── QR SCAN ── */
.scan-frame {
  width: 220px;
  height: 220px;
  border: 2px solid var(--accent);
  border-radius: 20px;
  position: relative;
  margin: 24px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  overflow: hidden;
}

.scan-frame::before,
.scan-frame::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
}

.scan-frame::before {
  top: 8px;
  left: 8px;
  border-top-width: 3px;
  border-left-width: 3px;
  border-radius: 6px 0 0 0;
}

.scan-frame::after {
  bottom: 8px;
  right: 8px;
  border-bottom-width: 3px;
  border-right-width: 3px;
  border-radius: 0 0 6px 0;
}

.scan-line {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scanMove 2.5s ease-in-out infinite;
}

@keyframes scanMove {
  0%, 100% { top: 10%; }
  50% { top: 85%; }
}

/* ── QR TABS ── */
.qr-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.25s;
  font-family: var(--font-body);
}

.qr-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ── BILLS: category row + provider tile grid ── */
.bill-cat-row {
  display: flex;
  gap: 10px;
  padding: 4px 16px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.bill-cat-row::-webkit-scrollbar { display: none; }

.bill-type-btn {
  flex: 0 0 auto;
  width: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: var(--font-body);
  cursor: pointer;
}

.bill-cat-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  font-size: 1.15rem;
  opacity: .55;
  transition: opacity .2s, transform .15s;
}

.bill-type-btn span:last-child {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-tertiary);
  transition: color .2s;
}

.bill-type-btn.active .bill-cat-icon { opacity: 1; transform: translateY(-2px); }
.bill-type-btn.active span:last-child { color: var(--text-primary); font-weight: 700; }
.bill-type-btn:active .bill-cat-icon { transform: scale(.92); }

.bill-pkg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 16px 16px;
}

.bill-pkg-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all .15s;
}

.bill-pkg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: .72rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.bill-pkg-name {
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.25;
}

.bill-pkg-btn.active {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.bill-pkg-btn.active .bill-pkg-name { color: var(--accent); }

/* ── SEND MODE TOGGLE ── */
.send-mode-btn.active {
  background: var(--accent) !important;
  color: white !important;
  border-color: var(--accent) !important;
}
.bank-picker-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 8px; cursor: pointer; border-radius: var(--radius-md);
}
.bank-picker-row:hover { background: var(--bg-input); }

/* ── SHIMMER ── */
.shimmer-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, var(--shimmer) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 4s ease infinite;
  pointer-events: none;
  border-radius: inherit;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── BTN PRIMARY ── */
.btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(124,92,252,0.3);
  font-family: var(--font-body);
}

.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98) translateY(0); }

/* ── PROGRESS TRACK ── */
.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-input);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
  width: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 430px) {
  .app { max-width: 100%; }
  .home-hero { padding: 20px 16px 16px; }
  .card { margin: 0 12px 12px; padding: 16px; }
  .section-h { padding: 12px 12px 6px; }
}

/* Status bar tint on iOS Safari */
@supports (-webkit-touch-callout: none) {
  #main-app { padding-top: env(safe-area-inset-top); }
}

/* Better input styles */
.input-f { -webkit-appearance: none; appearance: none; }

/* Glassmorphism active screen background */
.screen-glass-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s;
  background: radial-gradient(ellipse at 70% 15%, var(--accent-glow) 0%, transparent 55%),
              radial-gradient(ellipse at 20% 80%, rgba(79,140,255,0.08) 0%, transparent 50%);
}

#main-app.app-active .screen-glass-bg { opacity: 1; }

/* ── VIRTUAL CARD ──
   The floating/tilted "3D card" treatment lives here now — this is
   the real card the user actually owns, so it's the natural home for
   it (previously prototyped as a decorative mockup on the Home hero). */
.v-card {
  border-radius: var(--radius-lg);
  padding: 22px;
  color: white;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 16px 32px -14px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .2s ease;
}

.v-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}

.v-card::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 150px;
  height: 150px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}

.v-card.v-card--hero {
  box-shadow: 0 28px 50px -16px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.3);
}

.v-card.v-card--hero::after {
  /* Reuse ::after's box for a diagonal sheen instead of the soft
     circle on the hero card only — a plain gradient overlay reads
     "glossy card" better than a second blurred blob would. */
  content: '';
  inset: 0;
  top: 0; left: 0; bottom: auto; right: auto;
  width: 100%;
  height: 100%;
  background: linear-gradient(115deg, rgba(255,255,255,.22) 0%, transparent 45%);
  border-radius: 0;
  mix-blend-mode: overlay;
}

.v-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 1;
  position: relative;
}

.v-card-mid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
  position: relative;
  margin-top: 10px;
}

.v-card-chip {
  width: 34px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(140deg, #ffe9b0, #d9a441);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.6), inset 0 -2px 2px rgba(0,0,0,.15);
}

.v-card-nfc {
  font-size: 1.1rem;
  opacity: .85;
  transform: rotate(90deg);
}

.v-card-num {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 3px;
  margin: 14px 0;
  z-index: 1;
  position: relative;
}

.v-card-det {
  display: flex;
  gap: 20px;
  font-size: .72rem;
  z-index: 1;
  position: relative;
}

.v-card-det span {
  opacity: .6;
  display: block;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: .6rem;
}