Files
web/proteccion.html
2026-04-02 19:11:50 +00:00

943 lines
63 KiB
HTML

<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Seguros SaaS - IntegraRepara</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<style>
.fade-in { animation: fadeIn 0.2s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.tab-btn { transition: all 0.25s ease; border-bottom: 2px solid transparent; }
.tab-btn.active { color: #2563eb; border-color: #2563eb; background-color: #eff6ff; }
.subtab-btn { transition: all 0.2s ease; }
.subtab-btn.active { background: #1d4ed8; color: white; box-shadow: 0 8px 24px rgba(37,99,235,.18); }
.glass { backdrop-filter: blur(10px); }
</style>
</head>
<body class="bg-gray-100 text-gray-800 font-sans h-screen overflow-hidden flex">
<div id="sidebar-container" class="h-full shrink-0"></div>
<div class="flex-1 flex flex-col h-full min-w-0">
<div id="header-container"></div>
<main class="flex-1 flex flex-col overflow-hidden relative p-6 gap-6">
<section class="bg-white p-6 rounded-2xl shadow-sm border border-gray-200 shrink-0">
<div class="flex flex-col xl:flex-row xl:items-center justify-between gap-5">
<div class="flex items-center gap-4 min-w-0">
<div class="w-14 h-14 rounded-2xl bg-blue-600 text-white flex items-center justify-center shadow-lg shrink-0">
<i data-lucide="shield" class="w-7 h-7"></i>
</div>
<div class="min-w-0">
<div class="flex flex-wrap items-center gap-2 mb-1">
<h1 class="text-2xl font-black tracking-tight text-gray-900">Seguros / Planes de Protección</h1>
<span class="px-2.5 py-1 rounded-full bg-emerald-50 text-emerald-700 text-[10px] font-black uppercase tracking-widest">Módulo SaaS</span>
</div>
<p class="text-gray-500 text-sm font-semibold">Configuración avanzada de aseguradoras, planes, suscriptores, cobros, coberturas y automatizaciones.</p>
</div>
</div>
<div class="flex flex-wrap gap-3">
<button onclick="openModal('companyModal')" class="px-4 py-2.5 rounded-xl bg-white border border-gray-200 hover:border-blue-300 text-xs font-black uppercase tracking-widest flex items-center gap-2 shadow-sm">
<i data-lucide="building-2" class="w-4 h-4"></i> Nueva aseguradora
</button>
<button onclick="openModal('planModal')" class="px-4 py-2.5 rounded-xl bg-blue-600 hover:bg-blue-700 text-white text-xs font-black uppercase tracking-widest flex items-center gap-2 shadow-lg">
<i data-lucide="plus" class="w-4 h-4"></i> Nuevo plan
</button>
</div>
</div>
<div class="mt-5 flex flex-wrap gap-2 bg-gray-100 p-1.5 rounded-2xl w-fit">
<button onclick="switchTab('dashboard')" id="btn-tab-dashboard" class="tab-btn active px-4 py-2.5 rounded-xl text-[10px] font-black uppercase tracking-widest flex items-center gap-2">
<i data-lucide="layout-dashboard" class="w-3.5 h-3.5"></i> Resumen
</button>
<button onclick="switchTab('company')" id="btn-tab-company" class="tab-btn px-4 py-2.5 rounded-xl text-[10px] font-black uppercase tracking-widest flex items-center gap-2">
<i data-lucide="briefcase-business" class="w-3.5 h-3.5"></i> Aseguradora
</button>
<button onclick="switchTab('plans')" id="btn-tab-plans" class="tab-btn px-4 py-2.5 rounded-xl text-[10px] font-black uppercase tracking-widest flex items-center gap-2">
<i data-lucide="badge-euro" class="w-3.5 h-3.5"></i> Planes
</button>
<button onclick="switchTab('subscribers')" id="btn-tab-subscribers" class="tab-btn px-4 py-2.5 rounded-xl text-[10px] font-black uppercase tracking-widest flex items-center gap-2">
<i data-lucide="users" class="w-3.5 h-3.5"></i> Suscriptores
</button>
<button onclick="switchTab('billing')" id="btn-tab-billing" class="tab-btn px-4 py-2.5 rounded-xl text-[10px] font-black uppercase tracking-widest flex items-center gap-2">
<i data-lucide="credit-card" class="w-3.5 h-3.5"></i> Cobros
</button>
<button onclick="switchTab('automation')" id="btn-tab-automation" class="tab-btn px-4 py-2.5 rounded-xl text-[10px] font-black uppercase tracking-widest flex items-center gap-2">
<i data-lucide="bot" class="w-3.5 h-3.5"></i> Automatizaciones
</button>
<button onclick="switchTab('documents')" id="btn-tab-documents" class="tab-btn px-4 py-2.5 rounded-xl text-[10px] font-black uppercase tracking-widest flex items-center gap-2">
<i data-lucide="file-signature" class="w-3.5 h-3.5"></i> Contratos
</button>
</div>
</section>
<section id="tab-dashboard" class="tab-content flex-1 min-h-0 flex flex-col gap-6 fade-in overflow-hidden">
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-6 gap-4 shrink-0">
<div class="bg-white p-4 rounded-2xl border border-gray-200 shadow-sm">
<p class="text-[10px] font-black uppercase tracking-widest text-gray-400">Asegurados activos</p>
<div class="mt-2 flex items-end justify-between">
<p class="text-2xl font-black text-gray-900">1.284</p>
<span class="text-emerald-600 text-xs font-black">+6.2%</span>
</div>
</div>
<div class="bg-white p-4 rounded-2xl border border-gray-200 shadow-sm">
<p class="text-[10px] font-black uppercase tracking-widest text-gray-400">MRR</p>
<div class="mt-2 flex items-end justify-between">
<p class="text-2xl font-black text-blue-600">11.842€</p>
<span class="text-blue-600 text-xs font-black">+742€</span>
</div>
</div>
<div class="bg-white p-4 rounded-2xl border border-gray-200 shadow-sm">
<p class="text-[10px] font-black uppercase tracking-widest text-gray-400">Renovaciones 30 días</p>
<div class="mt-2 flex items-end justify-between">
<p class="text-2xl font-black text-gray-900">96</p>
<span class="text-amber-600 text-xs font-black">18 hoy</span>
</div>
</div>
<div class="bg-white p-4 rounded-2xl border border-gray-200 shadow-sm">
<p class="text-[10px] font-black uppercase tracking-widest text-gray-400">Impagos</p>
<div class="mt-2 flex items-end justify-between">
<p class="text-2xl font-black text-rose-600">14</p>
<span class="text-rose-500 text-xs font-black">2 críticos</span>
</div>
</div>
<div class="bg-white p-4 rounded-2xl border border-gray-200 shadow-sm">
<p class="text-[10px] font-black uppercase tracking-widest text-gray-400">Siniestralidad</p>
<div class="mt-2 flex items-end justify-between">
<p class="text-2xl font-black text-gray-900">23%</p>
<span class="text-gray-500 text-xs font-black">mes actual</span>
</div>
</div>
<div class="bg-white p-4 rounded-2xl border border-gray-200 shadow-sm">
<p class="text-[10px] font-black uppercase tracking-widest text-gray-400">Churn</p>
<div class="mt-2 flex items-end justify-between">
<p class="text-2xl font-black text-gray-900">1.8%</p>
<span class="text-emerald-600 text-xs font-black">controlado</span>
</div>
</div>
</div>
<div class="grid grid-cols-1 xl:grid-cols-3 gap-6 min-h-0 flex-1">
<div class="xl:col-span-2 bg-white rounded-2xl border border-gray-200 shadow-sm flex flex-col overflow-hidden min-h-0">
<div class="p-5 border-b border-gray-100 flex items-center justify-between bg-gray-50/70 shrink-0">
<div>
<h3 class="text-sm font-black tracking-tight text-gray-900">Planes más vendidos</h3>
<p class="text-xs text-gray-500 font-semibold">Distribución comercial y rentabilidad estimada.</p>
</div>
<button class="px-3 py-2 rounded-lg border border-gray-200 text-[10px] uppercase tracking-widest font-black">Exportar</button>
</div>
<div class="p-5 overflow-y-auto no-scrollbar space-y-4">
<div class="p-4 rounded-2xl bg-blue-50 border border-blue-100">
<div class="flex items-center justify-between gap-3">
<div>
<p class="text-sm font-black text-blue-900">Plan Hogar Plus</p>
<p class="text-xs font-semibold text-blue-700">Urgencias eléctricas + fontanería + 2 bricos/año</p>
</div>
<span class="px-2.5 py-1 rounded-full bg-white text-blue-700 text-[10px] font-black uppercase tracking-widest">642 activos</span>
</div>
<div class="mt-3 w-full h-2 rounded-full bg-white overflow-hidden"><div class="h-full w-[72%] bg-blue-600"></div></div>
</div>
<div class="p-4 rounded-2xl bg-emerald-50 border border-emerald-100">
<div class="flex items-center justify-between gap-3">
<div>
<p class="text-sm font-black text-emerald-900">Plan Premium 24/7</p>
<p class="text-xs font-semibold text-emerald-700">Atención prioritaria, urgencias ilimitadas con copago reducido</p>
</div>
<span class="px-2.5 py-1 rounded-full bg-white text-emerald-700 text-[10px] font-black uppercase tracking-widest">318 activos</span>
</div>
<div class="mt-3 w-full h-2 rounded-full bg-white overflow-hidden"><div class="h-full w-[48%] bg-emerald-600"></div></div>
</div>
<div class="p-4 rounded-2xl bg-amber-50 border border-amber-100">
<div class="flex items-center justify-between gap-3">
<div>
<p class="text-sm font-black text-amber-900">Plan Básico Anual</p>
<p class="text-xs font-semibold text-amber-700">1 urgencia anual + 1 brico + renovación automática</p>
</div>
<span class="px-2.5 py-1 rounded-full bg-white text-amber-700 text-[10px] font-black uppercase tracking-widest">224 activos</span>
</div>
<div class="mt-3 w-full h-2 rounded-full bg-white overflow-hidden"><div class="h-full w-[31%] bg-amber-500"></div></div>
</div>
</div>
</div>
<div class="bg-white rounded-2xl border border-gray-200 shadow-sm flex flex-col overflow-hidden min-h-0">
<div class="p-5 border-b border-gray-100 bg-gray-50/70 shrink-0">
<h3 class="text-sm font-black tracking-tight text-gray-900">Actividad reciente</h3>
<p class="text-xs text-gray-500 font-semibold">Movimientos clave del módulo.</p>
</div>
<div class="p-5 overflow-y-auto no-scrollbar space-y-4 text-sm">
<div class="flex gap-3">
<div class="w-9 h-9 rounded-xl bg-blue-100 text-blue-700 flex items-center justify-center shrink-0"><i data-lucide="file-plus-2" class="w-4 h-4"></i></div>
<div>
<p class="font-black text-gray-800">Contrato generado</p>
<p class="text-xs text-gray-500 font-semibold">PRE-HOGAR-00482 · hace 12 min</p>
</div>
</div>
<div class="flex gap-3">
<div class="w-9 h-9 rounded-xl bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0"><i data-lucide="badge-check" class="w-4 h-4"></i></div>
<div>
<p class="font-black text-gray-800">Renovación cobrada</p>
<p class="text-xs text-gray-500 font-semibold">María Ortega · 89,00€</p>
</div>
</div>
<div class="flex gap-3">
<div class="w-9 h-9 rounded-xl bg-rose-100 text-rose-700 flex items-center justify-center shrink-0"><i data-lucide="alert-triangle" class="w-4 h-4"></i></div>
<div>
<p class="font-black text-gray-800">Impago detectado</p>
<p class="text-xs text-gray-500 font-semibold">Plan Premium · reintento en 48h</p>
</div>
</div>
<div class="flex gap-3">
<div class="w-9 h-9 rounded-xl bg-amber-100 text-amber-700 flex items-center justify-center shrink-0"><i data-lucide="shield-alert" class="w-4 h-4"></i></div>
<div>
<p class="font-black text-gray-800">Cobertura agotada</p>
<p class="text-xs text-gray-500 font-semibold">Cliente 00291 · 2/2 urgencias consumidas</p>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="tab-company" class="tab-content hidden flex-1 min-h-0 fade-in overflow-y-auto no-scrollbar pb-10">
<div class="grid grid-cols-1 xl:grid-cols-3 gap-6">
<div class="xl:col-span-1 space-y-6">
<div class="bg-white p-6 rounded-2xl border border-gray-200 shadow-sm">
<div class="flex items-center gap-3 mb-5">
<div class="w-11 h-11 rounded-2xl bg-blue-100 text-blue-700 flex items-center justify-center"><i data-lucide="building-2" class="w-5 h-5"></i></div>
<div>
<h3 class="text-sm font-black text-gray-900">Identidad</h3>
<p class="text-xs text-gray-500 font-semibold">Marca, logo y estilo visual.</p>
</div>
</div>
<div class="space-y-4">
<div>
<label class="text-[10px] font-black text-gray-400 uppercase">Nombre comercial</label>
<input value="Integra Protección Hogar" class="w-full mt-1 px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm outline-none focus:ring-2 focus:ring-blue-500" />
</div>
<div>
<label class="text-[10px] font-black text-gray-400 uppercase">Razón social</label>
<input value="Integra Repara Servicios Integrales SL" class="w-full mt-1 px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm outline-none focus:ring-2 focus:ring-blue-500" />
</div>
<div class="grid grid-cols-2 gap-3">
<div>
<label class="text-[10px] font-black text-gray-400 uppercase">CIF</label>
<input value="B12345678" class="w-full mt-1 px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
</div>
<div>
<label class="text-[10px] font-black text-gray-400 uppercase">Teléfono</label>
<input value="956 000 111" class="w-full mt-1 px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
</div>
</div>
<div>
<label class="text-[10px] font-black text-gray-400 uppercase">Email operativo</label>
<input value="seguros@integrarepara.es" class="w-full mt-1 px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
</div>
<div>
<label class="text-[10px] font-black text-gray-400 uppercase">Dirección fiscal</label>
<textarea class="w-full mt-1 px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm min-h-[88px]">Av. Principal 24, 11201, Algeciras, Cádiz</textarea>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-2xl border border-gray-200 shadow-sm">
<h3 class="text-sm font-black text-gray-900 mb-4">Branding rápido</h3>
<div class="space-y-4">
<div class="grid grid-cols-3 gap-3">
<div>
<label class="text-[10px] font-black text-gray-400 uppercase">Primario</label>
<input type="color" value="#2563eb" class="w-full h-11 rounded-xl border border-gray-200 bg-white p-1 mt-1" />
</div>
<div>
<label class="text-[10px] font-black text-gray-400 uppercase">Secundario</label>
<input type="color" value="#0f172a" class="w-full h-11 rounded-xl border border-gray-200 bg-white p-1 mt-1" />
</div>
<div>
<label class="text-[10px] font-black text-gray-400 uppercase">Éxito</label>
<input type="color" value="#059669" class="w-full h-11 rounded-xl border border-gray-200 bg-white p-1 mt-1" />
</div>
</div>
<button class="w-full px-4 py-3 rounded-xl border border-dashed border-gray-300 text-xs font-black uppercase tracking-widest text-gray-500 hover:border-blue-300 hover:text-blue-600 flex items-center justify-center gap-2">
<i data-lucide="upload-cloud" class="w-4 h-4"></i> Subir logo / sello / firma
</button>
</div>
</div>
</div>
<div class="xl:col-span-2 space-y-6">
<div class="bg-white p-6 rounded-2xl border border-gray-200 shadow-sm">
<div class="flex items-center justify-between gap-3 mb-5 border-b border-gray-100 pb-4">
<div>
<h3 class="text-sm font-black text-gray-900">Configuración legal y fiscal</h3>
<p class="text-xs text-gray-500 font-semibold">Textos públicos, condiciones, pagos y cumplimiento.</p>
</div>
<button onclick="fakeSave('Aseguradora guardada')" class="px-4 py-2.5 rounded-xl bg-blue-600 text-white text-[10px] font-black uppercase tracking-widest shadow-lg">Guardar cambios</button>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="text-[10px] font-black text-gray-400 uppercase">IBAN</label>
<input value="ES12 1234 5678 9012 3456 7890" class="w-full mt-1 px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
</div>
<div>
<label class="text-[10px] font-black text-gray-400 uppercase">Pasarela Stripe</label>
<div class="mt-1 flex items-center justify-between px-4 py-3 rounded-xl bg-emerald-50 border border-emerald-100">
<span class="text-sm font-black text-emerald-700">Conectada</span>
<span class="text-[10px] font-black uppercase tracking-widest text-emerald-600">sk_live_xxx</span>
</div>
</div>
<div class="md:col-span-2">
<label class="text-[10px] font-black text-gray-400 uppercase">Cláusula RGPD</label>
<textarea class="w-full mt-1 px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-semibold text-sm min-h-[110px]">Autorizo el tratamiento de mis datos con la finalidad de gestionar mi contrato, asistencias, cobros, renovaciones y comunicaciones relacionadas con el servicio.</textarea>
</div>
<div class="md:col-span-2">
<label class="text-[10px] font-black text-gray-400 uppercase">Texto legal de aceptación</label>
<textarea class="w-full mt-1 px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-semibold text-sm min-h-[140px]">La contratación implica la aceptación de las condiciones generales y particulares del plan, límites de cobertura, carencias, exclusiones, renovaciones automáticas y política de cancelación.</textarea>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-2xl border border-gray-200 shadow-sm">
<h3 class="text-sm font-black text-gray-900 mb-5">Canales y reglas de atención</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="p-4 rounded-2xl bg-gray-50 border border-gray-200">
<p class="text-[10px] uppercase tracking-widest font-black text-gray-400 mb-2">Horario laboral</p>
<p class="text-lg font-black text-gray-900">09:00 · 14:00 / 16:00 · 19:00</p>
</div>
<div class="p-4 rounded-2xl bg-gray-50 border border-gray-200">
<p class="text-[10px] uppercase tracking-widest font-black text-gray-400 mb-2">Urgencias</p>
<p class="text-lg font-black text-rose-600">24/7 activas</p>
</div>
<div class="p-4 rounded-2xl bg-gray-50 border border-gray-200">
<p class="text-[10px] uppercase tracking-widest font-black text-gray-400 mb-2">Ámbito geográfico</p>
<p class="text-lg font-black text-gray-900">Cádiz y Málaga</p>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="tab-plans" class="tab-content hidden flex-1 min-h-0 fade-in overflow-y-auto no-scrollbar pb-10">
<div class="flex flex-col gap-6">
<div class="flex flex-col lg:flex-row justify-between gap-4">
<div class="relative w-full lg:w-80">
<i data-lucide="search" class="w-4 h-4 absolute left-3 top-3 text-gray-400"></i>
<input placeholder="Buscar plan, cobertura o campaña..." class="w-full pl-10 pr-4 py-3 rounded-xl bg-white border border-gray-200 text-sm font-bold outline-none focus:ring-2 focus:ring-blue-500" />
</div>
<div class="flex gap-3">
<button class="px-4 py-3 rounded-xl bg-white border border-gray-200 text-xs font-black uppercase tracking-widest">Duplicar plan</button>
<button onclick="openModal('planModal')" class="px-4 py-3 rounded-xl bg-blue-600 text-white text-xs font-black uppercase tracking-widest shadow-lg">Crear plan</button>
</div>
</div>
<div class="grid grid-cols-1 xl:grid-cols-3 gap-6">
<article class="bg-white rounded-2xl border border-gray-200 shadow-sm p-6">
<div class="flex items-start justify-between gap-3 mb-4">
<div>
<div class="flex items-center gap-2 mb-2">
<h3 class="text-lg font-black text-gray-900">Plan Básico</h3>
<span class="px-2 py-1 rounded-full bg-gray-100 text-gray-600 text-[10px] font-black uppercase tracking-widest">Activo</span>
</div>
<p class="text-sm font-semibold text-gray-500">Entrada sencilla para captar cartera.</p>
</div>
<button class="text-gray-400 hover:text-blue-600"><i data-lucide="pencil" class="w-4 h-4"></i></button>
</div>
<div class="space-y-3 text-sm">
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Promo anual</span><span class="font-black">59,95€</span></div>
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Renovación</span><span class="font-black text-amber-600">89,00€</span></div>
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Carencia</span><span class="font-black">15 días</span></div>
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Urgencias</span><span class="font-black">1/año</span></div>
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Bricos</span><span class="font-black">1/año</span></div>
</div>
<div class="mt-5 pt-5 border-t border-gray-100 flex flex-wrap gap-2">
<span class="px-2.5 py-1 rounded-full bg-blue-50 text-blue-700 text-[10px] font-black uppercase tracking-widest">Electricidad</span>
<span class="px-2.5 py-1 rounded-full bg-blue-50 text-blue-700 text-[10px] font-black uppercase tracking-widest">Fontanería</span>
</div>
</article>
<article class="bg-white rounded-2xl border border-blue-200 shadow-sm p-6 ring-2 ring-blue-100">
<div class="flex items-start justify-between gap-3 mb-4">
<div>
<div class="flex items-center gap-2 mb-2">
<h3 class="text-lg font-black text-gray-900">Plan Hogar Plus</h3>
<span class="px-2 py-1 rounded-full bg-blue-100 text-blue-700 text-[10px] font-black uppercase tracking-widest">Top ventas</span>
</div>
<p class="text-sm font-semibold text-gray-500">El plan más equilibrado para cartera estable.</p>
</div>
<button class="text-gray-400 hover:text-blue-600"><i data-lucide="pencil" class="w-4 h-4"></i></button>
</div>
<div class="space-y-3 text-sm">
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Promo mensual</span><span class="font-black">6,90€</span></div>
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Promo anual</span><span class="font-black">69,90€</span></div>
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Renovación</span><span class="font-black text-amber-600">99,00€</span></div>
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Urgencias</span><span class="font-black">2/año</span></div>
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Bricos</span><span class="font-black">2/año</span></div>
</div>
<div class="mt-5 pt-5 border-t border-gray-100 flex flex-wrap gap-2">
<span class="px-2.5 py-1 rounded-full bg-blue-50 text-blue-700 text-[10px] font-black uppercase tracking-widest">Electricidad</span>
<span class="px-2.5 py-1 rounded-full bg-blue-50 text-blue-700 text-[10px] font-black uppercase tracking-widest">Fontanería</span>
<span class="px-2.5 py-1 rounded-full bg-blue-50 text-blue-700 text-[10px] font-black uppercase tracking-widest">Cerrajería</span>
<span class="px-2.5 py-1 rounded-full bg-blue-50 text-blue-700 text-[10px] font-black uppercase tracking-widest">Cristalería</span>
</div>
</article>
<article class="bg-white rounded-2xl border border-gray-200 shadow-sm p-6">
<div class="flex items-start justify-between gap-3 mb-4">
<div>
<div class="flex items-center gap-2 mb-2">
<h3 class="text-lg font-black text-gray-900">Plan Premium 24/7</h3>
<span class="px-2 py-1 rounded-full bg-emerald-100 text-emerald-700 text-[10px] font-black uppercase tracking-widest">VIP</span>
</div>
<p class="text-sm font-semibold text-gray-500">Máxima cobertura con prioridad operativa.</p>
</div>
<button class="text-gray-400 hover:text-blue-600"><i data-lucide="pencil" class="w-4 h-4"></i></button>
</div>
<div class="space-y-3 text-sm">
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Mensual</span><span class="font-black">11,90€</span></div>
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Anual</span><span class="font-black">129,00€</span></div>
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Urgencias</span><span class="font-black">Ilimitadas*</span></div>
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Bricos</span><span class="font-black">4/año</span></div>
<div class="flex justify-between"><span class="text-gray-500 font-semibold">Copago</span><span class="font-black text-rose-600">Reducido</span></div>
</div>
<div class="mt-5 pt-5 border-t border-gray-100 flex flex-wrap gap-2">
<span class="px-2.5 py-1 rounded-full bg-emerald-50 text-emerald-700 text-[10px] font-black uppercase tracking-widest">24/7</span>
<span class="px-2.5 py-1 rounded-full bg-emerald-50 text-emerald-700 text-[10px] font-black uppercase tracking-widest">Prioridad</span>
<span class="px-2.5 py-1 rounded-full bg-emerald-50 text-emerald-700 text-[10px] font-black uppercase tracking-widest">Multivivienda</span>
</div>
</article>
</div>
<div class="bg-white rounded-2xl border border-gray-200 shadow-sm p-6">
<div class="flex flex-col lg:flex-row justify-between gap-4 mb-5">
<div>
<h3 class="text-sm font-black text-gray-900">Matriz de coberturas</h3>
<p class="text-xs text-gray-500 font-semibold">Control rápido de lo que incluye cada producto.</p>
</div>
<div class="flex gap-2 bg-gray-100 p-1 rounded-xl w-fit">
<button class="subtab-btn active px-3 py-2 rounded-lg text-[10px] font-black uppercase tracking-widest">Coberturas</button>
<button class="subtab-btn px-3 py-2 rounded-lg text-[10px] font-black uppercase tracking-widest">Límites</button>
<button class="subtab-btn px-3 py-2 rounded-lg text-[10px] font-black uppercase tracking-widest">Exclusiones</button>
</div>
</div>
<div class="overflow-x-auto no-scrollbar">
<table class="w-full text-left min-w-[900px]">
<thead class="text-[10px] uppercase tracking-widest font-black text-gray-400">
<tr>
<th class="py-3 pr-4">Cobertura</th>
<th class="py-3 px-4">Básico</th>
<th class="py-3 px-4">Hogar Plus</th>
<th class="py-3 px-4">Premium</th>
<th class="py-3 px-4">Copago</th>
<th class="py-3 pl-4">Observaciones</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100 text-sm font-bold text-gray-700">
<tr>
<td class="py-4 pr-4">Urgencia eléctrica</td>
<td class="px-4 text-gray-900">1/año</td>
<td class="px-4 text-blue-700">2/año</td>
<td class="px-4 text-emerald-700">Ilimitada*</td>
<td class="px-4">0€ / 0€ / 19€</td>
<td class="pl-4 text-gray-500 font-semibold">Prioridad alta en Premium</td>
</tr>
<tr>
<td class="py-4 pr-4">Fontanería urgente</td>
<td class="px-4">Incluida</td>
<td class="px-4 text-blue-700">Incluida</td>
<td class="px-4 text-emerald-700">Incluida</td>
<td class="px-4">0€</td>
<td class="pl-4 text-gray-500 font-semibold">Solo vivienda habitual salvo Premium</td>
</tr>
<tr>
<td class="py-4 pr-4">Servicio manitas</td>
<td class="px-4">1</td>
<td class="px-4 text-blue-700">2</td>
<td class="px-4 text-emerald-700">4</td>
<td class="px-4">0€</td>
<td class="pl-4 text-gray-500 font-semibold">Máx. 2 horas por visita</td>
</tr>
<tr>
<td class="py-4 pr-4">Cerrajería</td>
<td class="px-4"></td>
<td class="px-4 text-blue-700">Incluida</td>
<td class="px-4 text-emerald-700">Incluida</td>
<td class="px-4">29€ / 15€</td>
<td class="pl-4 text-gray-500 font-semibold">No incluye cambio de bombín premium especial</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="tab-subscribers" class="tab-content hidden flex-1 min-h-0 fade-in flex flex-col gap-6 overflow-hidden">
<div class="grid grid-cols-1 md:grid-cols-4 gap-4 shrink-0">
<div class="bg-white p-4 rounded-2xl border border-gray-200 shadow-sm">
<p class="text-[10px] font-black uppercase tracking-widest text-gray-400">Altas mes</p>
<p class="mt-2 text-2xl font-black text-gray-900">41</p>
</div>
<div class="bg-white p-4 rounded-2xl border border-gray-200 shadow-sm">
<p class="text-[10px] font-black uppercase tracking-widest text-gray-400">Bajas mes</p>
<p class="mt-2 text-2xl font-black text-rose-600">9</p>
</div>
<div class="bg-white p-4 rounded-2xl border border-gray-200 shadow-sm">
<p class="text-[10px] font-black uppercase tracking-widest text-gray-400">Con renovación auto</p>
<p class="mt-2 text-2xl font-black text-blue-600">88%</p>
</div>
<div class="bg-white p-4 rounded-2xl border border-gray-200 shadow-sm">
<p class="text-[10px] font-black uppercase tracking-widest text-gray-400">Cobertura agotada</p>
<p class="mt-2 text-2xl font-black text-amber-600">23</p>
</div>
</div>
<div class="flex-1 bg-white rounded-2xl border border-gray-200 shadow-sm flex flex-col overflow-hidden min-h-0">
<div class="p-4 border-b border-gray-100 bg-gray-50/70 flex flex-col lg:flex-row justify-between gap-3 shrink-0">
<div class="flex flex-col lg:flex-row gap-3 w-full lg:w-auto">
<div class="relative w-full lg:w-72">
<i data-lucide="search" class="w-4 h-4 absolute left-3 top-3 text-gray-400"></i>
<input placeholder="Buscar suscriptor, DNI, móvil..." class="w-full pl-10 pr-4 py-3 rounded-xl bg-white border border-gray-200 text-sm font-bold outline-none focus:ring-2 focus:ring-blue-500" />
</div>
<select class="px-4 py-3 rounded-xl bg-white border border-gray-200 text-sm font-bold">
<option>Todos los estados</option>
<option>Activo</option>
<option>Impagado</option>
<option>Suspendido</option>
<option>Baja</option>
</select>
<select class="px-4 py-3 rounded-xl bg-white border border-gray-200 text-sm font-bold">
<option>Todos los planes</option>
<option>Plan Básico</option>
<option>Hogar Plus</option>
<option>Premium</option>
</select>
</div>
<div class="flex gap-3">
<button class="px-4 py-3 rounded-xl border border-gray-200 bg-white text-xs font-black uppercase tracking-widest">Importar CSV</button>
<button onclick="openModal('subscriberModal')" class="px-4 py-3 rounded-xl bg-blue-600 text-white text-xs font-black uppercase tracking-widest shadow-lg">Alta manual</button>
</div>
</div>
<div class="flex-1 overflow-auto no-scrollbar">
<table class="w-full text-left min-w-[1200px]">
<thead class="sticky top-0 bg-white text-[10px] uppercase tracking-widest font-black text-gray-400 shadow-sm">
<tr>
<th class="px-6 py-4">Titular</th>
<th class="px-6 py-4">Plan</th>
<th class="px-6 py-4">Uso cobertura</th>
<th class="px-6 py-4">Pago</th>
<th class="px-6 py-4">Renovación</th>
<th class="px-6 py-4">Estado</th>
<th class="px-6 py-4 text-right">Acciones</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-50 text-sm font-bold text-gray-700">
<tr class="hover:bg-blue-50/50 transition-colors">
<td class="px-6 py-4">
<div class="flex items-center gap-3">
<div class="w-10 h-10 rounded-full bg-blue-100 text-blue-700 flex items-center justify-center text-xs font-black">MO</div>
<div>
<p class="font-black text-gray-900">María Ortega Ruiz</p>
<p class="text-[11px] text-gray-500 font-semibold">DNI 44556677P · 600223344 · 2 inmuebles</p>
</div>
</div>
</td>
<td class="px-6 py-4"><span class="px-2.5 py-1 rounded-lg bg-blue-50 text-blue-700 text-[10px] font-black uppercase tracking-widest">Hogar Plus</span></td>
<td class="px-6 py-4">
<div class="space-y-1 w-44">
<div class="flex justify-between text-[11px] text-gray-500"><span>Urgencias</span><span class="font-black">1/2</span></div>
<div class="w-full h-2 bg-gray-100 rounded-full overflow-hidden"><div class="w-1/2 h-full bg-blue-600"></div></div>
<div class="flex justify-between text-[11px] text-gray-500"><span>Bricos</span><span class="font-black">0/2</span></div>
</div>
</td>
<td class="px-6 py-4"><span class="text-emerald-600 flex items-center gap-2"><span class="w-2 h-2 rounded-full bg-emerald-500"></span>Al día</span></td>
<td class="px-6 py-4">15/05/2026</td>
<td class="px-6 py-4"><span class="px-2.5 py-1 rounded-full bg-emerald-50 text-emerald-700 text-[10px] font-black uppercase tracking-widest">Activo</span></td>
<td class="px-6 py-4 text-right">
<div class="flex justify-end gap-2">
<button class="p-2 rounded-lg hover:bg-gray-100 text-gray-500"><i data-lucide="file-text" class="w-4 h-4"></i></button>
<button class="p-2 rounded-lg hover:bg-gray-100 text-gray-500"><i data-lucide="credit-card" class="w-4 h-4"></i></button>
<button class="p-2 rounded-lg hover:bg-gray-100 text-blue-600"><i data-lucide="eye" class="w-4 h-4"></i></button>
</div>
</td>
</tr>
<tr class="hover:bg-blue-50/50 transition-colors">
<td class="px-6 py-4">
<div class="flex items-center gap-3">
<div class="w-10 h-10 rounded-full bg-amber-100 text-amber-700 flex items-center justify-center text-xs font-black">JP</div>
<div>
<p class="font-black text-gray-900">Juan Pérez García</p>
<p class="text-[11px] text-gray-500 font-semibold">DNI 12345678X · 600112233 · 1 inmueble</p>
</div>
</div>
</td>
<td class="px-6 py-4"><span class="px-2.5 py-1 rounded-lg bg-gray-100 text-gray-700 text-[10px] font-black uppercase tracking-widest">Básico</span></td>
<td class="px-6 py-4">
<div class="space-y-1 w-44">
<div class="flex justify-between text-[11px] text-gray-500"><span>Urgencias</span><span class="font-black">1/1</span></div>
<div class="w-full h-2 bg-gray-100 rounded-full overflow-hidden"><div class="w-full h-full bg-amber-500"></div></div>
<div class="text-[11px] text-amber-600 font-black">Cobertura agotada</div>
</div>
</td>
<td class="px-6 py-4"><span class="text-rose-600 flex items-center gap-2"><span class="w-2 h-2 rounded-full bg-rose-500"></span>Impagado</span></td>
<td class="px-6 py-4">02/04/2026</td>
<td class="px-6 py-4"><span class="px-2.5 py-1 rounded-full bg-rose-50 text-rose-700 text-[10px] font-black uppercase tracking-widest">Suspendido</span></td>
<td class="px-6 py-4 text-right">
<div class="flex justify-end gap-2">
<button class="p-2 rounded-lg hover:bg-gray-100 text-gray-500"><i data-lucide="bell-ring" class="w-4 h-4"></i></button>
<button class="p-2 rounded-lg hover:bg-gray-100 text-gray-500"><i data-lucide="message-circle-more" class="w-4 h-4"></i></button>
<button class="p-2 rounded-lg hover:bg-gray-100 text-blue-600"><i data-lucide="eye" class="w-4 h-4"></i></button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</section>
<section id="tab-billing" class="tab-content hidden flex-1 min-h-0 fade-in overflow-y-auto no-scrollbar pb-10">
<div class="grid grid-cols-1 xl:grid-cols-3 gap-6">
<div class="xl:col-span-2 bg-white rounded-2xl border border-gray-200 shadow-sm overflow-hidden">
<div class="p-5 border-b border-gray-100 bg-gray-50/70 flex justify-between items-center gap-3">
<div>
<h3 class="text-sm font-black text-gray-900">Cobros y reintentos</h3>
<p class="text-xs text-gray-500 font-semibold">Seguimiento de pasarela, renovaciones y recobro.</p>
</div>
<button class="px-3 py-2 rounded-lg border border-gray-200 bg-white text-[10px] uppercase tracking-widest font-black">Lanzar recobro</button>
</div>
<div class="overflow-auto no-scrollbar">
<table class="w-full min-w-[860px] text-left">
<thead class="text-[10px] uppercase tracking-widest font-black text-gray-400 bg-white sticky top-0 shadow-sm">
<tr>
<th class="px-6 py-4">Titular</th>
<th class="px-6 py-4">Concepto</th>
<th class="px-6 py-4">Importe</th>
<th class="px-6 py-4">Estado</th>
<th class="px-6 py-4">Acción siguiente</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-50 text-sm font-bold text-gray-700">
<tr>
<td class="px-6 py-4">María Ortega Ruiz</td>
<td class="px-6 py-4">Renovación anual Hogar Plus</td>
<td class="px-6 py-4">99,00€</td>
<td class="px-6 py-4"><span class="text-emerald-600">Cobrado</span></td>
<td class="px-6 py-4 text-gray-500">Recibo emitido</td>
</tr>
<tr>
<td class="px-6 py-4">Juan Pérez García</td>
<td class="px-6 py-4">Mensualidad abril</td>
<td class="px-6 py-4">8,90€</td>
<td class="px-6 py-4"><span class="text-rose-600">Fallido</span></td>
<td class="px-6 py-4 text-gray-500">Reintento en 48h + WhatsApp</td>
</tr>
<tr>
<td class="px-6 py-4">Lucía Domínguez</td>
<td class="px-6 py-4">Alta nuevo contrato</td>
<td class="px-6 py-4">69,90€</td>
<td class="px-6 py-4"><span class="text-blue-600">Pendiente</span></td>
<td class="px-6 py-4 text-gray-500">Esperando firma</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="space-y-6">
<div class="bg-white p-6 rounded-2xl border border-gray-200 shadow-sm">
<h3 class="text-sm font-black text-gray-900 mb-4">Reglas automáticas</h3>
<div class="space-y-4 text-sm font-bold">
<label class="flex items-center justify-between gap-3">
<span>Renovación automática activa</span>
<input type="checkbox" checked class="w-5 h-5 rounded" />
</label>
<label class="flex items-center justify-between gap-3">
<span>Suspender tras 2 fallos</span>
<input type="checkbox" checked class="w-5 h-5 rounded" />
</label>
<label class="flex items-center justify-between gap-3">
<span>WhatsApp de impago</span>
<input type="checkbox" checked class="w-5 h-5 rounded" />
</label>
<label class="flex items-center justify-between gap-3">
<span>Email con enlace de pago</span>
<input type="checkbox" checked class="w-5 h-5 rounded" />
</label>
</div>
</div>
<div class="bg-white p-6 rounded-2xl border border-gray-200 shadow-sm">
<h3 class="text-sm font-black text-gray-900 mb-4">Embudo de cobro</h3>
<div class="space-y-4">
<div>
<div class="flex justify-between text-xs font-black text-gray-500 mb-1"><span>Cobrado</span><span>78%</span></div>
<div class="w-full h-2 rounded-full bg-gray-100 overflow-hidden"><div class="w-[78%] h-full bg-emerald-500"></div></div>
</div>
<div>
<div class="flex justify-between text-xs font-black text-gray-500 mb-1"><span>Pendiente</span><span>12%</span></div>
<div class="w-full h-2 rounded-full bg-gray-100 overflow-hidden"><div class="w-[12%] h-full bg-blue-500"></div></div>
</div>
<div>
<div class="flex justify-between text-xs font-black text-gray-500 mb-1"><span>Fallido</span><span>10%</span></div>
<div class="w-full h-2 rounded-full bg-gray-100 overflow-hidden"><div class="w-[10%] h-full bg-rose-500"></div></div>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="tab-automation" class="tab-content hidden flex-1 min-h-0 fade-in overflow-y-auto no-scrollbar pb-10">
<div class="grid grid-cols-1 xl:grid-cols-3 gap-6">
<div class="xl:col-span-1 space-y-6">
<div class="bg-white p-6 rounded-2xl border border-gray-200 shadow-sm">
<h3 class="text-sm font-black text-gray-900 mb-4">Eventos activos</h3>
<div class="space-y-3">
<label class="flex items-center justify-between gap-3 p-3 rounded-xl bg-gray-50 border border-gray-100">
<span class="text-sm font-bold">Bienvenida de alta</span>
<input type="checkbox" checked class="w-5 h-5" />
</label>
<label class="flex items-center justify-between gap-3 p-3 rounded-xl bg-gray-50 border border-gray-100">
<span class="text-sm font-bold">Recordatorio de renovación</span>
<input type="checkbox" checked class="w-5 h-5" />
</label>
<label class="flex items-center justify-between gap-3 p-3 rounded-xl bg-gray-50 border border-gray-100">
<span class="text-sm font-bold">Impago</span>
<input type="checkbox" checked class="w-5 h-5" />
</label>
<label class="flex items-center justify-between gap-3 p-3 rounded-xl bg-gray-50 border border-gray-100">
<span class="text-sm font-bold">Cobertura agotada</span>
<input type="checkbox" checked class="w-5 h-5" />
</label>
<label class="flex items-center justify-between gap-3 p-3 rounded-xl bg-gray-50 border border-gray-100">
<span class="text-sm font-bold">Contrato firmado</span>
<input type="checkbox" checked class="w-5 h-5" />
</label>
</div>
</div>
</div>
<div class="xl:col-span-2 bg-white p-6 rounded-2xl border border-gray-200 shadow-sm flex flex-col min-h-[520px]">
<div class="flex justify-between items-center gap-3 mb-4 border-b border-gray-100 pb-4">
<div>
<h3 class="text-sm font-black text-gray-900">Plantilla WhatsApp · Bienvenida</h3>
<p class="text-xs text-gray-500 font-semibold">Se envía tras firma y activación del contrato.</p>
</div>
<button onclick="fakeSave('Automatización guardada')" class="px-4 py-2.5 rounded-xl bg-blue-600 text-white text-[10px] font-black uppercase tracking-widest shadow-lg">Guardar</button>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 flex-1">
<div class="lg:col-span-2 flex flex-col">
<label class="text-[10px] font-black text-gray-400 uppercase mb-2">Mensaje</label>
<textarea class="flex-1 w-full p-5 rounded-2xl bg-gray-50 border border-gray-200 text-sm font-semibold text-gray-700 min-h-[300px] outline-none focus:ring-2 focus:ring-blue-500">👋 Hola {{NOMBRE}}, te damos la bienvenida a {{EMPRESA}}.
Tu plan {{PLAN}} ya está activo desde hoy.
Incluye {{COBERTURAS_RESUMEN}}.
Puedes consultar tu contrato, recibos y servicios desde tu portal:
{{ENLACE_PORTAL}}</textarea>
</div>
<div class="space-y-4">
<div class="p-4 rounded-2xl bg-blue-50 border border-blue-100">
<p class="text-[10px] uppercase tracking-widest font-black text-blue-600 mb-2">Variables</p>
<div class="space-y-2 text-xs font-black text-blue-800">
<div>{{NOMBRE}}</div>
<div>{{EMPRESA}}</div>
<div>{{PLAN}}</div>
<div>{{COBERTURAS_RESUMEN}}</div>
<div>{{ENLACE_PORTAL}}</div>
<div>{{FECHA_RENOVACION}}</div>
</div>
</div>
<div class="p-4 rounded-2xl bg-gray-50 border border-gray-200">
<p class="text-[10px] uppercase tracking-widest font-black text-gray-400 mb-2">Regla</p>
<p class="text-sm font-bold text-gray-700">Disparar al cambiar estado del contrato a <span class="text-blue-700">ACTIVO</span>.</p>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="tab-documents" class="tab-content hidden flex-1 min-h-0 fade-in overflow-y-auto no-scrollbar pb-10">
<div class="grid grid-cols-1 xl:grid-cols-3 gap-6">
<div class="xl:col-span-1 space-y-6">
<div class="bg-white p-6 rounded-2xl border border-gray-200 shadow-sm">
<h3 class="text-sm font-black text-gray-900 mb-4">Documentos base</h3>
<div class="space-y-3">
<button class="w-full p-3 rounded-xl bg-blue-50 border border-blue-100 text-left text-sm font-black text-blue-700">Contrato general</button>
<button class="w-full p-3 rounded-xl bg-gray-50 border border-gray-200 text-left text-sm font-black text-gray-700">Anexo RGPD</button>
<button class="w-full p-3 rounded-xl bg-gray-50 border border-gray-200 text-left text-sm font-black text-gray-700">Carta renovación</button>
<button class="w-full p-3 rounded-xl bg-gray-50 border border-gray-200 text-left text-sm font-black text-gray-700">Carta de baja</button>
<button class="w-full p-3 rounded-xl bg-gray-50 border border-gray-200 text-left text-sm font-black text-gray-700">Recibo / comprobante</button>
</div>
</div>
</div>
<div class="xl:col-span-2 bg-white p-6 rounded-2xl border border-gray-200 shadow-sm flex flex-col min-h-[540px]">
<div class="flex justify-between items-center gap-3 mb-4 border-b border-gray-100 pb-4">
<div>
<h3 class="text-sm font-black text-gray-900">Editor de contrato</h3>
<p class="text-xs text-gray-500 font-semibold">Plantilla maestra aplicada a nuevas altas.</p>
</div>
<div class="flex gap-2">
<button class="px-4 py-2.5 rounded-xl border border-gray-200 text-[10px] uppercase tracking-widest font-black">Vista previa PDF</button>
<button onclick="fakeSave('Contrato guardado')" class="px-4 py-2.5 rounded-xl bg-blue-600 text-white text-[10px] uppercase tracking-widest font-black shadow-lg">Guardar</button>
</div>
</div>
<textarea class="flex-1 w-full p-6 rounded-2xl bg-gray-50 border border-gray-200 text-sm font-semibold text-gray-700 min-h-[360px] outline-none focus:ring-2 focus:ring-blue-500">1. OBJETO DEL CONTRATO
La empresa {{EMPRESA}} prestará al titular {{NOMBRE}} los servicios y coberturas descritos en el plan {{PLAN}}.
2. COBERTURAS
El contrato incluye {{COBERTURAS_RESUMEN}}, con los límites indicados en las condiciones particulares.
3. CARENCIA
Se establece un periodo de carencia de {{CARENCIA}} desde la fecha de alta.
4. RENOVACIÓN
La renovación será automática salvo oposición previa del titular.
5. EXCLUSIONES
Quedan excluidos los daños preexistentes, mal uso, trabajos de reforma integral y cualquier supuesto no amparado por las condiciones del plan.</textarea>
</div>
</div>
</section>
</main>
</div>
<div id="overlay" onclick="closeAllModals()" class="hidden fixed inset-0 bg-slate-950/40 glass z-40"></div>
<div id="companyModal" class="hidden fixed inset-0 z-50 p-4 md:p-8">
<div class="mx-auto max-w-3xl h-full flex items-center justify-center">
<div class="w-full bg-white rounded-3xl border border-gray-200 shadow-2xl overflow-hidden">
<div class="p-6 border-b border-gray-100 flex items-center justify-between">
<div>
<h3 class="text-lg font-black text-gray-900">Nueva aseguradora</h3>
<p class="text-xs text-gray-500 font-semibold">Alta rápida de empresa / marca de protección.</p>
</div>
<button onclick="closeAllModals()" class="p-2 rounded-xl hover:bg-gray-100"><i data-lucide="x" class="w-5 h-5"></i></button>
</div>
<div class="p-6 grid grid-cols-1 md:grid-cols-2 gap-4 max-h-[70vh] overflow-y-auto no-scrollbar">
<input placeholder="Nombre comercial" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="Razón social" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="CIF" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="Email" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="Teléfono" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="IBAN" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<textarea placeholder="Dirección fiscal" class="md:col-span-2 px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm min-h-[100px]"></textarea>
</div>
<div class="p-6 border-t border-gray-100 flex justify-end gap-3 bg-gray-50/70">
<button onclick="closeAllModals()" class="px-4 py-3 rounded-xl border border-gray-200 bg-white text-xs font-black uppercase tracking-widest">Cancelar</button>
<button onclick="fakeSave('Aseguradora creada'); closeAllModals();" class="px-4 py-3 rounded-xl bg-blue-600 text-white text-xs font-black uppercase tracking-widest shadow-lg">Crear</button>
</div>
</div>
</div>
</div>
<div id="planModal" class="hidden fixed inset-0 z-50 p-4 md:p-8">
<div class="mx-auto max-w-4xl h-full flex items-center justify-center">
<div class="w-full bg-white rounded-3xl border border-gray-200 shadow-2xl overflow-hidden">
<div class="p-6 border-b border-gray-100 flex items-center justify-between">
<div>
<h3 class="text-lg font-black text-gray-900">Nuevo plan de protección</h3>
<p class="text-xs text-gray-500 font-semibold">Configura precio, carencia, coberturas y límites.</p>
</div>
<button onclick="closeAllModals()" class="p-2 rounded-xl hover:bg-gray-100"><i data-lucide="x" class="w-5 h-5"></i></button>
</div>
<div class="p-6 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 max-h-[70vh] overflow-y-auto no-scrollbar">
<input placeholder="Nombre del plan" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<select class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm"><option>Tipo de cobro</option><option>Mensual</option><option>Anual</option><option>Mixto</option></select>
<input placeholder="Precio alta / promo" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="Precio renovación" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="Carencia (días)" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="Permanencia (meses)" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="Urgencias incluidas" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="Bricos incluidos" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="Copago" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<textarea placeholder="Coberturas incluidas" class="lg:col-span-2 px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm min-h-[100px]"></textarea>
<textarea placeholder="Exclusiones" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm min-h-[100px]"></textarea>
</div>
<div class="p-6 border-t border-gray-100 flex justify-end gap-3 bg-gray-50/70">
<button onclick="closeAllModals()" class="px-4 py-3 rounded-xl border border-gray-200 bg-white text-xs font-black uppercase tracking-widest">Cancelar</button>
<button onclick="fakeSave('Plan creado'); closeAllModals();" class="px-4 py-3 rounded-xl bg-blue-600 text-white text-xs font-black uppercase tracking-widest shadow-lg">Guardar plan</button>
</div>
</div>
</div>
</div>
<div id="subscriberModal" class="hidden fixed inset-0 z-50 p-4 md:p-8">
<div class="mx-auto max-w-4xl h-full flex items-center justify-center">
<div class="w-full bg-white rounded-3xl border border-gray-200 shadow-2xl overflow-hidden">
<div class="p-6 border-b border-gray-100 flex items-center justify-between">
<div>
<h3 class="text-lg font-black text-gray-900">Alta manual de suscriptor</h3>
<p class="text-xs text-gray-500 font-semibold">Titular, contrato, inmueble y método de pago.</p>
</div>
<button onclick="closeAllModals()" class="p-2 rounded-xl hover:bg-gray-100"><i data-lucide="x" class="w-5 h-5"></i></button>
</div>
<div class="p-6 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 max-h-[70vh] overflow-y-auto no-scrollbar">
<input placeholder="Nombre completo" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="DNI / NIE" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="Teléfono" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<input placeholder="Email" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" />
<select class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm"><option>Plan</option><option>Básico</option><option>Hogar Plus</option><option>Premium</option></select>
<select class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm"><option>Periodicidad</option><option>Mensual</option><option>Anual</option></select>
<input placeholder="Fecha inicio" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" type="date" />
<input placeholder="Fecha renovación" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm" type="date" />
<select class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm"><option>Método pago</option><option>Stripe</option><option>Transferencia</option><option>Recibo</option></select>
<textarea placeholder="Dirección inmueble" class="lg:col-span-2 px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm min-h-[100px]"></textarea>
<textarea placeholder="Observaciones internas" class="px-4 py-3 rounded-xl bg-gray-50 border border-gray-200 font-bold text-sm min-h-[100px]"></textarea>
</div>
<div class="p-6 border-t border-gray-100 flex justify-end gap-3 bg-gray-50/70">
<button onclick="closeAllModals()" class="px-4 py-3 rounded-xl border border-gray-200 bg-white text-xs font-black uppercase tracking-widest">Cancelar</button>
<button onclick="fakeSave('Suscriptor creado'); closeAllModals();" class="px-4 py-3 rounded-xl bg-blue-600 text-white text-xs font-black uppercase tracking-widest shadow-lg">Dar de alta</button>
</div>
</div>
</div>
</div>
<script src="js/layout.js"></script>
<script>
function switchTab(tab) {
document.querySelectorAll('.tab-content').forEach(el => el.classList.add('hidden'));
document.querySelectorAll('.tab-btn').forEach(el => el.classList.remove('active'));
document.getElementById('tab-' + tab).classList.remove('hidden');
document.getElementById('btn-tab-' + tab).classList.add('active');
if (window.lucide) lucide.createIcons();
}
function openModal(id) {
document.getElementById('overlay').classList.remove('hidden');
document.getElementById(id).classList.remove('hidden');
if (window.lucide) lucide.createIcons();
}
function closeAllModals() {
document.getElementById('overlay').classList.add('hidden');
document.querySelectorAll('[id$="Modal"]').forEach(m => m.classList.add('hidden'));
}
function fakeSave(message) {
const toast = document.createElement('div');
toast.className = 'fixed bottom-6 right-6 z-[70] bg-slate-900 text-white px-5 py-3 rounded-2xl shadow-2xl text-sm font-black tracking-wide fade-in';
toast.textContent = '✅ ' + message;
document.body.appendChild(toast);
setTimeout(() => toast.remove(), 2200);
}
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape') closeAllModals();
});
document.addEventListener('DOMContentLoaded', () => {
if (window.lucide) lucide.createIcons();
});
</script>
</body>
</html>