/* ── IDG360 Design System ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand colors */
  --primary:       #1D4ED8;
  --primary-dark:  #1E3A8A;
  --primary-light: #3B82F6;
  --primary-pale:  #EFF6FF;
  --accent:        #06B6D4;
  --accent-pale:   #ECFEFF;

  /* Status */
  --success:       #16A34A;
  --success-bg:    #F0FDF4;
  --success-bd:    #86EFAC;
  --warning:       #D97706;
  --warning-bg:    #FFFBEB;
  --warning-bd:    #FCD34D;
  --danger:        #DC2626;
  --danger-bg:     #FEF2F2;
  --danger-bd:     #FECACA;
  --info:          #0EA5E9;
  --info-bg:       #F0F9FF;

  /* Neutrals */
  --bg:            #F8FAFC;
  --card:          #FFFFFF;
  --border:        #E2E8F0;
  --border2:       #CBD5E1;
  --text:          #0F172A;
  --text2:         #334155;
  --muted:         #64748B;
  --muted2:        #94A3B8;

  /* Spacing & shape */
  --radius:        10px;
  --radius-lg:     16px;
  --radius-xl:     20px;
  --radius-full:   999px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08),0 1px 2px rgba(0,0,0,.06);
  --shadow:        0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:     0 10px 40px rgba(0,0,0,.12);

  /* App layout */
  --nav-h:         64px;
  --header-h:      56px;
  --max-w:         430px;
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* ── App Shell (mobile-first center) ─────────────────────────────────────── */
.app-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}
@media (min-width: 768px) {
  :root { --max-w: 720px; }
  body { background: #E2E8F0; }
  .app-shell { box-shadow: 0 0 60px rgba(0,0,0,.15); }
}
@media (min-width: 1024px) {
  :root { --max-w: 1200px; }
  body { background: #EEF2F7; }
  .app-shell { box-shadow: none; background: #F8FAFC; }
}

/* ── Top Header ──────────────────────────────────────────────────────────── */
.app-header {
  height: var(--header-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-header .page-title { font-size: 17px; font-weight: 700; color: var(--text); flex: 1; }
.back-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  text-decoration: none;
  flex-shrink: 0;
}
.header-action {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  position: relative;
  text-decoration: none;
}
.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--card);
}

/* ── Bottom Navigation ───────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  height: var(--nav-h);
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 100;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  text-decoration: none;
  color: var(--muted2);
  border-radius: var(--radius);
  transition: color .2s;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
}
.nav-item.active { color: var(--primary); }
.nav-item svg { width: 22px; height: 22px; flex-shrink: 0; }
.nav-label { font-size: 10px; font-weight: 600; line-height: 1; }
.nav-icon-wrap { position: relative; }
.nav-badge {
  position: absolute;
  top: -4px; right: -6px;
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
}

/* ── Page Content ────────────────────────────────────────────────────────── */
.page-content {
  padding: 16px;
  padding-bottom: calc(var(--nav-h) + 16px);
}
.page-content.no-nav { padding-bottom: 24px; }

/* ── Auth Pages ──────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.auth-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  padding: 48px 24px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.auth-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.auth-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.auth-logo-wrap {
  width: 72px; height: 72px;
  background: rgba(255,255,255,.15);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  backdrop-filter: blur(8px);
}
.auth-hero h1 { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 8px; position: relative; }
.auth-hero p  { font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.6; position: relative; }
.auth-body {
  flex: 1;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  margin-top: -20px;
  padding: 28px 20px 40px;
}
.auth-body h2 { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--muted); margin-bottom: 24px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 12px;
}
.card-flat { background: var(--card); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.card-sub   { font-size: 12px; color: var(--muted); }

/* ── Wallet Card ─────────────────────────────────────────────────────────── */
.wallet-card {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 70%, var(--primary-light) 100%);
  border-radius: var(--radius-xl);
  padding: 20px;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(29,78,216,.35);
}
.wallet-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.wallet-card::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -20px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.wallet-label { font-size: 12px; font-weight: 600; opacity: .75; text-transform: uppercase; letter-spacing: .05em; }
.wallet-balance { font-size: 30px; font-weight: 800; margin: 6px 0; line-height: 1.1; position: relative; }
.wallet-actions { display: flex; gap: 8px; margin-top: 16px; position: relative; }
.wallet-action-btn {
  flex: 1;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition: background .2s;
}
.wallet-action-btn:hover { background: rgba(255,255,255,.22); }
.wallet-action-btn svg { width: 18px; height: 18px; }

/* ── Quick Services Grid ─────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 4px;
}
.service-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
}
.service-icon-circle {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-icon-circle img,
.service-icon-circle svg { width: 26px; height: 26px; }
.service-icon-label { font-size: 10px; font-weight: 600; color: var(--text2); text-align: center; line-height: 1.3; }

/* Service icon colors */
.sic-blue   { background: #EFF6FF; }
.sic-purple { background: #F5F3FF; }
.sic-green  { background: #F0FDF4; }
.sic-amber  { background: #FFFBEB; }
.sic-pink   { background: #FFF1F2; }
.sic-teal   { background: #ECFEFF; }
.sic-indigo { background: #EEF2FF; }
.sic-rose   { background: #FFF1F2; }
.sic-cyan   { background: #ECFEFF; }

/* ── Section Header ──────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  margin-top: 4px;
}
.section-title { font-size: 15px; font-weight: 700; color: var(--text); }
.view-all { font-size: 12px; font-weight: 600; color: var(--primary); text-decoration: none; }

/* ── Transaction Items ───────────────────────────────────────────────────── */
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.tx-item:last-child { border-bottom: none; padding-bottom: 0; }
.tx-item:first-child { padding-top: 0; }
.tx-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.tx-info { flex: 1; min-width: 0; }
.tx-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-date { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tx-amount { font-size: 14px; font-weight: 700; color: var(--text); flex-shrink: 0; }
.tx-status { font-size: 10px; font-weight: 600; text-align: right; margin-top: 3px; }
.tx-status.completed { color: var(--success); }
.tx-status.pending   { color: var(--warning); }
.tx-status.failed    { color: var(--danger); }

/* ── Form Controls ───────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}
.form-label span.req { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--card);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}
.form-control::placeholder { color: var(--muted2); }
.form-hint { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.input-group { position: relative; }
.input-group .form-control { padding-right: 44px; }
.input-suffix {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex; align-items: center;
}
.input-prefix {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.input-group.prefix .form-control { padding-left: 40px; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ── Radio & Checkbox ────────────────────────────────────────────────────── */
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.radio-option.selected { border-color: var(--primary); background: var(--primary-pale); }
.radio-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s;
}
.radio-option.selected .radio-dot { border-color: var(--primary); }
.radio-dot::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  transition: opacity .2s;
}
.radio-option.selected .radio-dot::after { opacity: 1; }
.radio-label { font-size: 13px; font-weight: 500; color: var(--text2); flex: 1; }
.radio-price { font-size: 13px; font-weight: 700; color: var(--primary); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn-full { width: 100%; }
.btn-lg { padding: 14px 20px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(.98); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-pale); }
.btn-ghost { background: transparent; color: var(--text2); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

/* ── Step Wizard ─────────────────────────────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 0 8px;
}
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
  transition: all .3s;
}
.step-dot.done     { background: var(--success); color: #fff; }
.step-dot.active   { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(29,78,216,.15); }
.step-dot.inactive { background: var(--border); color: var(--muted); }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 6px;
  transition: background .3s;
}
.step-line.done { background: var(--success); }
.step-label-row {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding: 0 8px;
  margin-bottom: 20px;
}
.step-label { font-size: 10px; font-weight: 600; color: var(--muted); text-align: center; }
.step-label.active { color: var(--primary); }

/* ── Service Header (category pages) ────────────────────────────────────── */
.svc-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 20px 16px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.svc-header::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.svc-header-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.svc-header-sub   { font-size: 12px; opacity: .75; }

/* ── Service List Items ──────────────────────────────────────────────────── */
.svc-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, border-color .2s;
  margin-bottom: 8px;
}
.svc-list-item:hover { box-shadow: var(--shadow); border-color: var(--primary-light); }
.svc-list-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--primary-pale);
}
.svc-list-icon svg { width: 22px; height: 22px; color: var(--primary); }
.svc-list-info { flex: 1; }
.svc-list-name { font-size: 14px; font-weight: 600; color: var(--text); }
.svc-list-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.svc-list-meta { text-align: right; flex-shrink: 0; }
.svc-list-price { font-size: 14px; font-weight: 700; color: var(--primary); }
.svc-list-time  { font-size: 10px; color: var(--muted); margin-top: 2px; }
.svc-list-arrow { color: var(--muted2); }

/* ── Review Card ─────────────────────────────────────────────────────────── */
.review-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.review-row:last-child { border-bottom: none; padding-bottom: 0; }
.review-key { font-size: 13px; color: var(--muted); flex-shrink: 0; }
.review-val { font-size: 13px; font-weight: 600; color: var(--text); text-align: right; word-break: break-word; }

/* ── PIN Input ───────────────────────────────────────────────────────────── */
.pin-row { display: flex; gap: 10px; justify-content: center; margin: 8px 0; }
.pin-box {
  width: 46px; height: 52px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
.pin-box:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,.1); }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  }
.badge-info    { background: var(--info-bg);     color: var(--info);    }
.badge-muted   { background: var(--bg);          color: var(--muted);   }
.badge-primary { background: var(--primary-pale); color: var(--primary); }

/* ── Alerts / Flash ──────────────────────────────────────────────────────── */
.flash-msg {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.5;
}
.flash-success { background: var(--success-bg); color: #15803D; border: 1px solid var(--success-bd); }
.flash-error   { background: var(--danger-bg);  color: #B91C1C; border: 1px solid var(--danger-bd); }
.flash-warning { background: var(--warning-bg); color: #92400E; border: 1px solid var(--warning-bd); }
.flash-info    { background: var(--info-bg);    color: #0369A1; border: 1px solid #BAE6FD; }

/* ── Processing Screen ───────────────────────────────────────────────────── */
.processing-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  min-height: 50vh;
}
.spinner {
  width: 56px; height: 56px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Category Filter Tabs ────────────────────────────────────────────────── */
.cat-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text2);
  text-decoration: none;
  white-space: nowrap;
}
.cat-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  text-align: center;
}
.empty-icon {
  width: 72px; height: 72px;
  background: var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.empty-state h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── Profile Card ────────────────────────────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 24px 16px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  position: relative;
}
.avatar-wrap {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: #fff;
  border: 3px solid rgba(255,255,255,.4);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 17px; font-weight: 700; }
.profile-email { font-size: 12px; opacity: .8; margin-top: 2px; }
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
.profile-menu-item:hover { background: var(--bg); }
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-menu-text { flex: 1; font-size: 14px; font-weight: 500; }
.profile-menu-sub  { font-size: 11px; color: var(--muted); margin-top: 1px; }
.profile-menu-arrow { color: var(--muted2); }

/* ── KYC Banner ──────────────────────────────────────────────────────────── */
.kyc-banner {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  cursor: pointer;
  text-decoration: none;
}
.kyc-banner-text { flex: 1; }
.kyc-banner-text h4 { font-size: 13px; font-weight: 700; color: #fff; }
.kyc-banner-text p  { font-size: 11px; color: rgba(255,255,255,.85); margin-top: 2px; }

/* ── Stat Tiles ──────────────────────────────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 16px; }
.stat-tile {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border);
}
.stat-tile-val { font-size: 18px; font-weight: 800; color: var(--text); }
.stat-tile-lbl { font-size: 10px; color: var(--muted); margin-top: 3px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 88px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #0F172A;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  z-index: 99999;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  white-space: nowrap;
  pointer-events: none;
  max-width: 320px;
  text-align: center;
  opacity: 0;
  transition: opacity .25s, transform .25s;
}
.toast.toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-success { background: #16A34A; }
.toast.toast-error   { background: #DC2626; }
.toast.toast-info    { background: #0F172A; }

/* ── Network Banner ──────────────────────────────────────────────────────── */
.network-banner {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--max-w);
  padding: 8px 16px;
  font-size: 12px; font-weight: 600; text-align: center;
  z-index: 99998;
  display: flex; align-items: center; justify-content: center;
}
.network-banner.offline { background: #EF4444; color: #fff; }
.network-banner.online  { background: #16A34A; color: #fff; }

/* ── Skeleton Loading ────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Dashboard greeting ──────────────────────────────────────────────────── */
.dash-top {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-greeting { color: rgba(255,255,255,.75); font-size: 12px; font-weight: 500; }
.dash-name { color: #fff; font-size: 16px; font-weight: 700; margin-top: 2px; }
.dash-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
  border: 2px solid rgba(255,255,255,.35);
  flex-shrink: 0;
  overflow: hidden;
}

/* ── Utilities ───────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.text-small  { font-size: 12px; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.fw-700 { font-weight: 700; }
.mb-0 { margin-bottom: 0 !important; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.d-flex { display: flex; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.align-center { align-items: center; }
.flex-1 { flex: 1; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
a { color: var(--primary); text-decoration: none; }

/* ── Search box ──────────────────────────────────────────────────────────── */
.search-wrap { position: relative; margin-bottom: 16px; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search-wrap input { padding-left: 38px; }

/* ── OTP Boxes ───────────────────────────────────────────────────────────── */
.otp-row { display: flex; gap: 8px; justify-content: center; margin: 16px 0; }
.otp-box {
  width: 46px; height: 52px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 22px; font-weight: 700;
  text-align: center; color: var(--text);
  background: var(--bg); outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
.otp-box:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,.1); }

/* ── Splash Screen ───────────────────────────────────────────────────────── */
.splash {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}
.splash::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.splash::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}

/* ── PWA Install Banner ──────────────────────────────────────────────────── */
.install-banner {
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.install-banner button { background: rgba(255,255,255,.2); border: none; color: #fff; padding: 6px 14px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; cursor: pointer; }

/* ══════════════════════════════════════════════════════════════════════════════
   DASHBOARD v2
   ══════════════════════════════════════════════════════════════════════════════ */

/* Remove all padding from page-content on dashboard */
.dash-body { padding: 0; padding-bottom: calc(var(--nav-h) + 24px); }

/* ── Dashboard Header ───────────────────────────────────────────────────────── */
.dash-hdr {
  background: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #F1F5F9;
  position: sticky; top: 0; z-index: 40;
}
.dash-hdr-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, #1E3A8A, #2563EB);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px;
  text-decoration: none; border: 2.5px solid #E2E8F0;
}
.dash-hdr-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dash-hdr-greet { flex: 1; min-width: 0; }
.dash-hdr-sub  { font-size: 12px; color: #64748B; font-weight: 500; }
.dash-hdr-name { font-size: 17px; font-weight: 800; color: #0F172A; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-hdr-bell {
  width: 40px; height: 40px; border-radius: 50%;
  background: #F8FAFC; border: 1.5px solid #E2E8F0;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: #334155;
  position: relative; flex-shrink: 0;
}
.dash-hdr-badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 17px; height: 17px;
  background: #DC2626; color: #fff;
  font-size: 9px; font-weight: 800;
  border-radius: 99px; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* ── KYC strip ──────────────────────────────────────────────────────────────── */
.dash-kyc-bar {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(90deg, #F59E0B, #D97706);
  padding: 10px 16px;
  font-size: 12px; font-weight: 600; color: #fff;
  text-decoration: none;
}
.dash-kyc-bar span { flex: 1; }

/* ── Wallet Card ────────────────────────────────────────────────────────────── */
.wcard {
  background: linear-gradient(135deg, #1E3A8A 0%, #1D4ED8 55%, #3B82F6 100%);
  border-radius: 20px; padding: 20px;
  color: #fff; position: relative; overflow: hidden;
  box-shadow: 0 10px 36px rgba(29,78,216,.38);
}
.wcard::before {
  content: ''; position: absolute;
  top: -50px; right: -50px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.wcard::after {
  content: ''; position: absolute;
  bottom: -60px; left: -30px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.wcard-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; position: relative; z-index: 1;
}
.wcard-label {
  font-size: 13px; font-weight: 600; opacity: .85;
  display: flex; align-items: center;
}
.wcard-plus {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.25); border: 1.5px solid rgba(255,255,255,.45);
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none;
  transition: background .2s;
}
.wcard-plus:hover { background: rgba(255,255,255,.3); }
.wcard-bal {
  font-size: 34px; font-weight: 800; letter-spacing: -1px;
  line-height: 1.1; position: relative; z-index: 1;
  margin-bottom: 2px;
}
.wcard-acts {
  display: flex; gap: 8px; margin-top: 20px;
  position: relative; z-index: 1;
}
.wcard-act {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px; padding: 12px 4px;
  text-decoration: none; color: #fff; font-size: 11px; font-weight: 600;
  backdrop-filter: blur(4px); transition: background .2s;
}
.wcard-act:hover { background: rgba(255,255,255,.22); }
.wcard-act-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
}

/* ── Dashboard Section ──────────────────────────────────────────────────────── */
.dash-sec { padding: 12px 16px 0; }
.dash-sec-card {
  background: #fff; border-radius: 16px;
  border: 1px solid #E8EFF5;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  padding: 16px;
}
.dash-sec-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.dash-sec-ttl { font-size: 16px; font-weight: 800; color: #0F172A; }
.dash-see-all {
  font-size: 13px; font-weight: 600; color: #1D4ED8;
  text-decoration: none; display: flex; align-items: center; gap: 3px;
}

/* ── Quick Services Grid ────────────────────────────────────────────────────── */
.qsvc-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 12px 8px;
}
.qsvc-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; }
.qsvc-logo {
  width: 58px; height: 58px; border-radius: 50%; overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,.14);
  display: flex; align-items: center; justify-content: center;
  background: #fff;
}
.qsvc-logo svg { width: 58px; height: 58px; display: block; }
.qsvc-lbl {
  font-size: 11px; font-weight: 600; color: #334155;
  text-align: center; line-height: 1.3;
  max-width: 72px; word-break: break-word;
}

/* ── Transaction Card ───────────────────────────────────────────────────────── */
.tx-card {
  overflow: hidden;
  margin: 0 -16px -16px;
}
.tx-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #F1F5F9;
  text-decoration: none; color: inherit;
  transition: background .15s;
}
.tx-row:last-child { border-bottom: none; }
.tx-row:hover { background: #FAFBFF; }
.tx-logo { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex-shrink: 0; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.tx-logo svg { width: 42px; height: 42px; display: block; }
.tx-mid { flex: 1; min-width: 0; }
.tx-svc { font-size: 14px; font-weight: 700; color: #0F172A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-ref { font-size: 11px; color: #94A3B8; margin-top: 1px; }
.tx-dt  { font-size: 11px; color: #94A3B8; }
.tx-right { text-align: right; flex-shrink: 0; }
.tx-amt { font-size: 14px; font-weight: 700; color: #0F172A; margin-top: 4px; }
.tx-pill {
  display: inline-block; padding: 3px 10px;
  border-radius: 99px; font-size: 10px; font-weight: 700;
}
.pill-done { background: #DCFCE7; color: #15803D; }
.pill-pend { background: #FEF3C7; color: #D97706; }
.pill-fail { background: #FEE2E2; color: #DC2626; }
.tx-empty {
  text-align: center; padding: 36px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.tx-empty p { font-size: 15px; font-weight: 700; color: #334155; }
.tx-empty span { font-size: 12px; color: #94A3B8; line-height: 1.6; }

/* ── Promo Banner ───────────────────────────────────────────────────────────── */
.dash-promo {
  margin: 20px 16px;
  background: linear-gradient(135deg, #1E3A8A 0%, #1D4ED8 55%, #2563EB 100%);
  border-radius: 20px; padding: 20px;
  display: flex; align-items: center; justify-content: space-between;
  overflow: hidden; position: relative;
  box-shadow: 0 8px 28px rgba(29,78,216,.3);
}
.dash-promo::before {
  content: ''; position: absolute;
  top: -40px; right: 100px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.dash-promo-txt { flex: 1; }
.dash-promo-ttl { font-size: 17px; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 6px; }
.dash-promo-sub { font-size: 12px; color: rgba(255,255,255,.8); line-height: 1.6; }
.dash-promo-art { flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════════════════════
   BOTTOM NAV v2 — elevated wallet button
   ══════════════════════════════════════════════════════════════════════════════ */
.bnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--max-w);
  height: var(--nav-h);
  background: #fff; border-top: 1px solid #E2E8F0;
  display: flex; align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.bnav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  text-decoration: none; color: #94A3B8;
  font-size: 10px; font-weight: 600;
  padding: 8px 4px;
}
.bnav-item.active { color: #1D4ED8; }
.bnav-item svg { display: block; }

/* Center wallet elevated */
.bnav-wallet-wrap {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding-bottom: 6px; position: relative;
}
.bnav-wallet-circle {
  position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, #1E3A8A, #2563EB);
  border: 3.5px solid #fff;
  box-shadow: 0 4px 18px rgba(29,78,216,.5);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: #fff;
  transition: box-shadow .2s;
  z-index: 10;
}
.bnav-wallet-circle:hover { box-shadow: 0 6px 24px rgba(29,78,216,.65); }
.bnav-wallet-circle svg { display: block; }
.bnav-wallet-lbl {
  font-size: 10px; font-weight: 600; color: #94A3B8;
  margin-top: 30px;
}
.bnav-wallet-lbl.active { color: #1D4ED8; }

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (768px) & Desktop (1024px)
   ══════════════════════════════════════════════════════════════════════════════ */

/* Desktop sidebar — hidden on mobile/tablet */
.desk-sidebar { display: none; }

/* ── Sidebar anatomy (always defined, shown only on desktop) ────────────────── */
.desk-sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px; border-bottom: 1px solid #F1F5F9;
  text-decoration: none;
}
.desk-sidebar-mark { font-size: 18px; font-weight: 800; color: #0F172A; letter-spacing: -.4px; }
.desk-sidebar-mark em { color: #1D4ED8; font-style: normal; }
.desk-sidebar-nav {
  flex: 1; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.desk-nav-lnk {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  text-decoration: none; color: #64748B;
  font-size: 14px; font-weight: 600;
  transition: background .15s, color .15s;
}
.desk-nav-lnk:hover { background: #F8FAFC; color: #334155; }
.desk-nav-lnk.active { background: #EFF6FF; color: #1D4ED8; }
.desk-nav-lnk svg { flex-shrink: 0; }
.desk-nav-sep { height: 1px; background: #F1F5F9; margin: 8px 14px; }
.desk-sidebar-foot {
  padding: 14px 20px; border-top: 1px solid #F1F5F9;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
}
.desk-sidebar-av {
  width: 36px; height: 36px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg,#1E3A8A,#2563EB);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 13px;
}
.desk-sidebar-av img { width: 100%; height: 100%; object-fit: cover; }
.desk-sidebar-uname { font-size: 13px; font-weight: 700; color: #0F172A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk-sidebar-urole { font-size: 11px; color: #94A3B8; }
.desk-sidebar-badge {
  margin-left: auto;
  background: #DC2626; color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 99px; min-width: 18px; text-align: center;
}

/* ── Dashboard 2-column grid (Tablet 768px+) ────────────────────────────────── */
@media (min-width: 768px) {
  .dash-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 12px 16px 0;
  }
  .dash-2col > .dash-sec { padding: 0; }
  .qsvc-grid { gap: 14px 10px; }
  .dash-hdr { padding: 16px 20px; }
  .dash-hdr-name { font-size: 18px; }
}

/* ── Desktop (1024px+) ──────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  /* Show sidebar */
  .desk-sidebar {
    display: flex; flex-direction: column;
    position: fixed; left: 0; top: 0;
    width: 250px; height: 100vh;
    background: #fff; border-right: 1px solid #E2E8F0;
    z-index: 200; overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0,0,0,.04);
  }

  /* Shift app-shell right when sidebar is present */
  .app-shell:has(.desk-sidebar) {
    margin-left: 250px;
    max-width: calc(100% - 250px);
    box-shadow: none;
  }

  /* Hide mobile bottom nav */
  .bnav { display: none !important; }
  .dash-body { padding-bottom: 32px !important; }

  /* Wider 2-col grid on desktop */
  .dash-2col {
    grid-template-columns: 1.1fr 1fr;
    padding: 20px 24px 0;
    gap: 24px;
  }

  /* Scale up dashboard elements */
  .wcard { border-radius: 24px; padding: 24px; }
  .wcard-bal { font-size: 40px; }
  .wcard-act { padding: 14px 6px; }
  .dash-sec-card { border-radius: 18px; }
  .qsvc-logo { width: 66px; height: 66px; }
  .qsvc-logo svg { width: 66px; height: 66px; }
  .qsvc-lbl { font-size: 12px; max-width: 82px; }
  .dash-promo { margin: 20px 24px; border-radius: 22px; padding: 24px 28px; }
  .dash-promo-ttl { font-size: 20px; }
  .dash-promo-sub { font-size: 13px; }
  .tx-svc { font-size: 15px; }
  .tx-amt { font-size: 15px; }
}
