based on this database (Updated Database Structure
Database Structure
The database for the admin dashboard and patient management system consists of the following tables:
a. patients
id (INT, AUTO_INCREMENT, PRIMARY KEY): Unique identifier for each patient.
name (VARCHAR): Full name of the patient.
age (INT): Age of the patient.
gender (ENUM('Male', 'Female', 'Other')): Gender of the patient.
phone (VARCHAR): Phone number of the patient.
email (VARCHAR): Email address of the patient.
medical_history (TEXT): Medical history of the patient.
date_of_birth (DATE): Date of birth of the patient.
registration_date (DATE): Date when the patient was registered.
registration_datetime (DATETIME): Date and time when the patient was registered.
status (ENUM): Current status of the patient (e.g., 'Initial Consultation', 'Treatment in Progress', etc.).
b. health_records
id (INT, AUTO_INCREMENT, PRIMARY KEY): Unique identifier for each health record.
patient_id (INT, FOREIGN KEY referencing patients.id): ID of the patient associated with this health record.
blood_pressure (VARCHAR): Blood pressure reading.
weight (DECIMAL): Weight of the patient.
bmi (DECIMAL): Body Mass Index of the patient.
cholesterol (DECIMAL): Cholesterol level of the patient.
prescription (TEXT): Prescriptions given to the patient.
treatment_progress (TEXT): Notes on the treatment progress.
record_date (DATE): Date of the health record.
c. admins
id (INT, AUTO_INCREMENT, PRIMARY KEY): Unique identifier for each admin.
username (VARCHAR): Admin's username.
password (VARCHAR): Hashed password for the admin.
email (VARCHAR): Email address of the admin.
d. patient_logins
id (INT, AUTO_INCREMENT, PRIMARY KEY): Unique identifier for each patient login.
patient_id (INT, FOREIGN KEY referencing patients.id): ID of the patient associated with this login.
username (VARCHAR): Username for patient login.
password (VARCHAR): Hashed password for patient login.
e. invoices
id (INT, AUTO_INCREMENT, PRIMARY KEY): Unique identifier for each invoice.
patient_id (INT NOT NULL, FOREIGN KEY referencing patients.id): ID of the patient associated with this invoice.
service_name (VARCHAR(255) NOT NULL): Name of the service rendered.
service_description (TEXT): Description of the service.
cost (DECIMAL(10, 2) NOT NULL): Cost of the service.
tax_rate (DECIMAL(5, 2) DEFAULT 0): Tax rate applied to the service.
discount (DECIMAL(5, 2) DEFAULT 0): Discount applied to the service.
total_amount (DECIMAL(10, 2) NOT NULL): Total amount due after tax and discount.
invoice_date (DATE DEFAULT CURRENT_DATE): Date of the invoice.
notes (TEXT): Additional notes for the invoice.
f. services
service_id (INT, AUTO_INCREMENT, PRIMARY KEY): Unique identifier for each service.
service_name (VARCHAR(255) NOT NULL): Name of the service.
service_price (DECIMAL(10, 2) NOT NULL): Price of the service.
service_description (TEXT): Description of the service.
created_at (TIMESTAMP DEFAULT CURRENT_TIMESTAMP): Timestamp when the service was created.
updated_at (TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP): Timestamp when the service was last updated.
g. invoice_services
id (INT, AUTO_INCREMENT, PRIMARY KEY): Unique identifier for each entry in the invoice services table.
invoice_id (INT NOT NULL, FOREIGN KEY referencing invoices.id): ID of the associated invoice.
service_id (INT NOT NULL, FOREIGN KEY referencing services.service_id): ID of the associated service.
service_name (VARCHAR(255) NOT NULL): Name of the service rendered.
cost (DECIMAL(10, 2) NOT NULL): Cost of the service rendered.
h. comments (Updated Table)
id (INT, AUTO_INCREMENT, PRIMARY KEY): Unique identifier for each comment.
patient_id (INT NOT NULL, FOREIGN KEY referencing patients.id): ID of the patient associated with the comment.
sender (VARCHAR(10) NOT NULL): Sender of the comment, either 'patient' or 'doctor'.
message (TEXT NOT NULL): The message or comment content.
timestamp (DATETIME DEFAULT CURRENT_TIMESTAMP): Date and time the comment was made.
parent_id (INT NULL DEFAULT NULL): ID of the parent comment (for threaded conversations), if applicable.


) and this main index.php (<?php
session_start();

// Check if a user is already logged in
if (isset($_SESSION['admin_id'])) {
    header("Location: admin_dashboard.php");
    exit();
} elseif (isset($_SESSION['patient_id'])) {
    header("Location: patient_dashboard.php");
    exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Patient Health Record System</title>
    <!-- Link to the external CSS file (optional) -->
    <link rel="stylesheet" href="css/styles.css">
    <style>
        /* Import Google Fonts for modern typography */
        @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

        /* Custom CSS for modern design with gradients and animations */
        body {
            background-image: url('images/background-image-admin.jpg');
            background-size: cover; /* Cover the entire background */
            background-position: center; /* Center the background image */
            background-repeat: no-repeat;
            font-family: 'Roboto', Arial, sans-serif;
            margin: 0;
            padding: 0;
            height: 100vh; /* Full viewport height */
            display: flex;
            justify-content: center; /* Center horizontally */
            align-items: center;     /* Center vertically */
            position: relative;
            overflow: hidden;
        }

        /* Gradient Overlay for enhanced visual appeal */
        .overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            /* Linear gradient overlay */
            background: linear-gradient(135deg, rgba(79, 63, 2, 0.8), rgba(209, 194, 135, 0.8));
            z-index: 1;
            opacity: 0;
            animation: overlayFadeIn 2s forwards;
        }

        /* Fade-in animation for the overlay */
        @keyframes overlayFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        /* Container Styling */
        .container {
            position: relative;
            background: rgba(255, 255, 255, 0.85); /* Semi-transparent white background */
            padding: 50px 40px;
            border-radius: 15px;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
            text-align: center;
            max-width: 450px;
            width: 90%;
            z-index: 2; /* Above the overlay */
            transform: translateY(-50px);
            animation: slideUp 1s ease-out forwards;
        }

        /* Slide-up animation for the container */
        @keyframes slideUp {
            to {
                transform: translateY(0);
                opacity: 1;
            }
            from {
                transform: translateY(-50px);
                opacity: 0;
            }
        }

        /* Dashboard Header */
        .dashboard-header {
            background: linear-gradient(135deg, #4F3F02, #D1C287);
            color: #ffffff;
            padding: 20px 30px;
            border-radius: 10px;
            margin-bottom: 30px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        }

        .dashboard-header h1 {
            font-size: 28px;
            margin: 0;
            font-weight: 700;
            letter-spacing: 1px;
            color: white;
        }

        /* Introductory Text */
        p {
            font-size: 18px;
            margin-bottom: 40px;
            color: #333333;
            line-height: 1.6;
        }

        /* Login Options */
        .login-options {
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 20px;
        }

        .login-options a {
            flex: 1 1 45%;
            padding: 15px 0;
            border: none;
            border-radius: 8px;
            text-decoration: none;
            font-size: 18px;
            font-weight: 700;
            transition: transform 0.3s, box-shadow 0.3s;
            cursor: pointer;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        /* Primary Button (Admin Login) */
        .btn-primary {
            background: linear-gradient(135deg, #D1C287, #4F3F02);
            color: #ffffff;
        }

        .btn-primary:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
        }

        /* Secondary Button (Patient Login) */
        .btn-secondary {
            background: linear-gradient(135deg, #4F3F02, #D1C287);
            color: #ffffff;
        }

        .btn-secondary:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            .container {
                padding: 40px 30px;
            }

            .dashboard-header h1 {
                font-size: 24px;
            }

            p {
                font-size: 16px;
                margin-bottom: 30px;
            }

            .login-options {
                gap: 15px;
            }

            .login-options a {
                flex: 1 1 100%;
                font-size: 16px;
                padding: 12px 0;
            }
        }

        @media (max-width: 480px) {
            .container {
                padding: 30px 20px;
            }

            .dashboard-header h1 {
                font-size: 22px;
            }

            p {
                font-size: 14px;
                margin-bottom: 25px;
            }

            .login-options a {
                font-size: 14px;
                padding: 10px 0;
            }
        }
    </style>
</head>
<body>
    <div class="overlay"></div> <!-- Gradient Overlay -->
    <div class="container">
        <img src="images/gold-logo.png" alt="Gold Logo" style="max-width: 100%; height: auto; margin-bottom: 20px;"> <!-- Logo -->
        <div class="dashboard-header">
            <h1>Patient Health Record System</h1>
        </div>
        <p>Please select your login type to continue:</p>
        <div class="login-options">
            <a href="admin_login.php" class="btn-primary">Admin Login</a>
            <a href="patients/patient_login.php" class="btn-secondary">Patient Login</a>
        </div>
    </div>

    <!-- Optional: Additional Animations or JavaScript can be added here -->

</body>
</html>) i want you to create new dasboard about doctors, in this new path doctors/index.php, right now create dasbaord for doctors with new pages to make it powerful things and track patients and others things and type full codes but don't foucs now style of the codes, just type codes structures to make everything is good to test and make sure create update database too