<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>PBM DATA HUB - Agent Portal</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.css">
    <script src="https://js.paystack.co/v1/inline.js"></script>
    <style>
        body {
            font-family: 'Poppins', sans-serif;
            background-color: #1a202c;
            color: #e2e8f0;
        }
        .spinner {
            width: 50px;
            height: 50px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: #fff;
            animation: spin 1s ease-in-out infinite;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .btn-hover:hover {
            filter: brightness(110%);
            transform: translateY(-2px);
            transition: all 0.3s ease;
        }
        .glass-effect {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
    </style>
</head>
<body class="flex flex-col items-center justify-between min-h-screen text-sm sm:text-base">
    <nav class="bg-gray-800 w-full py-4 flex justify-between items-center fixed top-0 z-10 px-4 glass-effect">
        <h1 class="text-yellow-400 text-xl sm:text-2xl font-bold">
            <span class="material-icons mr-2 align-middle">bolt</span>PBM DATA HUB - Agent Portal
        </h1>
        <a href="index.html" class="bg-yellow-400 text-gray-900 px-4 py-2 rounded-full text-sm font-semibold btn-hover">
            <span class="material-icons mr-1 align-middle">home</span>Main Page
        </a>
    </nav>

    <div id="main-content" class="glass-effect p-6 rounded-lg shadow-lg w-full max-w-md mt-20 mx-4 mb-24">
        <div id="activation-section" class="hidden">
            <h2 class="text-white text-2xl font-semibold mb-4">
                <span class="material-icons mr-2 align-middle">vpn_key</span>Activate Agent Portal
            </h2>
            <p class="text-gray-300 mb-6">Activate your agent portal for exclusive discounts on data bundles.</p>
            <button id="activate-button" class="w-full bg-green-600 text-white px-4 py-3 rounded-full text-sm btn-hover transition-all duration-300">
                <span class="material-icons mr-2 align-middle">credit_card</span>Pay GHS 50 to Activate
            </button>
        </div>

        <div id="bundle-purchase-section" class="hidden">
            <h2 class="text-white text-2xl font-semibold mb-4">
                <span class="material-icons mr-2 align-middle">wifi</span>PBM DATA HUB
            </h2>
            <div class="mb-4">
                <label for="phone-number" class="block text-gray-300 mb-2">
                    <span class="material-icons mr-2 align-middle">phone</span>PHONE NUMBER
                </label>
                <input type="text" id="phone-number" class="w-full p-3 bg-gray-700 text-gray-300 rounded-lg text-sm" placeholder="Enter phone number"/>
            </div>
            <div class="mb-4">
                <label for="network" class="block text-gray-300 mb-2">
                    <span class="material-icons mr-2 align-middle">network_cell</span>NETWORK
                </label>
                <select id="network" class="w-full p-3 bg-gray-700 text-gray-300 rounded-lg text-sm">
                    <option value="">Select Network</option>
                    <option value="mtn">MTN</option>
                    <option value="at">AirtelTigo</option>
                </select>
            </div>
            <div class="mb-4">
                <label for="bundle-volume" class="block text-gray-300 mb-2">
                    <span class="material-icons mr-2 align-middle">data_usage</span>BUNDLE VOLUME
                </label>
                <select id="bundle-volume" class="w-full p-3 bg-gray-700 text-gray-300 rounded-lg text-sm">
                    <option value="">Select package</option>
                </select>
            </div>
            <div id="bundle-price" class="mb-4 text-gray-300 font-semibold"></div>
            <button id="send-bundle" class="w-full bg-red-600 text-white px-4 py-3 rounded-full text-sm btn-hover transition-all duration-300">
                <span class="material-icons mr-2 align-middle">send</span>Send Bundle
            </button>
            <div id="loader" class="hidden mt-4 flex justify-center">
                <div class="spinner"></div>
            </div>
        </div>
    </div>

    <script type="module" src="pathgents.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.js"></script>
</body>
</html>