diff --git a/assets/css/custom.css b/assets/css/custom.css
new file mode 100644
index 0000000..9d9d9d0
--- /dev/null
+++ b/assets/css/custom.css
@@ -0,0 +1,167 @@
+/* General Body Styles */
+body {
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
+ background-color: #1C1C1E; /* Dark Mode Background */
+ color: #F5F5F7; /* Dark Mode Text */
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+/* Sidebar Navigation */
+.sidebar {
+ position: fixed;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ width: 260px;
+ background-color: #2C2C2E; /* Dark Mode Surface */
+ border-right: 1px solid #3A3A3C;
+ padding: 1.5rem;
+ display: flex;
+ flex-direction: column;
+}
+
+.sidebar .logo {
+ font-size: 1.5rem;
+ font-weight: 700;
+ color: #FFFFFF;
+ margin-bottom: 2rem;
+ text-align: center;
+}
+
+.sidebar .nav-link {
+ color: #E5E5EA;
+ font-size: 1rem;
+ font-weight: 500;
+ padding: 0.75rem 1rem;
+ border-radius: 8px;
+ margin-bottom: 0.5rem;
+ transition: background-color 0.2s ease, color 0.2s ease;
+}
+
+.sidebar .nav-link:hover, .sidebar .nav-link.active {
+ background-color: #0A84FF;
+ color: #FFFFFF;
+}
+
+/* Main Content Area */
+.main-content {
+ margin-left: 260px;
+ padding: 2rem;
+}
+
+/* Header */
+.header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 2rem;
+}
+
+.header h1 {
+ font-size: 2rem;
+ font-weight: 700;
+}
+
+/* Buttons */
+.btn-primary {
+ background-color: #0A84FF;
+ border-color: #0A84FF;
+ border-radius: 8px;
+ font-weight: 600;
+ padding: 0.75rem 1.5rem;
+ transition: background-color 0.2s ease, border-color 0.2s ease;
+}
+
+.btn-primary:hover {
+ background-color: #007BFF;
+ border-color: #007BFF;
+}
+
+/* Cards */
+.card {
+ background-color: #2C2C2E; /* Dark Mode Surface */
+ border: 1px solid #3A3A3C;
+ border-radius: 12px;
+ margin-bottom: 1.5rem;
+}
+
+.card-header {
+ background-color: transparent;
+ border-bottom: 1px solid #3A3A3C;
+ font-weight: 600;
+ padding: 1rem 1.5rem;
+}
+
+.card-body {
+ padding: 1.5rem;
+}
+
+/* Empty State */
+.empty-state {
+ text-align: center;
+ padding: 4rem 2rem;
+ color: #8E8E93;
+}
+
+.empty-state h5 {
+ font-weight: 600;
+ color: #E5E5EA;
+}
+
+/* KPI Cards */
+.kpi-card .card-body {
+ padding: 1.25rem;
+}
+
+.kpi-icon {
+ width: 48px;
+ height: 48px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 12px;
+ font-size: 1.5rem;
+}
+
+.kpi-value {
+ font-size: 2rem;
+ font-weight: 700;
+ color: #FFFFFF;
+ margin-bottom: 0;
+}
+
+.kpi-title {
+ font-size: 0.9rem;
+ color: #8E8E93;
+ font-weight: 500;
+}
+
+/* Soft Background Colors */
+.bg-primary-soft { background-color: rgba(10, 132, 255, 0.15); color: #0A84FF; }
+.bg-warning-soft { background-color: rgba(255, 204, 0, 0.15); color: #FFCC00; }
+.bg-success-soft { background-color: rgba(52, 199, 89, 0.15); color: #34C759; }
+.bg-danger-soft { background-color: rgba(255, 59, 48, 0.15); color: #FF3B30; }
+.bg-info-soft { background-color: rgba(13, 202, 240, 0.15); color: #0dcaf0; }
+
+
+/* Text Colors for Badges */
+.text-primary { color: #0A84FF !important; }
+.text-warning { color: #FFCC00 !important; }
+.text-success { color: #34C759 !important; }
+.text-danger { color: #FF3B30 !important; }
+.text-info { color: #0dcaf0 !important; }
+
+
+/* List Group Customization */
+.list-group-item {
+ background-color: transparent;
+ border-color: #3A3A3C;
+ padding: 1rem 0;
+}
+.list-group-flush > .list-group-item:last-child {
+ border-bottom-width: 0;
+}
+.list-group-item:first-child {
+ padding-top: 0;
+}
\ No newline at end of file
diff --git a/assets/js/main.js b/assets/js/main.js
new file mode 100644
index 0000000..6130445
--- /dev/null
+++ b/assets/js/main.js
@@ -0,0 +1 @@
+// Custom JavaScript will go here
diff --git a/db/001_create_work_orders.sql b/db/001_create_work_orders.sql
new file mode 100644
index 0000000..3bdbc6d
--- /dev/null
+++ b/db/001_create_work_orders.sql
@@ -0,0 +1,19 @@
+CREATE TABLE IF NOT EXISTS `work_orders` (
+ `id` INT AUTO_INCREMENT PRIMARY KEY,
+ `customer_name` VARCHAR(255) NOT NULL,
+ `job_type` VARCHAR(255) NOT NULL,
+ `status` VARCHAR(50) NOT NULL,
+ `address` VARCHAR(255) NOT NULL,
+ `technician` VARCHAR(255) NULL,
+ `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- Seed data
+TRUNCATE TABLE `work_orders`;
+INSERT INTO `work_orders` (`customer_name`, `job_type`, `status`, `address`, `technician`) VALUES
+('John Doe', 'HVAC Repair', 'In Progress', '123 Main St, Anytown, USA', 'Mike R.'),
+('Jane Smith', 'Plumbing', 'In Progress', '456 Oak Ave, Anytown, USA', 'Sarah J.'),
+('ACME Corp', 'Network Install', 'Pending Dispatch', '789 Pine Ln, Anytown, USA', NULL),
+('Big Biz Inc.', 'Server Maintenance', 'Pending Dispatch', '101 Maple Dr, Anytown, USA', NULL),
+('Sam Wilson', 'Generator Check', 'Completed', '212 Birch Rd, Anytown, USA', 'Mike R.');
diff --git a/db/migrate.php b/db/migrate.php
new file mode 100644
index 0000000..453a713
--- /dev/null
+++ b/db/migrate.php
@@ -0,0 +1,12 @@
+exec($sql);
+ echo "Database migration and seeding completed successfully.\n";
+} catch (PDOException $e) {
+ die("Database migration failed: " . $e->getMessage() . "\n");
+}
+
diff --git a/includes/functions.php b/includes/functions.php
new file mode 100644
index 0000000..064adcc
--- /dev/null
+++ b/includes/functions.php
@@ -0,0 +1,32 @@
+prepare("SELECT * FROM work_orders WHERE status = ? ORDER BY created_at DESC");
+ $stmt->execute([$status]);
+ return $stmt->fetchAll();
+}
+
+function get_all_work_orders() {
+ $pdo = db();
+ $stmt = $pdo->query("SELECT * FROM work_orders ORDER BY created_at DESC");
+ return $stmt->fetchAll();
+}
+
+function get_kpis($work_orders) {
+ $total_jobs = count($work_orders);
+ $completed_jobs = 0;
+ foreach ($work_orders as $order) {
+ if ($order['status'] === 'Completed') {
+ $completed_jobs++;
+ }
+ }
+ $completion_rate = $total_jobs > 0 ? ($completed_jobs / $total_jobs) * 100 : 0;
+
+ return [
+ 'total_jobs' => $total_jobs,
+ 'completion_rate' => round($completion_rate),
+ 'revenue' => '12,345' // Static for now
+ ];
+}
diff --git a/index.php b/index.php
index 7205f3d..2ead38d 100644
--- a/index.php
+++ b/index.php
@@ -1,150 +1,191 @@
-
-
+
-
-
- New Style
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ RedSolutions CRM
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
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) ?>
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Active Jobs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Pending Dispatch
+
+
+
+
+
+
+
+
+
+
+
+
+
+
%
+ Completed Rate
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Total Jobs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - No jobs pending dispatch.
+
+
+ -
+
+
WO-:
+ Customer:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+