<!-- Right Column -->
<div class="col-12 col-lg-4 d-flex flex-column gap-4">
    <!-- Recent Transactions -->
    <div class="card shadow-sm border rounded-4 overflow-hidden">
        <div class="card-body p-0">

            
            <div class="d-flex justify-content-between align-items-center px-4 py-3 border-bottom">
                <h6 class="fw-bold mb-0">Recent Transactions</h6>
                <a href="<?php echo e(route('user.transaction.index')); ?>"
                    class="small text-primary text-decoration-none d-inline-flex align-items-center gap-1">
                    View All <i class="bi bi-arrow-right"></i>
                </a>
            </div>

            
            <ul class="list-group list-group-flush">
                <?php $__empty_1 = true; $__currentLoopData = $transactions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $transaction): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <li class="list-group-item px-4 py-3">

                        
                        <div class="d-flex align-items-start gap-3">

                            
                            <?php if($transaction->isDirectionCredit()): ?>
                                <div class="txn-icon txn-icon--credit flex-shrink-0">
                                    <i class="bi bi-arrow-down"></i>
                                </div>
                            <?php else: ?>
                                <div class="txn-icon txn-icon--debit flex-shrink-0">
                                    <i class="bi bi-arrow-up"></i>
                                </div>
                            <?php endif; ?>

                            
                            <div
                                class="flex-grow-1 min-width-0 d-flex flex-column flex-lg-row align-items-lg-center justify-content-lg-between gap-1 gap-lg-3">

                                
                                <div class="min-width-0">
                                    <p class="mb-0 fw-semibold text-truncate" style="font-size:.88rem;">
                                        <?php echo e($transaction->type->label()); ?>

                                    </p>
                                    <small class="text-muted d-block text-truncate" style="font-size:.75rem;">
                                        Ref: <?php echo e($transaction->reference_id); ?>

                                    </small>
                                    <small class="text-muted" style="font-size:.72rem;">
                                        <?php echo e(date('M d, Y • h:i A', strtotime($transaction->transaction_at))); ?>

                                    </small>
                                </div>

                                
                                <div
                                    class="d-flex align-items-center gap-2 flex-lg-column align-items-lg-end gap-lg-1 flex-shrink-0">
                                    <?php if($transaction->isDirectionCredit()): ?>
                                        <span class="fw-bold text-success" style="font-size:.88rem;">
                                            +<?php echo e(currency($user->currency)); ?><?php echo e(formatAmount($transaction->amount)); ?>

                                        </span>
                                    <?php else: ?>
                                        <span class="fw-bold text-danger" style="font-size:.88rem;">
                                            -<?php echo e(currency($user->currency)); ?><?php echo e(formatAmount($transaction->amount)); ?>

                                        </span>
                                    <?php endif; ?>

                                    <?php if($transaction->isCompleted()): ?>
                                        <span class="badge bg-success-subtle text-success rounded-pill"
                                            style="font-size:.65rem;">Completed</span>
                                    <?php elseif($transaction->isPending()): ?>
                                        <span class="badge bg-warning-subtle text-warning rounded-pill"
                                            style="font-size:.65rem;">Pending</span>
                                    <?php elseif($transaction->isCancelled()): ?>
                                        <span class="badge bg-secondary-subtle text-secondary rounded-pill"
                                            style="font-size:.65rem;">Cancelled</span>
                                    <?php else: ?>
                                        <span class="badge bg-danger-subtle text-danger rounded-pill"
                                            style="font-size:.65rem;">Failed</span>
                                    <?php endif; ?>
                                </div>

                            </div>
                        </div>

                    </li>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <li class="list-group-item text-center text-muted py-5">
                        <i class="bi bi-inbox fs-3 d-block mb-2 opacity-25"></i>
                        No transactions yet
                    </li>
                <?php endif; ?>
            </ul>

        </div>
    </div>

    <style>
        .txn-icon {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            margin-top: 2px;
        }

        .txn-icon--credit {
            background: rgba(25, 135, 84, .12);
            color: #198754;
        }

        .txn-icon--debit {
            background: rgba(220, 53, 69, .12);
            color: #dc3545;
        }

        .min-width-0 {
            min-width: 0;
        }
    </style>

    <!-- Account Statistics -->
    

</div>
<?php /**PATH C:\xampp\htdocs\projects\online-banking-v7.3-seacoast-bank\resources\views/dashboard/user/partials/dashboard/right_column_recent_transaction_and_account_statistics.blade.php ENDPATH**/ ?>