PNG  IHDR pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_F@8N ' p @8N@8}' p '#@8N@8N pQ9p!i~}|6-ӪG` VP.@*j>[ K^<֐Z]@8N'KQ<Q(`s" 'hgpKB`R@Dqj '  'P$a ( `D$Na L?u80e J,K˷NI'0eݷ(NI'؀ 2ipIIKp`:O'`ʤxB8Ѥx Ѥx $ $P6 :vRNb 'p,>NB 'P]-->P T+*^h& p '‰a ‰ (ĵt#u33;Nt̵'ޯ; [3W ~]0KH1q@8]O2]3*̧7# *p>us p _6]/}-4|t'|Smx= DoʾM×M_8!)6lq':l7!|4} '\ne t!=hnLn (~Dn\+‰_4k)0e@OhZ`F `.m1} 'vp{F`ON7Srx 'D˸nV`><;yMx!IS钦OM)Ե٥x 'DSD6bS8!" ODz#R >S8!7ّxEh0m$MIPHi$IvS8IN$I p$O8I,sk&I)$IN$Hi$I^Ah.p$MIN$IR8I·N "IF9Ah0m$MIN$IR8IN$I 3jIU;kO$ɳN$+ q.x* tEXtComment

Viewing File: /home/u456810272/domains/etfcareer.org/public_html/admin/deepseek_html_20260109_9d6704 (1).html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ETF Career Admin Panel</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        :root {
            --primary: #2c3e50;
            --secondary: #3498db;
            --accent: #e74c3c;
            --light: #ecf0f1;
            --dark: #2c3e50;
            --success: #27ae60;
            --warning: #f39c12;
            --danger: #e74c3c;
            --gray: #95a5a6;
            --purple: #9b59b6;
            --teal: #1abc9c;
            --cyan: #3498db;
            --white: #ffffff;
            --black: #000000;
            --gray-light: #ecf0f1;
            --gray-dark: #7f8c8d;
            --off-white: #f5f5f5;
            --blue-light: #3498db;
            --blue-dark: #2980b9;
        }
        
        body {
            background-color: #f5f7fa;
            color: #333;
        }
        
        .login-container {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background: linear-gradient(135deg, #2c3e50, #3498db);
        }
        
        .login-form {
            background: white;
            padding: 2.5rem;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            width: 100%;
            max-width: 400px;
            transition: all 0.3s ease;
        }
        
        .login-form h2 {
            text-align: center;
            margin-bottom: 1.5rem;
            color: var(--primary);
        }
        
        .form-group {
            margin-bottom: 1.5rem;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
        }
        
        .form-group input, .form-group select {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 1rem;
        }
        
        .login-btn {
            width: 100%;
            padding: 12px;
            background: var(--secondary);
            color: white;
            border: none;
            border-radius: 5px;
            font-size: 1rem;
            cursor: pointer;
            transition: background 0.3s;
            margin-bottom: 1rem;
        }
        
        .login-btn:hover {
            background: var(--blue-dark);
        }
        
        .register-btn {
            width: 100%;
            padding: 12px;
            background: var(--teal);
            color: white;
            border: none;
            border-radius: 5px;
            font-size: 1rem;
            cursor: pointer;
            transition: background 0.3s;
            margin-top: 0.5rem;
        }
        
        .register-btn:hover {
            background: #16a085;
        }
        
        .form-footer {
            text-align: center;
            margin-top: 1rem;
            color: var(--gray);
        }
        
        .form-footer a {
            color: var(--secondary);
            text-decoration: none;
            cursor: pointer;
            font-weight: 500;
        }
        
        .form-footer a:hover {
            text-decoration: underline;
        }
        
        .admin-container {
            display: none;
            height: 100vh;
        }
        
        .sidebar {
            width: 250px;
            background: var(--primary);
            color: white;
            height: 100%;
            position: fixed;
            overflow-y: auto;
        }
        
        .logo {
            padding: 1.5rem;
            text-align: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .logo h1 {
            font-size: 1.4rem;
            letter-spacing: 1px;
        }
        
        .nav-links {
            padding: 1rem 0;
        }
        
        .nav-links li {
            list-style: none;
        }
        
        .nav-links a {
            display: flex;
            align-items: center;
            padding: 0.8rem 1.5rem;
            color: white;
            text-decoration: none;
            transition: background 0.3s;
        }
        
        .nav-links a:hover, .nav-links a.active {
            background: rgba(255, 255, 255, 0.1);
            border-left: 4px solid var(--accent);
        }
        
        .nav-links i {
            margin-right: 10px;
            width: 20px;
            text-align: center;
        }
        
        .main-content {
            margin-left: 250px;
            padding: 1.5rem;
            width: calc(100% - 250px);
        }
        
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 1rem;
            border-bottom: 1px solid #eee;
            margin-bottom: 1.5rem;
        }
        
        .user-info {
            display: flex;
            align-items: center;
        }
        
        .user-info img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 10px;
        }
        
        .dashboard-stats {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }
        
        .stat-card {
            background: white;
            padding: 1.5rem;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
            display: flex;
            align-items: center;
            cursor: pointer;
            transition: transform 0.3s;
        }
        
        .stat-card:hover {
            transform: translateY(-5px);
        }
        
        .stat-icon {
            width: 60px;
            height: 60px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 1rem;
            font-size: 1.5rem;
            color: white;
        }
        
        .stat-info h3 {
            font-size: 1.8rem;
            margin-bottom: 0.2rem;
        }
        
        .stat-info p {
            color: var(--gray);
        }
        
        .dashboard-content {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 1.5rem;
        }
        
        .card {
            background: white;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid #eee;
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
        }
        
        table th, table td {
            padding: 0.8rem;
            text-align: left;
            border-bottom: 1px solid #eee;
        }
        
        table th {
            font-weight: 600;
            color: var(--dark);
        }
        
        .status {
            padding: 0.3rem 0.8rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
        }
        
        .status.active {
            background: rgba(39, 174, 96, 0.2);
            color: var(--success);
        }
        
        .status.pending {
            background: rgba(243, 156, 18, 0.2);
            color: var(--warning);
        }
        
        .status.closed {
            background: rgba(149, 165, 166, 0.2);
            color: var(--gray);
        }
        
        .status.expired {
            background: rgba(231, 76, 60, 0.2);
            color: var(--danger);
        }
        
        .status.processing {
            background: rgba(52, 152, 219, 0.2);
            color: var(--secondary);
        }
        
        .status.completed {
            background: rgba(39, 174, 96, 0.2);
            color: var(--success);
        }
        
        .status.cancelled {
            background: rgba(231, 76, 60, 0.2);
            color: var(--danger);
        }
        
        .status.inactive {
            background: rgba(149, 165, 166, 0.2);
            color: var(--gray);
        }
        
        .status.read {
            background: rgba(52, 152, 219, 0.2);
            color: var(--secondary);
        }
        
        .status.new {
            background: rgba(243, 156, 18, 0.2);
            color: var(--warning);
        }
        
        .status.replied {
            background: rgba(39, 174, 96, 0.2);
            color: var(--success);
        }
        
        .status.paid {
            background: rgba(39, 174, 96, 0.2);
            color: var(--success);
        }
        
        .status.unpaid {
            background: rgba(243, 156, 18, 0.2);
            color: var(--warning);
        }
        
        .status.open {
            background: rgba(52, 152, 219, 0.2);
            color: var(--secondary);
        }
        
        .btn {
            padding: 0.5rem 1rem;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s;
        }
        
        .btn-primary {
            background: var(--secondary);
            color: white;
        }
        
        .btn-primary:hover {
            background: var(--blue-dark);
        }
        
        .btn-danger {
            background: var(--danger);
            color: white;
        }
        
        .btn-danger:hover {
            background: #c0392b;
        }
        
        .btn-success {
            background: var(--success);
            color: white;
        }
        
        .btn-success:hover {
            background: #219653;
        }
        
        .btn-warning {
            background: var(--warning);
            color: white;
        }
        
        .btn-warning:hover {
            background: #e67e22;
        }
        
        .btn-purple {
            background: var(--purple);
            color: white;
        }
        
        .btn-purple:hover {
            background: #8e44ad;
        }
        
        .btn-small {
            padding: 0.3rem 0.6rem;
            font-size: 0.8rem;
        }
        
        .recent-activity li {
            padding: 0.8rem 0;
            border-bottom: 1px solid #eee;
            display: flex;
            align-items: center;
        }
        
        .recent-activity li:last-child {
            border-bottom: none;
        }
        
        .activity-icon {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            color: white;
        }
        
        .footer {
            text-align: center;
            padding: 1rem;
            color: var(--gray);
            font-size: 0.9rem;
            margin-top: 2rem;
        }
        
        .section {
            display: none;
        }
        
        .section.active {
            display: block;
        }
        
        .search-bar {
            display: flex;
            margin-bottom: 1.5rem;
        }
        
        .search-bar input {
            flex: 1;
            padding: 0.8rem;
            border: 1px solid #ddd;
            border-radius: 4px 0 0 4px;
        }
        
        .search-bar button {
            padding: 0 1.5rem;
            background: var(--secondary);
            color: white;
            border: none;
            border-radius: 0 4px 4px 0;
            cursor: pointer;
        }
        
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        
        .modal-content {
            background: white;
            padding: 2rem;
            border-radius: 8px;
            width: 90%;
            max-width: 600px;
            max-height: 90vh;
            overflow-y: auto;
        }
        
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }
        
        .close-modal {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--gray);
        }
        
        .chart-container {
            height: 300px;
            margin-bottom: 2rem;
        }
        
        .action-buttons {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }
        
        .form-row {
            display: flex;
            gap: 1rem;
            margin-bottom: 1rem;
        }
        
        .form-row .form-group {
            flex: 1;
            margin-bottom: 0;
        }
        
        .form-group {
            margin-bottom: 1rem;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
        }
        
        .form-group input, .form-group select, .form-group textarea {
            width: 100%;
            padding: 0.8rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 1rem;
        }
        
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 34px;
        }
        
        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 34px;
        }
        
        .slider:before {
            position: absolute;
            content: "";
            height: 26px;
            width: 26px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        
        input:checked + .slider {
            background-color: var(--success);
        }
        
        input:checked + .slider:before {
            transform: translateX(26px);
        }
        
        .tab-container {
            display: flex;
            border-bottom: 1px solid #ddd;
            margin-bottom: 1.5rem;
        }
        
        .tab {
            padding: 0.8rem 1.5rem;
            cursor: pointer;
            border-bottom: 3px solid transparent;
        }
        
        .tab.active {
            border-bottom: 3px solid var(--secondary);
            color: var(--secondary);
            font-weight: 500;
        }
        
        .tab-content {
            display: none;
        }
        
        .tab-content.active {
            display: block;
        }
        
        /* Language grid layout */
        .languages-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 10px;
            margin-top: 0.5rem;
        }
        
        .language-checkbox {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 12px;
            background: var(--off-white);
            border-radius: 4px;
            transition: background 0.3s;
        }
        
        .language-checkbox:hover {
            background: #e8e8e8;
        }
        
        .language-checkbox input[type="checkbox"] {
            width: auto;
        }
        
        .language-checkbox label {
            margin-bottom: 0;
            cursor: pointer;
            flex: 1;
        }
        
        /* AI Chat Styles */
        .ai-chat-container {
            height: 500px;
            display: flex;
            flex-direction: column;
            border: 1px solid #ddd;
            border-radius: 8px;
            overflow: hidden;
        }
        
        .ai-chat-messages {
            flex: 1;
            padding: 1rem;
            overflow-y: auto;
            background: #f9f9f9;
        }
        
        .ai-chat-input-container {
            display: flex;
            padding: 1rem;
            border-top: 1px solid #ddd;
            background: white;
        }
        
        .ai-chat-input {
            flex: 1;
            padding: 0.8rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            margin-right: 0.5rem;
        }
        
        .chat-message {
            margin-bottom: 1rem;
            padding: 0.8rem;
            border-radius: 8px;
            max-width: 80%;
        }
        
        .user-message {
            background: var(--secondary);
            color: white;
            margin-left: auto;
        }
        
        .bot-message {
            background: #e8e8e8;
            color: #333;
        }
        
        /* Loading Spinner */
        .spinner {
            border: 3px solid #f3f3f3;
            border-top: 3px solid var(--secondary);
            border-radius: 50%;
            width: 30px;
            height: 30px;
            animation: spin 1s linear infinite;
            margin: 20px auto;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        /* Password strength indicator */
        .password-strength {
            height: 5px;
            margin-top: 5px;
            border-radius: 2px;
            transition: all 0.3s;
        }
        
        .strength-weak { background: #e74c3c; width: 25%; }
        .strength-medium { background: #f39c12; width: 50%; }
        .strength-strong { background: #27ae60; width: 75%; }
        .strength-very-strong { background: #2ecc71; width: 100%; }
        
        @media (max-width: 992px) {
            .sidebar {
                width: 70px;
            }
            
            .sidebar .logo h1, .sidebar .nav-links span {
                display: none;
            }
            
            .main-content {
                margin-left: 70px;
                width: calc(100% - 70px);
            }
            
            .nav-links a {
                justify-content: center;
                padding: 1rem;
            }
            
            .nav-links i {
                margin-right: 0;
            }
        }
        
        @media (max-width: 768px) {
            .dashboard-content {
                grid-template-columns: 1fr;
            }
            
            .form-row {
                flex-direction: column;
                gap: 0;
            }
            
            .languages-grid {
                grid-template-columns: 1fr;
            }
            
            .action-buttons {
                flex-direction: column;
            }
            
            .action-buttons .btn {
                width: 100%;
                margin-bottom: 0.5rem;
            }
        }
    </style>
</head>
<body>
    <!-- Login Section -->
    <div class="login-container" id="loginSection">
        <!-- Login Form -->
        <div class="login-form" id="loginForm">
            <h2>ETF Career Admin Login</h2>
            <div class="form-group">
                <label for="email">Email</label>
                <input type="email" id="email" placeholder="Enter your email" value="admin@etfcareer.org">
            </div>
            <div class="form-group">
                <label for="password">Password</label>
                <input type="password" id="password" placeholder="Enter your password" value="@Abc123456">
            </div>
            <button class="login-btn" id="loginBtn">Login</button>
            <button class="register-btn" id="showRegisterBtn">Register New User</button>
            <div class="form-footer">
                <p>Don't have an account? <a id="switchToRegister">Register here</a></p>
            </div>
        </div>
        
        <!-- Registration Form -->
        <div class="login-form" id="registerForm" style="display: none;">
            <h2>User Registration</h2>
            <div class="form-group">
                <label for="regName">Full Name *</label>
                <input type="text" id="regName" placeholder="Enter your full name" required>
            </div>
            <div class="form-group">
                <label for="regEmail">Email Address *</label>
                <input type="email" id="regEmail" placeholder="Enter your email" required>
            </div>
            <div class="form-group">
                <label for="regPassword">Password *</label>
                <input type="password" id="regPassword" placeholder="Create a password" required>
                <div id="passwordStrength" class="password-strength"></div>
            </div>
            <div class="form-group">
                <label for="regConfirmPassword">Confirm Password *</label>
                <input type="password" id="regConfirmPassword" placeholder="Confirm your password" required>
            </div>
            <div class="form-group">
                <label for="regPhone">Phone Number</label>
                <input type="tel" id="regPhone" placeholder="Enter your phone number">
            </div>
            <div class="form-group">
                <label for="regAddress">Address</label>
                <textarea id="regAddress" rows="2" placeholder="Enter your address"></textarea>
            </div>
            <div class="form-group">
                <label for="regRole">User Role *</label>
                <select id="regRole" required>
                    <option value="">Select Role</option>
                    <option value="customer">Customer</option>
                    <option value="employee">Employee</option>
                    <option value="admin">Admin</option>
                </select>
            </div>
            <button class="login-btn" id="registerBtn">Create Account</button>
            <div class="form-footer">
                <p>Already have an account? <a id="switchToLogin">Login here</a></p>
            </div>
        </div>
    </div>
    
    <!-- Admin Panel -->
    <div class="admin-container" id="adminPanel">
        <div class="sidebar">
            <div class="logo">
                <h1>ETF Career</h1>
            </div>
            <ul class="nav-links">
                <li><a href="#" class="nav-link active" data-section="dashboard"><i class="fas fa-tachometer-alt"></i> <span>Dashboard</span></a></li>
                <li><a href="#" class="nav-link" data-section="products"><i class="fas fa-box"></i> <span>Products</span></a></li>
                <li><a href="#" class="nav-link" data-section="customers"><i class="fas fa-users"></i> <span>Customers</span></a></li>
                <li><a href="#" class="nav-link" data-section="orders"><i class="fas fa-shopping-cart"></i> <span>Orders</span></a></li>
                <li><a href="#" class="nav-link" data-section="payment-gateway"><i class="fas fa-credit-card"></i> <span>Payment Gateway</span></a></li>
                <li><a href="#" class="nav-link" data-section="hr-payroll"><i class="fas fa-user-tie"></i> <span>HR & Payroll</span></a></li>
                <li><a href="#" class="nav-link" data-section="accounts"><i class="fas fa-chart-line"></i> <span>Accounts</span></a></li>
                <li><a href="#" class="nav-link" data-section="subscription"><i class="fas fa-credit-card"></i> <span>Subscription</span></a></li>
                <li><a href="#" class="nav-link" data-section="user-data"><i class="fas fa-users"></i> <span>User Data</span></a></li>
                <li><a href="#" class="nav-link" data-section="ai-chat"><i class="fas fa-robot"></i> <span>AI Chat</span></a></li>
                <li><a href="#" class="nav-link" data-section="subscriber"><i class="fas fa-user-check"></i> <span>Subscriber</span></a></li>
                <li><a href="#" class="nav-link" data-section="support-ticket"><i class="fas fa-ticket-alt"></i> <span>Support Ticket</span></a></li>
                <li><a href="#" class="nav-link" data-section="contact-messages"><i class="fas fa-envelope"></i> <span>Contact Messages</span></a></li>
                <li><a href="#" class="nav-link" data-section="seo"><i class="fas fa-search"></i> <span>SEO</span></a></li>
                <li><a href="#" class="nav-link" data-section="report"><i class="fas fa-chart-bar"></i> <span>Report</span></a></li>
                <li><a href="#" class="nav-link" data-section="language"><i class="fas fa-language"></i> <span>Language</span></a></li>
                <li><a href="#" class="nav-link" data-section="email-smtp"><i class="fas fa-envelope-open-text"></i> <span>Email SMTP</span></a></li>
                <li><a href="#" class="nav-link" data-section="settings"><i class="fas fa-cog"></i> <span>Settings</span></a></li>
                <li><a href="#" id="logoutBtn"><i class="fas fa-sign-out-alt"></i> <span>Logout</span></a></li>
            </ul>
        </div>
        
        <div class="main-content">
            <div class="header">
                <h2 id="pageTitle">Dashboard</h2>
                <div class="user-info">
                    <img src="https://ui-avatars.com/api/?name=Admin&background=3498db&color=fff" alt="Admin">
                    <div>
                        <h4 id="adminName">Admin</h4>
                        <p id="adminEmail">admin@etfcareer.org</p>
                    </div>
                </div>
            </div>
            
            <!-- Dashboard Section -->
            <div id="dashboard" class="section active">
                <div class="dashboard-stats">
                    <div class="stat-card" data-section="products">
                        <div class="stat-icon" style="background: var(--secondary);">
                            <i class="fas fa-box"></i>
                        </div>
                        <div class="stat-info">
                            <h3 id="totalProducts">0</h3>
                            <p>Total Products</p>
                        </div>
                    </div>
                    <div class="stat-card" data-section="customers">
                        <div class="stat-icon" style="background: var(--success);">
                            <i class="fas fa-users"></i>
                        </div>
                        <div class="stat-info">
                            <h3 id="totalCustomers">0</h3>
                            <p>Total Customers</p>
                        </div>
                    </div>
                    <div class="stat-card" data-section="orders">
                        <div class="stat-icon" style="background: var(--warning);">
                            <i class="fas fa-shopping-cart"></i>
                        </div>
                        <div class="stat-info">
                            <h3 id="totalOrders">0</h3>
                            <p>Total Orders</p>
                        </div>
                    </div>
                    <div class="stat-card" data-section="hr-payroll">
                        <div class="stat-icon" style="background: var(--purple);">
                            <i class="fas fa-user-tie"></i>
                        </div>
                        <div class="stat-info">
                            <h3 id="totalEmployees">0</h3>
                            <p>Employees</p>
                        </div>
                    </div>
                    <div class="stat-card" data-section="subscription">
                        <div class="stat-icon" style="background: var(--teal);">
                            <i class="fas fa-credit-card"></i>
                        </div>
                        <div class="stat-info">
                            <h3 id="totalSubscriptions">0</h3>
                            <p>Subscriptions</p>
                        </div>
                    </div>
                    <div class="stat-card" data-section="user-data">
                        <div class="stat-icon" style="background: var(--cyan);">
                            <i class="fas fa-users"></i>
                        </div>
                        <div class="stat-info">
                            <h3 id="totalUsers">0</h3>
                            <p>Total Users</p>
                        </div>
                    </div>
                </div>
                
                <div class="dashboard-content">
                    <div class="left-column">
                        <div class="card">
                            <div class="card-header">
                                <h3>Recent Orders</h3>
                                <button class="btn btn-primary" id="viewAllOrders">View All</button>
                            </div>
                            <table>
                                <thead>
                                    <tr>
                                        <th>Order ID</th>
                                        <th>Customer</th>
                                        <th>Amount</th>
                                        <th>Status</th>
                                        <th>Action</th>
                                    </tr>
                                </thead>
                                <tbody id="recentOrdersTable">
                                    <tr><td colspan="5" style="text-align: center;">Loading...</td></tr>
                                </tbody>
                            </table>
                        </div>
                        
                        <div class="card">
                            <div class="card-header">
                                <h3>Recent Support Tickets</h3>
                                <button class="btn btn-primary" id="viewAllTickets">View All</button>
                            </div>
                            <table>
                                <thead>
                                    <tr>
                                        <th>Ticket ID</th>
                                        <th>Subject</th>
                                        <th>Status</th>
                                        <th>Action</th>
                                    </tr>
                                </thead>
                                <tbody id="recentTicketsTable">
                                    <tr><td colspan="4" style="text-align: center;">Loading...</td></tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    
                    <div class="right-column">
                        <div class="card">
                            <div class="card-header">
                                <h3>Revenue Overview</h3>
                            </div>
                            <div class="chart-container">
                                <canvas id="revenueChart"></canvas>
                            </div>
                        </div>
                        
                        <div class="card">
                            <div class="card-header">
                                <h3>Quick Actions</h3>
                            </div>
                            <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 1rem;">
                                <button class="btn btn-primary" id="addProductBtn">Add Product</button>
                                <button class="btn btn-primary" id="addCustomerBtn">Add Customer</button>
                                <button class="btn btn-primary" id="createOrderBtn">Create Order</button>
                                <button class="btn btn-primary" id="generateReportBtn">Generate Report</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Products Section -->
            <div id="products" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>Product Management</h3>
                        <div class="action-buttons">
                            <button class="btn btn-primary" id="addProductBtn2">Add Product</button>
                            <button class="btn btn-success" id="exportProductsBtn">Export</button>
                        </div>
                    </div>
                    <div class="search-bar">
                        <input type="text" id="productSearch" placeholder="Search products...">
                        <button><i class="fas fa-search"></i></button>
                    </div>
                    <div class="table-responsive">
                        <table>
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>Name</th>
                                    <th>Category</th>
                                    <th>Price</th>
                                    <th>Stock</th>
                                    <th>Status</th>
                                    <th>Actions</th>
                                </tr>
                            </thead>
                            <tbody id="productTable">
                                <tr><td colspan="7" style="text-align: center;">Loading...</td></tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            
            <!-- Customers Section -->
            <div id="customers" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>Customer Management</h3>
                        <button class="btn btn-primary" id="addCustomerBtn2">Add Customer</button>
                    </div>
                    <div class="search-bar">
                        <input type="text" id="customerSearch" placeholder="Search customers...">
                        <button><i class="fas fa-search"></i></button>
                    </div>
                    <table>
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>Name</th>
                                <th>Email</th>
                                <th>Phone</th>
                                <th>Status</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody id="customerTable">
                            <tr><td colspan="6" style="text-align: center;">Loading...</td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
            
            <!-- Orders Section -->
            <div id="orders" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>Order Management</h3>
                        <button class="btn btn-primary" id="createOrderBtn2">Create Order</button>
                    </div>
                    <div class="search-bar">
                        <input type="text" id="orderSearch" placeholder="Search orders...">
                        <button><i class="fas fa-search"></i></button>
                    </div>
                    <table>
                        <thead>
                            <tr>
                                <th>Order ID</th>
                                <th>Customer</th>
                                <th>Total</th>
                                <th>Status</th>
                                <th>Date</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody id="orderTable">
                            <tr><td colspan="6" style="text-align: center;">Loading...</td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
            
            <!-- Payment Gateway Section -->
            <div id="payment-gateway" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>Payment Gateway Settings</h3>
                    </div>
                    <div class="tab-container">
                        <div class="tab active" data-tab="stripe">Stripe</div>
                        <div class="tab" data-tab="paypal">PayPal</div>
                    </div>
                    
                    <div class="tab-content active" id="stripe-tab">
                        <h4>Stripe Payment Gateway</h4>
                        <div class="form-group">
                            <label for="stripePublishableKey">Publishable Key</label>
                            <input type="text" id="stripePublishableKey" placeholder="Enter Stripe publishable key">
                        </div>
                        <div class="form-group">
                            <label for="stripeSecretKey">Secret Key</label>
                            <input type="password" id="stripeSecretKey" placeholder="Enter Stripe secret key">
                        </div>
                        <button class="btn btn-primary" id="saveStripeSettings">Save Settings</button>
                    </div>
                    
                    <div class="tab-content" id="paypal-tab">
                        <h4>PayPal Payment Gateway</h4>
                        <div class="form-group">
                            <label for="paypalClientId">Client ID</label>
                            <input type="text" id="paypalClientId" placeholder="Enter PayPal Client ID">
                        </div>
                        <div class="form-group">
                            <label for="paypalSecret">Secret Key</label>
                            <input type="password" id="paypalSecret" placeholder="Enter PayPal Secret Key">
                        </div>
                        <button class="btn btn-primary" id="savePaypalSettings">Save Settings</button>
                    </div>
                </div>
            </div>
            
            <!-- HR & Payroll Section -->
            <div id="hr-payroll" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>Employee Management</h3>
                        <button class="btn btn-primary" id="addEmployeeBtn">Add Employee</button>
                    </div>
                    <div class="search-bar">
                        <input type="text" id="employeeSearch" placeholder="Search employees...">
                        <button><i class="fas fa-search"></i></button>
                    </div>
                    <table>
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>Name</th>
                                <th>Department</th>
                                <th>Designation</th>
                                <th>Salary</th>
                                <th>Status</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody id="employeeTable">
                            <tr><td colspan="7" style="text-align: center;">Loading...</td></tr>
                        </tbody>
                    </table>
                </div>
                
                <div class="card">
                    <div class="card-header">
                        <h3>Payroll Processing</h3>
                        <button class="btn btn-primary" id="processPayrollBtn">Process Payroll</button>
                    </div>
                    <table>
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>Employee</th>
                                <th>Month</th>
                                <th>Amount</th>
                                <th>Status</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody id="payrollTable">
                            <tr><td colspan="6" style="text-align: center;">Loading...</td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
            
            <!-- Accounts Section -->
            <div id="accounts" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>Financial Overview</h3>
                    </div>
                    <div class="chart-container">
                        <canvas id="financialChart"></canvas>
                    </div>
                </div>
                
                <div class="card">
                    <div class="card-header">
                        <h3>Recent Transactions</h3>
                    </div>
                    <table>
                        <thead>
                            <tr>
                                <th>Date</th>
                                <th>Description</th>
                                <th>Type</th>
                                <th>Amount</th>
                            </tr>
                        </thead>
                        <tbody id="financialTable">
                            <tr><td colspan="4" style="text-align: center;">Loading...</td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
            
            <!-- Subscription Section -->
            <div id="subscription" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>Subscription Management</h3>
                        <button class="btn btn-primary" id="addSubscriptionBtn">Add Subscription</button>
                    </div>
                    <div class="search-bar">
                        <input type="text" id="subscriptionSearch" placeholder="Search subscriptions...">
                        <button><i class="fas fa-search"></i></button>
                    </div>
                    <table>
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>User</th>
                                <th>Plan</th>
                                <th>Price</th>
                                <th>Status</th>
                                <th>Expiry Date</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody id="subscriptionTable">
                            <tr><td colspan="7" style="text-align: center;">Loading...</td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
            
            <!-- User Data Section -->
            <div id="user-data" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>User Management</h3>
                        <button class="btn btn-primary" id="addUserBtn">Add User</button>
                    </div>
                    <div class="search-bar">
                        <input type="text" id="userSearch" placeholder="Search users...">
                        <button><i class="fas fa-search"></i></button>
                    </div>
                    <table>
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>Name</th>
                                <th>Email</th>
                                <th>Role</th>
                                <th>Status</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody id="userTable">
                            <tr><td colspan="6" style="text-align: center;">Loading...</td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
            
            <!-- AI Chat Section -->
            <div id="ai-chat" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>AI Chat Assistant</h3>
                        <button class="btn btn-danger" id="clearChatBtn">Clear Chat</button>
                    </div>
                    <div class="ai-chat-container">
                        <div class="ai-chat-messages" id="aiChatMessages">
                            <div class="chat-message bot-message">
                                Hello! I'm your AI assistant. How can I help you today?
                            </div>
                        </div>
                        <div class="ai-chat-input-container">
                            <input type="text" class="ai-chat-input" id="aiChatInput" placeholder="Type your message...">
                            <button class="btn btn-primary" id="sendChatBtn">Send</button>
                        </div>
                    </div>
                </div>
                
                <div class="card">
                    <div class="card-header">
                        <h3>Chat History</h3>
                    </div>
                    <table>
                        <thead>
                            <tr>
                                <th>User</th>
                                <th>Message</th>
                                <th>Bot Reply</th>
                                <th>Time</th>
                            </tr>
                        </thead>
                        <tbody id="chatHistoryTable">
                            <tr><td colspan="4" style="text-align: center;">Loading...</td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
            
            <!-- Subscriber Section -->
            <div id="subscriber" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>Subscriber Management</h3>
                        <button class="btn btn-primary" id="addSubscriberBtn">Add Subscriber</button>
                    </div>
                    <div class="search-bar">
                        <input type="text" id="subscriberSearch" placeholder="Search subscribers...">
                        <button><i class="fas fa-search"></i></button>
                    </div>
                    <table>
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>Email</th>
                                <th>Status</th>
                                <th>Subscribed Date</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody id="subscriberTable">
                            <tr><td colspan="5" style="text-align: center;">Loading...</td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
            
            <!-- Support Ticket Section -->
            <div id="support-ticket" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>Support Tickets</h3>
                        <button class="btn btn-primary" id="createTicketBtn">Create Ticket</button>
                    </div>
                    <div class="search-bar">
                        <input type="text" id="ticketSearch" placeholder="Search tickets...">
                        <button><i class="fas fa-search"></i></button>
                    </div>
                    <table>
                        <thead>
                            <tr>
                                <th>Ticket ID</th>
                                <th>Subject</th>
                                <th>User</th>
                                <th>Priority</th>
                                <th>Status</th>
                                <th>Created</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody id="ticketTable">
                            <tr><td colspan="7" style="text-align: center;">Loading...</td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
            
            <!-- Contact Messages Section -->
            <div id="contact-messages" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>Contact Messages</h3>
                        <button class="btn btn-primary" id="replyMessageBtn">Reply to Selected</button>
                    </div>
                    <div class="search-bar">
                        <input type="text" id="messageSearch" placeholder="Search messages...">
                        <button><i class="fas fa-search"></i></button>
                    </div>
                    <table>
                        <thead>
                            <tr>
                                <th><input type="checkbox" id="selectAllMessages"></th>
                                <th>Name</th>
                                <th>Email</th>
                                <th>Subject</th>
                                <th>Status</th>
                                <th>Date</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody id="messageTable">
                            <tr><td colspan="7" style="text-align: center;">Loading...</td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
            
            <!-- SEO Section -->
            <div id="seo" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>SEO Settings</h3>
                    </div>
                    <form id="seoSettingsForm">
                        <div class="form-row">
                            <div class="form-group">
                                <label for="siteTitle">Site Title</label>
                                <input type="text" id="siteTitle" value="ETF Career - Job Portal">
                            </div>
                            <div class="form-group">
                                <label for="metaDescription">Meta Description</label>
                                <input type="text" id="metaDescription" value="ETF Career provides job portal solutions">
                            </div>
                        </div>
                        <div class="form-row">
                            <div class="form-group">
                                <label for="keywords">Keywords</label>
                                <input type="text" id="keywords" value="jobs, career, employment, portal">
                            </div>
                            <div class="form-group">
                                <label for="googleAnalytics">Google Analytics ID</label>
                                <input type="text" id="googleAnalytics" value="UA-XXXXXX-X">
                            </div>
                        </div>
                        <button type="submit" class="btn btn-primary">Save SEO Settings</button>
                    </form>
                </div>
            </div>
            
            <!-- Report Section -->
            <div id="report" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>Reports</h3>
                        <div class="action-buttons">
                            <button class="btn btn-primary" id="generateSalesReport">Sales Report</button>
                            <button class="btn btn-primary" id="generateUserReport">User Report</button>
                            <button class="btn btn-success" id="exportReport">Export</button>
                        </div>
                    </div>
                    <div class="chart-container">
                        <canvas id="reportChart"></canvas>
                    </div>
                </div>
                
                <div class="card">
                    <div class="card-header">
                        <h3>Report Data</h3>
                    </div>
                    <table>
                        <thead>
                            <tr>
                                <th>Date</th>
                                <th>Sales</th>
                                <th>Users</th>
                                <th>Subscriptions</th>
                                <th>Tickets</th>
                            </tr>
                        </thead>
                        <tbody id="reportTable">
                            <tr><td colspan="5" style="text-align: center;">Loading...</td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
            
            <!-- Language Section -->
            <div id="language" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>Language Settings</h3>
                    </div>
                    <div class="form-group">
                        <label for="defaultLanguage">Default Language</label>
                        <select id="defaultLanguage">
                            <option value="en" selected>English</option>
                            <option value="es">Spanish</option>
                            <option value="fr">French</option>
                            <option value="de">German</option>
                        </select>
                    </div>
                    
                    <div class="form-group">
                        <label>Available Languages</label>
                        <div class="languages-grid" id="availableLanguages">
                            <div class="language-checkbox">
                                <input type="checkbox" id="lang-en" checked>
                                <label for="lang-en">English</label>
                            </div>
                            <div class="language-checkbox">
                                <input type="checkbox" id="lang-es" checked>
                                <label for="lang-es">Spanish</label>
                            </div>
                            <div class="language-checkbox">
                                <input type="checkbox" id="lang-fr">
                                <label for="lang-fr">French</label>
                            </div>
                            <div class="language-checkbox">
                                <input type="checkbox" id="lang-de">
                                <label for="lang-de">German</label>
                            </div>
                        </div>
                    </div>
                    
                    <button class="btn btn-primary" id="saveLanguageSettings">Save Language Settings</button>
                </div>
            </div>
            
            <!-- Email SMTP Section -->
            <div id="email-smtp" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>Email SMTP Settings</h3>
                    </div>
                    <div class="form-group">
                        <label for="smtpHost">SMTP Host</label>
                        <input type="text" id="smtpHost" value="smtp.gmail.com">
                    </div>
                    
                    <div class="form-group">
                        <label for="smtpPort">SMTP Port</label>
                        <input type="number" id="smtpPort" value="587">
                    </div>
                    
                    <div class="form-group">
                        <label for="smtpUsername">SMTP Username</label>
                        <input type="text" id="smtpUsername" value="your-email@gmail.com">
                    </div>
                    
                    <div class="form-group">
                        <label for="smtpPassword">SMTP Password</label>
                        <input type="password" id="smtpPassword" value="********">
                    </div>
                    
                    <div class="form-group">
                        <label for="smtpEncryption">Encryption</label>
                        <select id="smtpEncryption">
                            <option value="tls" selected>TLS</option>
                            <option value="ssl">SSL</option>
                        </select>
                    </div>
                    
                    <div class="form-group">
                        <label for="fromEmail">From Email</label>
                        <input type="email" id="fromEmail" value="noreply@etfcareer.org">
                    </div>
                    
                    <div class="form-group">
                        <label for="fromName">From Name</label>
                        <input type="text" id="fromName" value="ETF Career">
                    </div>
                    
                    <div class="action-buttons">
                        <button class="btn btn-primary" id="saveSmtpSettings">Save SMTP Settings</button>
                        <button class="btn btn-success" id="testSmtpBtn">Test Configuration</button>
                    </div>
                </div>
            </div>
            
            <!-- Settings Section -->
            <div id="settings" class="section">
                <div class="card">
                    <div class="card-header">
                        <h3>General Settings</h3>
                    </div>
                    <form id="generalSettingsForm">
                        <div class="form-group">
                            <label for="siteName">Site Name</label>
                            <input type="text" id="siteName" value="ETF Career">
                        </div>
                        <div class="form-group">
                            <label for="adminEmail">Admin Email</label>
                            <input type="email" id="adminEmail" value="admin@etfcareer.org">
                        </div>
                        <div class="form-group">
                            <label for="timezone">Timezone</label>
                            <select id="timezone">
                                <option value="UTC" selected>UTC</option>
                                <option value="UTC-5">EST (UTC-5)</option>
                                <option value="UTC+0">GMT (UTC+0)</option>
                            </select>
                        </div>
                        <button type="submit" class="btn btn-primary">Save Settings</button>
                    </form>
                </div>
                
                <div class="card">
                    <div class="card-header">
                        <h3>Security Settings</h3>
                    </div>
                    <form id="securitySettingsForm">
                        <div class="form-group">
                            <label for="currentPassword">Current Password</label>
                            <input type="password" id="currentPassword">
                        </div>
                        <div class="form-group">
                            <label for="newPassword">New Password</label>
                            <input type="password" id="newPassword">
                        </div>
                        <div class="form-group">
                            <label for="confirmPassword">Confirm Password</label>
                            <input type="password" id="confirmPassword">
                        </div>
                        <button type="submit" class="btn btn-primary">Update Password</button>
                    </form>
                </div>
            </div>
            
            <div class="footer">
                <p>ETF Career Admin Panel &copy; 2023 | All Rights Reserved</p>
            </div>
        </div>
    </div>

    <!-- Modals -->
    <div id="addProductModal" class="modal">
        <div class="modal-content">
            <div class="modal-header">
                <h3>Add New Product</h3>
                <button class="close-modal">&times;</button>
            </div>
            <form id="addProductForm">
                <div class="form-group">
                    <label for="productName">Product Name</label>
                    <input type="text" id="productName" required>
                </div>
                <div class="form-group">
                    <label for="productCategory">Category</label>
                    <input type="text" id="productCategory" required>
                </div>
                <div class="form-group">
                    <label for="productPrice">Price ($)</label>
                    <input type="number" id="productPrice" step="0.01" required>
                </div>
                <div class="form-group">
                    <label for="productStock">Stock Quantity</label>
                    <input type="number" id="productStock" required>
                </div>
                <div class="form-group">
                    <label for="productDescription">Description</label>
                    <textarea id="productDescription" rows="3"></textarea>
                </div>
                <div class="action-buttons">
                    <button type="submit" class="btn btn-primary">Add Product</button>
                    <button type="button" class="btn btn-danger close-modal">Cancel</button>
                </div>
            </form>
        </div>
    </div>

    <div id="addCustomerModal" class="modal">
        <div class="modal-content">
            <div class="modal-header">
                <h3>Add New Customer</h3>
                <button class="close-modal">&times;</button>
            </div>
            <form id="addCustomerForm">
                <div class="form-group">
                    <label for="customerName">Full Name</label>
                    <input type="text" id="customerName" required>
                </div>
                <div class="form-group">
                    <label for="customerEmail">Email</label>
                    <input type="email" id="customerEmail" required>
                </div>
                <div class="form-group">
                    <label for="customerPhone">Phone</label>
                    <input type="tel" id="customerPhone">
                </div>
                <div class="form-group">
                    <label for="customerAddress">Address</label>
                    <textarea id="customerAddress" rows="2"></textarea>
                </div>
                <div class="action-buttons">
                    <button type="submit" class="btn btn-primary">Add Customer</button>
                    <button type="button" class="btn btn-danger close-modal">Cancel</button>
                </div>
            </form>
        </div>
    </div>

    <div id="viewTicketModal" class="modal">
        <div class="modal-content">
            <div class="modal-header">
                <h3>Support Ticket Details</h3>
                <button class="close-modal">&times;</button>
            </div>
            <div id="ticketDetails">
                <p>Loading ticket details...</p>
            </div>
            <div class="form-group">
                <label for="ticketResponse">Response</label>
                <textarea id="ticketResponse" rows="4"></textarea>
            </div>
            <div class="action-buttons">
                <button class="btn btn-primary" id="sendResponseBtn">Send Response</button>
                <button class="btn btn-warning" id="closeTicketBtn">Close Ticket</button>
                <button class="btn btn-danger close-modal">Cancel</button>
            </div>
        </div>
    </div>

    <script>
        // Database API Configuration
        const API_BASE_URL = window.location.origin;
        
        // Database functions
        async function apiCall(endpoint, data = {}) {
            try {
                const response = await fetch(`${API_BASE_URL}/api/${endpoint}.php`, {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json',
                    },
                    body: JSON.stringify(data)
                });
                return await response.json();
            } catch (error) {
                console.error('API call error:', error);
                return { success: false, message: 'Network error' };
            }
        }

        // Password strength checker
        function checkPasswordStrength(password) {
            let strength = 0;
            const strengthBar = document.getElementById('passwordStrength');
            
            if (!password) {
                strengthBar.className = 'password-strength';
                strengthBar.style.width = '0%';
                return 0;
            }
            
            // Length check
            if (password.length >= 8) strength += 25;
            if (password.length >= 12) strength += 10;
            
            // Character variety checks
            if (/[a-z]/.test(password)) strength += 20; // lowercase
            if (/[A-Z]/.test(password)) strength += 20; // uppercase
            if (/[0-9]/.test(password)) strength += 20; // numbers
            if (/[^a-zA-Z0-9]/.test(password)) strength += 15; // special chars
            
            // Update strength bar
            strengthBar.style.width = Math.min(strength, 100) + '%';
            
            if (strength < 40) {
                strengthBar.className = 'password-strength strength-weak';
            } else if (strength < 60) {
                strengthBar.className = 'password-strength strength-medium';
            } else if (strength < 80) {
                strengthBar.className = 'password-strength strength-strong';
            } else {
                strengthBar.className = 'password-strength strength-very-strong';
            }
            
            return strength;
        }

        // Initialize the application
        document.addEventListener('DOMContentLoaded', function() {
            // DOM Elements
            const loginBtn = document.getElementById('loginBtn');
            const registerBtn = document.getElementById('registerBtn');
            const logoutBtn = document.getElementById('logoutBtn');
            const loginSection = document.getElementById('loginSection');
            const adminPanel = document.getElementById('adminPanel');
            const loginForm = document.getElementById('loginForm');
            const registerForm = document.getElementById('registerForm');
            const switchToRegister = document.getElementById('switchToRegister');
            const switchToLogin = document.getElementById('switchToLogin');
            const showRegisterBtn = document.getElementById('showRegisterBtn');
            const adminName = document.getElementById('adminName');
            const adminEmail = document.getElementById('adminEmail');
            const navLinks = document.querySelectorAll('.nav-link');
            const sections = document.querySelectorAll('.section');
            const pageTitle = document.getElementById('pageTitle');
            const statCards = document.querySelectorAll('.stat-card');
            const modals = document.querySelectorAll('.modal');
            const closeModalBtns = document.querySelectorAll('.close-modal');
            const tabs = document.querySelectorAll('.tab');
            const tabContents = document.querySelectorAll('.tab-content');
            
            // Password strength monitoring
            const regPasswordInput = document.getElementById('regPassword');
            if (regPasswordInput) {
                regPasswordInput.addEventListener('input', function() {
                    checkPasswordStrength(this.value);
                });
            }
            
            // Form switching
            switchToRegister.addEventListener('click', function() {
                loginForm.style.display = 'none';
                registerForm.style.display = 'block';
            });
            
            switchToLogin.addEventListener('click', function() {
                registerForm.style.display = 'none';
                loginForm.style.display = 'block';
            });
            
            showRegisterBtn.addEventListener('click', function() {
                loginForm.style.display = 'none';
                registerForm.style.display = 'block';
            });
            
            // Check if user is logged in from localStorage
            const isLoggedIn = localStorage.getItem('adminLoggedIn') === 'true';
            const savedAdminName = localStorage.getItem('adminName') || 'Admin';
            const savedAdminEmail = localStorage.getItem('adminEmail') || 'admin@etfcareer.org';
            
            if (isLoggedIn) {
                loginSection.style.display = 'none';
                adminPanel.style.display = 'block';
                adminName.textContent = savedAdminName;
                adminEmail.textContent = savedAdminEmail;
                initializeDashboard();
            }
            
            // Login functionality
            loginBtn.addEventListener('click', async function() {
                const email = document.getElementById('email').value;
                const password = document.getElementById('password').value;
                
                if (!email || !password) {
                    Swal.fire('Error', 'Please enter email and password', 'error');
                    return;
                }
                
                // Show loading
                const loadingSwal = Swal.fire({
                    title: 'Logging in...',
                    allowOutsideClick: false,
                    didOpen: () => {
                        Swal.showLoading();
                    }
                });
                
                try {
                    // Call API to login
                    const result = await apiCall('login', { email, password });
                    
                    if (result.success) {
                        // Save login state
                        localStorage.setItem('adminLoggedIn', 'true');
                        localStorage.setItem('adminName', result.admin.name);
                        localStorage.setItem('adminEmail', result.admin.email);
                        localStorage.setItem('adminRole', result.admin.role);
                        
                        // Show admin panel
                        loginSection.style.display = 'none';
                        adminPanel.style.display = 'block';
                        adminName.textContent = result.admin.name;
                        adminEmail.textContent = result.admin.email;
                        
                        Swal.fire({
                            icon: 'success',
                            title: 'Login Successful!',
                            text: `Welcome ${result.admin.name}`,
                            timer: 2000,
                            showConfirmButton: false
                        });
                        
                        // Initialize dashboard
                        initializeDashboard();
                    } else {
                        // For demo - fallback to hardcoded credentials
                        if (email === 'admin@etfcareer.org' && password === '@Abc123456') {
                            localStorage.setItem('adminLoggedIn', 'true');
                            localStorage.setItem('adminName', 'Admin');
                            localStorage.setItem('adminEmail', email);
                            localStorage.setItem('adminRole', 'admin');
                            
                            loginSection.style.display = 'none';
                            adminPanel.style.display = 'block';
                            adminName.textContent = 'Admin';
                            adminEmail.textContent = email;
                            
                            Swal.fire({
                                icon: 'success',
                                title: 'Login Successful!',
                                text: 'Welcome to ETF Career Admin Panel',
                                timer: 2000,
                                showConfirmButton: false
                            });
                            
                            initializeDashboard();
                        } else {
                            Swal.fire({
                                icon: 'error',
                                title: 'Login Failed',
                                text: result.message || 'Invalid email or password'
                            });
                        }
                    }
                } catch (error) {
                    Swal.fire('Error', 'Network error. Please try again.', 'error');
                }
            });
            
            // Registration functionality
            registerBtn.addEventListener('click', async function() {
                const name = document.getElementById('regName').value;
                const email = document.getElementById('regEmail').value;
                const password = document.getElementById('regPassword').value;
                const confirmPassword = document.getElementById('regConfirmPassword').value;
                const phone = document.getElementById('regPhone').value;
                const address = document.getElementById('regAddress').value;
                const role = document.getElementById('regRole').value;
                
                // Validation
                if (!name || !email || !password || !confirmPassword || !role) {
                    Swal.fire('Error', 'Please fill in all required fields', 'error');
                    return;
                }
                
                if (password !== confirmPassword) {
                    Swal.fire('Error', 'Passwords do not match', 'error');
                    return;
                }
                
                if (password.length < 6) {
                    Swal.fire('Error', 'Password must be at least 6 characters long', 'error');
                    return;
                }
                
                // Show loading
                const loadingSwal = Swal.fire({
                    title: 'Creating account...',
                    allowOutsideClick: false,
                    didOpen: () => {
                        Swal.showLoading();
                    }
                });
                
                try {
                    // Call API to register
                    const result = await apiCall('register', {
                        name,
                        email,
                        password,
                        phone,
                        address,
                        role,
                        status: 'active'
                    });
                    
                    if (result.success) {
                        Swal.fire({
                            icon: 'success',
                            title: 'Registration Successful!',
                            text: `Account created for ${name}. You can now login.`,
                            timer: 3000,
                            showConfirmButton: false
                        });
                        
                        // Switch back to login form
                        registerForm.style.display = 'none';
                        loginForm.style.display = 'block';
                        
                        // Pre-fill login email
                        document.getElementById('email').value = email;
                        
                        // Clear registration form
                        document.getElementById('regName').value = '';
                        document.getElementById('regEmail').value = '';
                        document.getElementById('regPassword').value = '';
                        document.getElementById('regConfirmPassword').value = '';
                        document.getElementById('regPhone').value = '';
                        document.getElementById('regAddress').value = '';
                        document.getElementById('regRole').value = '';
                        document.getElementById('passwordStrength').className = 'password-strength';
                        document.getElementById('passwordStrength').style.width = '0%';
                    } else {
                        Swal.fire('Error', result.message || 'Registration failed', 'error');
                    }
                } catch (error) {
                    Swal.fire('Error', 'Network error. Please try again.', 'error');
                }
            });
            
            // Logout functionality
            logoutBtn.addEventListener('click', function() {
                Swal.fire({
                    title: 'Logout?',
                    text: 'Are you sure you want to logout?',
                    icon: 'warning',
                    showCancelButton: true,
                    confirmButtonColor: '#3085d6',
                    cancelButtonColor: '#d33',
                    confirmButtonText: 'Yes, logout!'
                }).then(async (result) => {
                    if (result.isConfirmed) {
                        try {
                            // Call API to logout
                            await apiCall('logout');
                        } catch (error) {
                            console.log('Logout API error:', error);
                        }
                        
                        // Clear login state
                        localStorage.removeItem('adminLoggedIn');
                        localStorage.removeItem('adminName');
                        localStorage.removeItem('adminEmail');
                        localStorage.removeItem('adminRole');
                        
                        // Hide admin panel, show login
                        adminPanel.style.display = 'none';
                        loginSection.style.display = 'flex';
                        loginForm.style.display = 'block';
                        registerForm.style.display = 'none';
                        
                        Swal.fire({
                            icon: 'success',
                            title: 'Logged Out!',
                            text: 'You have been successfully logged out',
                            timer: 2000,
                            showConfirmButton: false
                        });
                    }
                });
            });
            
            // Navigation functionality
            navLinks.forEach(link => {
                link.addEventListener('click', function(e) {
                    e.preventDefault();
                    const targetSection = this.getAttribute('data-section');
                    
                    // Update active nav link
                    navLinks.forEach(nav => nav.classList.remove('active'));
                    this.classList.add('active');
                    
                    // Show target section
                    sections.forEach(section => section.classList.remove('active'));
                    document.getElementById(targetSection).classList.add('active');
                    
                    // Update page title
                    pageTitle.textContent = this.querySelector('span').textContent;
                    
                    // Initialize section-specific functionality
                    initializeSection(targetSection);
                });
            });
            
            // Tab functionality
            tabs.forEach(tab => {
                tab.addEventListener('click', function() {
                    const targetTab = this.getAttribute('data-tab');
                    
                    // Update active tab
                    tabs.forEach(t => t.classList.remove('active'));
                    this.classList.add('active');
                    
                    // Show target tab content
                    tabContents.forEach(content => content.classList.remove('active'));
                    document.getElementById(`${targetTab}-tab`).classList.add('active');
                });
            });
            
            // Stat cards navigation
            statCards.forEach(card => {
                card.addEventListener('click', function() {
                    const targetSection = this.getAttribute('data-section');
                    const navLink = document.querySelector(`.nav-link[data-section="${targetSection}"]`);
                    if (navLink) {
                        navLink.click();
                    }
                });
            });
            
            // Modal functionality
            closeModalBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    modals.forEach(modal => modal.style.display = 'none');
                });
            });
            
            // Close modal when clicking outside
            window.addEventListener('click', function(e) {
                modals.forEach(modal => {
                    if (e.target === modal) {
                        modal.style.display = 'none';
                    }
                });
            });
            
            // Initialize dashboard
            function initializeDashboard() {
                updateDashboardStats();
                populateRecentOrders();
                populateRecentTickets();
                createRevenueChart();
                createFinancialChart();
                
                // Add event listeners
                document.getElementById('viewAllOrders').addEventListener('click', function() {
                    document.querySelector('.nav-link[data-section="orders"]').click();
                });
                
                document.getElementById('viewAllTickets').addEventListener('click', function() {
                    document.querySelector('.nav-link[data-section="support-ticket"]').click();
                });
                
                document.getElementById('addProductBtn').addEventListener('click', function() {
                    document.getElementById('addProductModal').style.display = 'flex';
                });
                
                document.getElementById('addCustomerBtn').addEventListener('click', function() {
                    document.getElementById('addCustomerModal').style.display = 'flex';
                });
                
                document.getElementById('createOrderBtn').addEventListener('click', function() {
                    Swal.fire('Create Order', 'This feature will be implemented soon!', 'info');
                });
                
                document.getElementById('generateReportBtn').addEventListener('click', function() {
                    document.querySelector('.nav-link[data-section="report"]').click();
                });
            }
            
            function initializeSection(sectionName) {
                switch(sectionName) {
                    case 'products':
                        initializeProducts();
                        break;
                    case 'customers':
                        initializeCustomers();
                        break;
                    case 'orders':
                        initializeOrders();
                        break;
                    case 'payment-gateway':
                        initializePaymentGateway();
                        break;
                    case 'hr-payroll':
                        initializeHRPayroll();
                        break;
                    case 'accounts':
                        initializeAccounts();
                        break;
                    case 'subscription':
                        initializeSubscription();
                        break;
                    case 'user-data':
                        initializeUserData();
                        break;
                    case 'ai-chat':
                        initializeAIChat();
                        break;
                    case 'subscriber':
                        initializeSubscriber();
                        break;
                    case 'support-ticket':
                        initializeSupportTicket();
                        break;
                    case 'contact-messages':
                        initializeContactMessages();
                        break;
                    case 'seo':
                        initializeSEO();
                        break;
                    case 'report':
                        initializeReport();
                        break;
                    case 'language':
                        initializeLanguage();
                        break;
                    case 'email-smtp':
                        initializeEmailSMTP();
                        break;
                    case 'settings':
                        initializeSettings();
                        break;
                }
            }
            
            // Rest of the functions remain the same as before...
            // (All the other functions from the previous code)
            
            // Note: Due to character limits, I'm showing the registration functionality.
            // The rest of the dashboard functions (updateDashboardStats, populateRecentOrders, etc.)
            // remain exactly the same as in the previous implementation.
            
            // For brevity, I'm showing the key changes. The complete file would include
            // all the previous functionality plus the new registration system.
            
        });
        
        // Load dashboard data on startup if logged in
        document.addEventListener('DOMContentLoaded', function() {
            // This would be called from initializeDashboard()
        });
    </script>
</body>
</html>
Back to Directory=ceiIENDB`