<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Money Exchange</title>
    <!-- Use system fonts for clean minimal look -->
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
    <link href="<?php echo e(asset('css/style.css')); ?>" rel="stylesheet">
    <?php echo $__env->yieldPushContent('styles'); ?>
</head>
<body>
<?php if(session('admin_logged_in')): ?>
    <div class="app-wrapper">
        <aside class="sidebar">
            <div class="sidebar-header">
                <h3>Money Exchange</h3>
            </div>
            <nav class="sidebar-nav">
                <a href="<?php echo e(route('dashboard')); ?>" class="nav-item">Dashboard</a>
                
                <div class="nav-group-title">Master</div>
                <a href="<?php echo e(route('currencies.index')); ?>" class="nav-item">Currencies</a>
                <a href="<?php echo e(route('agents.index')); ?>" class="nav-item">Agents</a>
                <a href="<?php echo e(route('accounts.index')); ?>" class="nav-item">Accounts</a>
                <a href="<?php echo e(route('setup.opening-balances')); ?>" class="nav-item">Opening Balance</a>
                <a href="<?php echo e(route('accounts.adjust.index')); ?>" class="nav-item">Adjust Balance</a>

                <div class="nav-group-title">Transactions</div>
                <a href="<?php echo e(route('transactions.buy.create')); ?>" class="nav-item">Buy Currency</a>
                <a href="<?php echo e(route('transactions.sell.create')); ?>" class="nav-item">Sell Currency</a>
                <a href="<?php echo e(route('transactions.pending.index')); ?>" class="nav-item">Pending Transactions</a>
                <a href="<?php echo e(route('agent-balances.index')); ?>" class="nav-item">Agent Balance</a>
                <a href="<?php echo e(route('borrows.index')); ?>" class="nav-item">Borrow Currency</a>
                <a href="<?php echo e(route('reports.transactions')); ?>" class="nav-item">Transaction History</a>

                <div class="nav-group-title">Summaries</div>
                <a href="<?php echo e(route('stock.dashboard')); ?>" class="nav-item">Stock Dashboard</a>
                <a href="<?php echo e(route('profits.index')); ?>" class="nav-item">Profit Summary</a>
                <a href="<?php echo e(route('accounts.summary')); ?>" class="nav-item">Account Summary</a>

                <div class="nav-group-title">Reports</div>
                <a href="<?php echo e(route('reports.profits')); ?>" class="nav-item">Profit Report</a>
                <a href="<?php echo e(route('reports.handling-fees')); ?>" class="nav-item">Handling Fees</a>
                <a href="<?php echo e(route('reports.accounts')); ?>" class="nav-item">Account Report</a>
                <a href="<?php echo e(route('reports.currencies')); ?>" class="nav-item">Currency Report</a>
            </nav>
        </aside>
        
        <main class="main-content">
            <header class="topbar">
                <form method="POST" action="<?php echo e(route('logout')); ?>">
                    <?php echo csrf_field(); ?>
                    <button type="submit" class="btn btn-outline-primary btn-sm">Logout Admin</button>
                </form>
            </header>
            <div class="content-area">
                <?php if(session('success')): ?>
                    <div class="alert alert-success">
                        <?php echo e(session('success')); ?>

                    </div>
                <?php endif; ?>

                <?php if(session('error')): ?>
                    <div class="alert alert-danger">
                        <?php echo e(session('error')); ?>

                    </div>
                <?php endif; ?>

                <?php if($errors->any()): ?>
                    <div class="alert alert-danger">
                        <strong class="mb-2">Please check the form:</strong>
                        <ul class="mb-0" style="padding-left: 20px;">
                            <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li><?php echo e($error); ?></li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                    </div>
                <?php endif; ?>
                
                <?php echo $__env->yieldContent('content'); ?>
            </div>
        </main>
    </div>
<?php else: ?>
    <?php echo $__env->yieldContent('content'); ?>
<?php endif; ?>

<script>
    // Minimal custom scripts
    document.querySelectorAll('.atm-decimal').forEach((input) => {
        const format = () => {
            const digits = input.value.replace(/\D/g, '');
            if (!digits) {
                input.value = '';
                return;
            }
            input.value = (parseInt(digits, 10) / 100).toFixed(2);
        };
        input.addEventListener('input', format);
    });
</script>
<?php echo $__env->yieldPushContent('scripts'); ?>
</body>
</html>
<?php /**PATH F:\christopher\currencychangerui\resources\views/layouts/app.blade.php ENDPATH**/ ?>