Spaces:
Running
Running
Download index.html from Yandro8812/web: direct link, hf CLI and curl.
- Browser
- Download file 73.7 kB
-
https://huggingface.co/spaces/Yandro8812/web/resolve/main/index.html
- Command line
-
hf download hf://spaces/Yandro8812/web/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Yandro8812/web/resolve/main/index.html
73.7 kB
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="https://cdn.tailwindcss.com">
<title>A.X.E-JM_UNITY</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--primary: #1a237e;
--secondary: #0d47a1;
--accent: #2196f3;
--dark: #121212;
--darker: #0a0a0a;
--light: #e3f2fd;
}
body.dark-mode {
background-color: var(--dark);
color: white;
}
body.light-mode {
background-color: #f5f5f5;
color: #333;
}
.dark-mode .card {
background-color: var(--darker);
border-color: #333;
}
.dark-mode input, .dark-mode select, .dark-mode textarea {
background-color: #333;
color: white;
border-color: #555;
}
.dark-mode .sidebar {
background-color: var(--darker);
}
.dark-mode .header {
background-color: var(--primary);
}
.notification-badge {
position: absolute;
top: -5px;
right: -5px;
background-color: #f44336;
color: white;
border-radius: 50%;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
}
.sidebar-link:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.chart-container {
position: relative;
height: 300px;
width: 100%;
}
@media (max-width: 768px) {
.sidebar {
position: fixed;
z-index: 1000;
left: -250px;
transition: left 0.3s;
}
.sidebar.active {
left: 0;
}
.sidebar-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
display: none;
}
.sidebar-overlay.active {
display: block;
}
}
</style>
</head>
<body class="dark-mode">
<!-- Login Modal -->
<div id="loginModal" class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50">
<div class="bg-white dark:bg-gray-800 p-8 rounded-lg shadow-xl w-96">
<h2 class="text-2xl font-bold text-center mb-6 dark:text-white">A.X.E-JM_UNITY</h2>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2" for="username">Usuario</label>
<input type="text" id="username" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-6">
<label class="block text-gray-700 dark:text-gray-300 mb-2" for="password">Contrase帽a</label>
<input type="password" id="password" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<button id="loginBtn" class="w-full bg-blue-600 hover:bg-blue-700 text-white py-2 rounded transition duration-200">Iniciar Sesi贸n</button>
<p class="text-red-500 text-center mt-4 hidden" id="loginError">Usuario o contrase帽a incorrectos</p>
</div>
</div>
<!-- Main Layout -->
<div class="flex h-screen overflow-hidden hidden" id="mainLayout">
<!-- Sidebar Overlay (Mobile) -->
<div class="sidebar-overlay" id="sidebarOverlay"></div>
<!-- Sidebar -->
<div class="sidebar w-64 bg-gray-900 text-white flex flex-col fixed h-full z-50" id="sidebar">
<div class="p-4 flex items-center border-b border-gray-700">
<div class="w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center text-xl font-bold">V</div>
<div class="ml-3">
<div class="font-semibold" id="currentUserDisplay">Valhensing</div>
<div class="text-xs text-gray-400">Administrador</div>
</div>
<button class="ml-auto md:hidden" id="closeSidebar">
<i class="fas fa-times"></i>
</button>
</div>
<div class="flex-1 overflow-y-auto py-4">
<div class="px-4 mb-6">
<div class="text-xs uppercase text-gray-500 mb-2">Navegaci贸n</div>
<a href="#" class="sidebar-link block py-2 px-3 rounded bg-blue-800 text-white" data-section="dashboard">
<i class="fas fa-tachometer-alt mr-2"></i> Dashboard
</a>
<a href="#" class="sidebar-link block py-2 px-3 rounded hover:bg-gray-800 mt-1" data-section="clients">
<i class="fas fa-users mr-2"></i> Clientes
</a>
<a href="#" class="sidebar-link block py-2 px-3 rounded hover:bg-gray-800 mt-1" data-section="services">
<i class="fas fa-server mr-2"></i> Servicios
</a>
<a href="#" class="sidebar-link block py-2 px-3 rounded hover:bg-gray-800 mt-1" data-section="finances">
<i class="fas fa-chart-line mr-2"></i> Finanzas
</a>
<a href="#" class="sidebar-link block py-2 px-3 rounded hover:bg-gray-800 mt-1" data-section="reports">
<i class="fas fa-file-alt mr-2"></i> Reportes
</a>
<a href="#" class="sidebar-link block py-2 px-3 rounded hover:bg-gray-800 mt-1" data-section="settings">
<i class="fas fa-cog mr-2"></i> Configuraci贸n
</a>
</div>
<div class="px-4 mb-6">
<div class="text-xs uppercase text-gray-500 mb-2">Acciones R谩pidas</div>
<button class="w-full bg-blue-600 hover:bg-blue-700 text-white py-2 px-3 rounded text-left mb-2" id="addClientBtn">
<i class="fas fa-user-plus mr-2"></i> Agregar Cliente
</button>
<button class="w-full bg-green-600 hover:bg-green-700 text-white py-2 px-3 rounded text-left" id="addServiceBtn">
<i class="fas fa-plus-circle mr-2"></i> Agregar Servicio
</button>
</div>
</div>
<div class="p-4 border-t border-gray-700">
<button class="w-full flex items-center justify-between text-gray-300 hover:text-white" id="themeToggle">
<span>
<i class="fas fa-moon mr-2"></i> Modo Nocturno
</span>
<i class="fas fa-toggle-on"></i>
</button>
</div>
</div>
<!-- Main Content -->
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Header -->
<header class="bg-blue-800 text-white p-4 flex items-center justify-between shadow-md">
<button class="md:hidden" id="menuToggle">
<i class="fas fa-bars"></i>
</button>
<h1 class="text-xl font-bold" id="currentSectionTitle">Dashboard</h1>
<div class="flex items-center space-x-4">
<div class="relative">
<button class="p-2 rounded-full hover:bg-blue-700" id="notificationsBtn">
<i class="fas fa-bell"></i>
<span class="notification-badge hidden">0</span>
</button>
<div class="absolute right-0 mt-2 w-80 bg-white dark:bg-gray-800 rounded shadow-xl z-50 hidden" id="notificationsDropdown">
<div class="p-4 border-b dark:border-gray-700">
<h3 class="font-semibold dark:text-white">Notificaciones</h3>
</div>
<div class="max-h-60 overflow-y-auto" id="notificationsList">
<!-- Notifications will be added here -->
</div>
<div class="p-2 text-center border-t dark:border-gray-700">
<a href="#" class="text-blue-500 text-sm">Ver todas</a>
</div>
</div>
</div>
<div class="relative">
<button class="flex items-center space-x-2" id="userMenuBtn">
<div class="w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center text-sm font-bold" id="userAvatar">V</div>
<span class="hidden md:inline" id="usernameDisplay">Valhensing</span>
</button>
<div class="absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 rounded shadow-xl z-50 hidden" id="userMenuDropdown">
<a href="#" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 dark:text-white" data-section="profile">
<i class="fas fa-user mr-2"></i> Perfil
</a>
<a href="#" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 dark:text-white" id="logoutBtn">
<i class="fas fa-sign-out-alt mr-2"></i> Cerrar Sesi贸n
</a>
</div>
</div>
</div>
</header>
<!-- Content -->
<main class="flex-1 overflow-y-auto p-4 bg-gray-100 dark:bg-gray-900">
<!-- Dashboard Section -->
<div id="dashboardSection">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 dark:text-gray-400">Clientes Activos</p>
<h3 class="text-2xl font-bold dark:text-white" id="activeClientsCount">0</h3>
</div>
<div class="p-3 rounded-full bg-blue-100 dark:bg-blue-900 text-blue-600 dark:text-blue-300">
<i class="fas fa-users text-xl"></i>
</div>
</div>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 dark:text-gray-400">Ingresos Mensuales</p>
<h3 class="text-2xl font-bold dark:text-white" id="monthlyIncome">$0.00</h3>
</div>
<div class="p-3 rounded-full bg-green-100 dark:bg-green-900 text-green-600 dark:text-green-300">
<i class="fas fa-dollar-sign text-xl"></i>
</div>
</div>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 dark:text-gray-400">Servicios Activos</p>
<h3 class="text-2xl font-bold dark:text-white" id="activeServicesCount">0</h3>
</div>
<div class="p-3 rounded-full bg-purple-100 dark:bg-purple-900 text-purple-600 dark:text-purple-300">
<i class="fas fa-server text-xl"></i>
</div>
</div>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 dark:text-gray-400">Tasa de Cambio</p>
<h3 class="text-2xl font-bold dark:text-white" id="exchangeRate">1 USD = 370 CUP</h3>
</div>
<div class="p-3 rounded-full bg-yellow-100 dark:bg-yellow-900 text-yellow-600 dark:text-yellow-300">
<i class="fas fa-exchange-alt text-xl"></i>
</div>
</div>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
<div class="lg:col-span-2 card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Ingresos Mensuales</h3>
<div class="chart-container">
<canvas id="incomeChart"></canvas>
</div>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Pr贸ximos Vencimientos</h3>
<div class="space-y-4" id="upcomingPayments">
<!-- Upcoming payments will be added here -->
</div>
</div>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Actividad Reciente</h3>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-700">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Usuario</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Acci贸n</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Fecha</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700" id="activityLog">
<!-- Activity log will be added here -->
</tbody>
</table>
</div>
</div>
</div>
<!-- Clients Section -->
<div id="clientsSection" class="hidden">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold dark:text-white">Gesti贸n de Clientes</h2>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded" id="addNewClientBtn">
<i class="fas fa-user-plus mr-2"></i> Nuevo Cliente
</button>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6 mb-6">
<div class="flex flex-col md:flex-row md:items-center md:justify-between mb-4">
<div class="mb-4 md:mb-0">
<label for="clientSearch" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Buscar Cliente</label>
<div class="relative">
<input type="text" id="clientSearch" class="w-full md:w-64 px-4 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white" placeholder="Nombre o IP...">
<button class="absolute right-3 top-2 text-gray-400">
<i class="fas fa-search"></i>
</button>
</div>
</div>
<div>
<label for="clientFilter" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Filtrar por Servicio</label>
<select id="clientFilter" class="w-full md:w-48 px-4 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
<option value="all">Todos</option>
<option value="emby">Emby</option>
<option value="internet">Internet</option>
<option value="both">Ambos</option>
</select>
</div>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-700">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Nombre</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Direcci贸n IP</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Servicios</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Vencimiento</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Pago Mensual</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Acciones</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700" id="clientsTable">
<!-- Clients will be added here -->
</tbody>
</table>
</div>
<div class="flex justify-between items-center mt-4">
<div class="text-sm text-gray-500 dark:text-gray-400">
Mostrando <span id="clientsShowing">0</span> de <span id="clientsTotal">0</span> clientes
</div>
<div class="flex space-x-2">
<button class="px-3 py-1 border rounded dark:border-gray-600 disabled:opacity-50" id="prevClientPage" disabled>
<i class="fas fa-chevron-left"></i>
</button>
<button class="px-3 py-1 border rounded dark:border-gray-600 disabled:opacity-50" id="nextClientPage" disabled>
<i class="fas fa-chevron-right"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Services Section -->
<div id="servicesSection" class="hidden">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold dark:text-white">Gesti贸n de Servicios</h2>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded" id="addNewServiceBtn">
<i class="fas fa-plus-circle mr-2"></i> Nuevo Servicio
</button>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Servicio Emby</h3>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Precio (CUP)</label>
<div class="flex">
<input type="text" id="embyPrice" class="flex-1 px-3 py-2 border rounded-l dark:bg-gray-700 dark:border-gray-600 dark:text-white" value="500">
<span class="px-3 py-2 bg-gray-200 dark:bg-gray-600 dark:text-white border-t border-b border-r rounded-r">CUP</span>
</div>
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Precio (USD)</label>
<div class="flex">
<input type="text" id="embyPriceUsd" class="flex-1 px-3 py-2 border rounded-l dark:bg-gray-700 dark:border-gray-600 dark:text-white" readonly>
<span class="px-3 py-2 bg-gray-200 dark:bg-gray-600 dark:text-white border-t border-b border-r rounded-r">USD</span>
</div>
</div>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded w-full" id="updateEmbyPrice">
<i class="fas fa-save mr-2"></i> Actualizar Precio
</button>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Servicio Internet</h3>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Precio por MB (USD)</label>
<div class="flex">
<input type="text" id="internetPrice" class="flex-1 px-3 py-2 border rounded-l dark:bg-gray-700 dark:border-gray-600 dark:text-white" value="10">
<span class="px-3 py-2 bg-gray-200 dark:bg-gray-600 dark:text-white border-t border-b border-r rounded-r">USD</span>
</div>
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Precio (CUP)</label>
<div class="flex">
<input type="text" id="internetPriceCup" class="flex-1 px-3 py-2 border rounded-l dark:bg-gray-700 dark:border-gray-600 dark:text-white" readonly>
<span class="px-3 py-2 bg-gray-200 dark:bg-gray-600 dark:text-white border-t border-b border-r rounded-r">CUP</span>
</div>
</div>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded w-full" id="updateInternetPrice">
<i class="fas fa-save mr-2"></i> Actualizar Precio
</button>
</div>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Todos los Servicios</h3>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-700">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Servicio</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Precio (USD)</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Precio (CUP)</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Clientes</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Acciones</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700" id="servicesTable">
<!-- Services will be added here -->
</tbody>
</table>
</div>
</div>
</div>
<!-- Finances Section -->
<div id="financesSection" class="hidden">
<h2 class="text-2xl font-bold mb-6 dark:text-white">Gesti贸n Financiera</h2>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Tasa de Cambio</h3>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">1 USD equivale a</label>
<div class="flex">
<input type="text" id="exchangeRateInput" class="flex-1 px-3 py-2 border rounded-l dark:bg-gray-700 dark:border-gray-600 dark:text-white" value="370">
<span class="px-3 py-2 bg-gray-200 dark:bg-gray-600 dark:text-white border-t border-b border-r rounded-r">CUP</span>
</div>
</div>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded w-full" id="updateExchangeRate">
<i class="fas fa-sync-alt mr-2"></i> Actualizar Tasa
</button>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Historial de Tasas</h3>
<div class="overflow-y-auto max-h-48">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-700">
<tr>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Fecha</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Tasa</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Usuario</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700" id="exchangeHistory">
<!-- Exchange history will be added here -->
</tbody>
</table>
</div>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Resumen Financiero</h3>
<div class="space-y-3">
<div class="flex justify-between">
<span class="text-gray-600 dark:text-gray-400">Ingresos Mensuales (USD):</span>
<span class="font-semibold dark:text-white" id="monthlyIncomeUsd">$0.00</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600 dark:text-gray-400">Ingresos Mensuales (CUP):</span>
<span class="font-semibold dark:text-white" id="monthlyIncomeCup">$0.00</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600 dark:text-gray-400">Ingresos Anuales (USD):</span>
<span class="font-semibold dark:text-white" id="yearlyIncomeUsd">$0.00</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600 dark:text-gray-400">Ingresos Anuales (CUP):</span>
<span class="font-semibold dark:text-white" id="yearlyIncomeCup">$0.00</span>
</div>
</div>
</div>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6 mb-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold dark:text-white">Historial de Ingresos</h3>
<div class="flex space-x-2">
<select id="financeFilter" class="px-3 py-1 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
<option value="daily">Diario</option>
<option value="monthly">Mensual</option>
<option value="yearly">Anual</option>
</select>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded" id="exportFinanceBtn">
<i class="fas fa-file-export mr-1"></i> Exportar
</button>
</div>
</div>
<div class="chart-container">
<canvas id="financeChart"></canvas>
</div>
</div>
</div>
<!-- Reports Section -->
<div id="reportsSection" class="hidden">
<h2 class="text-2xl font-bold mb-6 dark:text-white">Reportes y Facturas</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Generar Reporte</h3>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Tipo de Reporte</label>
<select id="reportType" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
<option value="clients">Clientes</option>
<option value="services">Servicios</option>
<option value="finances">Finanzas</option>
</select>
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Per铆odo</label>
<select id="reportPeriod" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
<option value="current_month">Mes Actual</option>
<option value="last_month">Mes Anterior</option>
<option value="current_year">A帽o Actual</option>
<option value="custom">Personalizado</option>
</select>
</div>
<div class="grid grid-cols-2 gap-4 mb-4 hidden" id="customDateRange">
<div>
<label class="block text-gray-700 dark:text-gray-300 mb-2">Desde</label>
<input type="date" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div>
<label class="block text-gray-700 dark:text-gray-300 mb-2">Hasta</label>
<input type="date" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
</div>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded w-full" id="generateReportBtn">
<i class="fas fa-file-alt mr-2"></i> Generar Reporte
</button>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Generar Factura</h3>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Cliente</label>
<select id="invoiceClient" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
<!-- Clients will be added here -->
</select>
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Per铆odo</label>
<select id="invoicePeriod" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
<option value="current_month">Mes Actual</option>
<option value="next_month">Pr贸ximo Mes</option>
<option value="custom">Personalizado</option>
</select>
</div>
<button class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded w-full" id="generateInvoiceBtn">
<i class="fas fa-file-invoice-dollar mr-2"></i> Generar Factura
</button>
</div>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Reportes Generados</h3>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-700">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Tipo</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Per铆odo</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Fecha</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Acciones</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700" id="reportsTable">
<!-- Reports will be added here -->
</tbody>
</table>
</div>
</div>
</div>
<!-- Settings Section -->
<div id="settingsSection" class="hidden">
<h2 class="text-2xl font-bold mb-6 dark:text-white">Configuraci贸n del Sistema</h2>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Perfil de Usuario</h3>
<div class="flex flex-col items-center mb-4">
<div class="relative mb-3">
<img src="https://via.placeholder.com/150" alt="Profile" class="w-24 h-24 rounded-full object-cover" id="profileImage">
<button class="absolute bottom-0 right-0 bg-blue-600 text-white p-2 rounded-full hover:bg-blue-700" id="changeProfileImage">
<i class="fas fa-camera"></i>
</button>
<input type="file" id="profileImageInput" class="hidden" accept="image/*">
</div>
<h4 class="text-xl font-semibold dark:text-white" id="profileUsername">Valhensing</h4>
<p class="text-gray-500 dark:text-gray-400">Administrador</p>
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Nombre Completo</label>
<input type="text" id="profileName" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white" value="Valhensing">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Correo Electr贸nico</label>
<input type="email" id="profileEmail" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white" value="valhensing@example.com">
</div>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded w-full" id="updateProfileBtn">
<i class="fas fa-save mr-2"></i> Actualizar Perfil
</button>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Cambiar Contrase帽a</h3>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Contrase帽a Actual</label>
<input type="password" id="currentPassword" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Nueva Contrase帽a</label>
<input type="password" id="newPassword" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Confirmar Nueva Contrase帽a</label>
<input type="password" id="confirmPassword" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded w-full" id="changePasswordBtn">
<i class="fas fa-key mr-2"></i> Cambiar Contrase帽a
</button>
</div>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Administradores</h3>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-700">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Nombre</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Usuario</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Correo</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Acciones</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700" id="adminsTable">
<!-- Admins will be added here -->
</tbody>
</table>
</div>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded mt-4" id="addAdminBtn">
<i class="fas fa-user-plus mr-2"></i> Agregar Administrador
</button>
</div>
</div>
<!-- Profile Section -->
<div id="profileSection" class="hidden">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold dark:text-white">Mi Perfil</h2>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded" id="editProfileBtn">
<i class="fas fa-edit mr-2"></i> Editar Perfil
</button>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<div class="lg:col-span-1">
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<div class="flex flex-col items-center">
<img src="https://via.placeholder.com/150" alt="Profile" class="w-32 h-32 rounded-full object-cover mb-4" id="profileViewImage">
<h3 class="text-xl font-semibold dark:text-white" id="profileViewName">Valhensing</h3>
<p class="text-gray-500 dark:text-gray-400 mb-4">Administrador</p>
<div class="w-full border-t border-gray-200 dark:border-gray-700 pt-4">
<div class="flex justify-between mb-2">
<span class="text-gray-600 dark:text-gray-400">Usuario:</span>
<span class="font-medium dark:text-white" id="profileViewUsername">valhensing</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-gray-600 dark:text-gray-400">Correo:</span>
<span class="font-medium dark:text-white" id="profileViewEmail">valhensing@example.com</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600 dark:text-gray-400">脷ltimo acceso:</span>
<span class="font-medium dark:text-white" id="profileViewLastLogin">Hoy, 10:30 AM</span>
</div>
</div>
</div>
</div>
</div>
<div class="lg:col-span-2">
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6 mb-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Actividad Reciente</h3>
<div class="space-y-4" id="profileActivity">
<!-- Profile activity will be added here -->
</div>
</div>
<div class="card bg-white dark:bg-gray-800 rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4 dark:text-white">Cambiar Contrase帽a</h3>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Contrase帽a Actual</label>
<input type="password" id="profileCurrentPassword" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Nueva Contrase帽a</label>
<input type="password" id="profileNewPassword" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Confirmar Nueva Contrase帽a</label>
<input type="password" id="profileConfirmPassword" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded" id="profileChangePasswordBtn">
<i class="fas fa-key mr-2"></i> Cambiar Contrase帽a
</button>
</div>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="bg-gray-800 text-white p-4 text-center text-sm">
<p>A.X.E-JM_UNITY v1.0.0 - Dise帽ado por Valhensing - Todos los Derechos Reservados 2025</p>
</footer>
</div>
</div>
<!-- Add Client Modal -->
<div id="addClientModal" class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50 hidden">
<div class="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl w-full max-w-md">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold dark:text-white">Agregar Nuevo Cliente</h3>
<button class="text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200" id="closeAddClientModal">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Nombre de Usuario</label>
<input type="text" id="clientName" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Direcci贸n IP</label>
<input type="text" id="clientIp" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white" placeholder="Ej: 192.168.1.1">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Servicios</label>
<div class="space-y-2">
<div class="flex items-center">
<input type="checkbox" id="serviceEmby" class="mr-2" checked>
<label for="serviceEmby" class="dark:text-gray-300">Emby (500 CUP)</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="serviceInternet" class="mr-2">
<label for="serviceInternet" class="dark:text-gray-300">Internet</label>
<input type="number" id="internetMbps" class="ml-2 w-20 px-2 py-1 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white hidden" placeholder="MB">
</div>
</div>
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Fecha de Inicio</label>
<input type="date" id="clientStartDate" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="flex justify-end space-x-3">
<button class="px-4 py-2 border rounded dark:border-gray-600 dark:text-white" id="cancelAddClient">Cancelar</button>
<button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded" id="saveClientBtn">Guardar Cliente</button>
</div>
</div>
</div>
<!-- Add Service Modal -->
<div id="addServiceModal" class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50 hidden">
<div class="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl w-full max-w-md">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold dark:text-white">Agregar Nuevo Servicio</h3>
<button class="text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200" id="closeAddServiceModal">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Nombre del Servicio</label>
<input type="text" id="serviceName" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Precio (USD)</label>
<input type="text" id="servicePriceUsd" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white" placeholder="0.00">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Precio (CUP)</label>
<input type="text" id="servicePriceCup" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white" placeholder="0.00">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Descripci贸n</label>
<textarea id="serviceDescription" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white" rows="3"></textarea>
</div>
<div class="flex justify-end space-x-3">
<button class="px-4 py-2 border rounded dark:border-gray-600 dark:text-white" id="cancelAddService">Cancelar</button>
<button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded" id="saveServiceBtn">Guardar Servicio</button>
</div>
</div>
</div>
<!-- Add Admin Modal -->
<div id="addAdminModal" class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50 hidden">
<div class="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl w-full max-w-md">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold dark:text-white">Agregar Administrador</h3>
<button class="text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200" id="closeAddAdminModal">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Nombre Completo</label>
<input type="text" id="adminFullName" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Nombre de Usuario</label>
<input type="text" id="adminUsername" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Correo Electr贸nico</label>
<input type="email" id="adminEmail" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Contrase帽a</label>
<input type="password" id="adminPassword" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Confirmar Contrase帽a</label>
<input type="password" id="adminConfirmPassword" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="flex justify-end space-x-3">
<button class="px-4 py-2 border rounded dark:border-gray-600 dark:text-white" id="cancelAddAdmin">Cancelar</button>
<button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded" id="saveAdminBtn">Guardar Administrador</button>
</div>
</div>
</div>
<!-- Edit Client Modal -->
<div id="editClientModal" class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50 hidden">
<div class="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl w-full max-w-md">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold dark:text-white">Editar Cliente</h3>
<button class="text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200" id="closeEditClientModal">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Nombre de Usuario</label>
<input type="text" id="editClientName" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Direcci贸n IP</label>
<input type="text" id="editClientIp" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Servicios</label>
<div class="space-y-2">
<div class="flex items-center">
<input type="checkbox" id="editServiceEmby" class="mr-2">
<label for="editServiceEmby" class="dark:text-gray-300">Emby (500 CUP)</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="editServiceInternet" class="mr-2">
<label for="editServiceInternet" class="dark:text-gray-300">Internet</label>
<input type="number" id="editInternetMbps" class="ml-2 w-20 px-2 py-1 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white hidden" placeholder="MB">
</div>
</div>
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Fecha de Vencimiento</label>
<input type="date" id="editClientExpiry" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="flex justify-end space-x-3">
<button class="px-4 py-2 border rounded dark:border-gray-600 dark:text-white" id="cancelEditClient">Cancelar</button>
<button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded" id="updateClientBtn">Actualizar Cliente</button>
<button class="px-4 py-2 bg-red-600 hover:bg-red-700 text-white rounded" id="deleteClientBtn">Eliminar</button>
</div>
</div>
</div>
<!-- Edit Service Modal -->
<div id="editServiceModal" class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50 hidden">
<div class="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl w-full max-w-md">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold dark:text-white">Editar Servicio</h3>
<button class="text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200" id="closeEditServiceModal">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Nombre del Servicio</label>
<input type="text" id="editServiceName" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Precio (USD)</label>
<input type="text" id="editServicePriceUsd" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Precio (CUP)</label>
<input type="text" id="editServicePriceCup" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white">
</div>
<div class="mb-4">
<label class="block text-gray-700 dark:text-gray-300 mb-2">Descripci贸n</label>
<textarea id="editServiceDescription" class="w-full px-3 py-2 border rounded dark:bg-gray-700 dark:border-gray-600 dark:text-white" rows="3"></textarea>
</div>
<div class="flex justify-end space-x-3">
<button class="px-4 py-2 border rounded dark:border-gray-600 dark:text-white" id="cancelEditService">Cancelar</button>
<button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded" id="updateServiceBtn">Actualizar Servicio</button>
<button class="px-4 py-2 bg-red-600 hover:bg-red-700 text-white rounded" id="deleteServiceBtn">Eliminar</button>
</div>
</div>
</div>
<!-- Invoice Modal -->
<div id="invoiceModal" class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50 hidden overflow-y-auto">
<div class="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl w-full max-w-4xl my-8">
<div class="flex justify-between items-center mb-6">
<h3 class="text-xl font-bold dark:text-white">Factura</h3>
<div class="flex space-x-3">
<button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded" id="printInvoiceBtn">
<i class="fas fa-print mr-2"></i> Imprimir
</button>
<button class="px-4 py-2 bg-green-600 hover:bg-green-700 text-white rounded" id="downloadInvoiceBtn">
<i class="fas fa-download mr-2"></i> Descargar
</button>
<button class="text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200" id="closeInvoiceModal">
<i class="fas fa-times"></i>
</button>
</div>
</div>
<div class="invoice-content" id="invoiceContent">
<div class="flex justify-between mb-8">
<div>
<h2 class="text-2xl font-bold dark:text-white">A.X.E-JM_UNITY</h2>
<p class="text-gray-600 dark:text-gray-400">Servicios de Internet y Entretenimiento</p>
</div>
<div class="text-right">
<h3 class="text-xl font-semibold dark:text-white">FACTURA</h3>
<p class="text-gray-600 dark:text-gray-400">#<span id="invoiceNumber">001</span></p>
<p class="text-gray-600 dark:text-gray-400">Fecha: <span id="invoiceDate">01/01/2023</span></p>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-8 mb-8">
<div>
<h4 class="font-semibold dark:text-white mb-2">De:</h4>
<p class="text-gray-600 dark:text-gray-400">A.X.E-JM_UNITY</p>
<p class="text-gray-600 dark:text-gray-400">Direcci贸n: [Direcci贸n de la Empresa]</p>
<p class="text-gray-600 dark:text-gray-400">Tel茅fono: [Tel茅fono de la Empresa]</p>
<p class="text-gray-600 dark:text-gray-400">Email: [Email de la Empresa]</p>
</div>
<div>
<h4 class="font-semibold dark:text-white mb-2">Para:</h4>
<p class="text-gray-600 dark:text-gray-400" id="invoiceClientName">[Nombre del Cliente]</p>
<p class="text-gray-600 dark:text-gray-400" id="invoiceClientIp">IP: [IP del Cliente]</p>
</div>
</div>
<div class="mb-8">
<h4 class="font-semibold dark:text-white mb-2">Per铆odo Facturado:</h4>
<p class="text-gray-600 dark:text-gray-400" id="invoicePeriodText">01/01/2023 - 31/01/2023</p>
</div>
<div class="overflow-x-auto mb-8">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-700">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Descripci贸n</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Precio Unitario</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Cantidad</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Total</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700" id="invoiceItems">
<!-- Invoice items will be added here -->
</tbody>
</table>
</div>
<div class="flex justify-end mb-8">
<div class="w-64">
<div class="flex justify-between py-2 border-b dark:border-gray-700">
<span class="font-semibold dark:text-white">Subtotal:</span>
<span class="dark:text-white" id="invoiceSubtotal">$0.00</span>
</div>
<div class="flex justify-between py-2 border-b dark:border-gray-700">
<span class="font-semibold dark:text-white">Impuestos:</span>
<span class="dark:text-white" id="invoiceTax">$0.00</span>
</div>
<div class="flex justify-between py-2">
<span class="font-semibold dark:text-white">Total:</span>
<span class="font-bold text-lg dark:text-white" id="invoiceTotal">$0.00</span>
</div>
</div>
</div>
<div class="text-center text-gray-500 dark:text-gray-400 text-sm">
<p>Gracias por su preferencia. Por favor realice el pago antes de la fecha de vencimiento.</p>
<p class="mt-2">Fecha de vencimiento: <span id="invoiceDueDate">15/01/2023</span></p>
</div>
</div>
</div>
</div>
<script>
// Global variables
let currentUser = null;
let clients = [];
let services = [
{ id: 1, name: 'Emby', priceUsd: 1.35, priceCup: 500, description: 'Servicio de streaming Emby' },
{ id: 2, name: 'Internet', priceUsd: 10, priceCup: 3700, description: 'Internet por MB', perMbps: true }
];
let admins = [
{ id: 1, name: 'Valhensing', username: 'Valhensing', email: 'valhensing@example.com', password: '881204', avatar: 'V' },
{ id: 2, name: 'Admin', username: 'Admin', email: 'admin@example.com', password: 'Atenas40', avatar: 'A' }
];
let exchangeRate = 370;
let exchangeHistory = [
{ date: '2023-01-01', rate: 370, user: 'Valhensing' },
{ date: '2023-02-15', rate: 370, user: 'Admin' }
];
let activityLog = [];
let notifications = [];
let currentClientPage = 1;
const clientsPerPage = 10;
// DOM Elements
const loginModal = document.getElementById('loginModal');
const mainLayout = document.getElementById('mainLayout');
const usernameInput = document.getElementById('username');
const passwordInput = document.getElementById('password');
const loginBtn = document.getElementById('loginBtn');
const loginError = document.getElementById('loginError');
const logoutBtn = document.getElementById('logoutBtn');
const currentUserDisplay = document.getElementById('currentUserDisplay');
const usernameDisplay = document.getElementById('usernameDisplay');
const userAvatar = document.getElementById('userAvatar');
const themeToggle = document.getElementById('themeToggle');
const menuToggle = document.getElementById('menuToggle');
const sidebar = document.getElementById('sidebar');
const sidebarOverlay = document.getElementById('sidebarOverlay');
const closeSidebar = document.getElementById('closeSidebar');
const notificationsBtn = document.getElementById('notificationsBtn');
const notificationsDropdown = document.getElementById('notificationsDropdown');
const notificationsList = document.getElementById('notificationsList');
const notificationBadge = document.querySelector('.notification-badge');
const userMenuBtn = document.getElementById('userMenuBtn');
const userMenuDropdown = document.getElementById('userMenuDropdown');
const currentSectionTitle = document.getElementById('currentSectionTitle');
// Section elements
const sections = {
dashboard: document.getElementById('dashboardSection'),
clients: document.getElementById('clientsSection'),
services: document.getElementById('servicesSection'),
finances: document.getElementById('financesSection'),
reports: document.getElementById('reportsSection'),
settings: document.getElementById('settingsSection'),
profile: document.getElementById('profileSection')
};
// Sidebar links
const
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 馃К <a href="https://enzostvs-deepsite.hf.space?remix=Yandro8812/web" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="https://cdn.tailwindcss.com">
<title>A.X.E-JM_UNITY</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--primary: #1a237e;
--secondary: #0d47a1;
--accent: #2196f3;
--dark: #121212;
--darker: #0a0a0a;
--light: #e3f2fd;
}
body.dark-mode {
background-color: var(--dark);
color: white;
}
body.light-mode {
background-color: #f5f5f5;
color: #333;
}
.dark-mode .card {
background-color: var(--darker);
border-color: #333;
}
.dark-mode input, .dark-mode select, .dark-mode textarea {
background-color: #333;
color: white;
border-color: #555;
}
.dark-mode .sidebar {
background-color: var(--darker);
}
.dark-mode .header {
background-color: var(--primary);
}
.notification-badge {
position: absolute;
top: -5px;
right: -5px;
background-color: #f44336;
color: white;
border-radius: 50%;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
}
.sidebar-link:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.chart-container {
position: relative;
height: 300px;
width: 100%;
}
@media (max-width: 768px) {
.sidebar {
position: fixed;
z-index: 1000;
left: -250px;
transition: left 0.3s;
}
.sidebar.active {
left: 0;
}
.sidebar-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
display: none;
}
.sidebar-overlay.active {
display: block;