diff --git a/assets/css/custom.css b/assets/css/custom.css
new file mode 100644
index 0000000..4b63e45
--- /dev/null
+++ b/assets/css/custom.css
@@ -0,0 +1,26 @@
+/* Import Google Font */
+@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700&display=swap');
+
+body {
+ direction: rtl; /* Right-to-left layout */
+ font-family: 'Tajawal', sans-serif; /* Arabic-friendly font */
+ background-color: #f8f9fa;
+}
+
+.main-content {
+ min-height: calc(100vh - 56px); /* Full height minus navbar */
+}
+
+.navbar {
+ background-color: #ffffff;
+ border-bottom: 1px solid #dee2e6;
+}
+
+.card {
+ border: none;
+ box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
+}
+
+.table {
+ vertical-align: middle;
+}
diff --git a/db/setup.php b/db/setup.php
new file mode 100644
index 0000000..b3092c0
--- /dev/null
+++ b/db/setup.php
@@ -0,0 +1,84 @@
+setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+ echo "Starting database setup...\n";
+
+ // Table: clinics
+ $sql_clinics = "
+ CREATE TABLE IF NOT EXISTS `clinics` (
+ `id` INT AUTO_INCREMENT PRIMARY KEY,
+ `name` VARCHAR(255) NOT NULL,
+ `specialization` VARCHAR(255),
+ `phone` VARCHAR(50),
+ `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;";
+ $pdo->exec($sql_clinics);
+ echo "Table 'clinics' created successfully or already exists.\n";
+
+ // Table: users
+ $sql_users = "
+ CREATE TABLE IF NOT EXISTS `users` (
+ `id` INT AUTO_INCREMENT PRIMARY KEY,
+ `clinic_id` INT NOT NULL,
+ `mobile` VARCHAR(50) NOT NULL UNIQUE,
+ `name` VARCHAR(255) NOT NULL,
+ `role` ENUM('admin', 'doctor', 'assistant') NOT NULL,
+ `is_active` BOOLEAN DEFAULT TRUE,
+ `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ FOREIGN KEY (`clinic_id`) REFERENCES `clinics`(`id`) ON DELETE CASCADE
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;";
+ $pdo->exec($sql_users);
+ echo "Table 'users' created successfully or already exists.\n";
+
+ // Table: patients
+ $sql_patients = "
+ CREATE TABLE IF NOT EXISTS `patients` (
+ `id` INT AUTO_INCREMENT PRIMARY KEY,
+ `clinic_id` INT NOT NULL,
+ `name` VARCHAR(255) NOT NULL,
+ `mobile` VARCHAR(50) NULL,
+ `notes` TEXT,
+ `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ FOREIGN KEY (`clinic_id`) REFERENCES `clinics`(`id`) ON DELETE CASCADE
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;";
+ $pdo->exec($sql_patients);
+ echo "Table 'patients' created successfully or already exists.\n";
+
+ // --- SEED DATA ---
+
+ // Check if clinic exists
+ $stmt = $pdo->query("SELECT id FROM `clinics` WHERE id = 1");
+ if ($stmt->rowCount() == 0) {
+ $pdo->exec("INSERT INTO `clinics` (`id`, `name`, `specialization`, `phone`) VALUES (1, 'عيادة الأمل', 'الطب العام', '1234567890')");
+ echo "Seeded 'clinics' table.\n";
+
+ // Seed users only if clinic was just created
+ $pdo->exec("INSERT INTO `users` (`clinic_id`, `mobile`, `name`, `role`) VALUES (1, '966500000001', 'د. أحمد محمود', 'doctor')");
+ $pdo->exec("INSERT INTO `users` (`clinic_id`, `mobile`, `name`, `role`) VALUES (1, '966500000002', 'فاطمة علي', 'assistant')");
+ echo "Seeded 'users' table.\n";
+
+ // Seed patients only if clinic was just created
+ $pdo->exec("INSERT INTO `patients` (`clinic_id`, `name`, `mobile`) VALUES (1, 'خالد الغامدي', '966510000001')");
+ $pdo->exec("INSERT INTO `patients` (`clinic_id`, `name`, `mobile`) VALUES (1, 'سارة عبدالله', '966510000002')");
+ $pdo->exec("INSERT INTO `patients` (`clinic_id`, `name`, `mobile`) VALUES (1, 'محمد الزهراني', '966510000003')");
+ echo "Seeded 'patients' table.\n";
+ } else {
+ echo "Data already seeded.\n";
+ }
+
+ echo "Database setup finished successfully!\n";
+
+} catch (PDOException $e) {
+ die("Database error: " . $e->getMessage());
+}
diff --git a/index.php b/index.php
index 7205f3d..90f836b 100644
--- a/index.php
+++ b/index.php
@@ -132,19 +132,20 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
-
-
-
Analyzing your requirements and generating your website…
-
- Loading…
-
-
= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.
-
This page will update automatically as the plan is implemented.
-
Runtime: PHP = htmlspecialchars($phpVersion) ?> — UTC = htmlspecialchars($now) ?>
+
+
+
+
لوحة التحكم
+
+
+
+
أهلاً بك في نظام إدارة العيادة
+
اختر من القائمة للتنقل بين أقسام النظام.
+
+
-
-
+
+
+