Deanmuriarti commited on
Commit
befe51f
·
verified ·
1 Parent(s): 8cf2a12

Add 2 files

Browse files
Files changed (2) hide show
  1. README.md +6 -4
  2. index.html +1114 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Https Huggingface Co Deanmuriarti
3
- emoji: 🐨
4
  colorFrom: purple
5
- colorTo: green
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: https-huggingface-co-deanmuriarti
3
+ emoji: 🐳
4
  colorFrom: purple
5
+ colorTo: blue
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,1114 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="es">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>CRM Supabase</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
10
+ <script>
11
+ tailwind.config = {
12
+ theme: {
13
+ extend: {
14
+ colors: {
15
+ primary: '#4F46E5',
16
+ secondary: '#10B981',
17
+ dark: '#1F2937',
18
+ light: '#F9FAFB'
19
+ }
20
+ }
21
+ }
22
+ }
23
+
24
+ // Configuración de Supabase
25
+ const supabaseUrl = 'TU_URL_SUPABASE';
26
+ const supabaseKey = 'TU_LLAVE_SUPABASE';
27
+ const supabase = supabase.createClient(supabaseUrl, supabaseKey);
28
+ </script>
29
+ <style>
30
+ .sidebar {
31
+ transition: all 0.3s ease;
32
+ }
33
+ .chart-container {
34
+ position: relative;
35
+ height: 300px;
36
+ }
37
+ .customer-card:hover {
38
+ transform: translateY(-5px);
39
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
40
+ }
41
+ .auth-container {
42
+ display: flex;
43
+ justify-content: center;
44
+ align-items: center;
45
+ height: 100vh;
46
+ background-color: #f3f4f6;
47
+ }
48
+ .auth-card {
49
+ width: 100%;
50
+ max-width: 400px;
51
+ background: white;
52
+ border-radius: 0.5rem;
53
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
54
+ padding: 2rem;
55
+ }
56
+ </style>
57
+ </head>
58
+ <body class="bg-gray-50 font-sans">
59
+ <!-- Contenedor de autenticación (visible inicialmente) -->
60
+ <div id="authContainer" class="auth-container">
61
+ <div class="auth-card">
62
+ <div class="text-center mb-8">
63
+ <h1 class="text-3xl font-bold text-primary">CRM Supabase</h1>
64
+ <p class="text-gray-600 mt-2">Gestión de clientes y leads</p>
65
+ </div>
66
+
67
+ <div id="loginForm">
68
+ <div class="mb-4">
69
+ <label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
70
+ <input type="email" id="email" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="tu@email.com">
71
+ </div>
72
+ <div class="mb-6">
73
+ <label for="password" class="block text-sm font-medium text-gray-700 mb-1">Contraseña</label>
74
+ <input type="password" id="password" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="••••••••">
75
+ </div>
76
+ <button id="loginBtn" class="w-full bg-primary text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2">
77
+ Iniciar sesión
78
+ </button>
79
+ <p class="text-center mt-4 text-sm text-gray-600">
80
+ ¿No tienes cuenta? <a href="#" id="showRegister" class="text-primary font-medium hover:underline">Regístrate</a>
81
+ </p>
82
+ </div>
83
+
84
+ <div id="registerForm" class="hidden">
85
+ <div class="mb-4">
86
+ <label for="regName" class="block text-sm font-medium text-gray-700 mb-1">Nombre completo</label>
87
+ <input type="text" id="regName" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="Tu nombre">
88
+ </div>
89
+ <div class="mb-4">
90
+ <label for="regEmail" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
91
+ <input type="email" id="regEmail" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="tu@email.com">
92
+ </div>
93
+ <div class="mb-6">
94
+ <label for="regPassword" class="block text-sm font-medium text-gray-700 mb-1">Contraseña</label>
95
+ <input type="password" id="regPassword" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="••••••••">
96
+ </div>
97
+ <button id="registerBtn" class="w-full bg-primary text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2">
98
+ Registrarse
99
+ </button>
100
+ <p class="text-center mt-4 text-sm text-gray-600">
101
+ ¿Ya tienes cuenta? <a href="#" id="showLogin" class="text-primary font-medium hover:underline">Inicia sesión</a>
102
+ </p>
103
+ </div>
104
+ </div>
105
+ </div>
106
+
107
+ <!-- Aplicación CRM (oculta inicialmente) -->
108
+ <div id="appContainer" class="hidden">
109
+ <div class="flex h-screen overflow-hidden">
110
+ <!-- Sidebar -->
111
+ <div class="sidebar bg-white w-64 md:w-72 border-r border-gray-200 flex-shrink-0">
112
+ <div class="p-4 border-b border-gray-200">
113
+ <h1 class="text-2xl font-bold text-primary flex items-center">
114
+ <i class="fas fa-cube mr-2"></i>
115
+ <span>CRM Supabase</span>
116
+ </h1>
117
+ </div>
118
+ <nav class="p-4">
119
+ <div class="mb-6">
120
+ <p class="text-xs uppercase text-gray-500 font-semibold mb-3">Principal</p>
121
+ <ul>
122
+ <li class="mb-2">
123
+ <a href="#" class="flex items-center p-2 text-primary bg-indigo-50 rounded-lg dashboard-link">
124
+ <i class="fas fa-tachometer-alt mr-3"></i>
125
+ <span>Dashboard</span>
126
+ </a>
127
+ </li>
128
+ <li class="mb-2">
129
+ <a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg clients-link">
130
+ <i class="fas fa-users mr-3"></i>
131
+ <span>Clientes</span>
132
+ </a>
133
+ </li>
134
+ <li class="mb-2">
135
+ <a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg leads-link">
136
+ <i class="fas fa-list-alt mr-3"></i>
137
+ <span>Leads</span>
138
+ </a>
139
+ </li>
140
+ <li class="mb-2">
141
+ <a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg activities-link">
142
+ <i class="fas fa-calendar-alt mr-3"></i>
143
+ <span>Actividades</span>
144
+ </a>
145
+ </li>
146
+ <li class="mb-2">
147
+ <a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg reports-link">
148
+ <i class="fas fa-chart-line mr-3"></i>
149
+ <span>Reportes</span>
150
+ </a>
151
+ </li>
152
+ </ul>
153
+ </div>
154
+ <div class="mb-6">
155
+ <p class="text-xs uppercase text-gray-500 font-semibold mb-3">Herramientas</p>
156
+ <ul>
157
+ <li class="mb-2">
158
+ <a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg">
159
+ <i class="fas fa-envelope mr-3"></i>
160
+ <span>Correos</span>
161
+ </a>
162
+ </li>
163
+ <li class="mb-2">
164
+ <a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg">
165
+ <i class="fas fa-file-invoice mr-3"></i>
166
+ <span>Facturas</span>
167
+ </a>
168
+ </li>
169
+ <li class="mb-2">
170
+ <a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg settings-link">
171
+ <i class="fas fa-cog mr-3"></i>
172
+ <span>Ajustes</span>
173
+ </a>
174
+ </li>
175
+ </ul>
176
+ </div>
177
+ </nav>
178
+ </div>
179
+
180
+ <!-- Main Content -->
181
+ <div class="flex-1 flex flex-col overflow-hidden">
182
+ <!-- Top Navigation -->
183
+ <header class="bg-white border-b border-gray-200 py-4 px-6 flex items-center justify-between">
184
+ <div class="flex items-center">
185
+ <button id="sidebarToggle" class="text-gray-500 mr-4 md:hidden">
186
+ <i class="fas fa-bars text-xl"></i>
187
+ </button>
188
+ <h2 id="pageTitle" class="text-xl font-semibold text-gray-800">Dashboard</h2>
189
+ </div>
190
+ <div class="flex items-center space-x-4">
191
+ <div class="relative">
192
+ <button class="text-gray-500 hover:text-gray-700">
193
+ <i class="fas fa-bell text-xl"></i>
194
+ <span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span>
195
+ </button>
196
+ </div>
197
+ <div class="relative">
198
+ <button class="text-gray-500 hover:text-gray-700">
199
+ <i class="fas fa-envelope text-xl"></i>
200
+ <span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-blue-500"></span>
201
+ </button>
202
+ </div>
203
+ <div class="flex items-center">
204
+ <img id="userAvatar" src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="h-8 w-8 rounded-full mr-2">
205
+ <span id="userName" class="text-gray-700 font-medium">Cargando...</span>
206
+ <button id="logoutBtn" class="ml-4 text-gray-500 hover:text-gray-700">
207
+ <i class="fas fa-sign-out-alt"></i>
208
+ </button>
209
+ </div>
210
+ </div>
211
+ </header>
212
+
213
+ <!-- Main Content Area -->
214
+ <main class="flex-1 overflow-y-auto p-6 bg-gray-50">
215
+ <!-- Dashboard View -->
216
+ <div id="dashboardView">
217
+ <!-- Stats Cards -->
218
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
219
+ <div class="bg-white rounded-lg shadow p-6">
220
+ <div class="flex items-center justify-between">
221
+ <div>
222
+ <p class="text-gray-500">Clientes totales</p>
223
+ <h3 id="totalClients" class="text-2xl font-bold text-gray-800">Cargando...</h3>
224
+ <p class="text-green-500 text-sm mt-1"><i class="fas fa-arrow-up mr-1"></i> <span id="clientGrowth">0%</span> desde el mes pasado</p>
225
+ </div>
226
+ <div class="bg-blue-100 p-3 rounded-full">
227
+ <i class="fas fa-users text-blue-600 text-xl"></i>
228
+ </div>
229
+ </div>
230
+ </div>
231
+ <div class="bg-white rounded-lg shadow p-6">
232
+ <div class="flex items-center justify-between">
233
+ <div>
234
+ <p class="text-gray-500">Ventas este mes</p>
235
+ <h3 id="monthlySales" class="text-2xl font-bold text-gray-800">Cargando...</h3>
236
+ <p class="text-green-500 text-sm mt-1"><i class="fas fa-arrow-up mr-1"></i> <span id="salesGrowth">0%</span> desde el mes pasado</p>
237
+ </div>
238
+ <div class="bg-green-100 p-3 rounded-full">
239
+ <i class="fas fa-chart-line text-green-600 text-xl"></i>
240
+ </div>
241
+ </div>
242
+ </div>
243
+ <div class="bg-white rounded-lg shadow p-6">
244
+ <div class="flex items-center justify-between">
245
+ <div>
246
+ <p class="text-gray-500">Tareas pendientes</p>
247
+ <h3 id="pendingTasks" class="text-2xl font-bold text-gray-800">Cargando...</h3>
248
+ <p class="text-red-500 text-sm mt-1"><i class="fas fa-arrow-down mr-1"></i> <span id="taskChange">0</span> desde ayer</p>
249
+ </div>
250
+ <div class="bg-yellow-100 p-3 rounded-full">
251
+ <i class="fas fa-tasks text-yellow-600 text-xl"></i>
252
+ </div>
253
+ </div>
254
+ </div>
255
+ <div class="bg-white rounded-lg shadow p-6">
256
+ <div class="flex items-center justify-between">
257
+ <div>
258
+ <p class="text-gray-500">Nuevos leads</p>
259
+ <h3 id="newLeads" class="text-2xl font-bold text-gray-800">Cargando...</h3>
260
+ <p class="text-green-500 text-sm mt-1"><i class="fas fa-arrow-up mr-1"></i> <span id="leadGrowth">0%</span> desde ayer</p>
261
+ </div>
262
+ <div class="bg-purple-100 p-3 rounded-full">
263
+ <i class="fas fa-address-book text-purple-600 text-xl"></i>
264
+ </div>
265
+ </div>
266
+ </div>
267
+ </div>
268
+
269
+ <!-- Charts and Recent Activity -->
270
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
271
+ <!-- Sales Chart -->
272
+ <div class="bg-white rounded-lg shadow p-6 lg:col-span-2">
273
+ <div class="flex items-center justify-between mb-4">
274
+ <h3 class="text-lg font-semibold text-gray-800">Ventas mensuales</h3>
275
+ <div class="flex space-x-2">
276
+ <button class="px-3 py-1 text-xs bg-indigo-50 text-primary rounded">Mes</button>
277
+ <button class="px-3 py-1 text-xs bg-gray-100 text-gray-600 rounded">Año</button>
278
+ </div>
279
+ </div>
280
+ <div class="chart-container">
281
+ <canvas id="salesChart"></canvas>
282
+ </div>
283
+ </div>
284
+
285
+ <!-- Recent Activity -->
286
+ <div class="bg-white rounded-lg shadow p-6">
287
+ <h3 class="text-lg font-semibold text-gray-800 mb-4">Actividad reciente</h3>
288
+ <div id="recentActivities" class="space-y-4">
289
+ <div class="animate-pulse flex items-start">
290
+ <div class="bg-gray-200 p-2 rounded-full mr-3">
291
+ <i class="fas fa-circle text-transparent text-sm"></i>
292
+ </div>
293
+ <div class="flex-1">
294
+ <div class="h-4 bg-gray-200 rounded w-3/4"></div>
295
+ <div class="h-3 bg-gray-200 rounded w-1/2 mt-2"></div>
296
+ </div>
297
+ </div>
298
+ <div class="animate-pulse flex items-start">
299
+ <div class="bg-gray-200 p-2 rounded-full mr-3">
300
+ <i class="fas fa-circle text-transparent text-sm"></i>
301
+ </div>
302
+ <div class="flex-1">
303
+ <div class="h-4 bg-gray-200 rounded w-3/4"></div>
304
+ <div class="h-3 bg-gray-200 rounded w-1/2 mt-2"></div>
305
+ </div>
306
+ </div>
307
+ </div>
308
+ </div>
309
+ </div>
310
+
311
+ <!-- Recent Customers -->
312
+ <div class="bg-white rounded-lg shadow overflow-hidden">
313
+ <div class="p-6 border-b border-gray-200 flex justify-between items-center">
314
+ <h3 class="text-lg font-semibold text-gray-800">Clientes recientes</h3>
315
+ <button id="addClientBtn" class="px-4 py-2 bg-primary text-white rounded-lg text-sm font-medium hover:bg-indigo-700">
316
+ <i class="fas fa-plus mr-1"></i> Agregar cliente
317
+ </button>
318
+ </div>
319
+ <div class="overflow-x-auto">
320
+ <table class="min-w-full divide-y divide-gray-200">
321
+ <thead class="bg-gray-50">
322
+ <tr>
323
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nombre</th>
324
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Empresa</th>
325
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Email</th>
326
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Teléfono</th>
327
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Estado</th>
328
+ <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Acciones</th>
329
+ </tr>
330
+ </thead>
331
+ <tbody id="clientsTableBody" class="bg-white divide-y divide-gray-200">
332
+ <!-- Los clientes se cargarán aquí dinámicamente -->
333
+ </tbody>
334
+ </table>
335
+ </div>
336
+ </div>
337
+ </div>
338
+
339
+ <!-- Clients View -->
340
+ <div id="clientsView" class="hidden">
341
+ <div class="flex justify-between items-center mb-6">
342
+ <h2 class="text-2xl font-bold text-gray-800">Gestión de Clientes</h2>
343
+ <button id="addClientBtn2" class="px-4 py-2 bg-primary text-white rounded-lg text-sm font-medium hover:bg-indigo-700">
344
+ <i class="fas fa-plus mr-1"></i> Agregar cliente
345
+ </button>
346
+ </div>
347
+
348
+ <div class="bg-white rounded-lg shadow overflow-hidden">
349
+ <div class="p-4 border-b border-gray-200">
350
+ <div class="flex flex-col md:flex-row md:items-center md:justify-between">
351
+ <div class="mb-4 md:mb-0">
352
+ <div class="relative">
353
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
354
+ <i class="fas fa-search text-gray-400"></i>
355
+ </div>
356
+ <input id="clientSearch" type="text" class="pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="Buscar clientes...">
357
+ </div>
358
+ </div>
359
+ <div class="flex space-x-2">
360
+ <select id="clientStatusFilter" class="border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
361
+ <option value="all">Todos los estados</option>
362
+ <option value="active">Activo</option>
363
+ <option value="inactive">Inactivo</option>
364
+ <option value="prospect">Prospecto</option>
365
+ </select>
366
+ <button id="exportClientsBtn" class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg text-sm font-medium hover:bg-gray-200">
367
+ <i class="fas fa-download mr-1"></i> Exportar
368
+ </button>
369
+ </div>
370
+ </div>
371
+ </div>
372
+ <div class="overflow-x-auto">
373
+ <table class="min-w-full divide-y divide-gray-200">
374
+ <thead class="bg-gray-50">
375
+ <tr>
376
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nombre</th>
377
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Empresa</th>
378
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Email</th>
379
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Teléfono</th>
380
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Valor</th>
381
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Estado</th>
382
+ <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Acciones</th>
383
+ </tr>
384
+ </thead>
385
+ <tbody id="allClientsTableBody" class="bg-white divide-y divide-gray-200">
386
+ <!-- Todos los clientes se cargarán aquí dinámicamente -->
387
+ </tbody>
388
+ </table>
389
+ </div>
390
+ <div class="px-6 py-4 border-t border-gray-200 flex items-center justify-between">
391
+ <div class="text-sm text-gray-500">
392
+ Mostrando <span id="clientStart">1</span> a <span id="clientEnd">10</span> de <span id="clientTotal">0</span> clientes
393
+ </div>
394
+ <div class="flex space-x-2">
395
+ <button id="clientPrevPage" class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
396
+ Anterior
397
+ </button>
398
+ <button id="clientNextPage" class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
399
+ Siguiente
400
+ </button>
401
+ </div>
402
+ </div>
403
+ </div>
404
+ </div>
405
+
406
+ <!-- Leads View -->
407
+ <div id="leadsView" class="hidden">
408
+ <div class="flex justify-between items-center mb-6">
409
+ <h2 class="text-2xl font-bold text-gray-800">Gestión de Leads</h2>
410
+ <button id="addLeadBtn" class="px-4 py-2 bg-primary text-white rounded-lg text-sm font-medium hover:bg-indigo-700">
411
+ <i class="fas fa-plus mr-1"></i> Agregar lead
412
+ </button>
413
+ </div>
414
+
415
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6">
416
+ <div class="bg-white rounded-lg shadow p-4">
417
+ <div class="flex items-center justify-between">
418
+ <div>
419
+ <p class="text-sm text-gray-500">Nuevos</p>
420
+ <h3 id="newLeadsCount" class="text-xl font-bold text-gray-800">0</h3>
421
+ </div>
422
+ <div class="bg-blue-100 p-2 rounded-full">
423
+ <i class="fas fa-plus-circle text-blue-600"></i>
424
+ </div>
425
+ </div>
426
+ </div>
427
+ <div class="bg-white rounded-lg shadow p-4">
428
+ <div class="flex items-center justify-between">
429
+ <div>
430
+ <p class="text-sm text-gray-500">En contacto</p>
431
+ <h3 id="contactedLeadsCount" class="text-xl font-bold text-gray-800">0</h3>
432
+ </div>
433
+ <div class="bg-yellow-100 p-2 rounded-full">
434
+ <i class="fas fa-comments text-yellow-600"></i>
435
+ </div>
436
+ </div>
437
+ </div>
438
+ <div class="bg-white rounded-lg shadow p-4">
439
+ <div class="flex items-center justify-between">
440
+ <div>
441
+ <p class="text-sm text-gray-500">Calificados</p>
442
+ <h3 id="qualifiedLeadsCount" class="text-xl font-bold text-gray-800">0</h3>
443
+ </div>
444
+ <div class="bg-green-100 p-2 rounded-full">
445
+ <i class="fas fa-check-circle text-green-600"></i>
446
+ </div>
447
+ </div>
448
+ </div>
449
+ <div class="bg-white rounded-lg shadow p-4">
450
+ <div class="flex items-center justify-between">
451
+ <div>
452
+ <p class="text-sm text-gray-500">Convertidos</p>
453
+ <h3 id="convertedLeadsCount" class="text-xl font-bold text-gray-800">0</h3>
454
+ </div>
455
+ <div class="bg-purple-100 p-2 rounded-full">
456
+ <i class="fas fa-user-check text-purple-600"></i>
457
+ </div>
458
+ </div>
459
+ </div>
460
+ </div>
461
+
462
+ <div class="bg-white rounded-lg shadow overflow-hidden">
463
+ <div class="p-4 border-b border-gray-200">
464
+ <div class="flex flex-col md:flex-row md:items-center md:justify-between">
465
+ <div class="mb-4 md:mb-0">
466
+ <div class="relative">
467
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
468
+ <i class="fas fa-search text-gray-400"></i>
469
+ </div>
470
+ <input id="leadSearch" type="text" class="pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="Buscar leads...">
471
+ </div>
472
+ </div>
473
+ <div class="flex space-x-2">
474
+ <select id="leadStatusFilter" class="border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
475
+ <option value="all">Todos los estados</option>
476
+ <option value="new">Nuevo</option>
477
+ <option value="contacted">En contacto</option>
478
+ <option value="qualified">Calificado</option>
479
+ <option value="converted">Convertido</option>
480
+ <option value="lost">Perdido</option>
481
+ </select>
482
+ <select id="leadSourceFilter" class="border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
483
+ <option value="all">Todas las fuentes</option>
484
+ <option value="web">Sitio web</option>
485
+ <option value="social">Redes sociales</option>
486
+ <option value="referral">Referencia</option>
487
+ <option value="event">Evento</option>
488
+ <option value="other">Otro</option>
489
+ </select>
490
+ </div>
491
+ </div>
492
+ </div>
493
+ <div class="overflow-x-auto">
494
+ <table class="min-w-full divide-y divide-gray-200">
495
+ <thead class="bg-gray-50">
496
+ <tr>
497
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nombre</th>
498
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Empresa</th>
499
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Email</th>
500
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Teléfono</th>
501
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Fuente</th>
502
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Estado</th>
503
+ <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Acciones</th>
504
+ </tr>
505
+ </thead>
506
+ <tbody id="leadsTableBody" class="bg-white divide-y divide-gray-200">
507
+ <!-- Los leads se cargarán aquí dinámicamente -->
508
+ </tbody>
509
+ </table>
510
+ </div>
511
+ <div class="px-6 py-4 border-t border-gray-200 flex items-center justify-between">
512
+ <div class="text-sm text-gray-500">
513
+ Mostrando <span id="leadStart">1</span> a <span id="leadEnd">10</span> de <span id="leadTotal">0</span> leads
514
+ </div>
515
+ <div class="flex space-x-2">
516
+ <button id="leadPrevPage" class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
517
+ Anterior
518
+ </button>
519
+ <button id="leadNextPage" class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
520
+ Siguiente
521
+ </button>
522
+ </div>
523
+ </div>
524
+ </div>
525
+ </div>
526
+
527
+ <!-- Activities View -->
528
+ <div id="activitiesView" class="hidden">
529
+ <div class="flex justify-between items-center mb-6">
530
+ <h2 class="text-2xl font-bold text-gray-800">Actividades</h2>
531
+ <button id="addActivityBtn" class="px-4 py-2 bg-primary text-white rounded-lg text-sm font-medium hover:bg-indigo-700">
532
+ <i class="fas fa-plus mr-1"></i> Agregar actividad
533
+ </button>
534
+ </div>
535
+
536
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
537
+ <div class="lg:col-span-2">
538
+ <div class="bg-white rounded-lg shadow overflow-hidden">
539
+ <div class="p-4 border-b border-gray-200">
540
+ <div class="flex items-center justify-between">
541
+ <h3 class="text-lg font-semibold text-gray-800">Calendario</h3>
542
+ <div class="flex space-x-2">
543
+ <button id="prevMonth" class="p-1 rounded-full hover:bg-gray-100">
544
+ <i class="fas fa-chevron-left"></i>
545
+ </button>
546
+ <button id="nextMonth" class="p-1 rounded-full hover:bg-gray-100">
547
+ <i class="fas fa-chevron-right"></i>
548
+ </button>
549
+ </div>
550
+ </div>
551
+ </div>
552
+ <div class="p-4">
553
+ <div id="calendar" class="grid grid-cols-7 gap-1">
554
+ <!-- Calendar will be generated here -->
555
+ </div>
556
+ </div>
557
+ </div>
558
+ </div>
559
+
560
+ <div>
561
+ <div class="bg-white rounded-lg shadow overflow-hidden">
562
+ <div class="p-4 border-b border-gray-200">
563
+ <h3 class="text-lg font-semibold text-gray-800">Actividades de hoy</h3>
564
+ </div>
565
+ <div id="todayActivities" class="divide-y divide-gray-200">
566
+ <!-- Today's activities will be loaded here -->
567
+ <div class="p-4 text-center text-gray-500">
568
+ No hay actividades programadas para hoy
569
+ </div>
570
+ </div>
571
+ </div>
572
+ </div>
573
+ </div>
574
+ </div>
575
+
576
+ <!-- Reports View -->
577
+ <div id="reportsView" class="hidden">
578
+ <div class="mb-6">
579
+ <h2 class="text-2xl font-bold text-gray-800">Reportes y Análisis</h2>
580
+ <p class="text-gray-600">Visualiza el rendimiento de tu equipo y tus clientes</p>
581
+ </div>
582
+
583
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
584
+ <div class="bg-white rounded-lg shadow p-6">
585
+ <div class="flex items-center justify-between mb-4">
586
+ <h3 class="text-lg font-semibold text-gray-800">Conversión de Leads</h3>
587
+ <select id="leadConversionPeriod" class="border border-gray-300 rounded-md px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
588
+ <option value="week">Esta semana</option>
589
+ <option value="month">Este mes</option>
590
+ <option value="quarter">Este trimestre</option>
591
+ <option value="year">Este año</option>
592
+ </select>
593
+ </div>
594
+ <div class="chart-container">
595
+ <canvas id="leadConversionChart"></canvas>
596
+ </div>
597
+ </div>
598
+ <div class="bg-white rounded-lg shadow p-6">
599
+ <div class="flex items-center justify-between mb-4">
600
+ <h3 class="text-lg font-semibold text-gray-800">Ventas por Vendedor</h3>
601
+ <select id="salesByRepPeriod" class="border border-gray-300 rounded-md px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
602
+ <option value="week">Esta semana</option>
603
+ <option value="month">Este mes</option>
604
+ <option value="quarter">Este trimestre</option>
605
+ <option value="year">Este año</option>
606
+ </select>
607
+ </div>
608
+ <div class="chart-container">
609
+ <canvas id="salesByRepChart"></canvas>
610
+ </div>
611
+ </div>
612
+ </div>
613
+
614
+ <div class="bg-white rounded-lg shadow p-6 mb-6">
615
+ <div class="flex items-center justify-between mb-4">
616
+ <h3 class="text-lg font-semibold text-gray-800">Tendencias de Ventas</h3>
617
+ <select id="salesTrendsPeriod" class="border border-gray-300 rounded-md px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
618
+ <option value="month">Últimos 6 meses</option>
619
+ <option value="quarter">Últimos 4 trimestres</option>
620
+ <option value="year">Últimos 3 años</option>
621
+ </select>
622
+ </div>
623
+ <div class="chart-container">
624
+ <canvas id="salesTrendsChart"></canvas>
625
+ </div>
626
+ </div>
627
+
628
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
629
+ <div class="bg-white rounded-lg shadow p-6">
630
+ <h3 class="text-lg font-semibold text-gray-800 mb-4">Clientes por Industria</h3>
631
+ <div class="chart-container">
632
+ <canvas id="clientsByIndustryChart"></canvas>
633
+ </div>
634
+ </div>
635
+ <div class="bg-white rounded-lg shadow p-6">
636
+ <h3 class="text-lg font-semibold text-gray-800 mb-4">Fuentes de Leads</h3>
637
+ <div class="chart-container">
638
+ <canvas id="leadSourcesChart"></canvas>
639
+ </div>
640
+ </div>
641
+ </div>
642
+ </div>
643
+
644
+ <!-- Settings View -->
645
+ <div id="settingsView" class="hidden">
646
+ <div class="mb-6">
647
+ <h2 class="text-2xl font-bold text-gray-800">Configuración</h2>
648
+ <p class="text-gray-600">Administra la configuración de tu cuenta y preferencias</p>
649
+ </div>
650
+
651
+ <div class="bg-white rounded-lg shadow overflow-hidden">
652
+ <div class="border-b border-gray-200">
653
+ <nav class="flex -mb-px">
654
+ <button data-tab="profile" class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm border-primary text-primary">
655
+ Perfil
656
+ </button>
657
+ <button data-tab="account" class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">
658
+ Cuenta
659
+ </button>
660
+ <button data-tab="team" class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">
661
+ Equipo
662
+ </button>
663
+ <button data-tab="notifications" class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">
664
+ Notificaciones
665
+ </button>
666
+ </nav>
667
+ </div>
668
+
669
+ <!-- Profile Tab -->
670
+ <div id="profileTab" class="tab-content p-6">
671
+ <div class="md:grid md:grid-cols-3 md:gap-6">
672
+ <div class="md:col-span-1">
673
+ <h3 class="text-lg font-medium leading-6 text-gray-900">Información Personal</h3>
674
+ <p class="mt-1 text-sm text-gray-500">Actualiza tu información personal y foto de perfil.</p>
675
+ </div>
676
+ <div class="mt-5 md:mt-0 md:col-span-2">
677
+ <form>
678
+ <div class="shadow overflow-hidden sm:rounded-md">
679
+ <div class="px-4 py-5 bg-white sm:p-6">
680
+ <div class="grid grid-cols-6 gap-6">
681
+ <div class="col-span-6 sm:col-span-3">
682
+ <label for="first-name" class="block text-sm font-medium text-gray-700">Nombre</label>
683
+ <input type="text" name="first-name" id="first-name" autocomplete="given-name" class="mt-1 focus:ring-primary focus:border-primary block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
684
+ </div>
685
+
686
+ <div class="col-span-6 sm:col-span-3">
687
+ <label for="last-name" class="block text-sm font-medium text-gray-700">Apellido</label>
688
+ <input type="text" name="last-name" id="last-name" autocomplete="family-name" class="mt-1 focus:ring-primary focus:border-primary block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
689
+ </div>
690
+
691
+ <div class="col-span-6 sm:col-span-4">
692
+ <label for="email-address" class="block text-sm font-medium text-gray-700">Email</label>
693
+ <input type="text" name="email-address" id="email-address" autocomplete="email" class="mt-1 focus:ring-primary focus:border-primary block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
694
+ </div>
695
+
696
+ <div class="col-span-6 sm:col-span-4">
697
+ <label for="phone" class="block text-sm font-medium text-gray-700">Teléfono</label>
698
+ <input type="text" name="phone" id="phone" autocomplete="tel" class="mt-1 focus:ring-primary focus:border-primary block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
699
+ </div>
700
+
701
+ <div class="col-span-6">
702
+ <label class="block text-sm font-medium text-gray-700">Foto</label>
703
+ <div class="mt-1 flex items-center">
704
+ <span class="inline-block h-12 w-12 rounded-full overflow-hidden bg-gray-100">
705
+ <img id="profileImage" src="https://randomuser.me/api/portraits/women/44.jpg" alt="" class="h-full w-full text-gray-300">
706
+ </span>
707
+ <button type="button" class="ml-5 bg-white py-2 px-3 border border-gray-300 rounded-md shadow-sm text-sm leading-4 font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
708
+ Cambiar
709
+ </button>
710
+ </div>
711
+ </div>
712
+ </div>
713
+ </div>
714
+ <div class="px-4 py-3 bg-gray-50 text-right sm:px-6">
715
+ <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-primary hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
716
+ Guardar
717
+ </button>
718
+ </div>
719
+ </div>
720
+ </form>
721
+ </div>
722
+ </div>
723
+ </div>
724
+
725
+ <!-- Account Tab -->
726
+ <div id="accountTab" class="tab-content hidden p-6">
727
+ <div class="md:grid md:grid-cols-3 md:gap-6">
728
+ <div class="md:col-span-1">
729
+ <h3 class="text-lg font-medium leading-6 text-gray-900">Configuración de Cuenta</h3>
730
+ <p class="mt-1 text-sm text-gray-500">Actualiza tu información de cuenta y preferencias.</p>
731
+ </div>
732
+ <div class="mt-5 md:mt-0 md:col-span-2">
733
+ <form>
734
+ <div class="shadow overflow-hidden sm:rounded-md">
735
+ <div class="px-4 py-5 bg-white sm:p-6">
736
+ <div class="grid grid-cols-6 gap-6">
737
+ <div class="col-span-6 sm:col-span-3">
738
+ <label for="language" class="block text-sm font-medium text-gray-700">Idioma</label>
739
+ <select id="language" name="language" autocomplete="language" class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary sm:text-sm">
740
+ <option>Español</option>
741
+ <option>Inglés</option>
742
+ <option>Francés</option>
743
+ </select>
744
+ </div>
745
+
746
+ <div class="col-span-6 sm:col-span-3">
747
+ <label for="timezone" class="block text-sm font-medium text-gray-700">Zona horaria</label>
748
+ <select id="timezone" name="timezone" autocomplete="timezone" class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary sm:text-sm">
749
+ <option>UTC-05:00 (Bogotá, Lima)</option>
750
+ <option>UTC-03:00 (Buenos Aires)</option>
751
+ <option>UTC-06:00 (Ciudad de México)</option>
752
+ </select>
753
+ </div>
754
+
755
+ <div class="col-span-6 sm:col-span-4">
756
+ <label for="current-password" class="block text-sm font-medium text-gray-700">Contraseña actual</label>
757
+ <input type="password" name="current-password" id="current-password" autocomplete="current-password" class="mt-1 focus:ring-primary focus:border-primary block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
758
+ </div>
759
+
760
+ <div class="col-span-6 sm:col-span-3">
761
+ <label for="new-password" class="block text-sm font-medium text-gray-700">Nueva contraseña</label>
762
+ <input type="password" name="new-password" id="new-password" class="mt-1 focus:ring-primary focus:border-primary block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
763
+ </div>
764
+
765
+ <div class="col-span-6 sm:col-span-3">
766
+ <label for="confirm-password" class="block text-sm font-medium text-gray-700">Confirmar contraseña</label>
767
+ <input type="password" name="confirm-password" id="confirm-password" class="mt-1 focus:ring-primary focus:border-primary block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
768
+ </div>
769
+ </div>
770
+ </div>
771
+ <div class="px-4 py-3 bg-gray-50 text-right sm:px-6">
772
+ <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-primary hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
773
+ Actualizar
774
+ </button>
775
+ </div>
776
+ </div>
777
+ </form>
778
+ </div>
779
+ </div>
780
+ </div>
781
+
782
+ <!-- Team Tab -->
783
+ <div id="teamTab" class="tab-content hidden p-6">
784
+ <div class="md:grid md:grid-cols-3 md:gap-6">
785
+ <div class="md:col-span-1">
786
+ <h3 class="text-lg font-medium leading-6 text-gray-900">Gestión de Equipo</h3>
787
+ <p class="mt-1 text-sm text-gray-500">Administra los miembros de tu equipo y sus permisos.</p>
788
+ </div>
789
+ <div class="mt-5 md:mt-0 md:col-span-2">
790
+ <div class="shadow overflow-hidden sm:rounded-md">
791
+ <div class="px-4 py-5 bg-white sm:p-6">
792
+ <div class="flex justify-between items-center mb-6">
793
+ <h4 class="text-md font-medium text-gray-900">Miembros del Equipo</h4>
794
+ <button id="addTeamMemberBtn" class="px-4 py-2 bg-primary text-white rounded-md text-sm font-medium hover:bg-indigo-700">
795
+ <i class="fas fa-plus mr-1"></i> Agregar miembro
796
+ </button>
797
+ </div>
798
+
799
+ <div class="overflow-x-auto">
800
+ <table class="min-w-full divide-y divide-gray-200">
801
+ <thead class="bg-gray-50">
802
+ <tr>
803
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nombre</th>
804
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Email</th>
805
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Rol</th>
806
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Estado</th>
807
+ <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Acciones</th>
808
+ </tr>
809
+ </thead>
810
+ <tbody id="teamMembersTable" class="bg-white divide-y divide-gray-200">
811
+ <tr>
812
+ <td class="px-6 py-4 whitespace-nowrap">
813
+ <div class="flex items-center">
814
+ <div class="flex-shrink-0 h-10 w-10">
815
+ <img class="h-10 w-10 rounded-full" src="https://randomuser.me/api/portraits/women/44.jpg" alt="">
816
+ </div>
817
+ <div class="ml-4">
818
+ <div class="text-sm font-medium text-gray-900">Ana Pérez</div>
819
+ <div class="text-sm text-gray-500">Administrador</div>
820
+ </div>
821
+ </div>
822
+ </td>
823
+ <td class="px-6 py-4 whitespace-nowrap">
824
+ <div class="text-sm text-gray-900">ana@ejemplo.com</div>
825
+ </td>
826
+ <td class="px-6 py-4 whitespace-nowrap">
827
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Administrador</span>
828
+ </td>
829
+ <td class="px-6 py-4 whitespace-nowrap">
830
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Activo</span>
831
+ </td>
832
+ <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
833
+ <button class="text-indigo-600 hover:text-indigo-900 mr-3">Editar</button>
834
+ <button class="text-red-600 hover:text-red-900">Eliminar</button>
835
+ </td>
836
+ </tr>
837
+ </tbody>
838
+ </table>
839
+ </div>
840
+ </div>
841
+ </div>
842
+ </div>
843
+ </div>
844
+ </div>
845
+
846
+ <!-- Notifications Tab -->
847
+ <div id="notificationsTab" class="tab-content hidden p-6">
848
+ <div class="md:grid md:grid-cols-3 md:gap-6">
849
+ <div class="md:col-span-1">
850
+ <h3 class="text-lg font-medium leading-6 text-gray-900">Notificaciones</h3>
851
+ <p class="mt-1 text-sm text-gray-500">Configura cómo recibes las notificaciones.</p>
852
+ </div>
853
+ <div class="mt-5 md:mt-0 md:col-span-2">
854
+ <form>
855
+ <div class="shadow overflow-hidden sm:rounded-md">
856
+ <div class="px-4 py-5 bg-white space-y-6 sm:p-6">
857
+ <fieldset>
858
+ <legend class="text-base font-medium text-gray-900">Por Email</legend>
859
+ <div class="mt-4 space-y-4">
860
+ <div class="flex items-start">
861
+ <div class="flex items-center h-5">
862
+ <input id="comments" name="comments" type="checkbox" checked class="focus:ring-primary h-4 w-4 text-primary border-gray-300 rounded">
863
+ </div>
864
+ <div class="ml-3 text-sm">
865
+ <label for="comments" class="font-medium text-gray-700">Nuevos clientes</label>
866
+ <p class="text-gray-500">Recibe notificaciones cuando se agreguen nuevos clientes.</p>
867
+ </div>
868
+ </div>
869
+ <div class="flex items-start">
870
+ <div class="flex items-center h-5">
871
+ <input id="candidates" name="candidates" type="checkbox" checked class="focus:ring-primary h-4 w-4 text-primary border-gray-300 rounded">
872
+ </div>
873
+ <div class="ml-3 text-sm">
874
+ <label for="candidates" class="font-medium text-gray-700">Nuevos leads</label>
875
+ <p class="text-gray-500">Recibe notificaciones cuando se agreguen nuevos leads.</p>
876
+ </div>
877
+ </div>
878
+ <div class="flex items-start">
879
+ <div class="flex items-center h-5">
880
+ <input id="offers" name="offers" type="checkbox" class="focus:ring-primary h-4 w-4 text-primary border-gray-300 rounded">
881
+ </div>
882
+ <div class="ml-3 text-sm">
883
+ <label for="offers" class="font-medium text-gray-700">Actividades</label>
884
+ <p class="text-gray-500">Recibe notificaciones para actividades programadas.</p>
885
+ </div>
886
+ </div>
887
+ </div>
888
+ </fieldset>
889
+ <fieldset>
890
+ <legend class="text-base font-medium text-gray-900">Notificaciones Push</legend>
891
+ <div class="mt-4 space-y-4">
892
+ <div class="flex items-start">
893
+ <div class="flex items-center h-5">
894
+ <input id="push-everything" name="push-notifications" type="radio" checked class="focus:ring-primary h-4 w-4 text-primary border-gray-300">
895
+ </div>
896
+ <div class="ml-3 text-sm">
897
+ <label for="push-everything" class="font-medium text-gray-700">Todo</label>
898
+ </div>
899
+ </div>
900
+ <div class="flex items-start">
901
+ <div class="flex items-center h-5">
902
+ <input id="push-email" name="push-notifications" type="radio" class="focus:ring-primary h-4 w-4 text-primary border-gray-300">
903
+ </div>
904
+ <div class="ml-3 text-sm">
905
+ <label for="push-email" class="font-medium text-gray-700">Solo email</label>
906
+ </div>
907
+ </div>
908
+ <div class="flex items-start">
909
+ <div class="flex items-center h-5">
910
+ <input id="push-nothing" name="push-notifications" type="radio" class="focus:ring-primary h-4 w-4 text-primary border-gray-300">
911
+ </div>
912
+ <div class="ml-3 text-sm">
913
+ <label for="push-nothing" class="font-medium text-gray-700">Nada</label>
914
+ </div>
915
+ </div>
916
+ </div>
917
+ </fieldset>
918
+ </div>
919
+ <div class="px-4 py-3 bg-gray-50 text-right sm:px-6">
920
+ <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-primary hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
921
+ Guardar
922
+ </button>
923
+ </div>
924
+ </div>
925
+ </form>
926
+ </div>
927
+ </div>
928
+ </div>
929
+ </div>
930
+ </div>
931
+ </main>
932
+ </div>
933
+ </div>
934
+ </div>
935
+
936
+ <!-- Add Client Modal -->
937
+ <div id="addClientModal" class="fixed inset-0 overflow-y-auto hidden" aria-labelledby="modal-title" role="dialog" aria-modal="true">
938
+ <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
939
+ <div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
940
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
941
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
942
+ <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
943
+ <div class="sm:flex sm:items-start">
944
+ <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-indigo-100 sm:mx-0 sm:h-10 sm:w-10">
945
+ <i class="fas fa-user-plus text-indigo-600"></i>
946
+ </div>
947
+ <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full">
948
+ <h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">Agregar nuevo cliente</h3>
949
+ <div class="mt-2">
950
+ <form id="clientForm" class="space-y-4">
951
+ <div>
952
+ <label for="clientName" class="block text-sm font-medium text-gray-700">Nombre completo</label>
953
+ <input type="text" name="clientName" id="clientName" required class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
954
+ </div>
955
+ <div>
956
+ <label for="clientCompany" class="block text-sm font-medium text-gray-700">Empresa</label>
957
+ <input type="text" name="clientCompany" id="clientCompany" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
958
+ </div>
959
+ <div>
960
+ <label for="clientEmail" class="block text-sm font-medium text-gray-700">Email</label>
961
+ <input type="email" name="clientEmail" id="clientEmail" required class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
962
+ </div>
963
+ <div>
964
+ <label for="clientPhone" class="block text-sm font-medium text-gray-700">Teléfono</label>
965
+ <input type="tel" name="clientPhone" id="clientPhone" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
966
+ </div>
967
+ <div>
968
+ <label for="clientStatus" class="block text-sm font-medium text-gray-700">Estado</label>
969
+ <select name="clientStatus" id="clientStatus" class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
970
+ <option value="active">Activo</option>
971
+ <option value="inactive">Inactivo</option>
972
+ <option value="prospect">Prospecto</option>
973
+ </select>
974
+ </div>
975
+ </form>
976
+ </div>
977
+ </div>
978
+ </div>
979
+ </div>
980
+ <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
981
+ <button type="button" id="saveClientBtn" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:ml-3 sm:w-auto sm:text-sm">
982
+ Guardar
983
+ </button>
984
+ <button type="button" id="cancelClientBtn" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
985
+ Cancelar
986
+ </button>
987
+ </div>
988
+ </div>
989
+ </div>
990
+ </div>
991
+
992
+ <!-- Add Lead Modal -->
993
+ <div id="addLeadModal" class="fixed inset-0 overflow-y-auto hidden" aria-labelledby="modal-title" role="dialog" aria-modal="true">
994
+ <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
995
+ <div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
996
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
997
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
998
+ <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
999
+ <div class="sm:flex sm:items-start">
1000
+ <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-indigo-100 sm:mx-0 sm:h-10 sm:w-10">
1001
+ <i class="fas fa-list-alt text-indigo-600"></i>
1002
+ </div>
1003
+ <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full">
1004
+ <h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">Agregar nuevo lead</h3>
1005
+ <div class="mt-2">
1006
+ <form id="leadForm" class="space-y-4">
1007
+ <div>
1008
+ <label for="leadName" class="block text-sm font-medium text-gray-700">Nombre completo</label>
1009
+ <input type="text" name="leadName" id="leadName" required class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
1010
+ </div>
1011
+ <div>
1012
+ <label for="leadCompany" class="block text-sm font-medium text-gray-700">Empresa</label>
1013
+ <input type="text" name="leadCompany" id="leadCompany" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
1014
+ </div>
1015
+ <div>
1016
+ <label for="leadEmail" class="block text-sm font-medium text-gray-700">Email</label>
1017
+ <input type="email" name="leadEmail" id="leadEmail" required class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
1018
+ </div>
1019
+ <div>
1020
+ <label for="leadPhone" class="block text-sm font-medium text-gray-700">Teléfono</label>
1021
+ <input type="tel" name="leadPhone" id="leadPhone" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
1022
+ </div>
1023
+ <div>
1024
+ <label for="leadSource" class="block text-sm font-medium text-gray-700">Fuente</label>
1025
+ <select name="leadSource" id="leadSource" class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
1026
+ <option value="web">Sitio web</option>
1027
+ <option value="social">Redes sociales</option>
1028
+ <option value="referral">Referencia</option>
1029
+ <option value="event">Evento</option>
1030
+ <option value="other">Otro</option>
1031
+ </select>
1032
+ </div>
1033
+ <div>
1034
+ <label for="leadStatus" class="block text-sm font-medium text-gray-700">Estado</label>
1035
+ <select name="leadStatus" id="leadStatus" class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
1036
+ <option value="new">Nuevo</option>
1037
+ <option value="contacted">En contacto</option>
1038
+ <option value="qualified">Calificado</option>
1039
+ <option value="converted">Convertido</option>
1040
+ </select>
1041
+ </div>
1042
+ </form>
1043
+ </div>
1044
+ </div>
1045
+ </div>
1046
+ </div>
1047
+ <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
1048
+ <button type="button" id="saveLeadBtn" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:ml-3 sm:w-auto sm:text-sm">
1049
+ Guardar
1050
+ </button>
1051
+ <button type="button" id="cancelLeadBtn" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
1052
+ Cancelar
1053
+ </button>
1054
+ </div>
1055
+ </div>
1056
+ </div>
1057
+ </div>
1058
+
1059
+ <!-- Add Activity Modal -->
1060
+ <div id="addActivityModal" class="fixed inset-0 overflow-y-auto hidden" aria-labelledby="modal-title" role="dialog" aria-modal="true">
1061
+ <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
1062
+ <div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
1063
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
1064
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
1065
+ <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
1066
+ <div class="sm:flex sm:items-start">
1067
+ <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-indigo-100 sm:mx-0 sm:h-10 sm:w-10">
1068
+ <i class="fas fa-calendar-plus text-indigo-600"></i>
1069
+ </div>
1070
+ <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full">
1071
+ <h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">Agregar nueva actividad</h3>
1072
+ <div class="mt-2">
1073
+ <form id="activityForm" class="space-y-4">
1074
+ <div>
1075
+ <label for="activityType" class="block text-sm font-medium text-gray-700">Tipo de actividad</label>
1076
+ <select name="activityType" id="activityType" class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
1077
+ <option value="meeting">Reunión</option>
1078
+ <option value="call">Llamada</option>
1079
+ <option value="email">Email</option>
1080
+ <option value="task">Tarea</option>
1081
+ <option value="event">Evento</option>
1082
+ </select>
1083
+ </div>
1084
+ <div>
1085
+ <label for="activityTitle" class="block text-sm font-medium text-gray-700">Título</label>
1086
+ <input type="text" name="activityTitle" id="activityTitle" required class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
1087
+ </div>
1088
+ <div>
1089
+ <label for="activityDate" class="block text-sm font-medium text-gray-700">Fecha</label>
1090
+ <input type="date" name="activityDate" id="activityDate" required class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
1091
+ </div>
1092
+ <div>
1093
+ <label for="activityTime" class="block text-sm font-medium text-gray-700">Hora</label>
1094
+ <input type="time" name="activityTime" id="activityTime" required class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
1095
+ </div>
1096
+ <div>
1097
+ <label for="activityRelatedTo" class="block text-sm font-medium text-gray-700">Relacionado con</label>
1098
+ <select name="activityRelatedTo" id="activityRelatedTo" class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
1099
+ <option value="">Seleccionar...</option>
1100
+ <!-- Las opciones se cargarán dinámicamente -->
1101
+ </select>
1102
+ </div>
1103
+ <div>
1104
+ <label for="activityNotes" class="block text-sm font-medium text-gray-700">Notas</label>
1105
+ <textarea name="activityNotes" id="activityNotes" rows="3" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"></textarea>
1106
+ </div>
1107
+ </form>
1108
+ </div>
1109
+ </div>
1110
+ </div>
1111
+ </div>
1112
+ <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
1113
+ <button type="button" id="saveActivityBtn" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-
1114
+ </html>