/* ============================================================
   Everything that is not Home: login, transfer hub, upay
   wallet, cards, rewards, QR, lifestyle hall, chat, limits,
   loan and the Bank Configuration panel.

   Nothing in here names a brand colour. Every surface reads
   --color-primary / --color-header-* , which is what lets the
   upay screens re-skin from one data-brand attribute on the
   shell instead of a parallel stylesheet.
   ============================================================ */

/* ---------- Horizontal rows ---------- */
.qs-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; }
.wallet-row { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 10px; }

/* ============================================================
   Login
   ============================================================ */
.login-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  padding: 0 22px calc(env(safe-area-inset-bottom) + 18px);
}
.login-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 8px;
}
/* The wordmark asset is trimmed to its ink, so this height is the height of
   the letters. The square launcher icon is not usable here: at any sane header
   height its wordmark band would be a few pixels tall. */
.login-logo { height: 26px; display: block; }
/* The full-colour mark is red-on-white artwork, so it only appears on white
   surfaces. On brand-coloured headers the CSS knockout lockup is used instead
   (see .ucb-mark in home.css). */
.login-lang {
  display: flex; align-items: center;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-floating);
  border: 1px solid var(--color-border-1);
  cursor: pointer;
}
.login-lang span {
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text-secondary);
}
.login-lang span.on { background: var(--color-primary); color: #fff; }

.login-title { font-size: 26px; font-weight: 800; margin-top: 26px; letter-spacing: -0.5px; }
.login-tagline { font-size: 13px; color: var(--color-text-secondary); margin-top: 6px; line-height: 1.45; }

/* Underlined fields, not boxed ones — that is how the shipping login screen
   draws them, and it is the one detail that makes a screenshot of this
   recognisable as UCB One rather than as a generic bank login. */
.login-field { margin-top: 22px; }
.login-field-label { font-size: 11.5px; color: var(--color-text-secondary); }
.login-field-label b { color: var(--color-danger); font-weight: 700; }
.login-field-row {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1.5px solid var(--color-border-1);
  padding: 6px 0 9px;
  transition: border-color 0.15s;
}
.login-field-row:focus-within { border-bottom-color: var(--color-primary); }
.login-field-row input {
  flex: 1; min-width: 0;
  border: none; outline: none; background: transparent;
  font-size: 16px; font-weight: 600;
  color: var(--color-text-main);
  padding: 0;
}
.login-field-row button {
  border: none; background: none; cursor: pointer;
  color: var(--color-text-secondary);
  display: flex; padding: 2px;
}

.login-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.login-save { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.login-save-label { font-size: 12.5px; color: var(--color-text-general); }
.login-forgot { font-size: 12.5px; font-weight: 700; color: var(--color-primary-text); cursor: pointer; }

.login-actions { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.login-actions .btn { flex: 1; }
.login-bio {
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-1);
  background: #fff;
  color: var(--color-primary-text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.login-bio:active { transform: scale(0.92); }

.login-foot { margin-top: auto; padding-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.login-foot-link { font-size: 13px; font-weight: 700; color: var(--color-primary-text); cursor: pointer; }
.login-hint {
  font-size: 11.5px;
  color: var(--color-text-secondary);
  background: var(--color-bg-floating);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  line-height: 1.4;
}

/* ---------- Toggle switch (login "Save User ID", card controls, config) ---------- */
.switch {
  width: 38px; height: 22px;
  border-radius: var(--radius-pill);
  background: var(--color-border-1);
  border: none;
  padding: 0;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s var(--ease-drawer);
}
.switch.on { background: var(--color-primary); }
.switch.on::after { transform: translateX(16px); }

/* ============================================================
   Fund Transfer hub
   ============================================================ */
.hub-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--color-border-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.hub-card:active { transform: scale(0.98); }
.hub-card.primary { border-color: rgba(var(--brand-rgb), 0.35); background: linear-gradient(120deg, #fff 60%, var(--color-primary-soft) 100%); }
.hub-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-soft);
  color: var(--color-primary-text);
  flex-shrink: 0;
}
.hub-title { font-size: 14.5px; font-weight: 700; color: var(--color-text-main); }
.hub-sub { font-size: 11.5px; color: var(--color-text-secondary); margin-top: 2px; line-height: 1.3; }

/* Destination pills (own / other UCB / other bank; agent / ATM) */
.opt-row { display: flex; gap: 10px; }
.opt {
  flex: 1;
  border: 1.5px solid var(--color-border-1);
  background: #fff;
  border-radius: var(--radius-md);
  padding: 13px 10px;
  cursor: pointer;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-text-general);
  line-height: 1.3;
  transition: border-color 0.15s, background 0.15s;
}
.opt.active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-text-main);
}

/* Wallet destination tiles (upay / bKash / Nagad / Rocket) */
.mfs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mfs-tile {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 4px;
  border: 1.5px solid var(--color-border-1);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.mfs-tile:active { transform: scale(0.94); }
.mfs-tile.active { border-color: var(--color-primary); background: var(--color-primary-soft); }
.mfs-logo {
  width: 38px; height: 38px;
  border-radius: 11px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.mfs-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mfs-name { font-size: 11px; font-weight: 700; color: var(--color-text-main); }
.mfs-tile .own-flag {
  font-size: 8.5px; font-weight: 800; letter-spacing: 0.6px;
  color: var(--color-primary-text);
}

/* ============================================================
   Cash by Code
   ============================================================ */
.cbc-amount-box {
  border: 1.5px solid rgba(var(--brand-rgb), 0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  background: #fff;
}
.cbc-amount-input {
  width: 100%;
  border: none; outline: none; background: transparent;
  text-align: center;
  font-size: 30px; font-weight: 800;
  color: var(--color-text-main);
  font-variant-numeric: tabular-nums;
}
.cbc-code {
  display: flex; justify-content: center; gap: 8px;
  margin: 18px 0 6px;
}
.cbc-digit {
  width: 40px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  border: 1.5px solid rgba(var(--brand-rgb), 0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; font-weight: 800;
  color: var(--color-primary-text);
  font-variant-numeric: tabular-nums;
}
.notice {
  display: flex; gap: 10px;
  background: #FFF8E8;
  border: 1px solid #F5E2B8;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #7A5A11;
}
.notice .icon { color: #B4830A; flex-shrink: 0; }

/* ============================================================
   upay wallet
   ============================================================ */
.upay-hero {
  position: relative;
  flex-shrink: 0;
  padding: 12px 18px 56px;
  margin-top: calc(-1 * var(--statusbar-h));
  padding-top: calc(12px + var(--statusbar-h));
  background:
    radial-gradient(110% 80% at 15% 0%, rgba(253, 200, 0, 0.22), transparent 62%),
    linear-gradient(168deg, var(--color-header-top) 0%, var(--color-header-mid) 50%, var(--color-header-bot) 100%);
  color: #fff;
  overflow: hidden;
}
.upay-hero::after {
  content: '';
  position: absolute;
  width: 190px; height: 190px;
  right: -60px; top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 200, 0, 0.3), transparent 68%);
  pointer-events: none;
}
.upay-hero-inner { position: relative; z-index: 1; }
.upay-brand { display: flex; align-items: center; gap: 10px; }
.upay-brand img {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: #fff;
  display: block;
  padding: 2px;
}
.upay-brand-name { font-size: 18px; font-weight: 800; line-height: 1.1; }
.upay-brand-sub { font-size: 9.5px; opacity: 0.78; letter-spacing: 0.3px; margin-top: 2px; }

.upay-total { margin-top: 20px; }
.upay-total-label { font-size: 11.5px; opacity: 0.82; }
.upay-total-amount {
  display: flex; align-items: baseline; gap: 2px;
  font-weight: 800; letter-spacing: -0.8px; line-height: 1;
  margin-top: 5px;
}
.upay-total-cur { font-size: 19px; color: var(--upay-yellow); }
.upay-total-int { font-size: 33px; font-variant-numeric: tabular-nums; }
.upay-total-frac { font-size: 19px; opacity: 0.55; font-variant-numeric: tabular-nums; }

/* Sub-wallets. upay's own app shows four separate pots (primary, salary,
   disbursement, remittance) rather than one balance — that separation is the
   product, so the demo leads with it. */
.wallet-card {
  flex: 0 0 148px;
  border-radius: var(--radius-md);
  padding: 13px 14px 15px;
  background: var(--tint, #fff);
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: transform 0.15s;
}
.wallet-card:active { transform: scale(0.96); }
.wallet-card.active { box-shadow: 0 0 0 2px var(--upay-yellow, var(--color-primary)); }
.wallet-card-top { display: flex; align-items: center; justify-content: space-between; }
.wallet-name { font-size: 11.5px; font-weight: 700; color: var(--color-text-general); }
.wallet-amount {
  font-size: 17px; font-weight: 800; margin-top: 10px;
  color: var(--color-text-main);
  font-variant-numeric: tabular-nums;
}

.upay-action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 6px; }
.upay-action {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: none; background: none; cursor: pointer; padding: 0;
  transition: transform 0.15s;
}
.upay-action:active { transform: scale(0.92); }
.upay-action-icon {
  width: 48px; height: 48px;
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  background: var(--upay-yellow-100, var(--color-primary-soft));
  color: var(--color-header-bg);
  border: 1px solid rgba(var(--brand-rgb), 0.28);
}
.upay-action-label {
  font-size: 11px; font-weight: 700; line-height: 1.25;
  color: var(--color-text-main); text-align: center;
}

/* A quiet, permanent reminder of which brand the user is inside. Without it a
   screenshot of the wallet is just "a blue banking app". */
.brand-strip {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 13px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.brand-strip .icon { opacity: 0.8; }

/* ============================================================
   upay Chaka — the loyalty wheel
   ============================================================ */
.points-card {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
}
.points-value {
  font-size: 32px; font-weight: 800; line-height: 1;
  color: var(--color-header-bg);
  font-variant-numeric: tabular-nums;
}
.points-label { font-size: 11.5px; color: var(--color-text-secondary); margin-top: 4px; }

.wheel-wrap {
  position: relative;
  width: 260px; height: 260px;
  margin: 22px auto 0;
}
.wheel {
  width: 100%; height: 100%;
  border-radius: 50%;
  /* The rim is drawn as a ring rather than a border so the conic segments
     inside it stay perfect wedges — a border would clip them unevenly. */
  box-shadow:
    0 0 0 9px var(--upay-yellow, var(--color-primary)),
    0 0 0 12px var(--upay-yellow-600, var(--color-primary-dark)),
    0 12px 30px rgba(0, 0, 0, 0.22);
  transition: transform 3.6s cubic-bezier(0.16, 0.84, 0.24, 1);
  position: relative;
  overflow: hidden;
}
.wheel-seg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 16px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  transform-origin: 50% 50%;
}
.wheel-hub {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 66px; height: 66px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #C9CDD4 78%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 3;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  color: var(--upay-blue-900, var(--color-header-bg));
}
.wheel-hub:disabled { cursor: not-allowed; opacity: 0.65; }
.wheel-pointer {
  position: absolute;
  left: 50%; top: -14px;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 30px solid var(--upay-blue, var(--color-primary-dark));
  z-index: 4;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* ============================================================
   Cards
   ============================================================ */
.card-visual {
  position: relative;
  aspect-ratio: 1.586;         /* ISO/IEC 7810 ID-1 */
  border-radius: 18px;
  padding: 18px 20px;
  color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* The co-branded UCB × upay prepaid card is a blue-to-green sweep with a
     yellow confetti wash — reproduced as gradients rather than lifted artwork. */
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(94, 196, 140, 0.55), transparent 62%),
    linear-gradient(125deg, #01356B 0%, #0A6BC4 55%, #1B9BD4 100%);
  box-shadow: 0 14px 34px rgba(1, 40, 79, 0.34);
  transition: filter 0.3s;
}
.card-visual.frozen { filter: grayscale(0.85) brightness(0.85); }
.card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(118deg, rgba(253, 200, 0, 0.16) 0 2px, transparent 2px 22px);
  pointer-events: none;
}
.card-brands { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.card-brands img { width: 34px; height: 34px; border-radius: 9px; background: #fff; padding: 1px; }
.card-chip {
  width: 34px; height: 26px;
  border-radius: 5px;
  background: linear-gradient(140deg, #F0D48A, #C9A227);
  position: relative; z-index: 1;
  margin-top: 4px;
}
/* Contact pads. Without them the chip is a gold rectangle, which at this size
   reads as a sticker rather than as EMV silicon. */
.card-chip::after {
  content: '';
  position: absolute;
  inset: 4px 6px;
  border-left: 1px solid rgba(120, 88, 10, 0.55);
  border-right: 1px solid rgba(120, 88, 10, 0.55);
  background:
    linear-gradient(rgba(120, 88, 10, 0.55), rgba(120, 88, 10, 0.55)) center/100% 1px no-repeat;
}
.card-pan {
  font-size: 17px; font-weight: 700; letter-spacing: 2.4px;
  position: relative; z-index: 1;
  font-variant-numeric: tabular-nums;
}
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; position: relative; z-index: 1; }
.card-holder { font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; opacity: 0.9; }
.card-scheme { font-size: 15px; font-weight: 800; font-style: italic; letter-spacing: 0.5px; }
.card-frozen-badge {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.32);
  font-size: 13px; font-weight: 800; letter-spacing: 1px;
}

.ctrl-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border-2);
}
.ctrl-row:last-child { border-bottom: none; }
.ctrl-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--color-bg-floating);
  color: var(--color-header-bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ctrl-name { font-size: 14px; font-weight: 600; }
.ctrl-sub { font-size: 11px; color: var(--color-text-secondary); margin-top: 1px; }

/* ============================================================
   QR — scan and receive
   ============================================================ */
.qr-viewfinder {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: #16181C;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.qr-corner {
  position: absolute;
  width: 40px; height: 40px;
  border: 3px solid var(--color-primary);
}
.qr-corner.tl { top: 22px; left: 22px; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.qr-corner.tr { top: 22px; right: 22px; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.qr-corner.bl { bottom: 22px; left: 22px; border-right: 0; border-top: 0; border-radius: 0 0 0 12px; }
.qr-corner.br { bottom: 22px; right: 22px; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.qr-laser {
  position: absolute;
  left: 26px; right: 26px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  box-shadow: 0 0 12px var(--color-primary);
  animation: qrScan 2.4s ease-in-out infinite;
}
@keyframes qrScan {
  0%, 100% { top: 30px; }
  50% { top: calc(100% - 32px); }
}
.qr-hint-text { color: rgba(255, 255, 255, 0.6); font-size: 12px; text-align: center; padding: 0 40px; }

.qr-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
  text-align: center;
}
.qr-svg { width: 176px; height: 176px; display: block; margin: 0 auto; }

/* ============================================================
   Lifestyle hall
   ============================================================ */
.hall-group-title {
  font-size: 12px; font-weight: 800;
  color: var(--color-text-secondary);
  letter-spacing: 0.4px;
  margin: 20px 2px 12px;
  text-transform: uppercase;
}
.miniapp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 10px; }
.miniapp-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  text-align: center; cursor: pointer;
}
.miniapp-icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  overflow: hidden;
  /* A faint tint rather than white: two dozen icons decode over a few hundred
     milliseconds, and on white the un-decoded tiles read as broken. */
  background: var(--color-bg-floating);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s;
}
.miniapp-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.miniapp-item:active .miniapp-icon { transform: scale(0.92); }
.miniapp-label { font-size: 11px; font-weight: 600; color: var(--color-text-main); line-height: 1.25; }
.mono-tile {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 19px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* The mini-app container: a browser-ish chrome around a partner surface, so
   the "runs inside the Super App" claim is visible rather than asserted. */
.mini-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #fff;
}
.mini-frame-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  background: var(--color-bg-floating);
  border-bottom: 1px solid var(--color-border-1);
}
.mini-frame-bar img { width: 22px; height: 22px; border-radius: 6px; }
.mini-frame-host { font-size: 11.5px; font-weight: 700; color: var(--color-text-general); flex: 1; }
.mini-frame-body { padding: 26px 20px 30px; text-align: center; }
.mini-frame-art {
  width: 76px; height: 76px;
  border-radius: 22px;
  margin: 0 auto 16px;
  display: block;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

/* ============================================================
   Conversational banking
   ============================================================ */
.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bubble {
  max-width: 82%;
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.bubble.bot {
  align-self: flex-start;
  background: #fff;
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-card);
  color: var(--color-text-main);
}
.bubble.me {
  align-self: flex-end;
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.device[data-brand="upay"] .bubble.me { color: var(--upay-blue-900); }
.bubble-typing { display: flex; gap: 4px; align-items: center; padding: 14px; }
.bubble-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-text-placeholder);
  animation: typingDot 1.1s infinite;
}
.bubble-typing span:nth-child(2) { animation-delay: 0.15s; }
.bubble-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.chat-suggests { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 10px; flex-shrink: 0; }
.chat-input-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px calc(env(safe-area-inset-bottom) + 14px);
  background: #fff;
  border-top: 1px solid var(--color-border-1);
  flex-shrink: 0;
}
.chat-input-bar input {
  flex: 1; min-width: 0;
  border: 1.5px solid var(--color-border-1);
  border-radius: var(--radius-pill);
  padding: 11px 16px;
  font-size: 14px;
  outline: none;
}
.chat-input-bar input:focus { border-color: var(--color-primary); }
.chat-send {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.device[data-brand="upay"] .chat-send { color: var(--upay-blue-900); }

/* ============================================================
   Limits
   ============================================================ */
.limit-block {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.limit-bar {
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--color-border-2);
  overflow: hidden;
  margin-top: 9px;
}
.limit-bar > span {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
}

/* ============================================================
   Loan
   ============================================================ */
.loan-amount-display {
  text-align: center;
  padding: 6px 0 2px;
}
.loan-amount-value {
  font-size: 34px; font-weight: 800;
  color: var(--color-primary-text);
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.loan-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-border-1);
  outline: none;
  margin: 16px 0 6px;
}
.loan-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(var(--brand-rgb), 0.5);
  cursor: pointer;
}
.loan-slider::-moz-range-thumb {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(var(--brand-rgb), 0.5);
  cursor: pointer;
}
.loan-slider-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--color-text-secondary); }

/* Application progress. A vertical rail rather than a stepper strip: the
   copy under each stage names the workflow queue it sits in, and that does
   not fit horizontally. */
.stage-list { position: relative; padding-left: 30px; }
.stage-list::before {
  content: '';
  position: absolute;
  left: 9px; top: 10px; bottom: 12px;
  width: 2px;
  background: var(--color-border-1);
}
.stage {
  position: relative;
  padding-bottom: 20px;
}
.stage:last-child { padding-bottom: 0; }
.stage::before {
  content: '';
  position: absolute;
  left: -26px; top: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color-border-1);
  z-index: 1;
}
.stage.done::before {
  background: var(--color-success);
  border-color: var(--color-success);
}
.stage.current::before {
  background: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.16);
}
.stage-name { font-size: 13.5px; font-weight: 700; color: var(--color-text-main); }
.stage.pending .stage-name { color: var(--color-text-secondary); font-weight: 600; }
.stage-meta { font-size: 11px; color: var(--color-text-secondary); margin-top: 2px; }

/* ============================================================
   Bank Configuration panel

   Deliberately plain: it is standing in for a back-office
   console, not for another consumer screen, so it uses list
   rows and switches rather than the app's card language.
   ============================================================ */
.cfg-note {
  background: #EEF4FF;
  border: 1px solid #CFE0FA;
  border-radius: var(--radius-md);
  padding: 13px 15px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #1E3A63;
}
.cfg-group {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-top: 14px;
}
.cfg-group-head {
  padding: 13px 16px 11px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  background: var(--color-bg-list-header);
  border-bottom: 1px solid var(--color-border-2);
}
.cfg-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--color-border-2);
}
.cfg-row:last-child { border-bottom: none; }
.cfg-row .icon { color: var(--color-primary-text); flex-shrink: 0; }
.cfg-name { font-size: 13.5px; font-weight: 600; color: var(--color-text-main); }
.cfg-hint { font-size: 11px; color: var(--color-text-secondary); margin-top: 2px; line-height: 1.35; }
.cfg-value {
  font-size: 13px; font-weight: 700;
  color: var(--color-primary-text);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.cfg-seg { display: flex; gap: 6px; flex-shrink: 0; }
.cfg-seg button {
  border: 1px solid var(--color-border-1);
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text-general);
  cursor: pointer;
}
.cfg-seg button.on { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.device[data-brand="upay"] .cfg-seg button.on { color: var(--upay-blue-900); }

/* ============================================================
   Small shared pieces
   ============================================================ */
.stat-row { display: flex; gap: 10px; }
.stat-tile {
  flex: 1;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 13px 14px;
}
.stat-label { font-size: 10.5px; color: var(--color-text-secondary); }
.stat-value { font-size: 16px; font-weight: 800; margin-top: 3px; color: var(--color-text-main); }

.info-strip {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--color-text-general);
  background: var(--color-bg-floating);
  border-radius: var(--radius-md);
  padding: 11px 13px;
}
.info-strip .icon { color: var(--color-primary-text); flex-shrink: 0; margin-top: 1px; }
