📱 ADMIN DASHBOARD - QUICK SETUP GUIDE
=====================================

🚀 GETTING STARTED (3 SIMPLE STEPS):

1️⃣  RESET YOUR DATABASE
   - Open phpMyAdmin (http://localhost/phpmyadmin)
   - Drop the existing 'pharmacy_db' database
   - Import the updated database.sql file
   - This will create all tables with correct admin credentials

2️⃣  VERIFY SETUP
   - Go to: http://localhost/pharmacy/admin-setup.php
   - This will check if everything is configured correctly
   - Fix any errors shown

3️⃣  LOGIN TO ADMIN PANEL
   - Go to: http://localhost/pharmacy/admin/login.php
   - Email: admin@pharmacy.com
   - Password: admin123
   - Change password after first login (Settings page)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📍 ACCESS POINTS:

Main Website:
  http://localhost/pharmacy/

Admin Login:
  http://localhost/pharmacy/admin/login.php

Setup Verification:
  http://localhost/pharmacy/admin-setup.php

Admin Dashboard (after login):
  http://localhost/pharmacy/admin/index.php

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔑 DEFAULT CREDENTIALS:

Email:    admin@pharmacy.com
Password: admin123

⚠️  IMPORTANT: Change the password after first login!

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 ADMIN FEATURES:

✅ Dashboard with statistics & charts
✅ Product management (add, edit, delete)
✅ Order management (view, update status)
✅ User management (view profiles)
✅ Settings (change password)
✅ Search & filter functionality
✅ Responsive design (works on mobile/tablet)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔐 SECURITY FEATURES:

✅ Password hashing (BCrypt)
✅ SQL injection prevention
✅ Session management
✅ Admin-only access
✅ Input validation

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

❓ TROUBLESHOOTING:

Q: Login not working?
A: Run admin-setup.php to verify everything is installed

Q: Admin page shows blank?
A: Check browser console (F12) for JavaScript errors
   Clear browser cache and refresh

Q: Database connection error?
A: Verify database credentials in config/db.php
   Make sure MySQL is running

Q: Can't upload images?
A: Make sure assets/images/ directory exists
   Set permissions to 755

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📁 KEY FILES:

includes/admin-auth.php      - Authentication functions
config/db.php                - Database connection
admin/index.php              - Main dashboard
admin/login.php              - Login page
assets/css/admin-dashboard.css - Admin styling
assets/js/admin-dashboard.js - Admin JavaScript

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✨ That's it! You're ready to manage your pharmacy!
