/* ============================================================
   PAYVORA — Global Design System
   Primary: #0B6E4F  Accent: #00C97B  Dark: #08291E
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --primary:       #0B6E4F;
  --primary-dark:  #08291E;
  --primary-mid:   #0D8A62;
  --accent:        #00C97B;
  --accent-light:  #E6FFF5;
  --teal:          #006D77;
  --gold:          #F4A825;
  --danger:        #E53935;
  --success:       #00C97B;
  --warning:       #F4A825;
  --info:          #2196F3;
  --white:         #FFFFFF;
  --bg:            #F4F7F5;
  --bg2:           #EBF5F0;
  --card:          #FFFFFF;
  --border:        #D8EDE5;
  --text:          #0D1F17;
  --text2:         #4A6355;
  --text3:         #8BA89B;
  --shadow:        0 4px 24px rgba(11,110,79,0.10);
  --shadow-lg:     0 12px 48px rgba(11,110,79,0.18);
  --radius:        16px;
  --radius-sm:     10px;
  --radius-lg:     24px;
  --header-h:      64px;
  --nav-h:         72px;
  --font:          'Outfit', sans-serif;
  --font2:         'Space Grotesk', sans-serif;
  --transition:    all 0.28s cubic-bezier(.4,0,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: var(--font); border: none; cursor: pointer; outline: none; }
input, select, textarea { font-family: var(--font); outline: none; border: none; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ─── Page Wrapper ─── */
.page-wrapper {
  min-height: 100vh;
  padding-top: var(--header-h);
  padding-bottom: calc(var(--nav-h) + 12px);
  max-width: 480px;
  margin: 0 auto;
  overflow-x: hidden;
}

.page-content {
  padding: 16px 16px 8px;
}

/* ─── Fixed Header ─── */
.app-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(11,110,79,0.06);
}

.app-header .header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-header .brand-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: white;
}

.app-header .brand-name {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary-dark);
  font-family: var(--font2);
}

.app-header .header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text2);
  font-size: 18px;
  transition: var(--transition);
  position: relative;
}

.icon-btn:active { transform: scale(0.93); }

.icon-btn .badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid white;
}

/* ─── Bottom Nav ─── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-h);
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(11,110,79,0.08);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  flex: 1;
  text-align: center;
}

.nav-item i {
  font-size: 20px;
  color: var(--text3);
  transition: var(--transition);
}

.nav-item span {
  font-size: 10px;
  color: var(--text3);
  font-weight: 500;
  transition: var(--transition);
}

.nav-item.active i,
.nav-item.active span {
  color: var(--primary);
}

.nav-item.active {
  background: var(--accent-light);
}

.nav-item:active { transform: scale(0.93); }

/* ─── Section Header ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.view-all {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── Cards ─── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-sm {
  border-radius: var(--radius-sm);
  padding: 14px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: white;
  box-shadow: 0 4px 18px rgba(11,110,79,0.30);
}

.btn-primary:active { transform: translateY(2px); box-shadow: none; }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #00A868);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-ghost {
  background: var(--bg);
  color: var(--text);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 13px;
  border-radius: 8px;
}

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Spinner in btn */
.btn .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ─── Form Inputs ─── */
.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap i {
  position: absolute;
  left: 14px;
  color: var(--text3);
  font-size: 17px;
  pointer-events: none;
}

.input-wrap i.right {
  left: auto;
  right: 14px;
  pointer-events: auto;
  cursor: pointer;
}

.form-input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(11,110,79,0.08);
}

.form-input.no-icon { padding-left: 14px; }

select.form-input { appearance: none; }

/* ─── Toast ─── */
.toast-container {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: white;
  animation: toastIn 0.4s ease, toastOut 0.4s 3.6s ease forwards;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.toast.success { background: var(--primary); }
.toast.error   { background: var(--danger); }
.toast.info    { background: var(--info); }
.toast.warning { background: var(--warning); }

.toast i { font-size: 18px; flex-shrink: 0; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,41,30,0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 20px 36px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 0 auto 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  text-align: center;
}

/* ─── Page Title Bar ─── */
.page-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 0;
  margin-bottom: 4px;
}

.back-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text2);
  flex-shrink: 0;
  transition: var(--transition);
}

.back-btn:active { transform: scale(0.9); }

.page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font2);
}

/* ─── Avatar ─── */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg2);
  border: 2px solid var(--border);
}

/* ─── Status Pills ─── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.pill.success { background: #E6FFF5; color: var(--success); }
.pill.danger  { background: #FFEBEE; color: var(--danger); }
.pill.warning { background: #FFF8E1; color: var(--warning); }
.pill.info    { background: #E3F2FD; color: var(--info); }
.pill.neutral { background: var(--bg); color: var(--text2); }

/* ─── Divider ─── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text3);
  font-size: 13px;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state .empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text2);
}

/* ─── Animations ─── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.04); }
}

.anim-fadeup { animation: fadeUp 0.5s ease forwards; }

/* ─── Skeleton Loader ─── */
.skeleton {
  background: linear-gradient(90deg, var(--bg) 25%, var(--border) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Amount Display ─── */
.amount-credit { color: var(--success); font-weight: 700; }
.amount-debit  { color: var(--danger); font-weight: 700; }

/* ─── Gradient Text ─── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Number Format ─── */
.naira::before { content: '₦'; }
