<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html b:css='false' b:js='false' expr:dir='data:blog.languageDirection' expr:lang='data:blog.locale' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<meta charset='UTF-8'/>
<meta content='width=device-width, initial-scale=1.0' name='viewport'/>
<title><data:blog.pageTitle/></title>
<b:skin><![CDATA[
body { background-color: #050202; color: #ffffff; font-family: system-ui, -apple-system, sans-serif; }
input, select, textarea { background-color: #0c0404 !important; border: 1px solid #260f0f !important; color: #ffffff !important; }
input:focus, select:focus, textarea:focus { outline: none !important; border-color: #dc2626 !important; box-shadow: 0 0 12px rgba(220, 38, 38, 0.4) !important; }
.sidebar, header, footer, .blog-pager { display: none !important; }
/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #050202; }
::-webkit-scrollbar-thumb { background: #860000; border-radius: 3px; }
]]></b:skin>
<!-- Tailwind CSS CDN -->
<script src='https://cdn.tailwindcss.com'/>
<!-- FontAwesome Icon CDN -->
<link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css' rel='stylesheet'/>
</head>
<body class='p-3 md:p-6 max-w-4xl mx-auto pb-32 relative selection:bg-red-600 selection:text-white'>
<!-- TOAST NOTIFICATION CONTAINER -->
<div class='fixed top-5 right-5 z-50 space-y-2 pointer-events-none' id='toastContainer'/>
<b:section class='main' id='main-section'>
<b:widget id='HTML1' locked='false' title='Nuvera Main' type='HTML' version='2' visible='true'>
<b:widget-settings>
<b:widget-setting name='content'/>
</b:widget-settings>
<b:includable id='main'>
<!-- Header Logo & Navbar -->
<div class='flex flex-col md:flex-row items-start md:items-center justify-between mb-6 border-b border-[#260f0f] pb-4 gap-4'>
<div class='flex items-center gap-3.5'>
<div class='w-12 h-12 rounded-2xl border border-red-600/60 bg-gradient-to-br from-[#1a0505] to-[#0a0202] flex items-center justify-center p-1.5 shadow-lg shadow-red-950/50 shrink-0 overflow-hidden relative'>
<div class='absolute inset-0 bg-red-600/10 animate-pulse'/>
<img alt='Nuvera Logo' class='w-full h-full object-cover rounded-xl relative z-10' src='https://cdn.phototourl.com/member/2026-09-30-0fa1d5ff-4c65-415e-a73f-a89e51ab71b6.png'/>
</div>
<div>
<h1 class='font-black text-xl tracking-wide text-transparent bg-clip-text bg-gradient-to-r from-white via-red-100 to-red-500'>NUVERA <span class='text-red-500 text-xs block font-bold tracking-widest uppercase'>JOKI STORE ESPORTS</span></h1>
</div>
</div>
<div class='flex flex-wrap gap-2 text-xs font-semibold'>
<button class='bg-gradient-to-r from-red-700 to-red-900 text-white px-4 py-2.5 rounded-xl transition shadow-md shadow-red-950/50 cursor-pointer border border-red-600/40' id='navJoki' type='button'><i class='fa-solid fa-store mr-1.5'/> JOKI</button>
<button class='bg-[#0c0404] hover:bg-[#1a0808] text-gray-300 hover:text-white px-3.5 py-2.5 rounded-xl border border-[#260f0f] transition cursor-pointer' id='navCek' type='button'><i class='fa-solid fa-receipt mr-1 text-red-500'/> CEK TRANSAKSI</button>
<button class='bg-[#0c0404] hover:bg-[#1a0808] text-gray-300 hover:text-white px-3.5 py-2.5 rounded-xl border border-[#260f0f] transition flex items-center gap-1.5 cursor-pointer' id='navPenjoki' type='button'><i class='fa-solid fa-gamepad text-xs text-red-500'/> SETOR JOKI</button>
<button class='bg-[#0c0404] hover:bg-[#1a0808] text-gray-300 hover:text-white px-3.5 py-2.5 rounded-xl border border-[#260f0f] transition flex items-center gap-1.5 cursor-pointer' id='navAdmin' type='button'><i class='fa-solid fa-lock text-[10px] text-red-500'/> ADMIN</button>
</div>
</div>
<!-- MAIN CUSTOMER VIEW -->
<div class='space-y-6' id='sectionCustomer'>
<!-- BANNER PROMO / INFO STORE -->
<div class='relative overflow-hidden rounded-2xl bg-gradient-to-r from-red-950/80 via-[#1a0505] to-[#0c0404] border border-red-600/30 p-5 shadow-xl'>
<div class='absolute -right-10 -bottom-10 w-40 h-40 bg-red-600/10 rounded-full blur-2xl pointer-events-none'/>
<div class='relative z-10 flex flex-col md:flex-row items-start md:items-center justify-between gap-4'>
<div class='space-y-1'>
<div class='inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-red-900/50 border border-red-700/50 text-[10px] font-bold text-red-300 uppercase tracking-wider'>
<span class='w-2 h-2 rounded-full bg-emerald-400 animate-ping'/> Official Store Amanah & Cepat
</div>
<h2 class='text-base md:text-lg font-black text-white tracking-wide'>Joki Rank MLBB 100% Aman, Cepat & Garansi Anti Banned!</h2>
<p class='text-xs text-gray-400'>Dikerjakan oleh Top Global & Pro Player berpengalaman. Live progress terpantau.</p>
</div>
<div class='flex items-center gap-2 shrink-0'>
<div class='text-right hidden md:block'>
<div class='text-[10px] text-gray-400'>Status Server</div>
<div class='text-xs font-bold text-emerald-400 flex items-center gap-1 justify-end'><i class='fa-solid fa-circle text-[8px]'/> Normal / Siap Order</div>
</div>
</div>
</div>
</div>
<div class='flex bg-[#0c0404] p-1.5 rounded-2xl border border-[#260f0f] text-xs hidden'>
<button class='flex-1 py-2.5 font-bold rounded-xl bg-red-700 text-white transition' id='subBtnOrder' type='button'>Form Order</button>
<button class='flex-1 py-2.5 font-bold rounded-xl text-gray-400 transition' id='subBtnTrack' type='button'>Tracking Progress</button>
<button class='flex-1 py-2.5 font-bold rounded-xl text-gray-400 transition' id='subBtnPenjoki' type='button'>Area Penjoki</button>
</div>
<!-- SUBSECTION: FORM ORDER -->
<div class='space-y-6' id='subSectionOrder'>
<div class='bg-[#0c0404] border border-[#260f0f] p-5 md:p-6 rounded-3xl space-y-4 shadow-xl'>
<h2 class='font-bold flex items-center gap-2.5 text-sm text-white'>
<span class='bg-gradient-to-br from-red-600 to-red-900 w-7 h-7 rounded-xl flex items-center justify-center text-xs shadow-md shadow-red-950 font-black'>1</span> Pilih Jenis Layanan & Paket Joki
</h2>
<!-- Tab Pilihan Mode (Paket Rank vs Per Bintang) -->
<div class='flex bg-[#140606] p-1.5 rounded-2xl border border-[#260f0f]'>
<button class='flex-1 py-3 text-xs font-bold rounded-xl bg-red-700 text-white transition shadow cursor-pointer' id='btnModePaket' type='button'><i class='fa-solid fa-box-archive mr-1.5'/> Paket Rank (Hemat)</button>
<button class='flex-1 py-3 text-xs font-bold rounded-xl text-gray-400 hover:text-white transition cursor-pointer' id='btnModeBintang' type='button'><i class='fa-solid fa-star mr-1.5 text-amber-400'/> Satuan Per Bintang</button>
</div>
<!-- Mode 1: Paket Rank -->
<div class='space-y-4' id='containerModePaket'>
<div class='space-y-4' id='customerPackageList'/>
</div>
<!-- Mode 2: Per Bintang -->
<div class='space-y-4 hidden' id='containerModeBintang'>
<div class='space-y-1.5'>
<label class='text-xs text-gray-300 block font-semibold'>Pilih Rank / Kategori *</label>
<select class='w-full p-3.5 rounded-2xl text-sm' id='starRankSelect'>
<option data-rank='Epic' value='4000'>Epic (Rp 4.000 / Bintang)</option>
<option data-rank='Legend' value='5000'>Legend (Rp 5.000 / Bintang)</option>
<option data-rank='Mythic' selected='selected' value='7000'>Mythic / Custom (Rp 7.000 / Bintang)</option>
<option data-rank='Mythic Honor' value='10000'>Mythic Honor (Rp 10.000 / Bintang)</option>
<option data-rank='Mythic Glory' value='12000'>Mythic Glory (Rp 12.000 / Bintang)</option>
<option data-rank='Mythic Immortal' value='15000'>Mythic Immortal (Rp 15.000 / Bintang)</option>
</select>
</div>
<div class='space-y-1.5'>
<label class='text-xs text-gray-300 block font-semibold'>Jumlah Bintang *</label>
<div class='flex items-center justify-between bg-[#0f0505] border border-[#260f0f] rounded-2xl p-2.5'>
<button class='w-11 h-11 bg-[#1f0a0a] hover:bg-red-700 rounded-xl font-bold text-lg flex items-center justify-center transition cursor-pointer' id='btnStarMinus' type='button'>-</button>
<span class='text-lg font-black text-white' id='starCountDisplay'>1</span>
<button class='w-11 h-11 bg-[#1f0a0a] hover:bg-red-700 rounded-xl font-bold text-lg flex items-center justify-center transition cursor-pointer' id='btnStarPlus' type='button'>+</button>
</div>
</div>
</div>
<div class='space-y-1.5 pt-1'>
<label class='text-xs text-gray-300 block font-semibold'>Request Hero / Catatan Khusus untuk Joki</label>
<input class='w-full p-3.5 rounded-2xl text-sm' id='notes' placeholder='Contoh: Req Hero Ling/Fanny, Jangan pakai winrate hero tertentu' type='text'/>
</div>
</div>
<div class='bg-[#0c0404] border border-[#260f0f] p-5 md:p-6 rounded-3xl space-y-3 shadow-xl'>
<h2 class='font-bold flex items-center gap-2 text-sm text-white'>
<i class='fa-solid fa-ticket text-red-500'/> Voucher Diskon / Promo
</h2>
<div class='flex gap-2.5'>
<input class='flex-1 p-3.5 rounded-2xl text-sm uppercase font-bold tracking-wider' id='voucherCode' placeholder='Masukkan Kode (Cth: NUVERA10)' type='text'/>
<button class='bg-[#1f0a0a] hover:bg-red-700 px-6 rounded-2xl text-xs font-bold transition cursor-pointer border border-red-900/40' id='btnApplyVoucher' type='button'>Gunakan</button>
</div>
<p class='text-xs font-medium hidden' id='voucherInfo'/>
</div>
<div class='bg-[#0c0404] border border-[#260f0f] p-5 md:p-6 rounded-3xl space-y-4 shadow-xl'>
<h2 class='font-bold flex items-center gap-2.5 text-sm text-white'>
<span class='bg-gradient-to-br from-red-600 to-red-900 w-7 h-7 rounded-xl flex items-center justify-center text-xs shadow-md shadow-red-950 font-black'>2</span> Data Akun Mobile Legends
</h2>
<div class='space-y-3.5 text-sm'>
<div class='space-y-1.5'>
<label class='text-xs text-gray-300 block font-semibold'>Metode Login *</label>
<select class='w-full p-3.5 rounded-2xl text-sm' id='loginType'>
<option value='Moonton Account'>Moonton Account</option>
<option value='VK Account'>VK Account</option>
<option value='TikTok Account'>TikTok Account</option>
</select>
</div>
<div class='space-y-1.5'>
<label class='text-xs text-gray-300 block font-semibold'>User ID & Server ID *</label>
<input class='w-full p-3.5 rounded-2xl text-sm' id='gameId' placeholder='Contoh: 12345678 (1234)' type='text'/>
</div>
<div class='space-y-1.5'>
<label class='text-xs text-gray-300 block font-semibold'>Email / No HP Login *</label>
<input class='w-full p-3.5 rounded-2xl text-sm' id='accountUser' placeholder='Email Moonton / No HP Login' type='text'/>
</div>
<div class='space-y-1.5'>
<label class='text-xs text-gray-300 block font-semibold'>Password Akun *</label>
<input class='w-full p-3.5 rounded-2xl text-sm' id='accountPass' placeholder='Password Akun MLBB' type='password'/>
</div>
<div class='space-y-1.5'>
<label class='text-xs text-gray-300 block font-semibold'>Nomor WhatsApp Pelanggan (Untuk Notifikasi) *</label>
<input class='w-full p-3.5 rounded-2xl text-sm' id='whatsappNum' placeholder='Contoh: 081234567890' type='tel'/>
</div>
</div>
</div>
<!-- SUMMARY & SUBMIT -->
<div class='bg-gradient-to-b from-[#140505] to-[#0c0404] border border-red-900/40 p-5 md:p-6 rounded-3xl space-y-4 shadow-2xl'>
<div class='flex justify-between items-center text-sm'>
<span class='text-gray-400'>Paket Dipilih:</span>
<span class='font-bold text-white text-right' id='summaryPackage'>-</span>
</div>
<div class='flex justify-between items-center text-sm'>
<span class='text-gray-400'>Jumlah / Kuantitas:</span>
<span class='font-bold text-white' id='summaryCount'>1 Paket</span>
</div>
<div class='flex justify-between items-center text-sm text-emerald-400 hidden' id='discountRow'>
<span>Diskon Voucher:</span>
<span id='summaryDiscount'>- Rp 0</span>
</div>
<div class='flex justify-between items-center text-base font-bold border-t border-[#260f0f] pt-4 mt-2'>
<span class='text-white'>Total Pembayaran:</span>
<span class='text-red-500 text-2xl font-black' id='totalPrice'>Rp 0</span>
</div>
<button class='w-full mt-2 bg-gradient-to-r from-red-600 via-red-700 to-red-800 hover:from-red-500 hover:to-red-700 text-white font-black py-4 rounded-2xl flex items-center justify-center gap-2.5 shadow-xl shadow-red-950/60 transition cursor-pointer text-sm tracking-wide border border-red-500/30' id='btnSubmitOrder' type='button'>
<i class='fa-solid fa-qrcode text-lg'/> LANJUT KE PEMBAYARAN QRIS
</button>
</div>
</div>
<!-- SUBSECTION: TRACKING PROGRESS -->
<div class='space-y-4 hidden' id='subSectionTrack'>
<div class='bg-[#0c0404] border border-[#260f0f] p-5 md:p-6 rounded-3xl space-y-3.5 shadow-xl'>
<h2 class='font-bold text-sm text-white flex items-center gap-2'>
<i class='fa-solid fa-magnifying-glass text-red-500'/> Lacak Progress Pesanan Joki
</h2>
<div class='flex gap-2.5'>
<input class='flex-1 p-3.5 rounded-2xl text-sm uppercase font-bold tracking-wider' id='trackInput' placeholder='Kode Transaksi (Cth: NVR-123456) / No WA' type='text'/>
<button class='bg-red-700 hover:bg-red-600 px-6 rounded-2xl text-xs font-bold transition cursor-pointer shadow' id='btnTrackOrder' type='button'>Cari</button>
</div>
</div>
<div class='space-y-3' id='trackResultContainer'/>
</div>
<!-- SUBSECTION: FORM SETOR JOKIAN PENJOKI -->
<div class='space-y-4 hidden' id='subSectionPenjoki'>
<div class='flex justify-between items-center bg-[#0c0404] border border-[#260f0f] p-4 rounded-2xl mb-2'>
<span class='text-xs text-emerald-400 font-bold flex items-center gap-2'><i class='fa-solid fa-shield-halved text-sm'/> Area Penjoki Secured</span>
<button class='bg-red-950/80 hover:bg-red-900 border border-red-800 text-red-200 text-xs font-bold px-3.5 py-2 rounded-xl transition flex items-center gap-1.5 cursor-pointer' id='btnLogoutPenjoki' type='button'>
<i class='fa-solid fa-right-from-bracket'/> Keluar Penjoki
</button>
</div>
<div class='bg-[#0c0404] border border-red-600/40 p-6 rounded-3xl space-y-4 shadow-xl'>
<div class='border-b border-[#260f0f] pb-3.5'>
<h2 class='font-extrabold text-base text-white flex items-center gap-2'>
<i class='fa-solid fa-circle-check text-emerald-500'/> Form Laporan Penjoki (Setor Jokian)
</h2>
<p class='text-xs text-gray-400 mt-1'>Upload bukti screenshot kemenangan & data penjoki setelah orderan selesai / sebagian dikerjakan.</p>
</div>
<div class='space-y-3.5 text-xs'>
<div class='space-y-1.5'>
<label class='text-gray-300 font-semibold block'>Kode Transaksi *</label>
<input class='w-full p-3.5 rounded-2xl uppercase font-bold text-white' id='pjCode' placeholder='Contoh: NVR-123456' type='text'/>
</div>
<div class='space-y-1.5'>
<label class='text-gray-300 font-semibold block'>Nama Penjoki / Nickname *</label>
<input class='w-full p-3.5 rounded-2xl text-white font-medium' id='pjName' placeholder='Contoh: Penjoki Pro / Bang Budi' type='text'/>
</div>
<div class='space-y-1.5'>
<label class='text-gray-300 font-semibold block'>Nomor WhatsApp Penjoki *</label>
<input class='w-full p-3.5 rounded-2xl text-white font-medium' id='pjWa' placeholder='Contoh: 081234567890' type='tel'/>
</div>
<div class='space-y-1.5'>
<label class='text-gray-300 font-semibold block'>Upload Bukti Screenshot Jokian *</label>
<input accept='image/*' class='w-full p-3.5 rounded-2xl text-white text-xs file:mr-4 file:py-2 file:px-4 file:rounded-xl file:border-0 file:text-xs file:font-semibold file:bg-red-700 file:text-white hover:file:bg-red-600 cursor-pointer' id='pjScreenshotsFile' multiple='multiple' type='file'/>
<p class='text-[10px] text-gray-500'>Tips: Anda bisa memilih lebih dari satu file gambar screenshot.</p>
</div>
<div class='space-y-1.5'>
<label class='text-gray-300 font-semibold block'>Ubah Status Transaksi Ke</label>
<select class='w-full p-3.5 rounded-2xl text-xs font-bold text-emerald-400' id='pjStatus'>
<option value='completed'>COMPLETED (Selesai Dikerjakan)</option>
<option value='processing'>PROCESSING (Progres Sebagian)</option>
</select>
</div>
<button class='w-full bg-red-700 hover:bg-red-600 text-white font-bold py-4 rounded-2xl transition shadow-lg flex items-center justify-center gap-2 cursor-pointer text-xs mt-3' id='btnSubmitPenjoki' type='button'>
<i class='fa-solid fa-paper-plane'/> Kirim Laporan Jokian Selesai
</button>
</div>
</div>
</div>
</div>
<!-- SECTION: ADMIN PANEL (REDESIGNED & UPGRADED UI) -->
<div class='space-y-6 hidden' id='sectionAdmin'>
<!-- Admin Dashboard Header -->
<div class='bg-gradient-to-r from-red-950/60 via-[#140606] to-[#0c0404] border border-red-600/40 p-5 md:p-6 rounded-3xl shadow-xl flex flex-col md:flex-row justify-between items-start md:items-center gap-4'>
<div class='flex items-center gap-3.5'>
<div class='w-12 h-12 rounded-2xl bg-gradient-to-br from-red-600 to-red-900 border border-red-500/50 flex items-center justify-center text-white text-lg shadow-lg shadow-red-950'>
<i class='fa-solid fa-gauge-high'/>
</div>
<div>
<div class='inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full bg-red-950 border border-red-800 text-[10px] font-bold text-red-400 uppercase tracking-widest mb-1'>
<i class='fa-solid fa-shield-halved text-[9px]'/> Secured Admin Panel
</div>
<h2 class='text-lg md:text-xl font-black text-white tracking-wide'>NUVERA DASHBOARD</h2>
</div>
</div>
<button class='bg-red-950/80 hover:bg-red-900 border border-red-700/60 text-red-200 text-xs font-bold px-4 py-3 rounded-2xl transition flex items-center gap-2 cursor-pointer shadow-md' id='btnLogoutAdmin' type='button'>
<i class='fa-solid fa-right-from-bracket text-red-400'/> Keluar Admin
</button>
</div>
<!-- Modern Pill Tabs for Admin Navigation -->
<div class='bg-[#0c0404] border border-[#260f0f] p-2 rounded-2xl flex flex-wrap gap-1.5 shadow-lg'>
<button class='admin-tab flex-1 min-w-[90px] py-3 px-4 rounded-xl font-bold text-xs transition flex items-center justify-center gap-2 cursor-pointer bg-gradient-to-r from-red-700 to-red-900 text-white shadow-md shadow-red-950/50' data-tab='statistik' type='button'>
<i class='fa-solid fa-chart-pie'/> Statistik
</button>
<button class='admin-tab flex-1 min-w-[90px] py-3 px-4 rounded-xl font-bold text-xs transition flex items-center justify-center gap-2 cursor-pointer text-gray-400 hover:text-white hover:bg-[#140606]' data-tab='order' type='button'>
<i class='fa-solid fa-receipt'/> Order
</button>
<button class='admin-tab flex-1 min-w-[90px] py-3 px-4 rounded-xl font-bold text-xs transition flex items-center justify-center gap-2 cursor-pointer text-gray-400 hover:text-white hover:bg-[#140606]' data-tab='pelanggan' type='button'>
<i class='fa-solid fa-users'/> Pelanggan
</button>
<button class='admin-tab flex-1 min-w-[90px] py-3 px-4 rounded-xl font-bold text-xs transition flex items-center justify-center gap-2 cursor-pointer text-gray-400 hover:text-white hover:bg-[#140606]' data-tab='layanan' type='button'>
<i class='fa-solid fa-boxes-stacked'/> Layanan
</button>
<button class='admin-tab flex-1 min-w-[90px] py-3 px-4 rounded-xl font-bold text-xs transition flex items-center justify-center gap-2 cursor-pointer text-gray-400 hover:text-white hover:bg-[#140606]' data-tab='voucher' type='button'>
<i class='fa-solid fa-ticket'/> Voucher
</button>
</div>
<!-- ADMIN STATISTIK SECTION -->
<div class='space-y-5' id='adminStatistikSection'>
<div class='flex flex-col md:flex-row justify-between items-start md:items-center bg-[#0c0404] border border-[#260f0f] p-5 rounded-3xl shadow-xl gap-3'>
<div>
<h3 class='text-sm font-bold text-white flex items-center gap-2'>
<i class='fa-solid fa-chart-line text-red-500'/> Ringkasan Keuangan & Performa Store
</h3>
<p class='text-xs text-gray-400 mt-0.5'>Data dihitung secara otomatis dari transaksi berstatus Completed & Paid</p>
</div>
<button class='bg-[#1a0505] hover:bg-red-900 border border-red-900/50 text-red-200 text-xs font-bold px-4 py-2.5 rounded-xl transition flex items-center gap-2 cursor-pointer shadow' id='btnRefreshStats' type='button'>
<i class='fa-solid fa-rotate-right'/> Refresh Data
</button>
</div>
<!-- Income Stats Grid -->
<div class='grid grid-cols-2 md:grid-cols-4 gap-3.5'>
<div class='bg-gradient-to-br from-[#0c0404] to-[#120505] border border-[#260f0f] p-4.5 rounded-3xl space-y-2 shadow-xl relative overflow-hidden group hover:border-red-600/40 transition'>
<div class='absolute top-0 right-0 w-20 h-20 bg-cyan-500/5 rounded-bl-full pointer-events-none'/>
<div class='flex justify-between items-center'>
<span class='text-[10px] text-gray-400 font-extrabold uppercase tracking-widest'>Hari Ini</span>
<div class='w-7 h-7 rounded-xl bg-cyan-950/60 border border-cyan-800 flex items-center justify-center text-cyan-400 text-xs'>
<i class='fa-solid fa-calendar-day'/>
</div>
</div>
<div class='text-sm md:text-base font-black text-cyan-400 truncate' id='statIncomeDaily'>Rp 0</div>
</div>
<div class='bg-gradient-to-br from-[#0c0404] to-[#120505] border border-[#260f0f] p-4.5 rounded-3xl space-y-2 shadow-xl relative overflow-hidden group hover:border-red-600/40 transition'>
<div class='absolute top-0 right-0 w-20 h-20 bg-emerald-500/5 rounded-bl-full pointer-events-none'/>
<div class='flex justify-between items-center'>
<span class='text-[10px] text-gray-400 font-extrabold uppercase tracking-widest'>Minggu Ini</span>
<div class='w-7 h-7 rounded-xl bg-emerald-950/60 border border-emerald-800 flex items-center justify-center text-emerald-400 text-xs'>
<i class='fa-solid fa-calendar-week'/>
</div>
</div>
<div class='text-sm md:text-base font-black text-emerald-400 truncate' id='statIncomeWeekly'>Rp 0</div>
</div>
<div class='bg-gradient-to-br from-[#0c0404] to-[#120505] border border-[#260f0f] p-4.5 rounded-3xl space-y-2 shadow-xl relative overflow-hidden group hover:border-red-600/40 transition'>
<div class='absolute top-0 right-0 w-20 h-20 bg-amber-500/5 rounded-bl-full pointer-events-none'/>
<div class='flex justify-between items-center'>
<span class='text-[10px] text-gray-400 font-extrabold uppercase tracking-widest'>Bulan Ini</span>
<div class='w-7 h-7 rounded-xl bg-amber-950/60 border border-amber-800 flex items-center justify-center text-amber-400 text-xs'>
<i class='fa-solid fa-calendar-days'/>
</div>
</div>
<div class='text-sm md:text-base font-black text-amber-400 truncate' id='statIncomeMonthly'>Rp 0</div>
</div>
<div class='bg-gradient-to-br from-[#1a0505] to-[#0c0404] border border-red-600/50 p-4.5 rounded-3xl space-y-2 shadow-xl relative overflow-hidden group'>
<div class='absolute top-0 right-0 w-20 h-20 bg-red-500/10 rounded-bl-full pointer-events-none'/>
<div class='flex justify-between items-center'>
<span class='text-[10px] text-red-200 font-extrabold uppercase tracking-widest'>All Time</span>
<div class='w-7 h-7 rounded-xl bg-red-950 border border-red-700 flex items-center justify-center text-red-500 text-xs'>
<i class='fa-solid fa-sack-dollar'/>
</div>
</div>
<div class='text-sm md:text-base font-black text-red-500 truncate' id='statIncomeAllTime'>Rp 0</div>
</div>
</div>
<!-- Performance Metric Cards -->
<div class='grid grid-cols-1 md:grid-cols-3 gap-3.5'>
<div class='bg-[#0c0404] border border-[#260f0f] p-5 rounded-3xl flex items-center justify-between shadow-xl'>
<div>
<span class='text-xs text-gray-400 font-semibold block'>Estimasi Profit Bersih</span>
<div class='text-base md:text-lg font-black text-emerald-400 mt-1' id='statNetProfit'>Rp 0</div>
</div>
<div class='w-12 h-12 rounded-2xl bg-emerald-950/40 border border-emerald-800/60 flex items-center justify-center text-emerald-400 shadow-inner'>
<i class='fa-solid fa-chart-pie text-base'/>
</div>
</div>
<div class='bg-[#0c0404] border border-[#260f0f] p-5 rounded-3xl flex items-center justify-between shadow-xl'>
<div>
<span class='text-xs text-gray-400 font-semibold block'>Order Completed</span>
<div class='text-base md:text-lg font-black text-white mt-1' id='statCompletedOrders'>0 Pesanan</div>
</div>
<div class='w-12 h-12 rounded-2xl bg-[#140606] border border-[#260f0f] flex items-center justify-center text-gray-300 shadow-inner'>
<i class='fa-solid fa-circle-check text-base text-emerald-500'/>
</div>
</div>
<div class='bg-[#0c0404] border border-[#260f0f] p-5 rounded-3xl flex items-center justify-between shadow-xl'>
<div>
<span class='text-xs text-gray-400 font-semibold block'>Pelanggan Unik</span>
<div class='text-base md:text-lg font-black text-white mt-1' id='statUniqueCustomers'>0 Orang</div>
</div>
<div class='w-12 h-12 rounded-2xl bg-[#140606] border border-[#260f0f] flex items-center justify-center text-gray-300 shadow-inner'>
<i class='fa-solid fa-users text-base text-red-400'/>
</div>
</div>
</div>
</div>
<!-- ADMIN ORDER SECTION -->
<div class='space-y-4 hidden' id='adminOrderSection'>
<div class='flex flex-col md:flex-row justify-between items-start md:items-center bg-[#0c0404] border border-[#260f0f] p-5 rounded-3xl shadow-xl gap-3'>
<div>
<h3 class='text-sm font-bold text-white flex items-center gap-2'>
<i class='fa-solid fa-list-check text-red-500'/> Kelola Transaksi Masuk
</h3>
<p class='text-xs text-gray-400 mt-0.5'>Monitor status pembayaran dan progres pengerjaan pesanan klien</p>
</div>
<button class='bg-red-950/60 border border-red-800/80 hover:bg-red-900 text-red-200 text-xs font-bold px-4 py-2.5 rounded-2xl transition flex items-center gap-2 cursor-pointer shadow' id='btnClearAllOrders' type='button'>
<i class='fa-solid fa-trash-can text-red-400'/> Hapus Semua Transaksi
</button>
</div>
<!-- Filter Buttons -->
<div class='flex flex-wrap gap-2 pt-1 bg-[#0c0404] border border-[#260f0f] p-3.5 rounded-3xl shadow-xl'>
<button class='filter-btn bg-red-700 text-white text-xs font-bold px-4 py-2.5 rounded-xl transition cursor-pointer shadow' data-filter='all' type='button'>SEMUA</button>
<button class='filter-btn bg-[#140606] border border-[#260f0f] text-gray-300 text-xs font-bold px-4 py-2.5 rounded-xl transition cursor-pointer hover:bg-[#1a0808]' data-filter='pending' type='button'>PENDING</button>
<button class='filter-btn bg-[#140606] border border-[#260f0f] text-gray-300 text-xs font-bold px-4 py-2.5 rounded-xl transition cursor-pointer hover:bg-[#1a0808]' data-filter='paid' type='button'>PAID</button>
<button class='filter-btn bg-[#140606] border border-[#260f0f] text-gray-300 text-xs font-bold px-4 py-2.5 rounded-xl transition cursor-pointer hover:bg-[#1a0808]' data-filter='processing' type='button'>PROCESSING</button>
<button class='filter-btn bg-[#140606] border border-[#260f0f] text-gray-300 text-xs font-bold px-4 py-2.5 rounded-xl transition cursor-pointer hover:bg-[#1a0808]' data-filter='completed' type='button'>COMPLETED</button>
<button class='filter-btn bg-[#140606] border border-[#260f0f] text-gray-300 text-xs font-bold px-4 py-2.5 rounded-xl transition cursor-pointer hover:bg-[#1a0808]' data-filter='cancelled' type='button'>CANCELLED</button>
</div>
<div class='space-y-3' id='adminOrderList'/>
</div>
<!-- ADMIN PELANGGAN SECTION -->
<div class='space-y-4 hidden' id='adminPelangganSection'>
<div class='bg-[#0c0404] border border-[#260f0f] p-6 rounded-3xl shadow-xl space-y-4'>
<div class='border-b border-[#260f0f] pb-3.5'>
<h3 class='font-bold text-sm text-white flex items-center gap-2'>
<i class='fa-solid fa-users text-red-500'/> Daftar Pelanggan Nuvera Store
</h3>
<p class='text-xs text-gray-400 mt-0.5'>Rekapan data kontak dan total belanja pelanggan setia</p>
</div>
<div class='space-y-3' id='adminCustomerList'/>
</div>
</div>
<!-- ADMIN LAYANAN SECTION -->
<div class='space-y-5 hidden' id='adminLayananSection'>
<div class='bg-[#0c0404] border border-[#260f0f] p-6 rounded-3xl space-y-4 shadow-xl'>
<h3 class='font-bold text-sm text-white flex items-center gap-2' id='serviceFormTitle'>
<i class='fa-solid fa-circle-plus text-red-500'/> Tambah Paket Joki Baru
</h3>
<div class='grid grid-cols-1 md:grid-cols-3 gap-3.5 text-xs'>
<div class='space-y-1.5'>
<label class='text-gray-300 block font-semibold'>Kategori Paket (Cth: Paket Epic) *</label>
<input class='w-full p-3.5 rounded-2xl' id='newServiceCategory' placeholder='Paket Epic' type='text'/>
</div>
<div class='space-y-1.5'>
<label class='text-gray-300 block font-semibold'>Nama Paket / Rank *</label>
<input class='w-full p-3.5 rounded-2xl' id='newServiceName' placeholder='Epic V - Legend V' type='text'/>
</div>
<div class='space-y-1.5'>
<label class='text-gray-300 block font-semibold'>Harga (Rp) *</label>
<input class='w-full p-3.5 rounded-2xl' id='newServicePrice' min='0' placeholder='100000' type='number'/>
</div>
</div>
<div class='flex gap-2 pt-1'>
<button class='bg-red-700 hover:bg-red-600 text-white font-bold px-5 py-3.5 rounded-2xl transition text-xs w-full cursor-pointer shadow flex items-center justify-center gap-2' id='btnAddService' type='button'>
<i class='fa-solid fa-save'/> Simpan Paket Baru
</button>
<button class='bg-[#1f0a0a] hover:bg-red-700 text-white font-bold px-5 py-3.5 rounded-2xl transition text-xs hidden cursor-pointer border border-red-900' id='btnCancelEditService' type='button'>
Batal
</button>
</div>
</div>
<div class='bg-[#0c0404] border border-[#260f0f] p-6 rounded-3xl space-y-4 shadow-xl'>
<div class='border-b border-[#260f0f] pb-3.5'>
<h3 class='font-bold text-sm text-white flex items-center gap-2'>
<i class='fa-solid fa-list-check text-red-500'/> Daftar Paket Joki Tersedia
</h3>
<p class='text-xs text-gray-400 mt-0.5'>Aktifkan, nonaktifkan, atau edit harga paket sesuai kebutuhan</p>
</div>
<div class='space-y-3 text-xs' id='adminServiceList'/>
</div>
</div>
<!-- ADMIN VOUCHER SECTION -->
<div class='space-y-5 hidden' id='adminVoucherSection'>
<div class='bg-[#0c0404] border border-[#260f0f] p-6 rounded-3xl space-y-4 shadow-xl'>
<h3 class='font-bold text-sm text-white flex items-center gap-2'>
<i class='fa-solid fa-ticket text-red-500'/> Buat Voucher Diskon Baru
</h3>
<div class='grid grid-cols-1 md:grid-cols-2 gap-3.5 text-xs'>
<div class='space-y-1.5'>
<label class='text-gray-300 block font-semibold'>Kode Voucher *</label>
<input class='w-full p-3.5 rounded-2xl uppercase font-bold tracking-wider' id='newVoucherCode' placeholder='NUVERA25' type='text'/>
</div>
<div class='space-y-1.5'>
<label class='text-gray-300 block font-semibold'>Diskon (%) *</label>
<input class='w-full p-3.5 rounded-2xl' id='newVoucherDiscount' max='100' min='1' placeholder='10' type='number'/>
</div>
<div class='space-y-1.5'>
<label class='text-gray-300 block font-semibold'>Batas Maksimal Penggunaan *</label>
<input class='w-full p-3.5 rounded-2xl' id='newVoucherMax' min='1' placeholder='50' type='number'/>
</div>
<div class='space-y-1.5'>
<label class='text-gray-300 block font-semibold'>Masa Kadaluarsa *</label>
<input class='w-full p-3.5 rounded-2xl text-white' id='newVoucherExpired' type='date'/>
</div>
</div>
<button class='bg-red-700 hover:bg-red-600 text-white font-bold px-4 py-3.5 rounded-2xl transition text-xs w-full cursor-pointer shadow flex items-center justify-center gap-2' id='btnAddVoucher' type='button'>
<i class='fa-solid fa-plus'/> Simpan Voucher Baru
</button>
</div>
<div class='space-y-3' id='adminVoucherList'/>
</div>
</div>
<!-- FLOATING WHATSAPP BUTTON -->
<a class='fixed bottom-6 right-6 z-40 bg-emerald-600 hover:bg-emerald-500 text-white w-14 h-14 rounded-full flex items-center justify-center shadow-2xl shadow-emerald-950/80 transition transform hover:scale-110 border-2 border-emerald-400/50 group cursor-pointer' href='https://wa.me/6285173302020?text=Halo%20Admin%20Nuvera%20Joki%20Store,%20saya%20mau%20tanya-tanya%20tentang%20jasa%20joki.' target='_blank' title='Chat Admin via WhatsApp'>
<i class='fa-brands fa-whatsapp text-2xl group-hover:rotate-12 transition-transform'/>
<span class='absolute right-16 bg-[#0c0404] text-white text-[11px] font-bold px-3 py-1.5 rounded-xl border border-emerald-500/40 shadow-lg whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none'>Chat Admin</span>
</a>
<!-- MODAL AUTH ADMIN -->
<div class='fixed inset-0 bg-black/90 backdrop-blur-sm items-center justify-center p-4 z-50 flex' id='adminAuthModal' style='display: none;'>
<div class='bg-[#0c0404] border border-red-600/60 p-6 rounded-3xl max-w-xs w-full space-y-4 text-center mx-auto shadow-2xl'>
<div class='w-14 h-14 bg-red-950/40 border border-red-600 rounded-2xl flex items-center justify-center mx-auto text-red-500 shadow-inner'>
<i class='fa-solid fa-lock text-xl'/>
</div>
<div>
<h3 class='text-sm font-bold text-white'>Akses Admin Panel</h3>
<p class='text-xs text-gray-400 mt-1'>Masukkan PIN Khusus Admin.</p>
</div>
<div class='space-y-2'>
<input class='w-full p-3.5 rounded-2xl text-center font-bold tracking-widest text-sm' id='adminPinInput' placeholder='PIN Admin' type='password'/>
<p class='text-[11px] text-red-400 hidden' id='adminPinError'>PIN Salah!</p>
</div>
<div class='flex gap-2.5 pt-1'>
<button class='flex-1 bg-[#140606] border border-[#260f0f] text-gray-300 py-3 rounded-2xl text-xs font-bold transition cursor-pointer' id='btnCancelAdminAuth' type='button'>Batal</button>
<button class='flex-1 bg-red-700 hover:bg-red-600 text-white py-3 rounded-2xl text-xs font-bold transition cursor-pointer shadow' id='btnSubmitAdminAuth' type='button'>Masuk</button>
</div>
<p class='text-[10px] text-gray-500'>Default: <span class='text-gray-300 font-mono font-bold'>192034</span></p>
</div>
</div>
<!-- MODAL AUTH PENJOKI -->
<div class='fixed inset-0 bg-black/90 backdrop-blur-sm items-center justify-center p-4 z-50 flex' id='penjokiAuthModal' style='display: none;'>
<div class='bg-[#0c0404] border border-emerald-600/60 p-6 rounded-3xl max-w-xs w-full space-y-4 text-center mx-auto shadow-2xl'>
<div class='w-14 h-14 bg-emerald-950/40 border border-emerald-600 rounded-2xl flex items-center justify-center mx-auto text-emerald-400 shadow-inner'>
<i class='fa-solid fa-gamepad text-xl'/>
</div>
<div>
<h3 class='text-sm font-bold text-white'>Akses Area Penjoki</h3>
<p class='text-xs text-gray-400 mt-1'>Masukkan PIN Penjoki.</p>
</div>
<div class='space-y-2'>
<input class='w-full p-3.5 rounded-2xl text-center font-bold tracking-widest text-sm' id='penjokiPinInput' placeholder='PIN Penjoki' type='password'/>
<p class='text-[11px] text-red-400 hidden' id='penjokiPinError'>PIN Salah!</p>
</div>
<div class='flex gap-2.5 pt-1'>
<button class='flex-1 bg-[#140606] border border-[#260f0f] text-gray-300 py-3 rounded-2xl text-xs font-bold transition cursor-pointer' id='btnCancelPenjokiAuth' type='button'>Batal</button>
<button class='flex-1 bg-red-700 hover:bg-red-600 text-white py-3 rounded-2xl text-xs font-bold transition cursor-pointer shadow' id='btnSubmitPenjokiAuth' type='button'>Masuk</button>
</div>
<p class='text-[10px] text-gray-500'>Default: <span class='text-gray-300 font-mono font-bold'>200203</span></p>
</div>
</div>
<!-- MODAL PEMBAYARAN QRIS -->
<div class='fixed inset-0 bg-black/90 backdrop-blur-sm items-center justify-center p-4 z-50 overflow-y-auto flex' id='paymentModal' style='display: none;'>
<div class='bg-[#0c0404] border border-red-600/60 p-6 rounded-3xl max-w-sm w-full space-y-4 text-center mx-auto shadow-2xl'>
<div class='flex justify-between items-center border-b border-[#260f0f] pb-3.5'>
<h3 class='text-sm font-bold text-white flex items-center gap-2'>
<i class='fa-solid fa-qrcode text-red-500'/> Pembayaran QRIS NUVERA
</h3>
<button class='text-gray-400 hover:text-white text-xl p-1 cursor-pointer' id='btnCloseModal' type='button'>×</button>
</div>
<div class='bg-[#070202] border border-[#260f0f] p-4 rounded-2xl text-left space-y-2 text-xs'>
<div class='flex justify-between items-center'>
<span class='text-gray-400'>Kode Transaksi:</span>
<div class='flex items-center gap-2'>
<span class='font-bold text-red-500' id='modalOrderCode'>NVR-XXXXXX</span>
<button class='bg-[#1a0505] hover:bg-red-900 border border-red-900 text-red-300 px-2 py-1 rounded-lg text-[10px] cursor-pointer transition' id='btnCopyModalCode' type='button'><i class='fa-regular fa-copy'/></button>
</div>
</div>
<div class='flex justify-between'>
<span class='text-gray-400'>Total Pembayaran:</span>
<span class='font-bold text-emerald-400 text-sm' id='modalTotal'>Rp 0</span>
</div>
</div>
<div class='bg-white p-4 rounded-2xl max-w-[260px] mx-auto text-black shadow-2xl border-4 border-red-600/20'>
<img alt='QRIS Nuvera' class='w-full aspect-square object-contain mx-auto rounded-lg' src='https://cdn.phototourl.com/member/2026-09-30-58c80a0a-6f60-497c-9f2d-fdabb7f80488.jpg'/>
<p class='text-[10px] text-center text-gray-700 mt-2 font-black tracking-wider uppercase'>SATU QRIS UNTUK SEMUA BANK / E-WALLET</p>
</div>
<p class='text-xs text-gray-300'>Scan QRIS di atas, lalu kirim bukti transfer ke WhatsApp Admin.</p>
<div class='space-y-2.5 pt-1'>
<button class='w-full bg-emerald-600 hover:bg-emerald-500 text-white font-bold py-3.5 rounded-2xl text-xs transition flex items-center justify-center gap-2 shadow-lg cursor-pointer' id='btnPayWA' type='button'>
<i class='fa-brands fa-whatsapp text-lg'/> Kirim Bukti & Kode ke WA Admin
</button>
<button class='w-full bg-[#140606] border border-[#260f0f] hover:bg-[#1f0a0a] text-gray-300 font-bold py-3 rounded-2xl text-xs transition cursor-pointer' id='btnTrackModal' type='button'>
Lacak Progress Pesanan
</button>
</div>
</div>
</div>
<!-- MODAL KELOLA ORDER ADMIN -->
<div class='fixed inset-0 bg-black/90 backdrop-blur-sm items-center justify-center p-4 z-50 overflow-y-auto flex' id='kelolaModal' style='display: none;'>
<div class='bg-[#0c0404] border border-red-600/60 p-6 rounded-3xl max-w-md w-full space-y-4 text-left text-xs mx-auto shadow-2xl'>
<div class='flex justify-between items-center border-b border-[#260f0f] pb-3.5'>
<h3 class='font-bold text-white text-sm' id='kelolaModalTitle'>Kelola Order</h3>
<button class='text-gray-400 hover:text-white text-xl p-1 cursor-pointer' id='btnCloseKelola' type='button'>×</button>
</div>
<div class='font-semibold text-gray-200 border-b border-[#260f0f] pb-2 text-sm' id='kelolaServiceDesc'/>
<div class='space-y-2 bg-[#070202] p-4 rounded-2xl border border-[#260f0f]'>
<span class='font-bold text-gray-400 block mb-1 uppercase text-[10px] tracking-wider'>Detail Pesanan</span>
<div class='flex justify-between'><span class='text-gray-400'>Paket:</span> <span class='text-white font-medium' id='kelolaPkg'/></div>
<div class='flex justify-between'><span class='text-gray-400'>Catatan:</span> <span class='text-amber-400 font-bold' id='kelolaNotes'/></div>
</div>
<div class='space-y-2 bg-[#070202] p-4 rounded-2xl border border-red-900/40'>
<span class='font-bold text-red-400 block mb-1 uppercase text-[10px] flex items-center gap-1.5 tracking-wider'><i class='fa-solid fa-key'/> Data Login MLBB Client</span>
<div class='flex justify-between'><span class='text-gray-400'>Login via:</span> <span class='text-white font-medium' id='kelolaLoginType'/></div>
<div class='flex justify-between'><span class='text-gray-400'>ID & Zone:</span> <span class='text-white font-bold' id='kelolaGameId'/></div>
<div class='flex justify-between'><span class='text-gray-400'>User / Email:</span> <span class='text-cyan-400 font-bold' id='kelolaAccountUser'/></div>
<div class='flex justify-between'><span class='text-gray-400'>Password:</span> <span class='text-pink-400 font-bold' id='kelolaAccountPass'/></div>
<div class='flex justify-between'><span class='text-gray-400'>No. WA Client:</span> <span class='text-emerald-400 font-bold' id='kelolaWa'/></div>
</div>
<div class='space-y-2 bg-[#070202] p-4 rounded-2xl border border-[#260f0f] hidden' id='kelolaPenjokiContainer'>
<span class='font-bold text-emerald-400 block uppercase text-[10px] tracking-wider'><i class='fa-solid fa-shield-check mr-1'/> Bukti Selesai Penjoki</span>
<div class='flex justify-between'><span class='text-gray-400'>Penjoki:</span> <span class='text-white font-bold' id='kelolaPjName'/></div>
<div class='flex justify-between'><span class='text-gray-400'>WA Penjoki:</span> <span class='text-cyan-400 font-bold' id='kelolaPjWa'/></div>
<div class='grid grid-cols-2 gap-2 pt-2' id='kelolaPjScreenshots'/>
</div>
<div class='space-y-1.5'>
<label class='text-gray-300 font-medium block'>Ubah Status Transaksi</label>
<select class='w-full p-3.5 rounded-2xl text-xs font-bold' id='kelolaStatusSelect'>
<option value='pending'>PENDING (Belum Bayar)</option>
<option value='paid'>PAID (Sudah Bayar)</option>
<option value='processing'>PROCESSING (Sedang Dijoki)</option>
<option value='completed'>COMPLETED (Selesai)</option>
<option value='cancelled'>CANCELLED (Dibatalkan)</option>
</select>
</div>
<div class='flex gap-2.5 pt-2'>
<button class='flex-1 bg-red-700 hover:bg-red-600 text-white font-bold py-3.5 rounded-2xl transition text-xs cursor-pointer shadow' id='btnSaveKelola' type='button'>Simpan Perubahan</button>
<button class='bg-red-950 border border-red-800 text-red-200 hover:bg-red-900 font-bold px-4 py-3.5 rounded-2xl transition text-xs cursor-pointer' id='btnDeleteOrder' type='button'><i class='fa-solid fa-trash'/></button>
</div>
</div>
</div>
<!-- JAVASCRIPT LOGIC SYSTEM -->
<script>//<![CDATA[
document.addEventListener('DOMContentLoaded', () => {
let selectedServiceId = null;
let currentVoucher = null;
let currentActiveOrder = null;
let selectedOrderFilter = 'all';
let editingServiceId = null;
let orderMode = 'paket';
let starCountValue = 1;
const DEFAULT_ADMIN_PIN = "192034";
const DEFAULT_PENJOKI_PIN = "200203";
// Toast Notification System
function showToast(message, type = 'success') {
const container = document.getElementById('toastContainer');
const toast = document.createElement('div');
const bgColors = type === 'success' ? 'bg-emerald-950/90 border-emerald-600 text-emerald-200' : 'bg-red-950/90 border-red-600 text-red-200';
const icon = type === 'success' ? 'fa-circle-check text-emerald-400' : 'fa-triangle-exclamation text-red-400';
toast.className = `pointer-events-auto flex items-center gap-2.5 px-4 py-3 rounded-2xl border ${bgColors} shadow-xl text-xs font-bold transition transform translate-y-2 opacity-0 duration-300`;
toast.innerHTML = `<i class='fa-solid ${icon} text-sm'></i> <span>${message}</span>`;
container.appendChild(toast);
setTimeout(() => toast.classList.remove('translate-y-2', 'opacity-0'), 50);
setTimeout(() => {
toast.classList.add('translate-y-2', 'opacity-0');
setTimeout(() => toast.remove(), 300);
}, 3000);
}
// Inisialisasi Paket Joki
if (!localStorage.getItem('nuvera_services')) {
const initialServices = [
{ id: 'epic-1', category: 'Paket Epic', name: 'Epic V - Legend V', price: 170000, active: true },
{ id: 'epic-2', category: 'Paket Epic', name: 'Epic I - Mythic', price: 230000, active: true },
{ id: 'epic-3', category: 'Paket Epic', name: 'Epic II - Mythic', price: 270000, active: true },
{ id: 'epic-4', category: 'Paket Epic', name: 'Epic III - Mythic', price: 305000, active: true },
{ id: 'epic-5', category: 'Paket Epic', name: 'Epic IV - Mythic', price: 340000, active: true },
{ id: 'epic-6', category: 'Paket Epic', name: 'Epic V - Mythic', price: 370000, active: true },
{ id: 'leg-1', category: 'Paket Legend', name: 'Legend V - Mythic', price: 200000, active: true },
{ id: 'leg-2', category: 'Paket Legend', name: 'Legend V - Honor', price: 510000, active: true },
{ id: 'leg-3', category: 'Paket Legend', name: 'Legend V - Glory', price: 1075000, active: true },
{ id: 'myth-1', category: 'Paket Mythic', name: 'Open Grading (Auto Bintang 15)', price: 210000, active: true },
{ id: 'myth-2', category: 'Paket Mythic', name: 'Mythic - Honor', price: 390000, active: true },
{ id: 'myth-3', category: 'Paket Mythic', name: 'Mythic - Glory', price: 940000, active: true },
{ id: 'myth-4', category: 'Paket Mythic', name: 'Glory - Immortal', price: 1390000, active: true }
];
localStorage.setItem('nuvera_services', JSON.stringify(initialServices));
}
if (!localStorage.getItem('nuvera_vouchers')) {
const initialVouchers = [
{ code: 'NUVERA10', discount: 10, max: 50, used: 0, expired: '2027-12-31' }
];
localStorage.setItem('nuvera_vouchers', JSON.stringify(initialVouchers));
}
const navJoki = document.getElementById('navJoki');
const navCek = document.getElementById('navCek');
const navPenjoki = document.getElementById('navPenjoki');
const navAdmin = document.getElementById('navAdmin');
const sectionCustomer = document.getElementById('sectionCustomer');
const sectionAdmin = document.getElementById('sectionAdmin');
const subBtnOrder = document.getElementById('subBtnOrder');
const subBtnTrack = document.getElementById('subBtnTrack');
const subBtnPenjoki = document.getElementById('subBtnPenjoki');
const subSectionOrder = document.getElementById('subSectionOrder');
const subSectionTrack = document.getElementById('subSectionTrack');
const subSectionPenjoki = document.getElementById('subSectionPenjoki');
const btnModePaket = document.getElementById('btnModePaket');
const btnModeBintang = document.getElementById('btnModeBintang');
const containerModePaket = document.getElementById('containerModePaket');
const containerModeBintang = document.getElementById('containerModeBintang');
const starRankSelect = document.getElementById('starRankSelect');
const starCountDisplay = document.getElementById('starCountDisplay');
const btnStarMinus = document.getElementById('btnStarMinus');
const btnStarPlus = document.getElementById('btnStarPlus');
btnModePaket.addEventListener('click', () => {
orderMode = 'paket';
btnModePaket.className = "flex-1 py-3 text-xs font-bold rounded-xl bg-red-700 text-white transition shadow cursor-pointer";
btnModeBintang.className = "flex-1 py-3 text-xs font-bold rounded-xl text-gray-400 hover:text-white transition cursor-pointer";
containerModePaket.classList.remove('hidden');
containerModeBintang.classList.add('hidden');
calculateTotal();
});
btnModeBintang.addEventListener('click', () => {
orderMode = 'bintang';
btnModeBintang.className = "flex-1 py-3 text-xs font-bold rounded-xl bg-red-700 text-white transition shadow cursor-pointer";
btnModePaket.className = "flex-1 py-3 text-xs font-bold rounded-xl text-gray-400 hover:text-white transition cursor-pointer";
containerModeBintang.classList.remove('hidden');
containerModePaket.classList.add('hidden');
calculateTotal();
});
btnStarMinus.addEventListener('click', () => {
if (starCountValue > 1) {
starCountValue--;
starCountDisplay.innerText = starCountValue;
calculateTotal();
}
});
btnStarPlus.addEventListener('click', () => {
starCountValue++;
starCountDisplay.innerText = starCountValue;
calculateTotal();
});
starRankSelect.addEventListener('change', calculateTotal);
function resetNavStyles() {
navJoki.className = "bg-[#0c0404] hover:bg-[#1a0808] text-gray-300 hover:text-white px-3.5 py-2.5 rounded-xl border border-[#260f0f] transition cursor-pointer";
navCek.className = "bg-[#0c0404] hover:bg-[#1a0808] text-gray-300 hover:text-white px-3.5 py-2.5 rounded-xl border border-[#260f0f] transition cursor-pointer";
navPenjoki.className = "bg-[#0c0404] hover:bg-[#1a0808] text-gray-300 hover:text-white px-3.5 py-2.5 rounded-xl border border-[#260f0f] transition flex items-center gap-1.5 cursor-pointer";
navAdmin.className = "bg-[#0c0404] hover:bg-[#1a0808] text-gray-300 hover:text-white px-3.5 py-2.5 rounded-xl border border-[#260f0f] transition flex items-center gap-1.5 cursor-pointer";
}
navJoki.addEventListener('click', () => {
resetNavStyles();
navJoki.className = "bg-gradient-to-r from-red-700 to-red-900 text-white px-4 py-2.5 rounded-xl transition shadow-md shadow-red-950/50 cursor-pointer border border-red-600/40";
sectionCustomer.style.display = "block";
sectionAdmin.style.display = "none";
subBtnOrder.click();
renderCustomerPackages();
});
navCek.addEventListener('click', () => {
resetNavStyles();
navCek.className = "bg-gradient-to-r from-red-700 to-red-900 text-white px-4 py-2.5 rounded-xl transition shadow-md shadow-red-950/50 cursor-pointer border border-red-600/40";
sectionCustomer.style.display = "block";
sectionAdmin.style.display = "none";
subBtnTrack.click();
});
navPenjoki.addEventListener('click', () => {
const isPenjokiAuth = sessionStorage.getItem('nuvera_penjoki_auth') === 'true';
if (isPenjokiAuth) {
openPenjokiArea();
} else {
document.getElementById('penjokiAuthModal').style.display = 'flex';
document.getElementById('penjokiPinInput').value = '';
document.getElementById('penjokiPinError').classList.add('hidden');
}
});
subBtnPenjoki.addEventListener('click', () => {
const isPenjokiAuth = sessionStorage.getItem('nuvera_penjoki_auth') === 'true';
if (isPenjokiAuth) {
openPenjokiArea();
} else {
document.getElementById('penjokiAuthModal').style.display = 'flex';
document.getElementById('penjokiPinInput').value = '';
document.getElementById('penjokiPinError').classList.add('hidden');
}
});
document.getElementById('btnSubmitPenjokiAuth').addEventListener('click', () => {
const inputPin = document.getElementById('penjokiPinInput').value.trim();
const currentPin = localStorage.getItem('nuvera_penjoki_pin') || DEFAULT_PENJOKI_PIN;
if (inputPin === currentPin) {
sessionStorage.setItem('nu