/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
button { background: none; border: none; padding: 0; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
input { font: inherit; color: inherit; }

:root {
  --bg: #0A0E13;
  --surface: #131820;
  --surface-2: #1A2029;
  --surface-3: #232B36;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #FFFFFF;
  --text-2: #99A1AE;
  --text-3: #5C6470;
  --accent: #FF7A33;
  --accent-2: #E04A0F;
  --accent-soft: rgba(255, 122, 51, 0.14);
  --success: #4ADE80;
  --success-soft: rgba(74, 222, 128, 0.12);
  --danger: #F87171;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-lg: 28px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: contain;
}

/* ---------- Screen container (mobile-first centered) ---------- */
.screen {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding-top: var(--safe-top);
  padding-bottom: calc(96px + var(--safe-bottom));
  position: relative;
  background: var(--bg);
}

@media (min-width: 481px) {
  body { background: #050709; padding: 24px 0; }
  .screen {
    min-height: calc(100dvh - 48px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    border-radius: 32px;
    overflow: hidden;
  }
}

/* ---------- Header ---------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
}
.header-user { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #FF9A5C, #E04A0F);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar.avatar-photo { background: var(--surface-2); padding: 0; }
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.greet { font-size: 13px; color: var(--text-2); line-height: 1.2; }
.name { font-size: 16px; font-weight: 700; line-height: 1.2; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  border: 1px solid var(--border);
}
.icon-btn .dot {
  position: absolute; top: 8px; right: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #FF3B30;
  border: 2px solid var(--surface);
}

/* ---------- Balance card ---------- */
.balance-card {
  margin: 8px 16px 0;
  padding: 24px 22px 22px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 122, 51, 0.28), transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(255, 122, 51, 0.12), transparent 60%),
    linear-gradient(155deg, #1B2230 0%, #11161F 100%);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.balance-card::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 18px 18px;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.balance-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
  position: relative; z-index: 1;
}
.balance-label { color: var(--text-2); font-size: 13px; font-weight: 500; letter-spacing: 0.02em; }
.ccy-toggle {
  display: inline-flex; background: rgba(255,255,255,0.06);
  border-radius: 999px; padding: 3px;
  border: 1px solid var(--border);
}
.ccy-toggle button {
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  transition: background-color 160ms, color 160ms;
}
.ccy-toggle button.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(255, 122, 51, 0.4); }
.balance-amount {
  font-size: 38px; font-weight: 800; letter-spacing: -0.025em;
  position: relative; z-index: 1;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.balance-amount .ccy-symbol { font-size: 28px; font-weight: 700; vertical-align: top; margin-right: 2px; opacity: 0.92; }
.balance-amount .cents { font-size: 22px; font-weight: 700; opacity: 0.75; vertical-align: top; margin-left: 1px; }
.balance-sub {
  margin-top: 10px; font-size: 13px; color: var(--text-2);
  display: flex; align-items: center; gap: 6px;
  position: relative; z-index: 1;
}
.balance-sub .delta { color: var(--success); font-weight: 600; }

/* ---------- Quick actions ---------- */
.actions {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; padding: 22px 16px 4px;
}
.action {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.action-icon {
  width: 54px; height: 54px; border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: transform 120ms, background-color 160ms;
}
.action:active .action-icon { transform: scale(0.94); background: var(--surface-2); }
.action-label { font-size: 12px; color: var(--text-2); font-weight: 500; }

/* ---------- Section heading ---------- */
.section-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 20px 12px;
}
.section-title { font-size: 17px; font-weight: 700; }
.section-link { font-size: 13px; color: var(--accent); font-weight: 600; }

/* ---------- Account cards (horizontal scroller) ---------- */
.accounts {
  display: flex; gap: 12px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.accounts::-webkit-scrollbar { display: none; }
.account-card {
  flex: 0 0 76%;
  scroll-snap-align: start;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; flex-direction: column; gap: 14px;
  text-align: left;
}
.account-top { display: flex; justify-content: space-between; align-items: flex-start; }
.account-name { font-size: 14px; font-weight: 600; color: var(--text); }
.account-iban { font-size: 11px; color: var(--text-3); margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.flag {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  border: 1px solid var(--border);
}
.account-balance { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.015em; }

/* ---------- Transactions list ---------- */
.tx-list { padding: 0 8px; }
.tx-group-label {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 14px 12px 6px;
}
.tx-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  width: 100%;
  border-radius: var(--radius-sm);
  transition: background-color 140ms;
}
.tx-item:active { background: var(--surface); }
.tx-icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}
.tx-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.tx-merchant { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tx-meta { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tx-amount { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-amount.positive { color: var(--success); }

/* ---------- Bottom nav ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: center;
  pointer-events: none;
  padding-bottom: var(--safe-bottom);
  z-index: 50;
}
.tabbar-inner {
  pointer-events: auto;
  width: 100%; max-width: 480px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
  padding: 10px 8px calc(10px + var(--safe-bottom));
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--text-3);
  font-size: 10px; font-weight: 600;
  padding: 4px;
  border-radius: 12px;
  min-height: 56px;
  transition: color 140ms;
}
.tab:not(.pay) svg { width: 22px; height: 22px; flex-shrink: 0; }
.tab span { line-height: 1; }
.tab.active { color: var(--accent); }
.tab.pay {
  background: var(--accent);
  color: #fff;
  width: 44px; height: 44px;
  min-height: 44px; max-height: 44px;
  border-radius: 50%;
  align-self: center;
  justify-self: center;
  justify-content: center;
  font-size: 0;
  padding: 0;
  margin: 0;
  box-shadow: 0 6px 18px rgba(255, 122, 51, 0.4);
}
.tab.pay svg { width: 22px; height: 22px; }
.tab.pay:active { transform: scale(0.95); }

/* ---------- Detail screen ---------- */
.subheader {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 16px 8px;
}
.back-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.subheader-title { font-size: 17px; font-weight: 700; }

.card-visual {
  margin: 12px 16px 4px;
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: linear-gradient(135deg, #2A1A0E 0%, #0A0E13 60%);
}
.card-visual::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(255, 122, 51, 0.55), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(255, 122, 51, 0.18), transparent 60%);
}
.card-visual.usd { background: linear-gradient(135deg, #0E1A2A 0%, #0A0E13 60%); }
.card-visual.usd::before {
  background:
    radial-gradient(ellipse at 85% 10%, rgba(80, 140, 255, 0.5), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(80, 140, 255, 0.18), transparent 60%);
}
.card-row { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.card-brand { font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.card-brand span { color: var(--accent); }
.card-visual.usd .card-brand span { color: #6FA4FF; }
.card-chip {
  width: 38px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, #D9B26A, #8C6E2E);
}
.card-pan {
  font-size: 18px; font-weight: 600; letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  position: relative; z-index: 1;
}
.card-foot { display: flex; justify-content: space-between; align-items: flex-end; position: relative; z-index: 1; }
.card-foot-label { font-size: 9px; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.1em; }
.card-foot-value { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }

.stat-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 18px 16px 4px;
}
.stat {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}
.stat-label { font-size: 12px; color: var(--text-2); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.stat-icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.stat-icon.in { background: var(--success-soft); color: var(--success); }
.stat-icon.out { background: var(--accent-soft); color: var(--accent); }
.stat-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.iban-row {
  margin: 18px 16px 4px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.iban-block .label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.iban-block .value { font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.iban-copy {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
}

/* ---------- Search & filters (transactions screen) ---------- */
.search-row { padding: 4px 16px 8px; }
.search-input {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
}
.filter-row {
  display: flex; gap: 8px; padding: 4px 16px 8px;
  overflow-x: auto;
}
.filter-row::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px; font-weight: 600;
}
.chip.active { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ---------- Page transitions ---------- */
/* NOTE: animating transform creates a containing block for fixed-position
   descendants, which breaks our bottom-pinned tabbar. So we only fade opacity. */
.fade-in { animation: fadeIn 220ms ease both; }
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Header user (clickable) ---------- */
.header-user { display: flex; align-items: center; gap: 12px; text-align: left; }
.header-user:active { opacity: 0.7; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px; font-weight: 700;
  border: 1px solid transparent;
  transition: transform 100ms, background-color 160ms, opacity 160ms;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px rgba(255, 122, 51, 0.32); }
.btn-primary:not(:disabled):hover { background: #ff8a4d; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-text { background: transparent; color: var(--text-2); font-weight: 600; }
.btn-text:hover { color: var(--text); }
.btn-danger { background: rgba(248, 113, 113, 0.12); color: var(--danger); border-color: rgba(248, 113, 113, 0.3); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.2); }
.btn-lg { padding: 14px 22px; font-size: 15px; width: 100%; }

/* ---------- Welcome ---------- */
.welcome { min-height: 100dvh; display: flex; flex-direction: column; justify-content: space-between; padding: 0 24px 32px; }
.welcome-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; text-align: center; padding-top: 80px; }
.welcome-logo {
  width: 84px; height: 84px; border-radius: 22px;
  background: linear-gradient(135deg, #FF9A5C, #E04A0F);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 16px 40px rgba(255, 122, 51, 0.35);
}
.welcome-title { font-size: 28px; font-weight: 800; letter-spacing: -0.025em; }
.welcome-sub { font-size: 15px; color: var(--text-2); max-width: 280px; }
.welcome-cta { display: flex; flex-direction: column; gap: 10px; padding-top: 24px; }

/* ---------- Forms ---------- */
.auth-form {
  display: flex; flex-direction: column; gap: 14px;
  padding: 8px 16px 32px;
}
.auth-form .btn { margin-top: 6px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field > label {
  font-size: 12px; font-weight: 600; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field input[type="datetime-local"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 14px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 140ms, background-color 140ms;
  appearance: none;
  -webkit-appearance: none;
}
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2399A1AE' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.form-field textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-2);
}
.form-field input:disabled { opacity: 0.6; }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-3); }
.form-hint { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.form-error {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: var(--danger);
  font-size: 13px;
}

/* ---------- Amount input ---------- */
.amount-input { position: relative; }
.amount-input .amount-sign {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 700; color: var(--text-2);
  pointer-events: none;
}
.amount-input input { padding-left: 36px; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Segmented control ---------- */
.seg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px; background: var(--surface); border-radius: 14px; border: 1px solid var(--border); }
.seg { display: flex; align-items: center; justify-content: center; padding: 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: background-color 140ms, color 140ms; }
.seg input { display: none; }
.seg.active { background: var(--accent); color: #fff; }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; transition: background-color 140ms, border-color 140ms; }
.cat input { display: none; }
.cat-icon { color: var(--text-2); }
.cat-label { font-size: 11px; color: var(--text-2); font-weight: 600; }
.cat.active { background: var(--accent-soft); border-color: var(--accent); }
.cat.active .cat-icon, .cat.active .cat-label { color: var(--accent); }

/* ---------- Color picker ---------- */
.color-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.color-swatch { cursor: pointer; }
.color-swatch input { display: none; }
.color-swatch span {
  display: block; width: 44px; height: 44px; border-radius: 14px;
  border: 2px solid transparent;
  transition: border-color 140ms, transform 100ms;
}
.color-swatch.orange   span { background: linear-gradient(135deg, #FF9A5C, #E04A0F); }
.color-swatch.blue     span { background: linear-gradient(135deg, #5FA7FF, #1E4FAA); }
.color-swatch.green    span { background: linear-gradient(135deg, #6BE0A8, #1E8A55); }
.color-swatch.purple   span { background: linear-gradient(135deg, #B582FF, #5A2EAA); }
.color-swatch.graphite span { background: linear-gradient(135deg, #4A5260, #1A2029); }
.color-swatch.selected span { border-color: #fff; transform: scale(1.05); }

/* ---------- Settings ---------- */
.settings-accounts { display: flex; flex-direction: column; gap: 8px; padding: 0 12px; }
.settings-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: left;
  color: var(--text);
}
.settings-row:active { background: var(--surface-2); }
.settings-row-main { flex: 1; min-width: 0; }
.settings-row-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.settings-row-ccy { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.settings-row-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.settings-row-action { color: var(--text-2); font-weight: 600; }
.settings-row-action.danger { color: var(--danger); }
.settings-footer { text-align: center; font-size: 11px; color: var(--text-3); padding: 24px 16px 8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(100px + var(--safe-bottom));
  transform: translateX(-50%) translateY(8px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px; font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  opacity: 0; transition: opacity 180ms, transform 180ms;
  z-index: 200; pointer-events: none;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { border-color: rgba(74, 222, 128, 0.4); }
.toast-error { border-color: rgba(248, 113, 113, 0.4); color: var(--danger); }

/* ---------- Card visual color variants ---------- */
.card-visual[data-color="orange"]   { background: linear-gradient(135deg, #2A1A0E 0%, #0A0E13 60%); }
.card-visual[data-color="orange"]::before   { background: radial-gradient(ellipse at 85% 10%, rgba(255, 122, 51, 0.55), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(255, 122, 51, 0.18), transparent 60%); }
.card-visual[data-color="blue"]     { background: linear-gradient(135deg, #0E1A2A 0%, #0A0E13 60%); }
.card-visual[data-color="blue"]::before     { background: radial-gradient(ellipse at 85% 10%, rgba(95, 167, 255, 0.55), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(95, 167, 255, 0.18), transparent 60%); }
.card-visual[data-color="green"]    { background: linear-gradient(135deg, #0E2A1A 0%, #0A0E13 60%); }
.card-visual[data-color="green"]::before    { background: radial-gradient(ellipse at 85% 10%, rgba(107, 224, 168, 0.55), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(107, 224, 168, 0.18), transparent 60%); }
.card-visual[data-color="purple"]   { background: linear-gradient(135deg, #1F0E2A 0%, #0A0E13 60%); }
.card-visual[data-color="purple"]::before   { background: radial-gradient(ellipse at 85% 10%, rgba(181, 130, 255, 0.55), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(181, 130, 255, 0.18), transparent 60%); }
.card-visual[data-color="graphite"] { background: linear-gradient(135deg, #232B36 0%, #0A0E13 60%); }
.card-visual[data-color="graphite"]::before { background: radial-gradient(ellipse at 85% 10%, rgba(180, 180, 200, 0.35), transparent 55%); }

/* card brand readable across color variants */
.card-brand { color: #fff; }

/* ---------- Mini account card color hint ---------- */
.account-card[data-color="orange"]   { box-shadow: inset 0 2px 0 rgba(255, 122, 51, 0.4); }
.account-card[data-color="blue"]     { box-shadow: inset 0 2px 0 rgba(95, 167, 255, 0.4); }
.account-card[data-color="green"]    { box-shadow: inset 0 2px 0 rgba(107, 224, 168, 0.4); }
.account-card[data-color="purple"]   { box-shadow: inset 0 2px 0 rgba(181, 130, 255, 0.4); }
.account-card[data-color="graphite"] { box-shadow: inset 0 2px 0 rgba(180, 180, 200, 0.3); }

/* ---------- Add account placeholder card ---------- */
.account-card.add-account {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  background: transparent;
  border: 1.5px dashed var(--border-strong);
  color: var(--text-2);
  min-height: 110px;
}
.add-account-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
}
.add-account-label { font-size: 13px; font-weight: 600; }

/* ---------- Empty state ---------- */
.empty-state {
  padding: 60px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
}
.empty-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
}
.empty-title { font-size: 16px; font-weight: 700; }
.empty-sub { font-size: 13px; color: var(--text-2); max-width: 240px; }

/* ---------- Row of inline actions ---------- */
.row-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px 4px;
}
.row-actions .btn { flex: 1; min-width: 0; padding: 11px 12px; font-size: 13px; }

/* ---------- Balance headline (account detail) ---------- */
.balance-headline {
  text-align: center;
  padding: 18px 16px 4px;
}
.balance-headline-label { font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.balance-headline-value { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ---------- Balance card empty state ---------- */
.balance-card.empty { text-align: center; padding: 28px 22px; }
.balance-card.empty .balance-label { display: block; margin-bottom: 8px; }
.balance-card .empty-amount { font-size: 32px; opacity: 0.4; }
.balance-card.empty .balance-empty-hint { display: block; margin-top: 6px; color: var(--text-2); font-size: 13px; }
.balance-card.empty .btn { margin-top: 16px; }

/* ---------- BoG-style currency row (per-currency balances under the total) ---------- */
.ccy-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px;
  position: relative; z-index: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ccy-row::-webkit-scrollbar { display: none; }
.ccy-cell {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: baseline;
  flex-shrink: 0;
}
.ccy-cell-amount {
  font-size: 13px; font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.ccy-sep {
  width: 1px; height: 14px;
  background: var(--border-strong);
  flex-shrink: 0;
}

/* ---------- Banner ---------- */
.banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px; line-height: 1.4;
}
.banner-warn { background: rgba(255, 200, 70, 0.08); border: 1px solid rgba(255, 200, 70, 0.25); color: #FFCC66; }
.banner > svg { flex-shrink: 0; margin-top: 1px; }

/* ---------- Transactions skeleton ---------- */
.tx-skeleton {
  height: 64px;
  margin: 4px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Utilities ---------- */
.mt-12 { margin-top: 12px; }
.invisible { visibility: hidden; }
.centered { display: flex; align-items: center; justify-content: center; min-height: 70dvh; }

/* Make subheader title align nicely without back button */
.subheader .back-btn.invisible { pointer-events: none; }

/* ---------- Welcome tour (post-onboarding) ---------- */
.welcome-tour { padding: 0 16px 32px; }
.welcome-logo-done {
  background: linear-gradient(135deg, #4ADE80, #1E8A55) !important;
  box-shadow: 0 16px 40px rgba(74, 222, 128, 0.32) !important;
}
.tour-section {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
}
.tour-row { display: flex; gap: 14px; align-items: flex-start; }
.tour-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tour-section:nth-child(3) .tour-icon { background: rgba(95, 167, 255, 0.14); color: #6FA4FF; }
.tour-title { font-size: 15px; font-weight: 700; }
.tour-text { font-size: 13px; color: var(--text-2); line-height: 1.45; margin-top: 4px; }
.tour-bottom { margin-top: 24px; }

/* ---------- Onboarding ---------- */
.onboarding-hero {
  text-align: center;
  padding: 32px 24px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.onboarding-hero .welcome-logo {
  width: 64px; height: 64px; border-radius: 18px;
}
.onboarding-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.onboarding-sub { font-size: 14px; color: var(--text-2); max-width: 280px; }
.section-aside { font-size: 12px; color: var(--text-3); font-weight: 500; margin-left: 6px; }

/* ---------- Quick action icon tuning (visual mass) ---------- */
.action-icon { transition: transform 120ms, background-color 160ms; }
.action-icon svg { stroke-width: 1.9; }

/* Settings row title with inline icon */
.settings-row-title svg { color: var(--accent); flex-shrink: 0; }
.settings-row-title { gap: 10px; }


