<html lang="en">
 <head> 
  <meta charset="utf-8"> 
  <meta name="viewport" content="width=device-width,initial-scale=1"> 
  <title>GTX | NVIDIA GTX Nigeria</title> 
  <meta name="description" content="GTX is a Nigerian investment platform that helps users save, invest and grow wealth through accessible plans and secure transactions."> 
  <meta name="author" content="GTX Nigeria"> 
  <meta name="robots" content="index,follow"> 
  <link rel="canonical" href="https://nvdgtx.com/main/account"> 
  <link rel="icon" type="image/png" sizes="32x32" href="/assets/images/logo.jpg"> 
  <link rel="icon" type="image/png" sizes="16x16" href="/assets/images/logo.jpg"> 
  <link rel="apple-touch-icon" sizes="180x180" href="/assets/images/logo.jpg"> 
  <link rel="mask-icon" href="/assets/images/logo.jpg" color="rgba(0, 40, 7, 1)"> 
  <meta name="msapplication-TileImage" content="/assets/images/logo.jpg"> 
  <meta name="msapplication-TileColor" content="#ffffff"> 
  <link rel="manifest" href="/site.webmanifest"> 
  <meta name="theme-color" content="#008400ff"> 
  <meta name="csrf-token" content="brU4lV2afaWKnek7TbK7zSq1JOBRmZQ6jHXUBNFs"> 
  <meta property="og:type" content="website"> 
  <meta property="og:title" content="Login - GTX Nigeria"> 
  <meta property="og:description" content="GTX is a Nigerian investment platform that helps users save, invest and grow wealth through accessible plans and secure transactions."> 
  <meta property="og:url" content="https://nvdgtx.com/main/account"> 
  <meta property="og:site_name" content="GTX Nigeria"> 
  <meta property="og:image" content="https://nvdgtx.com/assets/images/logo.jpg"> 
  <meta property="og:image:alt" content="GTX Nigeria logo"> 
  <meta property="og:image:width" content="1200"> 
  <meta property="og:image:height" content="630"> 
  <meta name="twitter:card" content="summary_large_image"> 
  <meta name="twitter:title" content="Login - GTX Nigeria"> 
  <meta name="twitter:description" content="GTX is a Nigerian investment platform that helps users save, invest and grow wealth through accessible plans and secure transactions."> 
  <meta name="twitter:image" content="https://nvdgtx.com/assets/images/logo.jpg"> 
  <meta name="twitter:image:alt" content="GTX Nigeria logo"> 
  <link rel="preconnect" href="https://fonts.googleapis.com"> 
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin=""> 
  <!-- <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap" rel="stylesheet" />
  <link rel="preconnect" href="https://fonts.googleapis.com" />
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
  <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap" rel="stylesheet" /> --> 
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> 
  <link href="https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css" rel="stylesheet"> 
  <style>

    /* Reset / base */
    * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
    body { min-height: 100vh; background: linear-gradient(135deg, #0f2a1aff, #036320ff); color: white; overflow-x: hidden; }
    .app { width:100%; max-width:520px; margin:0 auto; position:relative; }
    .green-filter {
      filter: hue-rotate(260deg) saturate(150%);
    }

  </style> 
  <style>
    .container {
      padding: 20px;
      padding-bottom: 80px;
    }

    /* Header */
    .header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
    }
    .user-info {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .avatar {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background: white;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #2563eb;
      font-weight: bold;
    }
    .user-details div {
      font-size: 13px;
    }
    .user-details .name {
      font-weight: 600;
      font-size: 14px;
    }
    .user-details .vip, .user-details .id {
      color: #bfdbfe;
      font-size: 12px;
    }

    /* Card */
    .card {
      background: url('/assets/images/bgg.png');
      background-size: cover;
      border-radius: 16px;
      padding: 16px;
      margin-bottom: 20px;
      backdrop-filter: blur(8px);
    }
    .card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .card button {
      background: linear-gradient(90deg, rgba(123, 212, 72, 1), rgba(2, 109, 7, 0.6));
      color: white;
      border: none;
      font-weight: 800;
      border-radius: 20px 0 0 20px;
      padding: 10px 26px;
      font-size: 12px;
      cursor: pointer;
      position: absolute;
      right: 0px;
    }

    .apply-btn {
      background: #007724ff;
      color: white;
      border: none;
      border-radius: 20px;
      padding: 8px 16px;
      font-size: 12px;
      cursor: pointer;
      margin-bottom: 5px
    }

    /* Action Buttons */
    .actions {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
      text-align: center;
      margin-bottom: 24px;
    }
    .action {
      font-size: 12px;
    }
    .action-icon {
      width: 48px;
      height: 48px;
      background: rgba(255,255,255,0.2);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 6px;
      font-size: 20px;
    }

    /* Referral */
    .referral {
      background: url('/assets/images/bgg.png');
      background-size: cover;
      border-radius: 16px;
      padding: 16px;
      backdrop-filter: blur(8px);
      margin-bottom: 24px;
    }
    .referral-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .referral-stats {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      text-align: center;
      margin-top: 10px;
      font-size: 13px;
    }
    .referral-stats div {
      color: #e0f2fe;
    }
    .referral-stats div span {
      display: block;
      font-weight: bold;
      color: white;
      margin-top: 4px;
    }

    /* Bonus Pool */
    .bonus {
      position: relative;
      border-radius: 16px;
      overflow: hidden;
      margin-bottom: 24px;
    }
    .bonus-bg {
      height: 140px;
      background-image: url('https://readdy.ai/api/search-image?query=golden%20coins%20falling%20from%20sky%20with%20warm%20golden%20lighting%20and%20luxurious%20background%20for%20financial%20bonus%20pool%20display&width=400&height=200&seq=bonus-pool-bg&orientation=landscape');
      background-size: cover;
      background-position: center;
      position: relative;
    }
    .bonus-bg::after {
      content: '';
      position: absolute;
      inset: 0;
      background: rgba(0,0,0,0.4);
    }
    .bonus-content {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      padding: 16px;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    .bonus-content h3 {
      color: #fde68a;
      font-weight: bold;
      font-size: 16px;
      margin-bottom: 4px;
    }
    .bonus-content .amount {
      font-size: 22px;
      font-weight: bold;
      margin-bottom: 6px;
    }
    .bonus-content p {
      font-size: 11px;
      color: #f8fafc;
      line-height: 1.4;
    }

    /* Menu */
    .menu {
      margin-top: 20px;
    }
    .menu-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 0;
      border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .menu-item:last-child {
      border-bottom: none;
    }
    .menu-item i {
      font-size: 20px;
    }
    .menu-item span {
      margin-left: 10px;
      font-size: 14px;
    }
    .menu-left {
      display: flex;
      align-items: center;
    }

    @media (max-width: 480px) {
      .action-icon {
        width: 42px;
        height: 42px;
      }
      .bonus-content h3 { font-size: 14px; }
      .bonus-content .amount { font-size: 18px; }
    }

    .rdm-form::placeholder {
      color: #fff
    }

    .rdm-form {
      color: #fff;
      font-weight: 700;
    }

    /* target your element when focused */
    .rdm-form:focus {
      outline: none !important;        /* remove default outline */
      box-shadow: none !important;     /* remove any shadow glow */
      border-color: transparent !important; /* hide border color if any */
    }

    /* firefox button inner focus */
    .rdm-form::-moz-focus-inner {
      border: 0;
      padding: 0;
    }

    /* input on iOS may need this */
    .rdm-form {
      -webkit-appearance: none;
    }

  </style> 
 </head> 
 <body> 
  <div class="app" role="main" aria-label="app content"> 
   <div id="apdMessageOverlay" style="display:none;" role="alert" aria-live="assertive"> 
    <div class="apd-message-box" id="apdMessageBox"></div> 
   </div> 
   <style>
  #apdMessageOverlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1250;
    pointer-events: none;
  }
  .apd-message-box {
    pointer-events: auto;
    max-width: 320px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.04);
    color: #fff;
  }
  .apd-message-box.error {
    background: linear-gradient(180deg, rgba(194, 33, 33, 0.98), rgba(35,6,6,0.96));
  }
  .apd-message-box.success {
    background: linear-gradient(180deg, rgba(28, 188, 60, 0.95), rgba(6,35,10,0.96));
  }
</style> 
   <script>
(function () {
  const overlay = document.getElementById('apdMessageOverlay');
  const box = document.getElementById('apdMessageBox');
  let timeoutId = null;

  function hideNow() {
    overlay.style.display = 'none';
    box.textContent = '';
    box.classList.remove('error', 'success');
    if (timeoutId) { clearTimeout(timeoutId); timeoutId = null; }
  }

  function showMessage(message, duration = 3000, type = 'error') {
    if (!message) return;
    box.textContent = message;
    box.classList.remove('error','success');
    box.classList.add(type);
    overlay.style.display = 'flex';
    if (timeoutId) clearTimeout(timeoutId);
    timeoutId = setTimeout(hideNow, duration);
  }

  // Expose globally
  if (!window.apdError) {
    window.apdError = {
      show: showMessage,
      hide: hideNow
    };
  }

  // Auto-show messages from Blade session/errors
  document.addEventListener('DOMContentLoaded', function() {
    let msg = null;
    let type = 'error';

    
    if (msg && window.apdError && typeof window.apdError.show === 'function') {
        window.apdError.show(msg, 3000, type);
    }
  });
})();
</script> 
   <div id="apdLoadingOverlay" aria-hidden="true" role="status" style="display:none;"> 
    <div class="apd-loading-wrap" id="apdLoadingBox" aria-hidden="true"> 
     <div class="apd-spinner" aria-hidden="true"></div> 
    </div> 
   </div> 
   <style>
  /* Inline styles specific to loader partial */
  #apdLoadingOverlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999999;
    background: rgba(0,0,0,0.45);
  }
  .apd-loading-wrap {
    width: 100px;
    height: 100px;
    min-width: 100px;
    min-height: 100px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.02);
    backdrop-filter: blur(6px);
  }
  .apd-spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.14);
    border-top-color: #ffffff;
    animation: apd-spin 900ms linear infinite;
    box-sizing: border-box;
  }
  @keyframes apd-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
</style> 
   <script>
  // Expose loader control functions to global scope
  (function () {
    const overlay = document.getElementById('apdLoadingOverlay');
    const box = document.getElementById('apdLoadingBox');

    if (!window.apdLoader) {
      window.apdLoader = {
        show: function () {
          overlay.style.display = 'flex';
          overlay.setAttribute('aria-hidden', 'false');
          // automatically hide after 3 seconds
          setTimeout(function() {
            overlay.style.display = 'none';
            overlay.setAttribute('aria-hidden', 'true');
          }, 500);
        },
        hide: function () {
          overlay.style.display = 'none';
          overlay.setAttribute('aria-hidden', 'true');
        },
        // toggle convenience
        toggle: function (force) {
          if (typeof force === 'boolean') {
            return force ? this.show() : this.hide();
          }
          overlay.style.display = overlay.style.display === 'none' ? 'flex' : 'none';
        }
      };
    }
  })();
</script> 
   <main id="app-main"> 
    <div class="container"> 
     <!-- Header --> 
     <div class="header"> 
      <div class="user-info"> 
       <div class="avatar"> 
        <img src="/assets/images/logo.jpg" alt="Logo" style="width: 50px; border-radius: 50%"> 
       </div> 
       <div class="user-details"> 
        <div class="name">
         Hello ~ Welcome Back!
        </div> 
        <div class="vip">
         {{ isset(auth()->user()->phone) ? substr(auth()->user()->phone, 0, 3) . '****' . substr(auth()->user()->phone, -3) : 'N/A' }}

         <span style="padding: 3px 16px; background: linear-gradient(90deg, rgba(246, 225, 40, 1), rgba(241, 253, 255, 1)); position: absolute; left: 180px; top: 45px; border-radius: 10px; color: #736200ff; font-weight: 700">vip {{(auth()->user()->vip_level)}}</span>
        </div> 
        <div class="id">
         ID:{{(auth()->user()->ref_id)}}
        </div> 
       </div> 
      </div> 
     </div> 
     <!-- Balance Card --> 
     <div class="card"> 
      <div class="card-header"> 
       <div> 
        <div class="small">
         Total Assets
        </div> 
        <div style="font-size:22px; font-weight:700;">
         {{price(auth()->user()->balance)}}
        </div> 
       </div> 
       <button onclick="window.apdLoader.show(); window.location.href='history'">My Bills</button> 
      </div> 
     </div> 
     <!-- Action Buttons --> 
     <div class="actions"> 
      <div class="action" onclick="window.apdLoader.show(); window.location.href='user/recharge'"> 
       <img src="/assets/images/wallet.png" style="width: 40px; margin-bottom: 5px" class="green-filter"> 
       <div>
    Recharge
       </div> 
      </div> 
      <div class="action" onclick="window.apdLoader.show(); window.location.href='withdraw'"> 
   <img src="https://cdn-icons-png.flaticon.com/512/10149/10149458.png" 
        style="width: 40px; margin-bottom: 5px; filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(86deg) brightness(118%) contrast(119%);"> 
   <div>Withdrawal</div> 
</div>
      <div class="action" onclick="window.apdLoader.show(); window.location.href='card'"> 
       <!-- <div class="action-icon"><i class="ri-bank-card-line"></i></div> --> 
       <img src="/assets/images/account.png" style="width: 40px; margin-bottom: 5px" class="green-filter"> 
       <div>
        Account
       </div> 
      </div> 
      <div class="action" onclick="window.apdLoader.show(); window.location.href='service'"> 
       <img src="/assets/images/support.png" style="width: 40px; margin-bottom: 5px" class="green-filter"> 
       <div>
        Service
       </div> 
      </div> 
     </div> 
     <!-- Referral --> 
     <div class="referral"> 
      <div class="referral-header" onclick="window.apdLoader.show(); window.location.href='my-team'"> 
       <div> 
        <div style="font-weight:600; margin-bottom:6px;">
         Invite friends and get discounts!
        </div> 
        <div class="referral-stats"> 
         <div>
          Team Size
          <span>{{ auth()->user()->team_size }}</span>
         </div> 
         <div>
          Bonus
          <span>{{setting('currency')}}0.00</span>
         </div> 
         <div>
          VIP Level
          <span>{{(auth()->user()->vip_level)}}</span>
         </div> 
        </div> 
       </div> 
       <i class="ri-arrow-right-line"></i> 
      </div> 
     </div> 
     <!-- Bonus Pool --> 
    <div class="bonus-container" style="position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 24px; box-shadow: 0 4px 15px rgba(0,0,0,0.5);"> 
    
    <img src="/assets/images/bgg.png" style="width: 100%; height: 360px; object-fit: cover; display: block; filter: brightness(0.5) contrast(1.2);"> 
    
    <div style="position: absolute; inset: 0; background: rgba(0, 0, 0, 0.3); padding: 15px; display: flex; align-items: center; justify-content: center;"> 
        
    <div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%;">
    <div style="background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); padding: 15px 5px; border-radius: 12px; text-align: center; border: 1px solid rgba(255, 255, 255, 0.2);">
        <span style="display: block; color: #fde68a; font-weight: bold; font-size: 14px;">Rs {{ number_format(auth()->user()->balance, 2) }}</span>
        <span style="display: block; color: #fff; font-size: 10px; margin-top: 4px; font-weight: 500;">Recharge Balance</span>
    </div>
    <div style="background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); padding: 15px 5px; border-radius: 12px; text-align: center; border: 1px solid rgba(255, 255, 255, 0.2);">
        <span style="display: block; color: #fde68a; font-weight: bold; font-size: 14px;">Rs {{ number_format($total_withdraw ?? 0, 2) }}</span>
        <span style="display: block; color: #fff; font-size: 10px; margin-top: 4px; font-weight: 500;">Total Withdraw</span>
    </div>
    <div style="background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); padding: 15px 5px; border-radius: 12px; text-align: center; border: 1px solid rgba(255, 255, 255, 0.2);">
        <span style="display: block; color: #fde68a; font-weight: bold; font-size: 14px;">{{ $total_products ?? 0 }}</span>
        <span style="display: block; color: #fff; font-size: 10px; margin-top: 4px; font-weight: 500;">Total Product</span>
    </div>
    <div style="background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); padding: 15px 5px; border-radius: 12px; text-align: center; border: 1px solid rgba(255, 255, 255, 0.2);">
        <span style="display: block; color: #fde68a; font-weight: bold; font-size: 14px;">Rs {{ number_format($today_income ?? 0, 2) }}</span>
        <span style="display: block; color: #fff; font-size: 10px; margin-top: 4px; font-weight: 500;">Today Income</span>
    </div>
    <div style="background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); padding: 15px 5px; border-radius: 12px; text-align: center; border: 1px solid rgba(255, 255, 255, 0.2);">
        <span style="display: block; color: #fde68a; font-weight: bold; font-size: 14px;">Rs {{ number_format($team_income ?? 0, 2) }}</span>
        <span style="display: block; color: #fff; font-size: 10px; margin-top: 4px; font-weight: 500;">Team Income</span>
    </div>
    <div style="background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); padding: 15px 5px; border-radius: 12px; text-align: center; border: 1px solid rgba(255, 255, 255, 0.2);">
        <span style="display: block; color: #fde68a; font-weight: bold; font-size: 14px;">Rs {{ number_format($total_income ?? 0, 2) }}</span>
        <span style="display: block; color: #fff; font-size: 10px; margin-top: 4px; font-weight: 500;">Total Income</span>
    </div>
</div>

    </div> 
</div>

     <div id="rdmContainer" style="position:fixed;display:none;inset:0;z-index:999999999;background:rgba(0,0,0,0.75);"> 
      <div style="position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:290px;height:230px;display:flex;align-items:center;justify-content:center; flex-direction: column"> 
       <img src="/assets/images/rdm.png" alt="Redeem" style="width:330px;height:330px;max-width:none;max-height:none;object-fit:cover;display:block;border-radius:6px;"> 
       <div style="position:absolute;bottom:-15px;left:20px;right:20px;display:flex;align-items:center;justify-content:space-between;"> 
        <input type="text" id="rdmCode" name="code" class="rdm-form" style="background:transparent;border:none;color:#fff;font-size:14px;outline:none;flex:1;caret-color:#fff; border-bottom: 1px solid #fff; padding-bottom: 10px" placeholder="Redemption code"> 
        <button type="button" class="apply-btn" id="rdmSubmit"> Apply </button> 
       </div> 
       <img src="/assets/images/close.png" onclick="document.getElementById('rdmContainer').style.display = 'none'" style="margin-top: 10px; width: 38px; height: 38px; cursor: pointer;" alt="Close"> 
      </div> 
     </div> 
     <div id="rdmssContainer" style="position:fixed;display:none;inset:0;z-index:999999999;background:rgba(0,0,0,0.75);"> 
      <div style="position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:290px;height:280px;display:flex;align-items:center;justify-content:center;"> 
       <img src="/assets/images/rdmss.png" alt="Redeem Success" style="width:330px;height:330px;max-width:none;max-height:none;object-fit:cover;display:block;border-radius:6px;"> 
       <div style="position:absolute;bottom:35px;left:45px;right:15px;display:flex;align-items:center;justify-content:center;"> 
        <p id="rdmAmount" style="margin:0;color:#000;font-weight:800;font-size:22px;background:transparent;padding:6px 12px;border-radius:8px;"> 0.00 </p> 
       </div> 
      </div> 
     </div> 
     <!-- Menu --> 
     <div class="menu"> 
      <div class="menu-item" id="rdmBtn"> 
       <div class="menu-left">
        <i class="ri-gift-line"></i>
        <span>Gift</span>
       </div> 
       <i class="ri-arrow-right-line"></i> 
      </div> 
      <div class="menu-item" onclick="window.apdLoader.show(); window.location.href='/about'"> 
       <div class="menu-left">
        <i class="ri-tools-line"></i>
        <span>Platform Rules</span>
       </div> 
       <i class="ri-arrow-right-line"></i> 
      </div> 
      <div class="menu-item" onclick="window.apdLoader.show(); window.location.href='/history'"> 
       <div class="menu-left">
        <i class="ri-history-line"></i>
        <span>Transaction History</span>
       </div> 
      <!-- <i class="ri-arrow-right-line"></i> 
      </div> 
     <!-- <div class="menu-item" onclick="window.apdLoader.show(); window.location.href='/change-password'"> 
       <div class="menu-left">
        <i class="ri-lock-line"></i>
        <span>Change Password</span>
       </div> -->
       <i class="ri-arrow-right-line"></i> 
      </div> 
      <div class="menu-item" onclick="window.apdError.show('Mobile app not ready', 3000, 'error');"> 
       <div class="menu-left">
        <i class="ri-download-line"></i>
        <span>Download APP</span>
       </div> 
       <i class="ri-arrow-right-line"></i> 
      </div> 
      <div class="menu-item" onclick="window.apdLoader.show(); window.location.href='/logout'"> 
       <div class="menu-left">
        <i class="ri-logout-box-line"></i>
        <span>Disconnect</span>
       </div> 
       <i class="ri-arrow-right-line"></i> 
      </div> 
     </div> 
    </div> 
   </main> 
   <nav class="apd-bottom-nav" aria-label="bottom navigation"> 
    <div class="apd-nav-inner"> 
     <a class="apd-nav-item " href="/dashboard"> 
      <svg viewbox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"> 
       <path d="M3 11.5L12 5l9 6.5"></path> 
       <path d="M5.5 21V12.5h13V21"></path> 
       <path d="M9 21v-6h6v6"></path> 
      </svg> <span>Home</span> </a> 
     <a class="apd-nav-item " href="/vip"> 
      <svg viewbox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"> 
       <rect x="2.5" y="6.5" width="19" height="11" rx="2"></rect> 
       <circle cx="17" cy="11.5" r="1.6"></circle> 
       <path d="M7 11.5h4"></path> 
      </svg> <span>Income</span> </a> 
     <a class="apd-nav-item " href="/salary"> 
      <svg viewbox="0 0 26 26" width="28" height="28" xmlns="http://www.w3.org/2000/svg"> 
       <rect x="5" y="14" width="3.5" height="7" rx="0.6" fill="currentColor" opacity="0.95"></rect> 
       <rect x="11" y="10" width="3.5" height="11" rx="0.6" fill="currentColor" opacity="0.95"></rect> 
       <rect x="17" y="6" width="3.5" height="15" rx="0.6" fill="currentColor" opacity="0.95"></rect> 
       <polyline points="5,16 9,13 13,12 17,8 21,9" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"></polyline> 
       <circle cx="21" cy="9" r="1.2" fill="currentColor"></circle> 
      </svg> <span>Salary</span> </a> 
     <a class="apd-nav-item " href="/my-team"> 
      <svg viewbox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"> 
       <path d="M14 8.5a3 3 0 1 0-6 0"></path> 
       <path d="M3.5 20.5c1.6-3 4.2-4.5 7.5-4.5h1"></path> 
       <path d="M19 9v4M21 11h-4"></path> 
      </svg> <span>Invite</span> </a> 
     <a class="apd-nav-item  active " href="/my-profile"> 
      <svg viewbox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"> 
       <circle cx="12" cy="8.2" r="3"></circle> 
       <path d="M4.5 20.5c1.8-3.6 5.2-5 7.5-5s5.7 1.4 7.5 5"></path> 
      </svg> <span>Mine</span> </a> 
    </div> 
   </nav> 
   <style>
  .apd-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    padding: 8px 12px;
    max-width: 420px;
    margin: 0 auto;
    background: #004a11ff;
    border-top: 1px solid #30ff52ff;
    backdrop-filter: blur(6px);
  }

  .apd-nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    gap: 6px;
    justify-content: space-between;
    align-items: center;
  }

  .apd-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255,255,255,0.7);
    font-size: 11px;
    width: 56px;
    padding: 6px 2px;
    transition: all 0.2s ease;
  }

  .apd-nav-item svg {
    stroke: currentColor;
    transition: all 0.2s ease;
  }

  .apd-nav-item.active {
    color: #30ff6bff; /* main page color */
  }

  .apd-nav-item.active svg {
    stroke: #30ff6bff;
  }

  .apd-nav-item:hover {
    color: #30ff6bff;
  }

  @media (min-width:720px) {
    .apd-nav-inner { justify-content: center; gap: 28px; }
  }
</style> 
</div>

@include('alert-message')

<script>
document.addEventListener('DOMContentLoaded', function(){
  const rdmBtn = document.getElementById('rdmBtn');
  const rdmContainer = document.getElementById('rdmContainer');
  const rdmSubmit = document.getElementById('rdmSubmit');
  const rdmCodeInput = document.getElementById('rdmCode');
  const rdmssContainer = document.getElementById('rdmssContainer');
  const rdmAmount = document.getElementById('rdmAmount');

  rdmBtn.addEventListener('click', ()=>{ 
    rdmContainer.style.display='flex'; 
    rdmCodeInput.value=''; 
  });

  document.querySelector('#rdmContainer img[alt="Close"]').addEventListener('click', ()=>{ 
    rdmContainer.style.display='none'; 
  });

  rdmSubmit.addEventListener('click', async ()=>{
    const code = rdmCodeInput.value.trim();
    if(!code){ alert('Please enter a code'); return; }

    try{
      const res = await fetch('{{ route("user.redeem") }}', {
        method:'POST',
        headers:{
          'Content-Type':'application/json',
          'X-CSRF-TOKEN':'{{ csrf_token() }}'
        },
        body: JSON.stringify({ bonus_code: code })
      });
      const data = await res.json();

      if(data.status === 'success'){
        rdmContainer.style.display='none';
        rdmAmount.textContent='₦ '+parseFloat(data.amount).toLocaleString();
        rdmssContainer.style.display='flex';
        setTimeout(()=>{ rdmssContainer.style.display='none'; },3000);
      } else {
        alert(data.message);
      }
    } catch(err){
      alert('Server error. Try again');
      console.error(err);
    }
  });

  document.addEventListener('keydown', e=>{
    if(e.key==='Escape'){ rdmContainer.style.display='none'; rdmssContainer.style.display='none'; }
  });
});
</script>
<script>
    window.OneOk = window.OneOk || {};
    window.OneOk.formatNaira = function(n){
      return '₦' + Number(n).toLocaleString('en-US');
    };

    document.querySelectorAll('a').forEach(a => {
      a.addEventListener('click', function (evt) {
        // ignore modified clicks (open in new tab/window)
        if (evt.ctrlKey || evt.metaKey || evt.shiftKey || evt.altKey || evt.button === 1) return;

        // ignore anchors that do nothing or internal fragment links
        const href = (a.getAttribute('href') || '').trim();
        if (!href || href.startsWith('#') || href === 'javascript:void(0)') return;

        if (window.apdLoader && typeof window.apdLoader.show === 'function') {
          window.apdLoader.show();
        }
      });
    });

  </script> 
 </body>
</html>