
<!DOCTYPE html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>  Amar Seba </title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://site-assets.fontawesome.com/releases/v6.7.2/css/all.css">
     <link rel="shortcut icon" href="https://i.postimg.cc/90Z81WY4/Whats-App-Image-2025-06-04-at-13-33-05-1b06f411.jpg" />
    <link href="https://fonts.maateen.me/solaiman-lipi/font.css" rel="stylesheet">
     <style>
/* ==================== Body & Global ==================== */
body {
    font-family: 'SolaimanLipi', Arial, sans-serif !important; /* সুন্দর বাংলা ফন্ট */
    margin: 0;
    padding: 0;
    background: linear-gradient(145deg, #fff8e1, #fffefb); /* হালকা গোল্ডেন-সাদা উজ্জ্বল গ্রেডিয়েন্ট */
    transition: background 0.5s ease, color 0.5s ease; /* smooth transition */
    color: #222; /* টেক্সট কালার */
    line-height: 1.6; /* পড়ার সুবিধার জন্য spacing */
    font-size: 16px; /* ডিফল্ট ফন্ট সাইজ */
}

/* সকল h1-h6 স্টাইল */
h1, h2, h3, h4, h5, h6 {
    color: #b8860b; /* গল্ডেন হেডিং কালার */
    margin-bottom: 0.5rem;
    font-weight: 700; /* হেডিংগুলো বোল্ড */
}

/* লিঙ্ক স্টাইল */
a {
    color: #b8860b; /* গল্ডেন লিঙ্ক কালার */
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #daa520; /* হোভার করলে উজ্জ্বল গোল্ড */
    text-decoration: underline;
}

/* প্যারাগ্রাফ স্টাইল */
p {
    margin-bottom: 1rem;
}

/* ছোট স্ক্রিনের জন্য responsive */
@media (max-width: 768px) {
    body {
        font-size: 15px;
        line-height: 1.5;
    }
}

/* ==================== Navbar Styles ==================== */
.navbar {
    background: linear-gradient(90deg, #ffffff, #f0f4f8);
    border-bottom: 2px solid #f5c518; /* গ্লোডেন হাইলাইট */
    padding: 0.5rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.navbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0;
}

.navbar-brand img {
    height: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(245,197,24,0.7);
}

/* Toggler Button */
.navbar-toggler {
    border: none;
    background: #2a3f5f;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: #1e2832;
    box-shadow: 0 0 12px rgba(245,197,24,0.7);
}

/* Dropdown Links */
.navbar .dropdown-toggle {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #222;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar .dropdown-toggle:hover {
    background: linear-gradient(145deg, #fffbea, #fff8f0);
    color: #f5c518;
    box-shadow: 0 4px 12px rgba(245,197,24,0.4);
}

.navbar .dropdown-toggle::after {
    display: none;
}

/* ==================== Sidebar Styles ==================== */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 250px;
    height: calc(100vh - 70px);
    background: linear-gradient(145deg, #0d1b2a, #1b2a41); /* নেভি থিম */
    border-right: 1px solid #222;
    overflow-y: auto;
    transition: width 0.5s ease;
    z-index: 999;
    padding-top: 20px;
    color: #fff;
    box-shadow: 2px 0 12px rgba(0,0,0,0.3);
}

/* Nav Link */
.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 56px;
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    text-decoration: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    position: relative;
}

.sidebar .nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245,197,24,0.3);
    border: 1px solid #f5c518;
    background: linear-gradient(145deg, #1b2a41, #22354b);
}

/* Active Link Glow */
.sidebar .nav-link.active {
    border-color: #f5c518;
    background: linear-gradient(145deg, #22354b, #1b2a41);
    box-shadow: 0 6px 18px rgba(245,197,24,0.5), 0 0 12px rgba(245,197,24,0.3);
    color: #f5c518;
    animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
    0% { box-shadow: 0 6px 18px rgba(245,197,24,0.4), 0 0 12px rgba(245,197,24,0.2); }
    50% { box-shadow: 0 6px 20px rgba(245,197,24,0.6), 0 0 16px rgba(245,197,24,0.4); }
    100% { box-shadow: 0 6px 18px rgba(245,197,24,0.5), 0 0 12px rgba(245,197,24,0.3); }
}

/* Menu Icon & Title */
.sidebar .menu-icon {
    font-size: 22px;
    margin-right: 15px;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar .menu-title {
    font-size: 18px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.sidebar .nav-link:hover .menu-icon,
.sidebar .nav-link:hover .menu-title {
    color: #f5c518;
}

/* Premium Golden Seal */
.premium-seal {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd700 0%, #ffb700 60%, #ffdd44 100%);
    box-shadow: 0 0 8px rgba(255,215,0,0.6), 0 0 12px rgba(255,215,0,0.4) inset;
    margin-left: 8px;
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    margin-top: 70px;
    padding: 25px;
    background: #f4f4f4;
    min-height: calc(100vh - 70px);
    transition: all 0.5s ease;
}

/* Smooth Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(245,197,24,0.5);
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 220px; }
    .main-content { margin-left: 220px; padding: 15px; }
    .navbar-brand img { height: 40px; }
    .navbar-toggler { padding: 6px 10px; font-size: 1rem; }
    .sidebar .nav-link { height: 50px; font-size: 16px; }
}

/* Example Emoji Menu Titles */
.menu-title.dashboard::before { content: "🏠 "; }
.menu-title.users::before { content: "👥 "; }
.menu-title.settings::before { content: "⚙️ "; }
.menu-title.reports::before { content: "📊 "; }
.menu-title.support::before { content: "🛠️ "; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    .main-content {
        margin-left: 70px;
        padding: 15px;
    }
}

/* Mobile Responsive */
@media (max-width: 750px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
        z-index: 1050;
    }
    
    .sidebar.show {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }
    
    .main-content {
        margin-left: 0 !important;
        margin-top: 70px;
        padding: 15px;
    }
    
    .navbar-toggler {
        display: block;
    }
    
    .navbar {
        padding: 0.5rem 0.75rem;
    }
    
    .navbar .container-fluid {
        padding: 0;
        gap: 10px;
    }
    
    .navbar-toggler {
        margin-right: 10px;
        padding: 6px 10px;
        font-size: 1rem;
    }
    
    .navbar-brand img {
        height: 40px;
    }
    
    .navbar .ms-auto {
        gap: 10px;
    }
    
    .btn.btn-primary {
        padding: 5px 10px;
        font-size: 10px;
    }
    
    .navbar .dropdown-toggle img {
        width: 35px;
        height: 35px;
    }
    
    /* Overlay for mobile sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

.swal2-success-fix, .swal2-success-circular-line-left, .swal2-success-circular-line-right {
    background: transparent!important;
} 

@media (max-width: 767px) {
  .scrollable-content {
    overflow: scroll;
  }
}
</style>

  </head>
  <body class="with-welcome-text">
    <div class="container-scroller">
      <!-- partial:partials/_navbar.html -->
      <nav class="navbar navbar-expand-lg">
        <div class="container-fluid">
          <button class="navbar-toggler me-3" type="button" id="sidebarToggle">
            <i class="fa-solid fa-bars"></i>
          </button>
          
          <a class="navbar-brand" href="#">
            <img src="https://i.postimg.cc/90Z81WY4/Whats-App-Image-2025-06-04-at-13-33-05-1b06f411.jpg" alt="logo" style="height: 50px"/>
          </a>
          
          <div class="ms-auto d-flex align-items-center">
            <button class="btn btn-primary me-3"><span id="balance-display"></span>tk</button>
            
            <div class="dropdown">
              <a class="nav-link dropdown-toggle d-flex align-items-center" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown">
                <img class="rounded-circle" src="https://www.shareicon.net/data/512x512/2016/09/15/829459_man_512x512.png" alt="Profile" style="width: 40px; height: 40px;">
              </a>
              <ul class="dropdown-menu dropdown-menu-end">
                <li class="dropdown-header text-center">
                  <img class="rounded-circle mb-2" src="https://www.shareicon.net/data/512x512/2016/09/15/829459_man_512x512.png" alt="Profile" style="width: 60px; height: 60px;">
                  <p class="mb-1 fw-semibold">Hassan</p>
                  <p class="text-muted mb-0">online24250@gmail.com</p>
                </li>
                <li><hr class="dropdown-divider"></li>
                <li><a class="dropdown-item" href="logout.php"><i class="fa-solid fa-right-from-bracket me-2"></i>Sign Out</a></li>
              </ul>
            </div>
          </div>
        </div>
      </nav>
<!-- Sidebar HTML -->
<div class="container-fluid page-body-wrapper">
    <nav class="sidebar" id="sidebar">
        <ul class="nav">
        
        <li class="nav-item dashboard2.php">
    <a class="nav-link" href="dashboard2.php">
        <i class="fa fa-signature menu-icon"></i>
        <span class="menu-title">🔥ডাসবোর্ড🔥</span>
        <span class="new-seal"></span>
    </a>
</li>

          <!-- ================= মেন্যুয়াল সার্ভিস================= -->
<li class="nav-category auto-highlight"> 💥মেন্যুয়াল সার্ভিস 🟣</li>

<li class="nav-item sign_order">
    <a class="nav-link" href="sign_order.php">
        <i class="fa fa-signature menu-icon"></i>
        <span class="menu-title">সাইন কপি অর্ডার</span>
        <span class="new-seal"></span>
    </a>
</li>

<style>
/* ================= Auto সার্ভিস হাইলাইট ================= */
.nav-category.auto-highlight {
    font-weight: bold; /* বোল্ড টেক্সট */
    background: linear-gradient(135deg, #ffefba, #ffffff); /* হালকা গ্রেডিয়েন্ট */
    color: #333; /* টেক্সট কালার */
    padding: 12px 20px; /* উপরের এবং ডান-বাম স্পেস */
    border-radius: 10px; /* বক্সের কোণ গোল */
    margin-bottom: 12px; /* নিচের আইটেম থেকে দূরত্ব */
    display: inline-block; /* বক্সের মত দেখাবে */
    box-shadow: 0 3px 8px rgba(0,0,0,0.12); /* হালকা শ্যাডো */
    transition: transform 0.2s, box-shadow 0.2s; /* হালকা hover এফেক্ট */
}

/* Hover effect */
.nav-category.auto-highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.18);
}

/* রেসপনসিভ ডিজাইন */
@media (max-width: 768px) {
    .nav-category.auto-highlight {
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media (min-width: 769px) {
    .nav-category.auto-highlight {
        font-size: 16px;
    }
}
</style>
            <li class="nav-item nid_order">
                <a class="nav-link" href="nid_order.php">
                    <i class="fa fa-id-card menu-icon"></i>
                    <span class="menu-title">আইডি কার্ড অর্ডার</span>
                    <span class="new-seal"></span>
                </a>
            </li>

            <li class="nav-item order_one">
                <a class="nav-link" href="dashboard.php">
                    <i class="fa fa-map-marker-alt menu-icon"></i>
                    <span class="menu-title">সকল বায়োমেট্রিক</span>
                    <span class="new-seal"></span>
                </a>
            </li>

            <li class="nav-item file_work">
                <a class="nav-link" href="file_work.php">
                    <i class="fa-solid fa-files menu-icon"></i>
                    <span class="menu-title">অর্ডার ফাইল</span>
                    <span class="new-seal"></span>
                </a>
            </li>

            

        <!-- =================অটো সার্ভিস================= -->
<li class="nav-category clone-highlight"> 💥অটো সার্ভিস 🟠</li>

<style>
/* Clone সার্ভিস ডিজাইন */
.nav-category.clone-highlight {
    font-weight: bold; /* বোল্ড টেক্সট */
    color: #f0f4f8; /* টেক্সট কালার */
    background-color: #6a5acd; /* ব্যাকগ্রাউন্ড কালার (Slate Blue) */
    padding: 9px 18px; /* সামান্য স্পেস */
    border-radius: 6px; /* হালকা rounded corner */
    display: inline-block; /* বক্সের মত দেখাতে */
}

/* Hover effect (ঐচ্ছিক) */
.nav-category.clone-highlight:hover {
    background-color: #00fa9a; /* হালকা উজ্জ্বল রঙ হোভার এ */
}
</style>

            <li class="nav-item smartcard">
                <a class="nav-link" href="smartcard_form.php">
                    <i class="fa-solid fa-id-card menu-icon"></i>
                    <span class="menu-title">স্মার্টকার্ড মেইক</span>
                    <span class="new-seal"></span>
                </a>
            </li>
            <li class="nav-item dashborad">
                <a class="nav-link" href="nid.php">
                    <i class="fa fa-cogs menu-icon"></i>
                    <span class="menu-title">আইডি মেইক</span>
                    <span class="new-seal"></span>
                </a>
            </li>

            <li class="nav-item serverCopy">
                <a class="nav-link" href="serverCopy.php">
                    <i class="fa fa-server menu-icon"></i>
                    <span class="menu-title">সার্ভার কপি</span>
                    <span class="new-seal"></span>
                </a>
            </li>

            <li class="nav-item order_one">
                <a class="nav-link" href="sign_to_server.php">
                    <i class="fa-solid fa-database menu-icon"></i>
                    <span class="menu-title">সাইন টু সার্ভার কপি</span>
                    <span class="new-seal"></span>
                </a>
            </li>

            <li class="nav-item tinDownload">
                <a class="nav-link" href="tinDownload.php">
                    <i class="fa fa-mail-bulk menu-icon"></i>
                    <span class="menu-title">অটো টিন</span>
                    <span class="new-seal"></span>
                </a>
            </li>

            <li class="nav-item order_one">
                <a class="nav-link" href="bio_search.php">
                    <i class="fa fa-id-badge menu-icon"></i>
                    <span class="menu-title">অটো বায়ো</span>
                    <span class="new-seal"></span>
                </a>
            </li>

            <li class="nav-item order_one">
                <a class="nav-link" href="auto_nagad.php">
                    <i class="fa fa-chalkboard-teacher menu-icon"></i>
                    <span class="menu-title">নগদ ইনফো</span>
                    <span class="new-seal"></span>
                </a>
            </li>
            <li class="nav-item pass_info">
                <a class="nav-link" href="pass_info.php">
                    <i class="fa-solid fa-passport menu-icon"></i>
                    <span class="menu-title">পাসপোর্ট ভেরিফাই  কপি</span>
                </a>
            </li>

            <li class="nav-item birth">
                <a class="nav-link" href="birth.php">
                    <i class="fa-solid fa-file-pdf menu-icon"></i>
                    <span class="menu-title">নিবন্ধন মেইক</span>
                </a>
            </li>
            <li class="nav-item tinDownload">
                <a class="nav-link" href="server_pic.php">
                    <i class="fa fa-mail-bulk menu-icon"></i>
                    <span class="menu-title">ছবি ছাড়া সার্ভার কপি</span>
                    <span class="new-seal"></span>
                </a>
            </li>
            <li class="nav-item tinDownload">
                <a class="nav-link" href="ck_bio.php">
                    <i class="fa fa-mail-bulk menu-icon"></i>
                    <span class="menu-title">বায়োমেট্রিক যাচাই</span>
                    <span class="new-seal"></span>
                </a>
            </li>
            <li class="nav-item tinDownload">
                <a class="nav-link" href="num.php">
                    <i class="fa fa-mail-bulk menu-icon"></i>
                    <span class="menu-title">নাম্বার টু নাম ও ছবি</span>
                    <span class="new-seal"></span>
                </a>
            </li>
            

            <!-- ================= ক্লোন সার্ভিস ================= -->
<li class="nav-category shadharon-highlight"> 💥ক্লোন সার্ভিস 🟢</li>

<style>
/* সাধারণ সার্ভিস ডিজাইন */
.nav-category.shadharon-highlight {
    font-weight: bold; /* বোল্ড টেক্সট */
    color: #ffffff; /* টেক্সট কালার */
    background-color: #20b2aa; /* ব্যাকগ্রাউন্ড কালার (Light Sea Green) */
    padding: 9px 16px; /* উপরের-নিচের এবং ডান-বামের স্পেস */
    border-radius: 6px; /* হালকা rounded corner */
    display: inline-block; /* বক্সের মত দেখাতে */
    transition: background-color 0.2s; /* হোভার এফেক্ট smooth করতে */
}

/* Hover effect (ঐচ্ছিক) */
.nav-category.shadharon-highlight:hover {
    background-color:#7fff00; /* হালকা উজ্জ্বল রঙ হোভার এ */
}
</style>

            
            <li class="nav-item">
                <a class="nav-link" href="dead_form.php">
                    <i class="fa-solid fa-book-skull menu-icon"></i>
                    <span class="menu-title">মৃত্যু সনদ</span>
                </a>
            </li>

            <li class="nav-item">
                <a class="nav-link" href="ldtax_form.php">
                    <i class="fa-solid fa-landmark menu-icon"></i>
                    <span class="menu-title">ভুমি উন্নয়ন কর</span>
                </a>
            </li>

            <li class="nav-item">
                <a class="nav-link" href="surokkha_form.php">
                    <i class="fa-solid fa-syringe menu-icon"></i>
                    <span class="menu-title">সুরক্ষা ভ্যাকসিন</span>
                </a>
            </li>

            <li class="nav-item">
                <a class="nav-link" href="trade_form.php">
                    <i class="fa-solid fa-store menu-icon"></i>
                    <span class="menu-title">ট্রেড লাইসেন্স</span>
                </a>
            </li>

            <li class="nav-item">
                <a class="nav-link" href="nagorik-sonod.php">
                    <i class="fa-solid fa-id-card-clip menu-icon"></i>
                    <span class="menu-title">নাগরিক সনদ</span>
                </a>
            </li>

            <li class="nav-item">
                <a class="nav-link" href="create-uttoradhikar.php">
                    <i class="fa fa-sim-card menu-icon"></i>
                    <span class="menu-title">উত্তরাধিকার সনদ</span>
                </a>
            </li>

            <li class="nav-item">
                <a class="nav-link" href="ssc_certificate_from.php">
                    <i class="fa-solid fa-graduation-cap menu-icon"></i>
                    <span class="menu-title">এসএসসি সার্টিফিকেট</span>
                </a>
            </li>
            <!-- ================= অনান্য (গোল্ডেন) ================= -->
<li class="nav-category golden-highlight"> 🌟 গোল্ডেন 🌟 </li>

<style>
/* গোল্ডেন সার্ভিস ডিজাইন */
.nav-category.golden-highlight {
    font-weight: bold;
    color: #000000;
    background: linear-gradient(45deg, #FFD700, #FFA500); /* গোল্ডেন গ্রেডিয়েন্ট */
    padding: 9px 16px;
    border-radius: 8px;
    display: inline-block;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

/* Shine effect */
.nav-category.golden-highlight::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,0.6) 0%,
        rgba(255,255,255,0.2) 60%,
        transparent 100%
    );
    transform: skewX(-25deg);
}

/* Shine animation */
.nav-category.golden-highlight:hover::before {
    animation: shine-gold 1s ease;
}

@keyframes shine-gold {
    0% { left: -75%; }
    100% { left: 125%; }
}

/* Hover এ গ্লো বাড়বে */
.nav-category.golden-highlight:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.9), 0 0 40px rgba(255, 165, 0, 0.9);
}
</style>
            <li class="nav-item">
                <a class="nav-link" href="profile.php">
                    <i class="fa-solid fa-user menu-icon"></i>
                    <span class="menu-title">প্রোফাইল</span>
                </a>
            </li>

            <li class="nav-item recharge">
                <a class="nav-link" href="recharge.php">
                    <i class="fa-solid fa-bangladeshi-taka-sign menu-icon"></i>
                    <span class="menu-title">রিচার্জ করুন</span>
                </a>
            </li>

            <li class="nav-item work_history">
                <a class="nav-link" href="work_history.php">
                    <i class="fa-solid fa-rectangle-history menu-icon"></i>
                    <span class="menu-title">কাজের হিস্টোরি</span>
                </a>
            </li>

            <li class="nav-item add_remove_balance">
                <a class="nav-link" href="balance_add_remove.php">
                    <i class="fa-solid fa-plus-minus menu-icon"></i>
                    <span class="menu-title">ব্যাল্যন্স যুক্ত/বাদ</span>
                </a>
            </li>

            <li class="nav-item">
                <a class="nav-link" href="logout.php">
                    <i class="fa-solid fa-right-from-bracket menu-icon"></i>
                    <span class="menu-title">লগআউট</span>
                </a>
            </li>

        </ul>
    </nav>


        
        <!-- Sidebar overlay for mobile -->
        <div class="sidebar-overlay" id="sidebarOverlay"></div>
        
        <!-- Main Content Wrapper -->
        <div class="main-content">
        
        <!-- Include SweetAlert2 JS -->
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>

<script>
    // Check if msg and text are set in PHP
    </script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
    let previousBalance = null; // Variable to store the previous balance

    // Function to fetch balance data
    function fetchBalance() {
        $.ajax({
            url: 'pages/fetch_balance.php', // Path to the PHP file that returns the balance
            method: 'GET',
            dataType: 'json',
            success: function(response) {
                const currentBalance = response.balance;

                // Check if the balance has changed
                if (currentBalance !== previousBalance) {
                    // Update the balance display elements only if there is a change
                    $('#balance-display').text(currentBalance);

                    // Update the previous balance with the new value
                    previousBalance = currentBalance;
                }
            },
            error: function() {
                console.error('Failed to fetch balance.');
            }
        });
    }

    // Fetch balance on page load and every 5 seconds
    $(document).ready(function() {
        // Get current page URL
        var path = window.location.pathname;
        var page = path.split("/").pop();
        
        // Add active class based on current page
        $('.nav-link').each(function() {
            var linkHref = $(this).attr('href');
            if (linkHref && page === linkHref) {
                $(this).addClass('active');
            }
        });

        fetchBalance(); // Initial fetch
        setInterval(fetchBalance, 1000); // Check every second
    });
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
// Enhanced sidebar toggle functionality
document.addEventListener('DOMContentLoaded', function() {
    const toggleBtn = document.getElementById('sidebarToggle');
    const sidebar = document.querySelector('.sidebar');
    const mainContent = document.querySelector('.main-content');
    const overlay = document.getElementById('sidebarOverlay');
    
    function isMobile() {
        return window.innerWidth <= 768;
    }
    
    function toggleSidebar() {
        if (isMobile()) {
            sidebar.classList.toggle('show');
            overlay.classList.toggle('show');
            document.body.style.overflow = sidebar.classList.contains('show') ? 'hidden' : '';
        } else {
            sidebar.classList.toggle('collapsed');
            if (mainContent) {
                mainContent.classList.toggle('expanded');
            }
        }
    }
    
    function closeSidebar() {
        if (isMobile()) {
            sidebar.classList.remove('show');
            overlay.classList.remove('show');
            document.body.style.overflow = '';
        }
    }
    
    // Toggle button click
    if (toggleBtn) {
        toggleBtn.addEventListener('click', toggleSidebar);
    }
    
    // Overlay click (mobile)
    if (overlay) {
        overlay.addEventListener('click', closeSidebar);
    }
    
    // Close sidebar on window resize
    window.addEventListener('resize', function() {
        if (!isMobile()) {
            sidebar.classList.remove('show');
            overlay.classList.remove('show');
            document.body.style.overflow = '';
        }
    });
    
    // Escape key to close sidebar on mobile
    document.addEventListener('keydown', function(e) {
        if (e.key === 'Escape' && isMobile() && sidebar.classList.contains('show')) {
            closeSidebar();
        }
    });
});
</script>

<!-- Main Content -->
<div class="main">
    <h3 style="color:#6a1b9a;">🟣 মেন্যুয়াল সার্ভিস</h3>
    <div class="dashboard">
        <div class="card manual"><i class="fa-solid fa-pen"></i> সাইন কপি অর্ডার</div>
        <div class="card manual"><i class="fa-solid fa-id-card"></i> আইডি কার্ড অর্ডার</div>
        <div class="card manual"><i class="fa-solid fa-file-lines"></i> অর্ডার টেক্স</div>
        <div class="card manual"><i class="fa-solid fa-file"></i> অর্ডার ফাইল</div>
        <div class="card manual"><i class="fa-solid fa-user-plus"></i> আইডি মেইক</div>
    </div>

    <h3 style="color:#e65100;">🟠 অটো সার্ভিস</h3>
    <div class="dashboard">
        <div class="card auto"><i class="fa-solid fa-id-badge"></i> স্মার্টকার্ড মেইক</div>
        <div class="card auto"><i class="fa-solid fa-server"></i> সার্ভার কপি</div>
        <div class="card auto"><i class="fa-solid fa-right-left"></i> সাইন টু সার্ভার কপি</div>
        <div class="card auto"><i class="fa-solid fa-id-card-clip"></i> অটো টিন</div>
        <div class="card auto"><i class="fa-solid fa-fingerprint"></i> অটো বায়ো</div>
        <div class="card auto"><i class="fa-solid fa-money-bill-wave"></i> নগদ ইনফো</div>
    </div>

    <h3 style="color:#00695c;">🟢 ক্লোন সার্ভিস</h3>
    <div class="dashboard">
        <div class="card clone"><i class="fa-solid fa-passport"></i> পাসপোর্ট ভেরিফাই কপি</div>
        <div class="card clone"><i class="fa-solid fa-pen-to-square"></i> নিবন্ধন মেইক</div>
        <div class="card clone"><i class="fa-solid fa-skull"></i> মৃত্যু সনদ</div>
        <div class="card clone"><i class="fa-solid fa-landmark"></i> ভুমি উন্নয়ন কর</div>
        <div class="card clone"><i class="fa-solid fa-syringe"></i> সুরক্ষা ভ্যাকসিন</div>
        <div class="card clone"><i class="fa-solid fa-briefcase"></i> ট্রেড লাইসেন্স</div>
        <div class="card clone"><i class="fa-solid fa-user-check"></i> নাগরিক সনদ</div>
        <div class="card clone"><i class="fa-solid fa-people-arrows"></i> উত্তরাধিকার সনদ</div>
        <div class="card clone"><i class="fa-solid fa-graduation-cap"></i> এসএসসি সার্টিফিকেট</div>
    </div>

    <h3 style="color:#444;">🔹 অন্যান্য</h3>
    <div class="dashboard">
        <div class="card"><i class="fa-solid fa-user"></i> প্রোফাইল</div>
        <div class="card"><i class="fa-solid fa-coins"></i> রিচার্জ করুন</div>
        <div class="card"><i class="fa-solid fa-history"></i> কাজের হিস্টোরি</div>
    </div>
</div>

<style>
/* Dashboard Card Design */
.dashboard{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:15px;
    margin-bottom:20px;
}
.card{
    background:linear-gradient(145deg,#ffffff,#f0f4f8);
    padding:25px;
    border-radius:15px;
    text-align:center;
    font-weight:bold;
    cursor:pointer;
    transition:transform 0.3s ease,box-shadow 0.3s ease;
    box-shadow:0 4px 15px rgba(0,0,0,0.1);
    position:relative;
}
.card i{
    font-size:35px;
    margin-bottom:12px;
    display:block;
    color:#333;
    animation:pulse 2s infinite;
}
@keyframes pulse{
    0%,100%{transform:scale(1)}
    50%{transform:scale(1.15);color:gold}
}
.card:hover{
    transform:translateY(-8px) scale(1.05);
    box-shadow:0 12px 30px rgba(0,0,0,0.2);
}
/* Color Themes */
.manual{background:linear-gradient(135deg,#f3e5f5,#e1bee7);color:#6a1b9a;}
.auto{background:linear-gradient(135deg,#ffe0b2,#ffcc80);color:#e65100;}
.clone{background:linear-gradient(135deg,#b2ebf2,#80deea);color:#00695c;}
</style>