/* =====================================================
   GAAD CREDIT BY DATILA — Global stylesheet
   Brand: deep maroon red (#7A0D0D family), gold (#E9C845), white
   Mobile-first, matching the official UI/UX mockup.
   ===================================================== */

:root {
  --maroon: #7A0D0D;
  --maroon-dark: #4A0808;
  --maroon-deep: #2B0404;
  --red: #C0272D;
  --gold: #E9C845;
  --gold-dark: #B8912F;
  --white: #FFFFFF;
  --cream: #FAF7F2;
  --grey: #6B6B6B;
  --grey-light: #F2F2F2;
  --green: #1E9E4B;
  --red-soft: #FDF1F1;
  --gold-soft: #FBF6E5;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 8px 24px rgba(74, 8, 8, 0.10);
  --shadow-lg: 0 14px 40px rgba(74, 8, 8, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  background: var(--maroon-deep);
  color: #231515;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- Phone frame (max-width app shell) ---- */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--cream);
  position: relative;
  padding-bottom: 92px; /* space for bottom nav */
}

/* ---- Top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--maroon-deep);
  color: var(--white);
}
.topbar .brand-mini {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; color: var(--white);
  text-decoration: none;
}
.topbar img.brand-logo { height: 30px; width: auto; }

.icon-btn {
  position: relative;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  text-decoration: none;
  margin-left: auto;
}
.icon-btn .badge-dot {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--maroon-deep);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--maroon-deep);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.4);
}

/* ---- Balance card (red, matches mockup) ---- */
.balance-card {
  margin: 0 16px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--red) 0%, var(--maroon) 65%, var(--maroon-dark) 100%);
  color: var(--white);
  padding: 20px 18px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.balance-card::after {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(233, 200, 69, 0.12);
}
.balance-label {
  font-size: 12px; letter-spacing: 0.4px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.balance-amount {
  font-size: 30px; font-weight: 800; letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.balance-row {
  display: flex; gap: 10px;
}
.balance-chip {
  flex: 1;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
}
.balance-chip strong {
  display: block;
  font-size: 14px;
  color: var(--white);
  margin-top: 2px;
}

/* ---- Section headers ---- */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 18px 10px;
}
.section-head h2 { font-size: 15px; font-weight: 700; color: #3B2A2A; }
.section-head a { font-size: 12px; color: var(--maroon); text-decoration: none; font-weight: 600; }

/* ---- Tiles ---- */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
}
.tile {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 14px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: #3B2A2A;
  display: block;
  border: 1px solid #F1EAE8;
}
.tile-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}
.tile-icon.gold { background: var(--gold-soft); }
.tile-icon.red  { background: var(--red-soft); }
.tile h3 { font-size: 14px; font-weight: 700; }
.tile p { font-size: 11px; color: var(--grey); margin-top: 3px; }

/* ---- Promo banner ---- */
.promo {
  margin: 16px 16px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(90deg, var(--maroon) 0%, var(--red) 100%);
  color: var(--white);
  display: flex; align-items: center;
  min-height: 74px;
  box-shadow: var(--shadow);
  text-decoration: none;
}
.promo .promo-text { padding: 12px 14px; flex: 1; }
.promo .promo-text strong { display: block; font-size: 14px; }
.promo .promo-text span { font-size: 11px; opacity: 0.85; display: block; margin-top: 2px; }
.promo .promo-art {
  height: 74px; width: 110px;
  object-fit: cover;
  flex-shrink: 0;
  object-position: center;
  background: var(--maroon);
}

/* ---- Transactions ---- */
.txn-list { padding: 0 16px; }
.txn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #EFE7E7;
}
.txn:last-child { border-bottom: none; }
.txn-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.txn-icon.in  { background: #E7F7EC; color: var(--green); }
.txn-icon.out { background: var(--red-soft); color: var(--red); }
.txn-icon.neutral { background: var(--grey-light); color: var(--grey); }
.txn-main { flex: 1; min-width: 0; }
.txn-main strong { display: block; font-size: 13px; color: #2E1F1F; }
.txn-main span { font-size: 11px; color: var(--grey); }
.txn-amt { font-size: 13px; font-weight: 700; color: #2E1F1F; white-space: nowrap; }
.txn-amt.pos { color: var(--green); }
.txn-amt.neg { color: var(--red); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-gold { background: var(--gold); color: var(--maroon-deep); }
.btn-gold:hover { background: #F2D35C; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: #A81F24; }
.btn-maroon { background: var(--maroon); color: var(--white); }
.btn-outline {
  background: transparent; color: var(--maroon);
  border: 1.5px solid var(--maroon);
}
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---- Bottom navigation ---- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-top: 1px solid #EFE7E7;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
  z-index: 50;
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-decoration: none;
  color: #9A8F8F;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 0;
}
.bottom-nav a.active { color: var(--maroon); }
.bottom-nav .nav-icon { font-size: 20px; line-height: 1; }
.nav-fab {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--maroon));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 6px 16px rgba(122, 13, 13, 0.4);
  margin-top: -26px;
  border: 3px solid var(--white);
  flex: 0 0 auto;
  text-decoration: none;
}

/* ---- Forms ---- */
.form-wrap { padding: 16px; }
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: #4A3A3A;
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid #E3D9D9;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: #2E1F1F;
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--maroon);
}
.field .hint { font-size: 11px; color: var(--grey); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.alert {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
.alert-error   { background: var(--red-soft); color: #8A1A1E; border: 1px solid #F2C6C8; }
.alert-success { background: #E7F7EC; color: #176A34; border: 1px solid #BCE5C8; }
.alert-info    { background: var(--gold-soft); color: #7A5E10; border: 1px solid #EADFA8; }

/* ---- Status pills ---- */
.pill {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
}
.pill-pending { background: var(--gold-soft); color: #8A6A14; }
.pill-success { background: #E7F7EC; color: #176A34; }
.pill-danger  { background: var(--red-soft); color: #8A1A1E; }
.pill-info    { background: #EEF2FF; color: #3B4FA0; }

/* ---- Cards ---- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #F1EAE8;
  padding: 16px;
  margin: 0 16px 16px;
}
.card h3 { font-size: 14px; margin-bottom: 8px; color: #3B2A2A; }

.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #F3ECEC; font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--grey); }
.kv span:last-child { font-weight: 700; color: #2E1F1F; text-align: right; }

/* ---- Auth screens ---- */
.auth-hero {
  background: linear-gradient(160deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  padding: 46px 24px 34px;
  color: var(--white);
  text-align: center;
}
.auth-hero img { height: 84px; margin-bottom: 14px; }
.auth-hero h1 { font-size: 22px; margin-bottom: 6px; }
.auth-hero p { font-size: 13px; opacity: 0.85; }
.auth-body { padding: 22px 18px 40px; }
.auth-footer-link {
  text-align: center; font-size: 13px; color: var(--grey);
  margin-top: 18px;
}
.auth-footer-link a { color: var(--maroon); font-weight: 700; text-decoration: none; }

/* ---- OTP inputs ---- */
.otp-row { display: flex; gap: 10px; justify-content: center; margin: 18px 0; }
.otp-row input {
  width: 48px; height: 56px;
  text-align: center; font-size: 22px; font-weight: 700;
  border: 2px solid #E3D9D9; border-radius: 12px;
  color: var(--maroon);
}
.otp-row input:focus { border-color: var(--maroon); outline: none; }

/* ---- Splash ---- */
.splash {
  min-height: 100vh;
  background: linear-gradient(165deg, var(--maroon-dark) 0%, var(--maroon-deep) 60%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--white);
  text-align: center;
  padding: 24px;
}
.splash img { height: 110px; margin-bottom: 18px; animation: pulse 2.2s ease-in-out infinite; }
.splash h1 { font-size: 26px; letter-spacing: 1px; }
.splash h1 span { color: var(--gold); }
.splash .tagline { font-size: 13px; opacity: 0.8; margin-top: 6px; }
.loader-bar {
  width: 170px; height: 6px;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  margin-top: 26px;
  overflow: hidden;
}
.loader-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold), #F5E08A);
  border-radius: 999px;
  animation: loadbar 2.6s ease forwards;
}
.splash .pct { font-size: 11px; color: var(--gold); margin-top: 8px; letter-spacing: 2px; }
@keyframes loadbar { from { width: 0; } to { width: 100%; } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---- Success screens ---- */
.success-wrap {
  min-height: 60vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 30px 24px;
}
.success-icon {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: #E7F7EC;
  color: var(--green);
  font-size: 40px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  animation: pop 0.5s ease;
}
.success-icon.red { background: var(--red-soft); color: var(--red); }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-wrap h2 { font-size: 20px; margin-bottom: 6px; }
.success-wrap p { font-size: 13px; color: var(--grey); max-width: 280px; }

/* ---- Trust footer ---- */
.trust-strip {
  display: flex; gap: 10px;
  padding: 14px 16px 20px;
  overflow-x: auto;
}
.trust-item {
  flex: 1;
  background: var(--white);
  border: 1px solid #F1EAE8;
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  font-size: 10px;
  color: var(--grey);
  min-width: 96px;
}
.trust-item b { display: block; font-size: 11px; color: #3B2A2A; margin-bottom: 3px; }

/* ---- Withdraw screen ---- */
.withdraw-hero {
  margin: 0 16px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--red), var(--maroon));
  color: var(--white);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.withdraw-hero .amt { font-size: 34px; font-weight: 800; }
.withdraw-hero .sub { font-size: 12px; opacity: 0.85; margin-top: 4px; }
.momo-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--white);
  border: 1px solid #F1EAE8;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.momo-card .net-badge {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
  color: var(--white);
  flex-shrink: 0;
}
.net-mtn { background: #FFCC00; color: #1A1A1A !important; }
.net-vodafone { background: #E60000; }
.net-airteltigo { background: #0033A0; }
.wallet-art { display: block; margin: 0 auto 10px; max-width: 150px; }

/* ---- Admin ---- */
.admin-shell { max-width: 1100px; margin: 0 auto; padding-bottom: 40px; }
.admin-nav {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--maroon-deep);
  position: sticky; top: 0; z-index: 40;
}
.admin-nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 12px; font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
}
.admin-nav a.active, .admin-nav a:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #F1EAE8;
  padding: 16px;
}
.stat-card .lbl { font-size: 11px; color: var(--grey); }
.stat-card .val { font-size: 22px; font-weight: 800; color: var(--maroon); margin-top: 4px; }
.table-wrap { overflow-x: auto; margin: 0 16px 16px; background: var(--white); border-radius: var(--radius); border: 1px solid #F1EAE8; }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 12px; }
table.data th {
  text-align: left; padding: 10px 12px;
  background: var(--maroon); color: var(--white);
  font-size: 11px; letter-spacing: 0.4px;
  white-space: nowrap;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid #F3ECEC; vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
.chip-inline { display: inline-block; font-size: 10px; background: var(--grey-light); border-radius: 6px; padding: 2px 6px; color: var(--grey); margin-right: 4px; }

/* ---- Live notification controls ---- */
.gaad-notification-panel {
  margin: 14px 16px;
  padding: 14px;
  border: 1px solid #EADFA8;
  border-left: 4px solid var(--gold-dark);
  border-radius: 14px;
  background: var(--gold-soft);
  box-shadow: var(--shadow);
}
.gaad-notification-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gaad-notification-heading h2 { font-size: 14px; color: var(--maroon-dark); }
.gaad-notification-heading .muted { margin-top: 4px; }
.gaad-notification-count { display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 999px; padding: 0 6px; background: var(--red); color: var(--white); font-size: 11px; }
.gaad-notification-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.gaad-notification-button { padding: 7px 10px; border-radius: 9px; font-size: 11px; white-space: nowrap; }
.gaad-notification-list { display: grid; gap: 8px; margin-top: 10px; }
.gaad-notification-item { padding: 10px 12px; border-radius: 10px; background: var(--white); border: 1px solid #F1EAE8; }
.gaad-notification-item.is-new { animation: gaad-alert 1.2s ease-in-out 2; }
.gaad-notification-item strong { display: block; font-size: 12px; color: var(--maroon-dark); }
.gaad-notification-item p { margin-top: 3px; font-size: 12px; color: #4A3A3A; }
.gaad-notification-item time { display: block; margin-top: 5px; font-size: 10px; color: var(--grey); }
.gaad-client-alert-settings .muted { line-height: 1.5; }
.gaad-notification-toast { position: fixed; right: 16px; bottom: 24px; z-index: 1000; display: grid; gap: 4px; width: min(360px, calc(100vw - 32px)); padding: 14px 16px; border-left: 4px solid var(--gold); border-radius: 12px; background: var(--maroon-deep); color: var(--white); box-shadow: var(--shadow-lg); animation: gaad-toast-in 0.25s ease-out; }
.gaad-notification-toast strong { font-size: 13px; }
.gaad-notification-toast span { font-size: 12px; line-height: 1.4; }
.gaad-notification-toast.is-hiding { opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s; }
@keyframes gaad-alert { 50% { box-shadow: 0 0 0 3px rgba(192, 39, 45, 0.18); } }
@keyframes gaad-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 560px) {
  .gaad-notification-heading { display: block; }
  .gaad-notification-actions { justify-content: flex-start; margin-top: 10px; }
}
[hidden] { display: none !important; }

/* ---- Utility ---- */
.text-center { text-align: center; }
.muted { color: var(--grey); font-size: 12px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.px { padding-left: 16px; padding-right: 16px; }

@media (min-width: 768px) {
  .app-shell { box-shadow: 0 0 60px rgba(0,0,0,0.4); }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .otp-row input { width: 52px; height: 60px; }
}
@media (min-width: 1024px) {
  .app-shell { max-width: 520px; }
}
