-
-
+
+ -
+
+
تعهد به کیفیت
استفاده از بهترین مواد اولیه و کنترل کیفی دقیق در تمام مراحل تولید.
-
-
-
-
+
+
+
+
هنر دست
تمام محصولات ما با عشق و دقت توسط هنرمندان ماهر ساخته میشوند.
-
-
-
-
+
+
+
+
طراحی ماندگار
خلق آثاری مدرن و در عین حال کلاسیک که هیچگاه از مد نمیافتند.
-
-
+
+
diff --git a/admin/api.php b/admin/api.php
index f6e2f0e8..c58a5666 100644
--- a/admin/api.php
+++ b/admin/api.php
@@ -132,5 +132,120 @@ if ($action === 'get_stats') {
exit;
}
+if ($action === 'get_reports_data') {
+ try {
+ // 1. General Stats
+ $stats_query = "
+ SELECT
+ (SELECT SUM(total_amount) FROM orders WHERE status = 'Delivered') as total_revenue,
+ (SELECT COUNT(*) FROM orders) as total_orders,
+ (SELECT COUNT(*) FROM users WHERE is_admin = 0) as total_users,
+ (SELECT COUNT(*) FROM products) as total_products
+ ";
+ $stats_stmt = $pdo->query($stats_query);
+ $stats = $stats_stmt->fetch(PDO::FETCH_ASSOC);
+
+ // 2. Recent Orders
+ $recent_orders_query = "
+ SELECT o.id, o.total_amount, o.status, COALESCE(CONCAT(u.first_name, ' ', u.last_name), o.billing_name) AS customer_display_name
+ FROM orders o
+ LEFT JOIN users u ON o.user_id = u.id
+ ORDER BY o.created_at DESC
+ LIMIT 5
+ ";
+ $recent_orders_stmt = $pdo->query($recent_orders_query);
+ $recent_orders = $recent_orders_stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ // 3. Top Selling Products (Calculated in PHP)
+ $orders_for_products_query = "SELECT items_json FROM orders WHERE status = 'Delivered'";
+ $orders_for_products_stmt = $pdo->query($orders_for_products_query);
+ $all_orders_items = $orders_for_products_stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ $product_sales = [];
+ foreach ($all_orders_items as $order_items) {
+ $items = json_decode($order_items['items_json'], true);
+ if (is_array($items)) {
+ foreach ($items as $item) {
+ if (isset($item['name']) && isset($item['quantity'])) {
+ $product_name = $item['name'];
+ $quantity = (int)$item['quantity'];
+ if (!isset($product_sales[$product_name])) {
+ $product_sales[$product_name] = 0;
+ }
+ $product_sales[$product_name] += $quantity;
+ }
+ }
+ }
+ }
+
+ arsort($product_sales);
+ $top_products = [];
+ $count = 0;
+ foreach ($product_sales as $name => $total_sold) {
+ $top_products[] = ['name' => $name, 'total_sold' => $total_sold];
+ $count++;
+ if ($count >= 5) break;
+ }
+
+ echo json_encode([
+ 'stats' => [
+ 'total_revenue' => (float)($stats['total_revenue'] ?? 0),
+ 'total_orders' => (int)($stats['total_orders'] ?? 0),
+ 'total_users' => (int)($stats['total_users'] ?? 0),
+ 'total_products' => (int)($stats['total_products'] ?? 0),
+ ],
+ 'recent_orders' => $recent_orders,
+ 'top_products' => $top_products
+ ]);
+
+ } catch (PDOException $e) {
+ http_response_code(500);
+ error_log("API Error (get_reports_data): " . $e->getMessage());
+ echo json_encode(['error' => 'Database error while fetching report data.']);
+ }
+ exit;
+}
+
+if ($action === 'get_monthly_sales') {
+ require_once __DIR__ . '/../includes/jdf.php';
+ try {
+ $stmt = $pdo->prepare("
+ SELECT
+ YEAR(created_at) as year,
+ MONTH(created_at) as month,
+ SUM(total_amount) as total_sales
+ FROM orders
+ WHERE status = 'Delivered'
+ GROUP BY year, month
+ ORDER BY year ASC, month ASC
+ ");
+ $stmt->execute();
+ $sales_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ $labels = [];
+ $values = [];
+ $jalali_months = [
+ 1 => 'فروردین', 2 => 'اردیبهشت', 3 => 'خرداد',
+ 4 => 'تیر', 5 => 'مرداد', 6 => 'شهریور',
+ 7 => 'مهر', 8 => 'آبان', 9 => 'آذر',
+ 10 => 'دی', 11 => 'بهمن', 12 => 'اسفند'
+ ];
+
+ foreach ($sales_data as $row) {
+ $jalali_date = gregorian_to_jalali($row['year'], $row['month'], 1);
+ $labels[] = $jalali_months[(int)$jalali_date[1]] . ' ' . $jalali_date[0];
+ $values[] = (float)$row['total_sales'];
+ }
+
+ echo json_encode(['labels' => $labels, 'values' => $values]);
+
+ } catch (PDOException $e) {
+ http_response_code(500);
+ error_log("API Error (get_monthly_sales): " . $e->getMessage());
+ echo json_encode(['error' => 'Database error while fetching monthly sales.']);
+ }
+ exit;
+}
+
http_response_code(400);
echo json_encode(['error' => 'Invalid action']);
diff --git a/admin/assets/css/admin_main.css b/admin/assets/css/admin_main.css
deleted file mode 100644
index 8227edfd..00000000
--- a/admin/assets/css/admin_main.css
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * Admin Panel Main Stylesheet
- * A clean, modern, and professional light theme.
- */
-
-@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&display=swap');
-@import url('https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.css');
-
-:root {
- --admin-bg-light: #f4f7f9; /* Light gray background */
- --admin-surface-light: #ffffff; /* White surface for cards, sidebar */
- --admin-border-light: #e0e5ec; /* Soft border color */
- --admin-text-primary: #2d3748; /* Dark text for high contrast */
- --admin-text-secondary: #718096; /* Lighter text for muted info */
- --admin-primary: #4a5568; /* A neutral, professional primary color */
- --admin-primary-active: #2d3748;
- --admin-success: #38a169;
- --admin-danger: #e53e3e;
- --admin-warning: #dd6b20;
- --admin-info: #3182ce;
-}
-
-body.admin-theme {
- background-color: var(--admin-bg-light);
- color: var(--admin-text-primary);
- font-family: 'Vazirmatn', sans-serif;
- line-height: 1.6;
- margin: 0;
- padding: 0;
- display: flex;
- min-height: 100vh;
-}
-
-.admin-wrapper {
- display: flex;
- width: 100%;
-}
-
-/* --- Sidebar / Navigation --- */
-.admin-sidebar {
- width: 250px;
- background-color: var(--admin-surface-light);
- border-right: 1px solid var(--admin-border-light);
- padding: 1.5rem 0;
- display: flex;
- flex-direction: column;
- transition: width 0.3s ease;
- box-shadow: 0 0 20px rgba(0,0,0,0.03);
-}
-
-.sidebar-header {
- padding: 0 1.5rem 1.5rem 1.5rem;
- text-align: center;
- border-bottom: 1px solid var(--admin-border-light);
-}
-
-.sidebar-header h2 a {
- color: var(--admin-text-primary);
- text-decoration: none;
- font-size: 1.5rem;
- font-weight: 700;
-}
-
-.sidebar-header h2 a span {
- color: var(--admin-primary-active);
-}
-
-.admin-nav {
- flex-grow: 1;
- list-style: none;
- padding: 1.5rem 0 0 0;
- margin: 0;
-}
-
-.admin-nav-item {
- margin: 0 1rem;
-}
-
-.admin-nav-link {
- display: flex;
- align-items: center;
- gap: 0.9rem;
- padding: 0.8rem 1rem;
- color: var(--admin-text-secondary);
- text-decoration: none;
- font-weight: 600;
- font-size: 0.9rem;
- border-radius: 8px;
- transition: all 0.3s ease;
-}
-
-.admin-nav-link i {
- font-size: 1.2rem;
- width: 20px;
- text-align: center;
-}
-
-.admin-nav-link:hover {
- background-color: var(--admin-bg-light);
- color: var(--admin-primary-active);
-}
-
-.admin-nav-link.active {
- background-color: var(--admin-primary);
- color: #ffffff;
- font-weight: 700;
-}
-
-.admin-nav-link.active:hover {
- color: #ffffff;
- background-color: var(--admin-primary-active);
-}
-.admin-nav-link.active i {
- color: #ffffff;
-}
-
-.sidebar-footer {
- padding: 1.5rem;
- text-align: center;
- border-top: 1px solid var(--admin-border-light);
-}
-
-.sidebar-footer a {
- color: var(--admin-text-secondary);
- text-decoration: none;
- font-size: 0.9rem;
-}
-.sidebar-footer a:hover {
- color: var(--admin-primary-active);
-}
-
-/* --- Main Content --- */
-.admin-main-content {
- flex-grow: 1;
- padding: 2rem;
- overflow-y: auto;
-}
-
-.admin-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 2rem;
-}
-
-.admin-header h1 {
- margin: 0;
- font-size: 1.8rem;
- font-weight: 700;
-}
-
-/* --- General Components --- */
-.card {
- background-color: var(--admin-surface-light);
- border: 1px solid var(--admin-border-light);
- border-radius: 12px;
- margin-bottom: 2rem;
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
-}
-
-.card-header {
- padding: 1rem 1.5rem;
- border-bottom: 1px solid var(--admin-border-light);
- font-size: 1.1rem;
- font-weight: 600;
-}
-
-.card-body {
- padding: 1.5rem;
-}
-
-.table {
- width: 100%;
- border-collapse: collapse;
-}
-
-.table th, .table td {
- padding: 1rem 1.2rem;
- text-align: right;
- border-bottom: 1px solid var(--admin-border-light);
-}
-
-.table th {
- font-weight: 700;
- color: var(--admin-text-secondary);
- font-size: 0.8rem;
- text-transform: uppercase;
- letter-spacing: 0.5px;
-}
-
-.table tbody tr:last-child td {
- border-bottom: none;
-}
-
-.table tbody tr:hover {
- background-color: var(--admin-bg-light);
-}
-
-.btn {
- padding: 0.6rem 1.2rem;
- border-radius: 8px;
- text-decoration: none;
- font-weight: 600;
- transition: all 0.3s ease;
- border: 1px solid transparent;
- cursor: pointer;
- display: inline-flex;
- align-items: center;
- gap: 0.5rem;
-}
-
-.btn-primary {
- background-color: var(--admin-primary-active);
- border-color: var(--admin-primary-active);
- color: #fff;
-}
-.btn-primary:hover {
- background-color: #2c3e50; /* Slightly darker */
-}
-
-.btn-danger {
- background-color: var(--admin-danger);
- color: #fff;
-}
-
-/* --- Stat Cards --- */
-.stat-card {
- background-color: var(--admin-surface-light);
- border-radius: 12px;
- padding: 1.5rem;
- display: flex;
- align-items: center;
- gap: 1.5rem;
- border: 1px solid var(--admin-border-light);
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
-}
-
-.stat-card .icon {
- font-size: 1.8rem;
- padding: 1rem;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #fff;
-}
-
-.stat-card .stat-info p {
- margin: 0;
- font-size: 0.9rem;
- color: var(--admin-text-secondary);
-}
-
-.stat-card .stat-info h3 {
- margin: 0;
- font-size: 2rem;
- font-weight: 700;
-}
-
-.icon.bg-success { background-color: var(--admin-success); }
-.icon.bg-danger { background-color: var(--admin-danger); }
-.icon.bg-warning { background-color: var(--admin-warning); }
-.icon.bg-info { background-color: var(--admin-info); }
-
-
-/* --- Chart Container --- */
-.chart-container {
- background-color: var(--admin-surface-light);
- padding: 2rem;
- border-radius: 12px;
- border: 1px solid var(--admin-border-light);
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
-}
-
-.chart-container h5 {
- font-weight: 700;
- margin-bottom: 1.5rem;
- font-size: 1.2rem;
-}
-
-/* --- Form styles --- */
-.form-group {
- margin-bottom: 1.5rem;
-}
-
-.form-label {
- display: block;
- margin-bottom: 0.5rem;
- font-weight: 600;
- color: var(--admin-text-primary);
-}
-
-.form-control {
- width: 100%;
- padding: 0.8rem 1rem;
- background-color: var(--admin-surface-light);
- border: 1px solid var(--admin-border-light);
- color: var(--admin-text-primary);
- border-radius: 8px;
- box-sizing: border-box;
- transition: border-color 0.3s ease, box-shadow 0.3s ease;
-}
-
-.form-control:focus {
- outline: none;
- border-color: var(--admin-primary);
- box-shadow: 0 0 0 3px rgba(74, 85, 104, 0.1);
-}
-
-textarea.form-control {
- min-height: 120px;
- resize: vertical;
-}
-
-/* Admin Login Page */
-.admin-login-wrapper {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- min-height: 100vh;
- background-color: var(--admin-bg-light);
-}
-
-.admin-login-box {
- width: 100%;
- max-width: 400px;
- padding: 3rem;
- background: var(--admin-surface-light);
- border-radius: 12px;
- box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
-}
-
-.admin-login-box h2 {
- font-weight: 700;
- text-align: center;
- margin-bottom: 0.5rem;
-}
-
-.admin-login-box p {
- text-align: center;
- color: var(--admin-text-secondary);
- margin-bottom: 2rem;
-}
-
-/* Responsive adjustments will be added later if needed */
-
diff --git a/admin/assets/css/admin_style.css b/admin/assets/css/admin_style.css
index 8121f4ee..846bd302 100644
--- a/admin/assets/css/admin_style.css
+++ b/admin/assets/css/admin_style.css
@@ -1,348 +1,331 @@
-@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;600;700&display=swap');
-@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');
+/*
+ * Admin Panel Luxury Redesign
+ * This file centralizes all styles for the admin panel.
+ */
+/* --- Variable Imports & Overrides ---
+We can re-use variables from the main theme.css. Let's define some admin-specific ones.
+*/
:root {
- --admin-bg: #111214;
- --admin-surface: #1a1b1e;
- --admin-text: #eceff1;
- --admin-text-muted: #90a4ae;
- --admin-primary: #c09f80; /* Soft gold from luxury theme */
- --admin-border: #37474f;
- --admin-success: #4caf50;
- --admin-danger: #f44336;
- --admin-warning: #ff9800;
- --admin-info: #2196f3;
+ --admin-bg: #111111; /* Deep Dark */
+ --admin-surface: #1a1a1a; /* Slightly lighter surface */
+ --admin-card-bg: #242424; /* Card background */
+ --admin-border: #333333;
+ --admin-text: #E0E0E0;
+ --admin-text-muted: #888;
+ --admin-gold: #e5b56e;
+ --admin-blue: #4a90e2;
+ --admin-success: #50e3c2;
+ --admin-danger: #e35050;
+ --admin-warning: #f5a623;
+ --admin-info: #4a90e2;
+ --sidebar-width: 260px;
+ --sidebar-width-collapsed: 80px;
}
-body.admin-dark-theme {
+body.admin-body {
background-color: var(--admin-bg);
color: var(--admin-text);
font-family: 'Vazirmatn', sans-serif;
- line-height: 1.6;
- margin: 0;
- padding: 0;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+/* --- Main Layout --- */
+.admin-wrapper {
display: flex;
min-height: 100vh;
}
-.admin-wrapper {
- display: flex;
- width: 100%;
-}
-
-/* --- Sidebar / Navigation --- */
.admin-sidebar {
- width: 260px;
+ width: var(--sidebar-width);
background-color: var(--admin-surface);
- border-right: 1px solid var(--admin-border);
- padding: 1.5rem 0;
+ border-left: 1px solid var(--admin-border);
display: flex;
flex-direction: column;
transition: width 0.3s ease;
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 1000;
}
+.admin-main-content {
+ flex-grow: 1;
+ padding: 2rem;
+ margin-right: var(--sidebar-width);
+ transition: margin-right 0.3s ease;
+ background-color: var(--admin-bg);
+}
+
+/* Sidebar Header */
.sidebar-header {
- padding: 0 1.5rem 1.5rem 1.5rem;
+ padding: 1.5rem;
text-align: center;
border-bottom: 1px solid var(--admin-border);
}
-
.sidebar-header h2 a {
- color: var(--admin-text);
- text-decoration: none;
- font-size: 1.5rem;
+ color: var(--admin-gold);
font-weight: 700;
+ text-decoration: none;
+ font-size: 1.8rem;
+}
+.sidebar-header h2 span {
+ color: var(--admin-text);
}
-.sidebar-header h2 a span {
- color: var(--admin-primary);
-}
-
+/* Sidebar Navigation */
.admin-nav {
- flex-grow: 1;
+ padding: 1rem 0;
list-style: none;
- padding: 1.5rem 0 0 0;
- margin: 0;
-}
-
-.admin-nav-item {
- margin: 0;
+ flex-grow: 1;
}
.admin-nav-link {
display: flex;
align-items: center;
- gap: 0.8rem;
- padding: 0.9rem 1.5rem;
+ padding: 1rem 1.5rem;
color: var(--admin-text-muted);
text-decoration: none;
- font-weight: 600;
- font-size: 0.95rem;
- border-left: 4px solid transparent;
transition: all 0.3s ease;
+ font-weight: 500;
+ border-right: 4px solid transparent;
}
.admin-nav-link i {
- font-size: 1.1rem;
- width: 20px;
+ font-size: 1.2rem;
+ width: 30px;
text-align: center;
+ margin-left: 0.8rem;
}
.admin-nav-link:hover {
background-color: var(--admin-bg);
- color: var(--admin-primary);
- border-left-color: var(--admin-primary);
+ color: var(--admin-gold);
}
.admin-nav-link.active {
- background-color: var(--admin-bg);
- color: var(--admin-text);
- border-left-color: var(--admin-primary);
+ color: var(--admin-gold);
font-weight: 700;
+ background-color: var(--admin-bg);
+ border-right-color: var(--admin-gold);
}
+/* Sidebar Footer */
.sidebar-footer {
padding: 1.5rem;
- text-align: center;
border-top: 1px solid var(--admin-border);
}
-
.sidebar-footer a {
+ display: block;
color: var(--admin-text-muted);
text-decoration: none;
- font-size: 0.9rem;
+ margin-bottom: 0.5rem;
+ transition: color 0.3s ease;
}
.sidebar-footer a:hover {
- color: var(--admin-primary);
+ color: var(--admin-gold);
}
-/* --- Main Content --- */
-.admin-main-content {
- flex-grow: 1;
- padding: 2rem;
- overflow-y: auto;
-}
-
-.admin-header {
+/* --- Header Bar --- */
+.admin-header-bar {
display: flex;
justify-content: space-between;
align-items: center;
- margin-bottom: 2rem;
-}
-
-.admin-header h1 {
- margin: 0;
- font-size: 2rem;
- font-weight: 700;
-}
-
-/* --- General Components --- */
-.card {
+ padding: 1rem 2rem;
background-color: var(--admin-surface);
- border: 1px solid var(--admin-border);
- border-radius: 12px;
+ border-bottom: 1px solid var(--admin-border);
+ position: sticky;
+ top: 0;
+ z-index: 999;
margin-bottom: 2rem;
}
-.card-header {
- padding: 1rem 1.5rem;
- border-bottom: 1px solid var(--admin-border);
- font-size: 1.1rem;
- font-weight: 600;
-}
-
-.card-body {
- padding: 1.5rem;
-}
-
-.table {
- width: 100%;
- border-collapse: collapse;
-}
-
-.table th, .table td {
- padding: 1rem;
- text-align: right;
- border-bottom: 1px solid var(--admin-border);
-}
-
-.table th {
- font-weight: 700;
- color: var(--admin-text-muted);
- font-size: 0.9rem;
- text-transform: uppercase;
-}
-
-.table tbody tr:last-child td {
- border-bottom: none;
-}
-
-.table tbody tr:hover {
- background-color: var(--admin-bg);
-}
-
-.btn {
- padding: 0.6rem 1.2rem;
- border-radius: 8px;
- text-decoration: none;
- font-weight: 600;
- transition: all 0.3s ease;
+#sidebar-toggle {
+ background: none;
border: none;
+ color: var(--admin-text);
+ font-size: 1.5rem;
cursor: pointer;
}
-.btn-primary {
- background-color: var(--admin-primary);
- color: var(--admin-bg);
-}
-.btn-primary:hover {
- opacity: 0.9;
-}
-
-.btn-danger {
- background-color: var(--admin-danger);
+.admin-header-title h1 {
+ font-size: 1.5rem;
+ margin: 0;
color: var(--admin-text);
}
-/* --- Stat Cards (from dashboard) --- */
-.stat-card {
- background-color: var(--admin-surface);
- border-radius: 12px;
- padding: 1.5rem;
- display: flex;
- align-items: center;
- gap: 1.5rem;
+
+/* --- Main Content Styling --- */
+
+/* Cards */
+.card {
+ background-color: var(--admin-card-bg);
border: 1px solid var(--admin-border);
- transition: transform 0.3s ease, box-shadow 0.3s ease;
+ border-radius: 12px;
+ box-shadow: 0 4px 20px rgba(0,0,0,0.2);
+}
+.card-header {
+ background-color: rgba(0,0,0,0.2);
+ border-bottom: 1px solid var(--admin-border);
+ font-weight: 600;
+ color: var(--admin-text);
}
+/* Stat Cards on Dashboard */
+.stat-cards-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
+ gap: 1.5rem;
+ margin-bottom: 2rem;
+}
+
+.stat-card {
+ display: flex;
+ align-items: center;
+ padding: 1.5rem;
+ background-color: var(--admin-card-bg);
+ border-radius: 12px;
+ border: 1px solid var(--admin-border);
+ transition: transform 0.3s, box-shadow 0.3s;
+}
.stat-card:hover {
transform: translateY(-5px);
- box-shadow: 0 5px 15px rgba(0,0,0,0.2);
+ box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.stat-card .icon {
font-size: 2rem;
padding: 1rem;
border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- color: var(--admin-text);
+ margin-left: 1rem;
+ color: #fff;
}
+.stat-card .icon.bg-primary { background-color: var(--admin-blue); }
+.stat-card .icon.bg-warning { background-color: var(--admin-warning); }
+.stat-card .icon.bg-success { background-color: var(--admin-success); }
+.stat-card .icon.bg-danger { background-color: var(--admin-danger); }
+
.stat-card .stat-info p {
margin: 0;
- font-size: 0.9rem;
color: var(--admin-text-muted);
}
-
.stat-card .stat-info h3 {
margin: 0;
font-size: 2rem;
font-weight: 700;
+ color: var(--admin-text);
}
-.icon.bg-success { background-color: var(--admin-success); }
-.icon.bg-danger { background-color: var(--admin-danger); }
-.icon.bg-warning { background-color: var(--admin-warning); }
-.icon.bg-info { background-color: var(--admin-info); }
-.icon.bg-primary { background-color: var(--admin-primary); }
-
-
-/* --- Chart Container --- */
-.chart-container {
- background-color: var(--admin-surface);
- padding: 2rem;
- border-radius: 12px;
- border: 1px solid var(--admin-border);
+/* Tables */
+.table {
+ border-color: var(--admin-border);
}
-
-.chart-container h5 {
- font-weight: 700;
- margin-bottom: 1.5rem;
- font-size: 1.2rem;
-}
-
-/* --- Form styles --- */
-.form-group {
- margin-bottom: 1.5rem;
-}
-
-.form-label {
- display: block;
- margin-bottom: 0.5rem;
+.table th {
+ color: var(--admin-gold);
font-weight: 600;
- color: var(--admin-text-muted);
+ border-bottom-width: 2px;
+ border-color: var(--admin-border) !important;
+}
+.table td {
+ color: var(--admin-text);
+ vertical-align: middle;
+}
+.table-hover tbody tr:hover {
+ background-color: var(--admin-surface);
+ color: var(--admin-text);
}
-.form-control {
- width: 100%;
- padding: 0.8rem 1rem;
- background-color: var(--admin-bg);
- border: 1px solid var(--admin-border);
+/* Status Badges */
+.status-badge {
+ padding: 0.4em 0.8em;
+ border-radius: 8px;
+ font-size: 0.85rem;
+ font-weight: 600;
+ color: #111;
+}
+.status-processing, .status-badge.bg-info { background-color: var(--admin-info); }
+.status-shipped, .status-badge.bg-warning { background-color: var(--admin-warning); }
+.status-completed, .status-badge.bg-success { background-color: var(--admin-success); }
+.status-cancelled, .status-badge.bg-danger { background-color: var(--admin-danger); }
+.status-pending, .status-badge.bg-secondary { background-color: var(--admin-text-muted); color: #fff; }
+
+
+/* Forms */
+.form-control, .form-select {
+ background-color: var(--admin-surface);
+ border-color: var(--admin-border);
color: var(--admin-text);
border-radius: 8px;
- box-sizing: border-box;
+}
+.form-control:focus, .form-select:focus {
+ background-color: var(--admin-surface);
+ border-color: var(--admin-gold);
+ color: var(--admin-text);
+ box-shadow: 0 0 0 0.2rem rgba(229, 181, 110, 0.2);
}
-.form-control:focus {
- outline: none;
- border-color: var(--admin-primary);
- box-shadow: 0 0 0 2px rgba(192, 159, 128, 0.2);
+.btn-primary {
+ background-color: var(--admin-gold);
+ border-color: var(--admin-gold);
+ color: #111;
+ font-weight: 600;
+}
+.btn-primary:hover {
+ background-color: #d4a55a;
+ border-color: #d4a55a;
}
-textarea.form-control {
- min-height: 120px;
- resize: vertical;
-}
+/* --- Responsive & Collapsed State --- */
-/* Responsive */
@media (max-width: 992px) {
.admin-sidebar {
- width: 70px;
+ position: fixed;
+ top: 0;
+ right: -100%;
+ height: 100vh;
+ z-index: 1050; /* Above bootstrap backdrop */
+ transition: right 0.4s ease;
}
- .sidebar-header h2 {
+ .admin-sidebar.open {
+ right: 0;
+ }
+ .admin-main-content {
+ margin-right: 0;
+ }
+ .sidebar-backdrop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: rgba(0,0,0,0.5);
+ z-index: 1040;
display: none;
}
- .admin-nav-link {
- justify-content: center;
- }
- .admin-nav-link span {
- display: none;
+ .sidebar-backdrop.show {
+ display: block;
}
}
-@media (max-width: 768px) {
- .admin-wrapper {
- flex-direction: column;
+
+@media (min-width: 993px) {
+ .admin-wrapper.sidebar-collapsed .admin-sidebar {
+ width: var(--sidebar-width-collapsed);
}
- .admin-sidebar {
- width: 100%;
- height: auto;
- border-right: none;
- border-bottom: 1px solid var(--admin-border);
- flex-direction: row;
- align-items: center;
- padding: 0;
+ .admin-wrapper.sidebar-collapsed .admin-main-content {
+ margin-right: var(--sidebar-width-collapsed);
}
- .sidebar-header {
+ .admin-wrapper.sidebar-collapsed .admin-sidebar .sidebar-header h2 a {
+ font-size: 1.5rem;
+ }
+ .admin-wrapper.sidebar-collapsed .admin-sidebar .sidebar-header h2 span,
+ .admin-wrapper.sidebar-collapsed .admin-sidebar .admin-nav-link span,
+ .admin-wrapper.sidebar-collapsed .admin-sidebar .sidebar-footer {
display: none;
}
- .admin-nav {
- display: flex;
- justify-content: space-around;
- flex-grow: 1;
- padding: 0;
+ .admin-wrapper.sidebar-collapsed .admin-sidebar .admin-nav-link {
+ justify-content: center;
}
- .admin-nav-link {
- border-left: none;
- border-bottom: 4px solid transparent;
- }
- .admin-nav-link:hover, .admin-nav-link.active {
- border-left-color: transparent;
- border-bottom-color: var(--admin-primary);
- }
- .sidebar-footer {
- display: none;
- }
-}
\ No newline at end of file
+}
diff --git a/admin/dashboard.php b/admin/dashboard.php
index fb340499..3101f34e 100644
--- a/admin/dashboard.php
+++ b/admin/dashboard.php
@@ -3,111 +3,88 @@ $page_title = 'داشبورد';
require_once __DIR__ . '/header.php';
?>
-
-
-
-
+
+
+
+
+
گزارشات فروش
+
+
+
مجموع فروش (تکمیل شده)
+
...
+
+
+
+
سفارشات در حال پردازش
+
...
+
+
-
-
-
-
-
-
مجموع فروش (تحویل شده)
-
...
+
+
نمودار فروش ماهانه (سفارشات تحویل شده)
+
+
+
-
-
-
-
-
سفارشات در حال ارسال
-
...
-
-
-
-
-
-
سفارشات لغو شده
-
...
-
-
-
-
-
-
سفارشات در حال پردازش
-
...
-
-
-
-
-
-
کل بازدید صفحات
-
...
-
+
+
تنظیمات
+
این بخش برای تنظیمات آینده در نظر گرفته شده است.
-
-
-
-
نمودار فروش ماهانه (سفارشات تحویل شده)
-