
    <!-- Mobile Navigation Bar -->
    <nav class="md:hidden fixed bottom-0 left-0 right-0 z-40">
        <!-- Frosted glass background -->
        <div class="bg-white/95 backdrop-blur-xl border-t border-[#E0E5E5]">
            <div class="relative px-2 pt-1.5 pb-safe">
                <div class="flex items-center justify-around">
                    <!-- Home -->
                    <a href="" class="relative flex flex-col items-center py-1.5 px-3 group min-w-[56px]">
                        <div class="relative">
                            <div class="w-10 h-10 rounded-full flex items-center justify-center transition-all duration-200 bg-primary-100">
                                <i data-lucide="home" class="w-[22px] h-[22px] transition-colors duration-200 text-primary-500"></i>
                            </div>
                                                        <div class="absolute -bottom-0.5 left-1/2 -translate-x-1/2 w-1 h-1 rounded-full bg-primary-500"></div>
                                                    </div>
                        <span class="text-[10px] font-medium mt-0.5 transition-colors text-primary-500">Home</span>
                    </a>

                    <!-- Activity -->
                    <a href="/user/accounthistory.php" class="relative flex flex-col items-center py-1.5 px-3 group min-w-[56px]">
                        <div class="relative">
                            <div class="w-10 h-10 rounded-full flex items-center justify-center transition-all duration-200 group-active:bg-[#DFE5E5]">
                                <i data-lucide="arrow-left-right" class="w-[22px] h-[22px] transition-colors duration-200 text-[#7A7A7A] group-hover:text-[#4A4A4A]"></i>
                            </div>
                                                    </div>
                        <span class="text-[10px] font-medium mt-0.5 transition-colors text-[#7A7A7A] group-hover:text-[#4A4A4A]">Activity</span>
                    </a>

                    <!-- Center: Send/Transfer -->
                    <a href="/user/localtransfer.php" class="relative flex flex-col items-center py-1 group min-w-[60px]">
                        <div class="w-14 h-14 -mt-5 rounded-2xl bg-gradient-to-br from-primary-500 to-primary-700 flex items-center justify-center shadow-lg shadow-primary-500/20 border-[3px] border-white group-active:scale-95 transition-transform duration-150">
                            <i data-lucide="send" class="w-6 h-6 text-white"></i>
                        </div>
                        <span class="text-[10px] font-semibold mt-0.5 text-primary-500">Transfer</span>
                    </a>

                    <!-- Cards -->
                    <a href="/user/cards.php" class="relative flex flex-col items-center py-1.5 px-3 group min-w-[56px]">
                        <div class="relative">
                            <div class="w-10 h-10 rounded-full flex items-center justify-center transition-all duration-200 group-active:bg-[#DFE5E5]">
                                <i data-lucide="credit-card" class="w-[22px] h-[22px] transition-colors duration-200 text-[#7A7A7A] group-hover:text-[#4A4A4A]"></i>
                            </div>
                                                    </div>
                        <span class="text-[10px] font-medium mt-0.5 transition-colors text-[#7A7A7A] group-hover:text-[#4A4A4A]">Cards</span>
                    </a>

                    <!-- Account -->
                    <a href="/user/account-settings.php" class="relative flex flex-col items-center py-1.5 px-3 group min-w-[56px]">
                        <div class="relative">
                            <div class="w-10 h-10 rounded-full flex items-center justify-center transition-all duration-200 group-active:bg-[#DFE5E5]">
                                                                    <img src="<?= $web_url ?>/assets/user/profile/<?= $row['acct_image'] ?>" 
                                         alt="eva" 
                                         class="w-7 h-7 rounded-full object-cover border border-[#E0E5E5]">
                                                            </div>
                                                    </div>
                        <span class="text-[10px] font-medium mt-0.5 transition-colors text-[#7A7A7A] group-hover:text-[#4A4A4A]">Account</span>
                    </a>
                </div>
                
                <!-- Safe area spacer -->
                <div class="h-1"></div>
            </div>
        </div>
    </nav>



    <!-- Modern Sidebar Panel -->
    <div x-show="sidebarOpen" 
         x-transition:enter="transition ease-out duration-300"
         x-transition:enter-start="opacity-0"
         x-transition:enter-end="opacity-100"
         x-transition:leave="transition ease-in duration-200"
         x-transition:leave-start="opacity-100"
         x-transition:leave-end="opacity-0"
         @click="sidebarOpen = false"
         class="fixed inset-0 bg-black/60 backdrop-blur-sm z-50 lg:hidden"
         style="display: none;">
    </div>

    <aside x-show="sidebarOpen"
           x-transition:enter="transition ease-out duration-300 transform"
           x-transition:enter-start="-translate-x-full"
           x-transition:enter-end="translate-x-0"
           x-transition:leave="transition ease-in duration-200 transform"
           x-transition:leave-start="translate-x-0"
           x-transition:leave-end="-translate-x-full"
           class="fixed left-0 top-0 bottom-0 w-80 bg-white border-r border-[#E0E5E5] z-50 overflow-y-auto lg:!block lg:!translate-x-0"
           style="display: none;">
        
        <!-- Close Button -->
        <button @click="sidebarOpen = false" class="lg:hidden absolute top-4 right-4 p-2 rounded-lg hover:bg-[#DFE5E5] transition-colors">
            <i data-lucide="x" class="w-5 h-5 text-[#7A7A7A]"></i>
        </button>
        
        <!-- Profile Section -->
        <div class="p-6 border-b border-[#E0E5E5]">
            <div class="flex items-start space-x-4">
                                    <img src="<?= $web_url ?>/assets/user/profile/<?= $row['acct_image'] ?>" 
                         alt="eva" 
                         class="w-14 h-14 rounded-full object-cover border border-[#E0E5E5] flex-shrink-0">
                                <div class="flex-1 min-w-0">
                    <h3 class="font-semibold text-base mb-1 truncate text-[#0D1B23]">
                        <?= $fullName ?>
                    </h3>
                    <p class="text-sm text-[#4A4A4A] mb-2"><?= $row['acct_email'] ?? '' ?></p>
                    <div class="inline-flex items-center px-2.5 py-1 rounded bg-[#DFE5E5] border border-[#C8D1D1]">
                        <i data-lucide="hash" class="w-3 h-3 mr-1 text-[#7A7A7A]"></i>
                        <span class="text-xs font-medium text-[#4A4A4A]"><?= $row['acct_no'] ?? '' ?></span>
                    </div>
                    <p class="text-xs text-[#7A7A7A] mt-2"><?= $row['acct_type'] ?? '' ?></p>
                </div>
            </div>
        </div>

        <!-- Balance Display -->
        <div class="p-6 border-b border-[#E0E5E5]">
            <p class="text-xs uppercase tracking-wider text-[#7A7A7A] mb-2 font-medium">Available Balance</p>
            <h2 class="font-bold text-2xl mb-4 text-[#0D1B23]">
                <?= $currency ?><?php echo number_format($acct_balance, 2, '.', ','); ?>
            </h2>
            <div class="grid grid-cols-2 gap-3">
                <a href="/user/deposits.php" class="flex items-center justify-center space-x-2 px-4 py-2.5 rounded-lg bg-primary-500 hover:bg-primary-600 transition-colors">
                    <i data-lucide="plus" class="w-4 h-4 text-white"></i>
                    <span class="text-sm font-medium text-white">Deposit</span>
                </a>
                <a href="/user/loan.php" class="flex items-center justify-center space-x-2 px-4 py-2.5 rounded-lg bg-[#DFE5E5] hover:bg-[#C8D1D1] border border-[#C8D1D1] transition-colors">
                    <i data-lucide="piggy-bank" class="w-4 h-4 text-[#4A4A4A]"></i>
                    <span class="text-sm font-medium text-[#4A4A4A]">Loan</span>
                </a>
            </div>
        </div>

        <!-- Navigation Menu -->
        <nav class="p-4">
            <p class="text-xs uppercase tracking-wider text-[#7A7A7A] px-3 mb-3 font-semibold">Menu</p>
            <ul class="space-y-1">
                <li>
                    <a href="/user/dashboard.php" class="flex items-center space-x-3 px-4 py-3 rounded-xl hover:bg-[#F9F9F9] transition-colors group">
                        <div class="w-10 h-10 rounded-lg bg-[#DFE5E5] flex items-center justify-center group-hover:bg-[#C8D1D1] transition-colors">
                            <i data-lucide="layout-dashboard" class="w-5 h-5 text-[#0D1B23]"></i>
                        </div>
                        <span class="font-medium text-[#4A4A4A] group-hover:text-[#0D1B23] transition-colors">Dashboard</span>
                    </a>
                </li>
                <li>
                    <a href="/user/deposits.php" class="flex items-center space-x-3 px-4 py-3 rounded-xl hover:bg-[#F9F9F9] transition-colors group">
                        <div class="w-10 h-10 rounded-lg bg-[#DFE5E5] flex items-center justify-center group-hover:bg-[#C8D1D1] transition-colors">
                            <i data-lucide="arrow-down-to-line" class="w-5 h-5 text-[#0D1B23]"></i>
                        </div>
                        <span class="font-medium text-[#4A4A4A] group-hover:text-[#0D1B23] transition-colors">Deposits</span>
                    </a>
                </li>
                <li>
                    <a href="/user/localtransfer.php" class="flex items-center space-x-3 px-4 py-3 rounded-xl hover:bg-[#F9F9F9] transition-colors group">
                        <div class="w-10 h-10 rounded-lg bg-[#DFE5E5] flex items-center justify-center group-hover:bg-[#C8D1D1] transition-colors">
                            <i data-lucide="building-2" class="w-5 h-5 text-[#0D1B23]"></i>
                        </div>
                        <span class="font-medium text-[#4A4A4A] group-hover:text-[#0D1B23] transition-colors">Local Transfer</span>
                    </a>
                </li>


                <li>
                    <a href="/user/internationaltransfer.php" class="flex items-center space-x-3 px-4 py-3 rounded-xl hover:bg-[#F9F9F9] transition-colors group">
                        <div class="w-10 h-10 rounded-lg bg-[#DFE5E5] flex items-center justify-center group-hover:bg-[#C8D1D1] transition-colors">
                            <i data-lucide="globe" class="w-5 h-5 text-[#0D1B23]"></i>
                        </div>
                        <span class="font-medium text-[#4A4A4A] group-hover:text-[#0D1B23] transition-colors">International Transfer</span>
                    </a>
                </li>
                
                <li>
                    <a href="/user/accounthistory.php" class="flex items-center space-x-3 px-4 py-3 rounded-xl hover:bg-[#F9F9F9] transition-colors group">
                        <div class="w-10 h-10 rounded-lg bg-[#DFE5E5] flex items-center justify-center group-hover:bg-[#C8D1D1] transition-colors">
                            <i data-lucide="receipt" class="w-5 h-5 text-[#0D1B23]"></i>
                        </div>
                        <span class="font-medium text-[#4A4A4A] group-hover:text-[#0D1B23] transition-colors">Transactions</span>
                    </a>
                </li>
                <li>
                    <a href="/user/statement.php" class="flex items-center space-x-3 px-4 py-3 rounded-xl hover:bg-[#F9F9F9] transition-colors group">
                        <div class="w-10 h-10 rounded-lg bg-[#DFE5E5] flex items-center justify-center group-hover:bg-[#C8D1D1] transition-colors">
                            <i data-lucide="file-text" class="w-5 h-5 text-[#0D1B23]"></i>
                        </div>
                        <span class="font-medium text-[#4A4A4A] group-hover:text-[#0D1B23] transition-colors">Account Statement</span>
                    </a>
                </li>
                <li>
                    <a href="/user/cards.php" class="flex items-center space-x-3 px-4 py-3 rounded-xl hover:bg-[#F9F9F9] transition-colors group">
                        <div class="w-10 h-10 rounded-lg bg-[#DFE5E5] flex items-center justify-center group-hover:bg-[#C8D1D1] transition-colors">
                            <i data-lucide="credit-card" class="w-5 h-5 text-[#0D1B23]"></i>
                        </div>
                        <span class="font-medium text-[#4A4A4A] group-hover:text-[#0D1B23] transition-colors">Virtual Cards</span>
                    </a>
                </li>
             
               
            </ul>

            <p class="text-xs uppercase tracking-wider text-[#7A7A7A] px-3 mb-3 mt-6 font-semibold">Settings</p>
            <ul class="space-y-1">
                <li>
                    <a href="/user/support.php" class="flex items-center space-x-3 px-4 py-3 rounded-xl hover:bg-[#F9F9F9] transition-colors group">
                        <div class="w-10 h-10 rounded-lg bg-[#DFE5E5] flex items-center justify-center group-hover:bg-[#C8D1D1] transition-colors">
                            <i data-lucide="headphones" class="w-5 h-5 text-[#0D1B23]"></i>
                        </div>
                        <span class="font-medium text-[#4A4A4A] group-hover:text-[#0D1B23] transition-colors">Customer Support</span>
                    </a>
                </li>
                <li>
                    <a href="/user/account-settings.php" class="flex items-center space-x-3 px-4 py-3 rounded-xl hover:bg-[#F9F9F9] transition-colors group">
                        <div class="w-10 h-10 rounded-lg bg-[#DFE5E5] flex items-center justify-center group-hover:bg-[#C8D1D1] transition-colors">
                            <i data-lucide="user-cog" class="w-5 h-5 text-[#0D1B23]"></i>
                        </div>
                        <span class="font-medium text-[#4A4A4A] group-hover:text-[#0D1B23] transition-colors">Profile Settings</span>
                    </a>
                </li>
                <li>
                    <a href="/user/logout.php" 
                       onclick="event.preventDefault(); document.getElementById('logout-form').submit();"
                       class="flex items-center space-x-3 px-4 py-3 rounded-xl hover:bg-red-50 transition-colors group">
                        <div class="w-10 h-10 rounded-lg bg-red-50 flex items-center justify-center group-hover:bg-red-100 transition-colors">
                            <i data-lucide="log-out" class="w-5 h-5 text-[#D55672]"></i>
                        </div>
                        <span class="font-medium text-[#D55672] group-hover:text-[#D55672] transition-colors">Log Out</span>
                    </a>
                    <form id="logout-form" action="/user/logout.php" method="POST" style="display: none;">
                        
                    </form>
                </li>
            </ul>
        </nav>
    </aside>

    <!-- Success Modal -->
    
    <!-- Error Modal -->
    
    <!-- Initialize Lucide Icons -->
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            lucide.createIcons();
        });
        
        // Reinitialize icons after Alpine updates
        document.addEventListener('alpine:initialized', () => {
            lucide.createIcons();
        });
    </script>

    <!-- Auto-Logout Security Feature -->
    <script>
        (function() {
            // Configuration
            const INACTIVITY_TIMEOUT = 10 * 60 * 1000; // 10 minutes in milliseconds
            const WARNING_TIME = 1 * 60 * 1000; // Show warning 1 minute before logout
            const PIN_ROUTE = "/pin.php";
            
            let inactivityTimer;
            let warningTimer;
            let warningModal = null;
            let countdownInterval = null;
            
            // Events that indicate user activity
            const activityEvents = ['mousedown', 'mousemove', 'keypress', 'scroll', 'touchstart', 'click'];
            
            // Reset the inactivity timer
            function resetTimer() {
                // Clear existing timers
                clearTimeout(inactivityTimer);
                clearTimeout(warningTimer);
                
                // Hide warning modal if it's showing
                if (warningModal) {
                    warningModal.remove();
                    warningModal = null;
                }
                
                if (countdownInterval) {
                    clearInterval(countdownInterval);
                    countdownInterval = null;
                }
                
                // Set warning timer (1 minute before logout)
                warningTimer = setTimeout(showWarningModal, INACTIVITY_TIMEOUT - WARNING_TIME);
                
                // Set logout timer
                inactivityTimer = setTimeout(logout, INACTIVITY_TIMEOUT);
            }
            
            // Show warning modal
            function showWarningModal() {
                let remainingSeconds = Math.floor(WARNING_TIME / 1000);
                
                warningModal = document.createElement('div');
                warningModal.className = 'fixed inset-0 z-[9999] flex items-center justify-center p-4 bg-black/60';
                warningModal.innerHTML = `
                    <div class="bg-white rounded-xl shadow-strong max-w-md w-full border border-[#E0E5E5] overflow-hidden">
                        <div class="p-8">
                            <div class="w-14 h-14 rounded-full bg-amber-50 flex items-center justify-center mx-auto mb-4">
                                <i data-lucide="clock" class="w-7 h-7 text-[#EBBC46]"></i>
                            </div>
                            <h3 class="text-lg font-semibold text-center mb-2 text-[#0D1B23]">Session Timeout Warning</h3>
                            <p class="text-[#4A4A4A] text-center text-sm mb-4">
                                For your security, you will be logged out due to inactivity.
                            </p>
                            <div class="bg-[#F9F9F9] rounded-lg p-4 mb-6 text-center border border-[#E0E5E5]">
                                <p class="text-sm text-[#7A7A7A] mb-2">Time remaining:</p>
                                <p id="countdown-timer" class="text-2xl font-bold text-[#EBBC46]">${remainingSeconds}s</p>
                            </div>
                            <div class="grid grid-cols-2 gap-3">
                                <button id="logout-now-btn" class="px-6 py-2.5 rounded-lg bg-[#DFE5E5] hover:bg-[#C8D1D1] border border-[#C8D1D1] transition-colors font-medium text-[#0D1B23]">
                                    Logout Now
                                </button>
                                <button id="stay-logged-in-btn" class="px-6 py-2.5 rounded-lg bg-primary-500 hover:bg-primary-600 transition-colors font-medium text-white">
                                    Stay Logged In
                                </button>
                            </div>
                        </div>
                    </div>
                `;
                
                document.body.appendChild(warningModal);
                lucide.createIcons();
                
                // Update countdown
                const countdownElement = document.getElementById('countdown-timer');
                countdownInterval = setInterval(() => {
                    remainingSeconds--;
                    if (countdownElement) {
                        countdownElement.textContent = `${remainingSeconds}s`;
                    }
                    if (remainingSeconds <= 0) {
                        clearInterval(countdownInterval);
                    }
                }, 1000);
                
                // Button handlers
                document.getElementById('stay-logged-in-btn').addEventListener('click', function() {
                    resetTimer();
                });
                
                document.getElementById('logout-now-btn').addEventListener('click', function() {
                    logout();
                });
            }
            
            // Logout function - redirect to PIN page
            function logout() {
                // Store current URL for return after PIN verification
                sessionStorage.setItem('return_url', window.location.href);
                
                // Clear timers
                clearTimeout(inactivityTimer);
                clearTimeout(warningTimer);
                if (countdownInterval) {
                    clearInterval(countdownInterval);
                }
                
                // Redirect to PIN page
                window.location.href = PIN_ROUTE;
            }
            
            // Attach event listeners for user activity
            activityEvents.forEach(function(event) {
                document.addEventListener(event, resetTimer, true);
            });
            
            // Initialize timer on page load
            resetTimer();
            
            // Prevent timer on PIN page itself
            if (window.location.pathname.includes('/pin.php')) {
                activityEvents.forEach(function(event) {
                    document.removeEventListener(event, resetTimer, true);
                });
                clearTimeout(inactivityTimer);
                clearTimeout(warningTimer);
            }
        })();
    </script>

       
    <div>
    <style>
/* GTranslate floating widget repositioning */
.gtranslate_wrapper {
    border-radius: 8px !important;
    padding: 4px 6px !important;
    border: 1px solid rgba(51, 65, 85, 0.6) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    max-width: 160px !important;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(8px) !important;
    position: fixed !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* On mobile: move just above bottom nav */
@media (max-width: 767px) {
    .gtranslate_wrapper {
        bottom: 52px !important;
        left: 12px !important;
        z-index: 45 !important;
    }
}

/* On desktop: position normally */
@media (min-width: 768px) {
    .gtranslate_wrapper {
        bottom: 20px !important;
        left: 20px !important;
        z-index: 45 !important;
    }
}

.gtranslate_wrapper select {
    font-size: 10px !important;
    padding: 2px 4px !important;
    height: auto !important;
    background: transparent !important;
    color: #cbd5e1 !important;
    border: none !important;
}

.gtranslate_wrapper img {
    width: 14px !important;
    height: auto !important;
    margin-right: 4px !important;
}

.gtranslate_wrapper * {
    font-size: 11px !important;
    line-height: 1.3 !important;
}
</style>
<div class="gtranslate_wrapper"></div>
<script>
    window.gtranslateSettings = {
        default_language: "en",
        alt_flags:{"en":"usa"},
        wrapper_selector: ".gtranslate_wrapper",
        flag_style: "3d",
    };
</script>
<script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script>

 </div>
</body>

</html>
