/* ==========================================================
   NaijaHighLifeData — OpAy-inspired design system
   ========================================================== */
:root {
  --green:        #00C853;
  --green-dark:   #00A846;
  --green-deep:   #00723A;
  --ink:          #1A1D29;
  --ink-soft:     #6B7280;
  --bg:           #F4F6F8;
  --card:         #FFFFFF;
  --border:       #E7EBEE;
  --danger:       #E53950;
  --warn:         #FFA726;
  --radius-lg:    20px;
  --radius-md:    14px;
  --radius-sm:    10px;
  --shadow:       0 4px 20px rgba(20,30,40,0.06);
  --shadow-lift:  0 10px 30px rgba(0,200,83,0.18);
  --admin-ink:    #0F2027;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 90px;
}

/* ---------- Top status bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  border-radius: 0 0 28px 28px;
}
.topbar .greet { font-size: 13px; opacity: .85; }
.topbar .name { font-size: 17px; font-weight: 700; margin-top: 2px; }
.topbar .icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  border: none; color: #fff;
}

/* ---------- Wallet card ---------- */
.wallet-card {
  margin: -34px 18px 0;
  background: var(--ink);
  background: linear-gradient(135deg, #14251F 0%, #0B1310 100%);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  color: #fff;
  box-shadow: var(--shadow-lift);
  position: relative;
  z-index: 2;
}
.wallet-card .label { font-size: 12px; color: rgba(255,255,255,.6); letter-spacing: .04em; text-transform: uppercase;}
.wallet-card .balance { font-size: 30px; font-weight: 800; margin: 6px 0 16px; letter-spacing: -0.5px;}
.wallet-card .balance small { font-size: 16px; font-weight: 600; color: rgba(255,255,255,.55); margin-left: 4px;}
.wallet-actions { display: flex; gap: 10px; }
.wallet-actions a, .wallet-actions button {
  flex: 1; text-align:center; padding: 11px 0; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; border: none;
}
.wallet-actions .primary { background: var(--green); color: #05210F; }
.wallet-actions .ghost { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Services grid ---------- */
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 20px 10px;
}
.section-title h3 { font-size: 15px; margin: 0; font-weight: 800; }
.section-title a { font-size: 12px; color: var(--green-dark); font-weight: 700; }

.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px 8px;
  padding: 0 18px;
}
.service-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.service-tile .ico {
  width: 54px; height: 54px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: #E9FBF1; color: var(--green-dark);
  font-size: 22px;
}
.service-tile span { font-size: 11.5px; text-align: center; font-weight: 600; color: var(--ink); line-height: 1.2;}

/* ---------- Cards / lists ---------- */
.card {
  background: var(--card); border-radius: var(--radius-md);
  box-shadow: var(--shadow); padding: 16px 18px; margin: 14px 18px;
}
.list-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }
.list-row .meta small { display:block; color: var(--ink-soft); font-size: 11.5px; margin-top:2px;}
.badge { font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 20px; }
.badge.success { background: #E6F9EE; color: var(--green-dark); }
.badge.pending { background: #FFF4E0; color: var(--warn); }
.badge.failed  { background: #FDE8EA; color: var(--danger); }

/* ---------- Bottom nav (OpAy style tab bar) ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; justify-content: space-around;
  padding: 10px 0 18px;
  z-index: 50;
}
.bottom-nav a { display:flex; flex-direction:column; align-items:center; gap:4px; font-size: 10.5px; color: var(--ink-soft); font-weight: 700;}
.bottom-nav a.active { color: var(--green-dark); }
.bottom-nav .nav-ico { font-size: 19px; }

/* ---------- Auth pages ---------- */
.auth-wrap {
  max-width: 420px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px 26px;
}
.auth-logo { text-align: center; margin-bottom: 26px; }
.auth-logo .mark {
  width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 24px;
  box-shadow: var(--shadow-lift);
}
.auth-logo h1 { font-size: 19px; margin: 0; font-weight: 800; }
.auth-logo p { font-size: 13px; color: var(--ink-soft); margin: 4px 0 0; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: var(--ink);}
.form-control {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); font-size: 14.5px; background: #fff;
  transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: var(--green); }
.input-affix { position: relative; }
.input-affix .prefix { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); font-weight: 700; font-size: 14px;}
.input-affix .form-control { padding-left: 34px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; padding: 14px 0; border-radius: var(--radius-sm);
  border: none; font-weight: 800; font-size: 14.5px; letter-spacing: 0.01em;
}
.btn-primary { background: var(--green); color: #05210F; box-shadow: 0 8px 20px rgba(0,200,83,.28);}
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--ink); }
.btn-block { margin-top: 6px; }
.btn-sm { padding: 9px 14px; font-size: 12.5px; width: auto; }

.auth-footer-link { text-align: center; margin-top: 18px; font-size: 13px; color: var(--ink-soft); }
.auth-footer-link a { color: var(--green-dark); font-weight: 800; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; font-weight: 600;}
.alert-error { background: #FDE8EA; color: #B0243A; }
.alert-success { background: #E6F9EE; color: var(--green-deep); }
.alert-info { background: #EAF3FF; color: #1653B8; }

/* ---------- Page header (inner pages) ---------- */
.page-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 4px;
}
.page-head .back {
  width: 36px; height: 36px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.page-head h2 { font-size: 16px; margin: 0; font-weight: 800; }

/* ---------- Network / provider chips ---------- */
.provider-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; padding: 4px 18px 6px;}
.provider-chip {
  border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow);
  padding: 12px 6px; text-align: center; font-size: 11.5px; font-weight: 700;
  border: 2px solid transparent;
}
.provider-chip.selected { border-color: var(--green); background: #F0FBF4; }
.provider-chip .logo-dot {
  width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 6px;
  display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:13px;
}

.plan-option {
  display:flex; justify-content: space-between; align-items:center;
  padding: 13px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  margin-bottom: 10px; font-size: 13.5px; font-weight: 700;
}
.plan-option.selected { border-color: var(--green); background: #F0FBF4; }
.plan-option .price { color: var(--green-dark); }

/* ==========================================================
   ADMIN SIDE — darker, data-dense OpAy-style console
   ========================================================== */
.admin-body { background: #F1F4F3; font-family: 'Manrope', sans-serif; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 250px; background: linear-gradient(180deg, #0B1310 0%, #14251F 100%);
  color: #fff; padding: 24px 16px; position: fixed; top:0; left:0; bottom:0; overflow-y:auto;
}
.admin-sidebar .brand { display:flex; align-items:center; gap:10px; padding: 6px 8px 26px; }
.admin-sidebar .brand .mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--green);
  display:flex; align-items:center; justify-content:center; font-weight:900; color:#05210F;
}
.admin-sidebar .brand b { font-size: 14.5px; }
.admin-nav a {
  display:flex; align-items:center; gap: 12px; padding: 11px 12px; border-radius: 10px;
  color: rgba(255,255,255,.65); font-size: 13.5px; font-weight: 700; margin-bottom: 2px;
}
.admin-nav a.active, .admin-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-main { margin-left: 250px; flex: 1; padding: 26px 30px 60px; max-width: 1200px; }
.admin-topbar { display:flex; align-items:center; justify-content: space-between; margin-bottom: 22px;}
.admin-topbar h1 { font-size: 20px; margin:0; font-weight: 800; }
.admin-topbar .admin-chip { display:flex; align-items:center; gap:10px; background:#fff; padding:7px 14px; border-radius: 40px; box-shadow: var(--shadow); font-size:13px; font-weight:700;}

.stat-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px;}
.stat-card { background:#fff; border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow); }
.stat-card .label { font-size: 12px; color: var(--ink-soft); font-weight:700;}
.stat-card .value { font-size: 22px; font-weight: 800; margin-top: 6px; }
.stat-card.accent { background: linear-gradient(135deg, var(--green), var(--green-deep)); color:#fff;}
.stat-card.accent .label { color: rgba(255,255,255,.75); }

.table-wrap { background:#fff; border-radius: var(--radius-md); box-shadow: var(--shadow); overflow-x:auto;}
table.data-table { width:100%; border-collapse: collapse; font-size: 13.5px;}
table.data-table th { text-align:left; padding: 14px 16px; background:#FAFBFC; color: var(--ink-soft); font-weight:800; font-size:12px; text-transform:uppercase; letter-spacing:.03em; border-bottom:1px solid var(--border);}
table.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); }
table.data-table tr:last-child td { border-bottom: none; }

.admin-card { background:#fff; border-radius: var(--radius-md); padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 20px;}
.admin-card h3 { margin: 0 0 16px; font-size:15px; font-weight:800;}
.form-row { display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.admin-mobile-nav { display: none; }

@media (max-width: 860px) {
  .admin-sidebar { display:none; }
  .admin-main { margin-left: 0; padding: 16px 14px 90px; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .form-row { grid-template-columns: 1fr; }
  .admin-topbar { flex-wrap: wrap; gap: 10px; }

  .admin-mobile-nav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #0B1310;
    padding: 10px 12px;
    z-index: 60;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  }
  .admin-mobile-nav a {
    color: rgba(255,255,255,.7);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    padding: 9px 13px;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    display: flex; align-items: center; gap: 6px;
  }
  .admin-mobile-nav a.active { background: var(--green); color: #05210F; }
}

.empty-state { text-align:center; padding: 50px 20px; color: var(--ink-soft); }
.empty-state .ico { font-size: 34px; margin-bottom: 10px; }
