-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient_dashboard.php
More file actions
622 lines (573 loc) · 33.5 KB
/
client_dashboard.php
File metadata and controls
622 lines (573 loc) · 33.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
<?php
// client_dashboard.php - Client Dashboard with Diamond Grid
require_once 'auth_check.php';
require_client(); // Only clients can access this page
// Get client info
$client_id = get_user_id();
$client_name = get_user_name();
// Search and filter logic
$search_term = isset($_GET['search']) ? trim($_GET['search']) : '';
$shape_filter = isset($_GET['shape']) ? trim($_GET['shape']) : '';
$status_filter = isset($_GET['status']) ? trim($_GET['status']) : 'Available';
// Build query
$sql = "SELECT * FROM diamonds WHERE 1=1";
$params = [];
$types = "";
if (!empty($search_term)) {
$sql .= " AND (stock_no LIKE ? OR color LIKE ? OR clarity LIKE ?)";
$search_like = "%" . $search_term . "%";
$params[] = $search_like;
$params[] = $search_like;
$params[] = $search_like;
$types .= "sss";
}
if (!empty($shape_filter)) {
$sql .= " AND shape = ?";
$params[] = $shape_filter;
$types .= "s";
}
if (!empty($status_filter)) {
$sql .= " AND status = ?";
$params[] = $status_filter;
$types .= "s";
}
$sql .= " ORDER BY id DESC";
if (!empty($params)) {
$stmt = $conn->prepare($sql);
if ($stmt === false) {
die("SQL Error: " . $conn->error);
}
$stmt->bind_param($types, ...$params);
$stmt->execute();
$result = $stmt->get_result();
} else {
$result = $conn->query($sql);
if ($result === false) {
die("SQL Error: " . $conn->error);
}
}
// Get unique shapes for filter dropdown
$shapes_result = $conn->query("SELECT DISTINCT shape FROM diamonds WHERE shape IS NOT NULL ORDER BY shape");
$shapes = [];
if ($shapes_result) {
while ($row = $shapes_result->fetch_assoc()) {
$shapes[] = $row['shape'];
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Client Dashboard - DS Diamonds</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
<style>
body {
font-family: 'Inter', sans-serif;
}
.diamond-card {
transition: all 0.3s ease;
}
.diamond-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.sidebar {
width: 260px;
}
.main-content {
margin-left: 260px;
}
.gradient-bg {
background: linear-gradient(135deg, #7b2ff7, #f83077);
}
</style>
</head>
<body class="bg-gray-50" x-data="{
showModal: false,
selectedDiamond: null,
openModal(diamond) {
this.selectedDiamond = diamond;
this.showModal = true;
document.body.style.overflow = 'hidden';
},
closeModal() {
this.showModal = false;
document.body.style.overflow = 'auto';
}
}">
<div class="flex">
<!-- Sidebar -->
<aside class="sidebar fixed h-screen bg-white border-r border-gray-200 overflow-y-auto">
<div class="p-6">
<div class="flex items-center mb-8">
<i class="far fa-gem text-3xl text-purple-600 mr-2"></i>
<span class="text-xl font-bold">DS<span class="text-pink-600">Diamonds</span></span>
</div>
<div class="mb-8">
<div class="text-sm text-gray-500 mb-1">Welcome back,</div>
<div class="text-lg font-semibold text-gray-800"><?php echo h($client_name); ?></div>
<div class="text-xs text-gray-500">Client Account</div>
</div>
<nav class="space-y-2">
<a href="client_dashboard.php"
class="flex items-center px-4 py-3 text-white gradient-bg rounded-lg">
<i class="fas fa-th-large w-5"></i>
<span class="ml-3">Dashboard</span>
</a>
<a href="client_invites.php"
class="flex items-center px-4 py-3 text-gray-700 hover:bg-gray-100 rounded-lg">
<i class="fas fa-link w-5"></i>
<span class="ml-3">My Invites</span>
</a>
<a href="client_invite_create.php"
class="flex items-center px-4 py-3 text-gray-700 hover:bg-gray-100 rounded-lg">
<i class="fas fa-plus-circle w-5"></i>
<span class="ml-3">Create Invite</span>
</a>
<a href="home.php" class="flex items-center px-4 py-3 text-gray-700 hover:bg-gray-100 rounded-lg">
<i class="fas fa-home w-5"></i>
<span class="ml-3">Home</span>
</a>
<a href="logout.php" class="flex items-center px-4 py-3 text-red-600 hover:bg-red-50 rounded-lg">
<i class="fas fa-sign-out-alt w-5"></i>
<span class="ml-3">Logout</span>
</a>
</nav>
</div>
</aside>
<!-- Main Content -->
<main class="main-content flex-1 p-8">
<!-- Header -->
<div class="mb-8">
<h1 class="text-3xl font-bold text-gray-800 mb-2">Diamond Collection</h1>
<p class="text-gray-600">Browse our premium diamond inventory and create invite links for your
customers.</p>
</div>
<!-- Flash Messages -->
<?php echo get_flash_message(); ?>
<!-- Statistics -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white rounded-xl shadow-sm p-6">
<div class="flex items-center justify-between">
<div>
<div class="text-gray-500 text-sm mb-1">Total Diamonds</div>
<div class="text-3xl font-bold text-gray-800">
<?php
$total_result = $conn->query("SELECT COUNT(*) as total FROM diamonds");
echo $total_result ? $total_result->fetch_assoc()['total'] : 0;
?>
</div>
</div>
<div class="w-12 h-12 bg-purple-100 rounded-full flex items-center justify-center">
<i class="fas fa-gem text-purple-600 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-sm p-6">
<div class="flex items-center justify-between">
<div>
<div class="text-gray-500 text-sm mb-1">Available</div>
<div class="text-3xl font-bold text-green-600">
<?php
$available_result = $conn->query("SELECT COUNT(*) as total FROM diamonds WHERE status='Available'");
echo $available_result ? $available_result->fetch_assoc()['total'] : 0;
?>
</div>
</div>
<div class="w-12 h-12 bg-green-100 rounded-full flex items-center justify-center">
<i class="fas fa-check-circle text-green-600 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-sm p-6">
<div class="flex items-center justify-between">
<div>
<div class="text-gray-500 text-sm mb-1">My Invites</div>
<div class="text-3xl font-bold text-pink-600">
<?php
// Check if invites table exists
$table_check = $conn->query("SHOW TABLES LIKE 'invites'");
if ($table_check && $table_check->num_rows > 0) {
$invite_result = $conn->query("SELECT COUNT(*) as total FROM invites WHERE created_by = " . intval($client_id));
echo $invite_result ? $invite_result->fetch_assoc()['total'] : 0;
} else {
echo '0';
}
?>
</div>
</div>
<div class="w-12 h-12 bg-pink-100 rounded-full flex items-center justify-center">
<i class="fas fa-link text-pink-600 text-xl"></i>
</div>
</div>
</div>
</div>
<!-- Filters & Search -->
<div class="bg-white rounded-lg shadow-sm p-6 mb-8">
<form action="client_dashboard.php" method="GET" class="flex flex-wrap gap-4 items-end">
<!-- Search -->
<div class="flex-1 min-w-[200px]">
<label class="block text-sm font-medium text-gray-700 mb-2">Search</label>
<input type="text" name="search" value="<?php echo h($search_term); ?>"
placeholder="Stock No, Color, Clarity..."
class="w-full border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-purple-500 focus:border-transparent">
</div>
<!-- Shape Filter -->
<div class="w-48">
<label class="block text-sm font-medium text-gray-700 mb-2">Shape</label>
<select name="shape"
class="w-full border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-purple-500 focus:border-transparent">
<option value="">All Shapes</option>
<?php foreach ($shapes as $shape): ?>
<option value="<?php echo h($shape); ?>" <?php echo $shape_filter === $shape ? 'selected' : ''; ?>>
<?php echo h(ucfirst(strtolower($shape))); ?>
</option>
<?php endforeach; ?>
</select>
</div>
<!-- Status Filter -->
<div class="w-48">
<label class="block text-sm font-medium text-gray-700 mb-2">Status</label>
<select name="status"
class="w-full border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-purple-500 focus:border-transparent">
<option value="">All</option>
<option value="Available" <?php echo $status_filter === 'Available' ? 'selected' : ''; ?>>
Available</option>
<option value="Sold" <?php echo $status_filter === 'Sold' ? 'selected' : ''; ?>>Sold</option>
</select>
</div>
<!-- Buttons -->
<div class="flex gap-2">
<button type="submit"
class="gradient-bg text-white px-6 py-2 rounded-lg font-medium hover:opacity-90 transition">
<i class="fas fa-search mr-2"></i>Filter
</button>
<a href="client_dashboard.php"
class="bg-gray-200 text-gray-700 px-6 py-2 rounded-lg font-medium hover:bg-gray-300 transition">
Clear
</a>
</div>
</form>
</div>
<!-- Diamond Grid -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
<?php
if ($result && $result->num_rows > 0) {
while ($row = $result->fetch_assoc()):
$status_color = $row['status'] == 'Available' ? 'green' : 'gray';
$diamond_id = $row['id'];
?>
<div class="diamond-card bg-white rounded-xl shadow-md overflow-hidden">
<!-- Diamond Image/Icon -->
<?php
// Check if diamond has custom image, otherwise use default images
if (!empty($row['image_url']) && file_exists($row['image_url'])) {
$diamond_image = $row['image_url'];
} else {
// Use rotating default images (1-5)
$image_num = (($diamond_id - 1) % 5) + 1;
$diamond_image = "assets/images/diamonds/diamond-{$image_num}.jpg";
}
?>
<div
class="bg-gradient-to-br from-purple-100 to-pink-100 h-48 flex items-center justify-center relative overflow-hidden">
<?php if (file_exists($diamond_image)): ?>
<img src="<?php echo $diamond_image; ?>" alt="Diamond" class="w-full h-full object-cover">
<?php else: ?>
<i class="fas fa-gem text-6xl text-purple-300"></i>
<?php endif; ?>
<div class="absolute top-3 right-3">
<span
class="px-3 py-1 text-xs font-semibold bg-<?php echo $status_color; ?>-100 text-<?php echo $status_color; ?>-800 rounded-full">
<?php echo h($row['status']); ?>
</span>
</div>
</div>
<!-- Diamond Info -->
<div class="p-5">
<div class="flex justify-between items-start mb-3">
<div>
<div class="text-xs text-gray-500 uppercase mb-1">
<?php echo h($row['shape'] ?? 'N/A'); ?>
</div>
<div class="text-2xl font-bold text-gray-800">
<?php echo h($row['size']); ?> ct
</div>
</div>
<div class="text-right">
<div class="text-xs text-gray-500 mb-1">Stock</div>
<div class="text-sm font-semibold text-gray-700">
<?php echo h($row['stock_no']); ?>
</div>
</div>
</div>
<div class="grid grid-cols-2 gap-2 mb-4 text-sm">
<div>
<span class="text-gray-500">Color:</span>
<span class="font-semibold ml-1"><?php echo h($row['color']); ?></span>
</div>
<div>
<span class="text-gray-500">Clarity:</span>
<span class="font-semibold ml-1"><?php echo h($row['clarity']); ?></span>
</div>
<div>
<span class="text-gray-500">Cut:</span>
<span class="font-semibold ml-1"><?php echo h($row['cut']); ?></span>
</div>
<div>
<span class="text-gray-500">Polish:</span>
<span class="font-semibold ml-1"><?php echo h($row['polish']); ?></span>
</div>
</div>
<button @click="openModal({
id: '<?php echo $diamond_id; ?>',
stock_no: '<?php echo addslashes(h($row['stock_no'])); ?>',
shape: '<?php echo addslashes(h($row['shape'] ?? 'N/A')); ?>',
size: '<?php echo addslashes(h($row['size'])); ?>',
color: '<?php echo addslashes(h($row['color'])); ?>',
clarity: '<?php echo addslashes(h($row['clarity'])); ?>',
cut: '<?php echo addslashes(h($row['cut'])); ?>',
polish: '<?php echo addslashes(h($row['polish'])); ?>',
symmetry: '<?php echo addslashes(h($row['symmetry'])); ?>',
diamond_type: '<?php echo addslashes(h($row['diamond_type'] ?? '')); ?>',
status: '<?php echo addslashes(h($row['status'])); ?>',
image: '<?php echo addslashes($diamond_image); ?>',
certificate: '<?php echo !empty($row['certificate_url']) ? addslashes($row['certificate_url']) : ''; ?>',
certificate_ext: '<?php echo !empty($row['certificate_url']) ? strtolower(pathinfo($row['certificate_url'], PATHINFO_EXTENSION)) : ''; ?>'
})"
class="w-full gradient-bg text-white px-4 py-2 rounded-lg font-medium hover:opacity-90 transition">
<i class="fas fa-eye mr-2"></i>View Details
</button>
</div>
</div>
<?php
endwhile;
} else {
echo '<div class="col-span-full text-center py-12">';
echo '<i class="far fa-gem text-6xl text-gray-300 mb-4"></i>';
echo '<p class="text-xl text-gray-500">No diamonds found matching your criteria.</p>';
echo '</div>';
}
$conn->close();
?>
</div>
</main>
</div>
<!-- Global Diamond Details Modal -->
<div x-show="showModal" @click.self="closeModal()" x-cloak
class="fixed inset-0 bg-black bg-opacity-70 backdrop-blur-sm flex items-center justify-center z-50 p-4"
style="display: none;">
<div class="bg-white rounded-3xl max-w-5xl w-full max-h-[90vh] overflow-hidden shadow-2xl" @click.stop>
<!-- Header with gradient background -->
<div class="gradient-bg text-white p-6 md:p-8 relative overflow-hidden">
<div class="absolute top-0 right-0 opacity-10">
<i class="fas fa-gem text-9xl"></i>
</div>
<div class="relative z-10 flex justify-between items-start">
<div>
<div class="text-xs md:text-sm opacity-90 mb-2">DIAMOND DETAILS</div>
<h3 class="text-2xl md:text-4xl font-bold mb-2"
x-text="'Stock #' + (selectedDiamond?.stock_no || '')"></h3>
<div class="flex flex-wrap items-center gap-2 md:gap-3">
<span
class="px-3 py-1 bg-white/20 backdrop-blur-sm rounded-full text-xs md:text-sm font-semibold"
x-text="selectedDiamond?.shape || ''"></span>
<span
class="px-3 py-1 bg-white/20 backdrop-blur-sm rounded-full text-xs md:text-sm font-semibold"
x-text="(selectedDiamond?.size || '') + ' Carat'"></span>
<span
class="px-3 py-1 bg-white text-purple-600 rounded-full text-xs md:text-sm font-semibold"
x-text="selectedDiamond?.status || ''"></span>
</div>
</div>
<button @click="closeModal()"
class="w-10 h-10 bg-white/20 backdrop-blur-sm rounded-full hover:bg-white/30 transition flex items-center justify-center flex-shrink-0">
<i class="fas fa-times text-xl"></i>
</button>
</div>
</div>
<!-- Scrollable Content -->
<div class="overflow-y-auto max-h-[calc(90vh-200px)] p-4 md:p-8">
<!-- Two Column Layout -->
<div class="grid lg:grid-cols-2 gap-6 md:gap-8">
<!-- Left: Diamond Image & Certificate -->
<div class="space-y-4">
<!-- Diamond Image -->
<div
class="bg-gradient-to-br from-purple-50 via-pink-50 to-purple-50 rounded-2xl p-6 md:p-8 h-64 md:h-80 flex items-center justify-center overflow-hidden shadow-lg border border-purple-100">
<template x-if="selectedDiamond?.image">
<img :src="selectedDiamond.image" alt="Diamond"
class="max-w-full max-h-full object-contain">
</template>
<template x-if="!selectedDiamond?.image">
<i class="fas fa-gem text-7xl md:text-9xl text-purple-200"></i>
</template>
</div>
<!-- Certificate Section -->
<template x-if="selectedDiamond?.certificate">
<div
class="bg-gradient-to-br from-blue-50 to-indigo-50 rounded-2xl p-4 md:p-6 border border-blue-100">
<div class="flex items-center mb-4">
<div
class="w-10 h-10 md:w-12 md:h-12 bg-gradient-to-br from-blue-500 to-indigo-600 rounded-xl flex items-center justify-center mr-3 md:mr-4 flex-shrink-0">
<i class="fas fa-certificate text-white text-lg md:text-xl"></i>
</div>
<div>
<h4 class="font-bold text-gray-800 text-base md:text-lg">Certificate Available
</h4>
<p class="text-xs md:text-sm text-gray-600">Verified & Authenticated</p>
</div>
</div>
<!-- Certificate Preview -->
<template
x-if="selectedDiamond?.certificate_ext && ['jpg', 'jpeg', 'png'].includes(selectedDiamond.certificate_ext)">
<div class="bg-white rounded-lg p-2 mb-4 border border-blue-200">
<img :src="selectedDiamond.certificate" alt="Certificate"
class="w-full rounded">
</div>
</template>
<template x-if="selectedDiamond?.certificate_ext === 'pdf'">
<div
class="bg-white rounded-lg p-4 mb-4 border border-blue-200 flex items-center justify-center">
<i class="fas fa-file-pdf text-5xl md:text-6xl text-red-500"></i>
</div>
</template>
<a :href="selectedDiamond?.certificate" target="_blank"
class="w-full bg-gradient-to-r from-blue-600 to-indigo-600 text-white px-4 py-3 rounded-lg font-semibold hover:from-blue-700 hover:to-indigo-700 transition flex items-center justify-center text-sm md:text-base">
<i class="fas fa-download mr-2"></i>Download Certificate
</a>
</div>
</template>
</div>
<!-- Right: Specifications -->
<div>
<h4 class="text-xl md:text-2xl font-bold text-gray-800 mb-4 md:mb-6 flex items-center">
<i class="fas fa-list-ul text-purple-600 mr-2 md:mr-3"></i>
Specifications
</h4>
<div class="space-y-4">
<!-- The 4 Cs -->
<div
class="bg-gradient-to-br from-purple-50 to-pink-50 rounded-xl p-4 md:p-6 border border-purple-100">
<div class="text-xs uppercase text-purple-600 font-bold mb-3 md:mb-4 tracking-wider">The
Four C's</div>
<div class="grid grid-cols-2 gap-3 md:gap-4">
<div>
<div class="text-xs text-gray-500 mb-1">CARAT WEIGHT</div>
<div class="text-2xl md:text-3xl font-bold text-gray-800"
x-text="selectedDiamond?.size || ''"></div>
<div class="text-xs text-gray-500">carats</div>
</div>
<div>
<div class="text-xs text-gray-500 mb-1">COLOR GRADE</div>
<div class="text-2xl md:text-3xl font-bold text-gray-800"
x-text="selectedDiamond?.color || ''"></div>
<div class="text-xs text-gray-500">grade</div>
</div>
<div>
<div class="text-xs text-gray-500 mb-1">CLARITY</div>
<div class="text-2xl md:text-3xl font-bold text-gray-800"
x-text="selectedDiamond?.clarity || ''"></div>
<div class="text-xs text-gray-500">grade</div>
</div>
<div>
<div class="text-xs text-gray-500 mb-1">CUT QUALITY</div>
<div class="text-2xl md:text-3xl font-bold text-gray-800"
x-text="selectedDiamond?.cut || ''"></div>
<div class="text-xs text-gray-500">grade</div>
</div>
</div>
</div>
<!-- Additional Details -->
<div class="grid grid-cols-2 gap-3">
<div
class="bg-white border border-gray-200 rounded-xl p-3 md:p-4 hover:shadow-md transition">
<div class="flex items-center mb-2">
<i class="fas fa-shapes text-purple-600 mr-2 text-sm"></i>
<div class="text-xs text-gray-500 uppercase">Shape</div>
</div>
<div class="text-base md:text-lg font-bold text-gray-800"
x-text="selectedDiamond?.shape || ''"></div>
</div>
<div
class="bg-white border border-gray-200 rounded-xl p-3 md:p-4 hover:shadow-md transition">
<div class="flex items-center mb-2">
<i class="fas fa-gem text-purple-600 mr-2 text-sm"></i>
<div class="text-xs text-gray-500 uppercase">Polish</div>
</div>
<div class="text-base md:text-lg font-bold text-gray-800"
x-text="selectedDiamond?.polish || ''"></div>
</div>
<div
class="bg-white border border-gray-200 rounded-xl p-3 md:p-4 hover:shadow-md transition">
<div class="flex items-center mb-2">
<i class="fas fa-balance-scale text-purple-600 mr-2 text-sm"></i>
<div class="text-xs text-gray-500 uppercase">Symmetry</div>
</div>
<div class="text-base md:text-lg font-bold text-gray-800"
x-text="selectedDiamond?.symmetry || ''"></div>
</div>
<template x-if="selectedDiamond?.diamond_type">
<div
class="bg-white border border-gray-200 rounded-xl p-3 md:p-4 hover:shadow-md transition">
<div class="flex items-center mb-2">
<i class="fas fa-tag text-purple-600 mr-2 text-sm"></i>
<div class="text-xs text-gray-500 uppercase">Type</div>
</div>
<div class="text-base md:text-lg font-bold text-gray-800"
x-text="selectedDiamond?.diamond_type || ''"></div>
</div>
</template>
</div>
<!-- Quality Indicators -->
<div
class="bg-gradient-to-r from-green-50 to-emerald-50 rounded-xl p-4 border border-green-200">
<div class="flex items-center justify-between mb-2">
<span class="text-xs md:text-sm font-semibold text-gray-700">Quality
Indicators</span>
<i class="fas fa-check-circle text-green-600"></i>
</div>
<div class="grid grid-cols-3 gap-2 text-center">
<div>
<div class="text-xl md:text-2xl font-bold text-green-600"
x-text="selectedDiamond?.cut || ''"></div>
<div class="text-xs text-gray-600">Cut</div>
</div>
<div>
<div class="text-xl md:text-2xl font-bold text-green-600"
x-text="selectedDiamond?.polish || ''"></div>
<div class="text-xs text-gray-600">Polish</div>
</div>
<div>
<div class="text-xl md:text-2xl font-bold text-green-600"
x-text="selectedDiamond?.symmetry || ''"></div>
<div class="text-xs text-gray-600">Symmetry</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Footer Actions -->
<div class="border-t border-gray-200 p-4 md:p-6 bg-gray-50">
<div class="flex flex-col sm:flex-row gap-3">
<a :href="'client_invite_create.php?diamond_id=' + (selectedDiamond?.id || '')"
class="flex-1 gradient-bg text-white px-4 md:px-6 py-3 md:py-4 rounded-xl font-bold text-center hover:opacity-90 transition shadow-lg hover:shadow-xl transform hover:scale-[1.02] flex items-center justify-center text-sm md:text-base">
<i class="fas fa-paper-plane mr-2"></i>Create & Share Invite Link
</a>
<button @click="closeModal()"
class="px-6 md:px-8 py-3 md:py-4 bg-white border-2 border-gray-300 text-gray-700 rounded-xl font-semibold hover:bg-gray-100 transition text-sm md:text-base">
Close
</button>
</div>
</div>
</div>
</div>
</body>
</html>