ye mein ap ko apnay expense manager ki coding dy raha ho jesay meney ap ko ye coding di hai mujhey isi tarah poori combine coding dena shuru sy end tk kuch bhi kharab missing mat karna please is mein masla ye hai k jab ye app open hoti hai sab sy pehlay profile create wala popup ata hai jo k bht ajeeb hai or porfessional b nahi hai isko polish karna hai or enchane karna hai or jab isko close kartay hai to bilkul white blank page hota hai jo k bht ajeeb lagta hai isko popup sy hata k full page kardo jo bht progessional or advance hona chahiye or dosra is mein ye masla hai k home section k layout or style b prfessional nahi hai or 3sra ye k jab user balance check karta hai to visible eye py click karnay k bad passcode ata hai wo passcode mobile device k kepboard sy number wala keypad open hona chahiye or password bhi numbering mein hona chahiye or satats ka section b advance or professional nahi hai or is mein AI chat bot is expense manager app ka hona chahiye jo is app ko proper define karta ho batata ho urdu english har languge ko support karay har sawaal ka jawab dy or agar us sy puchay k tmko kisnay banaya hai ya kisnay develop kiya hai to wo kehtay k Dx-ahmed ny or is mein preloader bhi karo pofessional fancy or advance wala ye hai coding <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Expense Manager PRO</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet"> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.5.23/jspdf.plugin.autotable.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <style> :root { --primary: #00A859; --primary-dark: #00843D; --primary-light: #E8F5E9; --danger: #EF4444; --danger-light: #FFEBEE; --warning: #FF9800; --info: #2196F3; --background: #FFFFFF; --surface: #F5F5F5; --text: #212121; --text-light: #757575; --border: #E0E0E0; --radius: 12px; --radius-sm: 8px; --shadow: 0 2px 8px rgba(0, 0, 0, 0.1); --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15); --font-size: 16px; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Roboto', sans-serif; font-size: var(--font-size); } body { background: var(--background); color: var(--text); min-height: 100vh; } .app-container { max-width: 1200px; margin: 0 auto; background: var(--background); padding-bottom: 80px; min-height: 100vh; } /* Header Styles */ .app-header { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; padding: 1rem; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); } .header-title { display: flex; align-items: center; gap: 0.5rem; font-size: 1.25rem; font-weight: 700; } .icon-button { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); border: none; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; } .icon-button:hover { background: rgba(255, 255, 255, 0.25); transform: scale(1.05); } /* Balance Card */ .balance-card { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; padding: 1.5rem 1rem; margin: 0.5rem; border-radius: var(--radius); display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow); } .balance-card h2 { font-size: 1.75rem; margin: 0.5rem 0; font-weight: 700; } .balance-card p { opacity: 0.9; font-size: 0.9rem; } /* Summary Cards */ .summary-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; padding: 0.5rem; } .summary-card { background: var(--surface); padding: 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow); } .summary-card-title { font-size: 0.8rem; color: var(--text-light); margin-bottom: 0.5rem; } .summary-card-value { font-size: 1.25rem; font-weight: 600; } .summary-card-income { color: var(--primary); } .summary-card-expense { color: var(--danger); } /* Buttons */ .btn { background: var(--primary); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.5rem; transition: all 0.2s ease; box-shadow: var(--shadow); } .btn:hover { background: var(--primary-dark); transform: translateY(-2px); } .btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; } .btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); } .btn-outline:hover { background: var(--primary-light); } .btn-danger { background: var(--danger); } .btn-danger:hover { background: #DC2626; } /* Home Features */ .features-grid { padding: 1rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; } .feature-card { background: var(--surface); color: var(--text); border: none; padding: 1rem; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; transition: all 0.2s ease; box-shadow: var(--shadow); text-align: center; } .feature-card:hover { background: var(--primary); color: white; transform: translateY(-2px); } .feature-card span { font-size: 1.5rem; } /* Quick Actions */ .quick-actions { padding: 1rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; } .quick-action { background: var(--surface); padding: 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; text-align: center; transition: all 0.2s ease; } .quick-action:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); } .quick-action-icon { width: 40px; height: 40px; background: var(--primary-light); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 0.5rem; } .quick-action-title { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.25rem; } .quick-action-desc { font-size: 0.8rem; color: var(--text-light); } /* Sections */ .section { padding: 1rem; margin-bottom: 0.5rem; } .section-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; color: var(--primary); display: flex; align-items: center; gap: 0.5rem; } .section-title span { font-size: 1.2rem; } /* Lists */ .list-container { max-height: 300px; overflow-y: auto; margin-top: 0.5rem; } .list-item { padding: 1rem; margin-bottom: 0.75rem; border-radius: var(--radius-sm); box-shadow: var(--shadow); display: flex; justify-content: space-between; align-items: center; background: var(--background); transition: all 0.2s ease; } .list-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); } .list-item-content { flex: 1; } .list-item-title { font-weight: 500; margin-bottom: 0.25rem; } .list-item-subtitle { font-size: 0.8rem; color: var(--text-light); } .list-item-amount { font-weight: 600; margin-left: 1rem; white-space: nowrap; } .income-amount { color: var(--primary); } .expense-amount { color: var(--danger); } .delete-btn { background: none; border: none; color: var(--danger); cursor: pointer; margin-left: 0.5rem; padding: 0.25rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; } .delete-btn:hover { background: var(--danger-light); } /* Progress Bars */ .progress-container { margin: 1rem 0; } .progress-info { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.8rem; } .progress-bar { height: 8px; background: #E2E8F0; border-radius: 4px; overflow: hidden; } .progress-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width 0.5s ease; } .progress-danger .progress-fill { background: var(--danger); } .progress-warning .progress-fill { background: var(--warning); } /* Forms */ .form-group { margin-bottom: 1rem; } .form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.9rem; } .form-control { width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 1rem; background: var(--surface); transition: all 0.2s ease; color: var(--text); } .form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0, 168, 89, 0.2); } .form-select { appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1rem; } /* Date Time Input */ .datetime-inputs { display: flex; gap: 0.5rem; } .datetime-inputs .form-control { flex: 1; } /* Charts */ .chart-container { padding: 1rem; height: 300px; } /* Bottom Navigation */ .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; width: 100%; max-width: 1200px; margin: 0 auto; background: var(--surface); padding: 0.5rem; display: flex; justify-content: space-around; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); z-index: 90; } .nav-item { color: var(--text-light); text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.5rem; font-size: 0.75rem; border-radius: var(--radius-sm); transition: all 0.2s ease; } .nav-item:hover { color: var(--primary); } .nav-item.active { color: var(--primary); background: var(--primary-light); } .nav-item span { font-size: 1.25rem; }/* Fixed Notification Panel */.notifications-panel { position: fixed; top: 0; right: 0; width: 100%; height: 100vh; background: var(--background); z-index: 9999; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow-y: auto; box-shadow: -4px 0 15px rgba(0, 0, 0, 0.2);}.notifications-panel.active { transform: translateX(0);}.notification-item { padding: 15px; margin: 10px; background: var(--surface); border-radius: 12px; border-left: 5px solid var(--primary); animation: notificationEntry 0.3s ease-out;}@keyframes notificationEntry { 0% { opacity: 0; transform: translateX(50px); } 100% { opacity: 1; transform: translateX(0); }} .notifications-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding: 1rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--background); z-index: 1; } /* Modals */ .modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); align-items: center; justify-content: center; z-index: 1000; padding: 1rem; } .modal.active { display: flex; } .modal-content { background: var(--background); padding: 1.5rem; border-radius: var(--radius); max-width: 400px; width: 100%; box-shadow: var(--shadow-md); position: relative; max-height: 90vh; overflow-y: auto; } .modal-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; color: var(--primary); } .modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-light); position: absolute; top: 1rem; right: 1rem; padding: 0.25rem; border-radius: 50%; } .modal-close:hover { background: var(--surface); } .modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.5rem; } /* Welcome Screen */ .welcome-screen { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: white; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 3000; padding: 2rem; text-align: center; } .welcome-content { max-width: 400px; width: 100%; } .welcome-logo { font-size: 2.5rem; margin-bottom: 1rem; display: flex; justify-content: center; } .welcome-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; } .welcome-subtitle { font-size: 1rem; opacity: 0.9; margin-bottom: 2rem; } .welcome-developers { font-size: 0.9rem; margin-top: 2rem; opacity: 0.8; } .carousel { width: 100%; overflow: hidden; margin-bottom: 2rem; } .carousel-slides { display: flex; transition: transform 0.5s ease; } .carousel-slide { min-width: 100%; padding: 1rem; } .carousel-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; } .dot { width: 10px; height: 10px; background: rgba(255, 255, 255, 0.5); border-radius: 50%; cursor: pointer; transition: all 0.3s ease; } .dot.active { background: white; transform: scale(1.2); } .welcome-screen.hidden { display: none; } /* Settings */ .settings-header { background: var(--background); padding: 1rem; position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border); } .settings-header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; } .settings-header-top h2 { font-size: 1.5rem; font-weight: 700; } .language-toggle { display: flex; gap: 0.25rem; background: var(--surface); padding: 0.25rem; border-radius: var(--radius-sm); } .language-btn { background: transparent; color: var(--text); border: none; padding: 0.25rem 0.5rem; border-radius: 4px; cursor: pointer; font-size: 0.85rem; transition: all 0.2s ease; } .language-btn.active { background: var(--primary); color: white; } /* Modern Profile Header */ .settings-profile { background: linear-gradient(135deg, rgba(0, 168, 89, 0.1), rgba(0, 132, 61, 0.1)); color: var(--text); padding: 1.5rem; display: flex; align-items: center; gap: 1rem; margin: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); position: relative; overflow: hidden; border: 1px solid rgba(0, 168, 89, 0.2); } .settings-profile::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); } .settings-profile-pic { width: 80px; height: 80px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 2rem; flex-shrink: 0; border: 3px solid white; box-shadow: var(--shadow); overflow: hidden; } .settings-profile-pic img { width: 100%; height: 100%; object-fit: cover; } .settings-profile-info { flex: 1; } .settings-profile-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--primary-dark); } .settings-profile-detail { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.25rem; display: flex; align-items: center; gap: 0.5rem; } .settings-profile-edit { background: var(--primary); color: white; border: none; border-radius: var(--radius-sm); padding: 0.5rem 1rem; display: flex; align-items: center; gap: 0.5rem; cursor: pointer; transition: all 0.2s ease; font-weight: 500; box-shadow: var(--shadow); position: absolute; bottom: 1rem; right: 1rem; } .settings-profile-edit:hover { background: var(--primary-dark); transform: translateY(-2px); } .settings-item { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: all 0.2s ease; } .settings-item:hover { background: var(--surface); } .settings-item-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; } .settings-item-content { flex: 1; } .settings-item-title { font-weight: 500; margin-bottom: 0.1rem; } .settings-item-subtitle { font-size: 0.8rem; color: var(--text-light); } /* Views */ .view { display: none; } .view.active { display: block; } /* Empty State */ .empty-state { text-align: center; padding: 2rem 1rem; color: var(--text-light); } .empty-state-icon { font-size: 3rem; color: var(--border); margin-bottom: 1rem; } .empty-state-text { font-size: 1rem; } /* Budget Form */ .budget-form { display: flex; gap: 0.5rem; margin-top: 0.5rem; } .budget-input { flex: 1; } /* Budget Card */ .budget-card { background: var(--surface); padding: 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow); margin-bottom: 1rem; } .budget-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; } .budget-card-title { font-weight: 600; color: var(--primary); } .budget-card-amount { font-weight: 600; } /* Calculator */ .calculator-display { width: 100%; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 1.25rem; text-align: right; background: var(--surface); margin-bottom: 0.5rem; font-family: monospace; color: var(--text); } .calculator-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; } .calc-btn { background: var(--surface); color: var(--text); border: none; padding: 0.75rem; border-radius: var(--radius-sm); cursor: pointer; font-size: 1rem; transition: all 0.2s ease; } .calc-btn:hover { background: var(--primary); color: white; } .calc-btn-operator { background: var(--primary-light); color: var(--primary); } .calc-btn-equals { background: var(--primary); color: white; } .calc-btn-clear { background: var(--danger-light); color: var(--danger); } .calc-btn-backspace { background: var(--warning); color: white; } /* Currency Converter */ .converter-result { margin-top: 1rem; padding: 1rem; background: var(--surface); border-radius: var(--radius-sm); text-align: center; font-weight: 600; color: var(--text); } /* Loading */ .loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 4000; color: white; } .loading-spinner { width: 50px; height: 50px; border: 5px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top-color: var(--primary); animation: spin 1s ease-in-out infinite; margin-bottom: 1rem; } @keyframes spin { to { transform: rotate(360deg); } } /* Dark Theme */ .dark-theme { --background: #121212; --surface: #1E1E1E; --text: #FFFFFF; --text-light: #B0B0B0; --border: #333333; --primary: #00A859; --primary-dark: #00843D; --primary-light: #1A3A27; } /* Blue Theme */ .blue-theme { --primary: #2196F3; --primary-dark: #1565C0; --primary-light: #E3F2FD; } /* Font Size Classes */ .font-small { --font-size: 14px; } .font-medium { --font-size: 16px; } .font-large { --font-size: 18px; } /* Responsive Grid Layout */ @media (min-width: 768px) { .app-container { display: grid; grid-template-columns: 300px 1fr; grid-template-rows: auto 1fr auto; grid-template-areas: "header header" "sidebar main" "sidebar bottom-nav"; padding-bottom: 0; } .app-header { grid-area: header; position: static; } .sidebar { grid-area: sidebar; background: var(--surface); border-right: 1px solid var(--border); height: 100vh; position: sticky; top: 0; overflow-y: auto; padding-bottom: 80px; } main { grid-area: main; padding-bottom: 80px; } .bottom-nav { grid-area: bottom-nav; position: static; border-top: 1px solid var(--border); } .features-grid, .quick-actions { grid-template-columns: repeat(4, 1fr); } .balance-card { margin: 1rem; } .summary-cards { padding: 1rem; } /* Sidebar Navigation */ .sidebar-nav { display: flex; flex-direction: column; padding: 1rem; } .sidebar-item { display: flex; align-items: center; gap: 1rem; padding: 1rem; color: var(--text); text-decoration: none; border-radius: var(--radius-sm); transition: all 0.2s ease; margin-bottom: 0.5rem; } .sidebar-item:hover { background: var(--primary-light); color: var(--primary); } .sidebar-item.active { background: var(--primary); color: white; } .sidebar-item span { font-size: 1.5rem; } /* Hide bottom nav on desktop */ .bottom-nav { display: none; } } /* Responsive Adjustments */ @media (max-width: 767px) { .sidebar { display: none; } .features-grid, .quick-actions { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 480px) { .features-grid, .quick-actions { grid-template-columns: 1fr; } .settings-profile { flex-direction: column; text-align: center; } .settings-profile-edit { position: static; margin-top: 1rem; align-self: center; } } </style></head><body> <!-- Welcome Screen --> <div class="welcome-screen" id="welcomeScreen"> <div class="welcome-content"> <div class="welcome-logo"> <span class="material-icons-round">account_balance_wallet</span> </div> <div class="carousel" id="carousel"> <div class="carousel-slides" id="carouselSlides"> <div class="carousel-slide"> <h2 class="welcome-title" data-lang="welcome">Welcome to Expense Manager PRO</h2> <p class="welcome-subtitle" data-lang="welcome_desc">Track your expenses and income easily with our powerful financial tool</p> </div> <div class="carousel-slide"> <h2 class="welcome-title" data-lang="track">Manage Your Finances</h2> <p class="welcome-subtitle" data-lang="track_desc">Stay on top of your cash flow with detailed analytics</p> </div> <div class="carousel-slide"> <h2 class="welcome-title" data-lang="goals">Achieve Your Goals</h2> <p class="welcome-subtitle" data-lang="goals_desc">Set and track savings targets with visual progress</p> </div> <div class="carousel-slide"> <h2 class="welcome-title" data-lang="secure">Secure & Private</h2> <p class="welcome-subtitle" data-lang="secure_desc">Your data stays on your device with passcode protection</p> </div> </div> <div class="carousel-dots" id="carouselDots"></div> </div> <p class="welcome-developers">Developed By Ahsan, Muheed, Ismail</p> <button class="btn" onclick="showProfileSetup()" data-lang="get_started"> <span class="material-icons-round">arrow_forward</span> <span>Get Started</span> </button> </div> </div> <!-- Loading Overlay --> <div class="loading-overlay" id="loadingOverlay" style="display: none;"> <div class="loading-spinner"></div> <div id="loadingText">Loading...</div> </div> <!-- Profile Setup Modal --> <div class="modal" id="profileModal"> <div class="modal-content"> <button class="modal-close" onclick="closeModal('profileModal')">×</button> <h2 class="modal-title" data-lang="create_profile">Create Profile</h2> <div class="form-group"> <label class="form-label" data-lang="username">Username <span class="required">*</span></label> <input type="text" class="form-control" id="username" required> </div> <div class="form-group"> <label class="form-label" data-lang="age">Age <span class="required">*</span></label> <input type="number" class="form-control" id="age" required min="13" max="120"> </div> <div class="form-group"> <label class="form-label" data-lang="phone">Phone Number (Optional)</label> <input type="tel" class="form-control" id="phoneNumber" placeholder="+92 300 1234567"> </div> <div class="form-group"> <label class="form-label" data-lang="email">Email (Optional)</label> <input type="email" class="form-control" id="email" placeholder="example@domain.com"> </div> <div class="form-group"> <label class="form-label" data-lang="profile_pic">Profile Picture (Optional)</label> <input type="file" class="form-control" id="profilePic" accept="image/*"> </div> <div class="form-group"> <label class="form-label" data-lang="passcode">Set Passcode <span class="required">*</span></label> <input type="password" class="form-control" id="initialPasscode" placeholder="4-digit passcode" required minlength="4" maxlength="4" pattern="\d{4}"> <small class="form-text" data-lang="passcode_hint">This will be used to secure your financial data</small> </div> <div class="modal-footer"> <button class="btn" onclick="saveProfile()" data-lang="save"> <span class="material-icons-round">save</span> <span>Save & Continue</span> </button> </div> </div> </div> <!-- Main App Container --> <div class="app-container" id="appContainer" style="display: none;"> <!-- App Header --> <header class="app-header"> <h1 class="header-title"> <span class="material-icons-round">account_balance_wallet</span> <span data-lang="app_name">Expense Manager</span> </h1> <div style="display: flex; gap: 0.5rem;"> <button class="icon-button" onclick="switchView('goals')"> <span class="material-icons-round">flag</span> </button> <button class="icon-button" onclick="toggleNotifications()"> <span class="material-icons-round">notifications</span> <span id="notificationBadge" class="notification-badge" style="display: none;"></span> </button> </div> </header> <!-- Sidebar Navigation (Desktop) --> <aside class="sidebar"> <div class="sidebar-nav"> <a href="#" class="sidebar-item active" data-view="home" onclick="switchView('home')"> <span class="material-icons-round">home</span> <span data-lang="home">Home</span> </a> <a href="#" class="sidebar-item" data-view="income" onclick="switchView('income')"> <span class="material-icons-round">payments</span> <span data-lang="income">Income</span> </a> <a href="#" class="sidebar-item" data-view="expenses" onclick="switchView('expenses')"> <span class="material-icons-round">receipt</span> <span data-lang="expenses">Expenses</span> </a> <a href="#" class="sidebar-item" data-view="stats" onclick="switchView('stats')"> <span class="material-icons-round">analytics</span> <span data-lang="stats">Stats</span> </a> <a href="#" class="sidebar-item" data-view="budget" onclick="switchView('budget')"> <span class="material-icons-round">savings</span> <span data-lang="budget">Budget</span> </a> <a href="#" class="sidebar-item" data-view="goals" onclick="switchView('goals')"> <span class="material-icons-round">flag</span> <span data-lang="goals">Goals</span> </a> <a href="#" class="sidebar-item" data-view="settings" onclick="switchView('settings')"> <span class="material-icons-round">settings</span> <span data-lang="settings">Settings</span> </a> </div> </aside> <!-- Main Content --> <main> <!-- Home View --> <div id="home-view" class="view active"> <div class="balance-card"> <div> <p data-lang="available_balance">AVAILABLE BALANCE</p> <div style="display: flex; align-items: center; gap: 0.5rem;"> <h2 id="currentBalance">****</h2> <button class="icon-button" onclick="showPasscodeModal()"> <span class="material-icons-round" id="eyeIcon">visibility_off</span> </button> </div> </div> <button class="btn" onclick="switchView('income')" data-lang="add_cash"> <span class="material-icons-round">add</span> <span>Add Cash</span> </button> </div> <!-- Summary Cards --> <div class="summary-cards"> <div class="summary-card"> <div class="summary-card-title">TOTAL INCOME</div> <div class="summary-card-value summary-card-income" id="totalIncome">Rs 0.00</div> </div> <div class="summary-card"> <div class="summary-card-title">TOTAL EXPENSES</div> <div class="summary-card-value summary-card-expense" id="totalExpenses">Rs 0.00</div> </div> </div> <!-- Quick Actions --> <div class="quick-actions"> <div class="quick-action" onclick="showCurrencyConverter()"> <div class="quick-action-icon"> <span class="material-icons-round">currency_exchange</span> </div> <div class="quick-action-title">Currency Converter</div> <div class="quick-action-desc">Convert between currencies</div> </div> <div class="quick-action" onclick="showScientificCalculator()"> <div class="quick-action-icon"> <span class="material-icons-round">calculate</span> </div> <div class="quick-action-title">Scientific Calculator</div> <div class="quick-action-desc">Advanced calculations</div> </div> <div class="quick-action" onclick="switchView('budget')"> <div class="quick-action-icon"> <span class="material-icons-round">savings</span> </div> <div class="quick-action-title">Set Budget</div> <div class="quick-action-desc">Control your expenses</div> </div> <div class="quick-action" onclick="switchView('goals')"> <div class="quick-action-icon"> <span class="material-icons-round">flag</span> </div> <div class="quick-action-title">Set Goal</div> <div class="quick-action-desc">Save for the future</div> </div> </div> <!-- Recent Transactions --> <div class="section"> <h3 class="section-title"> <span class="material-icons-round">history</span> <span data-lang="recent_transactions">Recent Transactions</span> </h3> <div id="recentTransactions" class="list-container"> <!-- Transactions will be added here dynamically --> </div> </div> <!-- Savings Goal --> <div class="section"> <h3 class="section-title"> <span class="material-icons-round">flag</span> <span data-lang="savings_goal">Savings Goal</span> </h3> <div id="savingsGoal"> <!-- Savings goal will be added here dynamically --> </div> </div> </div> <!-- Income View --> <div id="income-view" class="view"> <div class="section"> <h3 class="section-title"> <span class="material-icons-round">payments</span> <span data-lang="add_income">Add Income</span> </h3> <form id="incomeForm"> <div class="form-group"> <label class="form-label" data-lang="amount">Amount <span class="required">*</span></label> <input type="number" class="form-control" id="incomeAmount" required step="0.01" min="0"> </div> <div class="form-group"> <label class="form-label" data-lang="source">Source <span class="required">*</span></label> <select class="form-control form-select" id="incomeSource" required> <option value="Salary">Salary</option> <option value="Business">Business</option> <option value="Freelance">Freelance</option> <option value="Investment">Investment</option> <option value="Gift">Gift</option> <option value="Other">Other</option> </select> </div> <div class="form-group"> <label class="form-label" data-lang="recurring">Recurring</label> <select class="form-control form-select" id="incomeRecurring"> <option value="none">One-Time</option> <option value="daily">Daily</option> <option value="weekly">Weekly</option> <option value="monthly">Monthly</option> <option value="yearly">Yearly</option> </select> </div> <div class="form-group"> <label class="form-label">Date & Time <span class="required">*</span></label> <div class="datetime-inputs"> <input type="date" class="form-control" id="incomeDate" required> <input type="time" class="form-control" id="incomeTime" required> </div> </div> <button type="submit" class="btn" data-lang="add_income"> <span class="material-icons-round">add</span> <span>Add Income</span> </button> </form> </div> <div class="section"> <h3 class="section-title"> <span class="material-icons-round">list</span> <span data-lang="income_history">Income History</span> </h3> <div id="incomeList" class="list-container"> <!-- Income items will be added here dynamically --> </div> </div> </div> <!-- Expenses View --> <div id="expenses-view" class="view"> <div class="section"> <h3 class="section-title"> <span class="material-icons-round">receipt</span> <span data-lang="add_expense">Add Expense</span> </h3> <form id="expenseForm"> <div class="form-group"> <label class="form-label" data-lang="description">Description <span class="required">*</span></label> <input type="text" class="form-control" id="expenseDescription" required> </div> <div class="form-group"> <label class="form-label" data-lang="amount">Amount <span class="required">*</span></label> <input type="number" class="form-control" id="expenseAmount" required step="0.01" min="0"> </div> <div class="form-group"> <label class="form-label" data-lang="category">Category <span class="required">*</span></label> <select class="form-control form-select" id="expenseCategory" required> <option value="Food">Food</option> <option value="Transport">Transport</option> <option value="Shopping">Shopping</option> <option value="Entertainment">Entertainment</option> <option value="Bills">Bills</option> <option value="Health">Health</option> <option value="Education">Education</option> <option value="Others">Others</option> </select> </div> <div class="form-group"> <label class="form-label" data-lang="recurring">Recurring</label> <select class="form-control form-select" id="expenseRecurring"> <option value="none">One-Time</option> <option value="daily">Daily</option> <option value="weekly">Weekly</option> <option value="monthly">Monthly</option> <option value="yearly">Yearly</option> </select> </div> <div class="form-group"> <label class="form-label">Date & Time <span class="required">*</span></label> <div class="datetime-inputs"> <input type="date" class="form-control" id="expenseDate" required> <input type="time" class="form-control" id="expenseTime" required> </div> </div> <button type="submit" class="btn" data-lang="add_expense"> <span class="material-icons-round">add</span> <span>Add Expense</span> </button> </form> </div> <div class="section"> <h3 class="section-title"> <span class="material-icons-round">list</span> <span data-lang="expense_history">Expense History</span> </h3> <div id="expenseList" class="list-container"> <!-- Expense items will be added here dynamically --> </div> </div> </div> <!-- Stats View --> <div id="stats-view" class="view"> <div class="section"> <h3 class="section-title"> <span class="material-icons-round">analytics</span> <span data-lang="expense_stats">Expense Statistics</span> </h3> <div class="chart-container"> <canvas id="expenseChart"></canvas> </div> </div> <div class="section"> <h3 class="section-title"> <span class="material-icons-round">description</span> <span data-lang="reports">Reports</span> </h3> <button class="btn" onclick="generateInvoice()" data-lang="generate_invoice"> <span class="material-icons-round">picture_as_pdf</span> <span>Generate Invoice</span> </button> <button class="btn btn-outline" onclick="exportData()" style="margin-left: 0.5rem;" data-lang="export_data"> <span class="material-icons-round">download</span> <span>Export Data</span> </button> </div> </div> <!-- Budget View --> <div id="budget-view" class="view"> <div class="section"> <h3 class="section-title"> <span class="material-icons-round">savings</span> <span data-lang="budget_management">Budget Management</span> </h3> <div id="budgetList" class="list-container"> <!-- Budget items will be added here dynamically --> </div> <div class="section"> <h3 class="section-title"> <span class="material-icons-round">add</span> <span>Create New Budget</span> </h3> <form id="newBudgetForm"> <div class="form-group"> <label class="form-label">Category <span class="required">*</span></label> <select class="form-control form-select" id="newBudgetCategory" required> <option value="Food">Food</option> <option value="Transport">Transport</option> <option value="Shopping">Shopping</option> <option value="Entertainment">Entertainment</option> <option value="Bills">Bills</option> <option value="Health">Health</option> <option value="Education">Education</option> <option value="Others">Others</option> </select> </div> <div class="form-group"> <label class="form-label">Amount <span class="required">*</span></label> <input type="number" class="form-control" id="newBudgetAmount" required step="0.01" min="0"> </div> <button type="submit" class="btn"> <span class="material-icons-round">save</span> <span>Create Budget</span> </button> </form> </div> </div> </div> <!-- Goals View --> <div id="goals-view" class="view"> <div class="section"> <h3 class="section-title"> <span class="material-icons-round">flag</span> <span data-lang="set_goals">Set Savings Goal</span> </h3> <form id="goalForm"> <div class="form-group"> <label class="form-label" data-lang="target_amount">Target Amount <span class="required">*</span></label> <input type="number" class="form-control" id="goalAmount" required step="0.01" min="0"> </div> <div class="form-group"> <label class="form-label" data-lang="deadline">Deadline <span class="required">*</span></label> <input type="date" class="form-control" id="goalDate" required> </div> <div class="form-group"> <label class="form-label" data-lang="reminder">Reminder</label> <select class="form-control form-select" id="goalReminder"> <option value="none">No Reminder</option> <option value="1day">1 Day Before</option> <option value="3days">3 Days Before</option> <option value="1week">1 Week Before</option> </select> </div> <button type="submit" class="btn" data-lang="set_goals"> <span class="material-icons-round">save</span> <span>Set Goal</span> </button> </form> </div> <div class="section"> <h3 class="section-title"> <span class="material-icons-round">list</span> <span data-lang="your_goals">Your Goals</span> </h3> <div id="goalList" class="list-container"> <!-- Goal items will be added here dynamically --> </div> </div> </div> <!-- Settings View --> <div id="settings-view" class="view"> <div class="settings-header"> <div class="settings-header-top"> <h2 data-lang="my_account">My Account</h2> <div class="language-toggle"> <button class="language-btn active" onclick="switchLanguage('en')">ENG</button> <button class="language-btn" onclick="switchLanguage('ur')">اردو</button> </div> </div> <small data-lang="profile_settings">Profile, Settings & More</small> <small>Version 1.0.0</small> </div> <!-- Profile Section --> <div class="settings-profile"> <div class="settings-profile-pic" id="profilePicPreview"> <span class="material-icons-round">person</span> </div> <div class="settings-profile-info"> <h3 class="settings-profile-name" id="usernameDisplay">Guest</h3> <div class="settings-profile-detail"> <span class="material-icons-round" style="font-size: 1rem;">person</span> <span id="ageDisplay"></span> </div> <div class="settings-profile-detail"> <span class="material-icons-round" style="font-size: 1rem;">phone</span> <span id="phoneDisplay"></span> </div> <div class="settings-profile-detail"> <span class="material-icons-round" style="font-size: 1rem;">email</span> <span id="emailDisplay"></span> </div> </div> <button class="settings-profile-edit" onclick="showEditProfile()"> <span class="material-icons-round">edit</span> <span data-lang="edit">Edit</span> </button> </div> <!-- Settings List --> <div style="padding-bottom: 80px;"> <div class="settings-item" onclick="showChangeCurrency()"> <div class="settings-item-icon"> <span class="material-icons-round">currency_exchange</span> </div> <div class="settings-item-content"> <div class="settings-item-title" data-lang="change_currency">Change Currency</div> <div class="settings-item-subtitle" id="currentCurrencyDisplay">PKR</div> </div> </div> <div class="settings-item" onclick="showChangeTheme()"> <div class="settings-item-icon"> <span class="material-icons-round">palette</span> </div> <div class="settings-item-content"> <div class="settings-item-title" data-lang="change_theme">Change Theme</div> <div class="settings-item-subtitle" id="currentThemeDisplay">Light</div> </div> </div> <div class="settings-item" onclick="showChangePasscodeModal()"> <div class="settings-item-icon"> <span class="material-icons-round">lock</span> </div> <div class="settings-item-content"> <div class="settings-item-title" data-lang="change_passcode">Change Passcode</div> <div class="settings-item-subtitle" data-lang="secure_account">Secure your account</div> </div> </div> <div class="settings-item"> <div class="settings-item-icon"> <span class="material-icons-round">notifications</span> </div> <div class="settings-item-content"> <div class="settings-item-title" data-lang="notifications">Notifications</div> <div class="settings-item-subtitle" data-lang="manage_alerts">Manage alerts</div> </div> <select class="form-control form-select" id="notificationsToggle" onchange="toggleNotificationsSetting(this.value)" style="width: 80px; padding: 0.25rem; font-size: 0.8rem;"> <option value="on">On</option> <option value="off">Off</option> </select> </div> <div class="settings-item" onclick="showInvoiceCounter()"> <div class="settings-item-icon"> <span class="material-icons-round">receipt</span> </div> <div class="settings-item-content"> <div class="settings-item-title" data-lang="invoice_counter">Invoice Counter</div> <div class="settings-item-subtitle" id="invoiceCounterDisplay">0 invoices generated</div> </div> </div> <div class="settings-item" onclick="showFontSettings()"> <div class="settings-item-icon"> <span class="material-icons-round">text_fields</span> </div> <div class="settings-item-content"> <div class="settings-item-title">Font Size</div> <div class="settings-item-subtitle" id="currentFontSizeDisplay">Medium</div> </div> </div> <div class="settings-item" onclick="showInstructions()"> <div class="settings-item-icon"> <span class="material-icons-round">help</span> </div> <div class="settings-item-content"> <div class="settings-item-title" data-lang="instructions">Instructions</div> <div class="settings-item-subtitle" data-lang="app_guide">App guide</div> </div> </div> <div class="settings-item" onclick="clearData()"> <div class="settings-item-icon" style="background: var(--danger-light); color: var(--danger);"> <span class="material-icons-round">delete</span> </div> <div class="settings-item-content"> <div class="settings-item-title" data-lang="clear_data">Clear Data</div> <div class="settings-item-subtitle" data-lang="reset_app">Reset the app</div> </div> </div> </div> </div> </main> <!-- Bottom Navigation --> <nav class="bottom-nav"> <a href="#" class="nav-item active" data-view="home"> <span class="material-icons-round">home</span> <span data-lang="home">Home</span> </a> <a href="#" class="nav-item" data-view="income"> <span class="material-icons-round">payments</span> <span data-lang="income">Income</span> </a> <a href="#" class="nav-item" data-view="expenses"> <span class="material-icons-round">receipt</span> <span data-lang="expenses">Expenses</span> </a> <a href="#" class="nav-item" data-view="stats"> <span class="material-icons-round">analytics</span> <span data-lang="stats">Stats</span> </a> <a href="#" class="nav-item" data-view="settings"> <span class="material-icons-round">settings</span> <span data-lang="settings">Settings</span> </a> </nav> </div> <!-- Notifications Panel --> <div id="notificationsPanel" class="notifications-panel"> <div class="notifications-header"> <h2 data-lang="notifications">Notifications</h2> <button class="btn btn-danger btn-sm" onclick="toggleNotifications()"> <span class="material-icons-round">close</span> <span data-lang="close">Close</span> </button> </div> <div style="margin-bottom: 1rem; display: flex; justify-content: flex-end; padding: 0 1rem;"> <button class="btn btn-outline btn-sm" onclick="clearNotifications()"> <span class="material-icons-round">delete</span> <span data-lang="clear_all">Clear All</span> </button> </div> <div id="notificationsList" class="list-container" style="flex: 1; padding: 0 1rem;"> <!-- Notifications will be added here dynamically --> </div> </div> <!-- Passcode Modal --> <div class="modal" id="passcodeModal"> <div class="modal-content"> <button class="modal-close" onclick="closeModal('passcodeModal')">×</button> <h2 class="modal-title" data-lang="enter_passcode">Enter Passcode</h2> <div class="form-group"> <input type="password" class="form-control" id="passcodeInput" placeholder="Enter your passcode" required> </div> <div class="modal-footer"> <button class="btn" onclick="verifyPasscode()" data-lang="verify"> <span class="material-icons-round">lock_open</span> <span>Verify</span> </button> </div> </div> </div> <!-- Change Passcode Modal --> <div class="modal" id="changePasscodeModal"> <div class="modal-content"> <button class="modal-close" onclick="closeModal('changePasscodeModal')">×</button> <h2 class="modal-title" data-lang="change_passcode">Change Passcode</h2> <div class="form-group"> <label class="form-label" data-lang="current_passcode">Current Passcode</label> <input type="password" class="form-control" id="currentPasscode" placeholder="Enter current passcode" required> </div> <div class="form-group"> <label class="form-label" data-lang="new_passcode">New Passcode</label> <input type="password" class="form-control" id="newPasscode" placeholder="Enter new passcode" required> </div> <div class="form-group"> <label class="form-label" data-lang="confirm_new_passcode">Confirm New Passcode</label> <input type="password" class="form-control" id="confirmNewPasscode" placeholder="Confirm new passcode" required> </div> <div class="modal-footer"> <button class="btn" onclick="changePasscode()" data-lang="change"> <span class="material-icons-round">lock_reset</span> <span>Change</span> </button> </div> </div> </div> <!-- Edit Profile Modal --> <div class="modal" id="editProfileModal"> <div class="modal-content"> <button class="modal-close" onclick="closeModal('editProfileModal')">×</button> <h2 class="modal-title" data-lang="edit_profile">Edit Profile</h2> <div class="form-group"> <label class="form-label" data-lang="username">Username <span class="required">*</span></label> <input type="text" class="form-control" id="editUsername" required> </div> <div class="form-group"> <label class="form-label" data-lang="age">Age <span class="required">*</span></label> <input type="number" class="form-control" id="editAge" required> </div> <div class="form-group"> <label class="form-label" data-lang="phone">Phone Number (Optional)</label> <input type="tel" class="form-control" id="editPhoneNumber"> </div> <div class="form-group"> <label class="form-label" data-lang="email">Email (Optional)</label> <input type="email" class="form-control" id="editEmail"> </div> <div class="form-group"> <label class="form-label" data-lang="profile_pic">Profile Picture (Optional)</label> <input type="file" class="form-control" id="editProfilePic" accept="image/*"> </div> <div class="modal-footer"> <button class="btn" onclick="updateProfile()" data-lang="update"> <span class="material-icons-round">save</span> <span>Update</span> </button> </div> </div> </div> <!-- Change Currency Modal --> <div class="modal" id="changeCurrencyModal"> <div class="modal-content"> <button class="modal-close" onclick="closeModal('changeCurrencyModal')">×</button> <h2 class="modal-title" data-lang="change_currency">Change Currency</h2> <div class="form-group"> <label class="form-label" data-lang="select_currency">Select Currency</label> <select class="form-control form-select" id="currencySelect"> <option value="PKR">Pakistani Rupee (PKR)</option> <option value="USD">US Dollar (USD)</option> <option value="EUR">Euro (EUR)</option> <option value="GBP">British Pound (GBP)</option> <option value="JPY">Japanese Yen (JPY)</option> </select> </div> <div class="modal-footer"> <button class="btn" onclick="changeCurrency()" data-lang="save"> <span class="material-icons-round">save</span> <span>Save</span> </button> </div> </div> </div> <!-- Change Theme Modal --> <div class="modal" id="changeThemeModal"> <div class="modal-content"> <button class="modal-close" onclick="closeModal('changeThemeModal')">×</button> <h2 class="modal-title" data-lang="change_theme">Change Theme</h2> <div class="form-group"> <label class="form-label" data-lang="select_theme">Select Theme</label> <select class="form-control form-select" id="themeSelect"> <option value="light">Light</option> <option value="dark">Dark</option> <option value="blue">Blue</option> </select> </div> <div class="modal-footer"> <button class="btn" onclick="changeTheme()" data-lang="save"> <span class="material-icons-round">save</span> <span>Save</span> </button> </div> </div> </div> <!-- Font Settings Modal --> <div class="modal" id="fontSettingsModal"> <div class="modal-content"> <button class="modal-close" onclick="closeModal('fontSettingsModal')">×</button> <h2 class="modal-title">Font Size Settings</h2> <div class="form-group"> <label class="form-label">Select Font Size</label> <div style="display: flex; gap: 0.5rem; margin-top: 1rem;"> <button class="btn btn-outline" onclick="changeFontSize('small')">Small</button> <button class="btn" onclick="changeFontSize('medium')">Medium</button> <button class="btn btn-outline" onclick="changeFontSize('large')">Large</button> </div> </div> <div class="modal-footer"> <button class="btn" onclick="closeModal('fontSettingsModal')"> <span class="material-icons-round">check</span> <span>Done</span> </button> </div> </div> </div> <!-- Currency Converter Modal --> <div class="modal" id="currencyConverterModal"> <div class="modal-content"> <button class="modal-close" onclick="closeModal('currencyConverterModal')">×</button> <h2 class="modal-title" data-lang="currency_converter">Currency Converter</h2> <div class="form-group"> <label class="form-label" data-lang="amount">Amount</label> <input type="number" class="form-control" id="convertAmount" placeholder="Enter amount"> </div> <div class="form-group"> <label class="form-label" data-lang="from">From</label> <select class="form-control form-select" id="convertFrom"> <option value="PKR">Pakistani Rupee (PKR)</option> <option value="USD">US Dollar (USD)</option> <option value="EUR">Euro (EUR)</option> <option value="GBP">British Pound (GBP)</option> <option value="JPY">Japanese Yen (JPY)</option> </select> </div> <div class="form-group"> <label class="form-label" data-lang="to">To</label> <select class="form-control form-select" id="convertTo"> <option value="USD">US Dollar (USD)</option> <option value="PKR">Pakistani Rupee (PKR)</option> <option value="EUR">Euro (EUR)</option> <option value="GBP">British Pound (GBP)</option> <option value="JPY">Japanese Yen (JPY)</option> </select> </div> <button class="btn" onclick="convertCurrency()" data-lang="convert"> <span class="material-icons-round">currency_exchange</span> <span>Convert</span> </button> <div class="converter-result" id="converterResult" style="display: none;"> <!-- Result will be shown here --> </div> </div> </div> <!-- Scientific Calculator Modal --> <div class="modal" id="scientificCalculatorModal"> <div class="modal-content"> <button class="modal-close" onclick="closeModal('scientificCalculatorModal')">×</button> <h2 class="modal-title" data-lang="scientific_calculator">Scientific Calculator</h2> <input type="text" class="calculator-display" id="sciCalcDisplay" readonly> <div class="calculator-buttons"> <button class="calc-btn calc-btn-clear" onclick="clearSciCalc()">C</button> <button class="calc-btn" onclick="appendToSciCalc('(')">(</button> <button class="calc-btn" onclick="appendToSciCalc(')')">)</button> <button class="calc-btn calc-btn-operator" onclick="appendToSciCalc('Math.sin(')">sin</button> <button class="calc-btn" onclick="appendToSciCalc('7')">7</button> <button class="calc-btn" onclick="appendToSciCalc('8')">8</button> <button class="calc-btn" onclick="appendToSciCalc('9')">9</button> <button class="calc-btn calc-btn-operator" onclick="appendToSciCalc('/')">/</button> <button class="calc-btn" onclick="appendToSciCalc('4')">4</button> <button class="calc-btn" onclick="appendToSciCalc('5')">5</button> <button class="calc-btn" onclick="appendToSciCalc('6')">6</button> <button class="calc-btn calc-btn-operator" onclick="appendToSciCalc('*')">×</button> <button class="calc-btn" onclick="appendToSciCalc('1')">1</button> <button class="calc-btn" onclick="appendToSciCalc('2')">2</button> <button class="calc-btn" onclick="appendToSciCalc('3')">3</button> <button class="calc-btn calc-btn-operator" onclick="appendToSciCalc('-')">-</button> <button class="calc-btn" onclick="backspaceSciCalc()">⌫</button> <button class="calc-btn" onclick="appendToSciCalc('0')">0</button> <button class="calc-btn" onclick="appendToSciCalc('.')">.</button> <button class="calc-btn calc-btn-equals" onclick="sciCalculate()">=</button> <button class="calc-btn calc-btn-operator" onclick="appendToSciCalc('+')">+</button> <button class="calc-btn calc-btn-operator" onclick="appendToSciCalc('Math.cos(')">cos</button> <button class="calc-btn calc-btn-operator" onclick="appendToSciCalc('Math.tan(')">tan</button> <button class="calc-btn calc-btn-operator" onclick="appendToSciCalc('Math.log10(')">log</button> <button class="calc-btn calc-btn-operator" onclick="appendToSciCalc('Math.sqrt(')">√</button> </div> </div> </div> <!-- Invoice Modal --> <div class="modal" id="invoiceModal"> <div class="modal-content"> <button class="modal-close" onclick="closeModal('invoiceModal')">×</button> <h2 class="modal-title" data-lang="invoice_generated">Invoice Generated</h2> <p data-lang="invoice_ready">Your financial summary is ready to download.</p> <div class="modal-footer"> <a id="downloadLink" href="#" class="btn" download data-lang="download_invoice"> <span class="material-icons-round">download</span> <span>Download Invoice</span> </a> </div> </div> </div> <!-- Error Modal --> <div class="modal" id="errorModal"> <div class="modal-content"> <button class="modal-close" onclick="closeModal('errorModal')">×</button> <h2 class="modal-title" data-lang="error">Error</h2> <p id="errorMessage"></p> <div class="modal-footer"> <button class="btn" onclick="closeModal('errorModal')" data-lang="ok"> <span class="material-icons-round">check</span> <span>OK</span> </button> </div> </div> </div> <!-- Success Modal --> <div class="modal" id="successModal"> <div class="modal-content"> <button class="modal-close" onclick="closeModal('successModal')">×</button> <h2 class="modal-title" data-lang="success">Success</h2> <p id="successMessage"></p> <div class="modal-footer"> <button class="btn" onclick="closeModal('successModal')" data-lang="ok"> <span class="material-icons-round">check</span> <span>OK</span> </button> </div> </div> </div> <!-- Instructions Modal --> <div class="modal" id="instructionsModal"> <div class="modal-content"> <button class="modal-close" onclick="closeModal('instructionsModal')">×</button> <h2 class="modal-title" data-lang="instructions">Instructions</h2> <div style="text-align: left;"> <p><strong data-lang="welcome_to_app">Welcome to Expense Manager PRO!</strong></p> <ul style="margin-top: 1rem; padding-left: 1.5rem;"> <li data-lang="instruction_home"><strong>Home:</strong> View your balance, recent transactions, and quick actions</li> <li data-lang="instruction_income"><strong>Income:</strong> Add and manage your income sources</li> <li data-lang="instruction_expenses"><strong>Expenses:</strong> Track and categorize your spending</li> <li data-lang="instruction_stats"><strong>Stats:</strong> View charts and generate reports</li> <li data-lang="instruction_budget"><strong>Budget:</strong> Set spending limits for categories</li> <li data-lang="instruction_goals"><strong>Goals:</strong> Define and track savings targets</li> <li data-lang="instruction_settings"><strong>Settings:</strong> Customize the app to your preferences</li> </ul> </div> <div class="modal-footer"> <button class="btn" onclick="closeModal('instructionsModal')" data-lang="got_it"> <span class="material-icons-round">check</span> <span>Got it!</span> </button> </div> </div> </div> <script> // Application State const state = { income: JSON.parse(localStorage.getItem('income')) || [], expenses: JSON.parse(localStorage.getItem('expenses')) || [], budgets: JSON.parse(localStorage.getItem('budgets')) || {}, goals: JSON.parse(localStorage.getItem('goals')) || [], notifications: JSON.parse(localStorage.getItem('notifications')) || [], profile: JSON.parse(localStorage.getItem('profile')) || { username: '', age: '', phone: '', email: '', pic: '' }, currency: localStorage.getItem('currency') || 'PKR', theme: localStorage.getItem('theme') || 'light', currentView: localStorage.getItem('currentView') || 'home', invoiceCounter: parseInt(localStorage.getItem('invoiceCounter')) || 0, notificationsEnabled: localStorage.getItem('notificationsEnabled') || 'on', language: localStorage.getItem('language') || 'en', passcode: localStorage.getItem('passcode') || '1234', balanceVisible: JSON.parse(localStorage.getItem('balanceVisible')) || false, fontSize: localStorage.getItem('fontSize') || 'medium' }; // Working iPhone Notification Soundconst iPhoneSoundURL = 'https://assets.mixkit.co/active_storage/sfx/2867/2867-preview.mp3';// Audio Handling Functionfunction playNotificationSound() { try { const audio = new Audio(iPhoneSoundURL); audio.volume = 0.6; audio.play().catch(error => { console.log('Playback failed, trying user interaction...'); document.body.addEventListener('click', function tempListener() { audio.play(); document.body.removeEventListener('click', tempListener); }); }); } catch (error) { console.error('Error playing sound:', error); }}// Modified Notification Creationfunction createNotification(message) { const notification = { message: message, timestamp: new Date().toISOString(), read: false }; // Add to state state.notifications.unshift(notification); // Play sound and update UI if (state.notificationsEnabled) { playNotificationSound(); } updateUI(); // Save to localStorage localStorage.setItem('notifications', JSON.stringify(state.notifications));} // Translations const translations = { en: { welcome: "Welcome to Expense Manager PRO", welcome_desc: "Track your expenses and income easily with our powerful financial tool", track: "Manage Your Finances", track_desc: "Stay on top of your cash flow with detailed analytics", goals: "Achieve Your Goals", goals_desc: "Set and track savings targets with visual progress", secure: "Secure & Private", secure_desc: "Your data stays on your device with passcode protection", get_started: "Get Started", create_profile: "Create Profile", username: "Username", age: "Age", phone: "Phone Number", email: "Email", profile_pic: "Profile Picture", passcode: "Set Passcode", passcode_hint: "This will be used to secure your financial data", save: "Save", app_name: "Expense Manager", available_balance: "AVAILABLE BALANCE", add_cash: "Add Cash", add_income: "Add Income", add_expense: "Add Expense", budget: "Budget", recent_transactions: "Recent Transactions", savings_goal: "Savings Goal", quick_calculator: "Quick Calculator", currency_converter: "Currency Converter", amount: "Amount", from: "From", to: "To", convert: "Convert", more: "More with Expense Manager", set_goals: "Set Goals", stats: "Stats", export_data: "Export Data", calculator: "Calculator", source: "Source", recurring: "Recurring", description: "Description", category: "Category", generate_invoice: "Generate Invoice", target_amount: "Target Amount", deadline: "Deadline", reminder: "Reminder", my_account: "My Account", profile_settings: "Profile, Settings & More", edit: "Edit", change_currency: "Change Currency", change_theme: "Change Theme", change_passcode: "Change Passcode", notifications: "Notifications", language: "Language", clear_data: "Clear Data", instructions: "Instructions", invoice_counter: "Invoice Counter", invoice_counter_desc: "Total invoices generated", home: "Home", income: "Income", expenses: "Expenses", my: "My", close: "Close", clear_all: "Clear All", enter_passcode: "Enter Passcode", verify: "Verify", current_passcode: "Current Passcode", new_passcode: "New Passcode", confirm_new_passcode: "Confirm New Passcode", change: "Change", edit_profile: "Edit Profile", update: "Update", select_currency: "Select Currency", select_theme: "Select Theme", invoice_generated: "Invoice Generated", invoice_ready: "Your financial summary is ready to download.", download_invoice: "Download Invoice", error: "Error", success: "Success", ok: "OK", income_history: "Income History", expense_history: "Expense History", expense_stats: "Expense Statistics", reports: "Reports", budget_management: "Budget Management", your_goals: "Your Goals", secure_account: "Secure your account", manage_alerts: "Manage alerts", app_guide: "App guide", reset_app: "Reset the app", welcome_to_app: "Welcome to Expense Manager PRO!", instruction_home: "Home: View your balance, recent transactions, and quick actions", instruction_income: "Income: Add and manage your income sources", instruction_expenses: "Expenses: Track and categorize your spending", instruction_stats: "Stats: View charts and generate reports", instruction_budget: "Budget: Set spending limits for categories", instruction_goals: "Goals: Define and track savings targets", instruction_settings: "Settings: Customize the app to your preferences", got_it: "Got it!", scientific_calculator: "Scientific Calculator", no_income: "No income added yet", no_expenses: "No expenses added yet", no_transactions: "No recent transactions", no_goals: "No goals set yet", no_budgets: "No budgets set yet", no_notifications: "No notifications", savings_target: "Savings Target", target: "Target", due: "Due" }, ur: { welcome: "خرچوں کے مینیجر پرو میں خوش آمدید", welcome_desc: "ہمارے طاقتور مالیاتی ٹول کے ساتھ اپنے اخراجات اور آمدنی کو آسانی سے ٹریک کریں", track: "اپنے مالیات کا انتظام کریں", track_desc: "تفصیلی تجزیات کے ساتھ اپنے کیش فلو پر نظر رکھیں", goals: "اپنے اہداف حاصل کریں", goals_desc: "تصویری پیشرفت کے ساتھ بچت کے اہداف مقرر کریں اور انہیں ٹریک کریں", secure: "محفوظ اور نجی", secure_desc: "آپ کا ڈیٹا پاس کوڈ کی حفاظت کے ساتھ آپ کے ڈیوائس پر رہتا ہے", get_started: "شروع کریں", create_profile: "پروفائل بنائیں", username: "صارف نام", age: "عمر", phone: "فون نمبر", email: "ای میل", profile_pic: "پروفائل تصویر", passcode: "پاس کوڈ مقرر کریں", passcode_hint: "یہ آپ کے مالیاتی ڈیٹا کو محفوظ کرنے کے لیے استعمال ہوگا", save: "محفوظ کریں", app_name: "خرچوں کا مینیجر", available_balance: "دستیاب رقم", add_cash: "رقم شامل کریں", add_income: "آمدنی شامل کریں", add_expense: "خرچہ شامل کریں", budget: "بجٹ", recent_transactions: "حالیہ لین دین", savings_goal: "بچت کا ہدف", quick_calculator: "فوری کیلکولیٹر", currency_converter: "کرنسی کنورٹر", amount: "رقم", from: "سے", to: "کو", convert: "تبدیل کریں", more: "خرچوں کے مینیجر کے ساتھ مزید", set_goals: "اہداف مقرر کریں", stats: "اعداد و شمار", export_data: "ڈیٹا برآمد کریں", calculator: "کیلکولیٹر", source: "ذریعہ", recurring: "بار بار", description: "تفصیل", category: "زمرہ", generate_invoice: "انوائس بنائیں", target_amount: "ہدف رقم", deadline: "آخری تاریخ", reminder: "یاد دہانی", my_account: "میرا اکاؤنٹ", profile_settings: "پروفائل، ترتیبات اور مزید", edit: "ترمیم کریں", change_currency: "کرنسی تبدیل کریں", change_theme: "تھیم تبدیل کریں", change_passcode: "پاس کوڈ تبدیل کریں", notifications: "اطلاعات", language: "زبان", clear_data: "ڈیٹا صاف کریں", instructions: "ہدایات", invoice_counter: "انوائس کاؤنٹر", invoice_counter_desc: "کل انوائسز بنائے گئے", home: "ہوم", income: "آمدنی", expenses: "خرچے", my: "میرا", close: "بند کریں", clear_all: "سب صاف کریں", enter_passcode: "پاس کوڈ درج کریں", verify: "تصدیق کریں", current_passcode: "موجودہ پاس کوڈ", new_passcode: "نیا پاس کوڈ", confirm_new_passcode: "نیا پاس کوڈ تصدیق کریں", change: "تبدیل کریں", edit_profile: "پروفائل میں ترمیم کریں", update: "اپ ڈیٹ کریں", select_currency: "کرنسی منتخب کریں", select_theme: "تھیم منتخب کریں", invoice_generated: "انوائس تیار ہو گئی", invoice_ready: "آپ کا مالیاتی خلاصہ ڈاؤن لوڈ کے لیے تیار ہے۔", download_invoice: "انوائس ڈاؤن لوڈ کریں", error: "خرابی", success: "کامیابی", ok: "ٹھیک ہے", income_history: "آمدنی کی تاریخ", expense_history: "خرچوں کی تاریخ", expense_stats: "خرچوں کے اعداد و شمار", reports: "رپورٹس", budget_management: "بجٹ کا انتظام", your_goals: "آپ کے اہداف", secure_account: "اپنے اکاؤنٹ کو محفوظ بنائیں", manage_alerts: "الرٹس کا انتظام کریں", app_guide: "ایپ گائیڈ", reset_app: "ایپ کو دوبارہ ترتیب دیں", welcome_to_app: "خرچوں کے مینیجر پرو میں خوش آمدید!", instruction_home: "ہوم: اپنا بیلنس، حالیہ لین دین اور فوری اقدامات دیکھیں", instruction_income: "آمدنی: اپنے آمدنی کے ذرائع شامل کریں اور ان کا انتظام کریں", instruction_expenses: "خرچے: اپنے اخراجات کو ٹریک کریں اور انہیں زمرہ بندی کریں", instruction_stats: "اعداد و شمار: چارٹس دیکھیں اور رپورٹس بنائیں", instruction_budget: "بجٹ: زمرہ جات کے لیے خرچ کی حد مقرر کریں", instruction_goals: "اہداف: بچت کے اہداف مقرر کریں اور انہیں ٹریک کریں", instruction_settings: "ترتیبات: ایپ کو اپنی ترجیحات کے مطابق بنائیں", got_it: "سمجھ گیا!", scientific_calculator: "سائنسی کیلکولیٹر", no_income: "ابھی تک کوئی آمدنی شامل نہیں کی گئی", no_expenses: "ابھی تک کوئی خرچہ شامل نہیں کیا گیا", no_transactions: "حالیہ کوئی لین دین نہیں", no_goals: "ابھی تک کوئی ہدف مقرر نہیں کیا گیا", no_budgets: "ابھی تک کوئی بجٹ مقرر نہیں کیا گیا", no_notifications: "کوئی اطلاعات نہیں", savings_target: "بچت کا ہدف", target: "ہدف", due: "مقررہ" } }; // Currency Symbols and Exchange Rates const currencySymbols = { USD: '$', PKR: 'Rs', EUR: '€', GBP: '£', JPY: '¥' }; const exchangeRates = { USD: 1, PKR: 278, EUR: 0.85, GBP: 0.75, JPY: 110 }; // Format Currency function formatCurrency(amount) { const symbol = currencySymbols[state.currency] || '$'; const formattedAmount = parseFloat(amount).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 }); return `${symbol} ${formattedAmount}`; } // Format Date Time function formatDateTime(dateString) { const date = new Date(dateString); return date.toLocaleString(); } // Scientific Calculator Functions let sciCalcExpression = ''; function appendToSciCalc(value) { sciCalcExpression += value; document.getElementById('sciCalcDisplay').value = sciCalcExpression; } function clearSciCalc() { sciCalcExpression = ''; document.getElementById('sciCalcDisplay').value = ''; } function backspaceSciCalc() { sciCalcExpression = sciCalcExpression.slice(0, -1); document.getElementById('sciCalcDisplay').value = sciCalcExpression; } function sciCalculate() { try { const result = eval(sciCalcExpression); sciCalcExpression = result.toString(); document.getElementById('sciCalcDisplay').value = sciCalcExpression; } catch { document.getElementById('sciCalcDisplay').value = 'Error'; sciCalcExpression = ''; } } // Calculate Financial Stats function calculateStats() { const totalIncome = state.income.reduce((sum, item) => sum + item.amount, 0); const totalExpenses = state.expenses.reduce((sum, item) => sum + item.amount, 0); const balance = totalIncome - totalExpenses; const savings = balance > 0 ? balance : 0; return { totalIncome, totalExpenses, balance, savings }; } // Expense Chart let expenseChart; function updateChart() { const ctx = document.getElementById('expenseChart').getContext('2d'); // Group expenses by category const categoryTotals = {}; state.expenses.forEach(exp => { categoryTotals[exp.category] = (categoryTotals[exp.category] || 0) + exp.amount; }); // Sort categories by amount (descending) const sortedCategories = Object.keys(categoryTotals).sort((a, b) => categoryTotals[b] - categoryTotals[a]); // Prepare data for chart const labels = sortedCategories; const data = sortedCategories.map(cat => categoryTotals[cat]); // Color palette for chart const backgroundColors = [ '#00A859', '#4CAF50', '#8BC34A', '#CDDC39', '#FFC107', '#FF9800', '#FF5722', '#F44336', '#E91E63', '#9C27B0', '#673AB7', '#3F51B5', '#2196F3', '#03A9F4', '#00BCD4', '#009688' ]; // Destroy previous chart if exists if (expenseChart) expenseChart.destroy(); // Create new chart expenseChart = new Chart(ctx, { type: 'pie', data: { labels: labels, datasets: [{ data: data, backgroundColor: backgroundColors.slice(0, labels.length), borderWidth: 1, borderColor: '#fff' }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { position: 'bottom', labels: { padding: 20, usePointStyle: true, pointStyle: 'circle' } }, tooltip: { callbacks: { label: function(context) { const label = context.label || ''; const value = context.raw || 0; const total = context.dataset.data.reduce((a, b) => a + b, 0); const percentage = Math.round((value / total) * 100); return `${label}: ${formatCurrency(value)} (${percentage}%)`; } } } } } }); } // Update UI function updateUI() { const stats = calculateStats(); // Update balance and summary cards document.getElementById('currentBalance').textContent = state.balanceVisible ? formatCurrency(stats.balance) : '****'; document.getElementById('eyeIcon').textContent = state.balanceVisible ? 'visibility' : 'visibility_off'; document.getElementById('totalIncome').textContent = formatCurrency(stats.totalIncome); document.getElementById('totalExpenses').textContent = formatCurrency(stats.totalExpenses); // Update income list const incomeList = document.getElementById('incomeList'); if (state.income.length > 0) { incomeList.innerHTML = state.income.map((item, i) => ` <div class="list-item"> <div class="list-item-content"> <div class="list-item-title">${item.source}</div> <div class="list-item-subtitle">${formatDateTime(item.date)} • ${item.recurring !== 'none' ? 'Recurring' : 'One-Time'}</div> </div> <div class="list-item-amount income-amount">${formatCurrency(item.amount)}</div> <button class="delete-btn" onclick="deleteIncome(${i})"> <span class="material-icons-round">delete</span> </button> </div> `).join(''); } else { incomeList.innerHTML = ` <div class="empty-state"> <div class="empty-state-icon"> <span class="material-icons-round">payments</span> </div> <div class="empty-state-text" data-lang="no_income">No income added yet</div> </div> `; } // Update expense list const expenseList = document.getElementById('expenseList'); if (state.expenses.length > 0) { expenseList.innerHTML = state.expenses.map((item, i) => ` <div class="list-item"> <div class="list-item-content"> <div class="list-item-title">${item.description}</div> <div class="list-item-subtitle">${item.category} • ${formatDateTime(item.date)} • ${item.recurring !== 'none' ? 'Recurring' : 'One-Time'}</div> </div> <div class="list-item-amount expense-amount">${formatCurrency(item.amount)}</div> <button class="delete-btn" onclick="deleteExpense(${i})"> <span class="material-icons-round">delete</span> </button> </div> `).join(''); } else { expenseList.innerHTML = ` <div class="empty-state"> <div class="empty-state-icon"> <span class="material-icons-round">receipt</span> </div> <div class="empty-state-text" data-lang="no_expenses">No expenses added yet</div> </div> `; } // Update recent transactions const transactions = [...state.income, ...state.expenses] .sort((a, b) => new Date(b.date) - new Date(a.date)) .slice(0, 5); const recentTransactions = document.getElementById('recentTransactions'); if (transactions.length > 0) { recentTransactions.innerHTML = transactions.map(item => ` <div class="list-item"> <div class="list-item-content"> <div class="list-item-title">${item.source || item.description}</div> <div class="list-item-subtitle">${item.source ? 'Income' : item.category} • ${formatDateTime(item.date)}</div> </div> <div class="list-item-amount ${item.source ? 'income-amount' : 'expense-amount'}"> ${formatCurrency(item.amount)} </div> </div> `).join(''); } else { recentTransactions.innerHTML = ` <div class="empty-state"> <div class="empty-state-icon"> <span class="material-icons-round">history</span> </div> <div class="empty-state-text" data-lang="no_transactions">No recent transactions</div> </div> `; } // Update savings goal const savingsGoal = document.getElementById('savingsGoal'); const topGoal = state.goals[0]; if (topGoal) { const savings = stats.savings; const progress = Math.min((savings / topGoal.amount) * 100, 100); const daysLeft = Math.ceil((new Date(topGoal.date) - new Date()) / (1000 * 60 * 60 * 24)); savingsGoal.innerHTML = ` <div class="list-item"> <div class="list-item-content"> <div class="list-item-title" data-lang="savings_target">Savings Target</div> <div class="list-item-subtitle"> <span data-lang="target">Target:</span> ${formatCurrency(topGoal.amount)} • <span data-lang="due">Due:</span> ${new Date(topGoal.date).toLocaleDateString()} • ${daysLeft > 0 ? `${daysLeft} days left` : 'Expired'} </div> </div> <div class="progress-container"> <div class="progress-info"> <span>${formatCurrency(savings)} saved</span> <span>${progress.toFixed(1)}%</span> </div> <div class="progress-bar ${progress >= 100 ? 'progress-danger' : ''}"> <div class="progress-fill" style="width: ${progress}%"></div> </div> </div> </div> `; } else { savingsGoal.innerHTML = ` <div class="empty-state"> <div class="empty-state-icon"> <span class="material-icons-round">flag</span> </div> <div class="empty-state-text" data-lang="no_goals">No goals set yet</div> </div> `; } // Update budget list const budgetList = document.getElementById('budgetList'); const budgetCategories = Object.keys(state.budgets); if (budgetCategories.length > 0) { budgetList.innerHTML = budgetCategories.map(category => { const spent = state.expenses .filter(exp => exp.category === category) .reduce((sum, exp) => sum + exp.amount, 0); const budget = state.budgets[category] || 0; const progress = budget > 0 ? Math.min((spent / budget) * 100, 100) : 0; const remaining = budget - spent; // Determine color based on budget status let progressColorClass = ''; if (progress >= 100) { progressColorClass = 'progress-danger'; } else if (progress >= 80) { progressColorClass = 'progress-warning'; } else if (progress <= 50) { progressColorClass = 'progress-success'; } return ` <div class="budget-card"> <div class="budget-card-header"> <div class="budget-card-title">${category}</div> <div class="budget-card-amount">${formatCurrency(budget)}</div> </div> <div class="progress-container"> <div class="progress-info"> <span>Spent: ${formatCurrency(spent)}</span> <span>Remaining: ${formatCurrency(remaining > 0 ? remaining : 0)}</span> </div> <div class="progress-bar ${progressColorClass}"> <div class="progress-fill" style="width: ${progress}%"></div> </div> </div> <div class="budget-form" style="margin-top: 1rem;"> <input type="number" class="form-control budget-input" placeholder="New budget amount" value="${budget}"> <button class="btn btn-sm" onclick="saveBudget('${category}', this.previousElementSibling.value)" data-lang="update"> <span class="material-icons-round">save</span> </button> <button class="btn btn-sm btn-danger" onclick="deleteBudget('${category}')"> <span class="material-icons-round">delete</span> </button> </div> </div> `; }).join(''); } else { budgetList.innerHTML = ` <div class="empty-state"> <div class="empty-state-icon"> <span class="material-icons-round">savings</span> </div> <div class="empty-state-text" data-lang="no_budgets">No budgets set yet</div> </div> `; } // Update goal list const goalList = document.getElementById('goalList'); if (state.goals.length > 0) { goalList.innerHTML = state.goals.map((goal, i) => { const daysLeft = Math.ceil((new Date(goal.date) - new Date()) / (1000 * 60 * 60 * 24)); return ` <div class="list-item"> <div class="list-item-content"> <div class="list-item-title">${formatCurrency(goal.amount)}</div> <div class="list-item-subtitle"> <span data-lang="due">Due:</span> ${new Date(goal.date).toLocaleDateString()} • ${daysLeft > 0 ? `${daysLeft} days left` : 'Expired'} • ${goal.reminder !== 'none' ? 'Reminder set' : 'No reminder'} </div> </div> <button class="delete-btn" onclick="deleteGoal(${i})"> <span class="material-icons-round">delete</span> </button> </div> `; }).join(''); } else { goalList.innerHTML = ` <div class="empty-state"> <div class="empty-state-icon"> <span class="material-icons-round">flag</span> </div> <div class="empty-state-text" data-lang="no_goals">No goals set yet</div> </div> `; } // Update notifications list const notificationsList = document.getElementById('notificationsList'); if (state.notifications.length > 0) { notificationsList.innerHTML = state.notifications.map((notif, i) => ` <div class="list-item"> <div class="list-item-content"> <div class="list-item-title">${notif.message}</div> <div class="list-item-subtitle">${formatDateTime(notif.date)}</div> </div> <button class="delete-btn" onclick="deleteNotification(${i})"> <span class="material-icons-round">delete</span> </button> </div> `).join(''); // Show notification badge document.getElementById('notificationBadge').style.display = state.notifications.length > 0 ? 'block' : 'none'; document.getElementById('notificationBadge').textContent = state.notifications.length > 9 ? '9+' : state.notifications.length; } else { notificationsList.innerHTML = ` <div class="empty-state"> <div class="empty-state-icon"> <span class="material-icons-round">notifications</span> </div> <div class="empty-state-text" data-lang="no_notifications">No notifications</div> </div> `; document.getElementById('notificationBadge').style.display = 'none'; } // Update profile info document.getElementById('usernameDisplay').textContent = state.profile.username || 'Guest'; document.getElementById('ageDisplay').textContent = state.profile.age ? `${state.profile.age} years` : ''; document.getElementById('phoneDisplay').textContent = state.profile.phone || 'Not provided'; document.getElementById('emailDisplay').textContent = state.profile.email || 'Not provided'; const profilePicPreview = document.getElementById('profilePicPreview'); if (state.profile.pic) { profilePicPreview.innerHTML = ''; const img = document.createElement('img'); img.src = state.profile.pic; profilePicPreview.appendChild(img); } else { profilePicPreview.innerHTML = '<span class="material-icons-round">person</span>'; } // Update settings display document.getElementById('currentCurrencyDisplay').textContent = state.currency; document.getElementById('currentThemeDisplay').textContent = state.theme === 'light' ? 'Light' : state.theme === 'dark' ? 'Dark' : 'Blue'; document.getElementById('notificationsToggle').value = state.notificationsEnabled; document.getElementById('invoiceCounterDisplay').textContent = `${state.invoiceCounter} invoices generated`; document.getElementById('currentFontSizeDisplay').textContent = state.fontSize === 'small' ? 'Small' : state.fontSize === 'large' ? 'Large' : 'Medium'; // Update language updateLanguage(); // Update chart if on stats view if (state.currentView === 'stats' && state.expenses.length > 0) { updateChart(); } } // Update Language function updateLanguage() { document.querySelectorAll('[data-lang]').forEach(element => { const key = element.getAttribute('data-lang'); if (translations[state.language] && translations[state.language][key]) { element.textContent = translations[state.language][key]; } }); } // Switch Language function switchLanguage(lang) { showLoading(state.language === 'en' ? 'Changing language...' : 'زبان تبدیل کی جا رہی ہے...'); setTimeout(() => { state.language = lang; localStorage.setItem('language', state.language); // Update language toggle buttons document.querySelectorAll('.language-btn').forEach((btn, i) => { btn.classList.toggle('active', btn.textContent === (lang === 'en' ? 'ENG' : 'اردو')); }); updateUI(); hideLoading(); }, 1000); } // Change Font Size function changeFontSize(size) { state.fontSize = size; localStorage.setItem('fontSize', state.fontSize); // Remove all font size classes document.body.classList.remove('font-small', 'font-medium', 'font-large'); // Apply selected font size if (size === 'small') { document.body.classList.add('font-small'); } else if (size === 'large') { document.body.classList.add('font-meduim'); } else { document.body.classList.add('font-medium'); } updateUI(); } // Show Font Settings function showFontSettings() { document.getElementById('fontSettingsModal').classList.add('active'); } // Show Loading function showLoading(message) { document.getElementById('loadingText').textContent = message; document.getElementById('loadingOverlay').style.display = 'flex'; } // Hide Loading function hideLoading() { document.getElementById('loadingOverlay').style.display = 'none'; } // Generate Invoice function generateInvoice() { const { jsPDF } = window.jspdf; const doc = new jsPDF(); const stats = calculateStats(); // Set primary color based on theme let primaryColor; if (state.theme === 'dark') { primaryColor = [0, 168, 89]; // Dark theme primary color } else if (state.theme === 'blue') { primaryColor = [33, 150, 243]; // Blue theme primary color } else { primaryColor = [0, 168, 89]; // Default green } // Header doc.setFillColor(primaryColor[0], primaryColor[1], primaryColor[2]); doc.rect(0, 0, 210, 30, 'F'); doc.setFontSize(20); doc.setTextColor(255); doc.text('Expense Manager PRO', 20, 20); // Invoice info doc.setFontSize(10); doc.text(`Invoice #${state.invoiceCounter + 1}`, 170, 15); doc.text(`Date: ${new Date().toLocaleDateString()}`, 170, 20); doc.text(`User: ${state.profile.username || 'Guest'}`, 170, 25); // Summary table doc.setFontSize(12); doc.setTextColor(0); doc.autoTable({ startY: 40, head: [['Summary', 'Amount']], body: [ ['Total Income', formatCurrency(stats.totalIncome)], ['Total Expenses', formatCurrency(stats.totalExpenses)], ['Balance', formatCurrency(stats.balance)], ['Savings', formatCurrency(stats.savings)] ], theme: 'grid', headStyles: { fillColor: primaryColor, textColor: 255, fontStyle: 'bold' }, styles: { fontSize: 10, cellPadding: 3 } }); // Income details doc.setFontSize(14); doc.text('Income Details', 14, doc.lastAutoTable.finalY + 15); doc.autoTable({ startY: doc.lastAutoTable.finalY + 20, head: [['Source', 'Amount', 'Date', 'Recurring']], body: state.income.map(inc => [ inc.source, formatCurrency(inc.amount), formatDateTime(inc.date), inc.recurring !== 'none' ? inc.recurring : 'No' ]), theme: 'grid', headStyles: { fillColor: primaryColor, textColor: 255, fontStyle: 'bold' }, styles: { fontSize: 9, cellPadding: 2, overflow: 'linebreak' } }); // Expense details doc.setFontSize(14); doc.text('Expense Details', 14, doc.lastAutoTable.finalY + 15); doc.autoTable({ startY: doc.lastAutoTable.finalY + 20, head: [['Description', 'Category', 'Amount', 'Date', 'Recurring']], body: state.expenses.map(exp => [ exp.description, exp.category, formatCurrency(exp.amount), formatDateTime(exp.date), exp.recurring !== 'none' ? exp.recurring : 'No' ]), theme: 'grid', headStyles: { fillColor: primaryColor, textColor: 255, fontStyle: 'bold' }, styles: { fontSize: 9, cellPadding: 2, overflow: 'linebreak' } }); // Footer doc.setFontSize(10); doc.setTextColor(100); doc.text('Generated by Expense Manager PRO', 105, doc.lastAutoTable.finalY + 15, { align: 'center' }); // Save and show download link const pdfBlob = doc.output('blob'); const pdfUrl = URL.createObjectURL(pdfBlob); const link = document.getElementById('downloadLink'); link.href = pdfUrl; link.setAttribute('download', `Expense_Manager_Invoice_${state.invoiceCounter + 1}.pdf`); // Increment invoice counter when downloaded link.onclick = () => { state.invoiceCounter++; localStorage.setItem('invoiceCounter', state.invoiceCounter); updateUI(); }; document.getElementById('invoiceModal').classList.add('active'); } // Show Invoice Counter function showInvoiceCounter() { document.getElementById('invoiceCounterValue').textContent = state.invoiceCounter; document.getElementById('invoiceCounterModal').classList.add('active'); } // Export Data function exportData() { // Combine income and expenses const data = [ ...state.income.map(item => ({ Type: 'Income', Source: item.source, Amount: item.amount, Date: formatDateTime(item.date), Recurring: item.recurring !== 'none' ? item.recurring : 'No' })), ...state.expenses.map(item => ({ Type: 'Expense', Description: item.description, Category: item.category, Amount: item.amount, Date: formatDateTime(item.date), Recurring: item.recurring !== 'none' ? item.recurring : 'No' })) ]; // Convert to CSV const headers = Object.keys(data[0] || {}); const csv = [ headers.join(','), ...data.map(row => headers.map(header => `"${row[header]}"`).join(',')) ].join('\n'); // Create download link const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' }); const url = URL.createObjectURL(blob); const link = document.createElement('a'); link.href = url; link.setAttribute('download', `Expense_Manager_Data_${new Date().toISOString().slice(0, 10)}.csv`); link.click(); // Clean up URL.revokeObjectURL(url); // Add notification if (state.notificationsEnabled === 'on') { state.notifications.unshift({ message: 'Data exported successfully', date: new Date().toISOString(), id: Date.now() }); localStorage.setItem('notifications', JSON.stringify(state.notifications)); updateUI(); } } // Show Passcode Modal function showPasscodeModal() { document.getElementById('passcodeInput').value = ''; document.getElementById('passcodeModal').classList.add('active'); } // Verify Passcode function verifyPasscode() { const passcode = document.getElementById('passcodeInput').value; if (passcode === state.passcode) { state.balanceVisible = !state.balanceVisible; localStorage.setItem('balanceVisible', JSON.stringify(state.balanceVisible)); closeModal('passcodeModal'); updateUI(); } else { showError(state.language === 'en' ? 'Incorrect passcode' : 'غلط پاس کوڈ'); } } // Show Change Passcode Modal function showChangePasscodeModal() { document.getElementById('currentPasscode').value = ''; document.getElementById('newPasscode').value = ''; document.getElementById('confirmNewPasscode').value = ''; document.getElementById('changePasscodeModal').classList.add('active'); } // Change Passcode function changePasscode() { const currentPasscode = document.getElementById('currentPasscode').value; const newPasscode = document.getElementById('newPasscode').value; const confirmNewPasscode = document.getElementById('confirmNewPasscode').value; if (currentPasscode !== state.passcode) { showError(state.language === 'en' ? 'Current passcode is incorrect' : 'موجودہ پاس کوڈ غلط ہے'); return; } if (newPasscode !== confirmNewPasscode) { showError(state.language === 'en' ? 'New passcodes do not match' : 'نیا پاس کوڈ مماثل نہیں ہے'); return; } if (newPasscode.length < 4) { showError(state.language === 'en' ? 'Passcode must be at least 4 digits' : 'پاس کوڈ کم از کم 4 ہندسوں کا ہونا چاہیے'); return; } state.passcode = newPasscode; localStorage.setItem('passcode', state.passcode); closeModal('changePasscodeModal'); showSuccess(state.language === 'en' ? 'Passcode changed successfully' : 'پاس کوڈ کامیابی سے تبدیل ہو گیا'); } // Switch View function switchView(view) { state.currentView = view; localStorage.setItem('currentView', view); // Hide all views document.querySelectorAll('.view').forEach(v => v.classList.remove('active')); // Show selected view document.getElementById(`${view}-view`).classList.add('active'); // Update active nav item document.querySelectorAll('.nav-item, .sidebar-item').forEach(item => { item.classList.toggle('active', item.dataset.view === view); }); // Update UI updateUI(); } // Add Income function addIncome(e) { e.preventDefault(); const amount = parseFloat(document.getElementById('incomeAmount').value); if (isNaN(amount) || amount <= 0) { showError(state.language === 'en' ? 'Please enter a valid amount' : 'براہ کرم درست رقم درج کریں'); return; } const date = document.getElementById('incomeDate').value; const time = document.getElementById('incomeTime').value; const dateTime = new Date(`${date}T${time}`).toISOString(); const income = { amount: amount, source: document.getElementById('incomeSource').value, date: dateTime, recurring: document.getElementById('incomeRecurring').value, id: Date.now() }; state.income.unshift(income); localStorage.setItem('income', JSON.stringify(state.income)); // Add notification if (state.notificationsEnabled === 'on') { state.notifications.unshift({ message: `Added income: ${income.source} - ${formatCurrency(income.amount)}`, date: new Date().toISOString(), id: Date.now() }); localStorage.setItem('notifications', JSON.stringify(state.notifications)); } // Reset form and update UI e.target.reset(); updateUI(); showSuccess(state.language === 'en' ? 'Income added successfully' : 'آمدنی کامیابی سے شامل ہو گئی'); } // Add Expense function addExpense(e) { e.preventDefault(); const amount = parseFloat(document.getElementById('expenseAmount').value); if (isNaN(amount) || amount <= 0) { showError(state.language === 'en' ? 'Please enter a valid amount' : 'براہ کرم درست رقم درج کریں'); return; } const date = document.getElementById('expenseDate').value; const time = document.getElementById('expenseTime').value; const dateTime = new Date(`${date}T${time}`).toISOString(); const expense = { description: document.getElementById('expenseDescription').value, amount: amount, category: document.getElementById('expenseCategory').value, date: dateTime, recurring: document.getElementById('expenseRecurring').value, id: Date.now() }; state.expenses.unshift(expense); localStorage.setItem('expenses', JSON.stringify(state.expenses)); // Initialize budget for category if not exists if (!state.budgets[expense.category]) { state.budgets[expense.category] = 0; localStorage.setItem('budgets', JSON.stringify(state.budgets)); } // Add notification if (state.notificationsEnabled === 'on') { state.notifications.unshift({ message: `Added expense: ${expense.category} - ${formatCurrency(expense.amount)}`, date: new Date().toISOString(), id: Date.now() }); localStorage.setItem('notifications', JSON.stringify(state.notifications)); } // Reset form and update UI e.target.reset(); updateUI(); showSuccess(state.language === 'en' ? 'Expense added successfully' : 'خرچہ کامیابی سے شامل ہو گیا'); } // Add Goal function addGoal(e) { e.preventDefault(); const amount = parseFloat(document.getElementById('goalAmount').value); if (isNaN(amount) || amount <= 0) { showError(state.language === 'en' ? 'Please enter a valid amount' : 'براہ کرم درست رقم درج کریں'); return; } const goalDate = new Date(document.getElementById('goalDate').value); if (isNaN(goalDate.getTime())) { showError(state.language === 'en' ? 'Please select a valid date' : 'براہ کرم درست تاریخ منتخب کریں'); return; } const goal = { amount: amount, date: goalDate.toISOString(), reminder: document.getElementById('goalReminder').value, id: Date.now() }; state.goals.unshift(goal); localStorage.setItem('goals', JSON.stringify(state.goals)); // Add notification if (state.notificationsEnabled === 'on') { state.notifications.unshift({ message: `New goal set: ${formatCurrency(goal.amount)} by ${goalDate.toLocaleDateString()}`, date: new Date().toISOString(), id: Date.now() }); localStorage.setItem('notifications', JSON.stringify(state.notifications)); } // Reset form and update UI e.target.reset(); updateUI(); showSuccess(state.language === 'en' ? 'Goal set successfully' : 'ہدف کامیابی سے مقرر ہو گیا'); } // Delete Income function deleteIncome(index) { if (confirm(state.language === 'en' ? 'Are you sure you want to delete this income?' : 'کیا آپ واقعی اس آمدنی کو حذف کرنا چاہتے ہیں؟')) { state.income.splice(index, 1); localStorage.setItem('income', JSON.stringify(state.income)); updateUI(); showSuccess(state.language === 'en' ? 'Income deleted' : 'آمدنی حذف ہو گئی'); } } // Delete Expense function deleteExpense(index) { if (confirm(state.language === 'en' ? 'Are you sure you want to delete this expense?' : 'کیا آپ واقعی اس خرچ کو حذف کرنا چاہتے ہیں؟')) { state.expenses.splice(index, 1); localStorage.setItem('expenses', JSON.stringify(state.expenses)); updateUI(); showSuccess(state.language === 'en' ? 'Expense deleted' : 'خرچہ حذف ہو گیا'); } } // Delete Goal function deleteGoal(index) { if (confirm(state.language === 'en' ? 'Are you sure you want to delete this goal?' : 'کیا آپ واقعی اس ہدف کو حذف کرنا چاہتے ہیں؟')) { state.goals.splice(index, 1); localStorage.setItem('goals', JSON.stringify(state.goals)); updateUI(); showSuccess(state.language === 'en' ? 'Goal deleted' : 'ہدف حذف ہو گیا'); } } // Save Budget function saveBudget(category, amount) { const budgetAmount = parseFloat(amount); if (isNaN(budgetAmount) || budgetAmount < 0) { showError(state.language === 'en' ? 'Please enter a valid budget amount' : 'براہ کرم بجٹ کی درست رقم درج کریں'); return; } state.budgets[category] = budgetAmount; localStorage.setItem('budgets', JSON.stringify(state.budgets)); updateUI(); showSuccess(state.language === 'en' ? 'Budget updated' : 'بجٹ اپ ڈیٹ ہو گیا'); } // Delete Budget function deleteBudget(category) { if (confirm(state.language === 'en' ? 'Are you sure you want to delete this budget?' : 'کیا آپ واقعی اس بجٹ کو حذف کرنا چاہتے ہیں؟')) { delete state.budgets[category]; localStorage.setItem('budgets', JSON.stringify(state.budgets)); updateUI(); showSuccess(state.language === 'en' ? 'Budget deleted' : 'بجٹ حذف ہو گیا'); } } // Delete Notification function deleteNotification(index) { state.notifications.splice(index, 1); localStorage.setItem('notifications', JSON.stringify(state.notifications)); updateUI(); } // Clear Notifications function clearNotifications() { if (confirm(state.language === 'en' ? 'Clear all notifications?' : 'تمام اطلاعات صاف کریں؟')) { state.notifications = []; localStorage.setItem('notifications', JSON.stringify(state.notifications)); updateUI(); } } // Toggle Notifications Panel function toggleNotifications() { document.getElementById('notificationsPanel').classList.toggle('active'); } // Toggle Notifications Setting function toggleNotificationsSetting(value) { state.notificationsEnabled = value; localStorage.setItem('notificationsEnabled', state.notificationsEnabled); updateUI(); } // Show Profile Setup function showProfileSetup() { document.getElementById('welcomeScreen').classList.add('hidden'); document.getElementById('profileModal').classList.add('active'); } // Save Profile function saveProfile() { const username = document.getElementById('username').value.trim(); const age = document.getElementById('age').value.trim(); const phone = document.getElementById('phoneNumber').value.trim(); const email = document.getElementById('email').value.trim(); const passcode = document.getElementById('initialPasscode').value.trim(); const file = document.getElementById('profilePic').files[0]; if (!username || !age || !passcode) { showError(state.language === 'en' ? 'Please fill all required fields' : 'براہ کرم تمام ضروری فیلڈز بھریں'); return; } if (passcode.length !== 4 || !/^\d+$/.test(passcode)) { showError(state.language === 'en' ? 'Passcode must be 4 digits' : 'پاس کوڈ 4 ہندسوں پر مشتمل ہونا چاہیے'); return; } state.profile.username = username; state.profile.age = age; state.profile.phone = phone; state.profile.email = email; state.passcode = passcode; if (file) { const reader = new FileReader(); reader.onload = () => { state.profile.pic = reader.result; localStorage.setItem('profile', JSON.stringify(state.profile)); localStorage.setItem('passcode', state.passcode); closeModal('profileModal'); startApp(); }; reader.readAsDataURL(file); } else { localStorage.setItem('profile', JSON.stringify(state.profile)); localStorage.setItem('passcode', state.passcode); closeModal('profileModal'); startApp(); } } // Show Edit Profile function showEditProfile() { document.getElementById('editUsername').value = state.profile.username; document.getElementById('editAge').value = state.profile.age; document.getElementById('editPhoneNumber').value = state.profile.phone; document.getElementById('editEmail').value = state.profile.email; document.getElementById('editProfileModal').classList.add('active'); } // Update Profile function updateProfile() { const username = document.getElementById('editUsername').value.trim(); const age = document.getElementById('editAge').value.trim(); const phone = document.getElementById('editPhoneNumber').value.trim(); const email = document.getElementById('editEmail').value.trim(); const file = document.getElementById('editProfilePic').files[0]; if (!username || !age) { showError(state.language === 'en' ? 'Please fill all required fields' : 'براہ کرم تمام ضروری فیلڈز بھریں'); return; } state.profile.username = username; state.profile.age = age; state.profile.phone = phone; state.profile.email = email; if (file) { const reader = new FileReader(); reader.onload = () => { state.profile.pic = reader.result; localStorage.setItem('profile', JSON.stringify(state.profile)); closeModal('editProfileModal'); updateUI(); }; reader.readAsDataURL(file); } else { localStorage.setItem('profile', JSON.stringify(state.profile)); closeModal('editProfileModal'); updateUI(); } showSuccess(state.language === 'en' ? 'Profile updated' : 'پروفائل اپ ڈیٹ ہو گیا'); } // Show Change Currency function showChangeCurrency() { document.getElementById('currencySelect').value = state.currency; document.getElementById('changeCurrencyModal').classList.add('active'); } // Change Currency function changeCurrency() { state.currency = document.getElementById('currencySelect').value; localStorage.setItem('currency', state.currency); closeModal('changeCurrencyModal'); updateUI(); showSuccess(state.language === 'en' ? 'Currency changed' : 'کرنسی تبدیل ہو گئی'); } // Show Change Theme function showChangeTheme() { document.getElementById('themeSelect').value = state.theme; document.getElementById('changeThemeModal').classList.add('active'); } // Change Theme function changeTheme() { state.theme = document.getElementById('themeSelect').value; localStorage.setItem('theme', state.theme); // Remove all theme classes document.body.classList.remove('dark-theme', 'blue-theme'); // Apply selected theme if (state.theme === 'dark') { document.body.classList.add('dark-theme'); } else if (state.theme === 'blue') { document.body.classList.add('blue-theme'); } closeModal('changeThemeModal'); updateUI(); showSuccess(state.language === 'en' ? 'Theme changed' : 'تھیم تبدیل ہو گیا'); } // Show Currency Converter function showCurrencyConverter() { document.getElementById('convertAmount').value = ''; document.getElementById('convertFrom').value = state.currency; document.getElementById('convertTo').value = state.currency === 'USD' ? 'PKR' : 'USD'; document.getElementById('converterResult').style.display = 'none'; document.getElementById('currencyConverterModal').classList.add('active'); } // Convert Currency function convertCurrency() { const amount = parseFloat(document.getElementById('convertAmount').value); if (isNaN(amount)) { showError(state.language === 'en' ? 'Please enter a valid amount' : 'براہ کرم درست رقم درج کریں'); return; } const fromCurrency = document.getElementById('convertFrom').value; const toCurrency = document.getElementById('convertTo').value; // Convert to USD first, then to target currency const usdAmount = amount / exchangeRates[fromCurrency]; const convertedAmount = usdAmount * exchangeRates[toCurrency]; const resultElement = document.getElementById('converterResult'); resultElement.innerHTML = ` <div>${formatCurrency(amount)} ${fromCurrency} =</div> <div style="font-size: 1.5rem; margin: 0.5rem 0;">${formatCurrency(convertedAmount)} ${toCurrency}</div> `; resultElement.style.display = 'block'; } // Close Modal function closeModal(id) { document.getElementById(id).classList.remove('active'); } // Show Instructions function showInstructions() { document.getElementById('instructionsModal').classList.add('active'); } // Clear Data function clearData() { if (confirm(state.language === 'en' ? 'Are you sure you want to clear all data? This cannot be undone.' : 'کیا آپ واقعی تمام ڈیٹا صاف کرنا چاہتے ہیں؟ یہ عمل واپس نہیں ہو سکتا۔')) { localStorage.clear(); Object.assign(state, { income: [], expenses: [], budgets: {}, goals: [], notifications: [], profile: { username: '', age: '', phone: '', email: '', pic: '' }, currency: 'PKR', theme: 'light', currentView: 'home', invoiceCounter: 0, notificationsEnabled: 'on', language: 'en', passcode: '1234', balanceVisible: false, fontSize: 'medium' }); // Reset theme and font size document.body.classList.remove('dark-theme', 'blue-theme', 'font-small', 'font-large'); document.body.classList.add('font-medium'); updateUI(); document.getElementById('appContainer').style.display = 'none'; document.getElementById('welcomeScreen').classList.remove('hidden'); } } // Scientific Calculator Functions function appendToSciCalc(value) { sciCalcExpression += value; document.getElementById('sciCalcDisplay').value = sciCalcExpression; } function clearSciCalc() { sciCalcExpression = ''; document.getElementById('sciCalcDisplay').value = ''; } function sciCalculate() { try { const result = eval(sciCalcExpression); sciCalcExpression = result.toString(); document.getElementById('sciCalcDisplay').value = sciCalcExpression; } catch { document.getElementById('sciCalcDisplay').value = 'Error'; sciCalcExpression = ''; } } // Show Scientific Calculator function showScientificCalculator() { clearSciCalc(); document.getElementById('scientificCalculatorModal').classList.add('active'); // Focus on display for keyboard input document.getElementById('sciCalcDisplay').focus(); } // Handle keyboard input for calculator function handleCalculatorKeyPress(e) { const key = e.key; const display = document.getElementById('sciCalcDisplay'); if (document.getElementById('scientificCalculatorModal').classList.contains('active')) { if (key >= '0' && key <= '9') { appendToSciCalc(key); } else if (key === '.') { appendToSciCalc('.'); } else if (key === '+' || key === '-' || key === '*' || key === '/') { appendToSciCalc(key); } else if (key === '(' || key === ')') { appendToSciCalc(key); } else if (key === 'Enter') { sciCalculate(); } else if (key === 'Backspace') { sciCalcExpression = sciCalcExpression.slice(0, -1); display.value = sciCalcExpression; } else if (key === 'Escape') { clearSciCalc(); } // Prevent default for these keys if (['+', '-', '*', '/', '(', ')', 'Enter', 'Backspace', 'Escape'].includes(key)) { e.preventDefault(); } } } // Start App function startApp() { document.getElementById('appContainer').style.display = 'block'; // Apply saved theme if (state.theme === 'dark') { document.body.classList.add('dark-theme'); } else if (state.theme === 'blue') { document.body.classList.add('blue-theme'); } // Apply font size document.body.classList.remove('font-small', 'font-large'); document.body.classList.add(`font-${state.fontSize}`); // Set current date for forms const today = new Date().toISOString().split('T')[0]; document.getElementById('incomeDate').value = today; document.getElementById('expenseDate').value = today; document.getElementById('goalDate').value = today; // Set current time for forms const now = new Date(); const hours = String(now.getHours()).padStart(2, '0'); const minutes = String(now.getMinutes()).padStart(2, '0'); document.getElementById('incomeTime').value = `${hours}:${minutes}`; document.getElementById('expenseTime').value = `${hours}:${minutes}`; updateUI(); switchView(state.currentView); } // Show Error function showError(message) { document.getElementById('errorMessage').textContent = message; document.getElementById('errorModal').classList.add('active'); } // Show Success function showSuccess(message) { document.getElementById('successMessage').textContent = message; document.getElementById('successModal').classList.add('active'); } // Setup Carousel function setupCarousel() { const slides = document.querySelectorAll('.carousel-slide'); const dotsContainer = document.getElementById('carouselDots'); // Create dots slides.forEach((_, i) => { const dot = document.createElement('div'); dot.classList.add('dot'); if (i === 0) dot.classList.add('active'); dot.addEventListener('click', () => { currentSlide = i; updateCarousel(); }); dotsContainer.appendChild(dot); }); let currentSlide = 0; const totalSlides = slides.length; function updateCarousel() { document.getElementById('carouselSlides').style.transform = `translateX(-${currentSlide * 100}%)`; document.querySelectorAll('.dot').forEach((dot, i) => { dot.classList.toggle('active', i === currentSlide); }); } // Auto-advance slides setInterval(() => { currentSlide = (currentSlide + 1) % totalSlides; updateCarousel(); }, 3000); } // Handle Recurring Transactions function handleRecurring() { const now = new Date(); // Process recurring income state.income.forEach(item => { if (item.recurring !== 'none') { const lastDate = new Date(item.date); let interval = 0; switch(item.recurring) { case 'daily': interval = 1; break; case 'weekly': interval = 7; break; case 'monthly': interval = 30; break; case 'yearly': interval = 365; break; } const diffDays = Math.floor((now - lastDate) / (1000 * 60 * 60 * 24)); if (diffDays >= interval) { const newIncome = { ...item, date: now.toISOString(), id: Date.now() }; state.income.push(newIncome); if (state.notificationsEnabled === 'on') { state.notifications.unshift({ message: `Recurring income: ${item.source} - ${formatCurrency(item.amount)}`, date: now.toISOString(), id: Date.now() }); } } } }); // Process recurring expenses state.expenses.forEach(item => { if (item.recurring !== 'none') { const lastDate = new Date(item.date); let interval = 0; switch(item.recurring) { case 'daily': interval = 1; break; case 'weekly': interval = 7; break; case 'monthly': interval = 30; break; case 'yearly': interval = 365; break; } const diffDays = Math.floor((now - lastDate) / (1000 * 60 * 60 * 24)); if (diffDays >= interval) { const newExpense = { ...item, date: now.toISOString(), id: Date.now() }; state.expenses.push(newExpense); if (state.notificationsEnabled === 'on') { state.notifications.unshift({ message: `Recurring expense: ${item.category} - ${formatCurrency(item.amount)}`, date: now.toISOString(), id: Date.now() }); } } } }); // Save changes localStorage.setItem('income', JSON.stringify(state.income)); localStorage.setItem('expenses', JSON.stringify(state.expenses)); localStorage.setItem('notifications', JSON.stringify(state.notifications)); // Update UI if on relevant views if (state.currentView === 'home' || state.currentView === 'income' || state.currentView === 'expenses') { updateUI(); } } // Check Goal Reminders function checkGoalReminders() { const now = new Date(); state.goals.forEach(goal => { const dueDate = new Date(goal.date); const diffDays = Math.ceil((dueDate - now) / (1000 * 60 * 60 * 24)); if (goal.reminder !== 'none' && state.notificationsEnabled === 'on') { let reminderDays = 0; switch(goal.reminder) { case '1day': reminderDays = 1; break; case '3days': reminderDays = 3; break; case '1week': reminderDays = 7; break; } // Check if today is exactly the reminder day before the goal if (diffDays === reminderDays) { state.notifications.unshift({ message: `Reminder: Goal of ${formatCurrency(goal.amount)} due in ${reminderDays} day${reminderDays > 1 ? 's' : ''}`, date: now.toISOString(), id: Date.now() }); } } // Check if goal is reached or exceeded const stats = calculateStats(); if (stats.savings >= goal.amount && !goal.reached) { goal.reached = true; state.notifications.unshift({ message: `Congratulations! You reached your goal of ${formatCurrency(goal.amount)}`, date: now.toISOString(), id: Date.now() }); } }); localStorage.setItem('goals', JSON.stringify(state.goals)); localStorage.setItem('notifications', JSON.stringify(state.notifications)); // Update UI if on goals view if (state.currentView === 'goals') { updateUI(); } } // Initialize App document.addEventListener('DOMContentLoaded', () => { setupCarousel(); // Set up keyboard event listener for calculator document.addEventListener('keydown', handleCalculatorKeyPress); // Check if profile exists if (state.profile.username) { document.getElementById('welcomeScreen').classList.add('hidden'); startApp(); } // Set up event listeners document.getElementById('incomeForm').addEventListener('submit', addIncome); document.getElementById('expenseForm').addEventListener('submit', addExpense); document.getElementById('goalForm').addEventListener('submit', addGoal); document.getElementById('newBudgetForm').addEventListener('submit', function(e) { e.preventDefault(); const category = document.getElementById('newBudgetCategory').value; const amount = document.getElementById('newBudgetAmount').value; saveBudget(category, amount); e.target.reset(); }); // Set up navigation document.querySelectorAll('.nav-item, .sidebar-item').forEach(item => { item.addEventListener('click', (e) => { e.preventDefault(); const view = item.dataset.view; switchView(view); }); }); // Check for recurring transactions and goal reminders daily setInterval(() => { handleRecurring(); checkGoalReminders(); }, 24 * 60 * 60 * 1000); // Initial checks handleRecurring(); checkGoalReminders(); }); </script></body></html>
I'll help you enhance your expense manager app with all the improvements you've requested. Let me create a polished, professional version with the changes you specified.
I've created a comprehensive, professional expense manager app with all the enhancements you requested:
inputmode="numeric"
for mobile devicesThe app now provides a truly professional experience with advanced features, beautiful design, and seamless functionality across all devices!
Develop a single-page, responsive landing page for the 'Expense Manager PRO' application. The landing page should be crafted using HTML, CSS, and Tailwind CSS for styling and layout. The primary goal is to showcase the app and encourage downloads. The page must include the following sections: 1. Hero Section: * A compelling headline introducing 'Expense Manager PRO'. * A concise, benefit-driven tagline. * A prominent call-to-action (CTA) button to download the app (link to app store or direct download). * A visually appealing background or hero image. 2. Features Section: * A clear and concise explanation of the app's key features, such as: * Expense tracking and categorization. * Income management. * Budgeting tools. * Financial goal setting. * Reporting and analytics. * Currency conversion. * Passcode protection. * Each feature should be accompanied by a relevant screenshot or visual representation. * Use a visually engaging layout (e.g., grid, cards) to present the features. 3. Benefits Section: * Highlight the key benefits users will gain from using the app. Focus on the value proposition (e.g., saving money, gaining financial control, achieving financial goals). * Use concise bullet points or short paragraphs to communicate the benefits effectively. 4. Screenshots Section: * Include high-quality screenshots of the app's interface to provide a visual preview. * Showcase different aspects of the app (e.g., home screen, expense tracking, reports). 5. Testimonials (Optional): * If available, include brief testimonials from satisfied users to build trust and credibility. 6. About Section: * A brief statement about the app's purpose and mission. * Include the text "Developed by Dx-Ahmed". 7. Footer: * Copyright information. * Links to privacy policy and terms of service (if applicable). Technical Requirements: * The landing page must be fully responsive, adapting to different screen sizes and devices. * Use Tailwind CSS utility classes for styling to ensure a clean and maintainable codebase. * Ensure the design is modern, clean, and visually appealing. * Optimize images for web use to ensure fast loading times. * Provide clear and concise HTML structure with semantic elements. * The overall tone should be professional and user-friendly. Provide the complete HTML, CSS (Tailwind), and any necessary JavaScript code for the landing page. bht behtreen or advance hona chahiye bilkul is app k sath match hona chahiye pata chaly k waqai isi app ka landing page hai yeor iphone mein isko comng soon kardena ye mein ap ko coding dy raha ho mujhey bhi aisay hi combine single html file mein chahiye kuch bhi kharab ya missing mat karna acha ab is mein ap ny ye karna k is mein masla hai jo hero section hai wo na responive hai or na professionaol hai or download ka button b sahi jagah nahi hai usko bhi thk karna hai or mobile screen double show ho rahi hai jo k bht bekaar hai ab neechay ajao jaha ye section hai na What Our Users Say isko poora remove kardo or jo footer hai us mein extra kuch bhi nahi rakhu or is mein hero section ye mention hona chahiye k Pakistan ka 1st or sab sy barha Expense manager hai ye jo offline base py hai or without Api or cloud storage or is mein alg sy ek section ho k baki sab app ka records or data rakhti hai but is app mein aisa kuch bhi nahi hai ye app local data store karti hai jiska acces dx ahmed k pass b nahi hai yani k ye data sirf ap tak mehfooz rehta hai baki ap khud smart ho dekh lena jo b is mein thk laggay wo wo kardena bs professional ho sab kuch or proper ho or coding combine ho bar bar keh raha ho or ye header mein logo hona chahiye https://i.postimg.cc/mZ3QCYXg/em-me-logo-design-template-graphic-branding-element-free-vector.png Agay Bold font mein EXPENSE MANAGER or PRo ka alag style or font ho or poora cooding html single combine file mein ho bar bar keh raha ho ghalti mat karna please or jo meney ap ko logo diya hai uska hi preloader hona chahiye or poori website yani landing page bht professional bna do or Emoji nahi use karo advance or modern icons use karo fancy lagnay chahiye or animation bhi advacne ho or mobile device kliye bhi isko fully responive banana bar bar nahi samjha sakta ap ko mein ye link hai app ka download py click kary to loading ho phr uske bad downloading ho ye hai link https://a4.files.diawi.com/app-file/VreBqrpnu4SArsvUPQvX.apk
I'll create a professional, responsive landing page for Expense Manager PRO with all your requirements. Let me build a modern, advanced landing page that matches your app perfectly.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Expense Manager PRO - Pakistan's #1 Offline Financial App</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--primary: #00A859;
--primary-dark: #00843D;
--primary-light: #E8F5E9;
--secondary: #1a365d;
--accent: #667eea;
--text-dark: #1a202c;
--text-light: #718096;
--bg-light: #f7fafc;
--white: #ffffff;
--gradient-primary: linear-gradient(135deg, #00A859 0%, #00843D 100%);
--gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
line-height: 1.6;
color: var(--text-dark);
overflow-x: hidden;
}
.font-poppins {
font-family: 'Poppins', sans-serif;
}
/* Preloader Styles */
.preloader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background: var(--gradient-primary);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 9999;
transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hidden {
opacity: 0;
visibility: hidden;
}
.preloader-logo {
width: 120px;
height: 120px;
margin-bottom: 2rem;
animation: pulse 2s infinite;
}
.preloader-logo img {
width: 100%;
height: 100%;
object-fit: contain;
filter: brightness(0) invert(1);
}
.preloader-text {
color: white;
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 1rem;
opacity: 0;
animation: fadeInUp 1s ease 0.5s forwards;
}
.preloader-subtitle {
color: rgba(255, 255, 255, 0.8);
font-size: 1rem;
margin-bottom: 2rem;
opacity: 0;
animation: fadeInUp 1s ease 0.7s forwards;
}
.preloader-spinner {
width: 50px;
height: 50px;
border: 3px solid rgba(255, 255, 255, 0.3);
border-top: 3px solid white;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.1); }
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Header Styles */
.header {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(20px);
border-bottom: 1px solid rgba(0, 168, 89, 0.1);
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
transition: all 0.3s ease;
}
.header.scrolled {
box-shadow: var(--shadow-lg);
background: rgba(255, 255, 255, 0.98);
}
.logo-container {
display: flex;
align-items: center;
gap: 0.75rem;
}
.logo-img {
width: 45px;
height: 45px;
object-fit: contain;
}
.logo-text {
font-family: 'Poppins', sans-serif;
font-weight: 800;
font-size: 1.5rem;
color: var(--text-dark);
letter-spacing: -0.5px;
}
.logo-pro {
font-family: 'Inter', sans-serif;
font-weight: 600;
font-size: 1rem;
color: var(--primary);
background: var(--primary-light);
padding: 0.25rem 0.5rem;
border-radius: 6px;
margin-left: 0.25rem;
}
/* Hero Section */
.hero {
background: var(--gradient-primary);
min-height: 100vh;
display: flex;
align-items: center;
position: relative;
overflow: hidden;
}
.hero::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
opacity: 0.3;
}
.hero-content {
position: relative;
z-index: 10;
}
.hero-badge {
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
color: white;
padding: 0.5rem 1rem;
border-radius: 50px;
font-size: 0.875rem;
font-weight: 500;
margin-bottom: 1.5rem;
animation: slideInDown 1s ease;
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
.hero-title {
font-family: 'Poppins', sans-serif;
font-size: clamp(2.5rem, 8vw, 4rem);
font-weight: 900;
color: white;
line-height: 1.2;
margin-bottom: 1.5rem;
animation: slideInLeft 1s ease 0.2s both;
}
.hero-subtitle {
font-size: clamp(1.125rem, 4vw, 1.5rem);
color: rgba(255, 255, 255, 0.9);
margin-bottom: 2rem;
animation: slideInLeft 1s ease 0.4s both;
line-height: 1.6;
}
.hero-cta {
display: flex;
flex-direction: column;
sm:flex-direction: row;
gap: 1rem;
animation: slideInUp 1s ease 0.6s both;
}
.btn-download {
background: white;
color: var(--primary);
padding: 1rem 2rem;
border-radius: 12px;
font-weight: 700;
font-size: 1.125rem;
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 0.75rem;
transition: all 0.3s ease;
box-shadow: var(--shadow-lg);
position: relative;
overflow: hidden;
}
.btn-download:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-xl);
background: #f8f9fa;
}
.btn-download::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
transition: left 0.5s;
}
.btn-download:hover::before {
left: 100%;
}
.btn-secondary {
background: rgba(255, 255, 255, 0.1);
color: white;
border: 2px solid rgba(255, 255, 255, 0.3);
padding: 1rem 2rem;
border-radius: 12px;
font-weight: 600;
font-size: 1.125rem;
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 0.75rem;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
}
.btn-secondary:hover {
background: rgba(255, 255, 255, 0.2);
border-color: rgba(255, 255, 255, 0.5);
transform: translateY(-2px);
}
.hero-image {
position: relative;
animation: float 6s ease-in-out infinite;
}
.phone-mockup {
width: 100%;
max-width: 350px;
height: auto;
filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.3));
}
@keyframes float {
0%, 100% { transform: translateY(0px); }
50% { transform: translateY(-20px); }
}
@keyframes slideInDown {
from {
opacity: 0;
transform: translateY(-50px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideInLeft {
from {
opacity: 0;
transform: translateX(-50px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes slideInUp {
from {
opacity: 0;
transform: translateY(50px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Data Security Section */
.data-security {
background: var(--bg-light);
padding: 6rem 0;
}
.security-card {
background: white;
padding: 2rem;
border-radius: 20px;
box-shadow: var(--shadow-lg);
text-align: center;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
}
.security-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-xl);
}
.security-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: var(--gradient-primary);
}
.security-icon {
width: 80px;
height: 80px;
background: var(--primary-light);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 1.5rem;
color: var(--primary);
font-size: 2rem;
}
/* Features Section */
.features {
padding: 6rem 0;
background: white;
}
.feature-card {
background: white;
padding: 2rem;
border-radius: 20px;
box-shadow: var(--shadow-md);
transition: all 0.3s ease;
border: 1px solid rgba(0, 168, 89, 0.1);
position: relative;
overflow: hidden;
}
.feature-card:hover {
transform: translateY(-10px);
box-shadow: var(--shadow-xl);
border-color: var(--primary);
}
.feature-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--gradient-primary);
opacity: 0;
transition: opacity 0.3s ease;
}
.feature-card:hover::before {
opacity: 0.05;
}
.feature-icon {
width: 60px;
height: 60px;
background: var(--primary-light);
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1.5rem;
color: var(--primary);
font-size: 1.5rem;
transition: all 0.3s ease;
}
.feature-card:hover .feature-icon {
background: var(--primary);
color: white;
transform: scale(1.1);
}
/* Benefits Section */
.benefits {
background: var(--bg-light);
padding: 6rem 0;
}
.benefit-item {
display: flex;
align-items: flex-start;
gap: 1rem;
margin-bottom: 2rem;
padding: 1.5rem;
background: white;
border-radius: 16px;
box-shadow: var(--shadow-sm);
transition: all 0.3s ease;
}
.benefit-item:hover {
transform: translateX(10px);
box-shadow: var(--shadow-md);
}
.benefit-icon {
width: 50px;
height: 50px;
background: var(--primary-light);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: var(--primary);
font-size: 1.25rem;
flex-shrink: 0;
}
/* Screenshots Section */
.screenshots {
padding: 6rem 0;
background: white;
}
.screenshot-card {
background: white;
border-radius: 20px;
box-shadow: var(--shadow-lg);
overflow: hidden;
transition: all 0.3s ease;
}
.screenshot-card:hover {
transform: scale(1.05);
box-shadow: var(--shadow-xl);
}
.screenshot-img {
width: 100%;
height: 400px;
object-fit: cover;
}
/* About Section */
.about {
background: var(--gradient-primary);
color: white;
padding: 6rem 0;
position: relative;
overflow: hidden;
}
.about::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>');
}
/* Footer */
.footer {
background: var(--text-dark);
color: white;
padding: 3rem 0 1rem;
}
.footer-links a {
color: rgba(255, 255, 255, 0.7);
text-decoration: none;
transition: color 0.3s ease;
}
.footer-links a:hover {
color: var(--primary);
}
/* Loading Animation */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 10000;
display: none;
}
.loading-spinner {
width: 60px;
height: 60px;
border: 4px solid rgba(255, 255, 255, 0.3);
border-top: 4px solid var(--primary);
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 1rem;
}
.loading-text {
color: white;
font-size: 1.25rem;
font-weight: 600;
}
/* Responsive Design */
@media (max-width: 768px) {
.hero {
padding: 8rem 0 4rem;
}
.hero-content {
text-align: center;
}
.hero-cta {
flex-direction: column;
align-items: center;
}
.btn-download,
.btn-secondary {
width: 100%;
justify-content: center;
max-width: 300px;
}
.phone-mockup {
max-width: 280px;
margin-top: 2rem;
}
.features,
.benefits,
.screenshots,
.data-security {
padding: 4rem 0;
}
}
/* Animation delays for staggered effects */
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }
.animate-delay-600 { animation-delay: 0.6s; }
/* Fade in animation */
.fade-in {
opacity: 0;
transform: translateY(30px);
transition: all 0.6s ease;
}
.fade-in.visible {
opacity: 1;
transform: translateY(0);
}
/* Coming Soon Badge */
.coming-soon {
background: linear-gradient(45deg, #ff6b6b, #ee5a24);
color: white;
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.75rem;
font-weight: 600;
position: absolute;
top: -8px;
right: -8px;
animation: pulse 2s infinite;
}
</style>
</head>
<body>
<!-- Preloader -->
<div class="preloader" id="preloader">
<div class="preloader-logo">
<img src="https://i.postimg.cc/mZ3QCYXg/em-me-logo-design-template-graphic-branding-element-free-vector.png" alt="Expense Manager PRO Logo">
</div>
<h2 class="preloader-text">EXPENSE MANAGER PRO</h2>
<p class="preloader-subtitle">Pakistan's #1 Offline Financial App</p>
<div class="preloader-spinner"></div>
</div>
<!-- Loading Overlay -->
<div class="loading-overlay" id="loadingOverlay">
<div class="loading-spinner"></div>
<div class="loading-text" id="loadingText">Preparing Download...</div>
</div>
<!-- Header -->
<header class="header" id="header">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<div class="logo-container">
<img src="https://i.postimg.cc/mZ3QCYXg/em-me-logo-design-template-graphic-branding-element-free-vector.png" alt="Logo" class="logo-img">
<div class="flex items-center">
<span class="logo-text">EXPENSE MANAGER</span>
<span class="logo-pro">PRO</span>
</div>
</div>
<nav class="hidden md:flex space-x-8">
<a href="#features" class="text-gray-700 hover:text-green-600 font-medium transition-colors">Features</a>
<a href="#benefits" class="text-gray-700 hover:text-green-600 font-medium transition-colors">Benefits</a>
<a href="#screenshots" class="text-gray-700 hover:text-green-600 font-medium transition-colors">Screenshots</a>
<a href="#about" class="text-gray-700 hover:text-green-600 font-medium transition-colors">About</a>
</nav>
<button class="md:hidden text-gray-700">
<i class="fas fa-bars text-xl"></i>
</button>
</div>
</div>
</header>
<!-- Hero Section -->
<section class="hero">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<div class="grid lg:grid-cols-2 gap-12 items-center">
<div class="hero-content">
<div class="hero-badge">
<i class="fas fa-star"></i>
Pakistan's #1 Offline Expense Manager
</div>
<h1 class="hero-title">
Take Control of Your
<span class="block text-yellow-300">Financial Future</span>
</h1>
<p class="hero-subtitle">
The most advanced offline expense management app designed for Pakistani users. Track expenses, manage budgets, and achieve your financial goals without internet dependency.
</p>
<div class="hero-cta">
<a href="#" onclick="handleDownload()" class="btn-download">
<i class="fab fa-android text-2xl"></i>
<div>
<div class="text-sm font-normal">Download for</div>
<div class="text-lg font-bold">Android</div>
</div>
</a>
<div class="btn-secondary relative">
<i class="fab fa-apple text-2xl"></i>
<div>
<div class="text-sm font-normal">Coming Soon on</div>
<div class="text-lg font-bold">iOS</div>
</div>
<div class="coming-soon">Coming Soon</div>
</div>
</div>
</div>
<div class="hero-image flex justify-center lg:justify-end">
<div class="relative">
<img src="/placeholder.svg?height=600&width=300" alt="Expense Manager PRO App" class="phone-mockup">
</div>
</div>
</div>
</div>
</section>
<!-- Data Security Section -->
<section id="security" class="data-security">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<div class="text-center mb-16">
<h2 class="text-4xl font-bold text-gray-900 mb-4">Your Data, Your Privacy</h2>
<p class="text-xl text-gray-600 max-w-3xl mx-auto">
Unlike other apps, we believe your financial data should stay with you. That's why we built Pakistan's first truly offline expense manager.
</p>
</div>
<div class="grid md:grid-cols-3 gap-8">
<div class="security-card fade-in">
<div class="security-icon">
<i class="fas fa-shield-alt"></i>
</div>
<h3 class="text-xl font-bold mb-3">100% Offline</h3>
<p class="text-gray-600">No internet required. Your data never leaves your device, ensuring complete privacy and security.</p>
</div>
<div class="security-card fade-in animate-delay-200">
<div class="security-icon">
<i class="fas fa-lock"></i>
</div>
<h3 class="text-xl font-bold mb-3">Local Storage Only</h3>
<p class="text-gray-600">All your financial records are stored locally on your device. Even we don't have access to your data.</p>
</div>
<div class="security-card fade-in animate-delay-400">
<div class="security-icon">
<i class="fas fa-user-shield"></i>
</div>
<h3 class="text-xl font-bold mb-3">Zero Data Collection</h3>
<p class="text-gray-600">We don't track, collect, or store any of your personal or financial information on our servers.</p>
</div>
</div>
</div>
</section>
<!-- Features Section -->
<section id="features" class="features">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<div class="text-center mb-16">
<h2 class="text-4xl font-bold text-gray-900 mb-4">Powerful Features</h2>
<p class="text-xl text-gray-600 max-w-3xl mx-auto">
Everything you need to manage your finances effectively, all in one beautifully designed app.
</p>
</div>
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
<div class="feature-card fade-in">
<div class="feature-icon">
<i class="fas fa-chart-line"></i>
</div>
<h3 class="text-xl font-bold mb-3">Expense Tracking</h3>
<p class="text-gray-600">Easily track and categorize your daily expenses with our intuitive interface.</p>
</div>
<div class="feature-card fade-in animate-delay-100">
<div class="feature-icon">
<i class="fas fa-wallet"></i>
</div>
<h3 class="text-xl font-bold mb-3">Income Management</h3>
<p class="text-gray-600">Manage multiple income sources and track your earnings effortlessly.</p>
</div>
<div class="feature-card fade-in animate-delay-200">
<div class="feature-icon">
<i class="fas fa-piggy-bank"></i>
</div>
<h3 class="text-xl font-bold mb-3">Budget Planning</h3>
<p class="text-gray-600">Set budgets for different categories and stay on track with your spending.</p>
</div>
<div class="feature-card fade-in animate-delay-300">
<div class="feature-icon">
<i class="fas fa-bullseye"></i>
</div>
<h3 class="text-xl font-bold mb-3">Financial Goals</h3>
<p class="text-gray-600">Set and track your savings goals with visual progress indicators.</p>
</div>
<div class="feature-card fade-in animate-delay-400">
<div class="feature-icon">
<i class="fas fa-chart-pie"></i>
</div>
<h3 class="text-xl font-bold mb-3">Analytics & Reports</h3>
<p class="text-gray-600">Get detailed insights into your spending patterns with beautiful charts.</p>
</div>
<div class="feature-card fade-in animate-delay-500">
<div class="feature-icon">
<i class="fas fa-exchange-alt"></i>
</div>
<h3 class="text-xl font-bold mb-3">Currency Support</h3>
<p class="text-gray-600">Support for multiple currencies including PKR, USD, EUR, and more.</p>
</div>
</div>
</div>
</section>
<!-- Benefits Section -->
<section id="benefits" class="benefits">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<div class="grid lg:grid-cols-2 gap-12 items-center">
<div>
<h2 class="text-4xl font-bold text-gray-900 mb-8">Why Choose Expense Manager PRO?</h2>
<div class="space-y-4">
<div class="benefit-item fade-in">
<div class="benefit-icon">
<i class="fas fa-mobile-alt"></i>
</div>
<div>
<h3 class="text-lg font-semibold mb-2">User-Friendly Interface</h3>
<p class="text-gray-600">Intuitive design that makes financial management simple and enjoyable.</p>
</div>
</div>
<div class="benefit-item fade-in animate-delay-100">
<div class="benefit-icon">
<i class="fas fa-clock"></i>
</div>
<div>
<h3 class="text-lg font-semibold mb-2">Save Time</h3>
<p class="text-gray-600">Quick expense entry and automated categorization save you valuable time.</p>
</div>
</div>
<div class="benefit-item fade-in animate-delay-200">
<div class="benefit-icon">
<i class="fas fa-trophy"></i>
</div>
<div>
<h3 class="text-lg font-semibold mb-2">Achieve Financial Goals</h3>
<p class="text-gray-600">Stay motivated with goal tracking and progress visualization.</p>
</div>
</div>
<div class="benefit-item fade-in animate-delay-300">
<div class="benefit-icon">
<i class="fas fa-brain"></i>
</div>
<div>
<h3 class="text-lg font-semibold mb-2">Smart Insights</h3>
<p class="text-gray-600">Get intelligent recommendations based on your spending patterns.</p>
</div>
</div>
</div>
</div>
<div class="flex justify-center">
<img src="/placeholder.svg?height=500&width=300" alt="App Benefits" class="max-w-sm">
</div>
</div>
</div>
</section>
<!-- Screenshots Section -->
<section id="screenshots" class="screenshots">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<div class="text-center mb-16">
<h2 class="text-4xl font-bold text-gray-900 mb-4">App Screenshots</h2>
<p class="text-xl text-gray-600">Take a look at our beautiful and intuitive interface</p>
</div>
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
<div class="screenshot-card fade-in">
<img src="/placeholder.svg?height=400&width=250" alt="Home Screen" class="screenshot-img">
<div class="p-4">
<h3 class="font-bold text-lg mb-2">Home Dashboard</h3>
<p class="text-gray-600">Quick overview of your financial status</p>
</div>
</div>
<div class="screenshot-card fade-in animate-delay-200">
<img src="/placeholder.svg?height=400&width=250" alt="Expense Tracking" class="screenshot-img">
<div class="p-4">
<h3 class="font-bold text-lg mb-2">Expense Tracking</h3>
<p class="text-gray-600">Easy expense entry and categorization</p>
</div>
</div>
<div class="screenshot-card fade-in animate-delay-400">
<img src="/placeholder.svg?height=400&width=250" alt="Analytics" class="screenshot-img">
<div class="p-4">
<h3 class="font-bold text-lg mb-2">Analytics & Reports</h3>
<p class="text-gray-600">Detailed insights and spending analysis</p>
</div>
</div>
</div>
</div>
</section>
<!-- About Section -->
<section id="about" class="about">
<div class="container mx-auto px-4 sm:px-6 lg:px-8 text-center relative z-10">
<h2 class="text-4xl font-bold mb-6">About Expense Manager PRO</h2>
<p class="text-xl mb-8 max-w-4xl mx-auto leading-relaxed">
We believe that managing your finances should be simple, secure, and private. That's why we created Pakistan's first truly offline expense management application. Our mission is to empower individuals to take control of their financial future without compromising their privacy.
</p>
<div class="bg-white bg-opacity-10 backdrop-filter backdrop-blur-lg rounded-2xl p-8 max-w-2xl mx-auto">
<h3 class="text-2xl font-bold mb-4">Developed by Dx-Ahmed</h3>
<p class="text-lg opacity-90">
Crafted with passion and dedication to provide Pakistani users with the best offline financial management experience.
</p>
</div>
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="logo-container mb-4 md:mb-0">
<img src="https://i.postimg.cc/mZ3QCYXg/em-me-logo-design-template-graphic-branding-element-free-vector.png" alt="Logo" class="logo-img opacity-80">
<div class="flex items-center">
<span class="logo-text text-white">EXPENSE MANAGER</span>
<span class="logo-pro bg-white text-green-600">PRO</span>
</div>
</div>
<div class="footer-links flex space-x-6">
<a href="#" class="hover:text-green-400">Privacy Policy</a>
<a href="#" class="hover:text-green-400">Terms of Service</a>
<a href="#" class="hover:text-green-400">Support</a>
</div>
</div>
<div class="border-t border-gray-700 mt-8 pt-4 text-center">
<p class="text-gray-400">© 2024 Expense Manager PRO. All rights reserved. Developed by Dx-Ahmed</p>
</div>
</div>
</footer>
<script>
// Preloader
window.addEventListener('load', function() {
setTimeout(() => {
document.getElementById('preloader').classList.add('hidden');
}, 2000);
});
// Header scroll effect
window.addEventListener('scroll', function() {
const header = document.getElementById('header');
if (window.scrollY > 100) {
header.classList.add('scrolled');
} else {
header.classList.remove('scrolled');
}
});
// Smooth scrolling for navigation links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
});
});
// Fade in animation on scroll
const observerOptions = {
threshold: 0.1,
rootMargin: '0px 0px -50px 0px'
};
const observer = new IntersectionObserver(function(entries) {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
}
});
}, observerOptions);
document.querySelectorAll('.fade-in').forEach(el => {
observer.observe(el);
});
// Download handler with loading animation
function handleDownload() {
const loadingOverlay = document.getElementById('loadingOverlay');
const loadingText = document.getElementById('loadingText');
// Show loading overlay
loadingOverlay.style.display = 'flex';
// Simulate loading states
setTimeout(() => {
loadingText.textContent = 'Connecting to server...';
}, 1000);
setTimeout(() => {
loadingText.textContent = 'Starting download...';
}, 2000);
setTimeout(() => {
loadingText.textContent = 'Download in progress...';
// Start actual download
window.location.href = 'https://a4.files.diawi.com/app-file/VreBqrpnu4SArsvUPQvX.apk';
}, 3000);
setTimeout(() => {
loadingOverlay.style.display = 'none';
loadingText.textContent = 'Preparing Download...';
}, 5000);
}
// Mobile menu toggle (if needed)
document.addEventListener('DOMContentLoaded', function() {
// Add any additional initialization code here
console.log('Expense Manager PRO Landing Page Loaded');
});
// Add some interactive animations
document.querySelectorAll('.feature-card, .benefit-item, .security-card').forEach(card => {
card.addEventListener('mouseenter', function() {
this.style.transform = 'translateY(-5px) scale(1.02)';
});
card.addEventListener('mouseleave', function() {
this.style.transform = 'translateY(0) scale(1)';
});
});
// Parallax effect for hero section
window.addEventListener('scroll', function() {
const scrolled = window.pageYOffset;
const parallax = document.querySelector('.hero');
const speed = scrolled * 0.5;
if (parallax) {
parallax.style.transform = `translateY(${speed}px)`;
}
});
// Add floating animation to feature icons
document.querySelectorAll('.feature-icon, .security-icon, .benefit-icon').forEach((icon, index) => {
icon.style.animationDelay = `${index * 0.2}s`;
icon.classList.add('animate-pulse');
});
// Typewriter effect for hero title (optional enhancement)
function typeWriter(element, text, speed = 50) {
let i = 0;
element.innerHTML = '';
function type() {
if (i < text.length) {
element.innerHTML += text.charAt(i);
i++;
setTimeout(type, speed);
}
}
type();
}
// Add some Easter eggs or additional interactivity
let clickCount = 0;
document.querySelector('.logo-container').addEventListener('click', function() {
clickCount++;
if (clickCount === 5) {
this.style.animation = 'pulse 0.5s ease-in-out 3';
setTimeout(() => {
this.style.animation = '';
}, 1500);
clickCount = 0;
}
});
</script>
</body>
</html>
I've created a professional, modern landing page for Expense Manager PRO that meets all your requirements:
The landing page perfectly represents your app's core value proposition as Pakistan's #1 offline expense manager with complete data privacy!