/* ============================================================
   VPAY customer application shell and shared user components
   Paired with layouts/shell.php. Mobile-first, OPay-inspired
   composition with a distinctive VPAY identity.
   ============================================================ */

.shell { min-height: 100dvh; }
.content { width: 100%; }

/* ---------- Header row (avatar, greeting, icons) ---------- */
.home-header { display: flex; align-items: center; gap: 12px; padding: 6px 0 14px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--brand-tint); color: var(--brand-strong);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.avatar-lg { width: 54px; height: 54px; font-size: 18px; }
.greet { font-weight: 700; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-icons { display: flex; gap: 8px; }
.header-icons a {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); color: var(--ink-2);
  transition: color .15s ease, background-color .15s ease;
}
.header-icons a:hover { color: var(--brand-strong); background: var(--brand-tint); }
.header-badge {
  position: absolute; top: 7px; right: 7px; width: 8px; height: 8px;
  background: var(--danger); border-radius: 50%; border: 2px solid var(--surface);
}

/* ---------- Balance card ---------- */
.balance-card {
  border-radius: var(--radius-l); color: #fff; padding: 20px;
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(0, 131, 90, .28);
}
.balance-label { font-size: 13px; opacity: .9; font-weight: 600; }
.balance { font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.balance-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eye {
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .18); border: none; border-radius: 50%;
  width: 36px; height: 36px; cursor: pointer; color: #fff; flex: none;
  transition: background-color .15s ease;
}
.eye:hover { background: rgba(255, 255, 255, .3); }
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: var(--ink); font-weight: 600;
  border-radius: 999px; padding: 10px 18px; border: none; cursor: pointer;
  text-decoration: none; font-size: 14px; font-family: var(--font);
  transition: transform .1s ease, box-shadow .15s ease;
}
.pill-btn:hover { box-shadow: 0 4px 12px rgba(12, 26, 36, .18); }
.pill-btn:active { transform: scale(.97); }
.earned { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 12px; opacity: .95; font-weight: 500; }

/* ---------- Last transaction strip ---------- */
.last-strip {
  display: flex; gap: 10px; align-items: center;
  background: var(--surface); border-radius: var(--radius-m);
  padding: 12px 14px; font-size: 13px; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-1);
}
.last-strip .muted { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.last-strip .link { color: var(--brand-strong); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; flex: none; }

/* ---------- Quick actions ---------- */
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qa {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--surface); border-radius: var(--radius-m);
  text-align: center; padding: 16px 6px 13px;
  text-decoration: none; color: inherit; font-size: 12.5px; font-weight: 600;
  box-shadow: var(--shadow-1);
  transition: transform .12s ease, box-shadow .15s ease;
}
.qa:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.qa-icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--brand-tint); color: var(--brand-strong);
}

/* ---------- Service tiles ---------- */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 4px; }
.service-grid.big { grid-template-columns: repeat(3, 1fr); gap: 12px 8px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 4px; border-radius: var(--radius-m);
  text-decoration: none; color: inherit; text-align: center;
  transition: background-color .15s ease, transform .12s ease;
}
.tile:hover { background: var(--surface); transform: translateY(-1px); }
.tile-icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand-strong);
}
.service-grid.big .tile-icon { width: 56px; height: 56px; border-radius: 18px; }
.tile-label { font-size: 12px; font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.service-grid.big .tile-label { font-size: 12.5px; }

/* ---------- Promo banners ---------- */
.promo-carousel { display: flex; flex-direction: column; gap: 10px; }
.promo-card {
  background: var(--surface); border-radius: var(--radius-m);
  padding: 14px 16px; box-shadow: var(--shadow-1); font-size: 13.5px;
}
.promo-card strong { font-size: 14px; }
.promo-card p { margin-top: 2px; }

/* ---------- Transaction rows (history, wallet) ---------- */
.txn-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; text-decoration: none; color: inherit;
  border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow-1);
  transition: transform .1s ease;
}
.txn-row:hover { transform: translateY(-1px); }
.txn-row .right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.txn-row strong { font-size: 14px; font-weight: 600; }
.txn-row .muted { font-size: 12.5px; }

/* ---------- Receipt ---------- */
.receipt-status {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px;
  margin-bottom: 12px;
}
.receipt-status.ok { color: var(--ok); }
.receipt-status.bad { color: var(--danger); }
.receipt-status.warn { color: var(--warn); }
.receipt-lines { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.receipt-lines td { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.receipt-lines td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.receipt-lines .total td { border-bottom: none; padding-top: 12px; font-size: 15px; }
.pins { background: var(--brand-soft); border-radius: var(--radius-m); padding: 12px 14px; margin: 10px 0; font-size: 13.5px; }
.pins .pin { margin-top: 6px; }
.pin.code { font-weight: 700; letter-spacing: .06em; color: var(--brand-strong); background: none; padding: 0; font-size: 15px; }

/* ---------- Recent beneficiary chips ---------- */
.recent-row { display: flex; flex-wrap: wrap; gap: 8px; }
button.chip { border: none; cursor: pointer; font-family: var(--font); padding: 7px 14px; font-size: 13px; transition: background-color .15s ease; }

/* ---------- Manual bank rows ---------- */
.manual-bank {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--brand-soft); border-radius: var(--radius-m);
  padding: 12px 14px; font-size: 13.5px; color: var(--ink-2);
}
.manual-bank svg { color: var(--brand-strong); }
.manual-bank strong { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Bottom tab navigation ---------- */
.bottom-tabs {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  z-index: 30; width: 100%; max-width: 480px;
  display: flex; justify-content: space-around; gap: 2px;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-soft);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.bottom-tabs .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-decoration: none; padding: 4px 0; border-radius: 10px;
  transition: color .15s ease;
}
.bottom-tabs .tab:hover { color: var(--ink-2); }
.bottom-tabs .tab.active { color: var(--brand-strong); }

/* ---------- Wider phones and up ---------- */
@media (min-width: 480px) {
  .service-grid { gap: 10px 6px; }
}

/* ---------- Small phones ---------- */
@media (max-width: 359px) {
  .balance { font-size: 27px; }
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .tile-label { font-size: 11px; }
}
