<?php include "master.php"; ?>
<?php
$_btc_balance    = (float)(getUserDetails('btcBalance', $_SESSION['email']) ?: 0);
$_btc_price      = getBtcPrice($_SESSION['currency'] ?? 'usd');
$_btc_fiat_value = $_btc_balance * $_btc_price;

// Monthly stats from transactions table
$_user_acc = getUserDetails('acc_no', $_SESSION['email']);
$_st = $connect->prepare("
    SELECT
        SUM(CASE WHEN transaction_type = 'Credit' AND status = 'Success'
                  AND MONTH(date_added) = MONTH(CURDATE()) AND YEAR(date_added) = YEAR(CURDATE())
             THEN CAST(amount AS DECIMAL(15,2)) ELSE 0.00 END) AS monthly_deposits,
        SUM(CASE WHEN transaction_type = 'Debit' AND status = 'Success'
                  AND MONTH(date_added) = MONTH(CURDATE()) AND YEAR(date_added) = YEAR(CURDATE())
             THEN CAST(amount AS DECIMAL(15,2)) ELSE 0.00 END) AS monthly_expenses,
        SUM(CASE WHEN status = 'Success'
             THEN CAST(amount AS DECIMAL(15,2)) ELSE 0.00 END) AS total_volume,
        SUM(CASE WHEN status != 'Success' THEN CAST(amount AS DECIMAL(15,2)) ELSE 0 END) AS pending_amount
    FROM transactions
    WHERE account_number = ?
");
$_st->bind_param("s", $_user_acc);
$_st->execute();
$_stats = $_st->get_result()->fetch_assoc();
$_st->close();
$_monthly_deposits  = (float)($_stats['monthly_deposits']  ?? 0);
$_monthly_expenses  = (float)($_stats['monthly_expenses']  ?? 0);
$_total_volume      = (float)($_stats['total_volume']      ?? 0);
$_pending_amount    = (float)($_stats['pending_amount']    ?? 0);
$_net               = $_monthly_deposits - $_monthly_expenses;

// Financial Insights: account health
$_balance       = (float)(getUserDetails('balance', $_SESSION['email']) ?: 0);
$_acc_limit     = (float)(getUserDetails('acc_limit', $_SESSION['email']) ?: 1);
$_balance_ratio = min(round(($_balance / $_acc_limit) * 100, 1), 100);

if ($_balance_ratio >= 80) {
    $_health_label      = 'excellent';
    $_health_color      = 'text-green-600 dark:text-green-400';
    $_health_icon       = 'fa-circle-check';
    $_health_icon_bg    = 'bg-green-100 dark:bg-green-900/30';
    $_health_icon_color = 'text-green-600 dark:text-green-400';
    $_bar_color         = 'bg-green-500';
} elseif ($_balance_ratio >= 50) {
    $_health_label      = 'good';
    $_health_color      = 'text-blue-600 dark:text-blue-400';
    $_health_icon       = 'fa-thumbs-up';
    $_health_icon_bg    = 'bg-blue-100 dark:bg-blue-900/30';
    $_health_icon_color = 'text-blue-600 dark:text-blue-400';
    $_bar_color         = 'bg-blue-500';
} elseif ($_balance_ratio >= 25) {
    $_health_label      = 'fair';
    $_health_color      = 'text-yellow-600 dark:text-yellow-400';
    $_health_icon       = 'fa-triangle-exclamation';
    $_health_icon_bg    = 'bg-yellow-100 dark:bg-yellow-900/30';
    $_health_icon_color = 'text-yellow-600 dark:text-yellow-400';
    $_bar_color         = 'bg-yellow-500';
} else {
    $_health_label      = 'needs attention';
    $_health_color      = 'text-red-600 dark:text-red-400';
    $_health_icon       = 'fa-exclamation-triangle';
    $_health_icon_bg    = 'bg-red-100 dark:bg-red-900/30';
    $_health_icon_color = 'text-red-600 dark:text-red-400';
    $_bar_color         = 'bg-red-600';
}

// Net display helpers
$_net_positive   = $_net >= 0;
$_net_color      = $_net_positive ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400';
$_net_prefix     = $_net_positive ? '+' : '';
$_net_icon       = $_net_positive ? 'fa-arrow-up' : 'fa-arrow-down';

// Recent transactions
$_rt = $connect->prepare("SELECT * FROM transactions WHERE account_number = ? ORDER BY date_added DESC LIMIT 5");
$_rt->bind_param("s", $_user_acc);
$_rt->execute();
$_recent_txns = $_rt->get_result()->fetch_all(MYSQLI_ASSOC);
$_rt->close();
?>
                <!-- Main Content -->
                <main class="flex-1 overflow-y-auto bg-gray-50 dark:bg-gray-900 min-h-0">
                    <div class="h-full overflow-y-auto">
                        <div x-data="{ 
    showBankAccount: false, 
    showSendMoney: false,
    showReceiveModal: false,
    showMobileMenu: false,
    showMobileNotifications: false,
    greeting: '',
    currentDate: '',
    balanceVisible: true,
    toggleBalance() {
        this.balanceVisible = !this.balanceVisible;
        localStorage.setItem('balanceVisible', this.balanceVisible);
    },
    updateTime() {
        const now = new Date();
        if (now.getHours() < 12) { this.greeting = 'Good Morning'; } 
        else if (now.getHours() < 18) { this.greeting = 'Good Afternoon'; } 
        else { this.greeting = 'Good Evening'; }
        const options = { weekday: 'long', month: 'long', day: 'numeric' };
        this.currentDate = now.toLocaleDateString(undefined, options);
    }
}" x-init="
    updateTime();
    setInterval(() => updateTime(), 60000);
    balanceVisible = localStorage.getItem('balanceVisible') === null 
        ? true 
        : localStorage.getItem('balanceVisible') === 'true';
">
        
    
    <div class="lg:hidden mb-4">
    <!-- Mobile Header with Extended Gradient Background -->
    <div class="bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 dark:from-slate-950 dark:via-slate-900 dark:to-slate-950 text-white px-4 pt-6 pb-8 rounded-b-3xl">
        <!-- Header Section -->
        <div class="flex items-center justify-between mb-6">
            <div class="flex items-center space-x-2">
                <img src="<?php echo $_profile_img_url; ?>" alt="Profile" class="w-10 h-10 rounded-full border-2 border-white/20" onerror="this.onerror=null;this.src='../uploads/profile_pictures/default.jpg'">
                <div>
                    <p class="text-white/80 text-xs" x-text="greeting + ' 👋'"></p>
                    <p class="text-white font-semibold text-base">
                        <?php echo htmlspecialchars(getUserDetails('fullname', $_SESSION['email']) ?: ''); ?>
                    </p>
                </div>
            </div>
            <div class="flex items-center space-x-2">
                <!-- Dark Mode Toggle -->
                <button @click="toggleDarkMode()" 
                        class="w-10 h-10 bg-white/10 dark:bg-white/20 rounded-full flex items-center justify-center backdrop-blur-sm transition-all duration-200 hover:bg-white/20 dark:hover:bg-white/30">
                    <i x-show="!darkMode" class="fa-solid fa-moon text-white text-base"></i>
                    <i x-show="darkMode" class="fa-solid fa-sun text-yellow-400 text-base"></i>
                </button>

                <!-- Notifications -->
                <div class="relative">
                    <button @click="showMobileNotifications = !showMobileNotifications" class="w-10 h-10 bg-white/10 dark:bg-white/20 rounded-full flex items-center justify-center backdrop-blur-sm transition-all duration-200 hover:bg-white/20 dark:hover:bg-white/30">
                        <i class="fa-solid fa-bell text-white text-base"></i>
                    </button>
                                                        </div>
            </div>
        </div>

        <!-- Swipeable Mobile Wallet Cards -->
        <div class="mb-6" x-data="{ 
            currentCard: 0, 
            totalCards: 2,
            startX: 0,
            currentX: 0,
            isDragging: false,
            handleTouchStart(e) {
                this.startX = e.touches[0].clientX;
                this.isDragging = true;
            },
            handleTouchMove(e) {
                if (!this.isDragging) return;
                this.currentX = e.touches[0].clientX;
            },
            handleTouchEnd() {
                if (!this.isDragging) return;
                const diffX = this.startX - this.currentX;
                const threshold = 50;
                
                if (Math.abs(diffX) > threshold) {
                    if (diffX > 0 && this.currentCard < this.totalCards - 1) {
                        this.currentCard++;
                    } else if (diffX < 0 && this.currentCard > 0) {
                        this.currentCard--;
                    }
                }
                
                this.isDragging = false;
                this.startX = 0;
                this.currentX = 0;
            }
        }">
            <!-- Card Container -->
            <div class="relative overflow-hidden">
                <div class="flex transition-transform duration-300 ease-in-out" 
                     :style="`transform: translateX(-${currentCard * 100}%)`"
                     @touchstart="handleTouchStart($event)"
                     @touchmove="handleTouchMove($event)"
                     @touchend="handleTouchEnd()"
                     @mousedown="handleTouchStart({touches: [{clientX: $event.clientX}]})"
                     @mousemove="isDragging && handleTouchMove({touches: [{clientX: $event.clientX}]})"
                     @mouseup="handleTouchEnd()"
                     @mouseleave="handleTouchEnd()"
                     class="cursor-grab active:cursor-grabbing">
                    
                    <!-- Fiat Balance Card -->
                    <div class="w-full flex-shrink-0">
                        <div class="bg-gradient-to-br from-primary-600 via-primary-500 to-primary-700 dark:from-primary-700 dark:via-primary-600 dark:to-primary-800 rounded-2xl p-4 text-white shadow-xl dark:shadow-2xl dark:shadow-primary-900/50 relative overflow-hidden">
                            <!-- Background Pattern -->
                            <div class="absolute inset-0 opacity-10">
                                <div class="absolute top-3 right-3 w-24 h-24 bg-white rounded-full -translate-y-6 translate-x-6"></div>
                                <div class="absolute bottom-3 left-3 w-20 h-20 bg-white rounded-full translate-y-4 -translate-x-4"></div>
                            </div>

                            <div class="relative z-10">
                                <!-- Account Info -->
                                <div class="flex justify-between items-start mb-3">
                                    <div>
                                        <p class="text-white/60 text-xs uppercase tracking-wide"><?php echo getSiteConfig('sitename'); ?> Bank</p>
                                        <p class="text-white/80 text-xs"><?php echo htmlspecialchars(getUserDetails('fullname', $_SESSION['email']) ?: ''); ?></p>
                                    </div>
                                    <div class="text-right">
                                        <p class="text-white/60 text-xs">Fiat Account</p>
                                        <p class="text-white/80 text-xs font-mono">•••• <?php echo substr(getUserDetails('acc_no', $_SESSION['email']), -4); ?></p>
                                    </div>
                                </div>

                                <!-- Balance Section -->
                                <div class="text-center mb-3">
                                    <p class="text-white/80 text-xs mb-1">Available Balance</p>
                                    <div class="flex items-center justify-center space-x-2">
                                        <p class="text-3xl font-bold" x-show="balanceVisible" x-transition>
                                            <?php echo $_curr_sym . number_format(getUserDetails('balance', $_SESSION['email']), 2); ?>
                                        </p>
                                        <p class="text-3xl font-bold" x-show="!balanceVisible" x-transition>
                                            <?php echo $_curr_sym; ?> ******
                                        </p>
                                        <button @click="toggleBalance()" @touchstart.stop 
    @mousedown.stop class="text-white/60 hover:text-white">
                                            <i x-show="balanceVisible" class="fa-solid fa-eye-slash text-base"></i>
                                            <i x-show="!balanceVisible" class="fa-solid fa-eye text-base"></i>
                                        </button>
                                    </div>
                                </div>

                                <!-- Account Status -->
                                <div class="flex justify-between items-center text-xs">
                                    <div class="flex items-center space-x-2">
                                        <div class="w-1.5 h-1.5 bg-green-400 rounded-full"></div>
                                        <span class="text-white/70">Active</span>
                                    </div>
                                    <div class="text-white/70">
                                     <i class="fa-solid fa-shield-exclamation text-green-400 text-xs"></i>
                                        <span class="text-white/80 text-xs">Verified</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- Crypto Balance Card -->
                    <div class="w-full flex-shrink-0">
                        <div class="bg-gradient-to-br from-secondary-700 via-secondary-600 to-secondary-800 dark:from-secondary-800 dark:via-secondary-700 dark:to-secondary-900 rounded-2xl p-4 text-white shadow-xl dark:shadow-2xl dark:shadow-secondary-900/50 relative overflow-hidden">
                            <!-- Background Pattern -->
                            <div class="absolute inset-0 opacity-10">
                                <div class="absolute top-3 right-3 w-24 h-24 bg-white rounded-full -translate-y-6 translate-x-6"></div>
                                <div class="absolute bottom-3 left-3 w-20 h-20 bg-white rounded-full translate-y-4 -translate-x-4"></div>
                            </div>
                            
                            <div class="relative z-10">
                                <!-- Account Info -->
                                <div class="flex justify-between items-start mb-3">
                                    <div>
                                        <p class="text-white/60 text-xs uppercase tracking-wide">Bitcoin Wallet</p>
                                        <p class="text-white/80 text-xs"><?php echo htmlspecialchars(getUserDetails('fullname', $_SESSION['email']) ?: ''); ?></p>
                                    </div>
                                    <div class="text-right">
                                        <p class="text-white/60 text-xs">Crypto Account</p>
                                        <div class="flex items-center space-x-1">
                                            <i class="fab fa-bitcoin text-white/80 text-xs"></i>
                                            <span class="text-white/80 text-xs">BTC</span>
                                        </div>
                                    </div>
                                </div>

                                <!-- Balance Section -->
                                <div class="text-center mb-3">
                                    <p class="text-white/80 text-xs mb-1">Bitcoin Balance</p>
                                    <div class="flex items-center justify-center space-x-2">
                                        <p class="text-3xl font-bold" x-show="balanceVisible" x-transition>
                                            <?php echo number_format($_btc_balance, 8); ?> BTC
                                        </p>
                                        <p class="text-3xl font-bold" x-show="!balanceVisible" x-transition>
                                            ••••••• BTC
                                        </p>
                                        <button @click="toggleBalance()" @touchstart.stop 
    @mousedown.stop class="text-white/60 hover:text-white">
                                            <i x-show="balanceVisible" class="fa-solid fa-eye-slash text-base"></i>
                                            <i x-show="!balanceVisible" class="fa-solid fa-eye text-base"></i>
                                        </button>
                                    </div>
                                    <p class="text-white/60 text-xs mt-1" x-show="balanceVisible" x-transition>
                                        ≈ <?php echo $_curr_sym . number_format($_btc_fiat_value, 2); ?>
                                    </p>
                                </div>

                                <!-- BTC Rate -->
                                <div class="flex justify-between items-center text-xs">
                                    <div class="flex items-center space-x-2">
                                        <div class="w-1.5 h-1.5 bg-secondary-400 rounded-full"></div>
                                        <span class="text-white/70">1 BTC = <?php echo $_curr_sym . ($_btc_price ? number_format($_btc_price, 2) : '—'); ?></span>
                                    </div>
                                    <div class="text-white/70">
                                        Live Rate
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Card Indicators -->
            <div class="flex justify-center space-x-2 mt-3">
                <button @click="currentCard = 0" 
                        :class="currentCard === 0 ? 'bg-white' : 'bg-white/30'" 
                        class="w-2 h-2 rounded-full transition-colors duration-200"></button>
                <button @click="currentCard = 1" 
                        :class="currentCard === 1 ? 'bg-white' : 'bg-white/30'" 
                        class="w-2 h-2 rounded-full transition-colors duration-200"></button>
            </div>

            <!-- Swipe Instructions -->
            <div class="text-center mt-2">
                <p class="text-white/50 text-xs">
                    <i class="fa-solid fa-hand-pointer mr-1"></i>
                    Swipe to switch between accounts
                </p>
            </div>
        </div>

        <!-- Mobile Quick Actions - Circular Design (Inside Gradient) -->
        <div class="grid grid-cols-4 gap-3">
            <!-- Top Up - Circular -->
            <button onclick="window.location.href='deposits'" class="flex flex-col items-center justify-center">
                <div class="w-14 h-14 bg-yellow-400 dark:bg-yellow-500 rounded-full flex items-center justify-center shadow-lg dark:shadow-yellow-500/25 mb-1">
                    <i class="fa-solid fa-plus text-black dark:text-gray-900 text-lg"></i>
                </div>
                <span class="text-white text-xs font-medium">Top Up</span>
            </button>

            <!-- Send - Circular -->
            <button @click="showSendMoney = true" class="flex flex-col items-center justify-center">
                <div class="w-14 h-14 bg-white/20 dark:bg-white/30 backdrop-blur-sm rounded-full flex items-center justify-center shadow-lg dark:shadow-white/10 mb-1 border border-white/10 dark:border-white/20">
                    <i class="fa-solid fa-paper-plane text-white text-lg"></i>
                </div>
                <span class="text-white text-xs font-medium">Send</span>
            </button>

            <!-- Receive -->
            <button @click="showReceiveModal = true" class="flex flex-col items-center justify-center">
                <div class="w-14 h-14 bg-white/20 dark:bg-white/30 backdrop-blur-sm rounded-full flex items-center justify-center shadow-lg dark:shadow-white/10 mb-1 border border-white/10 dark:border-white/20">
                    <i class="fa-solid fa-arrow-down text-white text-lg"></i>
                </div>
                <span class="text-white text-xs font-medium">Receive</span>
            </button>

            <!-- More -->
            <button @click="showMobileMenu = true" class="flex flex-col items-center justify-center">
                <div class="w-14 h-14 bg-white/20 dark:bg-white/30 backdrop-blur-sm rounded-full flex items-center justify-center shadow-lg dark:shadow-white/10 mb-1 border border-white/10 dark:border-white/20">
                    <i class="fa-solid fa-grid-2 text-white text-lg"></i>
                </div>
                <span class="text-white text-xs font-medium">More</span>
            </button>
        </div>
    </div>

    <!-- Mobile Notifications Panel -->
    <div x-show="showMobileNotifications" 
         x-transition:enter="transition ease-out duration-300" 
         x-transition:enter-start="opacity-0 -translate-y-4" 
         x-transition:enter-end="opacity-100 translate-y-0"
         x-transition:leave="transition ease-in duration-200" 
         x-transition:leave-start="opacity-100 translate-y-0" 
         x-transition:leave-end="opacity-0 -translate-y-4"
         class="fixed inset-0 z-50 bg-black/20 backdrop-blur-sm" 
         @click="showMobileNotifications = false">
        
        <div @click.stop class="absolute top-0 left-0 right-0 bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 dark:from-slate-950 dark:via-slate-900 dark:to-slate-950 text-white rounded-b-3xl shadow-2xl dark:shadow-slate-900/50 max-h-[80vh] overflow-hidden">
            <!-- Header -->
            <div class="flex items-center justify-between p-4 border-b border-white/10 dark:border-white/20">
                <div class="flex items-center space-x-3">
                    <div class="w-10 h-10 bg-white/10 dark:bg-white/20 rounded-2xl flex items-center justify-center">
                        <i class="fa-solid fa-bell text-white text-sm"></i>
                    </div>
                    <div>
                        <h3 class="text-lg font-bold text-white">Notifications</h3>
                                                                            <p class="text-xs text-white/60">All caught up!</p>
                                            </div>
                </div>
                <button @click="showMobileNotifications = false" class="w-8 h-8 bg-white/10 dark:bg-white/20 rounded-xl flex items-center justify-center hover:bg-white/20 dark:hover:bg-white/30 transition-colors">
                    <i class="fa-solid fa-times text-white text-sm"></i>
                </button>
            </div>

            <!-- Notifications List -->
            <div class="overflow-y-auto max-h-96 custom-scrollbar">
                                
                                <div class="p-8 text-center">
                    <div class="w-16 h-16 bg-white/10 dark:bg-white/20 rounded-3xl flex items-center justify-center mx-auto mb-4">
                        <i class="fa-solid fa-bell-slash text-white/40 dark:text-white/60 text-2xl"></i>
                    </div>
                    <p class="text-white font-semibold mb-1">No notifications yet</p>
                    <p class="text-xs text-white/60 dark:text-white/70">We'll notify you when something happens</p>
                </div>
                            </div>
            
            <!-- Footer Actions -->
                    </div>
    </div>

    <!-- Quick Transfer Section -->
    <div class="px-4 mb-4 mt-4" x-data="dashboardQuickTransfer()" x-init="loadBeneficiaries()">
        <div class="flex justify-between items-center mb-3">
            <h3 class="text-base font-semibold text-gray-900 dark:text-white">Quick Transfer</h3>
            <a href="beneficiaries" class="text-xs text-primary-600 dark:text-primary-400 font-medium flex items-center hover:text-primary-700 dark:hover:text-primary-300 transition-colors">
                View All
                <i class="fa-solid fa-chevron-right ml-1 text-xs"></i>
            </a>
        </div>
        
        <div class="flex space-x-3 overflow-x-auto pb-2" x-show="!loading">
            <!-- Add New Beneficiary -->
            <a href="localtransfer" class="flex-shrink-0 flex flex-col items-center justify-center group">
                <div class="w-14 h-14 rounded-full border-2 border-dashed border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800 flex items-center justify-center mb-1 group-hover:bg-gray-100 dark:group-hover:bg-gray-700 group-hover:border-primary-400 dark:group-hover:border-primary-500 transition-all duration-200">
                    <i class="fa-solid fa-plus text-gray-400 dark:text-gray-500 text-base group-hover:text-primary-500 dark:group-hover:text-primary-400 transition-colors"></i>
                </div>
                <span class="text-xs text-gray-500 dark:text-gray-400 text-center group-hover:text-primary-600 dark:group-hover:text-primary-400 transition-colors">Add New</span>
            </a>

            <!-- Beneficiaries List -->
            <template x-for="beneficiary in beneficiaries.slice(0, 6)" :key="beneficiary.id">
                <div class="flex-shrink-0 flex flex-col items-center justify-center group relative">
                    <button 
                        @click="selectBeneficiary(beneficiary)"
                        class="relative w-14 h-14 rounded-full flex items-center justify-center mb-1 border-2 border-white dark:border-gray-800 shadow-sm dark:shadow-gray-900/25 hover:scale-105 transition-all duration-200"
                        :class="beneficiary.color"
                    >
                        <span class="text-white font-semibold text-sm" x-text="beneficiary.initials"></span>
                        
                        <!-- Favorite Star -->
                        <div 
                            x-show="beneficiary.is_favorite" 
                            class="absolute -top-1 -right-1 w-4 h-4 bg-yellow-400 rounded-full flex items-center justify-center"
                        >
                            <i class="fa-solid fa-star text-white text-xs"></i>
                        </div>
                    </button>
                    
                    <span class="text-xs text-gray-700 dark:text-gray-300 text-center max-w-16 truncate" x-text="beneficiary.name"></span>
                </div>
            </template>

            <!-- Loading State -->
            <template x-if="loading">
                <div class="flex space-x-3">
                    <template x-for="i in 4">
                        <div class="flex-shrink-0 flex flex-col items-center justify-center">
                            <div class="w-14 h-14 rounded-full bg-gray-200 dark:bg-gray-700 animate-pulse mb-1"></div>
                            <div class="w-12 h-2 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"></div>
                        </div>
                    </template>
                </div>
            </template>

            <!-- Empty State -->
            <template x-if="!loading && beneficiaries.length === 0">
                <div class="flex-shrink-0 flex flex-col items-center justify-center py-4 px-8">
                    <div class="w-12 h-12 rounded-full bg-gray-100 dark:bg-gray-800 flex items-center justify-center mb-2">
                        <i class="fa-solid fa-users text-gray-400 dark:text-gray-500 text-base"></i>
                    </div>
                    <p class="text-xs text-gray-500 dark:text-gray-400 text-center">No saved beneficiaries</p>
                </div>
            </template>
        </div>
    </div>
    
    <!-- Mobile Cards Section -->
    <div class="px-4 mb-4">
        <section class="lg:hidden">
    <!-- Header -->
    <div class="flex justify-between items-center mb-3">
        <h3 class="font-semibold text-base text-gray-900 dark:text-white">Your Active Cards</h3>
            </div>

            <!-- Empty State -->
        <div class="py-8 text-center bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 border border-white/20 dark:border-gray-700/50">
            <div class="w-16 h-16 bg-primary-100 dark:bg-primary-900/50 rounded-full flex items-center justify-center mx-auto mb-3">
                <i class="fa-solid fa-credit-card text-primary-500 dark:text-primary-400 text-xl"></i>
            </div>
            <h3 class="text-sm font-semibold text-primary-900 dark:text-primary-100 mb-1">No active cards</h3>
            <p class="text-xs text-primary-700 dark:text-primary-300 mb-4 max-w-xs mx-auto">Apply for a virtual card to get started with secure online payments.</p>
            <a href="apply" class="inline-flex items-center px-4 py-2 bg-gradient-to-r from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 text-white text-xs font-medium rounded-xl shadow-lg shadow-primary-500/25 dark:shadow-primary-900/50 transition-all duration-200 transform hover:scale-105">
                <i class="fa-solid fa-plus text-xs mr-2"></i>
                Apply for Card
            </a>
        </div>
    </section>    </div>

    <!-- Mobile Financial Services Overview -->
    <div class="px-4 mb-4">
    <div class="flex justify-between items-center mb-3">
        <h3 class="text-base font-semibold text-gray-900 dark:text-white">Financial Services</h3>
        <button class="text-xs text-primary-600 dark:text-primary-400 font-medium flex items-center hover:text-primary-700 dark:hover:text-primary-300 transition-colors">
            View All
            <i class="fa-solid fa-chevron-right ml-1 text-xs"></i>
        </button>
    </div>
    
    <div class="grid grid-cols-2 gap-3">
                <div class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 border border-white/20 dark:border-gray-700/50 overflow-hidden">
            <div class="p-4">
                <!-- Service Header -->
                <div class="flex items-center justify-between mb-3">
                    <div class="flex items-center space-x-3">
                        <div class="w-12 h-12 rounded-xl bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center">
                            <i class="fa-solid fa-landmark text-blue-600 dark:text-blue-400 text-lg"></i>
                        </div>
                        <div>
                            <h4 class="text-sm font-semibold text-gray-900 dark:text-white">Loans</h4>
                            <span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium text-gray-500 bg-gray-100 dark:bg-gray-700">
                                <div class="w-1.5 h-1.5 rounded-full bg-gray-500 mr-1"></div>
                                Available
                            </span>
                        </div>
                    </div>
                </div>
                
                <!-- Service Description -->
                <p class="text-xs text-gray-500 dark:text-gray-400 mb-3">Quick approval process</p>
                
                <!-- Action Button -->
                <a href="loan" class="w-full inline-flex items-center justify-center px-4 py-2.5 bg-gradient-to-r from-blue-500 to-blue-600 text-white text-xs font-medium rounded-lg shadow-sm hover:shadow-md transition-all duration-200 transform hover:scale-105">
                    <i class="fa-solid fa-landmark text-xs mr-2"></i>
                    Apply Now
                </a>
            </div>
        </div>
                <div class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 border border-white/20 dark:border-gray-700/50 overflow-hidden">
            <div class="p-4">
                <!-- Service Header -->
                <div class="flex items-center justify-between mb-3">
                    <div class="flex items-center space-x-3">
                        <div class="w-12 h-12 rounded-xl bg-green-100 dark:bg-green-900/30 flex items-center justify-center">
                            <i class="fa-solid fa-hand-holding-dollar text-green-600 dark:text-green-400 text-lg"></i>
                        </div>
                        <div>
                            <h4 class="text-sm font-semibold text-gray-900 dark:text-white">Grants</h4>
                            <span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium text-gray-500 bg-gray-100 dark:bg-gray-700">
                                <div class="w-1.5 h-1.5 rounded-full bg-gray-500 mr-1"></div>
                                Available
                            </span>
                        </div>
                    </div>
                </div>
                
                <!-- Service Description -->
                <p class="text-xs text-gray-500 dark:text-gray-400 mb-3">No repayment required</p>
                
                <!-- Action Button -->
                <a href="grant-application" class="w-full inline-flex items-center justify-center px-4 py-2.5 bg-gradient-to-r from-green-500 to-emerald-600 text-white text-xs font-medium rounded-lg shadow-sm hover:shadow-md transition-all duration-200 transform hover:scale-105">
                    <i class="fa-solid fa-hand-holding-dollar text-xs mr-2"></i>
                    Apply Now
                </a>
            </div>
        </div>
                <div class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 border border-white/20 dark:border-gray-700/50 overflow-hidden">
            <div class="p-4">
                <!-- Service Header -->
                <div class="flex items-center justify-between mb-3">
                    <div class="flex items-center space-x-3">
                        <div class="w-12 h-12 rounded-xl bg-purple-100 dark:bg-purple-900/30 flex items-center justify-center">
                            <i class="fa-solid fa-receipt text-purple-600 dark:text-purple-400 text-lg"></i>
                        </div>
                        <div>
                            <h4 class="text-sm font-semibold text-gray-900 dark:text-white">Tax Refunds</h4>
                            <span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium text-gray-500 bg-gray-100 dark:bg-gray-700">
                                <div class="w-1.5 h-1.5 rounded-full bg-gray-500 mr-1"></div>
                                Available
                            </span>
                        </div>
                    </div>
                </div>
                
                <!-- Service Description -->
                <p class="text-xs text-gray-500 dark:text-gray-400 mb-3">Fast processing</p>
                
                <!-- Action Button -->
                <a href="track" class="w-full inline-flex items-center justify-center px-4 py-2.5 bg-gradient-to-r from-purple-500 to-purple-600 text-white text-xs font-medium rounded-lg shadow-sm hover:shadow-md transition-all duration-200 transform hover:scale-105">
                    <i class="fa-solid fa-receipt text-xs mr-2"></i>
                    Apply Now
                </a>
            </div>
        </div>
                <div class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 border border-white/20 dark:border-gray-700/50 overflow-hidden">
            <div class="p-4">
                <!-- Service Header -->
                <div class="flex items-center justify-between mb-3">
                    <div class="flex items-center space-x-3">
                        <div class="w-12 h-12 rounded-xl bg-orange-100 dark:bg-orange-900/30 flex items-center justify-center">
                            <i class="fa-solid fa-credit-card text-orange-600 dark:text-orange-400 text-lg"></i>
                        </div>
                        <div>
                            <h4 class="text-sm font-semibold text-gray-900 dark:text-white">Virtual Cards</h4>
                            <span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium text-gray-500 bg-gray-100 dark:bg-gray-700">
                                <div class="w-1.5 h-1.5 rounded-full bg-gray-500 mr-1"></div>
                                Available
                            </span>
                        </div>
                    </div>
                </div>
                
                <!-- Service Description -->
                <p class="text-xs text-gray-500 dark:text-gray-400 mb-3">Instant virtual cards</p>
                
                <!-- Action Button -->
                <a href="cards" class="w-full inline-flex items-center justify-center px-4 py-2.5 bg-gradient-to-r from-orange-500 to-red-600 text-white text-xs font-medium rounded-lg shadow-sm hover:shadow-md transition-all duration-200 transform hover:scale-105">
                    <i class="fa-solid fa-credit-card text-xs mr-2"></i>
                    Apply Now
                </a>
            </div>
        </div>
            </div>
</div> 
    <!-- Mobile Financial Insights -->
    <div class="px-4 mb-4">
    <div class="flex justify-between items-center mb-3">
        <h3 class="text-base font-semibold text-gray-900 dark:text-white">Financial Insights</h3>
        <button class="text-xs text-primary-600 dark:text-primary-400 font-medium flex items-center hover:text-primary-700 dark:hover:text-primary-300 transition-colors">
            View Report
            <i class="fa-solid fa-chevron-right ml-1 text-xs"></i>
        </button>
    </div>
    
    <div class="space-y-3">
        <!-- Account Health Card -->
        <div class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 border border-white/20 dark:border-gray-700/50 overflow-hidden">
            <div class="p-4">
                <div class="flex items-center justify-between mb-3">
                    <div class="flex items-center space-x-3">
                        <div class="w-10 h-10 rounded-xl <?php echo $_health_icon_bg; ?> flex items-center justify-center">
                            <i class="fa-solid <?php echo $_health_icon; ?> <?php echo $_health_icon_color; ?> text-sm"></i>
                        </div>
                        <div>
                            <h4 class="text-sm font-semibold text-gray-900 dark:text-white">Account Health</h4>
                            <p class="text-xs <?php echo $_health_color; ?> font-medium capitalize"><?php echo $_health_label; ?></p>
                        </div>
                    </div>
                    <div class="text-right">
                        <p class="text-xs text-gray-500 dark:text-gray-400">Balance Ratio</p>
                        <p class="text-sm font-semibold text-gray-900 dark:text-white"><?php echo $_balance_ratio; ?>%</p>
                    </div>
                </div>

                <!-- Progress Bar -->
                <div class="w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2 mb-2">
                    <div class="h-2 rounded-full transition-all duration-300 <?php echo $_bar_color; ?>" style="width: <?php echo $_balance_ratio; ?>%"></div>
                </div>
                <p class="text-xs text-gray-500 dark:text-gray-400"><?php echo $_curr_sym . number_format($_balance, 2); ?> of <?php echo $_curr_sym . number_format($_acc_limit, 2); ?> limit</p>
            </div>
        </div>
        
        <!-- Monthly Summary -->
        <div class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 border border-white/20 dark:border-gray-700/50 overflow-hidden">
            <div class="p-4">
                <h4 class="text-sm font-semibold text-gray-900 dark:text-white mb-3">This Month</h4>
                <div class="grid grid-cols-2 gap-4">
                    <!-- Income -->
                    <div class="text-center">
                        <div class="w-8 h-8 bg-green-100 dark:bg-green-900/30 rounded-lg flex items-center justify-center mx-auto mb-2">
                            <i class="fa-solid fa-arrow-down text-green-600 dark:text-green-400 text-xs"></i>
                        </div>
                        <p class="text-xs text-gray-500 dark:text-gray-400 mb-1">Income</p>
                        <p class="text-sm font-semibold text-green-600 dark:text-green-400"><?php echo $_curr_sym . number_format($_monthly_deposits, 2); ?></p>
                    </div>
                    
                    <!-- Expenses -->
                    <div class="text-center">
                        <div class="w-8 h-8 bg-red-100 dark:bg-red-900/30 rounded-lg flex items-center justify-center mx-auto mb-2">
                            <i class="fa-solid fa-arrow-up text-red-600 dark:text-red-400 text-xs"></i>
                        </div>
                        <p class="text-xs text-gray-500 dark:text-gray-400 mb-1">Expenses</p>
                        <p class="text-sm font-semibold text-red-600 dark:text-red-400"><?php echo $_curr_sym . number_format($_monthly_expenses, 2); ?></p>
                    </div>
                </div>
                
                                
                <div class="mt-3 pt-3 border-t border-gray-200 dark:border-gray-700">
                    <div class="flex items-center justify-center space-x-2">
                        <i class="fa-solid <?php echo $_net_icon; ?> <?php echo $_net_color; ?> text-xs"></i>
                        <span class="text-xs text-gray-500 dark:text-gray-400">Net:</span>
                        <span class="text-sm font-semibold <?php echo $_net_color; ?>"><?php echo $_net_prefix . $_curr_sym . number_format(abs($_net), 2); ?></span>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Financial Tip -->
        <div class="bg-gradient-to-r from-primary-50 to-blue-50 dark:from-gray-800 dark:to-gray-700 rounded-2xl border border-primary-100 dark:border-gray-600 overflow-hidden">
            <div class="p-4">
                <div class="flex items-start space-x-3">
                    <div class="w-10 h-10 bg-white dark:bg-gray-800 rounded-xl flex items-center justify-center shadow-sm">
                        <i class="fa-solid fa-chart-line text-green-600 text-sm"></i>
                    </div>
                    <div class="flex-1">
                        <div class="flex items-center space-x-2 mb-1">
                            <h4 class="text-sm font-semibold text-gray-900 dark:text-white">Track Spending</h4>
                            <span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-primary-100 dark:bg-primary-900/50 text-primary-700 dark:text-primary-300">
                                <i class="fa-solid fa-lightbulb text-xs mr-1"></i>
                                Tip
                            </span>
                        </div>
                        <p class="text-xs text-gray-600 dark:text-gray-300">Monitor your expenses to identify saving opportunities</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div> 
    <!-- Mobile Activity Feed -->
    <div class="px-4 mb-4">
    <div class="flex justify-between items-center mb-3">
        <h3 class="text-base font-semibold text-gray-900 dark:text-white">Recent Activity</h3>
        <a href="accounthistory" class="text-xs text-primary-600 dark:text-primary-400 font-medium flex items-center hover:text-primary-700 dark:hover:text-primary-300 transition-colors">
            View All
            <i class="fa-solid fa-chevron-right ml-1 text-xs"></i>
        </a>
    </div>
    
    <div class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 border border-white/20 dark:border-gray-700/50 overflow-hidden">
                    <!-- Empty State -->
            <div class="p-8 text-center">
                <div class="w-16 h-16 bg-gray-100 dark:bg-gray-700 rounded-full flex items-center justify-center mx-auto mb-4">
                    <i class="fa-solid fa-clock text-gray-400 dark:text-gray-500 text-xl"></i>
                </div>
                <h4 class="text-sm font-medium text-gray-900 dark:text-white mb-2">No Recent Activity</h4>
                <p class="text-xs text-gray-500 dark:text-gray-400">Your account activity will appear here</p>
            </div>
            </div>
    
    <!-- Milestones Section -->
        <div class="mt-4">
        <h4 class="text-sm font-semibold text-gray-900 dark:text-white mb-3">Achievements</h4>
        <div class="space-y-2">
                        <div class="bg-gradient-to-r from-primary-50 to-blue-50 dark:from-gray-800 dark:to-gray-700 rounded-xl border border-primary-100 dark:border-gray-600 p-3">
                <div class="flex items-center space-x-3">
                    <div class="w-8 h-8 bg-white dark:bg-gray-800 rounded-lg flex items-center justify-center shadow-sm">
                        <i class="fa-solid fa-star text-yellow-600 text-sm"></i>
                    </div>
                    <div class="flex-1">
                        <p class="text-sm font-medium text-gray-900 dark:text-white">Welcome to <?php echo getSiteConfig('sitename'); ?></p>
                        <p class="text-xs text-gray-600 dark:text-gray-300">We are glad to have you on board!</p>
                    </div>
                </div>
            </div>
                    </div>
    </div>
    </div> 
    <!-- Mobile Support Widget -->
    <div class="px-4 mb-4">
    <div class="flex justify-between items-center mb-3">
        <h3 class="text-base font-semibold text-gray-900 dark:text-white">Need Help?</h3>
        <a href="support" class="text-xs text-primary-600 dark:text-primary-400 font-medium flex items-center hover:text-primary-700 dark:hover:text-primary-300 transition-colors">
            Support Center
            <i class="fa-solid fa-chevron-right ml-1 text-xs"></i>
        </a>
    </div>
    
    <!-- Support Options -->
    <div class="grid grid-cols-2 gap-3 mb-4">
                                <a href="support" class="block">
                <div class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 border border-white/20 dark:border-gray-700/50 p-3 hover:shadow-xl transition-all duration-200 transform hover:scale-105">
                    <div class="text-center">
                        <div class="w-10 h-10 bg-blue-100 dark:bg-blue-900/30 rounded-xl flex items-center justify-center mx-auto mb-2">
                            <i class="fa-solid fa-message text-blue-600 dark:text-blue-400 text-sm"></i>
                        </div>
                        <h4 class="text-xs font-semibold text-gray-900 dark:text-white mb-1">Live Chat</h4>
                        <p class="text-xs text-gray-500 dark:text-gray-400 leading-tight">Get instant help from our team</p>
                    </div>
                </div>
            </a>
                                          <a href="mailto:<?php echo getSiteConfig('sitemail'); ?>" class="block">
    <div class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 border border-white/20 dark:border-gray-700/50 p-3 hover:shadow-xl transition-all duration-200 transform hover:scale-105">
        <div class="text-center">
            <div class="w-10 h-10 bg-green-100 dark:bg-green-900/30 rounded-xl flex items-center justify-center mx-auto mb-2">
                <i class="fa-solid fa-envelope text-green-600 dark:text-green-400 text-sm"></i>
            </div>
            <h4 class="text-xs font-semibold text-gray-900 dark:text-white mb-1">Email Support</h4>
            <p class="text-xs text-gray-500 dark:text-gray-400 leading-tight">Send us a detailed message</p>
        </div>
    </div>
</a>
                                            </div>
    
    <!-- Contact Information Card -->
    <div class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 border border-white/20 dark:border-gray-700/50 overflow-hidden">
        <!-- Header -->
        <div class="px-4 py-3 bg-gradient-to-r from-primary-50/80 to-blue-50/50 dark:from-gray-900/80 dark:to-gray-800/50 border-b border-primary-100/50 dark:border-gray-700/50">
            <div class="flex items-center">
                <div class="w-6 h-6 bg-primary-500 rounded-lg flex items-center justify-center mr-2">
                    <i class="fa-solid fa-headset text-white text-xs"></i>
                </div>
                <h4 class="text-sm font-bold text-primary-900 dark:text-primary-100">24/7 Support</h4>
            </div>
        </div>
        
        <!-- Contact Footer -->
        <div class="px-4 py-4 bg-gray-50 dark:bg-gray-800/50">
            <div class="text-center">
                <p class="text-xs text-gray-600 dark:text-gray-400 mb-3">We're here to help you anytime</p>
                <div class="flex items-center justify-center space-x-4">
                    <div class="text-center">
                        <div class="w-8 h-8 bg-primary-100 dark:bg-primary-900/30 rounded-full flex items-center justify-center mx-auto mb-1">
                            <i class="fa-solid fa-clock text-primary-600 dark:text-primary-400 text-xs"></i>
                        </div>
                        <p class="text-xs text-gray-600 dark:text-gray-300 font-medium">24/7</p>
                    </div>
                    <div class="text-center">
                        <div class="w-8 h-8 bg-green-100 dark:bg-green-900/30 rounded-full flex items-center justify-center mx-auto mb-1">
                            <i class="fa-solid fa-headset text-green-600 dark:text-green-400 text-xs"></i>
                        </div>
                        <p class="text-xs text-gray-600 dark:text-gray-300 font-medium">Support</p>
                    </div>
                    <div class="text-center">
                        <div class="w-8 h-8 bg-blue-100 dark:bg-blue-900/30 rounded-full flex items-center justify-center mx-auto mb-1">
                            <i class="fa-solid fa-bolt text-blue-600 dark:text-blue-400 text-xs"></i>
                        </div>
                        <p class="text-xs text-gray-600 dark:text-gray-300 font-medium">Fast</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div> 
    <!-- Mobile Menu Modal - Sleek Bottom Sheet Design -->
    <div x-show="showMobileMenu" 
         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"
         class="fixed inset-0 z-50 lg:hidden" 
         style="display: none;">
        
        <!-- Backdrop with Blur -->
        <div class="fixed inset-0 bg-black/40 backdrop-blur-sm" @click="showMobileMenu = false"></div>
        
        <!-- Bottom Sheet Container -->
        <div class="fixed inset-x-0 bottom-0 z-50">
            <div x-show="showMobileMenu"
                 x-transition:enter="transition ease-out duration-300 transform"
                 x-transition:enter-start="translate-y-full"
                 x-transition:enter-end="translate-y-0"
                 x-transition:leave="transition ease-in duration-200 transform"
                 x-transition:leave-start="translate-y-0"
                 x-transition:leave-end="translate-y-full"
                 class="bg-white dark:bg-gray-900 rounded-t-3xl shadow-2xl dark:shadow-gray-900/50 max-h-[85vh] overflow-hidden">
                
                <!-- Handle Bar -->
                <div class="flex justify-center pt-3 pb-2">
                    <div class="w-12 h-1.5 bg-gray-300 dark:bg-gray-600 rounded-full"></div>
                </div>
                
                <!-- Header -->
                <div class="px-6 py-4 border-b border-gray-100 dark:border-gray-700">
                    <div class="flex items-center justify-between">
                        <div class="flex items-center space-x-3">
                            <div class="w-10 h-10 bg-gradient-to-br from-primary-500 to-primary-700 rounded-2xl flex items-center justify-center">
                                <i class="fa-solid fa-user text-white text-sm"></i>
                            </div>
                            <div>
                                <h3 class="font-bold text-gray-900 dark:text-white"> </h3>
                                <p class="text-sm text-gray-500 dark:text-gray-400"><?php echo htmlspecialchars($_SESSION['email'] ?? ''); ?></p>
                            </div>
                        </div>
                        <button @click="showMobileMenu = false" 
                                class="w-8 h-8 bg-gray-100 dark:bg-gray-800 rounded-full flex items-center justify-center hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors">
                            <i class="fa-solid fa-times text-gray-600 dark:text-gray-300 text-sm"></i>
                        </button>
                    </div>
                </div>
                
                <!-- Navigation Content -->
                <div class="px-6 py-4 max-h-[60vh] overflow-y-auto">
                    
                    <!-- Main Section -->
                    <div class="mb-6">
                        <h4 class="text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider mb-3">Main</h4>
                        <div class="space-y-1">
                            <a href="index" class="flex items-center space-x-4 p-3 rounded-2xl bg-primary-50 dark:bg-slate-700/80 border border-primary-100 dark:border-slate-600 group">
                                <div class="w-10 h-10 bg-primary-100 dark:bg-primary-600 rounded-xl flex items-center justify-center group-hover:bg-primary-200 dark:group-hover:bg-primary-500 transition-colors">
                                    <i class="fa-solid fa-house text-primary-600 dark:text-white"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="font-semibold text-primary-900 dark:text-white">Dashboard</p>
                                    <p class="text-xs text-primary-600 dark:text-slate-300">Overview & balance</p>
                                </div>
                                <i class="fa-solid fa-chevron-right text-primary-400 dark:text-slate-400 text-xs"></i>
                            </a>
                            
                            <a href="accounthistory" class="flex items-center space-x-4 p-3 rounded-2xl hover:bg-gray-50 dark:hover:bg-gray-800 group transition-colors">
                                <div class="w-10 h-10 bg-blue-100 dark:bg-blue-900/30 rounded-xl flex items-center justify-center group-hover:bg-blue-200 dark:group-hover:bg-blue-800/50 transition-colors">
                                    <i class="fa-solid fa-chart-line text-blue-600 dark:text-blue-400"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="font-semibold text-gray-900 dark:text-white">Transactions</p>
                                    <p class="text-xs text-gray-500 dark:text-gray-400">View transaction history</p>
                                </div>
                                <i class="fa-solid fa-chevron-right text-gray-400 dark:text-gray-500 text-xs"></i>
                            </a>
                            
                            <a href="cards" class="flex items-center space-x-4 p-3 rounded-2xl hover:bg-gray-50 dark:hover:bg-gray-800 group transition-colors">
                                <div class="w-10 h-10 bg-purple-100 dark:bg-purple-900/30 rounded-xl flex items-center justify-center group-hover:bg-purple-200 dark:group-hover:bg-purple-800/50 transition-colors">
                                    <i class="fa-solid fa-credit-card text-purple-600 dark:text-purple-400"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="font-semibold text-gray-900 dark:text-white">Cards</p>
                                    <p class="text-xs text-gray-500 dark:text-gray-400">Manage your cards</p>
                                </div>
                                <i class="fa-solid fa-chevron-right text-gray-400 dark:text-gray-500 text-xs"></i>
                            </a>
                        </div>
                    </div>
                    
                    <!-- Transfers Section -->
                    <div class="mb-6">
                        <h4 class="text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider mb-3">Transfers</h4>
                        <div class="space-y-1">
                            <a href="localtransfer" class="flex items-center space-x-4 p-3 rounded-2xl hover:bg-gray-50 dark:hover:bg-gray-800 group transition-colors">
                                <div class="w-10 h-10 bg-orange-100 dark:bg-orange-900/30 rounded-xl flex items-center justify-center group-hover:bg-orange-200 dark:group-hover:bg-orange-800/50 transition-colors">
                                    <i class="fa-solid fa-paper-plane text-orange-600 dark:text-orange-400"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="font-semibold text-gray-900 dark:text-white">Local Transfer</p>
                                    <p class="text-xs text-gray-500 dark:text-gray-400">Send to local accounts</p>
                                </div>
                                <i class="fa-solid fa-chevron-right text-gray-400 dark:text-gray-500 text-xs"></i>
                            </a>
                            
                            <a href="internationaltransfer" class="flex items-center space-x-4 p-3 rounded-2xl hover:bg-gray-50 dark:hover:bg-gray-800 group transition-colors">
                                <div class="w-10 h-10 bg-indigo-100 dark:bg-indigo-900/30 rounded-xl flex items-center justify-center group-hover:bg-indigo-200 dark:group-hover:bg-indigo-800/50 transition-colors">
                                    <i class="fa-solid fa-globe text-indigo-600 dark:text-indigo-400"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="font-semibold text-gray-900 dark:text-white">International</p>
                                    <p class="text-xs text-gray-500 dark:text-gray-400">Global transfers</p>
                                </div>
                                <i class="fa-solid fa-chevron-right text-gray-400 dark:text-gray-500 text-xs"></i>
                            </a>
                            
                            <a href="deposits" class="flex items-center space-x-4 p-3 rounded-2xl hover:bg-gray-50 dark:hover:bg-gray-800 group transition-colors">
                                <div class="w-10 h-10 bg-green-100 dark:bg-green-900/30 rounded-xl flex items-center justify-center group-hover:bg-green-200 dark:group-hover:bg-green-800/50 transition-colors">
                                    <i class="fa-solid fa-plus text-green-600 dark:text-green-400"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="font-semibold text-gray-900 dark:text-white">Deposit</p>
                                    <p class="text-xs text-gray-500 dark:text-gray-400">Add funds to account</p>
                                </div>
                                <i class="fa-solid fa-chevron-right text-gray-400 dark:text-gray-500 text-xs"></i>
                            </a>
                            
                            <a href="swap" class="flex items-center space-x-4 p-3 rounded-2xl hover:bg-gray-50 dark:hover:bg-gray-800 group transition-colors">
                                <div class="w-10 h-10 bg-yellow-100 dark:bg-yellow-900/30 rounded-xl flex items-center justify-center group-hover:bg-yellow-200 dark:group-hover:bg-yellow-800/50 transition-colors">
                                    <i class="fa-solid fa-arrows-rotate text-yellow-600 dark:text-yellow-400"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="font-semibold text-gray-900 dark:text-white">Currency Swap</p>
                                    <p class="text-xs text-gray-500 dark:text-gray-400">Exchange currencies</p>
                                </div>
                                <i class="fa-solid fa-chevron-right text-gray-400 dark:text-gray-500 text-xs"></i>
                            </a>
                        </div>
                    </div>
                    
                    <!-- Services Section -->
                    <div class="mb-6">
                        <h4 class="text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider mb-3">Services</h4>
                        <div class="space-y-1">
                            <a href="loan" class="flex items-center space-x-4 p-3 rounded-2xl hover:bg-gray-50 dark:hover:bg-gray-800 group transition-colors">
                                <div class="w-10 h-10 bg-blue-100 dark:bg-blue-900/30 rounded-xl flex items-center justify-center group-hover:bg-blue-200 dark:group-hover:bg-blue-800/50 transition-colors">
                                    <i class="fa-solid fa-landmark text-blue-600 dark:text-blue-400"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="font-semibold text-gray-900 dark:text-white">Loans</p>
                                    <p class="text-xs text-gray-500 dark:text-gray-400">Apply for loans</p>
                                </div>
                                <i class="fa-solid fa-chevron-right text-gray-400 dark:text-gray-500 text-xs"></i>
                            </a>
                            
                            <a href="track" class="flex items-center space-x-4 p-3 rounded-2xl hover:bg-gray-50 dark:hover:bg-gray-800 group transition-colors">
                                <div class="w-10 h-10 bg-green-100 dark:bg-green-900/30 rounded-xl flex items-center justify-center group-hover:bg-green-200 dark:group-hover:bg-green-800/50 transition-colors">
                                    <i class="fa-solid fa-receipt text-green-600 dark:text-green-400"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="font-semibold text-gray-900 dark:text-white">Tax Refund</p>
                                    <p class="text-xs text-gray-500 dark:text-gray-400">IRS refund services</p>
                                </div>
                                <i class="fa-solid fa-chevron-right text-gray-400 dark:text-gray-500 text-xs"></i>
                            </a>
                            
                            <a href="grant-application" class="flex items-center space-x-4 p-3 rounded-2xl hover:bg-gray-50 dark:hover:bg-gray-800 group transition-colors">
                                <div class="w-10 h-10 bg-purple-100 dark:bg-purple-900/30 rounded-xl flex items-center justify-center group-hover:bg-purple-200 dark:group-hover:bg-purple-800/50 transition-colors">
                                    <i class="fa-solid fa-hand-holding-dollar text-purple-600 dark:text-purple-400"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="font-semibold text-gray-900 dark:text-white">Grants</p>
                                    <p class="text-xs text-gray-500 dark:text-gray-400">Apply for grants</p>
                                </div>
                                <i class="fa-solid fa-chevron-right text-gray-400 dark:text-gray-500 text-xs"></i>
                            </a>
                        </div>
                    </div>

                    <!-- Account Section -->
                    <div class="mb-4">
                        <h4 class="text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider mb-3">Account</h4>
                        <div class="space-y-1">
                            <button @click="showBankAccount = true" class="flex items-center space-x-4 p-3 rounded-2xl hover:bg-gray-50 dark:hover:bg-gray-800 group transition-colors w-full text-left">
                                <div class="w-10 h-10 bg-blue-100 dark:bg-blue-900/30 rounded-xl flex items-center justify-center group-hover:bg-blue-200 dark:group-hover:bg-blue-800/50 transition-colors">
                                    <i class="fa-solid fa-building-columns text-blue-600 dark:text-blue-400"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="font-semibold text-gray-900 dark:text-white">Bank Details</p>
                                    <p class="text-xs text-gray-500 dark:text-gray-400">View account info</p>
                                </div>
                                <i class="fa-solid fa-chevron-right text-gray-400 dark:text-gray-500 text-xs"></i>
                            </button>
                            
                            <a href="account-settings" class="flex items-center space-x-4 p-3 rounded-2xl hover:bg-gray-50 dark:hover:bg-gray-800 group transition-colors">
                                <div class="w-10 h-10 bg-teal-100 dark:bg-teal-900/30 rounded-xl flex items-center justify-center group-hover:bg-teal-200 dark:group-hover:bg-teal-800/50 transition-colors">
                                    <i class="fa-solid fa-gear text-teal-600 dark:text-teal-400"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="font-semibold text-gray-900 dark:text-white">Settings</p>
                                    <p class="text-xs text-gray-500 dark:text-gray-400">Manage your account</p>
                                </div>
                                <i class="fa-solid fa-chevron-right text-gray-400 dark:text-gray-500 text-xs"></i>
                            </a>
                            
                            <a href="support" class="flex items-center space-x-4 p-3 rounded-2xl hover:bg-gray-50 dark:hover:bg-gray-800 group transition-colors">
                                <div class="w-10 h-10 bg-pink-100 dark:bg-pink-900/30 rounded-xl flex items-center justify-center group-hover:bg-pink-200 dark:group-hover:bg-pink-800/50 transition-colors">
                                    <i class="fa-solid fa-headset text-pink-600 dark:text-pink-400"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="font-semibold text-gray-900 dark:text-white">Support</p>
                                    <p class="text-xs text-gray-500 dark:text-gray-400">Get assistance</p>
                                </div>
                                <i class="fa-solid fa-chevron-right text-gray-400 dark:text-gray-500 text-xs"></i>
                            </a>
                            
                            <form method="POST" action="logout">
    <input type="hidden" name="_token" value="7Y8Vjj7Q0b4avHu1m1nlxIaJ65D9nEHYo7NLXHO9">    <button type="submit" class="w-full text-left flex items-center space-x-4 p-3 rounded-2xl hover:bg-red-50 dark:hover:bg-red-900/20 group transition-colors">
        <div class="w-10 h-10 bg-red-100 dark:bg-red-900/30 rounded-xl flex items-center justify-center group-hover:bg-red-200 dark:group-hover:bg-red-800/50 transition-colors">
            <i class="fa-solid fa-right-from-bracket text-red-600 dark:text-red-400"></i>
        </div>
        <div class="flex-1">
            <p class="font-semibold text-red-900 dark:text-red-400">Sign Out</p>
            <p class="text-xs text-red-600 dark:text-red-500">Logout from account</p>
        </div>
        <i class="fa-solid fa-chevron-right text-red-400 dark:text-red-500 text-xs"></i>
    </button>
</form>

                        </div>
                    </div>
                </div>
                
                <!-- Footer -->
                <div class="px-6 py-4 bg-gray-50 dark:bg-gray-800 border-t border-gray-100 dark:border-gray-700">
                    <div class="flex items-center justify-center space-x-6">
                        <div class="text-center">
                            <div class="w-8 h-8 bg-primary-100 dark:bg-primary-900/30 rounded-full flex items-center justify-center mx-auto mb-1">
                                <i class="fa-solid fa-shield-alt text-primary-600 dark:text-primary-400 text-xs"></i>
                            </div>
                            <p class="text-xs text-gray-600 dark:text-gray-300 font-medium">Secure</p>
                        </div>
                        <div class="text-center">
                            <div class="w-8 h-8 bg-green-100 dark:bg-green-900/30 rounded-full flex items-center justify-center mx-auto mb-1">
                                <i class="fa-solid fa-clock text-green-600 dark:text-green-400 text-xs"></i>
                            </div>
                            <p class="text-xs text-gray-600 dark:text-gray-300 font-medium">24/7</p>
                        </div>
                        <div class="text-center">
                            <div class="w-8 h-8 bg-blue-100 dark:bg-blue-900/30 rounded-full flex items-center justify-center mx-auto mb-1">
                                <i class="fa-solid fa-phone text-blue-600 dark:text-blue-400 text-xs"></i>
                            </div>
                            <p class="text-xs text-gray-600 dark:text-gray-300 font-medium">Support</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

    
    <div class="hidden lg:block py-6 mb-6">
    <!-- Desktop Stats Cards -->
    <div class="px-6 mb-6">
        <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4">
                                    <div class="bg-white dark:bg-gray-800 rounded-xl p-4 shadow-sm dark:shadow-gray-900/25 border border-gray-100 dark:border-gray-700">
                <div class="flex items-center justify-between mb-3">
                    <div class="w-10 h-10 bg-blue-500 rounded-lg flex items-center justify-center">
                        <i class="fa-solid fa-credit-card text-white text-sm"></i>
                    </div>
                    <span class="text-xs font-medium text-gray-500 dark:text-gray-400">Available</span>
                </div>
                <h3 class="text-lg font-bold text-gray-900 dark:text-white mb-1"><?php echo $_curr_sym ?><?php echo number_format(getUserDetails('acc_limit', $_SESSION['email']), 2); ?></h3>
                <p class="text-gray-600 dark:text-gray-300 text-xs">Account Limit</p>
            </div>
                        <div class="bg-white dark:bg-gray-800 rounded-xl p-4 shadow-sm dark:shadow-gray-900/25 border border-gray-100 dark:border-gray-700">
                <div class="flex items-center justify-between mb-3">
                    <div class="w-10 h-10 bg-green-500 rounded-lg flex items-center justify-center">
                        <i class="fa-solid fa-arrow-down text-white text-sm"></i>
                    </div>
                    <span class="text-xs font-medium text-gray-500 dark:text-gray-400">This Month</span>
                </div>
                <h3 class="text-lg font-bold text-gray-900 dark:text-white mb-1"><?php echo $_curr_sym . number_format($_monthly_deposits, 2); ?></h3>
                <p class="text-gray-600 dark:text-gray-300 text-xs">Monthly Deposits</p>
            </div>
                        <div class="bg-white dark:bg-gray-800 rounded-xl p-4 shadow-sm dark:shadow-gray-900/25 border border-gray-100 dark:border-gray-700">
                <div class="flex items-center justify-between mb-3">
                    <div class="w-10 h-10 bg-red-500 rounded-lg flex items-center justify-center">
                        <i class="fa-solid fa-arrow-up text-white text-sm"></i>
                    </div>
                    <span class="text-xs font-medium text-gray-500 dark:text-gray-400">This Month</span>
                </div>
                <h3 class="text-lg font-bold text-gray-900 dark:text-white mb-1"><?php echo $_curr_sym . number_format($_monthly_expenses, 2); ?></h3>
                <p class="text-gray-600 dark:text-gray-300 text-xs">Monthly Expenses</p>
            </div>
                        <div class="bg-white dark:bg-gray-800 rounded-xl p-4 shadow-sm dark:shadow-gray-900/25 border border-gray-100 dark:border-gray-700">
                <div class="flex items-center justify-between mb-3">
                    <div class="w-10 h-10 bg-accent-500 rounded-lg flex items-center justify-center">
                        <i class="fa-solid fa-chart-line text-white text-sm"></i>
                    </div>
                    <span class="text-xs font-medium text-gray-500 dark:text-gray-400">All Time</span>
                </div>
                <h3 class="text-lg font-bold text-gray-900 dark:text-white mb-1"><?php echo $_curr_sym . number_format($_total_volume, 2); ?></h3>
                <p class="text-gray-600 dark:text-gray-300 text-xs">Total Volume</p>
            </div>
            <div class="bg-white dark:bg-gray-800 rounded-xl p-4 shadow-sm dark:shadow-gray-900/25 border border-gray-100 dark:border-gray-700">
                <div class="flex items-center justify-between mb-3">
                    <div class="w-10 h-10 bg-yellow-500 rounded-lg flex items-center justify-center">
                        <i class="fa-solid fa-clock text-white text-sm"></i>
                    </div>
                    <span class="text-xs font-medium text-gray-500 dark:text-gray-400">All Time</span>
                </div>
                <h3 class="text-lg font-bold text-gray-900 dark:text-white mb-1"><?php echo $_curr_sym . number_format($_pending_amount, 2); ?></h3>
                <p class="text-gray-600 dark:text-gray-300 text-xs">Pending Transactions</p>
            </div>
            <div class="bg-white dark:bg-gray-800 rounded-xl p-4 shadow-sm dark:shadow-gray-900/25 border border-gray-100 dark:border-gray-700">
                <div class="flex items-center justify-between mb-3">
                    <div class="w-10 h-10 <?php echo $_net >= 0 ? 'bg-emerald-500' : 'bg-red-500'; ?> rounded-lg flex items-center justify-center">
                        <i class="fa-solid <?php echo $_net >= 0 ? 'fa-arrow-up' : 'fa-arrow-down'; ?> text-white text-sm"></i>
                    </div>
                    <span class="text-xs font-medium text-gray-500 dark:text-gray-400">This Month</span>
                </div>
                <h3 class="text-lg font-bold <?php echo $_net >= 0 ? 'text-emerald-600 dark:text-emerald-400' : 'text-red-600 dark:text-red-400'; ?> mb-1">
                    <?php echo ($_net >= 0 ? '+' : '') . $_curr_sym . number_format($_net, 2); ?>
                </h3>
                <p class="text-gray-600 dark:text-gray-300 text-xs">Net (Deposits − Expenses)</p>
            </div>
                    </div>
    </div>

    <!-- Desktop Main Content -->
    <div class="px-6 grid grid-cols-1 lg:grid-cols-3 gap-6">
        <!-- Left Column -->
        <div class="lg:col-span-2 space-y-6">
            <!-- Enhanced Desktop Balance Card -->
            <div class="bg-gradient-to-br from-primary-600 via-primary-500 to-primary-700 dark:from-primary-700 dark:via-primary-600 dark:to-primary-800 rounded-2xl p-6 text-white shadow-xl dark:shadow-2xl dark:shadow-primary-900/50 relative overflow-hidden z-10">
                <!-- Background Pattern -->
                <div class="absolute inset-0 opacity-10">
                    <div class="absolute top-6 right-6 w-32 h-32 bg-white rounded-full -translate-y-8 translate-x-8"></div>
                    <div class="absolute bottom-6 left-6 w-24 h-24 bg-white rounded-full translate-y-6 -translate-x-6"></div>
                    <div class="absolute top-1/2 left-1/2 w-20 h-20 bg-white rounded-full -translate-x-10 -translate-y-10"></div>
                </div>
                
                <div class="relative z-10">
                    <!-- Top Row: Bank Info and Account Number -->
                    <div class="flex justify-between items-start mb-6">
                        <div>
                            <div class="flex items-center space-x-2 mb-1">
                                <div class="w-6 h-6 bg-white/20 rounded-lg flex items-center justify-center">
                                    <i class="fa-solid fa-university text-white text-xs"></i>
                                </div>
                                <p class="text-white/90 text-base font-semibold"><?php echo getSiteConfig('sitename'); ?> Bank</p>
                            </div>
                            <p class="text-white/70 text-xs">Primary Account</p>
                        </div>
                        <div class="text-right bg-white/10 dark:bg-white/20 backdrop-blur-sm rounded-lg px-3 py-2">
                            <p class="text-white/70 dark:text-white/80 text-xs uppercase tracking-wide mb-1">Account Number</p>
                            <p class="text-white font-mono text-sm">•••••• <?php echo substr(getUserDetails('acc_no', $_SESSION['email']), -4); ?></p>
                        </div>
                    </div>

                    <!-- Middle Row: Account Holder and Balances -->
                    <div class="grid grid-cols-3 gap-6 mb-6">
                        <!-- Account Holder Info -->
                        <div>
                            <p class="text-white/70 text-xs mb-1">Account Holder</p>
                            <p class="text-white text-base font-semibold mb-3"><?php echo htmlspecialchars(getUserDetails('fullname', $_SESSION['email']) ?: ''); ?></p>
                            
                            <!-- Account Status -->
                            <div class="space-y-1">
                                <div class="flex items-center space-x-2">
                                    <div class="w-2 h-2 bg-green-400 rounded-full"></div>
                                    <span class="text-white/80 text-xs">Account Active</span>
                                </div>
                                <div class="flex items-center space-x-2">
                                                                            <i class="fa-solid fa-shield-exclamation text-green-400 text-xs"></i>
                                        <span class="text-white/80 text-xs">Verified</span>
                                                                    </div>
                            </div>
                        </div>

                        <!-- Fiat Balance Display -->
                        <div class="text-center">
                            <p class="text-white/70 text-xs mb-1">Fiat Balance</p>
                            <div class="flex items-center justify-center space-x-2 mb-1">
                                <div class="text-center">
                                    <p class="text-2xl font-bold leading-none" x-show="balanceVisible" x-transition>
                                        <?php echo $_curr_sym . number_format(getUserDetails('balance', $_SESSION['email']), 2); ?>
                                    </p>
                                    <p class="text-2xl font-bold leading-none" x-show="!balanceVisible" x-transition>
                                        <?php echo $_curr_sym; ?> ••••••
                                    </p>
                                </div>
                                <button @click="toggleBalance()" class="text-white/60 hover:text-white transition-colors p-1">
                                    <i x-show="balanceVisible" class="fa-solid fa-eye-slash text-sm"></i>
                                    <i x-show="!balanceVisible" class="fa-solid fa-eye text-sm"></i>
                                </button>
                            </div>
                            <p class="text-white/60 text-xs"><?php echo htmlspecialchars($_SESSION['currency'] ?? 'USD'); ?> Balance</p>
                        </div>

                        <!-- Crypto Balance Display -->
                        <div class="text-center">
                            <p class="text-white/70 text-xs mb-1">Bitcoin Balance</p>
                            <div class="mb-1">
                                <p class="text-lg font-bold leading-none" x-show="balanceVisible" x-transition>
                                    <?php echo number_format($_btc_balance, 8); ?> BTC
                                </p>
                                <p class="text-lg font-bold leading-none" x-show="!balanceVisible" x-transition>
                                    ••••••• BTC
                                </p>
                                <p class="text-white/60 text-xs mt-1" x-show="balanceVisible" x-transition>
                                    ≈ <?php echo $_curr_sym . number_format($_btc_fiat_value, 2); ?>
                                </p>
                            </div>
                            <div class="flex items-center justify-center space-x-1">
                                <div class="w-1.5 h-1.5 bg-orange-400 rounded-full"></div>
                                <span class="text-white/60 text-xs">1 BTC = <?php echo $_curr_sym . ($_btc_price ? number_format($_btc_price, 2) : '—'); ?></span>
                            </div>
                        </div>
                    </div>

                    <!-- Bottom Row: Action Buttons -->
                    <div class="flex justify-between items-center">
                        <!-- Left: Total Portfolio Value -->
                        <div class="bg-white/10 dark:bg-white/20 backdrop-blur-sm rounded-lg p-3">
                            <p class="text-white/60 dark:text-white/70 text-xs mb-1">Total Portfolio</p>
                            <p class="text-white text-lg font-bold" x-show="balanceVisible" x-transition>
                                <?php echo $_curr_sym . number_format(getUserDetails('balance', $_SESSION['email']), 2); ?>
                            </p>
                            <p class="text-white text-lg font-bold" x-show="!balanceVisible" x-transition>
                                <?php echo $_curr_sym; ?> ••••••
                            </p>
                        </div>

                        <!-- Right: Action Buttons -->
                        <div class="flex space-x-3">
                            <button @click="showSendMoney = true" class="bg-white/20 dark:bg-white/30 backdrop-blur-sm px-6 py-3 rounded-lg text-white font-semibold hover:bg-white/30 dark:hover:bg-white/40 transition-all duration-200 flex items-center space-x-2">
                                <i class="fa-solid fa-paper-plane text-sm"></i>
                                <span class="text-sm">Send Money</span>
                            </button>
                            <button onclick="window.location.href='deposits'" class="bg-white dark:bg-gray-100 text-primary-600 dark:text-primary-700 px-6 py-3 rounded-lg font-semibold hover:bg-gray-100 dark:hover:bg-gray-200 transition-all duration-200 flex items-center space-x-2 shadow-lg dark:shadow-gray-900/25">
                                <i class="fa-solid fa-plus text-sm"></i>
                                <span class="text-sm">Add Money</span>
                            </button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Quick Actions -->
            <div class="bg-white dark:bg-gray-800 rounded-xl p-4 shadow-sm dark:shadow-gray-900/25 border border-gray-100 dark:border-gray-700">
                <h3 class="text-base font-semibold text-gray-900 dark:text-white mb-4">Quick Actions</h3>
                <div class="grid grid-cols-2 md:grid-cols-4 gap-3">
                                                                                        <a href="localtransfer" class="flex flex-col items-center p-3 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
                            <div class="w-10 h-10 bg-blue-500 rounded-lg flex items-center justify-center mb-2">
                                <i class="fa-solid fa-exchange-alt text-white text-sm"></i>
                            </div>
                            <span class="text-xs font-medium text-gray-700 dark:text-gray-300">Transfer</span>
                        </a>
                                                                                            <a href="internationaltransfer" class="flex flex-col items-center p-3 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
                            <div class="w-10 h-10 bg-green-500 rounded-lg flex items-center justify-center mb-2">
                                <i class="fa-solid fa-file-invoice text-white text-sm"></i>
                            </div>
                            <span class="text-xs font-medium text-gray-700 dark:text-gray-300">Pay Bills</span>
                        </a>
                                                                                            <button @click="showReceiveModal = true" class="flex flex-col items-center p-3 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
                            <div class="w-10 h-10 bg-accent-500 rounded-lg flex items-center justify-center mb-2">
                                <i class="fa-solid fa-hand-holding-dollar text-white text-sm"></i>
                            </div>
                            <span class="text-xs font-medium text-gray-700 dark:text-gray-300">Request</span>
                        </button>
                                                                                            <button @click="showBankAccount = true" class="flex flex-col items-center p-3 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
                            <div class="w-10 h-10 bg-primary-500 rounded-lg flex items-center justify-center mb-2">
                                <i class="fa-solid fa-building-columns text-white text-sm"></i>
                            </div>
                            <span class="text-xs font-medium text-gray-700 dark:text-gray-300">Bank Details</span>
                        </button>
                                                            </div>
            </div>

            <!-- Quick Transfer Section -->
            <div class="bg-white dark:bg-gray-800 rounded-xl p-4 shadow-sm dark:shadow-gray-900/25 border border-gray-100 dark:border-gray-700" x-data="dashboardQuickTransfer()" x-init="loadBeneficiaries()">
                <div class="flex justify-between items-center mb-4">
                    <h3 class="text-base font-semibold text-gray-900 dark:text-white">Quick Transfer</h3>
                    <a href="beneficiaries" class="text-xs text-primary-600 dark:text-primary-400 font-medium flex items-center hover:text-primary-700 dark:hover:text-primary-300 transition-colors">
                        View All
                        <i class="fa-solid fa-chevron-right ml-1 text-xs"></i>
                    </a>
                </div>
                
                <div class="flex space-x-3 overflow-x-auto pb-2" x-show="!loading">
                    <!-- Add New Beneficiary -->
                    <a href="localtransfer" class="flex-shrink-0 flex flex-col items-center justify-center group">
                        <div class="w-16 h-16 rounded-full border-2 border-dashed border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800 flex items-center justify-center mb-2 group-hover:bg-gray-100 dark:group-hover:bg-gray-700 group-hover:border-primary-400 dark:group-hover:border-primary-500 transition-all duration-200">
                            <i class="fa-solid fa-plus text-gray-400 dark:text-gray-500 text-lg group-hover:text-primary-500 dark:group-hover:text-primary-400 transition-colors"></i>
                        </div>
                        <span class="text-xs text-gray-500 dark:text-gray-400 text-center group-hover:text-primary-600 dark:group-hover:text-primary-400 transition-colors">Add New</span>
                    </a>

                    <!-- Beneficiaries List -->
                    <template x-for="beneficiary in beneficiaries.slice(0, 8)" :key="beneficiary.id">
                        <div class="flex-shrink-0 flex flex-col items-center justify-center group relative">
                            <button 
                                @click="selectBeneficiary(beneficiary)"
                                class="relative w-16 h-16 rounded-full flex items-center justify-center mb-2 border-2 border-white dark:border-gray-800 shadow-sm dark:shadow-gray-900/25 hover:scale-105 transition-all duration-200"
                                :class="beneficiary.color"
                            >
                                <span class="text-white font-semibold text-base" x-text="beneficiary.initials"></span>
                                
                                <!-- Favorite Star -->
                                <div 
                                    x-show="beneficiary.is_favorite" 
                                    class="absolute -top-1 -right-1 w-5 h-5 bg-yellow-400 rounded-full flex items-center justify-center"
                                >
                                    <i class="fa-solid fa-star text-white text-xs"></i>
                                </div>
                            </button>
                            
                            <span class="text-xs text-gray-700 dark:text-gray-300 text-center max-w-16 truncate" x-text="beneficiary.name"></span>
                        </div>
                    </template>

                    <!-- Loading State -->
                    <template x-if="loading">
                        <div class="flex space-x-3">
                            <template x-for="i in 6">
                                <div class="flex-shrink-0 flex flex-col items-center justify-center">
                                    <div class="w-16 h-16 rounded-full bg-gray-200 dark:bg-gray-700 animate-pulse mb-2"></div>
                                    <div class="w-12 h-2 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"></div>
                                </div>
                            </template>
                        </div>
                    </template>

                    <!-- Empty State -->
                    <template x-if="!loading && beneficiaries.length === 0">
                        <div class="flex-shrink-0 flex flex-col items-center justify-center py-6 px-8">
                            <div class="w-16 h-16 rounded-full bg-gray-100 dark:bg-gray-800 flex items-center justify-center mb-3">
                                <i class="fa-solid fa-users text-gray-400 dark:text-gray-500 text-xl"></i>
                            </div>
                            <p class="text-sm text-gray-500 dark:text-gray-400 text-center">No saved beneficiaries</p>
                            <p class="text-xs text-gray-400 dark:text-gray-500 text-center mt-1">Add one to get started</p>
                        </div>
                    </template>
                </div>
            </div>

            <!-- Desktop Cards Section -->
            <div class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 overflow-hidden border border-white/20 dark:border-gray-700/50">
    <!-- Header -->
    <div class="px-4 py-2 bg-gradient-to-r from-primary-50/80 to-primary-100/50 dark:from-gray-900/80 dark:to-gray-800/50 border-b border-primary-100/50 dark:border-gray-700/50">
        <div class="flex items-center justify-between">
            <div class="flex items-center">
                <div class="w-6 h-6 bg-primary-500 rounded-lg flex items-center justify-center mr-2">
                    <i class="fa-solid fa-credit-card text-white text-xs"></i>
                </div>
                <h3 class="text-sm font-bold text-primary-900 dark:text-primary-100">Your Active Cards</h3>
            </div>
                    </div>
    </div>
    
    <!-- Content -->
    <div class="p-3">
                    <!-- Empty State -->
            <div class="py-6 flex flex-col items-center justify-center text-center">
                <div class="w-12 h-12 bg-primary-100 dark:bg-gray-700/50 rounded-full flex items-center justify-center mb-3">
                    <i class="fa-solid fa-credit-card text-primary-500 dark:text-primary-400 text-lg"></i>
                </div>
                <h3 class="text-sm font-semibold text-primary-900 dark:text-primary-100 mb-1">No active cards</h3>
                <p class="text-xs text-primary-700 dark:text-primary-300 mb-3 max-w-xs">
                    Apply for a virtual card to get started with secure online payments.
                </p>
                <a href="apply" class="inline-flex items-center px-3 py-1.5 bg-gradient-to-r from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 text-white text-xs font-medium rounded-lg shadow-sm transition-all duration-200 transform hover:scale-105">
                    <i class="fa-solid fa-plus text-xs mr-1.5"></i>
                    Apply for Card
                </a>
            </div>
            </div>
</div>        </div>

        <!-- Right Column is in separate partial -->

    
    <!-- Right Column -->
        <div class="space-y-4">
            <!-- Recent Transactions -->
            <div class="bg-white dark:bg-gray-800 rounded-xl p-4 shadow-sm dark:shadow-gray-900/25 border border-gray-100 dark:border-gray-700">
                <div class="flex items-center justify-between mb-4">
                    <h3 class="text-base font-semibold text-gray-900 dark:text-white">Recent Transactions</h3>
                    <a href="accounthistory" class="text-xs text-primary-600 dark:text-primary-400 font-medium hover:text-primary-700 dark:hover:text-primary-300 transition-colors">View All</a>
                </div>
                
                <div class="space-y-3">
                <?php if (empty($_recent_txns)): ?>
                    <div class="text-center py-6">
                        <i class="fa-solid fa-receipt text-gray-300 dark:text-gray-600 text-2xl mb-2"></i>
                        <p class="text-gray-500 dark:text-gray-400 text-xs">No recent transactions</p>
                    </div>
                <?php else: foreach ($_recent_txns as $_txn):
                    $_is_deposit  = strtolower($_txn['transaction_type']) === 'credit';
                    $_is_success  = $_txn['status'] === 'Success';
                    $_icon        = $_is_deposit ? 'fa-arrow-down' : 'fa-arrow-up';
                    $_icon_color  = $_is_deposit ? 'bg-green-100 dark:bg-green-900/40 text-green-600 dark:text-green-400'
                                                 : 'bg-red-100 dark:bg-red-900/40 text-red-500 dark:text-red-400';
                    $_amt_color   = $_is_deposit ? 'text-green-600 dark:text-green-400' : 'text-red-500 dark:text-red-400';
                    $_amt_prefix  = $_is_deposit ? '+' : '-';
                    $_status_cls  = $_is_success
                        ? 'bg-green-100 dark:bg-green-900/40 text-green-700 dark:text-green-300'
                        : 'bg-yellow-100 dark:bg-yellow-900/40 text-yellow-700 dark:text-yellow-300';
                    $_is_crypto   = (($_txn['other_bank_name'] ?? '') === 'Cryptocurrency');
                    $_amt_display = $_is_crypto
                        ? number_format((float)$_txn['amount'], 8) . ' BTC'
                        : $_curr_sym . number_format((float)$_txn['amount'], 2);
                ?>
                    <div class="flex items-center space-x-3 p-2 rounded-xl hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors">
                        <div class="w-9 h-9 rounded-full <?php echo $_icon_color; ?> flex items-center justify-center flex-shrink-0">
                            <i class="fa-solid <?php echo $_icon; ?> text-xs"></i>
                        </div>
                        <div class="flex-1 min-w-0">
                            <p class="text-sm font-medium text-gray-900 dark:text-white truncate">
                                <?php echo htmlspecialchars($_txn['transaction_type']); ?>
                            </p>
                            <p class="text-xs text-gray-500 dark:text-gray-400 truncate">
                                <?php echo htmlspecialchars($_txn['transaction_details'] ?? '—'); ?>
                                &bull; <?php echo date('M d, H:i', strtotime($_txn['date_added'])); ?>
                            </p>
                        </div>
                        <div class="text-right flex-shrink-0">
                            <p class="text-sm font-bold <?php echo $_amt_color; ?>">
                                <?php echo $_amt_prefix . $_amt_display; ?>
                            </p>
                            <span class="text-xs px-1.5 py-0.5 rounded-full font-medium <?php echo $_status_cls; ?>">
                                <?php echo htmlspecialchars($_txn['status']); ?>
                            </span>
                        </div>
                    </div>
                <?php endforeach; endif; ?>
                </div>
            </div>

            <!-- Account Stats -->
            <div class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 overflow-hidden border border-white/20 dark:border-gray-700/50">
    <!-- Header -->
    <div class="px-4 py-2 bg-gradient-to-r from-slate-50/80 to-slate-100/50 dark:from-slate-800/50 dark:to-slate-700/50 border-b border-slate-100/50 dark:border-slate-600/70">
        <div class="flex items-center">
            <div class="w-6 h-6 bg-slate-500 dark:bg-slate-600 rounded-lg flex items-center justify-center mr-2">
                <i class="fa-solid fa-chart-line text-white text-xs"></i>
            </div>
            <h3 class="text-sm font-bold text-slate-900 dark:text-slate-50">Account Statistics</h3>
        </div>
    </div>
    
    <!-- Stats Content -->
    <div class="p-3 space-y-2">
                
                <div class="group p-2 bg-gradient-to-br from-gray-50/50 to-white/50 dark:from-gray-700/50 dark:to-gray-800/50 hover:from-primary-50/50 hover:to-primary-100/30 dark:hover:from-primary-900/30 dark:hover:to-primary-800/30 rounded-xl border border-gray-100/50 dark:border-gray-600/50 hover:border-primary-200/50 dark:hover:border-primary-700/50 transition-all duration-300 hover:shadow-md hover:shadow-primary-500/10 dark:hover:shadow-primary-900/20">
            <div class="flex items-center">
                <!-- Icon -->
                <div class="relative">
                    <div class="w-8 h-8 bg-gradient-to-br from-primary-500 to-primary-600 rounded-lg flex items-center justify-center shadow-md shadow-primary-500/25 dark:shadow-primary-900/50 group-hover:scale-110 transition-transform duration-300">
                        <i class="fa-solid fa-gauge-high text-white text-xs"></i>
                    </div>
                    <div class="absolute -top-0.5 -right-0.5 w-2 h-2 bg-white dark:bg-gray-800 rounded-full border border-primary-500 opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div>
                </div>
                
                <!-- Content -->
                <div class="flex-1 min-w-0 ml-3">
                    <div class="flex items-center justify-between mb-0.5">
                        <p class="text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider">Transaction Limit</p>
                        <div class="w-1.5 h-1.5 bg-primary-500 rounded-full opacity-60 group-hover:opacity-100 transition-opacity duration-300"></div>
                    </div>
                    <p class="text-sm font-bold text-gray-900 dark:text-white truncate group-hover:text-primary-700 dark:group-hover:text-primary-300 transition-colors duration-300"><?php echo $_curr_sym . number_format($_acc_limit, 2); ?></p>
                    <p class="text-xs text-gray-500 dark:text-gray-400 group-hover:text-primary-600 dark:group-hover:text-primary-400 transition-colors duration-300">Daily limit available</p>
                </div>
            </div>
            
            <!-- Progress indicator -->
            <div class="mt-2 h-0.5 bg-gray-200 dark:bg-gray-600 rounded-full overflow-hidden">
                <div class="h-full bg-gradient-to-r from-primary-500 to-primary-600 rounded-full transform scale-x-0 group-hover:scale-x-100 transition-transform duration-500 origin-left"></div>
            </div>
        </div>
                <div class="group p-2 bg-gradient-to-br from-gray-50/50 to-white/50 dark:from-gray-700/50 dark:to-gray-800/50 hover:from-yellow-50/50 hover:to-yellow-100/30 dark:hover:from-yellow-900/30 dark:hover:to-yellow-800/30 rounded-xl border border-gray-100/50 dark:border-gray-600/50 hover:border-yellow-200/50 dark:hover:border-yellow-700/50 transition-all duration-300 hover:shadow-md hover:shadow-yellow-500/10 dark:hover:shadow-yellow-900/20">
            <div class="flex items-center">
                <!-- Icon -->
                <div class="relative">
                    <div class="w-8 h-8 bg-gradient-to-br from-yellow-400 to-yellow-500 rounded-lg flex items-center justify-center shadow-md shadow-yellow-500/25 dark:shadow-yellow-900/50 group-hover:scale-110 transition-transform duration-300">
                        <i class="fa-solid fa-hourglass-half text-white text-xs"></i>
                    </div>
                    <div class="absolute -top-0.5 -right-0.5 w-2 h-2 bg-white dark:bg-gray-800 rounded-full border border-yellow-500 opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div>
                </div>
                
                <!-- Content -->
                <div class="flex-1 min-w-0 ml-3">
                    <div class="flex items-center justify-between mb-0.5">
                        <p class="text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider">Pending Transactions</p>
                        <div class="w-1.5 h-1.5 bg-yellow-500 rounded-full opacity-60 group-hover:opacity-100 transition-opacity duration-300"></div>
                    </div>
                    <p class="text-sm font-bold text-gray-900 dark:text-white truncate group-hover:text-yellow-700 dark:group-hover:text-yellow-300 transition-colors duration-300"><?php echo $_curr_sym . number_format($_pending_amount, 2); ?></p>
                    <p class="text-xs text-gray-500 dark:text-gray-400 group-hover:text-yellow-600 dark:group-hover:text-yellow-400 transition-colors duration-300">Awaiting processing</p>
                </div>
            </div>
            
            <!-- Progress indicator -->
            <div class="mt-2 h-0.5 bg-gray-200 dark:bg-gray-600 rounded-full overflow-hidden">
                <div class="h-full bg-gradient-to-r from-yellow-400 to-yellow-500 rounded-full transform scale-x-0 group-hover:scale-x-100 transition-transform duration-500 origin-left"></div>
            </div>
        </div>
                <div class="group p-2 bg-gradient-to-br from-gray-50/50 to-white/50 dark:from-gray-700/50 dark:to-gray-800/50 hover:from-green-50/50 hover:to-green-100/30 dark:hover:from-green-900/30 dark:hover:to-green-800/30 rounded-xl border border-gray-100/50 dark:border-gray-600/50 hover:border-green-200/50 dark:hover:border-green-700/50 transition-all duration-300 hover:shadow-md hover:shadow-green-500/10 dark:hover:shadow-green-900/20">
            <div class="flex items-center">
                <!-- Icon -->
                <div class="relative">
                    <div class="w-8 h-8 bg-gradient-to-br from-green-500 to-green-600 rounded-lg flex items-center justify-center shadow-md shadow-green-500/25 dark:shadow-green-900/50 group-hover:scale-110 transition-transform duration-300">
                        <i class="fa-solid fa-chart-pie text-white text-xs"></i>
                    </div>
                    <div class="absolute -top-0.5 -right-0.5 w-2 h-2 bg-white dark:bg-gray-800 rounded-full border border-green-500 opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div>
                </div>
                
                <!-- Content -->
                <div class="flex-1 min-w-0 ml-3">
                    <div class="flex items-center justify-between mb-0.5">
                        <p class="text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider">Total Volume</p>
                        <div class="w-1.5 h-1.5 bg-green-500 rounded-full opacity-60 group-hover:opacity-100 transition-opacity duration-300"></div>
                    </div>
                    <p class="text-sm font-bold text-gray-900 dark:text-white truncate group-hover:text-green-700 dark:group-hover:text-green-300 transition-colors duration-300"><?php echo $_curr_sym . number_format($_total_volume, 2); ?></p>
                    <p class="text-xs text-gray-500 dark:text-gray-400 group-hover:text-green-600 dark:group-hover:text-green-400 transition-colors duration-300">All-time transactions</p>
                </div>
            </div>
            
            <!-- Progress indicator -->
            <div class="mt-2 h-0.5 bg-gray-200 dark:bg-gray-600 rounded-full overflow-hidden">
                <div class="h-full bg-gradient-to-r from-green-500 to-green-600 rounded-full transform scale-x-0 group-hover:scale-x-100 transition-transform duration-500 origin-left"></div>
            </div>
        </div>
            </div>
    
    <!-- Footer -->
    <div class="px-3 py-2 bg-gradient-to-r from-gray-50/50 to-white/50 dark:from-gray-700/50 dark:to-gray-800/50 border-t border-gray-100/50 dark:border-gray-600/50">
        <div class="flex items-center justify-center text-xs text-gray-500 dark:text-gray-400">
            <i class="fa-solid fa-clock mr-1 text-primary-500 text-xs"></i>
            <span>Updated in real-time</span>
        </div>
    </div>
</div>
 
            <!-- Help & Support -->
            <div class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg dark:shadow-gray-900/50 overflow-hidden border border-white/20 dark:border-gray-700/50 relative">
    <!-- Gradient Background -->
    <div class="absolute inset-0 bg-gradient-to-br from-primary-50/80 via-primary-100/50 to-primary-200/30 dark:from-gray-900/80 dark:via-gray-800/50 dark:to-gray-700/30"></div>
    
    <!-- Content -->
    <div class="relative p-4">
        <!-- Icon Section -->
        <div class="flex items-center justify-center mb-3">
            <div class="relative">
                <div class="h-10 w-10 rounded-2xl bg-gradient-to-br from-primary-500 to-primary-600 flex items-center justify-center shadow-lg shadow-primary-500/25 dark:shadow-primary-900/50">
                    <i class="fa-solid fa-headset text-sm text-white"></i>
                </div>
                <!-- Floating indicator -->
                <div class="absolute -top-0.5 -right-0.5 w-3 h-3 bg-green-500 rounded-full border border-white dark:border-gray-800 flex items-center justify-center">
                    <div class="w-1 h-1 bg-white rounded-full animate-pulse"></div>
                </div>
            </div>
        </div>
        
        <!-- Text Content -->
        <div class="text-center mb-3">
            <h3 class="text-sm font-bold text-gray-900 dark:text-white mb-1">Need Assistance?</h3>
            <p class="text-xs text-gray-700 dark:text-gray-300 font-medium mb-1">Our expert support team is available</p>
            <div class="flex items-center justify-center text-xs text-primary-700 dark:text-primary-300 font-semibold">
                <div class="w-1.5 h-1.5 bg-green-500 rounded-full mr-1 animate-pulse"></div>
                <span>24/7 Live Support</span>
            </div>
        </div>
        
        <!-- Features -->
        <div class="grid grid-cols-2 gap-2 mb-3">
            <div class="flex items-center p-2 bg-white/60 dark:bg-gray-700/60 rounded-xl border border-slate-100/50 dark:border-gray-600/70">
                <div class="w-6 h-6 bg-slate-100 dark:bg-gray-600/50 rounded-lg flex items-center justify-center mr-2">
                    <i class="fa-solid fa-clock text-slate-600 dark:text-slate-300 text-xs"></i>
                </div>
                <div>
                    <p class="text-xs font-bold text-slate-900 dark:text-slate-50">Quick Response</p>
                    <p class="text-xs text-slate-600 dark:text-slate-400">< 5 minutes</p>
                </div>
            </div>
            <div class="flex items-center p-2 bg-white/60 dark:bg-gray-700/60 rounded-xl border border-slate-100/50 dark:border-gray-600/70">
                <div class="w-6 h-6 bg-green-100 dark:bg-green-900/50 rounded-lg flex items-center justify-center mr-2">
                    <i class="fa-solid fa-shield-check text-green-600 dark:text-green-400 text-xs"></i>
                </div>
                <div>
                    <p class="text-xs font-bold text-slate-900 dark:text-slate-50">Secure Chat</p>
                    <p class="text-xs text-slate-600 dark:text-slate-400">Encrypted</p>
                </div>
            </div>
        </div>
        
        <!-- Action Button -->
        <div class="flex justify-center">
            <a href="support" 
               class="group inline-flex items-center justify-center px-4 py-2 bg-gradient-to-r from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 text-white font-bold rounded-xl shadow-lg shadow-primary-500/25 dark:shadow-primary-900/50 hover:shadow-primary-500/40 dark:hover:shadow-primary-800/50 transition-all duration-300 transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 text-sm">
                <i class="fa-solid fa-comments text-xs mr-2 group-hover:animate-bounce"></i>
                <span>Start Live Chat</span>
                <div class="ml-2 w-1.5 h-1.5 bg-white/80 rounded-full group-hover:bg-white transition-colors duration-300"></div>
            </a>
        </div>
        
        <!-- Additional Info -->
        <div class="mt-2 text-center">
            <p class="text-xs text-gray-600 dark:text-gray-400">
                <i class="fa-solid fa-phone mr-1 text-primary-500 text-xs"></i>
                Or call us directly for urgent matters
            </p>
        </div>
    </div>
    
    <!-- Decorative Elements -->
    <div class="absolute top-2 right-2 w-8 h-8 bg-primary-200/30 dark:bg-gray-700/30 rounded-full blur-xl"></div>
    <div class="absolute bottom-2 left-2 w-6 h-6 bg-primary-300/20 dark:bg-gray-600/20 rounded-full blur-lg"></div>
</div>        </div>
    </div>
</div>

    
    <div 
    x-show="showBankAccount" 
    x-transition:enter="transition ease-out duration-300" enter-start="opacity-0" enter-end="opacity-100"
    x-transition:leave="transition ease-in duration-200" leave-start="opacity-100" leave-end="opacity-0"
    class="fixed inset-0 z-50 overflow-y-auto" 
    aria-labelledby="bank-account-title" role="dialog" aria-modal="true" style="display: none;">
    <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
        <!-- Backdrop with enhanced blur -->
        <div x-show="showBankAccount" 
            x-transition:enter="transition ease-out duration-300" enter-start="opacity-0" enter-end="opacity-100"
            x-transition:leave="transition ease-in duration-200" leave-start="opacity-100" leave-end="opacity-0"
            class="fixed inset-0 bg-slate-900/20 dark:bg-black/40 backdrop-blur-md transition-opacity" 
            @click="showBankAccount = false" aria-hidden="true">
        </div>
        <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
        
        <!-- Modal Content -->
        <div x-show="showBankAccount" 
            x-transition:enter="transition ease-out duration-300" enter-start="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" enter-end="opacity-100 translate-y-0 sm:scale-100"
            x-transition:leave="transition ease-in duration-200" leave-start="opacity-100 translate-y-0 sm:scale-100" leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
            class="inline-block align-bottom bg-white/95 dark:bg-gray-800/95 backdrop-blur-xl rounded-2xl px-4 pt-4 pb-4 text-left overflow-hidden shadow-2xl border border-white/20 dark:border-gray-700/50 transform transition-all sm:my-8 sm:align-middle sm:max-w-md sm:w-full">
            
            <!-- Close Button -->
            <div class="absolute top-3 right-3">
                <button @click="showBankAccount = false" type="button" 
                        class="w-8 h-8 bg-gray-100/80 dark:bg-gray-700/80 hover:bg-gray-200/80 dark:hover:bg-gray-600/80 rounded-xl text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none transition-all duration-200 flex items-center justify-center">
                    <i class="fa-solid fa-times text-xs"></i>
                </button>
            </div>
            
            <!-- Header Section -->
            <div class="text-center mb-4">
                <div class="mx-auto flex items-center justify-center h-12 w-12 rounded-2xl bg-gradient-to-br from-primary-500 to-primary-600 mb-3 shadow-lg shadow-primary-500/25 dark:shadow-primary-900/50">
                    <i class="fa-solid fa-building-columns text-white text-sm"></i>
                </div>
                <h3 class="text-lg font-bold text-gray-900 dark:text-white mb-1" id="bank-account-title">Bank Account Details</h3>
                <p class="text-xs text-gray-600 dark:text-gray-400 font-medium"><?php echo getSiteConfig('sitename'); ?> Banking</p>
            </div>
            
            <!-- Account Details Card -->
            <div class="bg-gradient-to-br from-gray-50/80 to-white/80 dark:from-gray-700/80 dark:to-gray-800/80 backdrop-blur-sm p-3 rounded-xl mb-4 border border-gray-100/50 dark:border-gray-600/50">
                <div class="flex items-center mb-3">
                    <div class="w-6 h-6 bg-primary-100 dark:bg-primary-900/50 rounded-lg flex items-center justify-center mr-2">
                        <i class="fa-solid fa-circle-info text-primary-600 dark:text-primary-400 text-xs"></i>
                    </div>
                    <h4 class="font-bold text-gray-900 dark:text-white text-sm">Account Information</h4>
                </div>
                
                <div class="space-y-2">
                    <!-- Account Name -->
                    <div class="group p-2 hover:bg-white/60 dark:hover:bg-gray-600/60 rounded-lg transition-all duration-200 border border-transparent hover:border-primary-100 dark:hover:border-primary-800">
                        <div class="flex items-center justify-between">
                            <div class="flex items-center">
                                <div class="h-2 w-2 bg-primary-500 rounded-full mr-3"></div>
                                <div>
                                    <p class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide">Account Name</p>
                                    <p class="text-xs font-bold text-gray-900 dark:text-white mt-0.5"><?php echo htmlspecialchars(getUserDetails('fullname', $_SESSION['email']) ?: ''); ?></p>
                                </div>
                            </div>
                            <button class="w-7 h-7 bg-primary-50 dark:bg-primary-900/50 hover:bg-primary-100 dark:hover:bg-primary-800/50 rounded-lg text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 focus:outline-none transition-all duration-200 flex items-center justify-center group-hover:scale-105" 
                                    @click="navigator.clipboard.writeText('<?php echo htmlspecialchars(getUserDetails('fullname', $_SESSION['email']) ?: ''); ?>'); $el.querySelector('i').classList.add('text-green-500'); setTimeout(() => $el.querySelector('i').classList.remove('text-green-500'), 1500)">
                                <i class="fa-solid fa-copy text-xs transition-colors duration-300"></i>
                            </button>
                        </div>
                    </div>
                    
                    <!-- Account Number -->
                    <div class="group p-2 hover:bg-white/60 dark:hover:bg-gray-600/60 rounded-lg transition-all duration-200 border border-transparent hover:border-primary-100 dark:hover:border-primary-800">
                        <div class="flex items-center justify-between">
                            <div class="flex items-center">
                                <div class="h-2 w-2 bg-primary-500 rounded-full mr-3"></div>
                                <div>
                                    <p class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide">Account Number</p>
                                    <p class="text-xs font-bold text-gray-900 dark:text-white mt-0.5 font-mono"><?php echo getUserDetails('acc_no', $_SESSION['email']); ?></p>
                                </div>
                            </div>
                            <button class="w-7 h-7 bg-primary-50 dark:bg-primary-900/50 hover:bg-primary-100 dark:hover:bg-primary-800/50 rounded-lg text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 focus:outline-none transition-all duration-200 flex items-center justify-center group-hover:scale-105" 
                                    @click="navigator.clipboard.writeText('<?php echo getUserDetails('acc_no', $_SESSION['email']); ?>'); $el.querySelector('i').classList.add('text-green-500'); setTimeout(() => $el.querySelector('i').classList.remove('text-green-500'), 1500)">
                                <i class="fa-solid fa-copy text-xs transition-colors duration-300"></i>
                            </button>
                        </div>
                    </div>
                    
                    <!-- Bitcoin Address (if exists) -->
                                        <div class="group p-2 hover:bg-white/60 dark:hover:bg-gray-600/60 rounded-lg transition-all duration-200 border border-transparent hover:border-yellow-100 dark:hover:border-yellow-800">
                        <div class="flex items-center justify-between">
                            <div class="flex items-center">
                                <div class="h-2 w-2 bg-yellow-400 rounded-full mr-3"></div>
                                <div class="flex-1 min-w-0">
                                    <p class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide">Bitcoin Wallet</p>
                                    <p class="text-xs font-bold text-gray-900 dark:text-white mt-0.5 font-mono truncate" title="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
                                </div>
                            </div>
                            <button class="w-7 h-7 bg-yellow-50 dark:bg-yellow-900/50 hover:bg-yellow-100 dark:hover:bg-yellow-800/50 rounded-lg text-yellow-600 dark:text-yellow-400 hover:text-yellow-700 dark:hover:text-yellow-300 focus:outline-none transition-all duration-200 flex items-center justify-center group-hover:scale-105 ml-2" 
                                    @click="navigator.clipboard.writeText('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); $el.querySelector('i').classList.add('text-green-500'); setTimeout(() => $el.querySelector('i').classList.remove('text-green-500'), 1500)">
                                <i class="fa-solid fa-copy text-xs transition-colors duration-300"></i>
                            </button>
                        </div>
                    </div>
                                    </div>
            </div>
            
            <!-- Warning Notice -->
            <div class="flex items-start p-3 bg-gradient-to-r from-slate-50 to-slate-100/50 dark:from-slate-800/50 dark:to-slate-700/50 rounded-xl border border-slate-200/50 dark:border-slate-600/70 mb-4">
                <div class="w-6 h-6 bg-slate-500 dark:bg-slate-600 rounded-lg flex items-center justify-center mr-2 flex-shrink-0">
                    <i class="fa-solid fa-shield-halved text-white text-xs"></i>
                </div>
                <div>
                    <h5 class="font-bold text-slate-900 dark:text-slate-50 mb-0.5 text-xs">Security Notice</h5>
                    <p class="text-xs text-slate-800 dark:text-slate-100">Always contact <?php echo getSiteConfig('sitename'); ?> Support before making payments to verify account details.</p>
                </div>
            </div>
            
            <!-- Action Button -->
            <div class="flex justify-end">
                <button @click="showBankAccount = false" 
                        class="px-4 py-2 bg-gradient-to-r from-gray-100 to-gray-200 dark:from-gray-700 dark:to-gray-600 hover:from-gray-200 hover:to-gray-300 dark:hover:from-gray-600 dark:hover:to-gray-500 text-gray-700 dark:text-gray-200 font-semibold rounded-xl transition-all duration-200 transform hover:scale-105 focus:outline-none shadow-sm text-sm">
                    Close
                </button>
            </div>
        </div>
    </div>
</div>    <div 
    x-show="showSendMoney" 
    x-transition:enter="transition ease-out duration-300" enter-start="opacity-0" enter-end="opacity-100"
    x-transition:leave="transition ease-in duration-200" leave-start="opacity-100" leave-end="opacity-0"
    class="fixed inset-0 z-50 overflow-y-auto" 
    aria-labelledby="send-money-title" role="dialog" aria-modal="true" style="display: none;">
    <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
        <div x-show="showSendMoney" 
            x-transition:enter="transition ease-out duration-300" enter-start="opacity-0" enter-end="opacity-100"
            x-transition:leave="transition ease-in duration-200" leave-start="opacity-100" leave-end="opacity-0"
            class="fixed inset-0 bg-slate-900/20 dark:bg-black/40 backdrop-blur-md transition-opacity" 
            @click="showSendMoney = false" aria-hidden="true">
        </div>
        <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
        <div x-show="showSendMoney" 
            x-transition:enter="transition ease-out duration-300" enter-start="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" enter-end="opacity-100 translate-y-0 sm:scale-100"
            x-transition:leave="transition ease-in duration-200" leave-start="opacity-100 translate-y-0 sm:scale-100" leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
            class="inline-block align-bottom bg-white/95 dark:bg-gray-800/95 backdrop-blur-xl rounded-2xl px-4 pt-4 pb-4 text-left overflow-hidden shadow-2xl border border-white/20 dark:border-gray-700/50 transform transition-all sm:my-8 sm:align-middle sm:max-w-md sm:w-full">
            <div class="absolute top-3 right-3">
                <button @click="showSendMoney = false" type="button" 
                        class="w-8 h-8 bg-gray-100/80 dark:bg-gray-700/80 hover:bg-gray-200/80 dark:hover:bg-gray-600/80 rounded-xl text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none transition-all duration-200 flex items-center justify-center">
                    <i class="fa-solid fa-times text-xs"></i>
                </button>
            </div>
            <div class="text-center mb-4">
                <div class="mx-auto flex items-center justify-center h-12 w-12 rounded-2xl bg-gradient-to-br from-primary-500 to-primary-600 mb-3 shadow-lg shadow-primary-500/25 dark:shadow-primary-900/50 relative">
                    <i class="fa-solid fa-paper-plane text-white text-sm"></i>
                    <div class="absolute -top-1 -right-1 w-3 h-3 bg-green-500 rounded-full animate-pulse"></div>
                    <div class="absolute -bottom-0.5 -left-0.5 w-2 h-2 bg-yellow-400 rounded-full animate-bounce"></div>
                </div>
                <h3 class="text-lg font-bold text-gray-900 dark:text-white mb-1" id="send-money-title">Send Money</h3>
                <p class="text-xs text-gray-600 dark:text-gray-400 font-medium">Swift & Secure Money Transfer</p>
            </div>
            <div class="space-y-3 mb-4">
                <a href="localtransfer" class="block group">
                    <div class="relative p-3 bg-gradient-to-br from-gray-50/80 to-white/80 dark:from-gray-700/80 dark:to-gray-800/80 hover:from-primary-50/80 hover:to-primary-100/50 dark:hover:from-primary-900/30 dark:hover:to-primary-800/30 rounded-xl border border-gray-100/50 dark:border-gray-600/50 hover:border-primary-200/50 dark:hover:border-primary-700/50 transition-all duration-300 hover:shadow-md hover:shadow-primary-500/10 dark:hover:shadow-primary-900/20 transform hover:scale-[1.02]">
                        <div class="absolute top-2 right-2 w-6 h-6 bg-primary-200/20 dark:bg-primary-800/30 rounded-full blur-lg group-hover:bg-primary-300/30 dark:group-hover:bg-primary-700/40 transition-colors duration-300"></div>
                        <div class="flex items-center justify-between relative">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 mr-3">
                                    <div class="h-8 w-8 bg-gradient-to-br from-primary-500 to-primary-600 rounded-lg flex items-center justify-center group-hover:scale-110 transition-transform duration-300 shadow-md shadow-primary-500/25 dark:shadow-primary-900/50">
                                        <i class="fa-solid fa-users text-white text-xs"></i>
                                    </div>
                                </div>
                                <div>
                                    <h4 class="font-bold text-gray-900 dark:text-white mb-0.5 group-hover:text-primary-700 dark:group-hover:text-primary-300 transition-colors duration-300 text-sm">Local Transfer</h4>
                                    <p class="text-xs text-gray-600 dark:text-gray-400 mb-1">Send money to local accounts instantly</p>
                                    <div class="flex items-center">
                                        <div class="px-1.5 py-0.5 bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 rounded-md text-xs font-semibold mr-1">
                                            <i class="fa-solid fa-bolt mr-1"></i>Instant
                                        </div>
                                        <div class="px-1.5 py-0.5 bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-400 rounded-md text-xs font-semibold">
                                            <i class="fa-solid fa-gift mr-1"></i>0% Fee
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="w-7 h-7 bg-white/80 dark:bg-gray-700/80 group-hover:bg-primary-100 dark:group-hover:bg-primary-900/50 rounded-lg flex items-center justify-center transition-all duration-300 group-hover:scale-110 shadow-sm">
                                <i class="fa-solid fa-arrow-right text-gray-500 dark:text-gray-400 group-hover:text-primary-600 dark:group-hover:text-primary-400 transition-colors duration-300 text-xs"></i>
                            </div>
                        </div>
                    </div>
                </a>
                <a href="internationaltransfer" class="block group">
                    <div class="relative p-3 bg-gradient-to-br from-gray-50/80 to-white/80 dark:from-gray-700/80 dark:to-gray-800/80 hover:from-blue-50/80 hover:to-blue-100/50 dark:hover:from-blue-900/30 dark:hover:to-blue-800/30 rounded-xl border border-gray-100/50 dark:border-gray-600/50 hover:border-blue-200/50 dark:hover:border-blue-700/50 transition-all duration-300 hover:shadow-md hover:shadow-blue-500/10 dark:hover:shadow-blue-900/20 transform hover:scale-[1.02]">
                        <div class="absolute top-2 right-2 w-6 h-6 bg-blue-200/20 dark:bg-blue-800/30 rounded-full blur-lg group-hover:bg-blue-300/30 dark:group-hover:bg-blue-700/40 transition-colors duration-300"></div>
                        <div class="flex items-center justify-between relative">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 mr-3">
                                    <div class="h-8 w-8 bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg flex items-center justify-center group-hover:scale-110 transition-transform duration-300 shadow-md shadow-blue-500/25 dark:shadow-blue-900/50">
                                        <i class="fa-solid fa-globe-americas text-white text-xs"></i>
                                    </div>
                                </div>
                                <div>
                                    <h4 class="font-bold text-gray-900 dark:text-white mb-0.5 group-hover:text-blue-700 dark:group-hover:text-blue-300 transition-colors duration-300 text-sm">International Wire</h4>
                                    <p class="text-xs text-gray-600 dark:text-gray-400 mb-1">Global transfers within 72 hours</p>
                                    <div class="flex items-center">
                                        <div class="px-1.5 py-0.5 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400 rounded-md text-xs font-semibold mr-1">
                                            <i class="fa-solid fa-shield-check mr-1"></i>Secure
                                        </div>
                                        <div class="px-1.5 py-0.5 bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-400 rounded-md text-xs font-semibold">
                                            <i class="fa-solid fa-clock mr-1"></i>72hrs
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="w-7 h-7 bg-white/80 dark:bg-gray-700/80 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/50 rounded-lg flex items-center justify-center transition-all duration-300 group-hover:scale-110 shadow-sm">
                                <i class="fa-solid fa-arrow-right text-gray-500 dark:text-gray-400 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors duration-300 text-xs"></i>
                            </div>
                        </div>
                    </div>
                </a>
            </div>
            <div class="flex items-start p-3 bg-gradient-to-r from-gray-50/80 to-white/80 dark:from-gray-700/80 dark:to-gray-800/80 rounded-xl border border-gray-100/50 dark:border-gray-600/50 mb-4">
                <div class="w-6 h-6 bg-gray-500 dark:bg-gray-600 rounded-lg flex items-center justify-center mr-2 flex-shrink-0">
                    <i class="fa-solid fa-info text-white text-xs"></i>
                </div>
                <div>
                    <p class="text-xs text-gray-700 dark:text-gray-300 font-medium">All transfers are protected by bank-grade encryption and require verification for your security.</p>
                </div>
            </div>
            <div class="flex justify-end">
                <button @click="showSendMoney = false" 
                        class="px-4 py-2 bg-gradient-to-r from-gray-100 to-gray-200 dark:from-gray-700 dark:to-gray-600 hover:from-gray-200 hover:to-gray-300 dark:hover:from-gray-600 dark:hover:to-gray-500 text-gray-700 dark:text-gray-200 font-semibold rounded-xl transition-all duration-200 transform hover:scale-105 focus:outline-none shadow-sm text-sm">
                    Close
                </button>
            </div>
        </div>
    </div>
</div>    <div 
    x-show="showReceiveModal" 
    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"
    class="fixed inset-0 z-50 overflow-y-auto" 
    aria-labelledby="receive-modal-title" 
    role="dialog" 
    aria-modal="true" 
    style="display: none;">
    
    <!-- Backdrop with Enhanced Blur -->
    <div class="fixed inset-0 bg-black/50 dark:bg-black/70 backdrop-blur-md transition-opacity" 
         @click="showReceiveModal = false" 
         aria-hidden="true"></div>
    
    <!-- Modal Container -->
    <div class="flex items-center justify-center min-h-screen p-4">
        <div class="relative bg-white dark:bg-gray-800 rounded-2xl shadow-2xl dark:shadow-gray-900/50 transform transition-all max-w-sm w-full overflow-hidden"
             x-transition:enter="transition ease-out duration-300" 
             x-transition:enter-start="opacity-0 scale-95 translate-y-4" 
             x-transition:enter-end="opacity-100 scale-100 translate-y-0"
             x-transition:leave="transition ease-in duration-200" 
             x-transition:leave-start="opacity-100 scale-100 translate-y-0" 
             x-transition:leave-end="opacity-0 scale-95 translate-y-4">
            
            <!-- Compact Header -->
            <div class="bg-gradient-to-r from-primary-500 to-primary-600 text-white px-4 py-4 relative overflow-hidden">
                <div class="relative flex items-center justify-between">
                    <div class="flex items-center space-x-2">
                        <div class="w-8 h-8 bg-white/20 backdrop-blur-sm rounded-xl flex items-center justify-center">
                            <i class="fa-brands fa-bitcoin text-white text-sm"></i>
                        </div>
                        <div>
                            <h3 class="text-lg font-bold" id="receive-modal-title">Receive Bitcoin</h3>
                        </div>
                    </div>
                    <button @click="showReceiveModal = false" 
                            class="w-8 h-8 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center hover:bg-white/30 transition-colors">
                        <i class="fa-solid fa-times text-white text-sm"></i>
                    </button>
                </div>
            </div>
            
            <!-- Compact Content -->
            <div class="p-4">
                                    <!-- Compact QR Code Section -->
                    <div class="text-center mb-4">
                        <div class="w-32 h-32 mx-auto mb-3 bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-700 dark:to-gray-800 p-2 rounded-2xl shadow border border-gray-200 dark:border-gray-600 relative">
                            <img src="https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&bgcolor=ffffff&color=1f2937" 
                                 alt="BTC Address QR Code" 
                                 class="w-full h-full rounded-xl">
                            
                            <!-- Small Bitcoin Logo -->
                            <div class="absolute inset-0 flex items-center justify-center pointer-events-none">
                                <div class="w-6 h-6 bg-white dark:bg-gray-800 rounded-full flex items-center justify-center shadow border border-primary-500">
                                    <i class="fa-brands fa-bitcoin text-primary-500 text-xs"></i>
                                </div>
                            </div>
                        </div>
                        <p class="text-xs text-gray-600 dark:text-gray-400">Scan with your Bitcoin wallet</p>
                    </div>
                    
                    <!-- Compact Address Section -->
                    <div class="mb-4">
                        <label class="block text-xs font-semibold text-gray-700 dark:text-gray-300 mb-2">Bitcoin Address</label>
                        <div class="bg-gray-50 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-xl p-3 group hover:border-primary-300 dark:hover:border-primary-600 transition-colors">
                            <div class="flex items-center space-x-2">
                                <div class="flex-1 min-w-0">
                                    <p class="text-xs font-mono text-gray-800 dark:text-gray-200 break-all">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
                                </div>
                                <button class="flex-shrink-0 w-8 h-8 bg-primary-500 hover:bg-primary-600 rounded-lg flex items-center justify-center transition-colors" 
                                        @click="navigator.clipboard.writeText('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); 
                                               $el.innerHTML = '<i class=\'fa-solid fa-check text-white text-xs\'></i>'; 
                                               setTimeout(() => $el.innerHTML = '<i class=\'fa-solid fa-copy text-white text-xs\'></i>', 2000)">
                                    <i class="fa-solid fa-copy text-white text-xs"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- Compact Warning -->
                    <div class="bg-yellow-50 dark:bg-yellow-900/30 border-l-4 border-yellow-action rounded-r-xl p-3 mb-4">
                        <div class="flex items-start space-x-2">
                            <i class="fa-solid fa-exclamation-triangle text-yellow-600 dark:text-yellow-400 text-sm mt-0.5"></i>
                            <p class="text-xs text-yellow-700 dark:text-yellow-300">
                                Only send <strong>Bitcoin (BTC)</strong> to this address.
                            </p>
                        </div>
                    </div>
                    
                    <!-- Compact Action Buttons -->
                    <div class="flex space-x-2">
                        <button @click="showReceiveModal = false" 
                                class="flex-1 px-4 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 text-sm font-medium rounded-xl hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors">
                            Close
                        </button>
                        <button @click="navigator.clipboard.writeText('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); 
                                       $el.innerHTML = '<i class=\'fa-solid fa-check text-xs mr-1\'></i>Copied'; 
                                       setTimeout(() => $el.innerHTML = '<i class=\'fa-solid fa-share text-xs mr-1\'></i>Share', 2000)"
                                class="flex-1 px-4 py-2 bg-gradient-to-r from-primary-500 to-primary-600 text-white text-sm font-medium rounded-xl hover:from-primary-600 hover:to-primary-700 transition-all">
                            <i class="fa-solid fa-share text-xs mr-1"></i>Share
                        </button>
                    </div>
                            </div>
        </div>
    </div>
</div></div>

<script>
function dashboardQuickTransfer() {
    return {
        beneficiaries: [],
        loading: false,

        async loadBeneficiaries() {
            this.loading = true;
            try {
                const response = await fetch('beneficiaries/get?favorites=true&limit=10', {
                    headers: {
                        'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').getAttribute('content'),
                        'Accept': 'application/json',
                    }
                });

                const data = await response.json();
                if (data.success) {
                    this.beneficiaries = data.beneficiaries;
                }
            } catch (error) {
                console.error('Error loading beneficiaries:', error);
            } finally {
                this.loading = false;
            }
        },

        async selectBeneficiary(beneficiary) {
            try {
                // Increment usage count
                await fetch(`beneficiaries/${beneficiary.id}/data`, {
                    headers: {
                        'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').getAttribute('content'),
                        'Accept': 'application/json',
                    }
                });

                // Redirect to appropriate transfer page based on beneficiary type
                if (beneficiary.type === 'local') {
                    window.location.href = `localtransfer?beneficiary=${beneficiary.id}`;
                } else if (beneficiary.type === 'international') {
                    const method = beneficiary.method_type ? `&method=${encodeURIComponent(beneficiary.method_type)}` : '';
                    window.location.href = `internationaltransfer?beneficiary=${beneficiary.id}${method}`;
                }
            } catch (error) {
                console.error('Error selecting beneficiary:', error);
                // Fallback: just redirect to transfer page
                if (beneficiary.type === 'local') {
                    window.location.href = 'localtransfer';
                } else {
                    window.location.href = 'internationaltransfer';
                }
            }
        }
    }
}
</script>
                                </div>
              <?php include 'footer.php'; ?>