<?php $__env->startSection('title', 'Dashboard'); ?>

<?php $__env->startSection('content'); ?>

    
    <div class="dash-welcome">
        <div class="dash-welcome-left">
            <p class="dash-welcome-greeting">Good <?php echo e(now()->hour < 12 ? 'morning' : (now()->hour < 17 ? 'afternoon' : 'evening')); ?>, <?php echo e(Auth::user()->fname); ?> 👋</p>
            <h2 class="dash-welcome-title">Welcome back to your dashboard</h2>
            <p class="dash-welcome-sub">Here's what's happening with your account today.</p>
        </div>
        <div class="dash-welcome-right">
            <a href="<?php echo e(route('user.payment.index')); ?>" class="btn btn-primary"><i class="ti ti-plus"></i> Fund Wallet</a>
        </div>
    </div>

    
    <div class="dash-stats">
        <div class="dash-stat-card dash-stat-wallet">
            <div class="dash-stat-icon"><i class="ti ti-wallet"></i></div>
            <div class="dash-stat-body">
                <div class="dash-stat-value"><?php echo e($currency); ?><?php echo e(number_format($walletBalance, 2)); ?></div>
                <div class="dash-stat-label">Wallet Balance</div>
            </div>
            <div class="dash-stat-bg-icon"><i class="ti ti-wallet"></i></div>
        </div>

        <div class="dash-stat-card dash-stat-funded">
            <div class="dash-stat-icon"><i class="ti ti-cash"></i></div>
            <div class="dash-stat-body">
                <div class="dash-stat-value"><?php echo e($currency); ?><?php echo e(number_format($totalFunded, 2)); ?></div>
                <div class="dash-stat-label">Total Funded</div>
            </div>
            <div class="dash-stat-bg-icon"><i class="ti ti-cash"></i></div>
        </div>

        <?php if(optional($settings)->buy_number): ?>
        <div class="dash-stat-card dash-stat-numbers">
            <div class="dash-stat-icon"><i class="ti ti-device-mobile"></i></div>
            <div class="dash-stat-body">
                <div class="dash-stat-value"><?php echo e($numbersPurchased); ?></div>
                <div class="dash-stat-label">Numbers Purchased</div>
            </div>
            <div class="dash-stat-bg-icon"><i class="ti ti-device-mobile"></i></div>
        </div>

        <div class="dash-stat-card dash-stat-server">
            <div class="dash-stat-icon"><i class="ti ti-server"></i></div>
            <div class="dash-stat-body">
                <div class="dash-stat-value"><?php echo e($smsServerStatus); ?></div>
                <div class="dash-stat-label">SMS Server</div>
            </div>
            <div class="dash-stat-bg-icon"><i class="ti ti-server"></i></div>
        </div>
        <?php endif; ?>

        <?php if(optional($settings)->boost_social): ?>
        <div class="dash-stat-card dash-stat-smm">
            <div class="dash-stat-icon"><i class="ti ti-brand-instagram"></i></div>
            <div class="dash-stat-body">
                <div class="dash-stat-value"><?php echo e(number_format($smmOrdersCount)); ?></div>
                <div class="dash-stat-label">SMM Orders</div>
            </div>
            <div class="dash-stat-bg-icon"><i class="ti ti-brand-instagram"></i></div>
        </div>

        <div class="dash-stat-card dash-stat-spent">
            <div class="dash-stat-icon"><i class="ti ti-shopping-cart"></i></div>
            <div class="dash-stat-body">
                <div class="dash-stat-value"><?php echo e($currency); ?><?php echo e(number_format($smmTotalSpent, 2)); ?></div>
                <div class="dash-stat-label">SMM Spent</div>
            </div>
            <div class="dash-stat-bg-icon"><i class="ti ti-shopping-cart"></i></div>
        </div>
        <?php endif; ?>
    </div>

    
    <div class="dash-section-title">Quick Actions</div>
    <div class="dash-actions">
        <?php if(optional($settings)->buy_number): ?>
        <a href="<?php echo e(route('user.server.index')); ?>" class="dash-action-card">
            <div class="dash-action-icon" style="background:linear-gradient(135deg,#6366f1,#8b5cf6)"><i class="ti ti-phone-call"></i></div>
            <div class="dash-action-label">Buy Numbers</div>
        </a>
        <?php endif; ?>
        <?php if(optional($settings)->boost_social): ?>
        <a href="<?php echo e(route('user.smm-order.index')); ?>" class="dash-action-card">
            <div class="dash-action-icon" style="background:linear-gradient(135deg,#ec4899,#f43f5e)"><i class="ti ti-brand-instagram"></i></div>
            <div class="dash-action-label">Boost Socials</div>
        </a>
        <?php endif; ?>
        <a href="<?php echo e(route('user.payment.index')); ?>" class="dash-action-card">
            <div class="dash-action-icon" style="background:linear-gradient(135deg,#10b981,#059669)"><i class="ti ti-wallet"></i></div>
            <div class="dash-action-label">Fund Wallet</div>
        </a>
        <?php if(optional($settings)->buy_number): ?>
        <a href="<?php echo e(route('user.log.numbers')); ?>" class="dash-action-card">
            <div class="dash-action-icon" style="background:linear-gradient(135deg,#f59e0b,#d97706)"><i class="ti ti-chart-line"></i></div>
            <div class="dash-action-label">Number Log</div>
        </a>
        <?php endif; ?>
        <?php if(optional($settings)->boost_social): ?>
        <a href="<?php echo e(route('user.log.smm-orders')); ?>" class="dash-action-card">
            <div class="dash-action-icon" style="background:linear-gradient(135deg,#0ea5e9,#0284c7)"><i class="ti ti-list"></i></div>
            <div class="dash-action-label">Order Log</div>
        </a>
        <?php endif; ?>
        <?php if(optional($settings)->social_logs): ?>
        <a href="<?php echo e(route('user.accounts.products')); ?>" class="dash-action-card">
            <div class="dash-action-icon" style="background:linear-gradient(135deg,#8b5cf6,#7c3aed)"><i class="ti ti-shopping-bag"></i></div>
            <div class="dash-action-label">Social Logs</div>
        </a>
        <?php endif; ?>
        <a href="<?php echo e(route('user.log.payments')); ?>" class="dash-action-card">
            <div class="dash-action-icon" style="background:linear-gradient(135deg,#14b8a6,#0d9488)"><i class="ti ti-receipt"></i></div>
            <div class="dash-action-label">Payment Log</div>
        </a>
        <a href="<?php echo e(route('frontend.support')); ?>" class="dash-action-card">
            <div class="dash-action-icon" style="background:linear-gradient(135deg,#64748b,#475569)"><i class="ti ti-headset"></i></div>
            <div class="dash-action-label">Support</div>
        </a>
    </div>

    
    <?php if(optional($settings)->buy_number): ?>
    <div class="dash-section-title">Top Services</div>
    <div class="dash-services">
        <?php $__empty_1 = true; $__currentLoopData = $topServices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $service): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <div class="dash-service-item">
            <div class="dash-service-num"><?php echo e($i + 1); ?></div>
            <div class="dash-service-icon"><i class="<?php echo e($service['icon']); ?>"></i></div>
            <div class="dash-service-info">
                <div class="dash-service-name"><?php echo e($service['name']); ?></div>
                <div class="dash-service-detail"><?php echo e($service['detail']); ?></div>
            </div>
            <a href="<?php echo e(route('user.server.index')); ?>" class="dash-service-btn">Buy <i class="ti ti-arrow-right"></i></a>
        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <div class="dash-empty">
            <i class="ti ti-device-mobile"></i>
            <p>No top services configured yet.</p>
        </div>
        <?php endif; ?>
    </div>
    <?php endif; ?>

<?php $__env->stopSection(); ?>

<?php $__env->startPush('style'); ?>
<style>
.dash-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, var(--primary-color), #ff6b00);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 24px;
    color: #fff;
    flex-wrap: wrap;
}
.dash-welcome-greeting { font-size: 14px; opacity: .85; margin-bottom: 6px; }
.dash-welcome-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.dash-welcome-sub { font-size: 14px; opacity: .8; }
.dash-welcome-right .btn { background: #fff; color: var(--primary-color); font-weight: 600; border: none; }
.dash-welcome-right .btn:hover { background: rgba(255,255,255,.9); }

.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.dash-stat-card {
    position: relative;
    border-radius: 14px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    color: #fff;
}
.dash-stat-wallet  { background: linear-gradient(135deg,#6366f1,#4f46e5); }
.dash-stat-funded  { background: linear-gradient(135deg,#10b981,#059669); }
.dash-stat-numbers { background: linear-gradient(135deg,#f59e0b,#d97706); }
.dash-stat-server  { background: linear-gradient(135deg,#0ea5e9,#0284c7); }
.dash-stat-smm     { background: linear-gradient(135deg,#ec4899,#db2777); }
.dash-stat-spent   { background: linear-gradient(135deg,#8b5cf6,#7c3aed); }

.dash-stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.dash-stat-value { font-size: 22px; font-weight: 800; line-height: 1.2; }
.dash-stat-label { font-size: 12px; opacity: .85; margin-top: 3px; }
.dash-stat-bg-icon {
    position: absolute; right: -10px; bottom: -10px;
    font-size: 80px; opacity: .08; pointer-events: none;
}

.dash-section-title {
    font-size: 16px; font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    padding-left: 2px;
}

.dash-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.dash-action-card {
    background: var(--bg-primary);
    border: var(--border);
    border-radius: 14px;
    padding: 20px 12px;
    display: flex; flex-direction: column;
    align-items: center; gap: 12px;
    text-align: center;
    transition: all .25s ease;
    text-decoration: none;
}
.dash-action-card:hover { transform: translateY(-4px); border-color: var(--primary-color); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.dash-action-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
}
.dash-action-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.dash-services {
    background: var(--bg-primary);
    border: var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
}
.dash-service-item {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px;
    border-bottom: var(--border);
    transition: background .2s ease;
}
.dash-service-item:last-child { border-bottom: none; }
.dash-service-item:hover { background: var(--bg-secondary); }
.dash-service-num {
    width: 28px; height: 28px; border-radius: 8px;
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: var(--text-secondary);
    flex-shrink: 0;
}
.dash-service-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(255,132,50,.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: var(--primary-color); flex-shrink: 0;
}
.dash-service-info { flex: 1; min-width: 0; }
.dash-service-name { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-service-detail { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.dash-service-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 8px;
    background: var(--primary-color); color: #fff;
    font-size: 13px; font-weight: 600;
    flex-shrink: 0; transition: opacity .2s;
}
.dash-service-btn:hover { opacity: .9; }

.dash-empty {
    padding: 40px; text-align: center;
    color: var(--text-secondary);
}
.dash-empty i { font-size: 40px; margin-bottom: 10px; display: block; opacity: .5; }
.dash-empty p { font-size: 14px; margin: 0; }

@media (max-width: 640px) {
    .dash-welcome { padding: 20px; }
    .dash-welcome-title { font-size: 18px; }
    .dash-stats { grid-template-columns: 1fr 1fr; }
    .dash-actions { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 400px) {
    .dash-stats { grid-template-columns: 1fr; }
    .dash-actions { grid-template-columns: repeat(2, 1fr); }
}
</style>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('frontend.layout.dash', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\jjd\socialnum\sstack\mine\core\resources\views/frontend/user/dashboard.blade.php ENDPATH**/ ?>