<!DOCTYPE html>
<html lang="en">
<head> 
  <meta charset="UTF-8"> 
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"> 
  <title>Transaction History - TATA</title> 
  
  <!-- External Resources -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"/>
  <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/layui/2.8.17/css/layui.css">

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

    body {
      font-family: 'Poppins', sans-serif;
      /* আপনার থিমের এনিমেটেড ব্যাকগ্রাউন্ড */
      background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364, #ff8c00);
      background-size: 400% 400%;
      animation: gradientBG 15s ease infinite;
      color: #fff;
      min-height: 100vh;
      display: flex;
      justify-content: center;
      padding-top: 20px;
      padding-bottom: 40px;
      overflow-x: hidden;
    }

    @keyframes gradientBG {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }

    .app-container {
      width: 92%;
      max-width: 380px; /* পারফেক্ট মোবাইল সাইজ */
    }

    /* টপ ন্যাভিগেশন */
    .header-nav {
      display: flex;
      align-items: center;
      gap: 15px;
      margin-bottom: 20px;
    }
    .header-nav a { color: #fff; text-decoration: none; font-size: 18px; }
    .header-nav h2 { font-size: 17px; font-weight: 600; }

    /* ট্যাব ডিজাইন - স্লিম ও আধুনিক */
    .tab-nav {
      display: flex;
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(10px);
      border-radius: 12px;
      padding: 5px;
      margin-bottom: 20px;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }
    .tab-nav a {
      flex: 1;
      text-align: center;
      padding: 8px 0;
      font-size: 11px;
      font-weight: 600;
      color: #aaa;
      text-decoration: none;
      border-radius: 8px;
      transition: 0.3s;
      text-transform: uppercase;
    }
    .tab-nav a.active {
      background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
      color: #222;
    }

    /* হিস্টোরি লিস্ট কার্ড - গ্লাস ইফেক্ট */
    .history-card {
      background: rgba(255, 255, 255, 0.12);
      backdrop-filter: blur(15px);
      border-radius: 18px;
      padding: 15px;
      margin-bottom: 12px;
      border: 1px solid rgba(255, 255, 255, 0.15);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .card-left h4 { font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 4px; }
    .card-left p { font-size: 10px; opacity: 0.6; }

    .card-right { text-align: right; }
    .card-right h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
    .text-green { color: #00ff7a; }
    .text-red { color: #ff4d4d; }

    /* স্ট্যাটাস ব্যাজ */
    .status-pill {
      font-size: 9px;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: 20px;
      text-transform: uppercase;
    }
    .status-success { background: rgba(0, 255, 122, 0.2); color: #00ff7a; border: 1px solid rgba(0, 255, 122, 0.3); }
    .status-pending { background: rgba(230, 162, 60, 0.2); color: #E6A23C; border: 1px solid rgba(230, 162, 60, 0.3); }
    .status-failed { background: rgba(245, 108, 108, 0.2); color: #F56C6C; border: 1px solid rgba(245, 108, 108, 0.3); }

    .no-data { text-align: center; margin-top: 50px; font-size: 12px; opacity: 0.5; }

  </style>
</head> 
<body> 

<div class="app-container">
  
  <!-- Top Nav -->
  <div class="header-nav">
    <a href="<?php echo e(route('dashboard')); ?>"><i class="fa-solid fa-chevron-left"></i></a>
    <h2>Statement Records</h2>
  </div>

  <!-- Modern Tabs -->
  <div class="tab-nav"> 
    <a href="javascript:void(0);" class="active" data-tab="account">Account</a> 
    <a href="javascript:void(0);" data-tab="recharge">Recharge</a> 
    <a href="javascript:void(0);" data-tab="withdraw">Withdraw</a> 
  </div> 

  <!-- Account Records -->
  <div class="tab-content" id="account">
    <?php $__empty_1 = true; $__currentLoopData = \App\Models\UserLedger::where('user_id', auth()->id())->orderByDesc('id')->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $element): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
    <div class="history-card">
      <div class="card-left">
        <h4><?php echo e($element->remark); ?></h4>
        <p><i class="fa-regular fa-clock"></i> <?php echo e($element->created_at->format('d M, Y h:i A')); ?></p>
      </div>
      <div class="card-right">
        <h3 class="<?php echo e($element->amount >= 0 ? 'text-green' : 'text-red'); ?>">
          <?php echo e($element->amount >= 0 ? '+' : '-'); ?><?php echo e(price(abs($element->amount))); ?>

        </h3>
      </div>
    </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
      <p class="no-data">No account records found.</p>
    <?php endif; ?>
  </div> 

  <!-- Recharge Records -->
  <div class="tab-content" id="recharge" style="display:none;">
    <?php $__empty_1 = true; $__currentLoopData = \App\Models\Deposit::where('user_id', auth()->id())->orderByDesc('id')->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $element): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
    <div class="history-card">
      <div class="card-left">
        <h4>Deposit Fund</h4>
        <p><i class="fa-regular fa-clock"></i> <?php echo e($element->created_at->format('d M, Y h:i A')); ?></p>
      </div>
      <div class="card-right">
        <h3 class="text-green">+<?php echo e(price($element->amount)); ?></h3>
        <span class="status-pill status-<?php echo e($element->status); ?>"><?php echo e(ucfirst($element->status)); ?></span>
      </div>
    </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
      <p class="no-data">No recharge records found.</p>
    <?php endif; ?>
  </div> 

  <!-- Withdraw Records -->
  <div class="tab-content" id="withdraw" style="display:none;">
    <?php $__empty_1 = true; $__currentLoopData = \App\Models\Withdrawal::where('user_id', auth()->id())->orderByDesc('id')->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $element): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
    <div class="history-card">
      <div class="card-left">
        <h4>Withdrawal</h4>
        <p><i class="fa-regular fa-clock"></i> <?php echo e($element->created_at->format('d M, Y h:i A')); ?></p>
      </div>
      <div class="card-right">
        <h3 class="text-red">-<?php echo e(price($element->amount)); ?></h3>
        <span class="status-pill status-<?php echo e($element->status); ?>"><?php echo e(ucfirst($element->status)); ?></span>
      </div>
    </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
      <p class="no-data">No withdraw records found.</p>
    <?php endif; ?>
  </div> 

</div>

<script>
  // ট্যাব সুইচিং ফাংশন
  document.querySelectorAll('.tab-nav a').forEach(tab => {
    tab.addEventListener('click', function() {
      document.querySelectorAll('.tab-nav a').forEach(a => a.classList.remove('active'));
      document.querySelectorAll('.tab-content').forEach(content => content.style.display = "none");
      
      this.classList.add('active');
      document.getElementById(this.dataset.tab).style.display = "block";
    });
  });
</script>

</body>
</html><?php /**PATH /home/goldenyi/public_html/resources/views/app/main/history.blade.php ENDPATH**/ ?>